Fix build on sparc64-linux-gnu.
[official-gcc.git] / gcc / ChangeLog
blob014935f06b0e078c99bf269be008b02320c4b9c4
1 2018-11-05  Richard Biener  <rguenther@suse.de>
3         * tree-scalar-evolution.h (final_value_replacement_loop): Update
4         prototype.
5         * tree-scalar-evolution.c (final_value_replacement_loop): Return
6         whether anything was done.
7         (scev_const_prop): Remove constant propagation part, fold
8         remains into ...
9         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
10         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
11         conditionally.
13 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
15         PR tree-optimization/87859
16         * gimple-ssa-store-merging.c (struct merged_store_group): Add
17         only_constants and first_nonmergeable_order members.
18         (merged_store_group::merged_store_group): Initialize them.
19         (merged_store_group::do_merge): Clear only_constants member if
20         adding something other than INTEGER_CST store.
21         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
22         stores with order >= first_nonmergeable_order.  Use
23         merged_store->only_constants instead of always recomputing it.
24         Set merged_store->first_nonmergeable_order if we've skipped any
25         stores.  Attempt to merge overlapping INTEGER_CST stores that
26         we would otherwise skip.
28         PR sanitizer/87837
29         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
31 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
33         PR target/87853
34         * config/i386/emmintrin.h (__v16qs): New to cope with option
35         -funsigned-char.
36         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
37         (_mm_cmplt_epi8): Likewise.
38         (_mm_cmpgt_epi8): Likewise.
40 2018-11-05  Richard Biener  <rguenther@suse.de>
42         PR rtl-optimization/87852
43         * fwprop.c (use_killed_between): Only consider single-defs of the
44         use whose definition statement dominates the use.
46 2018-11-05  Martin Liska  <mliska@suse.cz>
48         PR web/87829
49         * doc/invoke.texi: Remove options that are
50         not disabled with -Os.
52 2018-11-05  Martin Liska  <mliska@suse.cz>
54         PR c/87811
55         * doc/extend.texi: Update constrain about the last argument
56         of __builtin_expect_with_probability.
58 2018-11-05  Martin Liska  <mliska@suse.cz>
60         PR c/87811
61         * predict.c (expr_expected_value_1): Verify
62         that last argument is a real constants and emit
63         error.
65 2018-11-05  Martin Liska  <mliska@suse.cz>
67         PR gcov-profile/77698
68         * ipa-profile.c (ipa_profile): Adjust hotness threshold
69         only in LTO mode.
71 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
73         PR tree-optimization/86572
74         * builtins.c (c_strlen): Handle negative offsets in a safe way.
76 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
78         PR tree-optimization/87672
79         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
80         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
82 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
84         PR middle-end/58372
85         * cfgexpand.c (pass_expand::execute): Move the call to
86         finish_eh_generation in front of the call to expand_stack_alignment.
88 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
90         * common/config/i386/i386-common.c (processor_alias_table): Add
91         znver2 entry.
92         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
93         (case ${target}): Add znver2.
94         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
95         -march=native recognize znver2 processors.
96         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
97         * config/i386/i386.c (m_znver2): New definition.
98         (m_ZNVER): New definition.
99         (m_AMD_MULTIPLE): Includes m_znver2.
100         (processor_cost_table): Add znver2 entry.
101         (processor_target_table): Add znver2 entry.
102         (get_builtin_code_for_version): Set priority for
103         PROCESSOR_ZNVER2.
104         (processor_model): Add M_AMDFAM17H_ZNVER2.
105         (arch_names_table): Ditto.
106         (ix86_reassociation_width): Include znver2.
107         * config/i386/i386.h (TARGET_znver2): New definition.
108         (struct ix86_size_cost): Add TARGET_ZNVER2.
109         (enum processor_type): Add PROCESSOR_ZNVER2.
110         * config/i386/i386.md (define_attr "cpu"): Add znver2.
111         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
112         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
113         (ix86_adjust_cost): Add znver2.
114         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
115         * gcc/doc/extend.texi: Add details about znver2.
116         * gcc/doc/invoke.texi: Add details about znver2.
118 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
120         PR target/87079
122         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
123         pattern.
125 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
127         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
128         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
130 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
132         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
133         shrink-wrapping when -mtrack-speculation.
135 2018-11-02  Richard Biener  <rguenther@suse.de>
137         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
138         (pop_cost_one_pair): Do not free pair.
139         (pop_best_coalesce): Likewise.
140         (create_coalesce_list): Initialize obstack.
141         (delete_coalesce_list): Free obstack.
142         (find_coalesce_pair): Obstack-allocate coalesce pairs.
143         (add_cost_one_coalesce): Likewise.
144         (struct live_track): Remove bitmap pointer indirections.
145         (new_live_track): Adjust.
146         (delete_live_track): Likewise.
147         (live_track_remove_partition): Likewise.
148         (live_track_add_partition): Likewise.
149         (live_track_live_p): Likewise.
150         (live_track_process_def): Likewise.
151         (live_track_clear_base_vars): Likewise.
153 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
155         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
156         * configure: Regenerate.
157         * config.in: Regenerate.
158         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
159         HAVE_AS_REGISTER_PSEUDO_OP guard.
160         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
161         !HAVE_AS_REGISTER_PSEUDO_OP support.
162         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
163         guard.
165 2018-11-02  Richard Biener  <rguenther@suse.de>
167         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
168         with is_type_die.
170 2018-11-02  Richard Biener  <rguenther@suse.de>
172         PR tree-optimization/87776
173         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
174         executable when iterating but running into rpo-vn-max-loop-depth
175         and not eliding the iteration.
177 2018-11-30  Jan Hubicka  <jh@suse.cz>
179         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
180         TYPE_DECL.
182 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
184         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
185         prototype.
186         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
187         Combine with rs6000_address_for_fpconvert.
188         (rs6000_address_for_fpconvert): Combine with
189         rs6000_force_indexed_or_indirect_mem.
190         (rs6000_expand_vector_init): Change function call from
191         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
192         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
193         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
194         (floatsi<mode>2_lfiwax_mem): Ditto.
195         (floatunssi<mode>2_lfiwzx): Ditto.
196         (floatunssi<mode>2_lfiwzx_mem): Ditto.
197         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
198         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
199         (fix_trunc<mode>si2_stfiwx): Ditto.
200         (fixuns_trunc<mode>si2_stfiwx): Ditto.
201         (float_<mode>si2_hw): Ditto.
202         (floatuns_<mode>si2_hw): Ditto.
203         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
204         (vsx_splat_<mode>): Ditto.
206 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
208         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
209         at end of assembler input text.
210         * configure: Regenerate.
212 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
214         PR tree-optimization/87826
215         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
216         negative or larger or equal to type's precision.
218 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
220         * opts.c (default_options_table): Do not enable
221         OPT_fdelayed_branch at -Og.
222         * doc/invoke.texi (-fdelayed-branch): Document it.
224 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
226         * optabs-libfuncs.c (build_libfunc_function_visibility):
227         New, split out from...
228         (build_libfunc_function): ... here.
229         (init_one_libfunc_visibility): New, split out from ...
230         (init_one_libfunc): ... here.
232         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
233         scratch register need not be early-clobber.  Document the reason
234         why we cannot use ST<OP>.
236 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
238         PR bootstrap/82856
239         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
240         line for second argument of AC_DEFINE_UNQUOTED.
241         * doc/install.texi (Tools/packages necessary for modifying GCC):
242         Update to autoconf 2.69 and automake 1.15.1.
243         * aclocal.m4, config.in, configure: Regenerate.
245 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
247         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
248         initialization.
250 2018-10-31  Martin Liska  <mliska@suse.cz>
252         PR driver/83193
253         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
254         Add new argument invalid_extension.
255         (aarch64_get_all_extension_candidates): New function.
256         (aarch64_rewrite_selected_cpu): Add NULL to function call.
257         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
258         new argument.
259         (aarch64_get_all_extension_candidates): New function.
260         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
261         argument invalid_extension.
262         (aarch64_parse_cpu): Likewise.
263         (aarch64_print_hint_for_extensions): New function.
264         (aarch64_validate_mcpu): Provide hint about invalid extension.
265         (aarch64_validate_march): Likewise.
266         (aarch64_handle_attr_arch): Pass new argument.
267         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
268         (aarch64_handle_attr_isa_flags): Likewise.
270 2018-10-31  Richard Biener  <rguenther@suse.de>
272         PR middle-end/70359
273         PR middle-end/86270
274         * tree-outof-ssa.c (insert_backedge_copies): Restrict
275         copy generation to useful cases.  Place the copy before
276         the definition of the backedge value when possible.
278 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
280         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
281         * config/arc/arc.c (arc_active_insn): New function.
282         (check_store_cacheline_hazard): Likewise.
283         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
284         (arc_override_options): Disable delay slot scheduler for older
285         A7.
286         (arc_store_addr_hazard_p): New implementation, old one renamed to
287         ...
288         (arc_store_addr_hazard_internal_p): Renamed.
289         (arc_reorg): Don't combine into brcc instructions which are part
290         of hardware hazard solution.
291         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
292         (tune_arc700): Likewise.
293         * config/arc/arc.opt (arc7xx): New tune value.
294         * config/arc/arc700.md: Improve A7 scheduler.
296 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
298         * config/arc/arc.c (arc_override_options): Remove
299         TARGET_COMPACT_CASESI.
300         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
301         (CASE_VECTOR_MODE): Likewise.
302         (CASE_VECTOR_PC_RELATIVE): Likewise.
303         (CASE_VECTOR_SHORTEN_MODE): Likewise.
304         (CASE_VECTOR_SHORTEN_MODE1): Delete.
305         (ADDR_VEC_ALIGN): Update.
306         (ASM_OUTPUT_CASE_LABEL): Undefine.
307         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
308         (TARGET_BI_BIH): Define.
309         (DEFAULT_BRANCH_INDEX): Likewise.
310         * config/arc/arc.md (casesi): Rework to accept BI/BIH
311         instructions, remove compact_casesi use case.
312         (casesi_compact_jump): Remove.
313         (casesi_dispatch): New pattern.
314         * config/arc/arc.opt: Add mbranch-index option. Deprecate
315         compact_casesi option.
316         * doc/invoke.texi: Document mbranch-index option.
318 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
320         * config/arc/arc.c (arc_get_tp): Remove function.
321         (arc_emit_call_tls_get_addr): Likewise.
322         (arc_call_tls_get_addr): New function.
323         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
324         * config/arc/arc.md (tls_load_tp_soft): Remove.
325         (tls_gd_get_addr): Likewise.
327 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
329         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
330         (mulsi3_600_lib): Remove pattern.
331         (umulsi3_highpart_600_lib_le): Likewise.
332         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
333         (umulsidi3): Remove call to umulsidi3_600_lib.
334         (umulsidi3_600_lib): Remove pattern.
335         (peephole2): Remove peephole using the above deprecated patterns.
337 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
339         PR target/87374
340         * config/arm/arm.c (arm_option_check_internal): Disable the combined
341         use of -mslow-flash-data and -mword-relocations.
342         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
343         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
344         flag_pic.
345         * doc/invoke.texi (-mword-relocations): Mention conflict with
346         -mslow-flash-data.
347         (-mslow-flash-data): Reciprocally.
349 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
351         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
352         16-byte modes held in GP registers to use an even regno.
354         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
355         (aarch64_atomic_ldop_supported_p): Remove.
356         (aarch64_gen_atomic_ldop): Remove.
357         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
358         Fully expand LSE operations here.
359         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
360         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
361         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
362         and use ATOMIC_LDOP instead; use register_operand for the input;
363         drop the split and emit insns directly.
364         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
365         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
366         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
368         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
369         (aarch64_gen_atomic_ldop): Don't call it.
370         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
371         Use aarch64_reg_or_zero.
372         (aarch64_atomic_exchange<ALLI>): Likewise.
373         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
374         operand 0; use aarch64_reg_or_zero for input; merge ...
375         (@aarch64_atomic_swp<ALLI>): ... this and remove.
377         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
378         (aarch64_split_compare_and_swap): Use it.
379         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
380         test oldval against the proper predicate.
381         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
382         Use nonmemory_operand for expected.
383         (cas_short_expected_pred): New.
384         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
385         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
386         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
387         (aarch64_plushi_operand): New.
389         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
390         Force oldval into the rval register for TARGET_LSE; emit the compare
391         during initial expansion so that it may be deleted if unused.
392         (aarch64_gen_atomic_cas): Remove.
393         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
394         Change =&r to +r for operand 0; use match_dup for operand 2;
395         remove is_weak and mod_f operands as unused.  Drop the split
396         and merge with...
397         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
398         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
399         (@aarch64_atomic_cas<GPI>): Similarly.
401 2018-10-31  Richard Biener  <rguenther@suse.de>
403         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
404         using ABSU_EXPR.
406 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
408         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
409         * config/aarch64/aarch64.md: Include saphira.md
410         * config/aarch64/saphira.md: New file for pipeline description.
412 2018-10-30  Martin Sebor  <msebor@redhat.com>
414         PR middle-end/87041
415         * gimple-ssa-sprintf.c (format_directive): Use %G to include
416         inlining context.
417         (sprintf_dom_walker::compute_format_length):
418         Avoid setting POSUNDER4K here.
419         (get_destination_size): Handle null argument values.
420         (get_user_idx_format): New function.
421         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
422         functions, including user-defined with attribute format printf.
423         Use %G to include inlining context.
424         Set POSUNDER4K here.
426 2018-10-30  Jan Hubicka  <jh@suse.cz>
428         * params.def (lto-partitions): Bump from 32 to 128.
430 2018-10-30  Jan Hubicka  <jh@suse.cz>
432         * tree.c
433         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
434         head in file.
435         (free_lang_data_in_type): Forward declare.
436         (fld_type_variant_equal_p): New function.
437         (fld_type_variant): New function
438         (fld_incomplete_types): New hash.
439         (fld_incomplete_type_of): New function
440         (fld_simplfied-type): New function.
441         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
442         (free_lang_data): Allocate and free fld_incomplete_type; update call
443         of free_lang_data_in_decl.
445 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
447         * gcov.c (output_lines): Remove duplicate line.
449 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
451         * config/rs6000/rs6000.md (bswapdi2): Force address into register
452         if not in indexed or indirect form.
453         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
454         (bswapdi2_store): Ditto.
455         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
456         helper function.
457         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
458         Prototype for helper function.
460 2018-10-30  Martin Sebor  <msebor@redhat.com>
462         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
463         (target, pragma GCC optimize, pragma GCC target): Ditto.
465 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
467         * doc/extend.texi: Fix prototype and description of
468         __builtin_expect_with_probability.
470 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
472         * cgraph.h (clone_function_name_1): Replaced by new
473           clone_function_name_numbered that takes name as string; for
474           privatize_symbol_name_1 use only.
475           (clone_function_name): Renamed to
476           clone_function_name_numbered to be explicit about numbering.
477           (clone_function_name): New two-argument function that does
478           not number its output.
479           (clone_function_name): New three-argument function that
480           takes a number to append to its output.
481         * cgraphclones.c (duplicate_thunk_for_node):
482           (clone_function_name_1): Renamed.
483           (clone_function_name_numbered): Two new functions.
484           (clone_function_name): Improved documentation.
485           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
486         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
487         * final.c (final_scan_insn_1): Use the new clone_function_name
488           without numbering.
489         * multiple_target.c (create_dispatcher_calls): Ditto.
490           (create_target_clone): Ditto.
491         * omp-expand.c (grid_expand_target_grid_body): Ditto.
492         * omp-low.c (create_omp_child_function_name): Ditto.
493         * omp-simd-clone.c (simd_clone_create): Ditto.
494         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
495           new clone_function_name without numbering.
497 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
499         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
500         Assert that the allocation size is not zero.
502 2018-10-30  Richard Biener  <rguenther@suse.de>
504         PR tree-optimization/87800
505         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
506         non-induction or reduction PHIs.
508 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
510         * config/aarch64/falkor-tag-collision-avoidance.c
511         (execute_tag_collision_avoidance): Call df_note_add_problem.
513 2018-10-30  Martin Liska  <mliska@suse.cz>
515         * doc/extend.texi: Fix typo in documentation
516         of __builtin_expect_with_probability.
518 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
520         PR c++/87721
521         * input.c (get_substring_ranges_for_loc): Detect if
522         linemap_resolve_location gives us a NULL map, and reject
523         this case.
525 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
527         * config.gcc (xstormy16-*-elf): Set tm_d_file.
529 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
530             Martin Sebor  <msebor@redhat.com>
531             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
533         * doc/ux.texi (Quoting): New subsection, adapted from material at
534         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
535         MartinSebor and ManuelLopezIbanez.
536         (Fix-it hints): Note that fix-it hints shouldn't be marked for
537         translation.
539 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
541         PR middle-end/87469
542         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
543         max value.
545 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
547         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
549 2018-10-29  Paul Koning  <ni1d@arrl.net>
551         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
553 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
555         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
556         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
557         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
558         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
559         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
560         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
561         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
562         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
563         Change 'vector' to '__vector'.
564         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
565         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
566         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
567         _mm_avg_pu16): Likewise.  And, whitespace corrections.
569 2018-10-29  Richard Biener  <rguenther@suse.de>
571         PR tree-optimization/87785
572         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
573         internal defs.
575 2018-10-29  Olivier Hainque  <hainque@adacore.com>
577         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
579 2018-10-29  Olivier Hainque  <hainque@adacore.com>
581         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
582         ports configuration macro, defaults to "gnu".
583         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
584         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
586 2018-10-29  Olivier Hainque  <hainque@adacore.com>
588         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
590 2018-10-29  Richard Biener  <rguenther@suse.de>
592         PR tree-optimization/87790
593         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
594         (vect_make_slp_decision): Adjust.
595         (vect_slp_analyze_bb_1): Likewise.
596         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
597         edges.
599 2018-10-29  Richard Biener  <rguenther@suse.de>
601         PR tree-optimization/87785
602         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
603         and processing.
604         (vect_build_slp_tree): Likewise.
605         (vect_gather_slp_loads): New function.
606         (vect_analyze_slp_instance): Gather loads separately from the
607         SLP tree build.
609 2018-10-29  Martin Liska  <mliska@suse.cz>
611         * Makefile.in: Make dependency to json.o.
612         * doc/gcov.texi: Document new JSON format, remove
613         old intermediate format documentation.
614         * gcov.c (struct function_info): Come up with m_name and
615         m_demangled_name.
616         (function_info::function_info): Initialize it.
617         (function_info::~function_info): Release it.
618         (main): Rename flag_intermediate_format to flag_json_format.
619         (print_usage): Describe --json-format.
620         (process_args): Set flag_json_format.
621         (output_intermediate_line): Remove.
622         (output_intermediate_json_line): Likewise.
623         (get_gcov_intermediate_filename): Return new extension
624         ".gcov.json.gz".
625         (output_intermediate_file): Implement JSON emission.
626         (output_json_intermediate_file): Implement JSON emission.
627         (generate_results): Use ::get_name for function name.
628         Handle JSON output file.
629         (read_graph_file): Use ::get_name instead of cplus_demangle.
630         (read_count_file): Likewise.
631         (solve_flow_graph): Likewise.
632         (add_line_counts): Likewise.
633         (accumulate_line_counts): Use new flag_json_format.
634         (output_function_details): Use ::get_name instead of cplus_demangle.
635         (output_lines): Likewise.
636         * json.cc (test_writing_literals): Add new tests.
637         * json.h (class literal): Add new boolean constructor.
639 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
641         PR rtl-optimization/87701
642         PR rtl-optimization/87780
643         * combine.c (make_more_copies): Rewrite.
645 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
647         * doc/generic.texi (ABSU_EXPR): Document.
648         * match.pd (absu(x)*absu(x) -> x*x): Handle.
649         (absu(absu(X)) -> absu(X)): Likewise.
650         (absu(-X) -> absu(X)): Likewise.
651         (absu(X)  where X is nonnegative -> X): Likewise.
653 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
655         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
656         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
657         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
658         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
659         (s-tm-texi): Also check timestamp on d-target.def.
660         (generated_files): Add TM_D_H and d-target-hooks-def.h.
661         (build/genhooks.o): Also depend on D_TARGET_DEF.
662         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
663         variables.
664         * config/aarch64/aarch64-d.c: New file.
665         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
666         Define.
667         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
668         prototype.
669         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
670         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
671         * config/arm/arm-d.c: New file.
672         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
673         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
674         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
675         * config/arm/t-arm (arm-d.o): New rule.
676         * config/default-d.c: New file.
677         * config/glibc-d.c: New file.
678         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
679         * config/i386/i386-d.c: New file.
680         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
681         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
682         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
683         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
684         * config/i386/t-i386 (i386-d.o): New rule.
685         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
686         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
687         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
688         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
689         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
690         * config/mips/mips-d.c: New file.
691         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
692         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
693         * config/mips/t-mips (mips-d.o): New rule.
694         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
695         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
696         * config/powerpcspe/powerpcspe-d.c: New file.
697         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
698         New prototype.
699         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
700         Support GNU D by using 0 as the language type.
701         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
702         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
703         * config/riscv/riscv-d.c: New file.
704         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
705         prototype.
706         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
707         * config/riscv/t-riscv (riscv-d.o): New rule.
708         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
709         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
710         * config/rs6000/rs6000-d.c: New file.
711         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
712         prototype.
713         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
714         Support GNU D by using 0 as the language type.
715         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
716         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
717         * config/s390/s390-d.c: New file.
718         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
719         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
720         * config/s390/t-s390 (s390-d.o): New rule.
721         * config/sparc/sparc-d.c: New file.
722         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
723         prototype.
724         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
725         * config/sparc/t-sparc (sparc-d.o): New rule.
726         * config/t-glibc (glibc-d.o): New rule.
727         * configure: Regenerated.
728         * configure.ac (tm_d_file): New variable.
729         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
730         * doc/contrib.texi (Contributors): Add self for the D frontend.
731         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
732         * doc/install.texi (Configuration): Mention libphobos as an option for
733         --enable-shared.  Mention d as an option for --enable-languages.
734         (Testing): Mention check-d as a target.
735         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
736         name suffixes.  Mention d as a -x option.
737         * doc/sourcebuild.texi (Top Level): Mention libphobos.
738         * doc/standards.texi (Standards): Add section on D language.
739         * doc/tm.texi: Regenerated.
740         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
741         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
742         * dwarf2out.c (is_dlang): New function.
743         (gen_compile_unit_die): Use DW_LANG_D for D.
744         (declare_in_namespace): Return module die for D, instead of adding
745         extra declarations into the namespace.
746         (gen_namespace_die): Generate DW_TAG_module for D.
747         (gen_decl_die): Handle CONST_DECLSs for D.
748         (dwarf2out_decl): Likewise.
749         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
750         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
751         kinds of aggregates.
752         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
753         * genhooks.c: Include d/d-target.def.
755 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
757         PR target/85669
758         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
759         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
760         (STACK_DYNAMIC_OFFSET): Likewise.
762 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
764         PR target/80024
765         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
766         error message.
768 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
770         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
771         return type and other typos.
773 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
775         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
776         a shorter sequence with fewer branches.
777         (emit_final_str_compare_gpr): Ditto.
779 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
781         * config/rs6000/tmmintrin.h: New file.
782         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
784 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
786         * config/rs6000/mmintrin.h: Enable 32bit compilation.
787         * config/rs6000/xmmintrin.h: Likewise.
789 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
791         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
793 2018-10-26  Richard Biener  <rguenther@suse.de>
795         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
796         and wrapper.
797         (vect_mark_slp_stmts_relevant): Likewise.
798         (vect_detect_hybrid_slp_stmts): Likewise.
799         (vect_bb_slp_scalar_cost): Likewise.
800         (vect_remove_slp_scalar_calls): Likewise.
802 2018-10-26  Jan Hubicka  <jh@suse.cz>
804         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
805         (warn_types_mismatch): Fix walk of DECL_NAME.
806         (odr_types_equivalent_p): Fix overactive assert.
808 2018-10-26  Richard Biener  <rguenther@suse.de>
810         PR tree-optimization/87105
811         * tree-vectorizer.h (_slp_tree::refcnt): New member.
812         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
813         refcnt.
814         (vect_create_new_slp_node): Initialize refcnt to one.
815         (bst_traits): Move.
816         (scalar_stmts_set_t, bst_fail): Remove.
817         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
818         (vect_build_slp_tree): Add bst_map argument and lookup
819         already created SLP nodes.
820         (vect_print_slp_tree): Handle a SLP graph, print SLP node
821         addresses.
822         (vect_slp_rearrange_stmts): Handle a SLP graph.
823         (vect_analyze_slp_instance): Adjust and free SLP nodes from
824         the CSE map.  Fix indenting.
825         (vect_schedule_slp_instance): Add short-cut.
827 2018-10-26  Martin Liska  <mliska@suse.cz>
829         PR testsuite/86158
830         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
831         addr_expr and not with pointers.
833 2018-10-26  Jan Hubicka  <jh@suse.cz>
835         * tree.c (free_lang_data_in_type): Only check main variants.
836         * ipa-devirt.c (warn_odr): Make static.
837         (types_same_for_odr): Drop strict variant.
838         (types_odr_comparable): Likewise.
839         (odr_or_derived_type_p): Look for main variants.
840         (odr_name_hasher::equal): Cleanup comment.
841         (odr_subtypes_equivalent): Add warn and warned arguments; check main
842         variants.
843         (type_variants_equivalent_p): break out from ...
844         (odr_types_equivalent): ... here; go for main variants where needed.
845         (warn_odr): ... here; turn static.
846         (warn_types_mismatch): Compare mangled names of main variants.
847         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
848         (type_with_linkage_p): Sanity check that we look at main variant.
849         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
850         * tree.h (types_same_for_odr): Drop strict argument.
852 2018-10-26  Richard Biener  <rguenther@suse.de>
854         PR tree-optimization/87746
855         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
856         Simplify and fix WRT strided store groups with size not
857         equal to step in element count.
858         (vect_analyze_group_access_1): Dump the whole group.
860 2018-10-25  Carl Love  <cel@us.ibm.com>
862         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
863         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
864         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
865         precicion entry for each overloaded builtin.
866         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
867         VSCEDPUO): Rename overloaded name.
868         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
869         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
870         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
871         define_expand for xscmpexqp instruction.
872         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
874 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
875             Jinsong Ji <jji@us.ibm.com>
877         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
878         function with vec_sl.
879         (_mm_slli_epi32): Likewise.
880         (_mm_slli_epi64): Likewise.
881         (_mm_srai_epi16): Replace deprecated function with vec_sra.
882         (_mm_srai_epi32): Likewise.
883         (_mm_srli_epi16): Replace deprecated function with vec_sr.
884         (_mm_srli_epi32): Likewise.
885         (_mm_srli_epi64): Likewise.
886         (_mm_sll_epi16): Replace deprecated function with vec_sl.
887         (_mm_sll_epi32): Likewise.
888         (_mm_sll_epi64): Likewise.
889         (_mm_sra_epi16): Replace deprecated function with vec_sra.
890         (_mm_sra_epi32): Likewise.
891         (_mm_srl_epi16): Replace deprecated function with vec_sr.
892         (_mm_srl_epi32): Likewise.
893         (_mm_srl_epi64): Likewise.
895 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
896             Jinsong Ji <jji@us.ibm.com>
898         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
899         comparison operators with vec_cmp* for compatibility due to
900         unfortunate history; clean up formatting and use types more
901         appropriately.
902         (_mm_sll_epi32): Likewise.
903         (_mm_sll_epi64): Likewise.
904         (_mm_srl_epi16): Likewise.
905         (_mm_srl_epi32): Likewise.
906         (_mm_srl_epi64): Likewise.
908 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
909             Jinsong Ji <jji@us.ibm.com>
911         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
912         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
913         __vector __bool int.  Use vec_cmpgt in preference to deprecated
914         function vec_vcmpgtfp.
915         (_mm_max_ps): Likewise.
917 2018-10-25  Jeff Law  <law@redhat.com>
919         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
920         if returning false.
922 2018-10-25  Martin Sebor  <msebor@redhat.com>
924         * doc/extend.texi (aligned): Expand attribute description.
925         (Alignment): Rename section.  Discuss function arguments.
927 2018-10-25  Jan Hubicka  <jh@suse.cz>
929         * ipa-devirt.c (main_odr_variant): Remove.
930         (hash_odr_name, types_same_for_odr, types_odr_comparable,
931         odr_name_hasher::equal, odr_subtypes_equivalent_p):
932         Drop use of main_odr_variant.
933         (add_type_duplicate): Silence confused warnings on integer types.
934         (get_odr_type): Always look for main variant.
935         (register_odr_type): Simplify.
937 2018-10-25  Richard Biener  <rguenther@suse.de>
939         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
940         Initialize ng to silence error with release checking bootstrap.
942 2018-10-25  Richard Biener  <rguenther@suse.de>
944         * tree-if-conv.c: Include tree-ssa-sccvn.h.
945         (tree_if_conversion): Run CSE on the if-converted loop body.
947 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
949         * config/s390/constraints.md (ZL): New constraint.
950         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
951         operands.
952         * config/s390/s390.md (movdi_larl): Remove.
953         (movdi_64): Add the LARL alternative.
955 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
957         PR bootstrap/87747
958         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
959         (RTX_CODE_HWINT_P): New macro.
960         (rtx_code_size): Use RTX_CODE_HWINT_P ().
962 2018-10-25  Jan Hubicka  <jh@suse.cz>
964         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
965         is anonymous.
967 2018-10-25  Richard Biener  <rguenther@suse.de>
969         PR tree-optimization/87665
970         PR tree-optimization/87745
971         * tree-vectorizer.h (get_earlier_stmt): Remove.
972         (get_later_stmt): Pick up UID from the original non-pattern stmt.
974 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
976         * options.texi (Deprecated): Move list to Var section.
978 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
979             Jinsong Ji <jji@us.ibm.com>
981         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
982         __vector long to __vector long long.
983         (_mm_cvtpd_ps): Likewise.
984         (_mm_cvttpd_epi32): Likewise.
985         (_mm_cvtpi32_pd): Likewise.
986         (_mm_unpackhi_epi64): Likewise.
987         (_mm_unpacklo_epi64): Likewise.
989 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
991         PR rtl-optimization/87720
992         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
994 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
996         * gimple-ssa-isolate-paths.c
997         (find_implicit_erroneous_behavior): Do not change code if the
998         pass is running for warnings only.
999         (find_explicit_erroneous_behavior): Likewise.
1001 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
1003         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
1004         Define as rs6000_mangle_decl_assembler_name.
1005         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
1006         long double to IEEE long double, switch the names of the long
1007         double built-in functions to be <func>f128 instead of <func>l.
1009 2018-10-24  Martin Sebor  <msebor@redhat.com>
1011         * doc/extend.texi (nonnull): List no-argument form.  Reference
1012         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
1014 2018-10-24  Richard Biener  <rguenther@suse.de>
1016         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
1018 2018-10-24  Martin Liska  <mliska@suse.cz>
1020         PR tree-optimization/84436
1021         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
1022         Remove.
1023         (switch_conversion::contains_linear_function_p): New.
1024         (switch_conversion::build_one_array): Support linear
1025         transformation on input.
1026         * tree-switch-conversion.h (struct switch_conversion): Add
1027         contains_linear_function_p declaration.
1029 2018-10-24  Richard Biener  <rguenther@suse.de>
1031         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
1032         if its argument is CONSTANT_CLASS_P.
1034 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
1036         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
1037         it is wrong for forward declarations.
1039 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
1041         * config/s390/s390.c (s390_check_qrst_address): Add the missing
1042         SYMBOL_REF_P () check.
1044 2018-10-24  Richard Biener  <rguenther@suse.de>
1046         PR tree-optimization/87105
1047         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
1048         dump classification.
1049         (vect_analyze_data_ref_accesses): Handle duplicate loads and
1050         stores by splitting the affected group after the fact.
1051         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
1052         fail the SLP build because of size constraints.
1054 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1056         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
1057         * configure: Regenerate.
1058         * config.in: Regenerate.
1059         * varasm.c (mergeable_string_section): Use readonly_data_section
1060         if linker doesn't support SHF_MERGE with alignment > 8.
1061         (mergeable_constant_section): Likewise.
1063 2018-10-24  Richard Biener  <rguenther@suse.de>
1065         PR tree-optimization/84013
1066         * tree-ssa-structalias.c (struct msdi_data): New struct for
1067         marshalling data to walk_stmt_load_store_ops.
1068         (maybe_set_dependence_info): Refactor as callback for
1069         walk_stmt_load_store_ops.
1070         (compute_dependence_clique): Set restrict info on all stmt kinds.
1072 2018-10-24  Martin Liska  <mliska@suse.cz>
1074         * cgraph.c (cgraph_node::dump):
1075         Remove reduntant dumps and make tp_first_run dump more compact.
1077 2018-10-24  Richard Biener  <rguenther@suse.de>
1079         PR tree-optimization/87665
1080         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
1081         to reflect reality.
1083 2018-10-12  Jeff Law  <law@redhat.com>
1085         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
1086         for H8/S.
1088 2018-10-23  Richard Biener  <rguenther@suse.de>
1090         * tree-vrp.c (add_assert_info): Guard dump_printf with
1091         dump_enabled_p.
1092         * gimple-ssa-evrp-analyze.c
1093         (evrp_range_analyzer::record_ranges_from_incoming_edge):
1094         Use value_range::ignore_equivs_equal_p.
1096 2018-10-23  Richard Biener  <rguenther@suse.de>
1098         PR tree-optimization/87105
1099         PR tree-optimization/87608
1100         * passes.def (pass_all_early_optimizations): Add early phi-opt
1101         after dce.
1102         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
1103         addition to debug stmts.
1104         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
1105         and abs replacement early.
1106         * tree-cfg.c (gimple_empty_block_p): Likewise.
1108 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
1110         PR target/86383
1111         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
1112         specified to configure.
1113         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
1115 2018-10-23  Richard Biener  <rguenther@suse.de>
1117         PR tree-optimization/87700
1118         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
1120 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
1122         PR target/87674
1123         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
1124         second argument from __mmask16 to __mmask8.
1125         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
1126         _mm_mask_packs_epi32): Likewise.
1127         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
1128         Likewise.
1129         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
1131 2018-10-23  Richard Biener  <rguenther@suse.de>
1133         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
1135 2018-10-23  Richard Biener  <rguenther@suse.de>
1137         PR tree-optimization/86144
1138         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
1139         over simd attribute.
1141 2018-10-23  Richard Biener  <rguenther@suse.de>
1143         PR tree-optimization/87693
1144         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
1145         the case we do not find the taken edge.
1147 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
1148             Jinsong Ji  <jji@us.ibm.com>
1150         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
1151         (_mm_store_pd): Use unaligned vector type for pointer cast.
1152         (_mm_maskmoveu_si128): Likewise.
1153         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
1154         (_mm_store_ps): Use unaligned vector type for pointer cast.
1156 2018-10-22  Paul Koning  <ni1d@arrl.net>
1158         * symtab.c (symtab_node::increase_alignment): Correct max
1159         alignment check.
1161 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
1163         PR tree-optimization/87633
1164         * match.pd: Do not generate unordered integer comparisons.
1166 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
1168         PR rtl-optimization/87600
1169         * combine.c: Add include of expr.h.
1170         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
1171         register to a pseudo.
1172         (make_more_copies): New function, add a copy to a new pseudo after
1173         the moves from hard registers into pseudos.
1174         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
1175         later.  Call make_more_copies.
1177 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
1179         * lra-constraints.c (process_alt_operands): New local array,
1180         matching_early_clobber.  Check matching_early_clobber before
1181         decrementing reject, and set matching_early_clobber after.
1183 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
1185         PR target/87598
1186         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
1187         call output_addr_const and hope for the best.
1189 2018-10-22  Richard Biener  <rguenther@suse.de>
1191         * gimple-ssa-evrp-analyze.c
1192         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
1193         smarter about what ranges to use.
1194         * tree-vrp.c (add_assert_info): Dump here.
1195         (register_edge_assert_for_2): Instead of here at multiple but
1196         not all places.
1198         * gcc.dg/tree-ssa/evrp12.c: New testcase.
1199         * gcc.dg/predict-6.c: Adjust.
1200         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
1201         * gcc.dg/tree-ssa/vrp02.c: Likewise.
1202         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
1204 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
1205         Richard Biener  <rguenther@suse.de>
1207         * bitmap.h: Update data structure documentation, including a
1208         description of bitmap views as either linked-lists or splay trees.
1209         (struct bitmap_element_def): Update comments for splay tree bitmaps.
1210         (struct bitmap_head_def): Likewise.
1211         (bitmap_list_view, bitmap_tree_view): New prototypes.
1212         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1213         tree_form fields.
1214         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1215         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1216         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1217         released bitmap element here.
1218         (bitmap_element_free): Remove.
1219         (bitmap_elt_clear_from): Work on splay tree bitmaps.
1220         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
1221         this function similar ones such that linked-list bitmap implementation
1222         functions are grouped.
1223         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1224         and moved for grouping.
1225         (bitmap_list_insert_element_after): Renamed from
1226         bitmap_elt_insert_after, and moved for grouping.
1227         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1228         (bitmap_tree_link_left, bitmap_tree_link_right,
1229         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1230         bitmap_tree_link_element, bitmap_tree_unlink_element,
1231         bitmap_tree_find_element): New functions for splay-tree bitmap
1232         implementation.
1233         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1234         Renamed and moved, see above entries.
1235         (bitmap_tree_listify_from): New function to convert part of a splay
1236         tree bitmap to a linked-list bitmap.
1237         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1238         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1239         (bitmap_find_bit): Remove.
1240         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1241         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1242         Handle splay tree bitmaps.
1243         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1244         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1245         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1246         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1247         bitmap_intersect_compl_p, bitmap_ior_and_compl,
1248         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1249         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
1250         corresponding changes to use linked-list specific bitmap_element
1251         manipulation functions as applicable for efficiency.
1252         (bitmap_tree_to_vec): New function.
1253         (debug_bitmap_elt_file): New function split out from ...
1254         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
1255         (bitmap_print): Likewise.
1257         PR tree-optimization/63155
1258         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1259         SSA edge worklists.
1260         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1261         in tree-view.
1263 2018-10-22  Martin Liska  <mliska@suse.cz>
1265         PR tree-optimization/87686
1266         Revert
1267         2018-08-29  Martin Liska  <mliska@suse.cz>
1269         * tree-switch-conversion.c (switch_conversion::expand):
1270         Strenghten assumption about gswitch statements.
1272 2018-10-22  Martin Liska  <mliska@suse.cz>
1274         * ipa-icf.c (sem_item::compare_attributes): Remove.
1275         (sem_item::compare_referenced_symbol_properties): Use
1276         attribute_list_equal instead.
1277         (sem_function::equals_wpa): Likewise.
1278         * ipa-icf.h: Remove compare_attributes.
1280 2018-10-22  Richard Biener  <rguenther@suse.de>
1282         PR middle-end/87682
1283         * mem-stats.h (mem_usage::operator==): Fix pasto.
1285 2018-10-22  Richard Biener  <rguenther@suse.de>
1287         PR tree-optimization/87640
1288         * tree-vrp.c (set_value_range_with_overflow): Decompose
1289         incomplete result.
1290         (extract_range_from_binary_expr_1): Adjust.
1292 2018-10-22  Martin Jambor  <mjambor@suse.cz>
1294         * tree-eh.h (stmt_could_throw_p): Add function parameter.
1295         (stmt_can_throw_external): Likewise.
1296         (stmt_can_throw_internal): Likewise.
1297         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1298         (lower_eh_constructs_2): Likewise.
1299         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1300         (stmt_can_throw_external): Likewise.
1301         (stmt_can_throw_internal): Likewise.
1302         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1303         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1304         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1305         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1306         (pass_lower_eh_dispatch::execute): Pass cfun to
1307         stmt_can_throw_external.
1308         (cleanup_empty_eh): Likewise.
1309         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1310         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1311         stmt_can_throw_external instead of pushing it to cfun.
1312         (symbol_table::create_edge): Likewise.
1313         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1314         stmt_can_throw_internal.
1315         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1316         to stmt_could_throw_p.
1317         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1318         stmt_can_throw_internal.
1319         (pass_store_merging::execute): Likewise.
1320         * gimple-ssa-strength-reduction.c
1321         (find_candidates_dom_walker::before_dom_children): Pass cfun to
1322         stmt_could_throw_p.
1323         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1324         stmt_can_throw_internal.
1325         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1326         to stmt_can_throw_external.
1327         (check_stmt): Pass cfun to stmt_could_throw_p.
1328         (check_stmt): Pass cfun to stmt_can_throw_external.
1329         (pass_nothrow::execute): Likewise.
1330         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1331         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1332         stmt_can_throw_internal.
1333         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1334         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1335         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1336         * tree-complex.c (expand_complex_libcall): Pass cfun to
1337         stmt_could_throw_p and to stmt_can_throw_internal.
1338         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1339         * tree-inline.c (copy_edges_for_bb): Likewise.
1340         (maybe_move_debug_stmts_to_successors): Likewise.
1341         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1342         stmt_could_throw_p.
1343         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1344         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1345         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1346         stmt_can_throw_internal.
1347         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1348         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1349         stmt_could_throw_p.
1350         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1351         stmt_can_throw_internal.
1352         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1353         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1354         stmt_could_throw_p.
1355         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1356         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1357         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1358         (convert_mult_to_fma_1): Likewise.
1359         (convert_to_divmod): Likewise.
1360         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1361         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1362         * tree-ssa-propagate.c
1363         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1364         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1365         (maybe_optimize_range_tests): Likewise.
1366         (linearize_expr_tree): Likewise.
1367         (reassociate_bb): Likewise.
1368         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1369         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1370         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1371         (handle_char_store): Likewise.
1372         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1373         stmt_can_throw_internal.
1374         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1375         stmt_could_throw_p.
1376         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1377         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1378         (vectorizable_simd_clone_call): Likewise.
1379         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1380         (gimple_stringop_fixed_value): Likewise.
1382 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
1384         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1385         literal pool references.
1386         (s390_check_qrst_address): Adapt to the new behavior of
1387         s390_loadrelative_operand_p ().
1389 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
1391         PR target/72782
1392         * config/i386/sse.md (*andnot<mode>3_bcst): New.
1394 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
1396         PR target/72782
1397         * config/i386/sse.md (*<code><mode>3_bcst): New.
1399 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
1401         PR target/72782
1402         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1403         V4DI, V16SI and V8DI.
1404         (*sub<mode>3<mask_name>_bcst): New.
1405         (*add<mode>3<mask_name>_bcst): Likewise.
1407 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
1408             Jinsong Ji  <jji@us.ibm.com>
1410         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1411         __m64 with __vector unsigned long long for compatibility.
1412         (_mm_movemask_epi8): Likewise.
1413         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1414         (_mm_cvttps_pi32): Likewise.
1415         (_mm_cvtpi32_ps): Likewise.
1416         (_mm_cvtps_pi16): Likewise.
1417         (_mm_loadh_pi): Likewise.
1418         (_mm_storeh_pi): Likewise.
1419         (_mm_movehl_ps): Likewise.
1420         (_mm_movelh_ps): Likewise.
1421         (_mm_loadl_pi): Likewise.
1422         (_mm_storel_pi): Likewise.
1423         (_mm_movemask_ps): Likewise.
1424         (_mm_shuffle_pi16): Likewise.
1426 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1428         PR target/72782
1429         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1430         __builtin_ia32_vfnmsubpd512_mask.
1431         (_mm512_mask_fnmsub_round_pd): Likewise.
1432         (_mm512_fnmsub_pd): Likewise.
1433         (_mm512_mask_fnmsub_pd): Likewise.
1434         (_mm512_maskz_fnmsub_round_pd): Use
1435         __builtin_ia32_vfnmsubpd512_maskz.
1436         (_mm512_maskz_fnmsub_pd): Likewise.
1437         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1438         (_mm512_mask_fnmsub_round_ps): Likewise.
1439         (_mm512_fnmsub_ps): Likewise.
1440         (_mm512_mask_fnmsub_ps): Likewise.
1441         (_mm512_maskz_fnmsub_round_ps): Use
1442         __builtin_ia32_vfnmsubps512_maskz.
1443         (_mm512_maskz_fnmsub_ps): Likewise.
1444         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1445         __builtin_ia32_vfnmsubpd256_mask.
1446         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1447         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1448         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1449         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1450         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1451         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1452         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1453         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1454         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1455         __builtin_ia32_vfnmsubpd.
1456         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1457         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1458         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1459         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1460         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1461         * config/i386/i386-builtin.def: Add
1462         __builtin_ia32_vfnmsubpd256_mask,
1463         __builtin_ia32_vfnmsubpd256_maskz,
1464         __builtin_ia32_vfnmsubpd128_mask,
1465         __builtin_ia32_vfnmsubpd128_maskz,
1466         __builtin_ia32_vfnmsubps256_mask,
1467         __builtin_ia32_vfnmsubps256_maskz,
1468         __builtin_ia32_vfnmsubps128_mask,
1469         __builtin_ia32_vfnmsubps128_maskz,
1470         __builtin_ia32_vfnmsubpd512_mask,
1471         __builtin_ia32_vfnmsubpd512_maskz,
1472         __builtin_ia32_vfnmsubps512_mask,
1473         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1474         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1475         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1476         __builtin_ia32_vfnmsubpd256.
1477         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1478         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1479         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1480         Likewise.
1481         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1482         Likewise.
1483         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1484         Likewise.
1485         (fmai_vmfnmsub_<mode><round_name>): Likewise.
1487 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1489         PR target/72782
1490         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1491         __builtin_ia32_vfnmaddpd512_mask.
1492         (_mm512_mask_fnmadd_round_pd): Likewise.
1493         (_mm512_fnmadd_pd): Likewise.
1494         (_mm512_mask_fnmadd_pd): Likewise.
1495         (_mm512_maskz_fnmadd_round_pd): Use
1496         __builtin_ia32_vfnmaddpd512_maskz.
1497         (_mm512_maskz_fnmadd_pd): Likewise.
1498         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1499         (_mm512_mask_fnmadd_round_ps): Likewise.
1500         (_mm512_fnmadd_ps): Likewise.
1501         (_mm512_mask_fnmadd_ps): Likewise.
1502         (_mm512_maskz_fnmadd_round_ps): Use
1503         __builtin_ia32_vfnmaddps512_maskz.
1504         (_mm512_maskz_fnmadd_ps): Likewise.
1505         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1506         __builtin_ia32_vfnmaddpd256_mask.
1507         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1508         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1509         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1510         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1511         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1512         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1513         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1514         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1515         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1516         __builtin_ia32_vfnmaddpd.
1517         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1518         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1519         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1520         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1521         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1522         * config/i386/i386-builtin.def: Add
1523         __builtin_ia32_vfnmaddpd256_mask,
1524         __builtin_ia32_vfnmaddpd256_maskz,
1525         __builtin_ia32_vfnmaddpd128_mask,
1526         __builtin_ia32_vfnmaddpd128_maskz,
1527         __builtin_ia32_vfnmaddps256_mask,
1528         __builtin_ia32_vfnmaddps256_maskz,
1529         __builtin_ia32_vfnmaddps128_mask,
1530         __builtin_ia32_vfnmaddps128_maskz,
1531         __builtin_ia32_vfnmaddpd512_mask,
1532         __builtin_ia32_vfnmaddpd512_maskz,
1533         __builtin_ia32_vfnmaddps512_mask,
1534         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1535         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1536         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1537         __builtin_ia32_vfnmaddpd256.
1538         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1539         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1540         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1541         Likewise.
1542         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1543         Likewise.
1544         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1545         Likewise.
1546         (fmai_vmfnmadd_<mode><round_name>): Likewise.
1548 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1550         PR target/72782
1551         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1552         __builtin_ia32_vfmsubpd512_mask.
1553         (_mm512_mask_fmsub_round_pd): Likewise.
1554         (_mm512_fmsub_pd): Likewise.
1555         (_mm512_mask_fmsub_pd): Likewise.
1556         (_mm512_maskz_fmsub_round_pd): Use
1557         __builtin_ia32_vfmsubpd512_maskz.
1558         (_mm512_maskz_fmsub_pd): Likewise.
1559         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1560         (_mm512_mask_fmsub_round_ps): Likewise.
1561         (_mm512_fmsub_ps): Likewise.
1562         (_mm512_mask_fmsub_ps): Likewise.
1563         (_mm512_maskz_fmsub_round_ps): Use
1564         __builtin_ia32_vfmsubps512_maskz.
1565         (_mm512_maskz_fmsub_ps): Likewise.
1566         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1567         __builtin_ia32_vfmsubpd256_mask.
1568         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1569         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1570         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1571         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1572         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1573         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1574         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1575         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1576         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1577         __builtin_ia32_vfmsubpd.
1578         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1579         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1580         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1581         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1582         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1583         * config/i386/i386-builtin.def: Add
1584         __builtin_ia32_vfmsubpd256_mask,
1585         __builtin_ia32_vfmsubpd256_maskz,
1586         __builtin_ia32_vfmsubpd128_mask,
1587         __builtin_ia32_vfmsubpd128_maskz,
1588         __builtin_ia32_vfmsubps256_mask,
1589         __builtin_ia32_vfmsubps256_maskz,
1590         __builtin_ia32_vfmsubps128_mask,
1591         __builtin_ia32_vfmsubps128_maskz,
1592         __builtin_ia32_vfmsubpd512_mask,
1593         __builtin_ia32_vfmsubpd512_maskz,
1594         __builtin_ia32_vfmsubps512_mask,
1595         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1596         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1597         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1598         __builtin_ia32_vfmsubpd256.
1599         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1600         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1601         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1602         Likewise.
1603         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1604         Likewise.
1605         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1606         Likewise.
1607         (fmai_vmfmsub_<mode><round_name>): Likewise.
1609 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1611         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1612         Remove plus.  Renamed to ...
1613         (*sub<mode>3<mask_name>_bcst): This.
1614         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1615         (*add<mode>3<mask_name>_bcst): This.
1617 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1619         PR target/72782
1620         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1622 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
1624         PR target/87662
1625         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1626         (_mm_or_epi32): Likewise.
1627         (_mm256_xor_epi32): Likewise.
1628         (_mm_xor_epi32): Likewise.
1629         (_mm256_or_epi64): Likewise.
1630         (_mm_or_epi64): Likewise.
1631         (_mm256_xor_epi64): Likewise.
1632         (_mm_xor_epi64): Likewise.
1634 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
1636         PR target/72782
1637         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1639 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
1641         PR middle-end/87647
1642         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1644 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
1646         * doc/ux.texi: Move @section directly after @node.
1648 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
1650         PR middle-end/85488
1651         PR middle-end/87649
1652         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1653         depend closely nested inside of loop with ordered clause with
1654         a parameter.
1656 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
1658         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1659         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1660         * doc/ux.texi: New file.
1662 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
1664         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1665         be the first CR field allocated.
1667 2018-10-19  Richard Biener  <rguenther@suse.de>
1669         PR target/87657
1670         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1671         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1673 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1675         PR target/72782
1676         * config/i386/sse.md
1677         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1678         (*add<mode>3<mask_name>_bcst_2): Likewise.
1680 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
1682         * config/i386/sse.md
1683         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1684         Replace nonimmediate_operand with register_operand.
1685         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1686         Likewise.
1687         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1688         Likewise.
1690 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1692         PR rtl-optimization/87596
1693         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1694         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1695         for instructions in FROM..TO range.
1697 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1699         * cfgexpand.c (expand_one_var): Use specific wording in error message
1700         for non-local frame variables.
1701         * stor-layout.c (layout_decl): Do not issue a warning for them.
1703 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
1705         * haifa-sched.c (priority): Add force_recompute parameter.
1706         (apply_replacement): Call priority () with force_recompute = true.
1707         (restore_pattern): Likewise.
1709 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1711         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1712         HOST_BITS_PER_WIDE_INT.
1713         (test_vector_ops_duplicate): Likewise.
1715 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1717         PR target/72782
1718         * config/i386/sse.md (VF_AVX512): New.
1719         (avx512bcst): Likewise.
1720         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1721         Likewise.
1722         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1723         Likewise.
1724         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1725         Likewise.
1727 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
1729         * doc/invoke.texi (-dumpversion): Improve grammar.
1730         (-dumpfullversion): Make more consistent with -dumpversion.
1732 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
1734         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1735         Set JUMP_LABEL to the jump insn.
1736         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1737         Predict emitted jump and add label to jump insn.
1739 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
1741         PR tree-optimization/87562
1742         * input.c (get_substring_ranges_for_loc): Use
1743         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1744         getting the linemap for the endpoint.  Verify that it's either
1745         in the same linemap as the start point's spelling location, or
1746         at least in the same file.
1748 2018-10-18  Richard Biener  <rguenther@suse.de>
1750         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1751         feed width-specific load/store costs through ix86_vec_cost.
1752         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1753         (k8_cost): Likewise.
1754         (bdver_cost): Likewise.
1755         (znver1_cost): Likewise.
1756         (btver1_cost): Likewise.
1757         (btver2_cost): Likewise.
1759 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1761         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1762         to simplify subreg of vec_merge.
1764 2018-10-18  Richard Biener  <rguenther@suse.de>
1766         * config/i386/i386.c: Fix costing of vector FMA.
1768 2018-10-18  Richard Biener  <rguenther@suse.de>
1770         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1771         and argument.
1772         (ix86_builtin_vectorization_cost): For vec_construct properly
1773         cost insertion into SSE regs.
1774         (...): Adjust calls to ix86_vec_cost.
1776 2018-10-18  Richard Biener  <rguenther@suse.de>
1778         PR middle-end/87087
1779         Revert
1780         2018-02-07  Richard Biener  <rguenther@suse.de>
1782         PR tree-optimization/84204
1783         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1784         this place.
1786 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
1788         PR target/87537
1789         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1790         of vec_duplicate.
1791         (test_vector_ops_duplicate): Add test for a scalar subreg of a
1792         VEC_MERGE of a VEC_DUPLICATE.
1794 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
1796         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1797         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1798         * doc/standards.texi (C Language): Document C2X.
1799         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1800         (rl78_option_override): Handle "GNU C2X" language name.
1802 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
1804         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1805         Document C17 as published in 2018.
1807 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
1809         PR middle-end/87623
1810         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1811         bail out if both sides do not have the same storage order.
1813 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1815         * bitmap.c (bitmap_head::dump): New.
1816         * bitmap.h (bitmap_head): Add dump().
1817         * gimple-ssa-evrp-analyze.c
1818         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1819         (evrp_range_analyzer::set_ssa_range_info): Same.
1820         (evrp_range_analyzer::record_ranges_from_phis): Same.
1821         (evrp_range_analyzer::record_ranges_from_stmt): Same.
1822         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1823         * gimple-ssa-sprintf.c (get_int_range): Same.
1824         (format_integer): Same.
1825         (sprintf_dom_walker::handle_gimple_call): Same.
1826         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1827         (ipcp_vr_lattice::top_p): Same.
1828         (ipcp_vr_lattice::bottom_p): Same.
1829         (ipcp_vr_lattice::set_to_bottom): Same.
1830         (ipa_vr_operation_and_type_effects): Same.
1831         (propagate_vr_across_jump_function): Same.
1832         (ipcp_store_vr_results): Same.
1833         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1834         (ipa_print_node_jump_functions_for_edge): Same.
1835         (ipa_get_value_range): Same.
1836         (ipa_compute_jump_functions_for_edge): Same.
1837         (ipa_write_jump_function): Same.
1838         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1839         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1840         Same.
1841         * vr-values.c (set_value_range_to_nonnegative): Same.
1842         (set_value_range_to_truthvalue): Same.
1843         (vr_values::get_value_range): Same.
1844         (vr_values::set_defs_to_varying): Same.
1845         (vr_values::update_value_range): Same.
1846         (symbolic_range_based_on_p): Same.
1847         (vr_values::op_with_boolean_value_range_p): Same.
1848         (vr_values::extract_range_for_var_from_comparison_expr): Same.
1849         (vr_values::extract_range_from_ssa_name): Same.
1850         (vr_values::extract_range_from_binary_expr): Same.
1851         (vr_values::extract_range_from_unary_expr): Same.
1852         (vr_values::extract_range_from_cond_expr): Same.
1853         (vr_values::extract_range_from_comparison): Same.
1854         (vr_values::check_for_binary_op_overflow): Same.
1855         (vr_values::extract_range_basic): Same.
1856         (vr_values::extract_range_from_assignment): Same.
1857         (compare_ranges): Same.
1858         (compare_range_with_value): Same.
1859         (vr_values::adjust_range_with_scev): Same.
1860         (vrp_valueize): Same.
1861         (vrp_valueize_1): Same.
1862         (vr_values::get_vr_for_comparison): Same.
1863         (vr_values::compare_name_with_value): Same.
1864         (vr_values::compare_names): Same.
1865         (vr_values::vrp_evaluate_conditional): Same.
1866         (find_case_label_ranges): Same.
1867         (vr_values::vrp_visit_switch_stmt): Same.
1868         (vr_values::extract_range_from_phi_node): Same.
1869         (vr_values::simplify_div_or_mod_using_ranges): Same.
1870         (vr_values::simplify_bit_ops_using_ranges): Same.
1871         (test_for_singularity): Same.
1872         (range_fits_type_p): Same.
1873         (vr_values::simplify_cond_using_ranges_1): Same.
1874         (vr_values::simplify_switch_using_ranges): Same.
1875         (vr_values::simplify_float_conversion_using_ranges): Same.
1876         (vr_values::two_valued_val_range_p): Same.
1877         (vr_values::add_equivalence): Move to value_range::equiv_add.
1878         * vr-values.h (vr_values::add_equivalence): Remove.
1879         (VR_INITIALIZER): Remove.
1880         * tree-vrp.c (value_range::set): New.
1881         (value_range::equiv_add): New.
1882         (value_range::value_range): New.
1883         (value_range::deep_copy): New.
1884         (value_range::check): New.
1885         (value_range::equal_p): New.
1886         (value_range::ignore_equivs_equal_p): New.
1887         (value_range::operator==): New.
1888         (value_range::operator!=): New.
1889         (value_range::symbolic_p): New.
1890         (value_range::numeric_p): New.
1891         (value_range::set_undefined): New.
1892         (value_range::set_varying): New.
1893         (value_range::may_contain_p): New.
1894         (value_range::equiv_clear): New.
1895         (value_range::singleton_p): New.
1896         (value_range::intersect): New.
1897         (value_range::dump): New.
1898         (value_range::set_and_canonicalize): New.
1899         (set_value_range): Adjust for value_range API.
1900         (set_value_range_to_undefined): Same.
1901         (set_value_range_to_varying): Same.
1902         (set_and_canonicalize_value_range): Same.
1903         (set_value_range_to_nonnull): Same.
1904         (set_value_range_to_null): Same.
1905         (range_is_null): Same.
1906         (range_is_nonnull): Same.
1907         (range_int_cst_p): Same.
1908         (range_int_cst_singleton_p): Same.
1909         (symbolic_range_p): Same.
1910         (range_includes_zero_p): Same.
1911         (value_range_constant_singleton): Same.
1912         (vrp_set_zero_nonzero_bits): Same.
1913         (ranges_from_anti_range): Same.
1914         (extract_range_into_wide_ints): Same.
1915         (extract_range_from_multiplicative_op): Same.
1916         (set_value_range_with_overflow): Same.
1917         (extract_range_from_binary_expr_1): Same.
1918         (extract_range_from_unary_expr): Same.
1919         (dump_value_range): Same.
1920         (debug_value_range): Same.
1921         (vrp_prop::check_array_ref): Same.
1922         (vrp_prop::check_mem_ref): Same.
1923         (vrp_prop::vrp_initialize): Same.
1924         (vrp_prop::visit_stmt): Same.
1925         (intersect_ranges): Same.
1926         (vrp_prop::visit_phi): Same.
1927         (vrp_prop::vrp_finalize): Same.
1928         (determine_value_range_1): Same.
1929         (determine_value_range): Same.
1930         (vrp_intersect_ranges_1): Rename to...
1931         (vrp_intersect_1): this.
1932         (vrp_intersect_ranges): Rename to...
1933         (value_range::intersect_helper): ...this.
1934         (vrp_meet_1): Rename to...
1935         (value_range::union_helper): ...this.
1936         (vrp_meet): Rename to...
1937         (value_range::union_): ...this.
1938         (copy_value_range): Remove.
1939         * tree-vrp.h (struct value_range): Rewrite into a proper class.
1940         (value_range::vrtype): New.
1941         (value_range::type): New.
1942         (value_range::equiv): New.
1943         (value_range::min): New.
1944         (value_range::max): New.
1945         (value_range::varying_p): New.
1946         (value_range::undefined_p): New.
1947         (value_range::null_p): New.
1948         (value_range::equiv_add): New.
1949         (copy_value_range): Remove.
1951 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
1953         * Makefile.in (SELFTEST_TARGETS): New.
1954         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
1955         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1956         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
1957         c/Make-lang.in.
1958         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
1959         (selftest-c++-gdb, selftest-c++-valgrind): Move to
1960         cp/Make-lang.in.
1961         * configure: Regenerate.
1962         * configure.ac (selftest_languages): New.
1964 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1966         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
1967         overflow wraps argument.
1968         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
1969         wide_int_range_multiplicative_op.
1970         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
1971         overflow wraps argument.
1972         (wide_int_range_multiplicative_op): Same.
1973         (wide_int_range_lshift): Same.
1974         (wide_int_range_div): Same.
1975         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
1976         (wide_int_range_lshift): Same.
1977         (wide_int_range_div): Same.
1979 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
1981         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
1982         use sign as argument.
1983         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
1984         wide_int_range_shift_undefined_p.
1986 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1988         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
1989         Rename to...
1990         (@despeculate_copy<ALLI_TI:mode>): ... This.
1991         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
1992         switch statement.
1994 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1996         * config.gcc: Obsolete *-*-solaris2.10*.
1997         * doc/install.texi (Specific, *-*-solaris2*): Document it.
1999 2018-10-12  Jeff Law  <law@redhat.com>
2001         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
2002         reg + sym +- const_int addressing modes.
2004 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
2006         * common.opt (fdiagnostics-minimum-margin-width=): New option.
2007         * diagnostic-show-locus.c (layout::layout): Apply the minimum
2008         margin width.
2009         (layout::start_annotation_line): Only print up to 3 of the
2010         margin character, to avoid touching the left-hand side.
2011         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
2012         minimum margin width, as set by test_diagnostic_context's ctor.
2013         (selftest::test_fixit_insert_containing_newline): Likewise.
2014         (selftest::test_fixit_insert_containing_newline_2): Likewise.
2015         (selftest::test_line_numbers_multiline_range): Clear
2016         dc.min_margin_width.
2017         * diagnostic.c (diagnostic_initialize): Initialize
2018         min_margin_width.
2019         * diagnostic.h (struct diagnostic_context): Add field
2020         "min_margin_width".
2021         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
2022         * opts.c (common_handle_option): Handle
2023         OPT_fdiagnostics_minimum_margin_width_.
2024         * selftest-diagnostic.c
2025         (selftest::test_diagnostic_context::test_diagnostic_context):
2026         Initialize min_margin_width to 6.
2027         * toplev.c (general_init): Initialize global_dc->min_margin_width.
2029 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
2031         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
2032         Fix usage of "error_at_rich_loc" in the comment.
2034 2018-10-15  Renlin Li  <renlin.li@arm.com>
2036         PR target/87563
2037         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
2038         if-conversioned loop when it contains ifn with types not
2039         supported by backend.
2040         * internal-fn.c (expand_direct_optab_fn): Add an assert.
2041         (direct_internal_fn_supported_p): New helper function.
2042         * internal-fn.h (direct_internal_fn_supported_p): Declare.
2044 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
2046         PR target/87572
2047         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2048         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2049         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2051 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
2053         PR tree-optimization/87022
2054         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
2055         bits in dist vector rather than the first one.
2057 2018-10-15  Richard Biener  <rguenther@suse.de>
2059         PR middle-end/87610
2060         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2061         (visit_loadstore): When a used restrict tag escaped verify that
2062         the points-to solution of "other" pointers do not include
2063         escaped.
2064         (compute_dependence_clique): If a used restrict tag escaped
2065         communicated that down to visit_loadstore.
2067 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
2069         * config/s390/s390.c (s390_expand_vec_init): Force vector element
2070         into reg if it isn't a general operand.
2072 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
2074         PR target/87599
2075         * config/i386/sse.md (*vec_dupv2di): Add register source to
2076         movddup.
2078 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
2080         PR target/87572
2081         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2082         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
2083         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2084         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2086 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
2088         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
2089         (notice_args_size): Set it in the current trace if no insn that can
2090         throw internally has been seen yet.
2091         (connect_traces): When connecting args_size between traces, allow the
2092         incoming values not to match if there is an insn setting it before the
2093         first insn that can throw internally; in that case, force the creation
2094         of a CFI note on this latter insn.
2096 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
2098         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
2099         the base class, because using the injected-class-name was not clearly
2100         specified until DR 176.
2102 2018-10-12  Paul Koning  <ni1d@arrl.net>
2104         * config/pdp11/pdp11.md (doloop_end): New expander.
2105         (doloop_end_insn): renamed from "doloop_end".
2106         (addqi3): New pattern.
2107         (subqi3): New pattern.
2108         * config/pdp11/predicates.md (incdec_operand): New predicate.
2110 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
2112         PR middle-end/81376
2113         * real.c (format_helper::can_represent_integral_type_p): New function
2114         * real.h (format_helper::can_represent_integral_type_p): Ditto.
2115         * match.pd: New pattern.
2117 2018-10-12  Alexandre Oliva <oliva@adacore.com>
2119         * configure.ac: Introduce --enable-large-address-aware
2120         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
2121         * doc/install.texi: Document it.
2122         * configure, config.in: Rebuilt.
2123         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
2124         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
2125         (LINK_SPEC): Insert it.
2126         * config/i386/mingw-w64.h: Likewise.
2128         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
2130 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
2132         PR rtl-optimization/87600
2133         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
2135 2018-10-12  Paul Koning  <ni1d@arrl.net>
2137         * doc/md.texi (doloop_end): Document that the pattern code may
2138         need to check operand mode.
2140 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
2142         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
2143         to zero-extend between int and floating-point registers.
2144         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
2145         ldp into floating-point registers.  Add type and arch attributes.
2146         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
2147         Use f_loads for type attribute.
2149 2018-10-11  Martin Sebor  <msebor@redhat.com>
2151         * doc/extend.texi (attribute packed): Correct typos.
2153 2018-10-11  Martin Sebor  <msebor@redhat.com>
2155         * doc/extend.texi (attribute flatten): Mention interaction with
2156         noinline.
2158 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
2160         PR target/87156
2161         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
2162         Set new_decl virtual flag to zero.
2164 2018-10-11  Martin Sebor  <msebor@redhat.com>
2166         PR middle-end/87593
2167         * doc/extend.texi (attribute format_arg): Discuss using multiple
2168         attributes on a single function.
2170 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
2172         PR tree-optimization/86829
2173         * match.pd (sin (atan (x))): New simplification rules.
2174         (cos (atan (x))): Likewise.
2175         * real.c (build_sinatan_real): New function.
2176         * real.h (build_sinatan_real): Prototype.
2178 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
2180         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
2181         function.
2182         (fold_mergeeo_helper): New helper function.
2183         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
2184         intrinsics.  Correct some whitespace indentation issues.
2186 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
2188         PR target/87511
2189         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2190         Use HOST_WIDE_INT_1U for shift.
2192 2018-10-11  Doug Rupp  <rupp@adacore.com>
2193             Olivier Hainque  <hainque@adacore.com>
2195         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
2196         Pass --relax to the linker for RTPs.
2197         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
2199 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
2200             Jan Hubicka  <jh@suse.cz>
2201             Martin Jambor  <mjambor@suse.cz>
2203         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
2204         the same elements are repeated rather than printing all of them.
2205         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
2206         "repeated" elements.
2207         * read-rtl-function.c (test_loading_repeat): New function.
2208         (read_rtl_function_c_tests): Call test_loading_repeat.
2209         * rtl-tests.c (test_dumping_repeat): New function.
2210         (rtl_tests_c_tests): Call test_dumping_repeat.
2212 2018-10-11  Richard Biener  <rguenther@suse.de>
2214         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2215         bdver?_cost): Unify to ...
2216         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2217         * config/i386/i386.c (processor_cost_table): Adjust.
2219 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
2221         PR middle-end/87574
2222         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2223         the thunk when expanding to GIMPLE.
2225 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2227         * varasm.c (mergeable_string_section): Don't try to move zero-length
2228         strings to the merge section.
2230 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
2232         PR target/87573
2233         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2235 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
2237         PR target/87550
2238         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2239         to special_args set.
2241 2018-10-10  Richard Biener  <rguenther@suse.de>
2243         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2244         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2245         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2246         and recursing and pattern terminating the recursion on SSE
2247         vector width using ix86_expand_reduc.
2248         (reduc_sminmax_scal_<mode>): Split into part reducing to half
2249         width and recursing and SSE2 vector variant doing the final
2250         reduction with ix86_expand_reduc.
2251         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2252         with terminating the recursion at AVX level, splitting that
2253         to SSE there.
2255 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
2257         * genmatch.c (error_cb): Rename to...
2258         (diagnostic_cb): ...this, converting int params to enums.
2259         (fatal_at): Update for renaming.
2260         (warning_at): Likewise.
2261         (main): Likewise.
2262         * input.c (selftest::ebcdic_execution_charset::apply):
2263         Update for renaming of...
2264         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2265         to...
2266         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2267         converting level and reason to enums.
2268         (class selftest::lexer_error_sink): Rename to...
2269         (class selftest::lexer_test_options): ...this, renaming field
2270         "m_errors" to "m_diagnostics".
2271         (selftest::lexer_test_options::apply): Update for renaming of...
2272         (selftest::lexer_test_options::on_error): ...this, renaming to...
2273         (selftest::lexer_test_options::on_diagnostic): ...this
2274         converting level and reason to enums.
2275         (selftest::test_lexer_string_locations_raw_string_unterminated):
2276         Update for renamings.
2277         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2278         "reason".
2280 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
2282         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2283         * config/rs6000/pmmintrin.h: New file.
2285 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
2287         PR tree-optimization/86659
2288         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2290 2018-10-09  Richard Biener  <rguenther@suse.de>
2292         PR tree-optimization/63155
2293         * tree-ssa-structalias.c: Include tree-ssa.h.
2294         (get_constraint_for_ssa_var): For undefs return nothing_id.
2295         (find_func_aliases): Cleanup PHI handling.
2297 2018-10-09  Richard Biener  <rguenther@suse.de>
2299         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2300         replacements.
2302 2018-10-09  Martin Liska  <mliska@suse.cz>
2304         * asan.c (asan_emit_stack_protection): If a stack variable
2305         is located in a same file as current function, then emit
2306         line info into variable definition string.
2308 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
2310         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2311         information.
2313 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
2315         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2316         on the thunk.
2318 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
2320         PR tree-optimization/86659
2321         * gimple-match.h (struct gimple_match_op): Add reverse field.
2322         (gimple_match_op::set_op): New overloaded method.
2323         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2324         the REF_REVERSE_STORAGE_ORDER flag on the value.
2325         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2326         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2327         
2328 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
2330         PR middle-end/63155
2331         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2332         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2334 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
2336         PR target/87517
2337         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2338         Defined with __builtin_ia32_vfmaddsubpd512_mask.
2340 2018-10-08  Richard Biener  <rguenther@suse.de>
2342         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2343         cost the same as AVX128 ones.
2345 2018-10-08  Paul Koning  <ni1d@arrl.net>
2347         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2348         (expand_block_move): New function.
2349         * config/pdp11/pdp11.c (output_block_move): Remove.
2350         (expand_block_move): New function.
2351         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2352         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2353         (*movmemhi1): Remove.
2355 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
2357         * config/s390/2827.md: Increase latencies for some FP instructions.
2359 2018-10-08  Richard Biener  <rguenther@suse.de>
2361         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2362         Open a dump scope.
2363         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2364         * tree-vectorizer.h (dump_stmt_cost): Adjust.
2365         (add_stmt_cost): Dump return value of the hook.
2367 2018-10-08  Richard Biener  <rguenther@suse.de>
2369         PR tree-optimization/63155
2370         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2371         (ssa_propagation_engine::ssa_propagate): Remove redundant
2372         bitmap bit clearing.
2374 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
2376         PR rtl-optimization/86939
2377         PR rtl-optimization/87479
2378         * ira.h (non_conflicting_reg_copy_p): New prototype.
2379         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2380         (make_hard_regno_dead): Don't add conflicts for register
2381         ignore_reg_for_conflicts.
2382         (make_object_dead): Likewise.
2383         (non_conflicting_reg_copy_p): New function.
2384         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2385         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2386         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2387         (make_hard_regno_dead): Don't add conflicts for register
2388         ignore_reg_for_conflicts.  Remove special conflict handling of
2389         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
2390         check_pic_pseudo_p and update callers.
2391         (mark_pseudo_dead): Don't add conflicts for register
2392         ignore_reg_for_conflicts.
2393         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2395 2018-10-05  Andrew Waterman  <andrew@sifive.com>
2396             Jim Wilson  <jimw@sifive.com>
2398         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2399         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
2400         new pattern using HONOR_SNANS that emits one extra instruction.
2402 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
2404         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2405         patterns): Merge SI and DI patterns to a GPR pattern.
2406         (unnamed define_insn and define_split for record form of that): Merge
2407         to a single define_insn_and_split pattern.
2409 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
2411         PR c++/56856
2412         * input.c (expand_location_to_spelling_point): Add param "aspect"
2413         and use rather than hardcoding LOCATION_ASPECT_CARET.
2414         (get_substring_ranges_for_loc): Handle the case of a single token
2415         within a macro expansion.
2416         * input.h (expand_location_to_spelling_point): Add "aspect" param,
2417         defaulting to LOCATION_ASPECT_CARET.
2419 2018-10-05  Paul Koning  <ni1d@arrl.net>
2421         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2422         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2423         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2424         (pdp11_guard_type): New function.
2426 2018-10-05  Paul Koning  <ni1d@arrl.net>
2428         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2429         * config/pdp11/pdp11.opt (mfloat32): Remove.
2430         (mfloat64): Remove.
2431         * doc/invoke.texi (pdp11 -mfloat32): Remove:
2432         (pdp11 -mfloat64): Remove.
2434 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
2436         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2437         (*cmp<mode>_cc_i387): Ditto.
2438         (*cmpu<mode>_cc_i387): Ditto.
2439         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2440         * config/i386/i386.c (ix86_expand_fp_compare): Remove
2441         "scratch" argument.
2442         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2443         Emit x86_sahf_1 pattern.
2444         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2445         (ix86_expand_carry_flag_compare): Ditto.
2447 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
2449         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2450         to reg_or_0_operand.  Add "C" constraint.
2451         (*cmpxf_cc_i387): Ditto.
2452         (*cmp<mode>_i387): Change operand 2 predicate
2453         to nonimm_or_0_operand.  Add "C" constraint.
2454         (*cmp<mode>_cc_i387): Ditto.
2455         (*cmp<mode>_0_i387): Remove insn pattern.
2456         (*cmp<mode>_0_cc_i387): Ditto.
2458 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
2460         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2461         * config/i386/predicates.md (nonimm_or_0_operand): Rename
2462         from vector_move_operand.  Update all uses.
2464 2018-10-05  Martin Sebor  <msebor@redhat.com>
2466         PR tree-optimization/87490
2467         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2468         consistently.
2470 2018-10-05  Richard Biener  <rguenther@suse.de>
2472         PR tree-optimization/63155
2473         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2474         vertical space in dumpfiles.
2475         * tree-ssa-propagate.h
2476         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2477         * tree-ssa-propagate.c (cfg_blocks_back): New global.
2478         (ssa_edge_worklist_back): Likewise.
2479         (curr_order): Likewise.
2480         (cfg_blocks_get): Remove abstraction.
2481         (cfg_blocks_add): Likewise.
2482         (cfg_blocks_empty_p): Likewise.
2483         (add_ssa_edge): Add to current or next worklist based on
2484         RPO index.
2485         (add_control_edge): Likewise.
2486         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2487         into ...
2488         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
2489         iteration from CFG and SSA edge worklist so we process
2490         everything in RPO order, prioritizing forward progress
2491         over iteration.
2492         (ssa_prop_init): Allocate new worklists, do not dump
2493         immediate uses.
2494         (ssa_prop_fini): Free new worklists.
2496 2018-10-05  Richard Biener  <rguenther@suse.de>
2498         * tree-core.h (tree_block::abstract_flag): Remove.
2499         (tree_block::block_num): Make full 32bits.
2500         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2501         * tree.h (BLOCK_ABSTRACT): Remove.
2502         * dwarf2out.c (gen_lexical_block_die): Remove dead code
2503         resulting from BLOCK_ABSTRACT being always false.
2504         (gen_inlined_subroutine_die): Likewise.
2505         (gen_block_die): Likewise.
2506         * tree.c (block_ultimate_origin): Likewise.
2507         * tree-pretty-print.c (dump_block_node): Remove code dealing
2508         with BLOCK_ABSTRACT.
2509         * tree-ssa-live.c (dump_scope_block): Likewise.
2510         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2511         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2513 2018-10-05   Richard Biener  <rguenther@suse.de>
2515         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2516         is asked for initialize mode to the component mode of the
2517         vector type.
2519 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
2521         PR target/87522
2522         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2523         assembler for -mavx.
2524         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2526 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
2528         PR target/87509
2529         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2530         RS6000_BTM_DFP.
2531         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2532         to be DImode.  When using mffscrn, force the operand to a register.
2534 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
2536         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2537         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2538         X87MODEF mode iterator.
2539         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2540         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2541         X87MODEF mode iterator.
2543 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
2545         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2546         -Wno-prio-ctor-dtor.
2548 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2550         * Makefile.in (OBJS): Add opt-problem.o.
2551         * dump-context.h: Include "selftest.h.
2552         (selftest::temp_dump_context): New forward decl.
2553         (class dump_context): Make friend of class
2554         selftest::temp_dump_context.
2555         (dump_context::dump_loc_immediate): New decl.
2556         (class dump_pretty_printer): Move here from dumpfile.c.
2557         (class temp_dump_context): Move to namespace selftest.
2558         (temp_dump_context::temp_dump_context): Add param
2559         "forcibly_enable_dumping".
2560         (selftest::verify_dumped_text):
2561         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2562         (selftest::verify_item):
2563         (ASSERT_IS_TEXT): Move here from dumpfile.c.
2564         (ASSERT_IS_TREE): Likewise.
2565         (ASSERT_IS_GIMPLE): Likewise.
2566         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2567         to...
2568         (dump_context::dump_loc_immediate): ...this new function.
2569         (class dump_pretty_printer): Move to dump-context.h.
2570         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2571         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2572         (temp_dump_context::temp_dump_context): Move to "selftest"
2573         namespace.  Add param "forcibly_enable_dumping", and use it to
2574         conditionalize the use of m_pp;
2575         (selftest::verify_dumped_text): Make non-static.
2576         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2577         (selftest::verify_item): Make non-static.
2578         (ASSERT_IS_TEXT): Move to dump-context.h.
2579         (ASSERT_IS_TREE): Likewise.
2580         (ASSERT_IS_GIMPLE): Likewise.
2581         (selftest::test_capture_of_dump_calls): Pass "true" for new
2582         param of temp_dump_context.
2583         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2584         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
2585         TDF_COMPARE_DEBUG.
2586         * opt-problem.cc: New file.
2587         * opt-problem.h: New file.
2588         * optinfo-emit-json.cc
2589         (selftest::test_building_json_from_dump_calls): Pass "true" for
2590         new param of temp_dump_context.
2591         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2592         (optinfo::emit_for_opt_problem): New function.
2593         (optinfo::emit): Clarity which emit_item is used.
2594         * optinfo.h (optinfo::get_dump_location): New accessor.
2595         (optinfo::emit_for_opt_problem): New decl.
2596         (optinfo::emit): Make const.
2597         * selftest-run-tests.c (selftest::run_tests): Call
2598         selftest::opt_problem_cc_tests.
2599         * selftest.h (selftest::opt_problem_cc_tests): New decl.
2600         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2601         bool to opt_result, converting fprintf messages to
2602         opt_result::failure_at calls.  Add "stmt" param for use by the
2603         failure_at calls.
2604         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2605         (runtime_alias_check_p): Convert return type from bool to
2606         opt_result, converting dump_printf calls to
2607         opt_result::failure_at, using the statement DDR_A for their
2608         location.
2609         (find_data_references_in_stmt): Convert return type from bool to
2610         opt_result, converting "return false" to opt_result::failure_at
2611         with a new message.
2612         * tree-data-ref.h: Include "opt-problem.h".
2613         (dr_analyze_innermost): Convert return type from bool to opt_result,
2614         and add a const gimple * param.
2615         (find_data_references_in_stmt): Convert return type from bool to
2616         opt_result.
2617         (runtime_alias_check_p): Likewise.
2618         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2619         dr_analyze_innermost.
2620         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2621         Convert return type from bool to opt_result, adding a message for
2622         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2623         (vect_analyze_data_ref_dependence): Convert return type from bool
2624         to opt_result.  Change sense of return type from "false"
2625         effectively meaning "no problems" to "false" meaning a problem,
2626         so that "return false" becomes "return opt_result::success".
2627         Convert "return true" calls to opt_result::failure_at, using
2628         the location of statement A rather than vect_location.
2629         (vect_analyze_data_ref_dependences): Convert return type from bool
2630         to opt_result.
2631         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2632         calls to opt_result::failure_at, using the stmt location rather
2633         than vect_location.
2634         (vect_verify_datarefs_alignment): Convert return type from bool
2635         to opt_result.
2636         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
2637         into multiple more-tightly-scoped copies.
2638         (vect_analyze_data_refs_alignment): Convert return type from bool
2639         to opt_result.
2640         (vect_analyze_data_ref_accesses): Likewise, converting a
2641         "return false" to a "return opt_result::failure_at", adding a
2642         new message.
2643         (vect_prune_runtime_alias_test_list): Convert return type from
2644         bool to opt_result, converting dump_printf_loc to
2645         opt_result::failure_at.  Add a %G to show the pertinent statement,
2646         and use the stmt's location rather than vect_location.
2647         (vect_find_stmt_data_reference): Convert return type from
2648         bool to opt_result, converting dump_printf_loc to
2649         opt_result::failure_at, using stmt's location.
2650         (vect_analyze_data_refs):  Convert return type from bool to
2651         opt_result.  Convert "return false" to "return
2652         opt_result::failure_at", adding messages as needed.
2653         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2654         type from bool to opt_result.
2655         (vect_determine_vf_for_stmt): Likewise.
2656         (vect_determine_vectorization_factor): Likewise, converting
2657         dump_printf_loc to opt_result::failure_at, using location of phi
2658         rather than vect_location.
2659         (vect_analyze_loop_form_1): Convert return type from bool to
2660         opt_result, converting dump_printf_loc calls, retaining the use of
2661         vect_location.
2662         (vect_analyze_loop_form): Convert return type from loop_vec_info
2663         to opt_loop_vec_info.
2664         (vect_analyze_loop_operations): Convert return type from bool to
2665         opt_result, converting dump_printf_loc calls, using the location
2666         of phi/stmt rather than vect_location where available.  Convert
2667         various "return false" to "return opt_result::failure_at" with
2668         "unsupported phi" messages.
2669         (vect_get_datarefs_in_loop): Convert return type from bool to
2670         opt_result.  Add a message for the
2671         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2672         (vect_analyze_loop_2): Convert return type from bool to
2673         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
2674         each "goto again;", adding new messages where needed.
2675         Add "unsupported grouped {store|load}" messages.
2676         (vect_analyze_loop): Convert return type from loop_vec_info to
2677         opt_loop_vec_info.
2678         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2679         bool to opt_result.
2680         * tree-vect-stmts.c (process_use): Likewise, converting
2681         dump_printf_loc call and using stmt location, rather than
2682         vect_location.
2683         (vect_mark_stmts_to_be_vectorized): Likeise.
2684         (vect_analyze_stmt): Likewise, adding a %G.
2685         (vect_get_vector_types_for_stmt): Convert return type from bool to
2686         opt_result, converting dump_printf_loc calls and using stmt
2687         location, rather than vect_location.
2688         (vect_get_mask_type_for_stmt): Convert return type from tree to
2689         opt_tree, converting dump_printf_loc calls and using stmt location.
2690         * tree-vectorizer.c: Include "opt-problem.h.
2691         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2692         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
2693         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
2694         enabled, use it to report at the top level "couldn't vectorize
2695         loop" followed by the problem.
2696         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2697         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2698         to opt_result.
2699         (vect_analyze_stmt): Likewise.
2700         (vect_get_vector_types_for_stmt): Likewise.
2701         (tree vect_get_mask_type_for_stmt): Likewise.
2702         (vect_analyze_data_ref_dependences): Likewise.
2703         (vect_enhance_data_refs_alignment): Likewise.
2704         (vect_analyze_data_refs_alignment): Likewise.
2705         (vect_verify_datarefs_alignment): Likewise.
2706         (vect_analyze_data_ref_accesses): Likewise.
2707         (vect_prune_runtime_alias_test_list): Likewise.
2708         (vect_find_stmt_data_reference): Likewise.
2709         (vect_analyze_data_refs): Likewise.
2710         (vect_analyze_loop): Convert return type from loop_vec_info to
2711         opt_loop_vec_info.
2712         (vect_analyze_loop_form): Likewise.
2713         (vect_analyze_slp): Convert return type from bool to opt_result.
2715 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2717         * doc/invoke.texi (-fopt-info): Document new "internals"
2718         sub-option.
2719         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2720         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2721         MSG_ALL_KINDS.
2722         (optinfo_verbosity_options): Add "internals".
2723         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2724         (dump_context::apply_dump_filter_p): New member function.
2725         (dump_context::dump_loc): Use apply_dump_filter_p rather than
2726         explicitly masking the dump_kind.
2727         (dump_context::begin_scope): Increment the scope depth first.  Use
2728         apply_dump_filter_p rather than explicitly masking the dump_kind.
2729         (dump_context::emit_item): Use apply_dump_filter_p rather than
2730         explicitly masking the dump_kind.
2731         (dump_dec): Likewise.
2732         (dump_hex): Likewise.
2733         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2734         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2735         (opt_info_switch_p): Update handling of default
2736         MSG_OPTIMIZED_LOCATIONS to cope with default of
2737         MSG_PRIORITY_USER_FACING.
2738         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2739         masking the dump_kind.
2740         (selftest::test_capture_of_dump_calls): Update test_dump_context
2741         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2742         than MSG_ALL.  Generalize scope test to be run at all four
2743         combinations of with/without MSG_PRIORITY_USER_FACING and
2744         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2745         for each of the two values.
2746         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2747         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
2748         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2749         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2750         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2751         with MSG_PRIORITY_*.
2752         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2753         dump messages as MSG_PRIORITY_USER_FACING.
2754         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2755         about the interaction with MSG_PRIORITY_*.
2757 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2759         * varasm.c (output_constant): Add new parameter merge_strings.
2760         Make strings properly zero terminated in merge string sections.
2761         (mergeable_string_section): Don't fail if the last char is non-zero.
2762         (assemble_variable_contents): Handle merge string sections.
2763         (assemble_variable): Likewise.
2764         (assemble_constant_contents): Likewise.
2765         (output_constant_def_contents): Likewise.
2766         (output_constructor_array_range,
2767         output_constructor_regular_field): Adjust call to output_constant.
2768         (output_object_block): Adjust call to assemble_constant_contents
2769         and assemble_variable_contents.
2771 2018-10-04  Martin Liska  <mliska@suse.cz>
2773         PR c/87483
2774         * cgraphunit.c (process_function_and_variable_attributes):
2775         Warn about a function with alias attribute and a body.
2777 2018-10-04  Martin Liska  <mliska@suse.cz>
2779         PR ipa/82625
2780         * multiple_target.c (redirect_to_specific_clone): New function.
2781         (ipa_target_clone): Use it.
2782         * tree-inline.c: Fix comment.
2784 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
2786         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2787         fields.
2788         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2789         (gcc::dump_manager::register_pass): New member function, adapted
2790         from loop body in gcc::pass_manager::register_pass, adding a
2791         call to update_dfi_for_opt_info.
2792         (gcc::dump_manager::opt_info_enable_passes): Store the
2793         -fopt-info options into the new fields.  Move the loop
2794         bodies into...
2795         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2796         function.
2797         * dumpfile.h (struct opt_pass): New forward decl.
2798         (gcc::dump_manager::register_pass): New decl.
2799         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2800         (class gcc::dump_manager): Add fields "m_optgroup_flags",
2801         "m_optinfo_flags", and "m_optinfo_filename".
2802         * passes.c (gcc::pass_manager::register_pass): Move all of the
2803         dump-handling code to gcc::dump_manager::register_pass.
2805 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
2807         PR rtl-optimization/87466
2808         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2809         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2810         * doc/tm.texi: Regenerate.
2811         * ira-lives.c (process_bb_node_lives): Use the new target hook.
2812         * lra-lives.c (process_bb_lives): Likewise.
2813         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2814         Define.
2816 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
2818         * params.c (add_params): Fix initialization.
2820 2018-10-04  Martin Liska  <mliska@suse.cz>
2822         PR gcov-profile/84107
2823         * tree-profile.c (init_ic_make_global_vars):
2824         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2825         Come up with new ic_tuple* variables.  Emit
2826         __gcov_indirect_call{,_topn} variables.
2827         (gimple_gen_ic_profiler): Access the variable
2828         and emit gimple.
2829         (gimple_gen_ic_func_profiler): Access
2830         __gcov_indirect_call.callee field.
2831         (gimple_init_gcov_profiler): Use ptr_type_node.
2832         * value-prof.c (gimple_ic): Use ptr_type_node.
2834 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2836         PR tree-optimization/85787
2837         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2838         into this function and add support for detecting multiple phis.
2839         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2841 2018-10-04  Martin Liska  <mliska@suse.cz>
2843         PR ipa/87491
2844         * ipa-inline.c (inline_to_all_callers_1):
2845         Call ultimate_alias_target for node being inlined.
2847 2018-10-03  Jeff Law  <law@redhat.com>
2849         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2850         target's wchar_t.
2851         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2852         * tree.h (get_typenode_from_name): Prototype.
2854 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
2856         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2857         Change operand 2 predicate to nonimmediate_operand.
2858         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2860 2018-10-03  Martin Sebor  <msebor@redhat.com>
2861             Jeff Law  <law@redhat.com>
2863         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2864         initialize it.
2865         (get_string_length): Detect unterminated arrays.
2866         (format_string): Same.
2867         (format_directive): Warn about unterminated arrays.
2868         (handle_gimple_call): Mark statements with no_warning as needed.
2870 2018-10-03  Jim Wilson  <jimw@sifive.com>
2872         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2873         also define __riscv_abi_rve.  Delete trailing white space.
2875 2018-10-03  Paul Koning  <ni1d@arrl.net>
2877         Enable LRA register allocator for PDP11.
2878         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2879         (R): Likewise.
2880         (D): Likewise.
2881         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2882         * config/pdp11/pdp11.opt (-mlra): New option.
2883         * doc/invoke.texi (PDP-11 Options): Document -mlra.
2885 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
2887         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2888         (*<absneg:code>extend<mode>xf2): Ditto.
2890 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
2892         PR tree-optimization/87415
2893         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2894         precision fields.
2896 2018-10-02  Jeff Law  <law@redhat.com>
2898         * gimple-fold.c (get_range_strlen): Only set *nonstr when
2899         an unterminated string is discovered.  Bubble up range
2900         even for unterminated strings.
2901         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2902         indicates the string was not terminated via NONSTR.
2904 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
2906         * tree-vrp.c (extract_range_from_unary_expr): Special case all
2907         pointer conversions.
2908         Do not do anything special for anti-ranges.
2910 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
2912         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2913         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2915 2018-10-03  Martin Liska  <mliska@suse.cz>
2917         PR gcov-profile/86109
2918         * coverage.c (coverage_begin_function): Do not
2919         mark lambdas as artificial.
2920         * tree-core.h (struct GTY): Remove tm_clone_flag
2921         and introduce new lambda_function.
2922         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2924 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2926         PR target/87474
2927         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2928         P8_VECTOR and VSX are enabled.
2930 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
2932         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
2933         0x3907 as CPU model number.
2935 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
2937         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
2938         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
2939         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
2940         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
2941         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
2942         * config/s390/s390.md: Likewise. Rename also the cpu attribute
2943         value from arch12 to z14.
2945 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
2947         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
2948         (isinfxf2): Ditto.
2949         (isinf<mode>2): Ditto.
2951 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
2953         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
2954         before emitting fxam.  Perform calculations in XFmode.
2956 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
2958         * match.pd (((X /[ex] A) +- B) * A): New transformation.
2960 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
2962         PR middle-end/87319
2963         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
2964         * tree.c (signed_or_unsigned_type_for): Handle complex.
2966 2018-10-02  Jeff Law  <law@redhat.com>
2968         * gimple-fold.c (get_range_strlen): Remove dead code.
2970 2018-10-02  Martin Sebor  <msebor@redhat.com>
2971             Jeff Law  <law@redhat.com>
2973         * builtins.c (unterminated_array): Add new arguments.
2974         If argument is not terminated, bubble up size and exact
2975         state to callers.
2976         (expand_builtin_strnlen): Detect, avoid expanding
2977         and diagnose unterminated arrays.
2978         (c_strlen): Fill in offset of start of unterminated strings.
2979         * builtins.h (unterminated_array): Update prototype.
2981 2018-10-02  Richard Biener  <rguenther@suse.de>
2983         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
2984         of haddv4df, first reduce to SSE width and exploit the fact
2985         that we only need element zero with the reduction result.
2986         (reduc_plus_scal_v2df): Likewise.
2988 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
2990         * dojump.h (do_jump): Delete.
2991         (do_jump_1): Likewise.
2992         (split_comparison): Move around.
2993         * dojump.c (do_jump): Make static.
2994         (do_jump_1): Likewise.
2995         (jumpifnot): Move around.
2996         (jumpifnot_1): Likewise.
2997         (jumpif): Likewise.
2998         (jumpif_1): Likewise.
2999         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
3001 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
3003         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
3004         insns in the delay slot and add_insn_after for the jump insn.
3006 2018-10-02  Richard Biener  <rguenther@suse.de>
3008         * tree-inline.c (expand_call_inline): Use the location of
3009         the callee declaration for the inline-entry marker.
3010         * final.c (notice_source_line): Remove special-casing of
3011         NOTE_INSN_INLINE_ENTRY.
3013 2018-10-01  Carl Love  <cel@us.ibm.com>
3015         PR 69431
3016         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
3017         (__builtin_mtfsb0): New.
3018         (__builtin_mtfsb1): New.
3019         ( __builtin_set_fpscr_rn): New.
3020         (__builtin_set_fpscr_drn): New.
3021         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
3022         (rs6000_expand_set_fpscr_rn_builtin): Add.
3023         (rs6000_expand_set_fpscr_drn_builtin): Add.
3024         (rs6000_expand_builtin): Add case statement entries for
3025         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
3026         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
3027         RS6000_BUILTIN_MFFSL.
3028         (rs6000_init_builtins): Add ftype initialization and def_builtin
3029         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
3030         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
3031         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
3032         rs6000_mffscdrn): Add define_insn.
3033         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
3034         * doc/extend.texi: Add documentation for the builtins.
3036 2018-10-01  Richard Biener  <rguenther@suse.de>
3038         PR tree-optimization/87465
3039         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
3040         causing branch miscounts.
3042 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3044         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
3045         aarch64_option_default_param):  New.
3046         (params.h): Include.
3047         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
3048         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
3049         stack-clash protection validation code.
3051 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3053         * params.c (validate_param): New.
3054         (add_params): Use it.
3055         (set_param_value): Refactor param validation into validate_param.
3056         (diagnostic.h): Include.
3057         * diagnostic.h (diagnostic_ready_p): New.
3059 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3061         * params.c (set_param_value):
3062         Add index of parameter being validated.
3063         * common/common-target.def (option_validate_param): New.
3064         * common/common-targhooks.h (default_option_validate_param): New.
3065         * common/common-targhooks.c (default_option_validate_param): New.
3066         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
3067         * doc/tm.texi: Regenerate.
3069 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3071         PR target/86486
3072         * config/aarch64/aarch64.c (aarch64_override_options_internal):
3073         Add validation for stack-clash parameters and set defaults.
3075 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3077         PR target/86486
3078         * configure.ac: Add stack-clash-protection-guard-size.
3079         * doc/install.texi: Document it.
3080         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
3081         * params.def: Update comment for guard-size.
3082         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
3083         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
3084         * configure: Regenerate.
3086 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3088         PR target/86486
3089         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
3090         STACK_DYNAMIC_OFFSET): New.
3091         * config/aarch64/aarch64.c (aarch64_layout_frame):
3092         Update outgoing args size.
3093         (aarch64_stack_clash_protection_alloca_probe_range,
3094         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3096 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3098         PR target/86486
3099         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
3100         probe ranges.
3101         * target.def (stack_clash_protection_alloca_probe_range): New.
3102         (stack_clash_protection_final_dynamic_probe): Remove.
3103         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
3104         (default_stack_clash_protection_final_dynamic_probe): Remove.
3105         * targhooks.c: Likewise.
3106         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3107         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
3108         * doc/tm.texi: Regenerate.
3110 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3112         PR target/86486
3113         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
3114         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
3115         aarch64_clamp_to_uimm12_shift): New.
3116         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
3117         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
3119 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
3121         PR target/86486
3122         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
3124 2018-10-01  Jeff Law  <law@redhat.com>
3125             Richard Sandiford <richard.sandiford@linaro.org>
3126             Tamar Christina  <tamar.christina@arm.com>
3128         PR target/86486
3129         * config/aarch64/aarch64.md
3130         (probe_stack_range): Add k (SP) constraint.
3131         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
3132         STACK_CLASH_MAX_UNROLL_PAGES): New.
3133         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
3134         stack probes for stack clash.
3135         (aarch64_allocate_and_probe_stack_space): New.
3136         (aarch64_expand_prologue): Use it.
3137         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
3138         (aarch64_sub_sp): Add emit_move_imm optional param.
3140 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
3142         PR tree-optimization/87261
3143         * match.pd: Remove trailing whitespace.
3144         Add (x & y) | ~(x | y) -> ~(x ^ y),
3145         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
3147 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
3149         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
3150         constraints.
3151         (ashlsi3_insn): Update instruction constraints.
3152         (ashrsi3_insn): Likewise.
3153         (rotrsi3): Likewise.
3154         (add_shift): Likewise.
3155         * config/arc/constraints.md (Csz): New 32 bit constraint. It
3156         avoids placing in the limm field small constants which, otherwise,
3157         could end into a small instruction.
3159 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
3161         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
3162         destination register is not odd-even.
3163         (umaddsidi4_split): Likewise.
3165 2018-10-01  Richard Biener  <rguenther@suse.de>
3167         * tree-inline.c (expand_call_inline): Store origin of fn
3168         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
3169         * tree.c (block_ultimate_origin): Simplify and do some
3170         checking.
3172 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
3174         * config/i386/mmx.md (EMMS): New int iterator.
3175         (emms): New int attribute.
3176         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
3177         EMMS int iterator.  Explicitly declare clobbers.
3178         (mmx_emms): Remove expander.
3179         (mmx_femms): Ditto.
3180         * config/i386/predicates.md (emms_operation): Remove predicate.
3181         (vzeroall_pattern): New predicate.
3182         (vzeroupper_pattern): Rename from vzeroupper_operation.
3183         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
3184         vzeroupper_pattern and vzeroall_pattern predicates.
3186 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
3188         PR rtl-optimization/86939
3189         * ira-lives.c (make_hard_regno_born): Rename from this...
3190         (make_hard_regno_live): ... to this.  Remove update to conflict
3191         information.  Update function comment.
3192         (make_hard_regno_dead): Add conflict information update.  Update
3193         function comment.
3194         (make_object_born): Rename from this...
3195         (make_object_live): ... to this.  Remove update to conflict information.
3196         Update function comment.
3197         (make_object_dead):  Add conflict information update.  Update function
3198         comment.
3199         (mark_pseudo_regno_live): Call make_object_live.
3200         (mark_pseudo_regno_subword_live): Likewise.
3201         (mark_hard_reg_dead): Update function comment.
3202         (mark_hard_reg_live): Call make_hard_regno_live.
3203         (process_bb_node_lives): Likewise.
3204         * lra-lives.c (make_hard_regno_born): Rename from this...
3205         (make_hard_regno_live): ... to this.  Remove update to conflict
3206         information.  Remove now uneeded check_pic_pseudo_p argument.
3207         Update function comment.
3208         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
3209         to conflict information.  Update function comment.
3210         (mark_pseudo_live): Remove update to conflict information.  Update
3211         function comment.
3212         (mark_pseudo_dead): Add conflict information update.
3213         (mark_regno_live): Call make_hard_regno_live.
3214         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3215         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3217 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
3219         PR target/87370
3220         * config/i386/i386.c (construct_container): Use TImode for
3221         BLKmode values in 2 integer registers.
3223 2018-09-29  Jeff Law  <law@redhat.com>
3225         * builtins.c (unterminated_array): Pass in c_strlen_data * to
3226         c_strlen rather than just a tree *.
3227         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3228         Update recursive calls appropriately.  If caller did not provide a
3229         suitable data pointer, create a local one.  When a non-terminated
3230         string is discovered, bubble up information about the string via the
3231         c_strlen_data object.
3232         * builtins.h (c_strlen): Update prototype.
3233         (c_strlen_data): New structure.
3234         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3235         For a type 2 call, if c_strlen indicates a non-terminated string
3236         use the length of the non-terminated string.
3237         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3239 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
3241         PR target/87467
3242         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3243         __m512d type for __A argument rather than __m512.
3245 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
3247         * match.pd (simple_comparison): Don't optimize if either operand is
3248         a function pointer when target needs function pointer canonicalization.
3250 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
3252         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3253         power5 .. power9 to remove indirection.
3254         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3255         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3256         ASM_CPU_476_SPEC): Delete.
3257         (ASM_CPU_SPEC): Adjust.
3258         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3259         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3261 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
3263         * config.in: Delete HAVE_AS_DCI.
3264         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3265         * config/rs6000/rs6000.h: Ditto.
3266         * configure.ac: Delete HAVE_AS_DCI.
3267         * configure: Regenerate.
3269 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
3271         * config.in (HAVE_AS_LWSYNC): Delete.
3272         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3273         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3274         do it as a .long .
3275         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3276         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3277         as a .long .
3278         * configure.ac: Delete HAVE_AS_LWSYNC.
3279         * configure: Regenerate.
3281 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
3282             Pierre-Marie de Rodat  <derodat@adacore.com>
3284         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3285         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3286         (cgraph_node::create_thunk): Add indirect_offset parameter.
3287         (thunk_adjust): Likewise.
3288         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3289         and initialize the corresponding field with it.
3290         (cgraph_node::dump): Dump indirect_offset field.
3291         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3292         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3293         (thunk_adjust): Add indirect_offset parameter and deal with it.
3294         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3295         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
3296         or if the thunk is external or local.  Fix formatting.  Do not chain
3297         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
3298         if any, in the GIMPLE representation.
3299         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3300         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3301         (input_node): Read indirect_offset field.
3302         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3303         call to thunk_adjust.
3304         * tree-nested.c (struct nesting_info): Add thunk_p field.
3305         (create_nesting_tree): Set it.
3306         (convert_all_function_calls): Copy static chain from targets to thunks.
3307         (finalize_nesting_tree_1): Return early for thunks.
3308         (unnest_nesting_tree_1): Do not finalize thunks.
3309         (gimplify_all_functions): Do not gimplify thunks.
3311 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
3313         * opt-suggestions.c (option_proposer::build_option_suggestions):
3314         Release "option_values".
3316 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
3318         * coverage.c (get_coverage_counts): Convert problem-reporting dump
3319         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3320         * dumpfile.c (kind_as_string): New function.
3321         (dump_loc): Rather than a hardcoded prefix of "note: ", use
3322         kind_as_string to vary the prefix based on dump_kind.
3323         (selftest::test_capture_of_dump_calls): Update for above.
3325 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
3327         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3328         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
3330 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
3332         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3333         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3334         INVALID_REGNUM instead of FPSR_REG.
3335         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3336         * config/i386/i386.md: Update comment of FP compares.
3337         (fldenv): Do not clobber FPSR_REG.
3339 2018-09-28  Richard Biener  <rguenther@suse.de>
3341         * tree.h (BLOCK_ORIGIN): New.
3342         * omp-expand.c (grid_expand_target_grid_body): Assign
3343         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3344         * tree-inline.c (remap_block): Likewise.
3345         * auto-profile.c (get_function_decl_from_block): Simplify
3346         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3347         * langhooks.c (lhd_print_error_function): Likewise.
3348         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3349         Likewise.
3350         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3351         * tree.c (block_nonartificial_location): Likewise.
3352         (block_ultimate_origin): Likewise.
3353         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
3354         no longer needed LTO case.
3356 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
3357             Jan Hubicka  <jh@suse.cz>
3358             Martin Jambor  <mjambor@suse.cz>
3360         * simplify-rtx.c (simplify_merge_mask): New function.
3361         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3362         same masks are used in op1 or op2.
3363         (test_vec_merge): New function.
3364         (test_vector_ops): Call test_vec_merge.
3366 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
3368         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3369         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3370         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3371         (cypress_costs): Set it.
3372         (supersparc_costs): Likewise.
3373         (hypersparc_costs): Likewise.
3374         (leon_cost): Likewise.
3375         (leon3_costs): Likewise.
3376         (sparclet_costs): Likewise.
3377         (ultrasparc_costs): Likewise.
3378         (ultrasparc_costs): Likewise.
3379         (niagara_costs): Likewise.
3380         (niagara2_costs): Likewise.
3381         (niagara3_costs): Likewise.
3382         (niagara4_costs): Likewise.
3383         (niagara7_costs): Likewise.
3384         (m8_costs): Likewise.
3385         (TARGET_CAN_FOLLOW_JUMP): Define.
3386         (pass_work_around_errata::gate): Minor tweak.
3387         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3388         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3389         Automaitcally clear MASK_FSMULD mask for V7 processors.
3390         (sparc_can_follow_jump): New static function.
3391         (output_ubranch): Deal with CROSSING_JUMP_P.
3392         (sparc_use_sched_lookahead): Rewrite using switch statement.
3393         (sparc_issue_rate): Reorder.
3394         (sparc_branch_cost): New function.
3396 2018-09-27  Martin Sebor  <msebor@redhat.com>
3398         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3399         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3400         (int_fits_type_p): Same.
3402 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
3404         * config/i386/i386.md (FPCR_REG): Remove.
3405         (UNSPEC_FLDCW): Remove.
3406         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3407         (x86_fldcw_1): Remove insn pattern.
3408         (fnstenv): Do not clobber FPCR_REG.
3409         (fldenv): Ditto.
3410         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3411         (CALL_USED_REGISTERS): Ditto.
3412         (REG_ALLOC_ORDER): Ditto.
3413         (REG_CLASS_CONTENTS): Ditto.
3414         (HI_REGISTER_NAMES): Ditto.
3415         (ADDITIONAL_REGISTER_NAMES): Use defines instead
3416         of numerical constants.
3417         * config/i386/i386.c (regclass_map): Remove fpsr register.
3418         (dbx_register_map): Ditto.
3419         (dbx64_register_map): Ditto.
3420         (svr4_dbx_register_map): Ditto.
3421         (print_reg): Do not handle FPCR_REG.
3423 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
3425         PR target/87149
3426         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3427         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3428         Delete, always treat as true.
3429         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3430         Ditto.  Simplify remaining code.
3431         * config/powerpcspe/powerpcspe.h: Ditto.
3432         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3433         Simplify remaining code.
3434         (rs6000_expand_builtin): Ditto.
3435         * config/rs6000/rs6000.h: Ditto.
3436         * configure.ac: Ditto.
3437         * configure: Regenerate.
3439 2018-09-27  Martin Liska  <mliska@suse.cz>
3441         * coverage.c (get_coverage_counts): Revert the formatting
3442         of missing profile opt info.
3444 2018-09-27  Richard Biener  <rguenther@suse.de>
3446         PR debug/37801
3447         PR debug/87440
3448         * dwarf2out.c (set_block_origin_self): Do not mark outermost
3449         block as we do not output that.
3450         (gen_inlined_subroutine_die): Elide the originally outermost
3451         block, matching what we do for concrete instances.
3452         (decls_for_scope): Add parameter specifying whether to recurse
3453         to subblocks.
3455 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
3456             Tom de Vries  <tom@codesourcery.com>
3458         PR 82089
3460         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3461         STORE_FLAG_VALUE == 1.
3463 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
3465         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3466         constant definitions.
3467         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3468         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3469         ("speculation_barrier"): New expander definition.
3471 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
3473         PR gcov-profile/86957
3474         * common.opt: New warning option -Wmissing-profile.
3475         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3476         * doc/invoke.texi: Document -Wmissing-profile.
3478 2018-09-26  Jim Wilson  <jimw@sifive.com>
3480         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3481         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3483 2018-09-26  Martin Sebor  <msebor@redhat.com>
3485         * tree.c (zerop): Change return type to bool.
3486         (integer_zerop, integer_onep, integer_each_onep): Same.
3487         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3488         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3489         (real_onep, real_minus_onep, chain_index): Same.
3490         (print_type_hash_statistics, type_list_equal): Same.
3491         * tree.h (zerop): Same.
3492         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3493         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3494         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3495         (real_onep, real_minus_onep, chain_index): Same.
3496         (print_type_hash_statistics, type_list_equal): Same.
3498 2018-09-26  Jim Wilson  <jimw@sifive.com>
3500         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3502 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
3504         PR target/87414
3505         * config/i386/i386.c: Include debug.h and dwarf2out.h.
3506         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3507         call.
3509 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
3511         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3513 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
3515         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3516         and FP_SECOND_SSE_REGS.
3517         (REG_CLASS_NAMES): Ditto.
3518         (REG_CLASS_CONTENTS): Ditto.
3519         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3520         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3521         (ix86_preferred_output_reload_class): Ditto.
3522         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3523         clobber constraint to "=&f".
3524         (fix_truncdi_i387): Ditto.
3525         (lrintxfdi2): Ditto.
3526         (fistdi2_<rounding>): Ditto.
3527         (fpremxf4_i387): Change "=u" constraint to "=f".
3528         (fprem1xf4_i387): Ditto.
3529         (sincosxf3): Ditto.
3530         (fptanxf4_i387): Ditto.
3531         (fxtractxf3_i387): Ditto.
3532         (fscalexf4_i387): Ditto.
3533         (atan2xf3): Change "u" constraint to "f".
3534         (fyl2xxf3_i387): Ditto.
3535         (fyl2xp1xf3_i387): Ditto.
3537 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
3539         PR target/87439
3540         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3541         for removed I387_MASK_PM entity.
3544 2018-09-26  Jeff Law  <law@redhat.com>
3545         Revert
3546         2018-09-26  Alexey Neyman  <stilor@att.net>
3548         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3549         headers are no longer pulled in by <isl/val.h>.
3551 2018-09-26  Richard Biener  <rguenther@suse.de>
3553         PR debug/87443
3554         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3555         or concrete instance DIE to the tree.  Create abstract origin
3556         attributes also for concrete instances.
3558 2018-09-26  Alexey Neyman  <stilor@att.net>
3560         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3561         headers are no longer pulled in by <isl/val.h>.
3563 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
3565         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3566         Use new helper functions.
3567         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3568         Use new helper functions.
3569         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3570         aarch_mm_needs_release): New declarations.
3571         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3572         aarch_mm_needs_release): New.
3574 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
3576         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3577         (arm32_output_mi_thunk): Deal with long calls.
3579 2018-09-26  Richard Biener  <rguenther@suse.de>
3581         PR debug/87428
3582         PR debug/87362
3583         * tree-inline.c (expand_call_inline): When the location
3584         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3585         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3586         the inserted BLOCK to make inlined_function_outer_scope_p
3587         recognize it.
3588         * dwarf2out.c (add_call_src_coords_attributes): Do not add
3589         coords for reserved locations.
3591 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3593         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3594         (*call_indirect_nonlocal_sysv<mode>): Ditto.
3595         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3596         (*sibcall_nonlocal_sysv<mode>): Ditto.
3597         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3598         (<bd>_<mode>): Ditto.
3599         (<bd>tf_<mode>): Ditto.
3601 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3603         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3604         control string as a list of templates instead of as C code.
3605         (*altivec_movti): Ditto.
3606         * config/rs6000/darwin.md (movdf_low_di): Ditto.
3608 2018-09-25  Jim Wilson  <jimw@sifive.com>
3610         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3611         when target symbol is weak.
3613 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3615         PR c/87387
3616         * builtins.c (unterminated_array): Simplify.
3617         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
3618         where pointer arithmetic is safe.
3620 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
3622         PR target/86987
3623         * config/rs6000/altivec.md (altivec_vspltb): Use
3624         const_0_to_15_operand instead of u5bit_cint_operand.
3625         (*altivec_vspltb_internal): Ditto.
3626         (altivec_vspltb_direct): Ditto.
3627         (altivec_vsplth): Use const_0_to_7_operand instead of
3628         u5bit_cint_operand.
3629         (*altivec_vsplth_internal): Ditto.
3630         (altivec_vsplth_direct): Ditto.
3631         (altivec_vspltw): Use const_0_to_3_operand instead of
3632         u5bit_cint_operand.
3633         (*altivec_vspltw_internal): Ditto.
3634         (altivec_vspltw_direct): Ditto.
3635         (altivec_vspltsf): Ditto.
3636         (*altivec_vspltsf_internal): Ditto.
3637         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3638         various splats with the proper size immediate.  Reorder the various
3639         cases by ascending size of immediate, and put all such together.
3641 2018-09-25  Richard Biener  <rguenther@suse.de>
3643         PR debug/83941
3644         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3645         GC-ification.
3646         (maybe_create_die_with_external_ref): Do not create
3647         DW_TAG_imported_unit here.
3648         (add_abstract_origin_attribute): Handle external BLOCK refs.
3649         (dwarf2out_abstract_function): Simplify LTO case.
3650         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3651         rather than using maybe_create_die_with_external_ref.
3653 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
3655         PR target/71278
3656         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3657         (frndintxf2_mask_pm_i387): Ditto.
3658         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3659         Enable for !flag_trapping_math.
3660         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3661         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3662         Change operand 1 predicate to nonimmediate_operand.
3663         (attr "i387_cw"): Remove mask_pm.
3664         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3665         (enum ix86_entity): Remove I387_MASK_PM.
3666         * config/i386/i386.c (ix86_i387_mode_needed): Do not
3667         handle I387_MASK_PM.
3668         (ix86_mode_needed): Ditto.
3669         (ix86_mode_after): Ditto.
3670         (ix86_mode_entry): Ditto.
3671         (ix86_mode_exit): Ditto.
3672         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3674 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
3676         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3677         to_update_switch_stmts to vNULL instead of calling create on them
3678         immediately.
3680 2018-09-25  Richard Biener  <rguenther@suse.de>
3682         PR tree-optimization/87402
3683         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3684         (visit_phi): Re-instantiate handling of supposed to be VARYING
3685         but non-VARYING backedge value.
3687 2018-09-25  Richard Biener  <rguenther@suse.de>
3689         PR debug/83941
3690         * dwarf2out.c (struct sym_off_pair): New.
3691         (external_die_map): New global.
3692         (lookup_decl_die): When in LTO create DIEs lazily from the
3693         external_die_map.
3694         (lookup_block_die): New function, create DIEs lazily in LTO.
3695         (equate_block_to_die): New function.
3696         (dwarf2out_die_ref_for_decl): During WPA get the association
3697         from the external DIE map.
3698         (dwarf2out_register_external_die): Record mapping into the
3699         external DIE map.
3700         (maybe_create_die_with_external_ref): New function split out from
3701         DIE generation part of old dwarf2out_register_external_die.
3702         (add_abstract_origin_attribute): Do not return the DIE.  When
3703         in LTO reference externals directly.
3704         (dwarf2out_abstract_function): When in LTO ignore calls for
3705         decls with external DIEs (already present abstract instances).
3706         (gen_call_site_die): Adjust.
3707         (add_high_low_attributes): Likewise.
3708         (gen_lexical_block_die): Likewise.
3709         (gen_inlined_subroutine_die): Likewie.
3710         (gen_block_die): Likewise.
3711         (dwarf2out_inline_entry): Likewise.
3712         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3713         DIEs.
3715 2018-09-25  Martin Liska  <mliska@suse.cz>
3717         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3718         integers and not by a float value.
3720 2018-09-25  Martin Liska  <mliska@suse.cz>
3722         PR fortran/87394
3723         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3724         instead of NULL.
3725         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3726         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3727         * godump.c (go_format_type): Remove extra parenthesis.
3729 2018-09-25  Martin Liska  <mliska@suse.cz>
3731         * alias.c (set_dest_equal_p): Remove unused function.
3732         * config/i386/i386.c (def_builtin_pure2): Likewise.
3733         * diagnostic-show-locus.c (class layout): Remove
3734         unused field.
3735         (layout::layout): Likewise here.
3736         * dump-context.h (class temp_dump_context): Likewise.
3737         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3738         (add_AT_loclistsptr): Likewise.
3739         (add_AT_offset): Likewise.
3740         (get_AT_hi_pc): Likewise.
3741         (is_comdat_die): Likewise.
3742         (type_is_enum): Likewise.
3743         (ceiling): Likewise.
3744         (add_AT_vms_delta): Likewise.
3745         (is_class_die): Likewise.
3746         * edit-context.c (class line_event): Remove unused field.
3747         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3748         unused function.
3749         * ipa-cp.c (ipa_get_vr_lat): Likewise.
3750         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3751         (ok_for_base_p_nonstrict): Likewise.
3752         * tree-chrec.c (is_not_constant_evolution): Likewise.
3753         (chrec_fold_poly_cst): Likewise.
3754         * tree-if-conv.c (has_pred_critical_p): Likewise.
3755         * tree-ssa-coalesce.c (print_exprs): Likewise.
3756         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3757         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3758         * tree-vrp.c (value_ranges_intersect_p): Likewise.
3759         (value_range_nonnegative_p): Likewise.
3761 2018-09-25  Martin Liska  <mliska@suse.cz>
3763         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3764         Do not handle "GNU Pascal".
3765         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3766         Likewise.
3767         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3768         from documentation. Likewise.
3769         * dbxout.c (dbxout_range_type): Likewise.
3770         * doc/cpp.texi: Likewise.
3771         * doc/extend.texi: Likewise.
3772         * doc/frontends.texi: Likewise.
3773         * doc/invoke.texi: Remove Pascal entry.
3774         * tree.def (CLEANUP_POINT_EXPR): Likewise.
3775         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3777 2018-09-25  Martin Liska  <mliska@suse.cz>
3779         PR middle-end/86078
3780         * doc/invoke.texi: Document all parameters and remove default
3781         of the parameters.
3783 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3785         PR bootstrap/87417
3786         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3787         contains HOST_WIDE_INTs when computing its size.
3789 2018-09-24  Jim Wilson  <jimw@sifive.com>
3791         PR target/87391
3792         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3793         not TARGET_RVE.
3794         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3796 2018-09-24  Andrew Pinski  <apinski@marvell.com>
3798         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3799         access prev before checking it for NULLness in the
3800         AARCH64_FUSE_CMP_BRANCH case.
3802 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
3804         PR target/82699
3805         * config/i386/i386.c (rest_of_insert_endbranch): Set
3806         endbr_queued_at_entrance to true and don't insert ENDBR if
3807         x86_function_profiler will be called.
3808         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3809         is true.
3810         * config/i386/i386.h (machine_function): Add
3811         endbr_queued_at_entrance.
3813 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3815         * genattrtab.c (mk_attr_alt): Use alternative_mask.
3816         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3817         types.
3818         (check_attr_test): Use alternative_mask.
3819         (get_attr_value): Likewise.
3820         (compute_alternative_mask): Use alternative_mask and XWINT.
3821         (make_alternative_compare): Use alternative_mask.
3822         (attr_alt_subset_p): Use XWINT.
3823         (attr_alt_subset_of_compl_p): Likewise.
3824         (attr_alt_intersection): Use alternative_mask and XWINT.
3825         (attr_alt_union): Likewise.
3826         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3827         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3828         (simplify_test_exp): Use alternative_mask and XWINT.
3829         (write_test_expr): Use alternative_mask and XWINT, adjust bit
3830         number calculation to support 64 bits.  Generate code that
3831         checks 64-bit masks.
3832         (main): Use alternative_mask.
3833         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3835 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3837         PR target/80080
3838         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3839         RETURN+USE when returning via %r14.
3841 2018-09-24  Martin Liska  <mliska@suse.cz>
3843         * gcov.c (output_lines): Print colorization legend
3844         for both flag_use_colors and flag_use_hotness_colors.
3845         Reword the help.
3847 2018-09-24  Martin Liska  <mliska@suse.cz>
3849         * coverage.c (get_coverage_counts): Use warning_at
3850         with current_function_decl location. Use %qD in warning
3851         message.
3853 2018-09-24  Martin Liska  <mliska@suse.cz>
3855         * memory-block.h (memory_block_pool::release): Annotate with
3856         valgrind that the memory is not accessible.
3858 2018-09-24  Martin Liska  <mliska@suse.cz>
3860         PR sanitizer/85774
3861         * asan.c: Make asan_handled_variables extern.
3862         * asan.h: Likewise.
3863         * cfgexpand.c (expand_stack_vars): Make sure
3864         a representative is unpoison if another
3865         variable in the partition is handled by
3866         use-after-scope sanitization.
3868 2018-09-24  Richard Biener  <rguenther@suse.de>
3870         PR tree-optimization/63155
3871         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3872         the worklist when the edge of the respective argument isn't
3873         executable.
3875 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3877         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3878         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3879         (MASK_CLASS_P): Update for rename.
3880         (MAYBE_MASK_CLASS_P): Ditto.
3881         (REG_CLASS_NAMES): Update.
3882         (REG_CLASS_CONTENT): Update.
3883         * config/i386/i386.c (regclass_map): Update for MASK_REG
3884         and ALL_MASK_REGS rename.
3885         * config/i386/constraints.md (Yk): Update for rename.
3886         (k): Ditto.
3888 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3890         * config/i386/i386.h (enum reg_class): Remove
3891         EVEX_SSE_REGS and MOD4_SSE_REGS.
3892         (REG_CLASS_NAMES): Update.
3893         (REG_CLASS_CONTENT): Update.
3894         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3895         registers as ALL_SSE_REGS.
3896         (ix86_additional_allocno_class_p): Remove.
3897         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3898         (ix86_register_priority): Lower priority of EVEX SSE registers.
3899         Use IN_RANGE macro where appropriate.
3900         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3901         AVX-5124VNNIW checks.
3902         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3903         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3904         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3905         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3906         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3907         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3908         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3909         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3910         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3911         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3912         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3913         * config/i386/constraints.md (Yh): Remove.
3915 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
3917         * config/i386/i386.c (regclass_map): Declare integer REX registers
3918         as GENERAL_REGS.
3920 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
3922         * doc/service.texi (Service): Switch the fsf.org link to https.
3924 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3926         PR target/86798
3927         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3928         Define to speculation_safe_value_not_needed.
3930 2018-09-21  Florian Weimer  <fweimer@redhat.com>
3932         PR middle-end/81035
3933         * doc/extend.texi (Common Function Attributes): Mention that
3934         noreturn suppresses tail call optimization.
3936 2018-09-21  Jeff Law  <law@redhat.com>
3938         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
3939         vr_values::cleanup_edges_and_switches.
3940         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
3941         vr_values class.
3942         (identify_jump_threads): Remove EDGE_IGNORE handling.
3943         (execute_vrp): Move handling of to_remove_edges and
3944         to_update_switch_stmts into vr_values class member functions.
3945         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
3946         (to_update_switch_stmts): Likewise.
3947         * vr-values.c: Include cfghooks.h.
3948         (vr_values::vr_values): Initialize to_remove_edges and
3949         to_update_switch_stmts.
3950         (vr_values::~vr_values): Verify to_remove_edges and
3951         to_update_switch_stmts are empty.
3952         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
3953         (vr_values::cleanup_edges_and_switches): New member function.
3954         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
3955         function.  Add new data members.
3957 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
3959         PR tree-optimization/87309
3960         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
3961         calls with pflags and alt_flags.
3962         (selftest::test_capture_of_dump_calls): Add test of interaction of
3963         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
3965 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3967         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
3969 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3971         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
3973 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3975         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
3976         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
3977         (VXWORKS_LIBS_RTP): Minor reordering.
3979 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3981         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
3982         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
3984 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3986         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
3987         (PTRDIFF_TYPE): Likewise.
3989 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3991         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
3992         triplet, similar to support for VxWorks7.
3993         * config/vxworks-dummy.h: Provide a default definition
3994         of TARGET_VXWORKS64 to 0.
3996 2018-09-21  Olivier Hainque  <hainque@adacore.com>
3998         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
3999         * config/vxworks-dummy.h: here.
4001 2018-09-21  Olivier Hainque  <hainque@adacore.com>
4003         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
4005 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
4006             Bo Zhou  <zbo.zhou@hisilicon.com>
4008         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
4009         * config/aarch64/aarch64-tune.md: Regenerated.
4010         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
4011         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
4012         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
4014 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
4015             Julian Brown  <julian@codesourcery.com>
4017         * builtins.c (get_builtin_sync_mem): Handle address spaces.
4019 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
4021         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
4022         if the call takes a static chain.
4024 2018-09-21  Martin Liska  <mliska@suse.cz>
4026         * auto-profile.c (autofdo_source_profile::read): Do not
4027         set sum_all.
4028         (read_profile): Do not add working sets.
4029         (read_autofdo_file): Remove sum_all.
4030         (afdo_callsite_hot_enough_for_early_inline): Remove const
4031         qualifier.
4032         * coverage.c (struct counts_entry): Remove gcov_summary.
4033         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
4034         do not support GCOV_TAG_PROGRAM_SUMMARY.
4035         (get_coverage_counts): Remove summary and expected
4036         arguments.
4037         * coverage.h (get_coverage_counts): Likewise.
4038         * doc/gcov-dump.texi: Remove -w option.
4039         * gcov-dump.c (dump_working_sets): Remove.
4040         (main): Do not support '-w' option.
4041         (print_usage): Likewise.
4042         (tag_summary): Likewise.
4043         * gcov-io.c (gcov_write_summary): Do not dump
4044         histogram.
4045         (gcov_read_summary): Likewise.
4046         (gcov_histo_index): Remove.
4047         (gcov_histogram_merge): Likewise.
4048         (compute_working_sets): Likewise.
4049         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
4050         it not obsolete.
4051         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
4052         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
4053         (GCOV_HISTOGRAM_SIZE): Remove.
4054         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
4055         (struct gcov_summary): Simplify rapidly just
4056         to runs and sum_max fields.
4057         (gcov_histo_index): Remove.
4058         (NUM_GCOV_WORKING_SETS): Likewise.
4059         (compute_working_sets): Likewise.
4060         * gcov-tool.c (print_overlap_usage_message): Remove
4061         trailing empty line.
4062         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
4063         (output_lines): Remove program related line.
4064         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
4065         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
4066         histogram.
4067         (input_profile_summary): Do not read it.
4068         (merge_profile_summaries): And do not merge it.
4069         (input_symtab): Do not call removed function.
4070         * modulo-sched.c (sms_schedule): Do not print sum_max.
4071         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
4072         removed when histogram method was invented.
4073         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
4074         mode.
4075         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
4076         GCOV coding style.
4077         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
4078         and dump selected value.
4079         * profile.c (add_working_set): Remove.
4080         (get_working_sets): Likewise.
4081         (find_working_set): Likewise.
4082         (get_exec_counts): Do not work with working sets.
4083         (read_profile_edge_counts): Do not inform as sum_max is removed.
4084         (compute_branch_probabilities): Likewise.
4085         (compute_value_histograms): Remove argument for call of
4086         get_coverage_counts.
4087         * profile.h: Do not make gcov_summary const.
4089 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
4091         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
4093 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
4095         PR tree-optimization/86990
4096         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
4097         Check that the entire merged store group is made of constants only for
4098         overlapping stores.
4100 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
4102         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
4103         (VTABLE_VERIFICATION_SPEC): Likewise.
4104         (SANITIZER_EARLY_SPEC): Likewise.
4105         (SANITIZER_SPEC): Likewise.
4106         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
4107         * doc/invoke.texi (Link Options): Document -r.
4109 2018-09-20  Richard Biener <rguenther@suse.de>
4111         PR middle-end/87054
4112         * gimplify.c (gimplify_expr): Retain alignment of
4113         addressable lvalue in dereference.
4115 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
4117         PR bootstrap/87013
4118         * configure.ac: Check for .loc is_stmt support.
4119         * configure, config.in: Rebuilt.
4120         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
4121         if not supported.
4123 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
4125         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
4126         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
4127         -misel=no.
4129 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
4131         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4132         VECTOR_OTHER.
4133         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
4134         case VECTOR_OTHER.
4136 2018-09-20  Marek Polacek  <polacek@redhat.com>
4138         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
4140 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
4142         PR tree-optimization/87288
4143         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
4144         into account when determining PEELING_FOR_NITERS.
4146 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
4148         PR tree-optimization/86877
4149         * tree-vect-loop.c (vect_analyze_loop_2): Call
4150         vect_verify_datarefs_alignment.
4152 2018-09-19  Marek Polacek  <polacek@redhat.com>
4154         * doc/invoke.texi: Document -Wclass-conversion.
4156 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
4158         * config/pa/pa.c (pa_adjust_priority): Delete.
4159         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
4161         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
4162         (atomic_storehi): Likewise.
4163         (atomic_storesi): Likewise.
4164         (atomic_loaddi): Restore compare and swap exchange loop code.
4166 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
4168         PR rtl-optimization/86902
4169         * combine.c (try_combine): When changing the CC mode used, don't change
4170         an unrelated mode in other_insn to that new CC mode.
4172 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
4174         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
4175         with %T in place of calls to dump_generic_expr.
4176         (prune_runtime_alias_test_list): Likewise.
4177         (create_runtime_alias_checks): Likewise.
4178         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
4179         (vect_analyze_data_ref_dependence): Likewise.
4180         (vect_slp_analyze_data_ref_dependence): Likewise.
4181         (vect_record_base_alignment): Likewise.  Use %G in place of call
4182         to dump_gimple_stmt.
4183         (vect_compute_data_ref_alignment): Likewise.
4184         (verify_data_ref_alignment): Likewise.
4185         (vect_find_same_alignment_drs): Likewise.
4186         (vect_analyze_group_access_1): Likewise.
4187         (vect_analyze_data_ref_accesses): Likewise.
4188         (dependence_distance_ge_vf): Likewise.
4189         (dump_lower_bound): Likewise.
4190         (vect_prune_runtime_alias_test_list): Likewise.
4191         (vect_find_stmt_data_reference): Likewise.
4192         (vect_analyze_data_refs): Likewise.
4193         (vect_create_addr_base_for_vector_ref): Likewise.
4194         (vect_create_data_ref_ptr): Likewise.
4195         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
4196         (vect_can_advance_ivs_p): Likewise.
4197         (vect_update_ivs_after_vectorizer): Likewise.
4198         (vect_gen_prolog_loop_niters): Likewise.
4199         (vect_prepare_for_masked_peels): Likewise.
4200         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4201         (vect_determine_vectorization_factor): Likewise.
4202         (vect_is_simple_iv_evolution): Likewise.
4203         (vect_analyze_scalar_cycles_1): Likewise.
4204         (vect_analyze_loop_operations): Likewise.
4205         (report_vect_op): Likewise.
4206         (vect_is_slp_reduction): Likewise.
4207         (check_reduction_path): Likewise.
4208         (vect_is_simple_reduction): Likewise.
4209         (vect_create_epilog_for_reduction): Likewise.
4210         (vect_finalize_reduction:): Likewise.
4211         (vectorizable_induction): Likewise.
4212         (vect_transform_loop_stmt): Likewise.
4213         (vect_transform_loop): Likewise.
4214         (optimize_mask_stores): Likewise.
4215         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4216         (vect_split_statement): Likewise.
4217         (vect_recog_over_widening_pattern): Likewise.
4218         (vect_recog_average_pattern): Likewise.
4219         (vect_determine_min_output_precision_1): Likewise.
4220         (vect_determine_precisions_from_range): Likewise.
4221         (vect_determine_precisions_from_users): Likewise.
4222         (vect_mark_pattern_stmts): Likewise.
4223         (vect_pattern_recog_1): Likewise.
4224         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4225         (vect_record_max_nunits): Likewise.
4226         (vect_build_slp_tree_1): Likewise.
4227         (vect_build_slp_tree_2): Likewise.
4228         (vect_print_slp_tree): Likewise.
4229         (vect_analyze_slp_instance): Likewise.
4230         (vect_detect_hybrid_slp_stmts): Likewise.
4231         (vect_detect_hybrid_slp_1): Likewise.
4232         (vect_slp_analyze_operations): Likewise.
4233         (vect_slp_analyze_bb_1): Likewise.
4234         (vect_transform_slp_perm_load): Likewise.
4235         (vect_schedule_slp_instance): Likewise.
4236         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4237         (vect_mark_stmts_to_be_vectorized): Likewise.
4238         (vect_init_vector_1): Likewise.
4239         (vect_get_vec_def_for_operand): Likewise.
4240         (vect_finish_stmt_generation_1): Likewise.
4241         (vect_check_load_store_mask): Likewise.
4242         (vectorizable_call): Likewise.
4243         (vectorizable_conversion): Likewise.
4244         (vectorizable_operation): Likewise.
4245         (vectorizable_load): Likewise.
4246         (vect_analyze_stmt): Likewise.
4247         (vect_is_simple_use): Likewise.
4248         (vect_get_vector_types_for_stmt): Likewise.
4249         (vect_get_mask_type_for_stmt): Likewise.
4250         * tree-vectorizer.c (increase_alignment): Likewise.
4252 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
4254         * doc/rtl.texi: Adjust vec_select description.
4255         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4256         non-constant selectors.
4258 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
4260         * config/aarch64/aarch64-protos.h
4261         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4262         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4263         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4264         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4265         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4266         (AARCH64_FL_PROFILE): Move index so flags are ordered.
4267         (AARCH64_ISA_RCPC8_4): New flag.
4268         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4269         to aarch64_offset_9bit_signed_unscaled_p.
4270         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4271         and use stlur.
4272         * config/aarch64/constraints.md (Ust): New constraint.
4273         * config/aarch64/predicates.md.
4274         (aarch64_9bit_offset_memory_operand): New predicate.
4275         (aarch64_rcpc_memory_operand): New predicate.
4277 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
4279         PR rtl-optimization/87361
4280         * rtlanal.c (nonzero_bits1): Revert accidental change.
4282 2018-09-19  Richard Biener  <rguenther@suse.de>
4284         PR tree-optimization/87349
4285         PR tree-optimization/87342
4286         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4288 2018-09-18  Marek Polacek  <polacek@redhat.com>
4290         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4291         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4293 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
4295         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4297 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
4299         PR rtl-optimization/86882
4300         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4302 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
4304         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4305         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4307 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
4309         PR other/87353
4310         * doc/invoke.texi (Link Options): Fix formatting and grammar.
4312 2018-09-18  Richard Biener  <rguenther@suse.de>
4314         PR middle-end/63155
4315         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4316         (compute_samebase_partition_bases): Likewise.
4317         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4318         (gimple_can_coalesce_p): Simplify.
4320 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
4322         Handle a library implementation of ffs calling __builtin_ffs.
4323         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4324         (mmix_init_libfuncs): New function: make __builtin_ffs expand
4325         to __ffsdi2.
4327 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
4329         * diagnostic-show-locus.c (class layout_range): Add field
4330         "m_original_idx".
4331         (layout_range::layout_range): Add "original_idx" param and use it
4332         to initialize new field.
4333         (make_range): Use 0 for original_idx.
4334         (layout::layout): Pass in index to calls to
4335         maybe_add_location_range.
4336         (layout::maybe_add_location_range): Add param "original_idx" and
4337         pass it on to layout_range.
4338         (layout::print_any_labels): Pass on range->m_original_idx to
4339         get_text call.
4340         (gcc_rich_location::add_location_if_nearby): Use 0 for
4341         original_idx.
4342         * gcc-rich-location.h (text_range_label::get_text): Update for new
4343         param.
4344         (range_label_for_type_mismatch::get_text): Likewise.
4346 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
4348         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4350 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
4352         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4353         format_string_diagnostic_t.
4354         (fmtwarn_n): Likewise.
4355         * substring-locations.c
4356         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4357         (format_warning_n_va): Convert to...
4358         (format_string_diagnostic_t::emit_warning_n_va): ...this.
4359         (format_warning_va): Convert to...
4360         (format_string_diagnostic_t::emit_warning_va): ...this.
4361         (format_warning_at_substring): Convert to...
4362         (format_string_diagnostic_t::emit_warning): ...this.
4363         (format_warning_at_substring_n): Convert to...
4364         (format_string_diagnostic_t::emit_warning_n): ...this.
4365         * substring-locations.h (class format_string_diagnostic_t): New
4366         class.
4367         (format_warning_va): Convert to
4368         format_string_diagnostic_t::emit_warning_va.
4369         (format_warning_n_va): Convert to
4370         format_string_diagnostic_t::emit_warning_n_va.
4371         (format_warning_at_substring): Convert to
4372         format_string_diagnostic_t::emit_warning.
4373         (format_warning_at_substring_n): Convert to
4374         format_string_diagnostic_t::emit_warning_n.
4376 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
4377             Bernd Schmidt <bernds_cb1@t-online.de>
4379         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4380         SImode args.
4382 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
4384         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4385         operand 0 predicate to nonimmediate operand.
4386         (rint<mode>2_frndint): Remove insn pattern.
4387         (rint<mode>2): Change operand 1 predicate to general_operand.
4388         Extend operand 1 to XFmode and generate rintxf2 insn.
4389         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4390         Do not use X87MODEF mode macro.
4391         (frndintxf2_<rounding>_i387): Rename from
4392         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
4393         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4394         to XFmode and generate significandxf3 insn.
4396 2018-09-17  Richard Biener  <rguenther@suse.de>
4398         PR tree-optimization/87328
4399         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4400         visiting unexecutable backedges when not iterating.
4401         (do_rpo_vn): Mark all edges not executable even when not
4402         iterating.
4404 2018-09-17  Martin Jambor  <mjambor@suse.cz>
4406         PR c/63886
4407         * doc/invoke.texi (Warning Options): Likewise.
4409 2018-09-17  Richard Biener  <rguenther@suse.de>
4411         PR tree-optimization/87301
4412         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4413         clean EH info from leftover copy assignments.
4415 2018-09-17  Martin Liska  <mliska@suse.cz>
4417         PR gcov-profile/85871
4418         * gcov.c (output_intermediate_file): Fix out of bounds
4419         access.
4421 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
4423         * config/arc/arc.c: Object attributes for core4 not reflected
4424         correctly.
4425         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4426         core3).
4428 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
4430         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4432 2018-09-17  Martin Liska  <mliska@suse.cz>
4434         * doc/gcov.texi: Document new option --use-hotness-colors.
4435         * gcov.c (struct source_info): Declare new field.
4436         (source_info::source_info): Set default for maximum_count.
4437         (print_usage): Add new -q option.
4438         (process_args): Process it.
4439         (accumulate_line_info): Save src->maximum_count.
4440         (output_line_beginning): Make color line number if
4441         flag_use_hotness_colors is set.
4442         (output_line_details): Pass default argument value.
4443         (output_lines): Pass src->maximum_count.
4445 2018-09-17  Martin Liska  <mliska@suse.cz>
4447         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4448         Use processor_names table.
4449         * config/i386/i386.c (ix86_default_align): Use
4450         processor_cost_table for alignment values.
4451         (ix86_option_override_internal): Use processor_names.
4452         (ix86_function_specific_print): Likewise.
4453         * config/i386/i386.h (struct processor_costs):
4454         Add alignment values.
4455         (struct ptt): Remove and replace with const char *.
4456         * config/i386/x86-tune-costs.h (struct processor_costs):
4457         Declare default alignments for all costs.
4459 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
4461         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4462         symbolics or VR_VARYING ranges for ABS_EXPR.
4463         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4464         when range will wrap.
4466 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
4468         PR middle-end/86864
4469         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4470         before and after a JUMP_TABLE_DATA.
4472 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
4474         PR middle-end/87188
4475         * dojump.c (do_compare_and_jump): Canonicalize function pointers
4476         when one operand is a function pointer.  Use POINTER_TYPE_P and
4477         FUNC_OR_METHOD_TYPE_P.
4478         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4479         * fold-const.c (build_range_check): Likewise.
4480         * match.pd (simple_comparison): Likewise.
4482 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
4484         PR c/82967
4485         * spellcheck.c (get_edit_distance_cutoff): New function.
4486         (selftest::test_edit_distance_unit_test_oneway): Rename to...
4487         (selftest::test_get_edit_distance_one_way): ...this.
4488         (selftest::test_get_edit_distance_unit): Rename to...
4489         (selftest::test_get_edit_distance_both_ways): ...this.
4490         (selftest::test_edit_distances): Move tests to this new function,
4491         and test some more pairs of strings.  Update for above renaming.
4492         (selftest::get_old_cutoff): New function.
4493         (selftest::test_get_edit_distance_cutoff): New function.
4494         (selftest::assert_suggested_for): New function.
4495         (ASSERT_SUGGESTED_FOR): New macro.
4496         (selftest::assert_not_suggested_for): New function.
4497         (ASSERT_NOT_SUGGESTED_FOR): New macro.
4498         (selftest::test_suggestions): New function.
4499         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4500         tests to selftest::test_edit_distances and call it.  Add calls to
4501         selftest::test_get_edit_distance_cutoff and
4502         selftest::test_suggestions.
4503         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4504         (best_match::consider): Replace hard-coded cutoff calculation with
4505         a call to...
4506         (best_match::get_cutoff): New declaration.
4507         (best_match::get_best_meaningful_candidate): Likewise.
4509 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4511         * builtins.c (fold_builtin_strlen): Remove TODO comment.
4513 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4515         revert:
4516         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4518         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4519         terminated string literal.
4521 2018-09-14  Martin Sebor  <msebor@redhat.com>
4523         * builtins.c (unterminated_array): Handle ARRAY_REF.
4524         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4525         * builtins.h (unterminated_array): Declare extern.
4526         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4527         arrays.
4528         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4529         calls.
4531 2018-09-14  Martin Sebor  <msebor@redhat.com>
4532             Jeff Law  <law@redhat.com>
4534         * builtins.c (unterminated_array): New.
4535         (expand_builtin_strcpy): Adjust.
4536         (expand_builtin_strcpy_args): Detect unterminated arrays.
4537         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
4538         unterminated arrays.
4539         * gimple-fold.h (get_maxval_strlen): Add argument.
4540         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4542         * gimple-fold.c (get_range_strlen): Add argument.
4543         (get_maxval_strlen): Adjust.
4544         * gimple-fold.h (get_range_strlen): Add argument.
4546 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
4548         * config/i386/movdirintrin.h: Fix copyright year.
4550 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
4552         * reg-stack.c: Include regs.h.
4553         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4554         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4555         FIRST_STACK_REG, not DFmode.
4556         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4557         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
4558         (change stack): Default register mode to the reg_raw_mode of
4559         FIRST_STACK_REG, not DFmode.
4560         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4561         (*swapxf): Rename from swapxf.
4563 2018-09-14  Carl Love  <cel@us.ibm.com>
4565         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4566         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4568 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
4570         PR target/87224
4571         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4572         alternatives.
4574 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
4576         PR target/85628
4577         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4579 2018-09-14  Jason Merrill  <jason@redhat.com>
4581         Fix --enable-gather-detailed-mem-stats.
4582         * hash-table.c (hash_table_usage): Change from variable to function.
4583         * hash-table.h: Adjust.
4584         * Makefile.in: Add missing dependencies on hash-table.h.
4586 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4588         PR tree-optimization/87259
4589         PR lto/87283
4590         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4591         execute_cse_reciprocals_1 has tried transforming.
4593 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
4595         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4596         VR_VARYING for PLUS/MINUS_EXPR.
4598 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
4600         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4601         formatting.
4603 2018-09-14  Richard Biener  <rguenther@suse.de>
4605         PR middle-end/63155
4606         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4607         bits for the merged partition.
4609 2018-09-13  Martin Sebor  <msebor@redhat.com>
4610             Bernd Edlinger  <bernd.edlinger@hotmail.de>
4612         * builtins.h (c_srlen): Add argument.
4613         * builtins.c (warn_string_no_nul): New function.
4614         (c_strlen): Add argument and use it.  Update recursive calls.
4615         Pass DECL argument to string_constant to get info on non
4616         terminated strings.  Update *NONSTR as needed.
4617         (fold_builtin_strlen): Add argument to calls to c_strlen.
4618         Warn for unterminated arrays.
4619         (warn_string_no_null): Add prototype.
4620         * expr.c (string_constant): Update arguments.  Update recursive
4621         calls appropriately.  Detect missing NUL terminator and outermost
4622         declaration its missing in.
4623         Improve checks for arrays with nonzero lower bound or elements
4624         that are not a single byte.  Simplify offset computation.
4625         Simplify checks for non-NUL terminated strings.
4626         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4627         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4629 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4631         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4632         correctly.
4633         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
4634         argument.  Fix range checks.
4635         * fold-const.h (c_getstr): Adjust protoype.
4636         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4637         string is constant but contains no NUL byte.
4639         * expr.c (string_constant): Adjust function comment.
4640         Remove bogus check for zero termination.
4642         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4644         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4645         (get_constant_size): Don't make STRING_CSTs larger than they are.
4646         (check_string_literal): New check function for STRING_CSTs.
4647         (output_constant): Use it.
4649 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
4651         PR target/86812
4652         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4654 2018-09-13  Richard Biener  <rguenther@suse.de>
4656         PR tree-optimization/87263
4657         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4658         (struct unwind_state): Add max_rpo field.
4659         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4660         Compute max_rpo, the max RPO number a block can be backwards reached
4661         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
4662         separating it from the iterating mode.
4664 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
4666         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4667         (rfs_decision): New scheduling decision.
4669 2018-09-13  Richard Biener  <rguenther@suse.de>
4671         PR bootstrap/87134
4672         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4673         (vn_nary_op_insert_pieces_predicated): Do not write useless
4674         valid_dominated_by_p entry outside of the allocated storage.
4676 2018-09-13  Omar Sandoval  <osandov@osandov.com>
4677             Tom de Vries  <tdevries@suse.de>
4679         PR debug/86985
4680         * dwarf2out.c (is_c): New function.
4681         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4683 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
4685         PR target/85628
4686         * config/aarch64/aarch64.md (*aarch64_bfxil):
4687         Define.
4688         * config/aarch64/constraints.md (Ulc): Define.
4689         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4690         Define.
4691         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4692         New function.
4694 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
4696         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4697         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4698         aarch64_layout_frame call.
4699         (aarch64_expand_epilogue): Likewise.
4700         (aarch64_initial_elimination_offset): Likewise.
4701         (aarch64_get_separate_components): Likewise.
4702         (aarch64_use_return_insn_p): Likewise.
4703         (aarch64_layout_frame): Remove unneeded check.
4705 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4707         * configure.ac: Only append
4708         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4709         gcc_config_arguments if it was never reconfigured or last reconfigure
4710         was with different arguments.
4711         * configure: Regenerated.
4713 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4714             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4716         PR middle-end/87290
4717         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4718         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4720 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
4722         PR tree-optimization/87287
4723         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4724         X % C == 0 to X % (unsigned) C == 0 optimization to ...
4725         * match.pd (X % C == 0): ... here.  New optimization.
4727 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4729         PR middle-end/82853
4730         * expr.h (maybe_optimize_mod_cmp): Declare.
4731         * expr.c (mod_inv): New function.
4732         (maybe_optimize_mod_cmp): New function.
4733         (do_store_flag): Use it.
4734         * cfgexpand.c (expand_gimple_cond): Likewise.
4736 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
4737             Julian Brown  <julian@codesourcery.com>
4739         PR middle-end/86336
4740         * gimplify.c (gimplify_scan_omp_clauses): Set
4741         target_firstprivatize_array_bases in OpenACC parallel and kernels
4742         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4743         OpenACC data regions.
4745 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
4747         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4748         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4750 2018-09-12  Richard Biener  <rguenther@suse.de>
4752         PR tree-optimization/87280
4753         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4754         edge but unreachable target.
4755         (do_rpo_vn): For conservatively handling a PHI only mark
4756         the backedge executable but not the block reachable.
4758 2018-09-12  Richard Biener  <rguenther@suse.de>
4760         PR tree-optimization/87266
4761         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4762         visited blocks.
4764 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
4766         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4767         constants.
4768         ("trunc<BFP:mode><DFP_ALL:mode>2")
4769         ("trunc<DFP_ALL:mode><BFP:mode>2")
4770         ("extend<BFP:mode><DFP_ALL:mode>2")
4771         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4772         according to the target operand type.
4774 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4775             Andreas Krebbel  <krebbel@linux.ibm.com>
4777         PR tree-optimization/86844
4778         * gimple-ssa-store-merging.c
4779         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4780         there are any overlapping stores in between them, make sure they are
4781         also coalesced or we give up completely.
4783 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
4785         PR middle-end/87248
4786         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4787         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
4789 2018-09-12  Tom de Vries  <tdevries@suse.de>
4791         * common.opt (gdescribe-dies): Add option.
4792         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4793         attribute for artifical and nameless decls.
4794         (dwarf2out_register_external_die): Add description attribute to
4795         external reference die.
4796         (add_desc_attribute): New functions.
4797         (gen_subprogram_die): Add description attribute to
4798         DW_TAG_call_site_parameter.
4799         * tree-pretty-print.c (print_generic_expr_to_str): New function.
4800         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4801         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4802         -gno-describe-dies.
4803         (@item -gdescribe-dies): Add.
4805 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
4807         * tree-vrp.c (vrp_shift_undefined_p): Remove.
4808         (extract_range_from_binary_expr_1: Call
4809         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4810         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4811         depend on sign.
4813 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
4815         * gimple-ssa-warn-alloca.c
4816         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4817         field for ALLOCA_BOUND_*_LARGE.
4819 2018-09-11  Nathan Sidwell  <nathan@acm.org>
4821         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4823 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4825         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4826         for clobbers.  Remove obsolete comment.
4828 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4830         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4831         mpxchk, mpxld and mpxst types.
4832         (define_attr length_immediate): Remove all processing of mpx types.
4833         (define_attr prefix_0f): Ditto.
4834         (define_attr memory): Ditto.
4836 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
4838         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4839         (log<mode>2): Change operand 1 predicate to general_operand.
4840         Extend operand 1 to XFmode and generate logxf3 insn.
4841         (log10<mode>2): Change operand 1 predicate to general_operand.
4842         Extend operand 1 to XFmode and generate log10xf3 insn.
4843         (log2<mode>2): Change operand 1 predicate to general_operand.
4844         Extend operand 1 to XFmode and generate log2xf3 insn.
4845         (fyl2xp1_extend<mode>xf3_i387): Remove.
4846         (log1p<mode>2): Change operand 1 predicate to general_operand.
4847         Extend operand 1 to XFmode and generate log1pxf3 insn.
4848         (fxtract_extend<mode>xf3_i387): Remove.
4849         (logb<mode>2): Change operand 1 predicate to general_operand.
4850         Extend operand 1 to XFmode and generate logbxf3 insn.
4851         (ilogb<mode>2): Change operand 1 predicate to general_operand.
4852         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4853         (significand<mode>2): Change operand 1 predicate to general_operand.
4854         Extend operand 1 to XFmode and generate significandxf3 insn.
4856 2018-09-11  Nathan Sidwell  <nathan@acm.org>
4858         * gcc.c (perror_with_name, pfatal_with_name): Delete.
4859         (load_specs): Use fatal_error.
4860         (DELETE_IF_ORDINARY, process_command): Use error.
4861         (execute, run_attempt): Use fatal_error.
4863 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
4865         * diagnostic-core.h (sorry_at): New prototype.
4866         * diagnostic.c (sorry_at): New function.
4868 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
4870         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4871         by zero as VR_UNDEFINED.
4873 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
4875         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4876         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4877         (<sincos>mode2): New expander.
4878         (sincos_extend<mode>xf3_i387): Remove insn pattern.
4879         (sincos -> sin, cos splitters): Remove splitter patterns.
4880         (sincos<mode>3): Change operand 2 predicate to general_operand.
4881         Extend operand 2 to XFmode and generate sincosxf3 insn.
4882         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4883         Change operand 3 predicate to const1_operand.
4884         (fptan_extend<mode>xf4_i387): Remove insn pattern.
4885         (tanxf2): Update operands in the call to fptanxf4_i387.
4886         (tan<mode>2): Change operand 1 predicate to general_operand.
4887         Extend operand 1 to XFmode and generate tanxf3 insn.
4888         (atan2xf3): Rename from *fpatanxf3_i387.
4889         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4890         (atan2xf3): Remove expander.
4891         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
4892         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4893         (atan<mode>2): Change operand 1 predicate to general_operand.
4894         Extend operand 1 to XFmode and generate atanxf3 insn.
4896 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
4898         * config/i386/i386.md (x87/SSE constant load splitter): Use
4899         memory_operand instead of nonimmediate_operand for input operand
4900         predicate.
4902 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
4904         * config/i386/i386.md (float partial SSE register stall splitter): Move
4905         splitter near its instruction pattern.
4906         (float_extend partial SSE register stall splitter): Ditto.
4907         (float_truncate partial SSE register stall splitter): Ditto.
4909 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
4911         PR target/86794
4912         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4913         to speculation_safe_value_not_needed.
4915         PR target/85666
4916         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4917         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4918         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4919         leaf_function_p, instead use has_hard_reg_initial_val.
4921 2018-09-09  Nathan Sidwell  <nathan@acm.org>
4923         * gcc.h (pfatal_with_name): Don't declare here.
4924         * gcc.c (pfatal_with_name): Make static.
4926 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
4928         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
4929         earlyclobber.
4931 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
4933         PR rtl-optimization/85458
4934         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
4935         priority hook to reduce the priority of EXPR.
4937 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
4939         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
4940         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
4941         with X87_ENABLE_FLOAT.  Remove preparation code.
4942         (*float<SWI48:mode><MODEF:mode>2): Rename from
4943         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
4944         math using "enabled" attribute.
4945         (*floatdi<MODEF:mode>2_i387): Rename from
4946         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
4947         enable for 32bit targets only.
4948         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
4949         splitter.
4950         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
4951         as operand 1 predicate.  Rewrite as define_insn_and_split.
4952         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
4954 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
4956         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
4957         to fallthru to FLOAT case.
4959 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
4961         PR target/86731
4962         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
4963         around folding of vec_sl to handle out of range shift values.
4965 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
4967         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
4968         Update callers to gen_fix_trunc<mode>_i387_fisttp
4969         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
4970         nonimmediate_operand.
4971         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
4972         and corresponding splitters.
4973         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
4974         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
4975         (fix_truncdi_i387_with_temp): Remove insn pattern
4976         and corresponding splitters.
4977         (fix_trunc<mode>_i387): Change operand 0 predicate to
4978         nonimmediate_operand.
4979         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
4980         and corresponding splitters.
4981         (*fistdi2_1): Remove.
4982         (fistdi2): Ditto.
4983         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
4984         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
4985         (*fist<mode>2_1): Remove.
4986         (fist<mode>2): Ditto.
4987         (fist<mode>2_with_temp): Remove insn pattern and corresponding
4988         splitters.
4989         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
4990         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
4991         (fistdi2_<rounding>): Change operand 0 predicate to
4992         nonimmediate_operand.
4993         (fistdi2_<rounding>_with_temp): Remove insn pattern
4994         and corresponding splitters.
4995         (fist<mode>2_<rounding>): Change operand 0 predicate to
4996         nonimmediate_operand.
4997         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
4998         and corresponding splitters.
5000         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
5002 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5004         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
5005         the init value.
5007 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
5009         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5010         early gimple folding of vec_splat().
5011         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
5012         * gimple-fold.h: Add an extern define for tree_vec_extract().
5014 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
5016         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
5017         wrappers around TREE_TYPE comparisons.
5019 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
5021         PR target/80080
5022         * config/s390/predicates.md: Add nonsym_memory_operand.
5023         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
5024         contains a SYMBOL_REF, load it into an intermediate pseudo.
5025         (s390_emit_compare_and_swap): Legitimize operand.
5026         * config/s390/s390.md: Use the new nonsym_memory_operand
5027         with UNSPECV_CAS patterns.
5029 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
5031         PR target/80080
5032         * config/s390/s390-passes.def: New file.
5033         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
5034         declaration.
5035         (make_pass_s390_early_mach): Add declaration.
5036         * config/s390/s390.c (make_pass_s390_early_mach):
5037         (s390_option_override): Remove dynamic registration.
5038         * config/s390/t-s390: Add s390-passes.def.
5040 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
5042         * config/s390/s390.c (s390_decompose_constant_pool_ref):
5043         Remove UNSPEC_LTREL_BASE check.
5044         (annotate_constant_pool_refs): Likewise.
5045         (find_constant_pool_ref): Likewise.
5046         (find_ltrel_base): Removed.
5047         (replace_ltrel_base): Removed.
5048         (s390_mainpool_finish): Remove replace_ltrel_base call.
5049         (s390_chunkify_start): Remove pending LTREL_BASE logic.
5050         (s390_chunkify_finish): Remove replace_ltrel_base call.
5051         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
5053 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
5055         PR target/86779
5056         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5057         to speculation_safe_value_not_needed.
5059 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
5060             Bernd Schmidt  <bernds_cb1@t-online.de>
5062         * config/nvptx/nvptx-opts.h: New file.
5063         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
5064         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
5065         (ASM_SPEC): Define.
5066         (TARGET_SM35): New macro.
5067         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
5068         correct predicate.
5069         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
5070         values.
5071         (misa=): New option.
5072         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
5074 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
5076         * config/i386/i386.md (truncdfsf2): Remove expander.
5077         (truncdfsf2_with_temp): Ditto.
5078         (truncxf<mode>2): Ditto.
5079         (*truncdfsf_fast_mixed): Remove insn pattern.
5080         (*truncdfsf_fast_i387): Ditto.
5081         (*truncdfsf_mixed): Ditto.
5082         (*truncdfsf_i387): Ditto.
5083         (*truncdfsf2_i387_1): Ditto.
5084         (*truncxfsf2_mixed): Ditto.
5085         (*truncxfdf2_mixed): Ditto.
5086         (*truncxf<mode>2_i387_noop): Ditto. Update callers
5087         to call gen_truncxf<mode>2 instead.
5088         (*truncxf<mode>2_i387): Remove.
5089         (reg->reg splitters): Remove splitter pattern.
5090         (reg->mem splitters): Ditto.
5092         (truncdfsf2): New insn pattern.
5093         (truncxf<mode>2): Ditto.
5095 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5097         * tree-ssa-math-opts.c (is_mult_by): New function.
5098         (is_square_of): Use the above.
5099         (optimize_recip_sqrt): New function.
5100         (pass_cse_reciprocals::execute): Use the above.
5102 2018-09-05  Richard Biener  <rguenther@suse.de>
5104         PR bootstrap/87134
5105         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
5106         to zero-init the emplaced vec.
5108 2018-09-05  Martin Liska  <mliska@suse.cz>
5110         PR tree-optimization/87205
5111         * tree-switch-conversion.c (pass_lower_switch::execute):
5112         Group cases for switch statements.
5114 2018-09-05  Richard Biener  <rguenther@suse.de>
5116         PR tree-optimization/87217
5117         * tree-ssa-sccvn.c (vuse_valueize): New.
5118         (vn_reference_lookup_pieces): Use it.
5119         (vn_reference_lookup): Likewise.
5121 2018-09-05  Nathan Sidwell  <nathan@acm.org>
5123         PR c++/87137
5124         * stor-layout.c (place_field): Scan forwards to check last
5125         bitfield when ms_bitfield_placement is in effect.
5127 2018-09-05  Richard Biener  <rguenther@suse.de>
5129         PR bootstrap/87225
5130         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
5131         return.
5133 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5134             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
5136         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
5137         * config.gcc (extra_objs): Build it.
5138         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
5139         Likewise.
5140         * config/aarch64/aarch64-passes.def
5141         (pass_tag_collision_avoidance): New pass.
5142         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
5143         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
5144         (aarch64_classify_address): Remove static qualifier.
5145         (aarch64_address_info, aarch64_address_type): Move to...
5146         * config/aarch64/aarch64-protos.h: ... here.
5147         (make_pass_tag_collision_avoidance): New function.
5148         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
5149         New tuning flag.
5151 2018-09-05  Martin Liska  <mliska@suse.cz>
5153         * doc/gcov.texi: Update documentation of humar
5154         readable mode.
5155         * gcov.c (format_count): Print one decimal place, it provides
5156         more fine number of situations like '1G' vs. '1.4G'.
5158 2018-09-05  Martin Liska  <mliska@suse.cz>
5160         PR target/87164
5161         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
5162         * optc-gen.awk: Allow 'Var' for Deprecated options in order
5163         to generate a MASK value.
5165 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
5167         PR debug/86593
5168         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
5169         if frame pointer isn't used.
5170         (compute_frame_pointer_to_fb_displacement): Likewise.
5172 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
5174         PR target/87198
5175         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
5176         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
5177         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
5178         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
5179         and OPTION_MASK_ISA_XSAVEC_UNSET.
5181 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
5183         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
5184         XOR operations in NAND case.
5186 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
5188         * wide-int-range.cc (wide_int_range_convert): New.
5189         * wide-int-range.h (wide_int_range_convert): New.
5190         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
5191         code into wide_int_range_convert.
5192         (extract_range_into_wide_ints): Do not munge anti range constants
5193         into the entire domain.  Just return the range back.
5195 2018-09-04  Martin Liska  <mliska@suse.cz>
5197         * genmatch.c (output_line_directive): Add new argument
5198         fnargs.
5199         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
5201 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
5203         * doc/invoke.texi (Option Summary): Add whitespace.
5205         * doc/invoke.texi (Option Summary): Add -Waligned-new.
5207 2018-09-04  Richard Biener  <rguenther@suse.de>
5209         PR tree-optimization/87211
5210         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5211         backedge value we're supposed to treat as VARYING also number
5212         the PHI to VARYING in case it got a different value-number already.
5214 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
5216         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5217         (extract_range_from_binary_expr_1): Do not call
5218         vrp_can_optimize_bit_op.
5219         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5220         static.
5221         (wide_int_range_get_mask_and_bounds): New.
5222         (wide_int_range_optimize_bit_op): New.
5223         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5224         (wide_int_range_bit_and): Same.
5225         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5226         (wide_int_range_optimize_bit_op): New.
5227         (wide_int_range_get_mask_and_bounds): New.
5229 2018-09-04  Richard Biener  <rguenther@suse.de>
5231         PR tree-optimization/87176
5232         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5233         variable.  When value-numbering a virtual PHI node make sure
5234         to not value-number to the backedge value.
5236 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
5238         * doc/extend.texi (Long Long, Hex Floats): Document support for
5239         long long and hex floats in more recent versions of ISO C++.
5241 2018-09-03  Richard Biener  <rguenther@suse.de>
5243         PR tree-optimization/87177
5244         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5245         cleanup.
5247 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
5249         * bb-reorder.c (edge_order): Convert to C-qsort-style
5250         tri-state comparator.
5251         (reorder_basic_blocks_simple): Change std::stable_sort to
5252         gcc_stablesort.
5254 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
5256         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5257         tri-state comparator.
5258         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5260 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
5262         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
5263         (mergesort): ... here as maximum count for using netsort.
5264         (gcc_qsort): Set nlim to 3 if stable sort is requested.
5265         (gcc_stablesort): New.
5266         * system.h (gcc_stablesort): Declare.
5268 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
5270         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5271         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
5272         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
5274 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
5276         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5277         lxsdx and stxsdx alternatives.
5278         (*mov<mode>_hardfloat64): Ditto.
5279         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5281 2018-09-03  Richard Biener  <rguenther@suse.de>
5283         PR tree-optimization/87200
5284         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5285         simplify result.
5287 2018-09-03  Martin Liska  <mliska@suse.cz>
5289         PR tree-optimization/87201
5290         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5291         Fix parenthesis in an expression.
5293 2018-09-03  Richard Biener  <rguenther@suse.de>
5295         PR tree-optimization/87197
5296         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5297         visited.  CSE the VN_INFO hashtable lookup.
5299         PR tree-optimization/87169
5300         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5301         iterating make sure there's no extra backedges from irreducible
5302         regions feeding the header.  Mark the destination block
5303         executable.
5305 2018-09-03  Martin Liska  <mliska@suse.cz>
5307         PR driver/83193
5308         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5309         * common/common-targhooks.c (default_get_valid_option_values):
5310         New function.
5311         * common/common-targhooks.h (default_get_valid_option_values):
5312         Likewise.
5313         * common/config/i386/i386-common.c: Move processor_target_table
5314         from i386.c.
5315         (ix86_get_valid_option_values): New function.
5316         (TARGET_GET_VALID_OPTION_VALUES): New macro.
5317         * config/i386/i386.c (struct ptt): Move to i386-common.c.
5318         (PTA_*): Move all defined masks into i386-common.c.
5319         (ix86_function_specific_restore): Use new processor_cost_table.
5320         * config/i386/i386.h (struct ptt): Moved from i386.c.
5321         (struct pta): Likewise.
5322         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5323         * doc/tm.texi.in: Likewise.
5324         * opt-suggestions.c (option_proposer::suggest_option):
5325         Pass prefix to build_option_suggestions.
5326         (option_proposer::get_completions): Likewise.
5327         (option_proposer::build_option_suggestions): Use the new target
5328         hook.
5329         * opts.c (struct option_help_tuple): New struct.
5330         (print_filtered_help): Use the new target hook.
5332 2018-09-03  Martin Liska  <mliska@suse.cz>
5334         PR middle-end/59521
5335         * predict.c (set_even_probabilities): Add likely_edges
5336         argument and handle cases where we have precisely one
5337         likely edge.
5338         (combine_predictions_for_bb): Catch also likely_edges.
5339         (tree_predict_by_opcode): Handle gswitch statements.
5340         * tree-cfg.h (find_case_label_for_value): New declaration.
5341         (find_taken_edge_switch_expr): Likewise.
5342         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5343         Find pivot in decision tree based on probabily, not by number of
5344         nodes.
5346 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
5348         * doc/standards.texi (Standards): Update Objective-C reference.
5350 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
5352         * doc/install.texi (Prerequisites): Update link for MPC.
5354 2018-09-01  Michael Matz  <matz@suse.de>
5356         PR tree-optimization/87074
5357         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5358         PHIs for outer-loop uses.
5360 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
5362         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5363         * doc/invoke.texi (C Dialect Options): Ditto.
5365 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
5367         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5369 2018-08-31  Richard Biener  <rguenther@suse.de>
5371         PR tree-optimization/87168
5372         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5373         (rpo_elim::eliminate_avail): When OP was not visited it must
5374         be available.
5376 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
5378         * tree-vrp.c (copy_value_range): Convert param "from" from
5379         "value_range *" to "const value_range *".
5380         (range_is_null): Likewise for param "vr".
5381         (range_int_cst_p): Likewise.
5382         (range_int_cst_singleton_p): Likewise.
5383         (symbolic_range_p): Likewise.
5384         (value_ranges_intersect_p): Likewise for both params.
5385         (value_range_nonnegative_p): Likewise for param "vr".
5386         (value_range_constant_singleton): Likewise.
5387         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5388         (extract_range_into_wide_ints): Likewise for param "vr".
5389         (extract_range_from_multiplicative_op): Likewise for params "vr0"
5390         and "vr1".
5391         (vrp_can_optimize_bit_op): Likewise.
5392         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5393         "vr1_".
5394         (extract_range_from_unary_expr): Likewise.
5395         (debug_value_range): Likewise for param "vr".
5396         (value_range::dump): Add "const" qualifier.
5397         (vrp_prop::check_array_ref): Convert local "vr" from
5398         "value_range *" to "const value_range *".
5399         (vrp_prop::check_mem_ref): Likewise.
5400         (vrp_prop::visit_stmt): Likewise for local "old_vr".
5401         (vrp_intersect_ranges_1): Likewise for param "vr_1".
5402         (vrp_intersect_ranges): Likewise.
5403         (simplify_stmt_for_jump_threading): Likewise for local "vr".
5404         (vrp_prop::vrp_finalize): Likewise.
5405         * tree-vrp.h (value_range::dump): Add "const" qualifier.
5406         (vrp_intersect_ranges): Add "const" qualifier to params as above.
5407         (extract_range_from_unary_expr): Likewise.
5408         (value_range_constant_singleton): Likewise.
5409         (symbolic_range_p): Likewise.
5410         (copy_value_range): Likewise.
5411         (extract_range_from_binary_expr_1): Likewise.
5412         (range_int_cst_p): Likewise.
5413         (vrp_set_zero_nonzero_bits): Likewise.
5414         (range_int_cst_singleton_p): Likewise.
5416 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
5418         * config/aarch64/arm_neon.h (vabsd_s64): New.
5419         (vnegd_s64): Likewise.
5421 2018-08-31  Martin Jambor  <mjambor@suse.cz>
5423         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5425 2018-08-31  Martin Liska  <mliska@suse.cz>
5427         * ipa-icf.c (sem_item::add_type): Use
5428         sem_item::m_type_hash_cache.
5429         * ipa-icf.h: Move the cache from sem_item_optimizer
5430         to sem_item.
5432 2018-08-31  Nathan Sidwell  <nathan@acm.org>
5434         * doc/extend.texi (Backwards Compatibility): Remove implicit
5435         extern C leeway of () being (...).
5437 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5439         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5441 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
5443         PR target/86684
5444         PR target/87149
5445         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5447 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
5449         PR middle-end/87138
5450         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5451         gen_int_mode.  Formatting fixes.
5453 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
5455         * target.def (custom_function_descriptors): Improve documentation.
5456         * doc/tm.texi.in (Trampolines): Expand discussion of function
5457         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5458         beginning of the section.
5459         * doc/tm.texi: Regenerated.
5461 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
5463         * cfg.h (class auto_edge_flag): Spell out the template-id of the
5464         base class in the initializer list.  This is a workaround for
5465         building with older GCC.
5466         (class auto_bb_flag): Likewise.
5468 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
5470         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5471         (altivec_vcmpequ<VI_char>_p): Remove star.
5472         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5473         vector load modes.
5474         (expand_strncmp_vec_sequence): New function.
5475         (emit_final_str_compare_vec): New function.
5476         (expand_strn_compare): Add support for vector strncmp.
5477         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5478         length specification to bytes.
5479         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5480         (vcmpnezb_p): New pattern.
5481         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5482         for option -mstring-compare-inline-limit.
5484 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
5486         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5487         (PTA_SKYLAKE): Add PTA_AES.
5488         (PTA_GOLDMONT): Likewise.
5490 2018-08-29  Jan Hubicka  <jh@suse.cz>
5492         PR lto/86517
5493         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5494         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5496 2018-08-29  Jan Hubicka  <jh@suse.cz>
5498         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5499         TYPE_STUB_DECL.
5500         (hash_tree): Do not visit TYPE_STUB_DECL.
5501         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5502         stream TYPE_STUB_DECL.
5503         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5504         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5505         after free_lang_data.
5506         (type_in_anonymous_namespace_p): Likewise.
5508 2018-08-29  Jan Hubicka  <jh@suse.cz>
5510         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5511         comment that it has to be even number.
5512         (class sreal): Change m_sig type to int32_t.
5513         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5514         int64_t for temporary calculations.
5515         (sreal_verify_basics): Drop one bit from minimum and maximum.
5517 2018-08-30  Richard Biener  <rguenther@suse.de>
5519         PR tree-optimization/87147
5520         * tree-ssa-sccvn.c (SSA_VISITED): New function.
5521         (visit_phi): When the degenerate result is from the backedge and
5522         we didn't visit its definition yet drop to VARYING.
5523         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5525 2018-08-29  Jan Hubicka  <jh@suse.cz>
5527         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5528         DECL_VINDEX.
5529         (hash_tree): Likewise.
5531 2018-08-29  Jan Hubicka  <jh@suse.cz>
5533         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5534         and TYPE_NEXT_REF_TO.
5536 2018-08-29  Jan Hubicka  <jh@suse.cz>
5538         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5539         comment that it has to be even number.
5540         (class sreal): Change m_sig type to int32_t.
5541         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5542         int64_t for temporary calculations.
5543         (sreal_verify_basics): Drop one bit from minimum and maximum.
5545 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
5547         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5549 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
5551         PR middle-end/86995
5552         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5553         if to_add is negative.
5555 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5557         PR middle-end/87053
5558         * builtins.c (c_strlen): Improve range checks.
5560 2018-08-29  Martin Sebor  <msebor@redhat.com>
5561             Jeff Law  <law@redhat.com>
5563         PR tree-optimization/86714
5564         PR tree-optimization/86711
5565         * builtins.c (c_strlen): Add arguments to call to string_constant.
5566         * expr.c (string_constant): Add argument.  Detect missing nul
5567         terminator and outermost declaration it's missing in.
5568         * expr.h (string_constant): Add argument.
5569         * fold-const.c (read_from_constant_string): Add arguments to call to
5570         string_constant.
5571         (c_getstr): Likewise.
5572         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5573         to string_constant.
5574         * tree-ssa-strlen.c (get_stridx): Likewise.
5576 2018-08-29  Jan Hubicka  <jh@suse.cz>
5578         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5579         Do not stream DECL_VINDEX.
5580         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5581         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5582         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5584 2018-08-29  Richard Biener  <rguenther@suse.de>
5586         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5587         virtual operands that are not default defs to honor region
5588         boundaries.
5589         (rpo_vn_valueize): Remove ineffective code here.
5591 2018-08-29  Richard Biener  <rguenther@suse.de>
5593         PR tree-optimization/87132
5594         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5595         when skipping defs reachable over backedges.
5597 2018-08-29  Richard Biener  <rguenther@suse.de>
5599         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5600         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5601         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5602         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5603         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5604         (vn_reference_lookup_3): Remove use of const_parms.
5605         (free_rpo_vn): Do not free const_parms.
5606         (do_rpo_vn): Do not call init_const_parms.
5607         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5608         SSA_NAME_POINTS_TO_READONLY_MEMORY.
5609         (call_may_clobber_ref_p_1): Likewise.
5611 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
5613         PR other/86726
5614         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5615         (-O): Ditto.
5616         (-ftree-scev-cprop): Document.
5618 2018-08-29  Jan Hubicka  <jh@suse.cz>
5620         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5621         parameters.
5622         (sreal constructor): Update.
5623         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5624         sreal:operator/): Update.
5626 2018-08-29  Martin Liska  <mliska@suse.cz>
5628         * tree-switch-conversion.c (switch_conversion::expand):
5629         Strenghten assumption about gswitch statements.
5631 2018-08-29  Richard Biener  <rguenther@suse.de>
5633         PR tree-optimization/87117
5634         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5635         re-value-number released SSA VDEFs.
5637 2018-08-29  Richard Biener  <rguenther@suse.de>
5639         PR tree-optimization/87126
5640         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5642 2018-08-28  Jim Wilson  <jimw@sifive.com>
5644         * config/riscv/pic.md: Rewrite.
5645         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5646         invalid address.
5647         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5648         (SOFTF, default_load, softload, softstore): New.
5650 2018-08-28  Jeff Law  <law@redhat.com>
5652         * fold-const.c (fold_binary_loc): Remove recently added assert.
5654 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
5656         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5657         to OP parmeter of generated function.
5659 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
5661         PR tree-optimization/87009
5662         * match.pd: Add boolean optimizations.
5664 2018-08-28  Martin Sebor  <msebor@redhat.com>
5666         PR middle-end/86631
5667         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5668         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5669         (pass_walloca::gate): Use it.
5670         (alloca_call_type): Same.
5671         (pass_walloca::execute): Same.
5672         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5674 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
5676         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5677         GCC_VERSION for usage of "__gcc_dump_printf__" format from
5678         >= 3005 to >= 9000.
5680 2018-08-28  Richard Biener  <rguenther@suse.de>
5682         PR tree-optimization/87124
5683         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5684         constants before looking up avail.
5686 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
5688         PR middle-end/87099
5689         * calls.c (maybe_warn_nonstring_arg): Punt early if
5690         warn_stringop_overflow is zero.  Don't call get_range_strlen
5691         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5692         Swap comparison operands to have constants on rhs.  Only use
5693         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
5694         increment lenrng[0].
5696 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
5698         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5699         use of tree_to_shwi.  Remove duplicated test for the size being
5700         a whole number of bytes.
5702 2018-08-28  Richard Biener  <rguenther@suse.de>
5704         PR tree-optimization/87117
5705         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5706         Handle removed stmt without LHS (GIMPLE_NOP).
5708 2018-08-28  Richard Biener  <rguenther@suse.de>
5710         PR tree-optimization/87117
5711         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5712         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5714 2018-08-28  Richard Biener  <rguenther@suse.de>
5716         PR tree-optimization/87117
5717         * tree-ssa-pre.c (compute_avail): Do not make expressions
5718         with predicated values available.
5719         (get_expr_value_id): Assert we do not run into predicated value
5720         expressions.
5722 2018-08-28  Richard Biener  <rguenther@suse.de>
5724         PR tree-optimization/87117
5725         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5726         get virtual operands.
5727         (get_expr_operands): Handle STRING_CST like other decls.
5729 2018-08-28  Martin Liska  <mliska@suse.cz>
5731         * tree.h: Update documentation of fndecl_built_in_p
5732         functions.
5735 2018-08-27  Jeff Law  <law@redhat.com>
5736         PR tree-optimization/87110
5737         * tree-ssa-dse.c (compute_trims): Handle non-constant
5738         TYPE_SIZE_UNIT.
5740 2018-08-27  Martin Sebor  <msebor@redhat.com>
5742         PR tree-optimization/86914
5743         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5745 2018-08-27  Martin Sebor  <msebor@redhat.com>
5747         PR tree-optimization/87112
5748         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5749         the type of the bound argument.
5751 2018-08-27  Jeff Law  <law@redhat.com>
5753         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5754         type does not have a TYPE_SIZE_UNIT.
5756 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
5758         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5759         with include of backend.h.
5761 2018-08-27  Richard Biener  <rguenther@suse.de>
5763         PR tree-optimization/86927
5764         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5765         use const cond reduction code.
5767 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
5769         PR tree-optimization/85758
5770         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5772 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
5774         PR c++/87091
5775         * diagnostic-show-locus.c (class layout_range): Update for
5776         conversion of show_caret_p to a tri-state.
5777         (layout_range::layout_range): Likewise.
5778         (make_range): Likewise.
5779         (layout::maybe_add_location_range): Likewise.
5780         (layout::should_print_annotation_line_p): Don't show annotation
5781         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5782         (layout::get_state_at_point): Update for conversion of
5783         show_caret_p to a tri-state.  Bail out early for
5784         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5785         underlining or source colorization.
5786         (gcc_rich_location::add_location_if_nearby): Update for conversion
5787         of show_caret_p to a tri-state.
5788         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5789         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5790         Likewise.
5791         (selftest::test_one_liner_labels): Likewise.
5792         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5793         conversion of show_caret_p to a tri-state.
5794         * pretty-print.c (text_info::set_location): Likewise.
5795         * pretty-print.h (text_info::set_location): Likewise.
5796         * substring-locations.c (format_warning_n_va): Likewise.
5797         * tree-diagnostic.c (default_tree_printer): Likewise.
5798         * tree-pretty-print.c (newline_and_indent): Likewise.
5800 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
5802         PR c++/87091
5803         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5804         line above for line-insertion fix-it hints.
5805         (selftest::test_fixit_insert_containing_newline): Update the
5806         expected results, and add a test with line-numbering enabled.
5808 2018-08-27  Martin Liska  <mliska@suse.cz>
5810         PR sanitizer/86962
5811         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5812         params with DECL_HAS_VALUE_EXPR_P.
5814 2018-08-27  Martin Liska  <mliska@suse.cz>
5816         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5817         selected expansion strategy.
5819 2018-08-27  Martin Liska  <mliska@suse.cz>
5821         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5822         * builtins.c (is_builtin_fn): Likewise.
5823         * attribs.c (diag_attr_exclusions): Use new function
5824         fndecl_built_in_p and remove check for FUNCTION_DECL if
5825         possible.
5826         (builtin_mathfn_code): Likewise.
5827         (fold_builtin_expect): Likewise.
5828         (fold_call_expr): Likewise.
5829         (fold_builtin_call_array): Likewise.
5830         (fold_call_stmt): Likewise.
5831         (set_builtin_user_assembler_name): Likewise.
5832         (is_simple_builtin): Likewise.
5833         * calls.c (gimple_alloca_call_p): Likewise.
5834         (maybe_warn_nonstring_arg): Likewise.
5835         * cfgexpand.c (expand_call_stmt): Likewise.
5836         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5837         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5838         (cgraph_node::verify_node): Likewise.
5839         * cgraphclones.c (build_function_decl_skip_args): Likewise.
5840         (cgraph_node::create_clone): Likewise.
5841         * config/arm/arm.c (arm_insert_attributes): Likewise.
5842         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5843         * dse.c (scan_insn): Likewise.
5844         * expr.c (expand_expr_real_1): Likewise.
5845         * fold-const.c (operand_equal_p): Likewise.
5846         (fold_binary_loc): Likewise.
5847         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5848         * gimple-low.c (lower_stmt): Likewise.
5849         * gimple-pretty-print.c (dump_gimple_call): Likewise.
5850         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5851         Likewise.
5852         * gimple.c (gimple_build_call_from_tree): Likewise.
5853         (gimple_call_builtin_p): Likewise.
5854         (gimple_call_combined_fn): Likewise.
5855         * gimplify.c (gimplify_call_expr): Likewise.
5856         (gimple_boolify): Likewise.
5857         (gimplify_modify_expr): Likewise.
5858         (gimplify_addr_expr): Likewise.
5859         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5860         * ipa-cp.c (determine_versionability): Likewise.
5861         * ipa-fnsummary.c (compute_fn_summary): Likewise.
5862         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5863         * ipa-split.c (visit_bb): Likewise.
5864         (split_function): Likewise.
5865         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5866         * lto-cgraph.c (input_node): Likewise.
5867         * lto-streamer-out.c (write_symbol): Likewise.
5868         * omp-low.c (setjmp_or_longjmp_p): Likewise.
5869         (lower_omp_1): Likewise.
5870         * predict.c (strip_predict_hints): Likewise.
5871         * print-tree.c (print_node): Likewise.
5872         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5873         * trans-mem.c (is_tm_irrevocable): Likewise.
5874         (is_tm_load): Likewise.
5875         (is_tm_simple_load): Likewise.
5876         (is_tm_store): Likewise.
5877         (is_tm_simple_store): Likewise.
5878         (is_tm_abort): Likewise.
5879         (tm_region_init_1): Likewise.
5880         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5881         * tree-cfg.c (verify_gimple_call): Likewise.
5882         (move_stmt_r): Likewise.
5883         (stmt_can_terminate_bb_p): Likewise.
5884         * tree-eh.c (lower_eh_constructs_2): Likewise.
5885         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5886         * tree-inline.c (remap_gimple_stmt): Likewise.
5887         (copy_bb): Likewise.
5888         (estimate_num_insns): Likewise.
5889         (fold_marked_statements): Likewise.
5890         * tree-sra.c (scan_function): Likewise.
5891         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5892         (optimize_stack_restore): Likewise.
5893         (pass_fold_builtins::execute): Likewise.
5894         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5895         (mark_all_reaching_defs_necessary_1): Likewise.
5896         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5897         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5898         (pass_forwprop::execute): Likewise.
5899         * tree-ssa-loop-im.c (stmt_cost): Likewise.
5900         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5901         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5902         * tree-ssa-strlen.c (get_string_length): Likewise.
5903         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5904         (find_func_aliases_for_call): Likewise.
5905         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5906         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5907         * tree-tailcall.c (find_tail_calls): Likewise.
5908         * tree.c (need_assembler_name_p): Likewise.
5909         (free_lang_data_in_decl): Likewise.
5910         (get_call_combined_fn): Likewise.
5911         * ubsan.c (is_ubsan_builtin_p): Likewise.
5912         * varasm.c (incorporeal_function_p): Likewise.
5913         * tree.h (DECL_BUILT_IN): Remove and replace with
5914         fndecl_built_in_p.
5915         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5916         (fndecl_built_in_p): New.
5918 2018-08-27  Martin Liska  <mliska@suse.cz>
5920         PR tree-optimization/86847
5921         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5922         Dump also subtree probability.
5923         (switch_decision_tree::do_jump_if_equal): New function.
5924         (switch_decision_tree::emit_case_nodes): Handle special
5925         situations in balanced tree that can be emitted much simpler.
5926         Fix calculation of probabilities that happen in tree expansion.
5927         * tree-switch-conversion.h (struct cluster): Add
5928         is_single_value_p.
5929         (struct simple_cluster): Likewise.
5930         (struct case_tree_node): Add new function has_child.
5931         (do_jump_if_equal): New.
5933 2018-08-27  Martin Liska  <mliska@suse.cz>
5935         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
5936         Add new argument to bit_test_cluster constructor.
5937         (bit_test_cluster::emit): Set bits really number of values
5938         handlel by a test.
5939         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
5940         probability argument.
5941         * tree-switch-conversion.h (struct bit_test_cluster):
5942         Add m_handles_entire_switch.
5944 2018-08-27  Martin Liska  <mliska@suse.cz>
5946         PR tree-optimization/86702
5947         * tree-switch-conversion.c (jump_table_cluster::emit):
5948         Make probabilities even for values in jump table
5949         according to number of cases handled.
5950         (switch_decision_tree::compute_cases_per_edge): Pass
5951         argument to reset_out_edges_aux function.
5952         (switch_decision_tree::analyze_switch_statement): Likewise.
5953         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
5954         Make it static.
5956 2018-08-27  Martin Liska  <mliska@suse.cz>
5958         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
5959         cfun argument explicitly.
5960         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
5961         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
5962         function gimple_switch_default_bb.
5963         (convert_switch_statements):
5964         (expand_builtins):
5965         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
5966         * stmt.c (label_to_block_fn): Use label_to_block and pass
5967         cfun argument explicitly and use gimple_switch_label_bb.
5968         (expand_case): Likewise.
5969         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
5970         cfun argument explicitly. Likewise.
5971         (make_edges_bb): Likewise.
5972         (make_cond_expr_edges): Likewise.
5973         (get_cases_for_edge): Likewise.
5974         (make_gimple_switch_edges): Likewise.
5975         (label_to_block_fn): Likewise.
5976         (label_to_block): Likewise.
5977         (make_goto_expr_edges): Likewise.
5978         (make_gimple_asm_edges): Likewise.
5979         (main_block_label): Likewise.
5980         (group_case_labels_stmt): Likewise.
5981         (find_taken_edge_computed_goto): Likewise.
5982         (find_taken_edge_switch_expr): Likewise.
5983         (gimple_verify_flow_info): Likewise.
5984         (gimple_redirect_edge_and_branch): Likewise.
5985         (gimple_switch_label_bb): New function.
5986         (gimple_switch_default_bb): Likewise.
5987         (gimple_switch_edge): Likewise.
5988         (gimple_switch_default_edge): Likewise.
5989         * tree-cfg.h (label_to_block_fn): Remove and replace ...
5990         (label_to_block): ... with this.
5991         (gimple_switch_label_bb): New.
5992         (gimple_switch_default_bb): Likewise.
5993         (gimple_switch_edge): Likewise.
5994         (gimple_switch_default_edge): Likewise.
5995         * tree-cfgcleanup.c (convert_single_case_switch): Use
5996         new gimple functions and pass new argument to label_to_block.
5997         (cleanup_control_flow_bb):
5998         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
5999         cfun argument explicitly.
6000         (make_eh_edges): Likewise.
6001         (redirect_eh_dispatch_edge): Likewise.
6002         (lower_resx): Likewise.
6003         (lower_eh_dispatch): Likewise.
6004         (maybe_remove_unreachable_handlers): Likewise.
6005         (unsplit_eh): Likewise.
6006         (cleanup_empty_eh): Likewise.
6007         (verify_eh_edges): Likewise.
6008         (verify_eh_dispatch_edge): Likewise.
6009         * tree-ssa-dom.c (record_edge_info): Likewise.
6010         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
6011         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
6012         (thread_through_normal_block): Likewise.
6013         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
6014         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
6015         * tree-switch-conversion.c (switch_conversion::collect): Use new
6016         gimple functions.
6017         (switch_conversion::check_final_bb): Likewise.
6018         (switch_conversion::gather_default_values): Pass new argument
6019         to label_to_block.
6020         (switch_conversion::build_constructors): Likewise.
6021         (switch_decision_tree::compute_cases_per_edge): Use new
6022         gimple_switch_edge function.
6023         (switch_decision_tree::analyze_switch_statement): Pass new argument
6024         to label_to_block.
6025         (switch_decision_tree::try_switch_expansion): Use
6026         gimple_switch_default_edge.
6027         * tree-vrp.c (find_switch_asserts): Pass new argument
6028         to label_to_block.
6029         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
6030         (vr_values::simplify_switch_using_ranges): Likewise.
6032 2018-08-27  Richard Biener  <rguenther@suse.de>
6034         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
6035         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
6037         * tree-ssa-sccvn.h (struct vn_pval): New structure.
6038         (struct vn_nary_op_s): Add unwind_to member.  Add
6039         predicated_values flag and put result into a union together
6040         with a linked list of vn_pval.
6041         (struct vn_ssa_aux): Add name member to make maintaining
6042         a map of SSA name to vn_ssa_aux possible.  Remove no longer
6043         needed info, dfsnum, low, visited, on_sccstack, use_processed
6044         and range_info_anti_range_p members.
6045         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
6046         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
6047         New functions.
6048         (vn_valueize): New global.
6049         (vn_context_bb): Likewise.
6050         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
6051         VN_INFO_PTR_INFO): Remove.
6052         * tree-ssa-sccvn.c: ... (rewrite)
6053         (pass_fre::execute): For -O2+ initialize loops and run
6054         RPO VN in optimistic mode (iterating).  For -O1 and -Og
6055         run RPO VN in non-optimistic mode.
6056         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
6057         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
6058         * doc/invoke.texi (sccvn-max-scc-size): Remove.
6059         (rpo-vn-max-loop-depth): Document.
6060         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
6061         when valuezing the VUSE signals we walked out of the region.
6062         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
6063         (phi_translate): Set VN context block to use for availability
6064         lookup.
6065         (compute_avail): Likewise.
6066         (pre_valueize): New function.
6067         (pass_pre::execute): Adjust to the RPO VN API.
6069         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
6070         (propagate_constants_for_unrolling): Remove.
6071         (tree_unroll_loops_completely): Perform value-numbering
6072         on the unrolled bodies loop parent.
6074 2018-08-27  Richard Biener  <rguenther@suse.de>
6076         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
6077         for partial antic compute.
6079 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
6081         PR rtl-optimization/87065
6082         * combine.c (simplify_if_then_else): Formatting fix.
6083         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
6084         check.
6085         (known_cond): Don't return const_true_rtx for vector modes.  Use
6086         CONST0_RTX instead of const0_rtx.  Formatting fixes.
6088 2018-08-27  Martin Liska  <mliska@suse.cz>
6090         PR gcov-profile/87069
6091         * gcov.c (process_file): Record files already processed
6092         and warn about a file being processed multiple times.
6094 2018-08-27  Martin Liska  <mliska@suse.cz>
6096         PR driver/83193
6097         * config/aarch64/aarch64.c (aarch64_override_options_internal):
6098         Set default values for x_aarch64_*_string strings.
6099         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
6100         prefix.  For -mabi do not print '=ABI' in help and use
6101         <option_value> format for -msve-vector-bits and -moverride
6102         options.
6104 2018-08-26  Jeff Law  <law@redhat.com>
6106         * config/mips/frame-header-opt.c: Include "backend.h" rather than
6107         "cfg.h"
6109 2018-08-26  Marek Polacek  <polacek@redhat.com>
6111         PR c++/87029, Implement -Wredundant-move.
6112         * doc/invoke.texi: Document -Wredundant-move.
6114 2018-08-25  Martin Sebor  <msebor@redhat.com>
6116         PR tree-optimization/87059
6117         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
6118         to the same type as the other.
6119         * fold-const.c (fold_binary_loc): Assert expectation.
6121 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
6123         * config/darwin.c (machopic_legitimize_pic_address): Clean up
6124         extraneous parentheses, dead code section and formatting.
6126 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
6128         PR c++/87091
6129         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
6130         wide enough for jumps in the line-numbering to be visible.
6131         (layout::print_gap_in_line_numbering): New member function.
6132         (layout::calculate_line_spans): When using line numbering, merge
6133         line spans that are only 1 line apart.
6134         (diagnostic_show_locus): When printing line numbers, show gaps in
6135         line numbering directly, rather than printing headers.
6136         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
6137         line-numbering with multiple line spans.
6138         (selftest::test_fixit_insert_containing_newline_2): Add test of
6139         line-numbering, in which the spans are close enough to be merged.
6141 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
6143         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
6144         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
6145         * tree-vrp.c (range_is_nonnull): Remove.
6146         (range_includes_zero_p): Accept value_range instead of min/max.
6147         (extract_range_from_binary_expr_1): Do not early bail on
6148         POINTER_PLUS_EXPR.
6149         Use range_includes_zero_p instead of range_is_nonnull.
6150         (extract_range_from_unary_expr): Use range_includes_zero_p instead
6151         of range_is_nonnull.
6152         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
6153         special case VR_ANTI_RANGE.
6154         (vrp_finalize): Same.
6155         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
6156         instead of min/max.
6157         (range_is_nonnull): Remove.
6158         * vr-values.c (vrp_stmt_computes_nonzero): Use
6159         range_includes_zero_p instead of range_is_nonnull.
6160         (extract_range_basic): Pass value_range to range_includes_zero_p
6161         instead of range_is_nonnull.
6163 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
6165         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
6166         * emit-rtl.h (rtl_data): Remove return_bnd.
6167         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
6168         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
6169         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
6170         (POINTER_BOUNDS_MODE): Remove definition.
6171         (make_pointer_bounds_mode): Remove.
6172         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
6173         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
6174         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
6175         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
6176         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
6177         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
6178         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
6180         * config/i386/i386-modes.def (BND32, BND64): Remove.
6181         * config/i386/i386.c (dbx_register_map): Remove bound registers.
6182         (dbx64_register_map): Ditto.
6183         (svr4_dbx_register_map): Ditto.
6184         (indirect_thunk_bnd_needed): Remove.
6185         (indirect_thunks_bnd_used): Ditto.
6186         (indirect_return_bnd_needed): Ditto.
6187         (indirect_return_via_cx_bnd): Ditto.
6188         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
6189         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
6190         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
6191         (output_indirect_thunk_function): Remove handling of
6192         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
6193         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
6194         (ix86_save_reg): Remove handling of crtl->return_bnd.
6195         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
6196         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
6197         and UNSPEC_BNDLX_ADDR.
6198         (ix86_output_indirect_branch_via_reg): Remove handling of
6199         indirect_thunk_prefix_bnd.
6200         (ix86_output_indirect_branch_via_push): Ditto.
6201         (ix86_output_function_return): Ditto.
6202         (ix86_output_indirect_function_return): Ditto.
6203         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
6204         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
6205         (CALL_USED_REGISTERS): Ditto.
6206         (REG_ALLOC_ORDER): Update for removal of bound registers.
6207         (HI_REGISTER_NAMES): Ditto.
6208         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
6209         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
6210         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6211         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6212         (FIRST_PSEUDO_REG): Update.
6213         (BND): Remove mode iterator.
6214         * config/i386/predicates.md (bnd_mem_operator): Remove.
6216 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
6218         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6219         vectors.
6221 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
6223         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6224         the case in which the permute needs only a single element and
6225         repeats for every vector of the result.  Extend that case to
6226         handle variable-length vectors.
6227         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6229 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
6231         PR debug/79342
6232         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6233         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6235 2018-08-24  Richard Biener  <rguenther@suse.de>
6237         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6238         bb_flags_allocated members.
6239         (auto_flag): New RAII class for allocating flags.
6240         (auto_edge_flag): New RAII class for allocating edge flags.
6241         (auto_bb_flag): New RAII class for allocating bb flags.
6242         * cfgloop.c (verify_loop_structure): Allocate temporary edge
6243         flag dynamically.
6244         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6245         in favor of temporarily allocated BB flag.
6246         * hsa-brig.c: Re-order includes.
6247         * hsa-dump.c: Likewise.
6248         * hsa-regalloc.c: Likewise.
6249         * print-rtl.c: Likewise.
6250         * profile-count.c: Likewise.
6252 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
6254         PR target/86989
6255         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6256         the TOC register.
6258 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
6260         PR 87073/bootstrap
6261         * wide-int-range.cc (wide_int_range_div): Do not ignore result
6262         from wide_int_range_multiplicative_op.
6264 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6266         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6267         "permutaion".
6269 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
6271         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6272         to 'expanded'.
6274 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
6276         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6277         full GENERIC expression used for replacement.
6279 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
6281         * tree-vrp.c (abs_extent_range): Remove.
6282         (extract_range_into_wide_ints): Pass wide ints by reference.
6283         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6284         Pass wide ints by reference in all calls to
6285         extract_range_into_wide_ints.
6286         * wide-int-range.cc (wide_int_range_div): New.
6287         * wide-int-range.h (wide_int_range_div): New.
6288         (wide_int_range_includes_zero_p): New.
6289         (wide_int_range_zero_p): New.
6291 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
6293         * config/aarch64/aarch64.md (arches): New enum.
6294         (arch): New enum attr.
6295         (arch_enabled): New attr.
6296         (enabled): Now uses arch_enabled only.
6297         (simd, sve, fp16): Removed attribute.
6298         (fp): Attr now defined in terms of 'arch'.
6299         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6300         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6301         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6302         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6303         attributes into 'arch'.
6304         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6305         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6306         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6307         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6308         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6309         'simd' attribute into 'arch'.
6310         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6311         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6312         Convert use of 'fp' attribute to 'arch'.
6313         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6314         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6315         into 'arch'.
6316         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6317         (different modes) Merge 'fp' and 'simd' into 'arch'.
6318         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6319         'simd' into 'arch'.
6321 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
6323         PR rtl-optimization/87026
6324         * expmed.c (canonicalize_comparison): If we can no longer create
6325         pseudoregisters, don't.
6327 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
6329         PR target/86951
6330         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6331         prototype.
6332         * config/arm/arm.c (speculation_barrier_libfunc): New static
6333         variable.
6334         (arm_init_libfuncs): Initialize it.
6335         (arm_emit_speculation_barrier): New function.
6336         * config/arm/arm.md (speculation_barrier): Call
6337         arm_emit_speculation_barrier for architectures that do not have
6338         DSB or ISB.
6339         (speculation_barrier_insn): Only match on Armv7 or later.
6341 2018-08-23  Richard Biener  <rguenther@suse.de>
6343         PR middle-end/87024
6344         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6345         calls.
6347 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
6349         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6350         of single-vector TBLs.
6351         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6352         one input is given.
6354 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
6356         PR target/85910
6357         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6358         aarch64_evpc_tbl guard.
6360 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6362         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6363         behaviour.
6365 2018-08-22  Martin Sebor  <msebor@redhat.com>
6367         PR middle-end/87052
6368         * tree-pretty-print.c (pretty_print_string): Add argument.
6369         (dump_generic_node): Call to pretty_print_string with string size.
6371 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
6373         PR rtl-optimization/86771
6374         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6375         of two SETs into those two SETs, one to be placed at i2, if that SETs
6376         destination is modified between i2 and i3.
6378 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
6380         PR tree-optimization/86725
6381         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6382         function.
6383         (vect_analyze_scalar_cycles_1): Check it.
6385 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
6387         PR tree-optimization/86725
6388         * tree-vect-loop.c (vect_is_simple_reduction): When treating
6389         an outer loop phi as a double reduction, make sure that the
6390         single user of the phi result is an inner loop phi.
6392 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
6394         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6395         grouped stores with gaps to a strided group.
6397 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
6399         * tree-vect-stmts.c (get_group_load_store_type)
6400         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6401         first statement in a group.
6403 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6405         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6406         the sequence used in gcc/gcc.c.
6408 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6410         PR other/704
6411         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6412         building it.
6414 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6416         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6417         Darwin10-specific unwinder-shim.
6418         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6419         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6420         New to cater for Darwin10 Rosetta.
6422 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6424         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6425         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6427 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
6429         PR bootstrap/81033
6430         PR target/81733
6431         PR target/52795
6432         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6433         (dwarf2out_switch_text_section): Generate a local label for the
6434         second function sub-section and apply it as the second FDE start
6435         label.
6436         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6437         second sub-section start.
6439 2018-08-22  Richard Biener  <rguenther@suse.de>
6441         PR tree-optimization/86988
6442         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6444 2018-08-22  Richard Biener  <rguenther@suse.de>
6446         PR tree-optimization/86945
6447         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6449 2018-08-22  Alexandre Oliva <oliva@adacore.com>
6451         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6452         a comment about how uses of r2 for .sdata2 come about.
6454 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
6456         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6458 2018-08-21  Marek Polacek  <polacek@redhat.com>
6460         PR c++/86981, Implement -Wpessimizing-move.
6461         * doc/invoke.texi: Document -Wpessimizing-move.
6463 2018-08-21  Jan Hubicka  <jh@suse.cz>
6465         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6466         * tree.h (is_redundant_typedef): Remove.
6467         * dwarf2out.c (is_redundant_typedef): Turn into static function.
6469 2018-08-21  Jan Hubicka  <jh@suse.cz>
6471         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6472         when possible.
6474 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
6476         * expmed.c (extract_low_bits): Reject invalid subregs early.
6478 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6480         PR middle-end/86121
6481         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6482         behaviour.
6484 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6486         * config/vxworks.h: Guard vxworks_asm_out_constructor and
6487         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6488         * config/vxworks.c: Likewise.
6490 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6492         * config/vxworks.c: Set targetm.have_ctors_dtors
6493         if HAVE_INITFINI_ARRAY_SUPPORT.
6494         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6495         if HAVE_INITFINI_ARRAY_SUPPORT.
6497 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
6499         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6500         default search path for VxWorks < 7.
6502 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6504         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6505         (get_format_string): Refer to c_getstr.
6507 2018-08-21  Tom de Vries  <tdevries@suse.de>
6509         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6510         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6511         (debuginfo_early_stop): Declare.
6512         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6513         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6514         (debuginfo_early_stop): New function.
6515         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6516         and debuginfo_early_stop.
6517         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6518         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6519         (general_init): Call debuginfo_early_init.
6520         (finalize): Call debuginfo_fini.
6521         (do_compile): Call debuginfo_init.
6522         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6523         -fdump-early-debug.
6524         (@item -fdump-debug, @item -fdump-earlydebug): Add.
6526 2018-08-21  Tom de Vries  <tdevries@suse.de>
6528         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6529         flag_dump_noaddr and flag_dump_unnumbered.
6531 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
6533         * wide-int-range.cc (wide_int_range_abs): New.
6534         (wide_int_range_order_set): Rename from wide_int_range_min_max.
6535         * wide-int-range.h (wide_int_range_abs): New.
6536         (wide_int_range_min_max): New.
6537         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6538         case to call wide_int_range_abs.
6539         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6540         (extract_range_from_abs_expr): Delete.
6542 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
6544         PR target/87033
6545         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6546         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6547         for indexed loads.
6549 2018-08-20  Nathan Sidwell  <nathan@acm.org>
6550             Jeff Law <law@redhat.com>
6552         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6553         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6555 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
6557         PR other/84889
6558         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6559         (decl_attributes): Likewise.
6560         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6561         instance.
6562         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6563         * diagnostic-core.h (class auto_diagnostic_group): New class.
6564         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6565         (diagnostic_report_diagnostic): Handle the first diagnostics within
6566         a group.
6567         (emit_diagnostic): Add auto_diagnostic_group instance.
6568         (inform): Likewise.
6569         (inform_n): Likewise.
6570         (warning): Likewise.
6571         (warning_at): Likewise.
6572         (warning_n): Likewise.
6573         (pedwarn): Likewise.
6574         (permerror): Likewise.
6575         (error): Likewise.
6576         (error_n): Likewise.
6577         (error_at): Likewise.
6578         (sorry): Likewise.
6579         (fatal_error): Likewise.
6580         (internal_error): Likewise.
6581         (internal_error_no_backtrace): Likewise.
6582         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6583         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6584         * diagnostic.h (struct diagnostic_context): Add fields
6585         "diagnostic_group_nesting_depth",
6586         "diagnostic_group_emission_count", "begin_group_cb",
6587         "end_group_cb".
6588         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6589         Add auto_diagnostic_group instance(s).
6590         (find_explicit_erroneous_behavior): Likewise.
6591         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6592         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6593         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6594         (gimplify_va_arg_expr): Likewise.
6595         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6596         (HSA_SORRY_AT): Likewise.
6597         * ipa-devirt.c (compare_virtual_tables): Likewise.
6598         (warn_odr): Likewise.
6599         * multiple_target.c (expand_target_clones): Likewise.
6600         * opts-common.c (cmdline_handle_error): Likewise.
6601         * reginfo.c (globalize_reg): Likewise.
6602         * substring-locations.c (format_warning_n_va): Likewise.
6603         * tree-inline.c (expand_call_inline): Likewise.
6604         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6605         * tree-ssa-loop-niter.c
6606         (do_warn_aggressive_loop_optimizations): Likewise.
6607         * tree-ssa-uninit.c (warn_uninit): Likewise.
6608         * tree.c (warn_deprecated_use): Likewise.
6610 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
6612         PR target/87014
6613         * config/i386/i386.md (eh_return): Always update EH return
6614         address in word_mode.
6616 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
6618         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6619         TARGET_SPLIT_COMPLEX_ARG is defined.
6621 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6623         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6625 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6627         PR target/86984
6628         * expr.c (expand_assignment): Assert that bitpos is positive.
6629         (store_field): Likewise
6630         (expand_expr_real_1): Make sure that bitpos is positive.
6631         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6632         integer overflow.
6634 2018-08-20  Nathan Sidwell  <nathan@acm.org>
6636         * Makefile.in (CPP_ID_DATA_H): Delete.
6637         (CPP_INTERNAL_H): Don't add it.
6638         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6639         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6641 2018-08-20  Richard Biener  <rguenther@suse.de>
6643         PR tree-optimization/78655
6644         * tree-vrp.c (extract_range_from_binary_expr_1): Make
6645         pointer + offset nonnull if either operand is nonnull work.
6647 2018-08-20  Tom de Vries  <tdevries@suse.de>
6649         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6650         unless the referenced die describes the added property using
6651         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
6652         Otherwise, add a DW_AT_location to the referenced die.
6654 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
6656         PR target/86994
6657         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6658         register_operand when calling ix86_set_reg_reg_cost.
6659         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6660         Set *total to 0 for operands that satisfy x86_64_immediate_operand
6661         predicate and to 1 otherwise.
6663 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
6665         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6666         emit a diagnostic that it is not supported and reset the option.
6667         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6668         supported and consume the option.  (ASM_FINAL_SPEC): New.
6670 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
6672         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6673         a sentence.
6675 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
6677         C-SKY port: Documentation
6679         * doc/extend.texi (C-SKY Function Attributes): New section.
6680         * doc/invoke.texi (Option Summary): Add C-SKY options.
6681         (C-SKY Options): New section.
6682         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6684 2018-08-17  Jojo  <jijie_rong@c-sky.com>
6685             Huibin Wang  <huibin_wang@c-sky.com>
6686             Sandra Loosemore  <sandra@codesourcery.com>
6687             Chung-Lin Tang  <cltang@codesourcery.com>
6689         C-SKY port: Backend implementation
6691         * config/csky/*: New.
6692         * common/config/csky/*: New.
6694 2018-08-17  Jojo  <jijie_rong@c-sky.com>
6695             Huibin Wang  <huibin_wang@c-sky.com>
6696             Sandra Loosemore  <sandra@codesourcery.com>
6697             Chung-Lin Tang  <cltang@codesourcery.com>
6698             Andrew Jenner  <andrew@codesourcery.com>
6700         C-SKY port: Configury
6702         * config.gcc (csky-*-*): New.
6703         * configure.ac: Add csky to targets for dwarf2 debug_line support.
6704         * configure: Regenerated.
6706 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
6708         * dump-context.h: Include "dumpfile.h".
6709         (dump_context::dump_printf_va): Convert final param from va_list
6710         to va_list *.  Convert from ATTRIBUTE_PRINTF to
6711         ATTRIBUTE_GCC_DUMP_PRINTF.
6712         (dump_context::dump_printf_loc_va): Likewise.
6713         * dumpfile.c: Include "stringpool.h".
6714         (make_item_for_dump_printf_va): Delete.
6715         (make_item_for_dump_printf): Delete.
6716         (class dump_pretty_printer): New class.
6717         (dump_pretty_printer::dump_pretty_printer): New ctor.
6718         (dump_pretty_printer::emit_items): New member function.
6719         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6720         function.
6721         (dump_pretty_printer::emit_item): New member function.
6722         (dump_pretty_printer::stash_item): New member function.
6723         (dump_pretty_printer::format_decoder_cb): New member function.
6724         (dump_pretty_printer::decode_format): New member function.
6725         (dump_context::dump_printf_va): Reimplement in terms of
6726         dump_pretty_printer.
6727         (dump_context::dump_printf_loc_va): Convert final param from va_list
6728         to va_list *.
6729         (dump_context::begin_scope): Reimplement call to
6730         make_item_for_dump_printf.
6731         (dump_printf): Update for change to dump_printf_va.
6732         (dump_printf_loc): Likewise.
6733         (selftest::test_capture_of_dump_calls): Convert "stmt" from
6734         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
6735         with %T, %E, and %G.
6736         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6737         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6738         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6739         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6740         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6741         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6742         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6743         within a dump_printf_loc call to "%wu".
6744         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6745         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
6746         missing space after "=".
6747         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6748         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6749         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6750         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6751         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
6752         duplicate "vectorized" from message.
6754 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
6756         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6757         polyNxK_t element's TYPE_STRING_FLAG.
6759 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
6761         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6762         (they were unnamed before).  Fix comments.
6764 2018-08-17  Nathan Sidwell  <nathan@acm.org>
6766         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6768 2018-08-17  Richard Biener  <rguenther@suse.de>
6770         PR tree-optimization/86841
6771         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6773 2018-08-17  Martin Liska  <mliska@suse.cz>
6775         * common.opt: Remove Warn, Init and Report for options with
6776         Ignore/Deprecated flag. Warning is done automatically for
6777         Deprecated flags.
6778         * config/i386/i386.opt: Likewise.
6779         * config/ia64/ia64.opt: Likewise.
6780         * config/rs6000/rs6000.opt: Likewise.
6781         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6782         Remove usage of flag_check_pointer_bounds.
6783         * lto-wrapper.c (merge_and_complain): Do not handle
6784         OPT_fcheck_pointer_bounds.
6785         (append_compiler_options): Likewise.
6786         * opt-functions.awk: Do not handle Deprecated.
6787         * optc-gen.awk: Check that Var, Report and Init are not
6788         used for an option with Ignore/Deprecated flag.
6789         * opts-common.c (decode_cmdline_option): Do not report
6790         CL_ERR_DEPRECATED.
6791         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6792         options.
6793         * opts.h (struct cl_option): Remove cl_deprecated flag.
6794         (CL_ERR_DEPRECATED): Remove error enum value.
6796 2018-08-17  Richard Biener  <rguenther@suse.de>
6798         PR middle-end/86505
6799         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6800         across a va-arg-pack using call adjust its return value accordingly.
6802 2018-08-16  Martin Sebor  <msebor@redhat.com>
6804         PR tree-optimization/86853
6805         * gimple-ssa-sprintf.c (struct format_result): Rename member.
6806         (struct fmtresult): Add member and initialize it in ctors.
6807         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
6808         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
6809         (format_directive): Set POSUNDER4K when MAYFAIL is set.
6810         (parse_directive): Handle %C same as %c.
6811         (sprintf_dom_walker::compute_format_length): Adjust.
6812         (is_call_safe): Adjust.
6814 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6816         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
6817         for determining how to count the elements.
6818         * builtins.h (c_strlen): Adjust prototype.
6819         * expr.c (string_constant): Add new parameter mem_size.
6820         Set *mem_size appropriately.
6821         * expr.h (string_constant): Adjust protoype.
6822         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6823         * gimple-fold.h (get_range_strlen): Adjust prototype.
6824         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6825         (format_string): Call get_string_length with eltsize.
6827 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
6829         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6830         to emit the span, rather than setting it as the prefix.
6832 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
6834         * diagnostic-show-locus.c (layout::start_annotation_line): Add
6835         "margin_char" parameter, defaulting to space.  Use it in place
6836         of pp_space for the initial part of the margin.
6837         (layout::print_leading_fixits): Use '+' when filling the margin
6838         of line-insertion fix-it hints.
6840 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6842         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6843         Delete.
6845 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6847         * config/rs6000/altivec.md: Don't set length attribute to the default
6848         value.
6849         * config/rs6000/darwin.md: Ditto.
6850         * config/rs6000/dfp.md: Ditto.
6851         * config/rs6000/htm.md: Ditto.
6852         * config/rs6000/rs6000.md: Ditto.
6853         * config/rs6000/sync.md: Ditto.
6854         * config/rs6000/vsx.md: Ditto.
6856 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6858         * config/rs6000/altivec.md: Don't set length attribute to the default
6859         value, for branch instructions.
6860         * config/rs6000/darwin.md: Ditto.
6861         * config/rs6000/rs6000.md: Ditto.
6863 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
6865         * config/rs6000/rs6000.md (length): Always define as const_int 4.
6866         (unnamed conditional branch define_insn): Set length to 4 or 8
6867         depending on offset.
6868         (<bd>_<mode>): Similar, for alternative 0.
6869         (<bd>tf_<mode>): Ditto.
6871 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6873         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6875 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
6877         * doc/rtl.texi: Replace old RTX class names with new names.
6880 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
6882         * expmed.h (canonicalize_comparison): New declaration.
6883         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6884         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6885         * optabs.c (prepare_cmp_insn): Likewise.
6886         * rtl.h (unsigned_condition_p): New function which checks if a
6887         comparison operator is unsigned.
6889 2018-08-16  Nathan Sidwell  <nathan@acm.org>
6891         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6892         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6894 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6896         PR target/84711
6897         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6898         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6899         (mov<mov>): ..this and enable unconditionally.
6901 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
6903         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6905 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
6907         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6908         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6909         "Common" with "Target".
6911 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
6913         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6914         * doc/invoke.texi (mmitigate-rop): Remove.
6915         * config/i386/i386.c: Do not include "regrename.h".
6916         (ix86_rop_should_change_byte_p, reg_encoded_number)
6917         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6918         Remove.
6919         (ix86_reorg): Remove call to ix86_mitigate_rop.
6920         * config/i386/i386.md (attr "modrm_class"): Remove.
6921         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6922         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6923         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6925 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
6927         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6928         allow folding of mergeh() and mergel() for the float and double types.
6929         (fold_mergehl_helper): Rework to handle building a permute tree
6930         for float vectors.
6932 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
6934         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
6935         for TARGET_SSE.
6937 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
6939         * common.opt (fdiagnostics-show-labels): New option.
6940         * diagnostic-show-locus.c (class layout_range): Add field
6941         "m_label".
6942         (class layout): Add field "m_show_labels_p".
6943         (layout_range::layout_range): Add param "label" and use it to
6944         initialize m_label.
6945         (make_range): Pass in NULL for new "label" param of layout_range's
6946         ctor.
6947         (layout::layout): Initialize m_show_labels_p.
6948         (layout::maybe_add_location_range): Pass in loc_range->m_label
6949         when constructing layout_range instances.
6950         (struct line_label): New struct.
6951         (layout::print_any_labels): New member function.
6952         (layout::print_line): Call it if label-printing is enabled.
6953         (selftest::test_one_liner_labels): New test.
6954         (selftest::test_diagnostic_show_locus_one_liner): Call it.
6955         * diagnostic.c (diagnostic_initialize): Initialize
6956         context->show_labels_p.
6957         * diagnostic.h (struct diagnostic_context): Add field
6958         "show_labels_p".
6959         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6960         -fno-diagnostics-show-labels.
6961         * dwarf2out.c (gen_producer_string): Add
6962         OPT_fdiagnostics_show_labels to the ignored options.
6963         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
6964         param.
6965         (gcc_rich_location::maybe_add_expr): Likewise.
6966         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
6967         label" param, defaulting to NULL.
6968         (gcc_rich_location::add_expr): Add "label" param.
6969         (gcc_rich_location::maybe_add_expr): Likewise.
6970         (class text_range_label): New class.
6971         (class range_label_for_type_mismatch): New class.
6972         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
6973         of format_warning_va.
6974         (fmtwarn_n): Likewise for new params of format_warning_n_va.
6975         * lto-wrapper.c (merge_and_complain): Add
6976         OPT_fdiagnostics_show_labels to the "pick one setting" options.
6977         (append_compiler_options): Likewise to the dropped options.
6978         (append_diag_options): Likewise to the passed-on options.
6979         * opts.c (common_handle_option): Handle the new option.
6980         * selftest-diagnostic.c
6981         (test_diagnostic_context::test_diagnostic_context): Enable
6982         show_labels_p.
6983         * substring-locations.c: Include "gcc-rich-location.h".
6984         (format_warning_n_va): Add "fmt_label" and "param_label" params
6985         and use them as appropriate.
6986         (format_warning_va): Add "fmt_label" and "param_label" params,
6987         passing them on to format_warning_n_va.
6988         (format_warning_at_substring): Likewise.
6989         (format_warning_at_substring_n): Likewise.
6990         * substring-locations.h (format_warning_va): Add "fmt_label" and
6991         "param_label" params.
6992         (format_warning_n_va): Likewise.
6993         (format_warning_at_substring): Likewise.
6994         (format_warning_at_substring_n): Likewise.
6995         * toplev.c (general_init): Initialize global_dc->show_labels_p.
6997 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
6999         PR testsuite/86519
7000         * builtins.c (expand_builtin_memcmp): Do not expand the call
7001         when overflow is detected.
7003 2018-08-15  Martin Sebor  <msebor@redhat.com>
7005         PR tree-optimization/71625
7006         * config/aarch64/aarch64-builtins.c
7007         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
7009 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
7011         * config/s390/s390.c (s390_reorg): Remove loop.
7013 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
7015         * config/darwin.c
7016          (darwin_function_switched_text_sections): Delete.
7017         * gcc/config/darwin.h
7018          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
7020 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
7022         PR target/81685
7023         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
7024         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
7025         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
7027 2018-08-15  Martin Liska  <mliska@suse.cz>
7029         PR tree-optimization/86925
7030         * predict.c (expr_expected_value_1): When taking
7031         later predictor, assign also probability.
7032         Use fold_build2_initializer_loc in order to fold
7033         the expression in -frounding-math.
7035 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
7037         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
7038         patterns.
7039         (expand_vec_perm_1): Try the new method.
7041 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
7043         PR target/86547
7044         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
7045         Check whether lra_live_max_point is 0 before dividing.
7047 2018-08-14  Martin Sebor  <msebor@redhat.com>
7049         PR tree-optimization/86650
7050         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
7051         (vrp_prop::check_mem_ref): Same.
7053 2018-08-13  Liu Hao <lh_mouse@126.com>
7055         * pretty-print.c (eat_esc_sequence): Swap the foreground and
7056         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
7057         and clear it thereafter, as it only works for DBCS.
7059 2018-08-13  Liu Hao <lh_mouse@126.com>
7061         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
7062         handle returned by _get_osf_handle().
7064 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
7066         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
7067         for folding vec_perm.
7069 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
7071         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
7072         Add support for gimple-folding of vec_pack() and vec_unpack()
7073         intrinsics.
7075 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
7077         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
7078         vec_xst variants to the list.
7079         (rs6000_gimple_fold_builtin): Add support for folding unaligned
7080         vector loads and stores.
7082 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
7084         * config.gcc (rs6000-ibm-aix4.x): Delete.
7085         (rs6000-ibm-aix5.1): Delete.
7086         (rs6000-ibm-aix5.2): Delete.
7087         (rs6000-ibm-aix5.3): Delete.
7088         * config/rs6000/aix43.h: Delete.
7089         * config/rs6000/aix51.h: Delete.
7090         * config/rs6000/aix52.h: Delete.
7091         * config/rs6000/t-aix43: Delete.
7093 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
7095         * config/s390/s390.c (s390_decompose_constant_pool_ref):
7096         New function.
7097         (s390_decompose_address): Factor out constant pool ref
7098         decomposition.
7100 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7102         * config/nds32/nds32-predicates.c
7103         (nds32_can_use_bclr_p): Change return type as bool.
7104         (nds32_can_use_bset_p): Ditto.
7105         (nds32_can_use_btgl_p): Ditto.
7106         (nds32_can_use_bitci_p): Ditto.
7107         * config/nds32/nds32-protos.h
7108         (nds32_can_use_bclr_p): Change declaration.
7109         (nds32_can_use_bset_p): Ditto.
7110         (nds32_can_use_btgl_p): Ditto.
7111         (nds32_can_use_bitci_p): Ditto.
7113 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7115         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
7116         Support -msched-prolog-epilog option.
7117         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
7119 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7121         * common/config/nds32/nds32-common.c
7122         (nds32_option_optimization_table): Enalbe -malways-align.
7124 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7126         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
7127         extra_headers.
7128         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
7129         OPT_misr_secure_ case.
7130         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
7131         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
7132         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
7133         secure attribute.
7134         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
7135         (nds32_isr_info): New field security_level.
7136         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
7137         * config/nds32/nds32.md (return_internal): Consider critical attribute.
7138         * config/nds32/nds32.opt (misr-secure): New option.
7139         * config/nds32/nds32_init.inc: New file.
7140         * config/nds32/nds32_isr.h: New file.
7142 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
7144         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
7145         Update comment for atomic instructions.
7146         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
7147         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
7148         Remove.
7149         (atomic_loaddi): Revise fence expansion to only emit fence prior to
7150         load for __ATOMIC_SEQ_CST model.
7151         (atomic_loaddi_1): Remove float register target.
7152         (atomic_storedi): Handle CONST_INT values.
7153         (atomic_storedi_1): Remove float register source.  Add special case
7154         for zero value.
7155         (memory_barrier): New expander and insn.
7157 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
7159         PR tree-optimization/86835
7160         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
7161         new_stmt after def_gsi, make sure to insert new_square_stmt after
7162         that stmt, not 2 stmts before it.
7164 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
7166         PR target/82418
7167         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
7168         instead of SWI48.
7170 2018-08-10  Martin Liska  <mliska@suse.cz>
7172         PR target/83610
7173         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
7174         function type.
7175         * builtins.c (expand_builtin_expect_with_probability):
7176         New function.
7177         (expand_builtin_expect_with_probability): New function.
7178         (build_builtin_expect_predicate): Add new argumnet probability
7179         for BUILT_IN_EXPECT_WITH_PROBABILITY.
7180         (fold_builtin_expect):
7181         (fold_builtin_2):
7182         (fold_builtin_3):
7183         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
7184         * builtins.h (fold_builtin_expect): Set new argument.
7185         * doc/extend.texi: Document __builtin_expect_with_probability.
7186         * doc/invoke.texi: Likewise.
7187         * gimple-fold.c (gimple_fold_call): Pass new argument.
7188         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
7189         also BUILT_IN_EXPECT_WITH_PROBABILITY.
7190         * predict.c (get_predictor_value): New function.
7191         (expr_expected_value): Add new argument probability. Assume
7192         that predictor and probability are always non-null.
7193         (expr_expected_value_1): Likewise.  For __builtin_expect and
7194         __builtin_expect_with_probability set probability.  Handle
7195         combination in binary expressions.
7196         (tree_predict_by_opcode): Simplify code by simply calling
7197         get_predictor_value.
7198         (pass_strip_predict_hints::execute): Add handling of
7199         BUILT_IN_EXPECT_WITH_PROBABILITY.
7200         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
7201         new predictor.
7202         * tree.h (DECL_BUILT_IN_P): New function.
7204 2018-08-10  Martin Liska  <mliska@suse.cz>
7206         PR tree-optimization/85799
7207         * passes.def: Add argument for pass_strip_predict_hints.
7208         * predict.c (class pass_strip_predict_hints): Add new argument
7209         early_p.
7210         (strip_predictor_early): New function.
7211         (pass_strip_predict_hints::execute): Call the function to
7212         strip predictors.
7213         (strip_predict_hints): New function.
7214         * predict.def: Fix comment.
7216 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
7218         * Makefile.in: Clarify which tm.texi to copy over to assert the
7219         right to grant a GFDL license for all.
7221 2018-08-09  Jeff Law  <law@redhat.com>
7223         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7224         unused variable.
7226 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
7228         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7229         prototype.
7231 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
7233         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7234         reductions for variable-length vectors.
7236 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
7238         PR other/84889
7239         * common.opt (fdiagnostics-show-line-numbers): New option.
7240         * diagnostic-show-locus.c (class layout): Add fields
7241         "m_show_line_numbers_p" and "m_linenum_width";
7242         (num_digits): New function.
7243         (test_num_digits): New function.
7244         (layout::layout): Initialize new fields.  Update m_x_offset
7245         logic to handle any left margin.
7246         (layout::print_source_line): Print line number when requested.
7247         (layout::start_annotation_line): New member function.
7248         (layout::print_annotation_line): Call it.
7249         (layout::print_leading_fixits): Likewise.
7250         (layout::print_trailing_fixits): Likewise.  Update calls to
7251         move_to_column for new parameter.
7252         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7253         it to potentially call start_annotation_line.
7254         (layout::show_ruler): Call start_annotation_line.
7255         (selftest::test_line_numbers_multiline_range): New selftest.
7256         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7257         and selftest::test_line_numbers_multiline_range.
7258         * diagnostic.c (diagnostic_initialize): Initialize
7259         show_line_numbers_p.
7260         * diagnostic.h (struct diagnostic_context): Add field
7261         "show_line_numbers_p".
7262         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7263         -fno-diagnostics-show-line-numbers.
7264         * dwarf2out.c (gen_producer_string): Add
7265         OPT_fdiagnostics_show_line_numbers to the ignored options.
7266         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7267         one setting" options.
7268         (append_compiler_options): Likewise to the dropped options.
7269         (append_diag_options): Likewise to the passed-on options.
7270         * opts.c (common_handle_option): Handle the new option.
7271         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7273 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7275         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7276         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
7277         third argument of type "const signed char" to descriptions of
7278         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7279         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7280         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7281         __builtin_bcdsub_ov functions.
7283 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
7285         PR tree-optimization/86858
7286         * tree-vect-loop.c (vect_is_simple_reduction): Restore
7287         flow_bb_inside_loop_p calls.
7289 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
7291         PR tree-optimization/86871
7292         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7293         instead of gimple_assign_lhs.
7295 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
7297         PR target/86887
7298         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7299         register constraint to operand 0.
7300         (add<mode>3_carryinC): Likewise.
7301         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7303 2018-08-09  Martin Liska  <mliska@suse.cz>
7305         PR c/86895
7306         * common.opt: Remove extra line.
7308 2018-08-09  Martin Liska  <mliska@suse.cz>
7310         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7311         at the end of a line, make first letter capital and end up
7312         a sentence with a dot.
7313         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7314         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7315         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7316         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7317         (PARAM_MAX_ISL_OPERATIONS): Likewise.
7318         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7319         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7320         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7321         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7322         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7323         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7324         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7325         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7326         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7327         (PARAM_TREE_REASSOC_WIDTH): Likewise.
7328         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7329         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7330         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7332 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
7334         PR target/84332
7335         * config/s390/s390.c (s390_option_override_internal): Reduce the
7336         stack-clash-protection-probe-interval param if it would be too big
7337         for z900.
7339 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
7341         PR target/46179
7342         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7343         * config/m68k/m68k.c (handle_move_double): Don't call
7344         m68k_final_prescan_insn.
7345         (m68k_adjust_decorated_operand): Renamed from
7346         m68k_final_prescan_insn, remove first and third operand and
7347         simplify.
7348         (print_operand): Call it.
7349         (print_operand_address): Call it.
7351 2018-08-08  Nathan Sidwell  <nathan@acm.org>
7353         * diagnostic.c (diagnostic_report_current_module): Use
7354         linemap_included_from & linemap_included_from_linemap.
7356 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
7358         * config/aarch64/aarch64-cores.def: Add phecda core.
7359         * config/aarch64/aarch64-tune.md: Regenerate.
7360         * doc/invoke.texi: Add phecda core.
7362 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
7364         PR target/85295
7365         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7366         definitions.
7367         * config/s390/s390.md ("movti"): Add more alternatives for
7368         constant to GPR copies.
7370 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
7372         * config/s390/s390.c: Fix whitespace damage throughout the file.
7373         * config/s390/s390.h: Likewise.
7374         * config/s390/tpf.h: Likewise.
7376 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
7378         * config/s390/s390.c (s390_loadrelative_operand_p):
7379         Remove TARGET_CPU_ZARCH usages.
7380         (s390_rtx_costs): Likewise.
7381         (s390_legitimate_constant_p): Likewise.
7382         (s390_cannot_force_const_mem): Likewise.
7383         (legitimate_reload_constant_p): Likewise.
7384         (s390_preferred_reload_class): Likewise.
7385         (legitimize_pic_address): Likewise.
7386         (legitimize_tls_address): Likewise.
7387         (s390_split_branches): Removed.
7388         (s390_add_execute): Removed.
7389         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7390         (s390_mainpool_start): Likewise.
7391         (s390_mainpool_finish): Likewise.
7392         (s390_mainpool_cancel): Removed.
7393         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7394         (s390_chunkify_cancel): Likewise.
7395         (s390_return_addr_rtx): Likewise.
7396         (s390_register_info): Remove split_branches_pending_p uages.
7397         (s390_optimize_register_info): Likewise.
7398         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7399         split_branches_pending_p usages.
7400         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7401         (s390_load_got): Likewise.
7402         (s390_expand_split_stack_prologue): Likewise.
7403         (output_asm_nops): Likewise.
7404         (s390_function_profiler): Likewise.
7405         (s390_emit_call): Likewise.
7406         (s390_conditional_register_usage): Likewise.
7407         (s390_optimize_prologue): Likewise.
7408         (s390_reorg): Remove TARGET_CPU_ZARCH and
7409         split_branches_pending_p usages.
7410         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7411         usages.
7412         (s390_output_indirect_thunk_function): Likewise.
7413         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7414         (TARGET_CPU_ZARCH_P): Removed.
7415         (struct machine_function): Remove split_branches_pending_p.
7416         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7418 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
7420         * common/config/s390/s390-common.c (processor_flags_table):
7421         Remove flags.
7422         * config.gcc: Remove with_arch/with_tune support.
7423         * config/s390/2064.md: Remove cpu attribute comparisons.
7424         * config/s390/driver-native.c (s390_host_detect_local_cpu):
7425         Remove MTN.
7426         * config/s390/linux.h (ASM_SPEC):
7427         Remove -march support.
7428         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7429         Use a table to get an arch level.
7430         * config/s390/s390-opts.h (enum processor_type):
7431         Remove enum values.
7432         * config/s390/s390.c
7433         (processor_table): Remove entries, add arch_level values.
7434         (s390_issue_rate): Remove cases.
7435         (s390_option_override): Adjust
7436         s390_option_override_internal() call.
7437         (s390_option_override_internal): Remove deprecation warning.
7438         (s390_valid_target_attribute_tree): Adjust
7439         s390_option_override_internal() call.
7440         * config/s390/s390.h (struct s390_processor):
7441         Share with s390-c.c, add arch_level field.
7442         * config/s390/s390.md:
7443         Remove occurrences in cpu attribute.
7444         * config/s390/s390.opt: Remove -march/-mtune support.
7445         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7446         * doc/invoke.texi: Remove deprecation warning.
7448 2018-08-08  Luis Machado  <luis.machado@linaro.org>
7450         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7451         global.
7452         (qdf24xx_tunings): Set vector cost structure to
7453         qdf24xx_vector_cost.
7455         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7456         <register_sextend>: Set to 3.
7458 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
7460         PR target/86838
7461         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7462         * config/aarch64/aarch64-simd.md
7463         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7464         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7465         (aarch64_frecpx<mode>): ...this new pattern.
7466         * config/aarch64/aarch64-simd-builtins.def: Remove comment
7467         about aarch64_frecp<FRECP:frecp_suffix><mode>.
7469 2018-08-07  Martin Liska  <mliska@suse.cz>
7471         PR middle-end/83023
7472         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7473         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7474         * predict.def (PRED_MALLOC_NONNULL): New predictor.
7475         * doc/extend.texi: Document that malloc attribute adds
7476         hit to compiler.
7478 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
7480         PR target/86785
7481         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7482         Define to speculation_safe_value_not_needed.
7484 2018-08-06  Jeff Law  <law@redhat.com>
7486         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7487         the vr_values instance to cprop_into_stmt.
7488         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7489         (cprop_operand): Also query EVRP to determine if OP is a constant.
7491 2018-08-06  Nathan Sidwell  <nathan@acm.org>
7493         * diagnostic.c (diagnostic_report_current_module): Reroll
7494         included-at loop.  Translate text.
7496 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
7498         * function-tests.c (selftest::test_expansion_to_rtl): Call
7499         free_after_compilation.
7501 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7503         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7505 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
7507         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7508         loops with memory block operations from getting unrolled.
7510 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
7512         PR target/86807
7513         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7514         Define to speculation_safe_value_not_needed.
7516 2018-08-06  Jeff Law  <law@redhat.com>
7518         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7519         assert.
7521 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7523         PR target/86662
7524         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7525         with all enabled __intN types.
7527         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7529 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7531         * alias.c (record_set): Check for clobber high.
7532         * cfgexpand.c (expand_gimple_stmt): Likewise.
7533         * combine-stack-adj.c (single_set_for_csa): Likewise.
7534         * combine.c (find_single_use_1): Likewise.
7535         (set_nonzero_bits_and_sign_copies): Likewise.
7536         (get_combine_src_dest): Likewise.
7537         (is_parallel_of_n_reg_sets): Likewise.
7538         (try_combine): Likewise.
7539         (record_dead_and_set_regs_1): Likewise.
7540         (reg_dead_at_p_1): Likewise.
7541         (reg_dead_at_p): Likewise.
7542         * dce.c (deletable_insn_p): Likewise.
7543         (mark_nonreg_stores_1): Likewise.
7544         (mark_nonreg_stores_2): Likewise.
7545         * df-scan.c (df_find_hard_reg_defs): Likewise.
7546         (df_uses_record): Likewise.
7547         (df_get_call_refs): Likewise.
7548         * dwarf2out.c (mem_loc_descriptor): Likewise.
7549         * haifa-sched.c (haifa_classify_rtx): Likewise.
7550         * ira-build.c (create_insn_allocnos): Likewise.
7551         * ira-costs.c (scan_one_insn): Likewise.
7552         * ira.c (equiv_init_movable_p): Likewise.
7553         (rtx_moveable_p): Likewise.
7554         (interesting_dest_for_shprep): Likewise.
7555         * jump.c (mark_jump_label_1): Likewise.
7556         * postreload-gcse.c (record_opr_changes): Likewise.
7557         * postreload.c (reload_cse_simplify): Likewise.
7558         (struct reg_use): Add source expr.
7559         (reload_combine): Check for clobber high.
7560         (reload_combine_note_use): Likewise.
7561         (reload_cse_move2add): Likewise.
7562         (move2add_note_store): Likewise.
7563         * print-rtl.c (print_pattern): Likewise.
7564         * recog.c (decode_asm_operands): Likewise.
7565         (store_data_bypass_p): Likewise.
7566         (if_test_bypass_p): Likewise.
7567         * regcprop.c (kill_clobbered_value): Likewise.
7568         (kill_set_value): Likewise.
7569         * reginfo.c (reg_scan_mark_refs): Likewise.
7570         * reload1.c (maybe_fix_stack_asms): Likewise.
7571         (eliminate_regs_1): Likewise.
7572         (elimination_effects): Likewise.
7573         (mark_not_eliminable): Likewise.
7574         (scan_paradoxical_subregs): Likewise.
7575         (forget_old_reloads_1): Likewise.
7576         * reorg.c (find_end_label): Likewise.
7577         (try_merge_delay_insns): Likewise.
7578         (redundant_insn): Likewise.
7579         (own_thread_p): Likewise.
7580         (fill_simple_delay_slots): Likewise.
7581         (fill_slots_from_thread): Likewise.
7582         (dbr_schedule): Likewise.
7583         * resource.c (update_live_status): Likewise.
7584         (mark_referenced_resources): Likewise.
7585         (mark_set_resources): Likewise.
7586         * rtl.c (copy_rtx): Likewise.
7587         * rtlanal.c (reg_referenced_p): Likewise.
7588         (single_set_2): Likewise.
7589         (noop_move_p): Likewise.
7590         (note_stores): Likewise.
7591         * sched-deps.c (sched_analyze_reg): Likewise.
7592         (sched_analyze_insn): Likewise.
7594 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7596         * cse.c (invalidate_reg): New function extracted from...
7597         (invalidate): ...here.
7598         (canonicalize_insn): Check for clobber high.
7599         (invalidate_from_clobbers): invalidate clobber highs.
7600         (invalidate_from_sets_and_clobbers): Likewise.
7601         (count_reg_usage): Check for clobber high.
7602         (insn_live_p): Likewise.
7603         * cselib.c (cselib_expand_value_rtx_1):Likewise.
7604         (cselib_invalidate_regno): Check for clobber in setter.
7605         (cselib_invalidate_rtx): Pass through setter.
7606         (cselib_invalidate_rtx_note_stores):
7607         (cselib_process_insn): Check for clobber high.
7608         * cselib.h (cselib_invalidate_rtx): Add operand.
7610 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7612         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7613         (mark_not_eliminable): Likewise.
7614         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7615         * lra-lives.c (process_bb_lives): Check for clobber high.
7616         * lra.c (new_insn_reg): Remember clobber highs.
7617         (collect_non_operand_hard_regs): Check for clobber high.
7618         (lra_set_insn_recog_data): Likewise.
7619         (add_regs_to_insn_regno_info): Likewise.
7620         (lra_update_insn_regno_info): Likewise.
7622 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7624         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7625         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7627 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7629         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7630         (copy_insn_1): Likewise.
7631         (gen_hard_reg_clobber_high): New gen function.
7632         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7633         * genemit.c (gen_exp): Likewise.
7634         (gen_emit_seq): Pass through info.
7635         (gen_insn): Check for CLOBBER_HIGH.
7636         (gen_expand): Pass through info.
7637         (gen_split): Likewise.
7638         (output_add_clobbers): Likewise.
7639         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7640         (remove_clobbers): Likewise.
7641         * rtl.h (gen_hard_reg_clobber_high): New declaration.
7643 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
7645         * doc/rtl.texi (clobber_high): Add.
7646         (parallel): Add in clobber high
7647         * rtl.c (rtl_check_failed_code3): Add function.
7648         * rtl.def (CLOBBER_HIGH): Add expression.
7649         * rtl.h (RTL_CHECKC3): Add macro.
7650         (rtl_check_failed_code3): Add declaration.
7651         (XC3EXP): Add macro.
7653 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
7655         PR target/86386
7656         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7657         cfun->machine->max_used_stack_alignment if needed.
7659 2018-08-04  Martin Sebor  <msebor@redhat.com>
7661         PR tree-optimization/86571
7662         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7663         NaN output to 4.
7665 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
7667         PR target/86799
7668         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7669         Define.
7671 2018-08-03  Jeff Law  <law@redhat.com>
7673         PR target/86795
7674         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7675         Define to speculation_safe_value_not_needed.
7677 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
7679         * doc/gcov.texi (-x): Remove duplicate "to".
7680         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7681         (-Wif-not-aligned): Remove duplicate "is".
7682         (-flto): Remove duplicate "the".
7683         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7684         duplicate "v5.00.b".
7685         (MSP430 Options): Remove duplicate "and" from the description
7686         of "-mgprel-sec=regexp".
7687         (x86 Options): Remove duplicate copies of "vmldLog102" and
7688         vmlsLog104 from description of "-mveclibabi=type".
7690 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
7692         * internal-fn.h (first_commutative_argument): Declare.
7693         * internal-fn.c (first_commutative_argument): New function.
7694         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7695         restrictions for pattern statements.  Use first_commutative_argument
7696         to look for commutative operands in calls to internal functions.
7698 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
7700         * Makefile.in (wide-int-range.o): New.
7701         * tree-vrp.c: Move all the wide_int_* functions to...
7702         * wide-int-range.cc: ...here.
7703         * tree-vrp.h: Move all the wide_int_* prototypes to...
7704         * wide-int-range.h: ...here.
7706 2018-08-03  Tom de Vries  <tdevries@suse.de>
7708         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7709         UI_NONE.
7710         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7711         * except.c (output_function_exception_table): Do early exit if
7712         targetm_common.except_unwind_info (&global_options) == UI_NONE.
7714 2018-08-03  Martin Liska  <mliska@suse.cz>
7716         * predict.c (dump_prediction): Change to 2 digits
7717         in fraction part.
7719 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7721         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7722         neon_dup_q to...
7723         (falkor_am_1_gtov_gtov): ... a new insn reservation.
7725 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
7727         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7728         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7729         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7730         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7731         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7733 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
7735         * diagnostic-show-locus.c (diagnostic_show_locus): Use
7736         pp_take_prefix when saving the existing prefix.
7737         * diagnostic.c (diagnostic_append_note): Likewise.
7738         * langhooks.c (lhd_print_error_function): Likewise.
7739         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7740         param's type.  Free the existing prefix.
7741         (pp_take_prefix): New function.
7742         (pretty_printer::pretty_printer): Drop the prefix parameter.
7743         Rename the length parameter to match the comment.
7744         (pretty_printer::~pretty_printer): Free the prefix.
7745         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7746         parameter.
7747         (struct pretty_printer): Drop the "const" from "prefix" field's
7748         type and clarify memory management.
7749         (pp_set_prefix): Drop the "const" from the 2nd param.
7750         (pp_take_prefix): New decl.
7752 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
7754         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7755         for word_mode_ok here instead of passing as argument.
7756         (expand_block_compare): Change select_block_compare_mode() call.
7757         (expand_strncmp_gpr_sequence): New function.
7758         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7760 2018-08-02  Jeff Law  <law@redhat.com>
7762         PR target/86790
7763         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7764         Define to speculation_safe_value_not_needed.
7766         PR target/86784
7767         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7768         Define to speculation_safe_value_not_needed.
7770 2018-08-02  Tom de Vries  <tdevries@suse.de>
7772         PR target/86660
7773         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7774         function.  Return UI_TARGET unconditionally.
7775         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7776         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7778 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7780         * genemit.c (print_overload_test): Fix typo.
7782 2018-08-02  Richard Biener  <rguenther@suse.de>
7784         PR tree-optimization/86816
7785         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7786         which checks for value availability before querying it.
7787         (gvn_uses_equal): Use it.
7788         (same_succ_hash): Likewise.
7789         (gimple_equal_p): Likewise.
7791 2018-08-02  Nick Clifton  <nickc@redhat.com>
7793         PR target/86813
7794         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7795         Define to speculation_safe_value_not_needed.
7797         PR target/86810
7798         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7799         Define to speculation_safe_value_not_needed.
7801         PR target/86810
7802         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7803         Define to speculation_safe_value_not_needed.
7805         PR target/86803
7806         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7807         Define to speculation_safe_value_not_needed.
7809         PR target/86797
7810         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7811         Define to speculation_safe_value_not_needed.
7813         PR target/86791
7814         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7815         Define to speculation_safe_value_not_needed.
7817         PR target/86789
7818         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7819         Define to speculation_safe_value_not_needed.
7821         PR target/86787
7822         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7823         Define to speculation_safe_value_not_needed.
7825         PR target/86782
7826         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7827         speculation_safe_value_not_needed.
7829         PR target/86781
7830         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7831         to speculation_safe_value_not_needed.
7833 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7835         * doc/md.texi: Expand the documentation of instruction names
7836         to mention port-local uses.  Document '@' in pattern names.
7837         * read-md.h (overloaded_instance, overloaded_name): New structs.
7838         (mapping): Declare.
7839         (md_reader::handle_overloaded_name): New member function.
7840         (md_reader::get_overloads): Likewise.
7841         (md_reader::m_first_overload): New member variable.
7842         (md_reader::m_next_overload_ptr): Likewise.
7843         (md_reader::m_overloads_htab): Likewise.
7844         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7845         m_next_overload_ptr and m_overloads_htab.
7846         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7847         (get_mode_token, get_code_token, get_int_token): New functions.
7848         (map_attr_string): Add an optional argument that passes back
7849         the associated iterator.
7850         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7851         (md_reader::handle_overloaded_name, add_overload_instance): New
7852         functions.
7853         (apply_iterators): Handle '@' names.  Report an error if '@'
7854         is used without iterators.
7855         (initialize_iterators): Initialize the new iterator_group fields.
7856         * genopinit.c (handle_overloaded_code_for)
7857         (handle_overloaded_gen): New functions.
7858         (main): Use them to print declarations of maybe_code_for_* and
7859         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7860         * genemit.c (print_overload_arguments, print_overload_test)
7861         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7862         (main): Use it to print definitions of maybe_code_for_* and
7863         maybe_gen_* functions.
7864         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7865         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7866         instead of explicit mode checks.
7867         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7868         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7869         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7870         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7871         (aarch64_expand_compare_and_swap): Likewise
7872         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7873         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7874         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7875         (aarch64_constant_pool_reload_icode): Delete.
7876         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7877         instead of aarch64_constant_pool_reload_icode.  Use
7878         code_for_aarch64_reload_mov instead of explicit mode checks.
7879         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7880         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7881         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7882         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7883         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7884         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7885         (aarch64_atomic_load_op_code): Delete.
7886         (aarch64_emit_atomic_load_op): Likewise.
7887         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7888         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
7889         instead of aarch64_emit_atomic_load_op.
7890         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7891         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7892         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7893         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7894         character before the pattern name.
7895         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7896         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7897         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7898         (aarch64_frecps<mode>): Likewise.
7899         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7900         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7901         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7902         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7903         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7905 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
7907         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7908         Allow HFmode constants if TARGET_FP_F16INST.
7910 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
7912         PR target/86014
7913         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7914         No longer check last store for clobber of address register.
7916 2018-08-02  Martin Liska  <mliska@suse.cz>
7918         PR gcov-profile/86817
7919         * gcov.c (process_all_functions): New function.
7920         (main): Call it.
7921         (process_file): Move functions processing to
7922         process_all_functions.
7924 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
7926         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7927         "const" to the "gimple *" and "rtx_insn *" parameters.
7928         * dumpfile.h (dump_user_location_t::dump_user_location_t):
7929         Likewise.
7930         (dump_location_t::dump_location_t): Likewise.
7932 2018-08-01  Martin Sebor  <msebor@redhat.com>
7934         PR tree-optimization/86650
7935         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
7936         rather than a "gcall *".  Directly pass the data of interest
7937         to percent_K_format, rather than building a temporary CALL_EXPR
7938         to hold it.
7939         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
7940         (gimple_fold_builtin_strncat): Adjust.
7941         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
7942         gcall* argument with gimple*.
7943         * gimple-ssa-warn-restrict.c (check_call): Same.
7944         (wrestrict_dom_walker::before_dom_children): Same.
7945         (builtin_access::builtin_access): Same.
7946         (check_bounds_or_overlap): Same
7947         (maybe_diag_overlap): Same.
7948         (maybe_diag_offset_bounds): Same.
7949         * tree-diagnostic.c (default_tree_printer): Move usage of
7950         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
7951         to this callsite.
7952         * tree-pretty-print.c (percent_K_format): Add argument.
7953         * tree-pretty-print.h: Add argument.
7954         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
7955         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
7956         (maybe_diag_stxncpy_trunc): Same.
7957         (handle_builtin_stxncpy): Same.
7958         (handle_builtin_strcat): Same.
7960 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7962         * match.pd: Optimise pointer range checks.
7964 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7966         PR tree-optimization/86758
7967         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
7968         to remove pattern statements.
7970 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7972         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
7973         result of dfs_enumerate_from when constructing stmt_vec_infos,
7974         instead of additionally calling get_loop_body.
7976 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7978         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
7979         parameter.
7980         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
7981         When creating an iv, assert that the step is not known to be zero.
7982         (vect_setup_realignment): Update call accordingly.
7983         * tree-vect-stmts.c (vectorizable_store): Likewise.
7984         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
7986 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
7988         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
7989         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
7990         (vectorizable_reduction): Likewise.
7991         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7992         (vect_detect_hybrid_slp_stmts): Likewise.
7993         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7995 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
7997         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
7998         (wide_int_set_zero_nonzero_bits): ...this.
7999         (zero_nonzero_bits_from_vr): Rename to...
8000         (vrp_set_zero_nonzero_bits): ...this.
8001         (extract_range_from_multiplicative_op_1): Abstract wide int
8002         code...
8003         (wide_int_range_multiplicative_op): ...here.
8004         (extract_range_from_binary_expr_1): Extract wide int binary
8005         operations into their own functions.
8006         (wide_int_range_lshift): New.
8007         (wide_int_range_can_optimize_bit_op): New.
8008         (wide_int_range_shift_undefined_p): New.
8009         (wide_int_range_bit_xor): New.
8010         (wide_int_range_bit_ior): New.
8011         (wide_int_range_bit_and): New.
8012         (wide_int_range_trunc_mod): New.
8013         (extract_range_into_wide_ints): New.
8014         (vrp_shift_undefined_p): New.
8015         (extract_range_from_multiplicative_op): New.
8016         (vrp_can_optimize_bit_op): New.
8017         * tree-vrp.h (value_range::dump): New.
8018         (wide_int_range_multiplicative_op): New.
8019         (wide_int_range_lshift):New.
8020         (wide_int_range_shift_undefined_p): New.
8021         (wide_int_range_bit_xor): New.
8022         (wide_int_range_bit_ior): New.
8023         (wide_int_range_bit_and): New.
8024         (wide_int_range_trunc_mod): New.
8025         (zero_nonzero_bits_from_bounds): Rename to...
8026         (wide_int_set_zero_nonzero_bits): ...this.
8027         (zero_nonzero_bits_from_vr): Rename to...
8028         (vrp_set_zero_nonzero_bits): ...this.
8029         (range_easy_mask_min_max): Rename to...
8030         (wide_int_range_can_optimize_bit_op): this.
8031         * vr-values.c (simplify_bit_ops_using_ranges): Rename
8032         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
8034 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8036         * tree-vectorizer.h (vect_orig_stmt): New function.
8037         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
8038         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
8039         (vect_create_epilog_for_reduction): Likewise.
8040         (vectorizable_live_operation): Likewise.
8041         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8042         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
8043         * tree-vect-stmts.c (vectorizable_call): Likewise.
8044         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
8046 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8048         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
8049         argument.
8050         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
8051         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
8052         (vect_transform_loop): Likewise.
8053         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8055 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8057         * tree-vectorizer.h (vect_schedule_slp): Return void.
8058         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8059         (vect_schedule_slp): Likewise.
8061 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8063         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
8064         argument.
8065         (vect_transform_loop): Update calls accordingly.  Schedule SLP
8066         instances before the main loop, if any exist.
8068 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
8070         PR tree-optimization/86749
8071         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
8072         If the lhs is used in a COND_EXPR, check that it is being used
8073         as the "then" or "else" value.
8075 2018-08-01  Tom de Vries  <tdevries@suse.de>
8077         PR target/86800
8078         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8079         speculation_safe_value_not_needed.
8081 2018-08-01  Richard Biener  <rguenther@suse.de>
8083         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
8084         as base and offset.
8086 2018-08-01  Martin Liska  <mliska@suse.cz>
8088         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
8089         format how successful transformation is dumped.
8090         (gimple_mod_pow2_value_transform): Likewise.
8091         (gimple_mod_subtract_transform): Likewise.
8092         (gimple_stringops_transform): Likewise.
8094 2018-08-01  Martin Liska  <mliska@suse.cz>
8096         PR value-prof/35543
8097         * value-prof.c (interesting_stringop_to_profile_p):
8098         Simplify the code and add BUILT_IN_MEMMOVE.
8099         (gimple_stringops_transform): Likewise.
8101 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
8103         * config/aarch64/aarch64-simd.md
8104         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
8105         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
8106         use GPI iterator instead of SI mode.
8108 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
8110         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
8111         rs6000_speculation_barrier.
8112         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
8113         new barrier pattern name.
8115 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
8117         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
8118         (speculation_barrier): New insn.
8120 2018-08-01  Richard Biener  <rguenther@suse.de>
8122         PR bootstrap/86724
8123         * graphite.h: Include isl/id.h and isl/space.h to allow build
8124         with ISL 0.20.
8126 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
8128         PR target/86651
8129         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8130         mode for COFF targets.
8131         * defaults.h (TARGET_COFF): Define.
8132         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
8133         TARGET_COFF): Define.
8134         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
8135         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
8136         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
8138 2018-07-31  Alexandre Oliva <oliva@adacore.com>
8140         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
8141         * gimple-streamer-out.c (output_bb): Save it.
8142         * lto-streamer-in.c (input_struct_function_base): Restore
8143         instance discriminator if available.  Create map on demand.
8144         * lto-streamer-out.c (output_struct_function_base): Save it if
8145         available.
8146         * final.c (decl_to_instance_map): Document LTO strategy.
8148 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
8149             Olivier Hainque  <hainque@adacore.com>
8151         * debug.h (decl_to_instance_map_t): New type.
8152         (decl_to_instance_map): Declare.
8153         (maybe_create_decl_to_instance_map): New inline function.
8154         * final.c (bb_discriminator, last_bb_discriminator): New statics,
8155         to track basic block discriminators.
8156         (final_start_function_1): Initialize them.
8157         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
8158         bb_discriminator.
8159         (decl_to_instance_map): New variable.
8160         (map_decl_to_instance, maybe_set_discriminator): New functions.
8161         (notice_source_line): Set discriminator.
8163 2018-07-31  Ian Lance Taylor  <iant@golang.org>
8165         * targhooks.c (default_have_speculation_safe_value): Add
8166         ATTRIBUTE_UNUSED.
8168 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
8170         * dump-context.h: Include "pretty-print.h".
8171         (dump_context::refresh_dumps_are_enabled): New decl.
8172         (dump_context::emit_item): New decl.
8173         (class dump_context): Add fields "m_test_pp" and
8174         "m_test_pp_flags".
8175         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8176         (temp_dump_context::get_dumped_text): New decl.
8177         (class temp_dump_context): Add field "m_pp".
8178         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
8179         (dump_context::refresh_dumps_are_enabled): ...and add a test for
8180         m_test_pp.
8181         (set_dump_file): Update for above change.
8182         (set_alt_dump_file): Likewise.
8183         (dump_loc): New overload, taking a pretty_printer *.
8184         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
8185         to any test pretty-printer.
8186         (make_item_for_dump_gimple_stmt): New function, adapted from
8187         optinfo::add_gimple_stmt.
8188         (dump_context::dump_gimple_stmt): Call it, and use the result,
8189         eliminating the direct usage of dump_file and alt_dump_file in
8190         favor of indirectly using them via emit_item.
8191         (make_item_for_dump_gimple_expr): New function, adapted from
8192         optinfo::add_gimple_expr.
8193         (dump_context::dump_gimple_expr): Call it, and use the result,
8194         eliminating the direct usage of dump_file and alt_dump_file in
8195         favor of indirectly using them via emit_item.
8196         (make_item_for_dump_generic_expr): New function, adapted from
8197         optinfo::add_tree.
8198         (dump_context::dump_generic_expr): Call it, and use the result,
8199         eliminating the direct usage of dump_file and alt_dump_file in
8200         favor of indirectly using them via emit_item.
8201         (make_item_for_dump_printf_va): New function, adapted from
8202         optinfo::add_printf_va.
8203         (make_item_for_dump_printf): New function.
8204         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
8205         and use the result, eliminating the direct usage of dump_file and
8206         alt_dump_file in favor of indirectly using them via emit_item.
8207         (make_item_for_dump_dec): New function.
8208         (dump_context::dump_dec): Call it, and use the result,
8209         eliminating the direct usage of dump_file and alt_dump_file in
8210         favor of indirectly using them via emit_item.
8211         (make_item_for_dump_symtab_node): New function, adapted from
8212         optinfo::add_symtab_node.
8213         (dump_context::dump_symtab_node): Call it, and use the result,
8214         eliminating the direct usage of dump_file and alt_dump_file in
8215         favor of indirectly using them via emit_item.
8216         (dump_context::begin_scope): Reimplement, avoiding direct usage
8217         of dump_file and alt_dump_file in favor of indirectly using them
8218         via emit_item.
8219         (dump_context::emit_item): New member function.
8220         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8221         Set up test pretty-printer on the underlying context.  Call
8222         refresh_dumps_are_enabled.
8223         (temp_dump_context::~temp_dump_context): Call
8224         refresh_dumps_are_enabled.
8225         (temp_dump_context::get_dumped_text): New member function.
8226         (selftest::verify_dumped_text): New function.
8227         (ASSERT_DUMPED_TEXT_EQ): New macro.
8228         (selftest::test_capture_of_dump_calls): Run all tests twice, with
8229         and then without optinfo enabled.  Add uses of
8230         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
8231         * dumpfile.h: Update comment for the dump_* API.
8232         * optinfo-emit-json.cc
8233         (selftest::test_building_json_from_dump_calls): Update for new
8234         param for temp_dump_context ctor.
8235         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8236         and "m_owned" field.
8237         (optinfo_item::~optinfo_item): Likewise.
8238         (optinfo::add_item): New member function.
8239         (optinfo::emit): Update comment.
8240         (optinfo::add_string): Delete.
8241         (optinfo::add_printf): Delete.
8242         (optinfo::add_printf_va): Delete.
8243         (optinfo::add_gimple_stmt): Delete.
8244         (optinfo::add_gimple_expr): Delete.
8245         (optinfo::add_tree): Delete.
8246         (optinfo::add_symtab_node): Delete.
8247         (optinfo::add_dec): Delete.
8248         * optinfo.h (class dump_context): New forward decl.
8249         (optinfo::add_item): New decl.
8250         (optinfo::add_string): Delete.
8251         (optinfo::add_printf): Delete.
8252         (optinfo::add_printf_va): Delete.
8253         (optinfo::add_gimple_stmt): Delete.
8254         (optinfo::add_gimple_expr): Delete.
8255         (optinfo::add_tree): Delete.
8256         (optinfo::add_symtab_node): Delete.
8257         (optinfo::add_dec): Delete.
8258         (optinfo::add_poly_int): Delete.
8259         (optinfo_item::optinfo_item): Remove "owned" param.
8260         (class optinfo_item): Remove field "m_owned".
8262 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8264         PR middle-end/86705
8265         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8266         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8267         requested variable alignment.
8268         (expand_one_ssa_partition): Likewise.
8269         (expand_one_var): Likewise.
8271 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8273         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8274         to speculation_safe_value_not_needed.
8276 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8278         * targhooks.h (speculation_safe_value_not_needed): New prototype.
8279         * targhooks.c (speculation_safe_value_not_needed): New function.
8280         * target.def (have_speculation_safe_value): Update documentation.
8281         * doc/tm.texi: Regenerated.
8283 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8285         * config/aarch64/iterators.md (ALLI_TI): New iterator.
8286         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8287         expand.
8288         (despeculate_copy<ALLI:mode>_insn): New insn.
8289         (despeculate_copyti_insn): New insn.
8290         (despeculate_simple<ALLI:mode>): New insn
8291         (despeculate_simpleti): New insn.
8292         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8293         function.
8294         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8295         aarch64_speculation_safe_value.
8296         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8298 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8300         * config/aarch64/aarch64-speculation.cc: New file.
8301         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8302         before pass_reorder_blocks.
8303         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8304         prototype.
8305         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8306         X14 and X15 when tracking speculation.
8307         * config/aarch64/aarch64.md (register name constants): Add
8308         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8309         (unspec): Add UNSPEC_SPECULATION_TRACKER.
8310         (speculation_barrier): New insn attribute.
8311         (cmp<mode>): Allow SP in comparisons.
8312         (speculation_tracker): New insn.
8313         (speculation_barrier): Add speculation_barrier attribute.
8314         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8315         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8316         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8318 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8320         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8321         aarch64_track_speculation is true.
8322         (tb<optab><mode>1): Likewise.
8323         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8324         generate CB[N]Z when tracking speculation.
8325         (aarch64_split_compare_and_swap): Likewise.
8326         (aarch64_split_atomic_op): Likewise.
8328 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8330         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8332 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8334         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8335         (speculation_barrier): New insn.
8337 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8339         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8340         * config/arm/arm.md (speculation_barrier): New expand.
8341         (speculation_barrier_insn): New pattern.
8343 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
8345         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8346         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8347         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8348         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8349         list.
8350         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8351         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8352         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8353         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8354         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8355         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8356         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8357         * builtins.c (expand_speculation_safe_value): New function.
8358         (expand_builtin): Call it.
8359         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8360         * doc/extend.texi: Document __builtin_speculation_safe_value.
8361         * doc/md.texi: Document "speculation_barrier" pattern.
8362         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8363         TARGET_HAVE_SPECULATION_SAFE_VALUE.
8364         * doc/tm.texi: Regenerated.
8365         * target.def (have_speculation_safe_value, speculation_safe_value): New
8366         hooks.
8367         * targhooks.c (default_have_speculation_safe_value): New function.
8368         (default_speculation_safe_value): New function.
8369         * targhooks.h (default_have_speculation_safe_value): Add prototype.
8370         (default_speculation_safe_value): Add prototype.
8372 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
8374         * dump-context.h (dump_context::dump_loc): New decl.
8375         * dumpfile.c (dump_context::dump_loc): New member function.
8376         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8377         and dump_gimple_stmt.
8378         (dump_context::dump_gimple_expr_loc): Likewise, using
8379         dump_gimple_expr.
8380         (dump_context::dump_generic_expr_loc): Likewise, using
8381         dump_generic_expr.
8382         (dump_context::dump_printf_loc_va): Likewise, using
8383         dump_printf_va.
8384         (dump_context::begin_scope): Explicitly using the global function
8385         "dump_loc", rather than the member function.
8387 2018-07-31  Martin Sebor  <msebor@redhat.com>
8389         PR tree-optimization/86741
8390         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8392 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
8394         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8395         depend on whether prefetch instructions will be emitted or not.
8396         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8397         will be emitted or not.
8398         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8399         (TARGET_SETMEM_PFD): New macros.
8401 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8403         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8404         (NULL_STMT_VEC_INFO): Delete.
8405         (stmt_vec_info::operator*): Likewise.
8406         (stmt_vec_info::operator gimple *): Likewise.
8407         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8408         of NULL_STMT_VEC_INFO.
8409         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8410         (vect_reassociating_reduction_p): Likewise.
8411         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8412         (vectorizable_store): Likewise.
8413         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8414         (vec_info::free_stmt_vec_infos): Likewise.
8416 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8418         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8419         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8421 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8423         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8424         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8425         (vec_info::free_stmt_vec_info): New private member functions.
8426         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8427         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8428         * tree-parloops.c (gather_scalar_reductions): Remove calls to
8429         set_stmt_vec_info_vec and free_stmt_vec_infos.
8430         * tree-vect-loop.c (_loop_vec_info): Remove call to
8431         set_stmt_vec_info_vec.
8432         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8433         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8434         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8435         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8436         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
8437         assignments in {vec_info::,}new_stmt_vec_info that are redundant
8438         with the clearing in the xcalloc.
8439         (stmt_vec_info_vec): Delete.
8440         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8441         (vectorize_loops): Likewise.
8442         (vec_info::~vec_info): Remove argument from call to
8443         free_stmt_vec_infos.
8444         (vec_info::add_stmt): Remove vinfo argument from call to
8445         new_stmt_vec_info.
8447 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8449         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8450         rather than a gimple stmt.
8451         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
8452         information for pattern statements when passed the original
8453         statement; instead wait to be passed the pattern statement itself.
8454         Don't call set_vinfo_for_stmt here.
8455         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8456         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8457         stmt_vec_infos here.
8458         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8459         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8460         stmt_vec_infos entry.
8462 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8464         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8465         * tree-vectorizer.c (vec_info::replace_stmt): New function.
8466         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8467         * tree-vect-stmts.c (vectorizable_call): Likewise.
8468         (vectorizable_simd_clone_call): Likewise.
8470 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8472         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8473         * tree-vectorizer.c (vec_info::remove_stmt): New function.
8474         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8475         * tree-vect-loop.c (vect_transform_loop): Likewise.
8476         * tree-vect-slp.c (vect_schedule_slp): Likewise.
8477         * tree-vect-stmts.c (vect_remove_stores): Likewise.
8479 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8481         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8482         (vect_dr_stmt): Delete.
8483         * tree-vectorizer.c (vec_info::lookup_dr): New function.
8484         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8485         of DR_VECT_AUX.
8486         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8487         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8488         (vect_verify_datarefs_alignment, vect_peeling_supportable)
8489         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8490         (vect_analyze_data_refs): Likewise.
8491         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
8492         argument.
8493         (vect_find_same_alignment_drs): Likewise.
8494         (vect_slp_analyze_node_dependences): Update calls accordingly.
8495         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
8496         instead of DR_VECT_AUX.
8497         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8498         of a vector data references.  Use vec_info::lookup_dr instead of
8499         DR_VECT_AUX.
8500         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8501         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
8502         instead of DR_VECT_AUX.
8504 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8506         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8507         dr_vec_info.
8508         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8509         accordingly.
8510         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8511         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8512         (vect_gen_prolog_loop_niters): Likewise.
8514 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8516         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8517         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8518         (vect_known_alignment_in_bytes, vect_dr_behavior)
8519         (vect_get_scalar_dr_size): Take references as dr_vec_infos
8520         instead of data_references.  Update calls to other routines for
8521         which the same change has been made.
8522         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8523         dr_vec_infos instead of stmt_vec_infos.
8524         (vect_analyze_data_ref_dependence): Update call accordingly.
8525         (vect_slp_analyze_data_ref_dependence)
8526         (vect_record_base_alignments): Use DR_VECT_AUX.
8527         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8528         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8529         (vector_alignment_reachable_p, vect_get_data_access_cost)
8530         (vect_peeling_supportable, vect_analyze_group_access_1)
8531         (vect_analyze_group_access, vect_analyze_data_ref_access)
8532         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8533         (vect_compile_time_alias, vect_small_gap_p)
8534         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8535         (vect_supportable_dr_alignment): Take references as dr_vec_infos
8536         instead of data_references.  Update calls to other routines for
8537         which the same change has been made.
8538         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8539         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8540         (vect_slp_analyze_and_verify_node_alignment)
8541         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8542         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8543         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
8544         above changes.
8545         (_vect_peel_info::dr): Replace with...
8546         (_vect_peel_info::dr_info): ...this new field.
8547         (vect_peeling_hash_get_most_frequent)
8548         (vect_peeling_hash_choose_best_peeling): Update accordingly.
8549         (vect_peeling_hash_get_lowest_cost):
8550         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
8551         routines for which the same change has been made.
8552         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
8553         data_reference.
8554         * tree-vect-loop-manip.c (get_misalign_in_elems)
8555         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
8556         above changes.
8557         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8558         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8559         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8560         (get_group_load_store_type, get_negative_load_store_type)
8561         (vect_get_data_ptr_increment, vectorizable_store)
8562         (vectorizable_load): Likewise.
8563         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8564         Update calls to other routines for which the same change has been made.
8566 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8568         * tree-vectorizer.h (vec_info::move_dr): New member function.
8569         (dataref_aux): Rename to...
8570         (dr_vec_info): ...this and add "dr" and "stmt" fields.
8571         (_stmt_vec_info::dr_aux): Update accordingly.
8572         (_stmt_vec_info::data_ref_info): Delete.
8573         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8574         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8575         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8576         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8577         of data_ref.
8578         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
8579         (STMT_VINFO_DR_INFO): New macro.
8580         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8581         (set_dr_misalignment): Update after rename of dataref_aux.
8582         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
8583         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8584         initialization of STMT_VINFO_DATA_REF.
8585         * tree-vectorizer.c (vec_info::move_dr): New function.
8586         * tree-vect-patterns.c (vect_recog_bool_pattern)
8587         (vect_recog_mask_conversion_pattern)
8588         (vect_recog_gather_scatter_pattern): Use it.
8589         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8590         the "dr" and "stmt" fields of dr_vec_info instead of
8591         STMT_VINFO_DATA_REF.
8593 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8595         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8596         (is_pattern_stmt_p): Use it.
8597         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8598         on pattern statements.
8600 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8602         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8603         original stmt as a stmt_vec_info rather than a gimple stmt.
8604         (vect_pattern_recog_1): Take the statement directly as a
8605         stmt_vec_info, rather than via a gimple_stmt_iterator.
8606         Update call to vect_mark_pattern_stmts.
8607         (vect_pattern_recog): Update calls accordingly.
8609 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8611         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8612         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8613         a vect_def_type for the first argument.
8614         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8615         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
8616         operand if it isn't defined by a vectorized statement.
8617         (vect_build_gather_load_calls): Remove the mask_dt argument and
8618         update calls to vect_get_vec_def_for_stmt_copy.
8619         (vectorizable_bswap): Likewise the dt argument.
8620         (vectorizable_call): Update calls to vectorizable_bswap and
8621         vect_get_vec_def_for_stmt_copy.
8622         (vectorizable_simd_clone_call, vectorizable_assignment)
8623         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8624         (vectorizable_comparison): Update calls to
8625         vect_get_vec_def_for_stmt_copy.
8626         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
8627         vect_is_simple_use.
8628         (vect_get_loop_based_defs): Remove dt argument and update call
8629         to vect_get_vec_def_for_stmt_copy.
8630         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8631         and vect_get_vec_def_for_stmt_copy.
8632         (vectorizable_load): Update calls to vect_build_gather_load_calls
8633         and vect_get_vec_def_for_stmt_copy.
8634         * tree-vect-loop.c (vect_create_epilog_for_reduction)
8635         (vectorizable_reduction, vectorizable_live_operation): Update calls
8636         to vect_get_vec_def_for_stmt_copy.
8638 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8640         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8641         and gimple stmt arguments with a stmt_vec_info.
8642         (vect_record_base_alignments): Update calls accordingly.
8643         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8644         and gimple stmt arguments with a stmt_vec_info.
8645         (vect_build_slp_tree_1): Remove vinfo argument and update call
8646         to vect_record_max_nunits.
8647         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8648         and vect_record_max_nunits.
8650 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8652         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8653         file and take a stmt_vec_info instead of a gimple stmt.
8654         (supportable_widening_operation, vect_finish_replace_stmt)
8655         (vect_finish_stmt_generation, vect_get_store_rhs)
8656         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8657         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8658         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8659         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8660         (vect_create_data_ref_ptr, bump_vector_ptr)
8661         (vect_permute_store_chain, vect_setup_realignment)
8662         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8663         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8664         (vectorizable_reduction, vectorizable_induction)
8665         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8666         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8667         than gimple stmts as arguments.
8668         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8669         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8670         (can_group_stmts_p, vect_check_gather_scatter)
8671         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8672         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8673         (vect_permute_load_chain, vect_shift_permute_load_chain)
8674         (vect_transform_grouped_load)
8675         (vect_record_grouped_load_vectors): Likewise.
8676         * tree-vect-loop.c (vect_fixup_reduc_chain)
8677         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8678         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8679         (vectorizable_reduction, vectorizable_induction)
8680         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8681         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8682         (vect_get_load_store_mask): Likewise.
8683         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8684         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8685         * tree-vect-stmts.c (vect_mark_relevant)
8686         (is_simple_and_all_uses_invariant)
8687         (exist_non_indexing_operands_for_use_p, process_use)
8688         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8689         (vect_get_vec_def_for_operand, vect_get_vec_defs)
8690         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8691         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8692         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8693         (get_negative_load_store_type, get_load_store_type)
8694         (vect_check_load_store_mask, vect_check_store_rhs)
8695         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8696         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8697         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8698         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8699         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8700         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8701         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8702         (supportable_widening_operation): Likewise.
8704 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8706         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8707         a stmt_vec_info instead of a gcall.
8708         (vect_check_gather_scatter): Update call accordingly.
8709         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8710         of a gphi.
8711         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8712         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8713         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8714         instead of a gimple stmt.
8715         (vect_transform_loop): Update calls accordingly.
8716         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8717         stmt_vec_infos instead of gimple stmts.
8718         (vect_analyze_slp_instance): Update use accordingly.
8719         * tree-vect-stmts.c (read_vector_array, write_vector_array)
8720         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8721         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8722         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8723         (vect_gen_widened_results_half, vect_get_loop_based_defs)
8724         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8725         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8726         down to subroutines.
8728 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8730         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8731         of the worklist from a vector of gimple stmts to a vector of
8732         stmt_vec_infos.
8733         * tree-vect-stmts.c (vect_mark_relevant, process_use)
8734         (vect_mark_stmts_to_be_vectorized): Likewise
8736 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8738         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8739         statement before passing it to vect_analyze_stmt.
8740         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8741         the chain of phi vector definitions.  Track the exit phi via its
8742         stmt_vec_info.
8743         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8744         STMT_VINFO_REDUC_DEF.
8745         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8746         stmt_vec_infos to handle the statement chains.
8747         (vect_get_slp_defs): Record the first statement in the node
8748         using a stmt_vec_info.
8749         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8750         statements here and pass their stmt_vec_info down to subroutines.
8751         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8752         down to vect_finish_stmt_generation.
8753         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8754         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8755         stmt_vec_infos to subroutines.
8756         (vect_remove_stores): Use stmt_vec_infos to handle the statement
8757         chains.
8759 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8761         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8762         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8763         (vect_permute_store_chain, vect_setup_realignment)
8764         (vect_permute_load_chain, vect_shift_permute_load_chain)
8765         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8766         stmts internally, and when passing values to other vectorizer routines.
8767         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8768         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8769         (vect_analyze_loop_operations, get_initial_def_for_reduction)
8770         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8771         (vectorizable_reduction, vectorizable_induction)
8772         (vectorizable_live_operation, vect_transform_loop_stmt)
8773         (vect_transform_loop): Likewise.
8774         * tree-vect-patterns.c (vect_reassociating_reduction_p)
8775         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8776         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8777         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8778         (vect_slp_analyze_node_operations_1): Likewise.
8779         * tree-vect-stmts.c (vect_mark_relevant, process_use)
8780         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8781         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8782         (vect_finish_stmt_generation_1, get_group_load_store_type)
8783         (get_load_store_type, vect_build_gather_load_calls)
8784         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8785         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8786         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8787         (vectorizable_store, vectorizable_load, vectorizable_condition)
8788         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8789         (supportable_widening_operation): Likewise.
8790         (vect_get_vector_types_for_stmt): Likewise.
8791         * tree-vectorizer.h (vect_dr_behavior): Likewise.
8793 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8795         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8796         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8797         (vect_permute_store_chain, vect_permute_load_chain)
8798         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8799         repeated stmt_vec_info lookups.
8800         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8801         (vect_update_ivs_after_vectorizer): Likewise.
8802         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8803         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8804         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8805         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8806         (vect_bb_slp_scalar_cost): Likewise.
8807         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8809 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8811         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8812         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8813         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8814         to get gassigns and gcalls, rather than operating on generc gimple
8815         stmts.
8816         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8817         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8818         (vectorizable_load, vect_analyze_stmt): Likewise.
8819         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8821 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8823         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8824         return stmt_vec_infos rather than gimple stmts.  Do not accept
8825         null arguments.
8826         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8827         of a gimple stmt.
8828         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8829         Update use of get_later_stmt.
8830         (vect_get_constant_vectors): Update call accordingly.
8831         (vect_schedule_slp_instance): Likewise
8832         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8833         (vect_slp_analyze_instance_dependence): Likewise.
8834         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8836 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8838         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8839         (stmt_info_for_cost::stmt_info): ...this new field.
8840         (add_stmt_costs): Update accordingly.
8841         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8842         (vect_get_known_peeling_cost): Likewise.
8843         (vect_estimate_min_profitable_iters): Likewise.
8844         * tree-vect-stmts.c (record_stmt_cost): Likewise.
8846 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8848         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8849         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8850         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8851         accordingly.
8852         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8854 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8856         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8857         a gimple stmt to a stmt_vec_info.
8858         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8860 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8862         * tree-vectorizer.h (vec_info::grouped_stores): Change from
8863         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8864         (_loop_vec_info::reduction_chains): Likewise.
8865         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8866         accordingly.
8867         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8869 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8871         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8872         a gimple stmt to a stmt_vec_info.
8873         (_stmt_vec_info::next_element): Likewise.
8874         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8875         (vect_slp_analyze_and_verify_node_alignment)
8876         (vect_analyze_group_access_1, vect_analyze_group_access)
8877         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8878         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8879         (vect_supportable_dr_alignment): Update accordingly.
8880         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8881         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8882         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8883         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8884         * tree-vect-slp.c (vect_build_slp_tree_1)
8885         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8886         (vect_split_slp_store_group, vect_analyze_slp_instance)
8887         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8888         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8889         (get_group_load_store_type, get_load_store_type)
8890         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8891         (vect_transform_stmt, vect_remove_stores): Likewise.
8893 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8895         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8896         than a gimple stmt.
8897         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8898         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8899         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8900         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8901         (vector_alignment_reachable_p, vect_get_data_access_cost)
8902         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8903         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8904         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8905         (vect_analyze_group_access_1, vect_analyze_group_access)
8906         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8907         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8908         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8909         result of vect_dr_stmt and use the stmt_vec_info instead of
8910         the associated gimple stmt.
8911         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8912         (vect_gen_prolog_loop_niters): Likewise.
8913         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8915 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8917         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8918         to a vec<stmt_vec_info>.
8919         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8920         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8921         vec<stmt_vec_info>.
8922         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8923         to a vec<stmt_vec_info>.
8924         (bst_traits::value_type, bst_traits::value_type): Likewise.
8925         (bst_traits::hash): Update accordingly.
8926         (vect_get_and_check_slp_defs): Change the stmts parameter from
8927         a vec<gimple *> to a vec<stmt_vec_info>.
8928         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8929         (vect_build_slp_tree): Likewise.
8930         (vect_build_slp_tree_2): Likewise.  Update uses of
8931         SLP_TREE_SCALAR_STMTS.
8932         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
8933         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
8934         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
8935         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
8936         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
8937         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
8938         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
8939         (vect_get_constant_vectors, vect_get_slp_defs)
8940         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
8941         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
8942         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
8943         instead of gimple stmts.
8944         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
8945         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
8946         (vect_slp_analyze_instance_dependence): Update uses of
8947         SLP_TREE_SCALAR_STMTS.
8948         (vect_slp_analyze_and_verify_node_alignment): Likewise.
8949         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
8950         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
8951         (get_initial_defs_for_reduction): Likewise.
8952         (vect_create_epilog_for_reduction): Likewise.
8953         (vectorize_fold_left_reduction): Likewise.
8954         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
8955         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
8956         (can_vectorize_live_stmts): Likewise.
8958 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8960         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
8961         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8962         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
8963         than gimple stmts.
8964         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
8965         of a gimple stmt.
8966         (gather_scalar_reductions): Update after above interface changes.
8967         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
8968         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
8969         than gimple stmts.
8970         (vect_force_simple_reduction): Likewise.
8971         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
8972         LOOP_VINFO_REDUCTIONS.
8973         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8975 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8977         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
8978         a gimple stmt to a stmt_vec_info.
8979         * tree-vect-loop.c (vect_active_double_reduction_p)
8980         (vect_force_simple_reduction, vectorizable_reduction): Update
8981         accordingly.
8983 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8985         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
8986         vec<gimple *> to a vec<stmt_vec_info>.
8987         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
8988         the reduction_phis argument from a vec<gimple *> to a
8989         vec<stmt_vec_info>.
8990         (vectorizable_reduction): Likewise the phis local variable that
8991         is passed to vect_create_epilog_for_reduction.  Update for new type
8992         of SLP_TREE_VEC_STMTS.
8993         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
8994         (vectorizable_live_operation): Likewise.
8995         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
8996         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
8998 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9000         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
9001         a gimple stmt to a stmt_vec_info.
9002         (vectorizable_condition, vectorizable_live_operation)
9003         (vectorizable_reduction, vectorizable_induction): Pass back the
9004         vectorized statement as a stmt_vec_info.
9005         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
9006         use of STMT_VINFO_VEC_STMT.
9007         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
9008         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
9009         as stmt_vec_infos rather than gimple stmts.
9010         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
9011         to a stmt_vec_info.
9012         (vectorizable_live_operation): Likewise.
9013         (vectorizable_reduction, vectorizable_induction): Likewise,
9014         updating use of STMT_VINFO_VEC_STMT.
9015         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
9016         of STMT_VINFO_VEC_STMT.
9017         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
9018         (vectorizable_simd_clone_call, vectorizable_conversion)
9019         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9020         (vectorizable_store, vectorizable_load, vectorizable_condition)
9021         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
9022         from a gimple stmt to a stmt_vec_info.
9023         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
9024         pointer to a stmt_vec_info to the vectorizable_* routines.
9026 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9028         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
9029         a gimple stmt to a stmt_vec_info.
9030         (is_pattern_stmt_p): Update accordingly.
9031         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
9032         (vect_record_grouped_load_vectors): Likewise.
9033         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
9034         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
9035         (vect_model_reduction_cost): Likewise.
9036         (vect_create_epilog_for_reduction): Likewise.
9037         (vectorizable_reduction, vectorizable_induction): Likewise.
9038         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9039         Return the stmt_vec_info for the pattern statement.
9040         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
9041         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
9042         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9043         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
9044         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
9045         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
9046         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
9047         (free_stmt_vec_info, vect_is_simple_use): Likewise.
9049 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9051         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
9052         (vect_finish_stmt_generation): Likewise.
9053         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9054         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
9055         (vect_build_gather_load_calls): Use the return value of the above
9056         functions instead of a separate call to vinfo_for_stmt.  Use narrow
9057         scopes for the input gimple stmt and wider scopes for the associated
9058         stmt_vec_info.  Use vec_info::lookup_def when setting these
9059         stmt_vec_infos from an SSA_NAME definition.
9060         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9061         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9062         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9063         (vectorizable_store, vectorizable_load, vectorizable_condition)
9064         (vectorizable_comparison): Likewise.
9065         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
9066         (vectorizable_reduction): Likewise.
9068 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9070         * tree-vectorizer.h (vect_is_simple_use): Add an optional
9071         stmt_vec_info * parameter before the optional gimple **.
9072         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9073         (process_use, vect_get_vec_def_for_operand_1): Update callers.
9074         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
9075         * tree-vect-loop.c (vectorizable_reduction): Likewise.
9076         (vectorizable_live_operation): Likewise.
9077         * tree-vect-patterns.c (type_conversion_p): Likewise.
9078         (vect_look_through_possible_promotion): Likewise.
9079         (vect_recog_rotate_pattern): Likewise.
9080         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9082 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9084         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
9085         a typedef to a wrapper class.
9086         (NULL_STMT_VEC_INFO): New macro.
9087         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
9088         (stmt_vec_info::operator*): New function.
9089         (stmt_vec_info::operator gimple *): Likewise.
9090         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
9091         (add_stmt_costs): Likewise.
9092         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
9093         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9094         (vect_get_known_peeling_cost): Likewise.
9095         (vect_estimate_min_profitable_iters): Likewise.
9096         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9097         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
9098         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9099         (vectorizable_store, free_stmt_vec_infos): Likewise.
9100         (new_stmt_vec_info): Change return type of xcalloc to
9101         _stmt_vec_info *.
9103 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9105         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
9106         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
9107         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
9108         a single_imm_use-based sequence.
9109         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
9111 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9113         * tree-vectorizer.h (vec_info::lookup_def): Declare.
9114         * tree-vectorizer.c (vec_info::lookup_def): New function.
9115         * tree-vect-patterns.c (vect_get_internal_def): Use it.
9116         (vect_widened_op_tree): Likewise.
9117         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9118         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
9119         (vectorizable_reduction): Likewise.
9120         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
9121         of a gimple *.
9122         (vect_is_slp_reduction): Update calls accordingly.  Use
9123         vec_info::lookup_def.
9124         (vect_is_simple_reduction): Likewise
9125         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
9127 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9129         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
9130         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
9131         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
9132         of vinfo_for_stmt.
9133         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
9134         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
9135         (vect_update_vf_for_slp, vect_analyze_loop_operations)
9136         (vect_is_slp_reduction, vectorizable_induction)
9137         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
9138         * tree-vect-patterns.c (vect_init_pattern_stmt):
9139         (vect_determine_min_output_precision_1, vect_determine_precisions)
9140         (vect_pattern_recog): Likewise.
9141         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
9142         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
9143         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
9144         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9145         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
9146         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
9147         info field from a loop to a loop_vec_info.
9149 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9151         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
9152         (vec_info::add_stmt): Declare.
9153         * tree-vectorizer.c (vec_info::add_stmt): New function.
9154         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
9155         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
9156         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9157         (vectorizable_induction): Likewise.
9158         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
9159         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9160         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
9161         (vectorizable_load): Likewise.
9162         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9163         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
9164         (vect_recog_gather_scatter_pattern): Likewise.
9165         (append_pattern_def_seq): Likewise.  Remove a check that is
9166         performed by add_stmt itself.
9168 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9170         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
9171         which make_ssa_name was called with new_stmt before new_stmt
9172         had been created.
9174 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9176         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
9177         split out from...
9178         (vect_is_slp_reduction): ...here...
9179         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
9180         that are already known to be false.
9182 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9184         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
9185         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
9186         STMT_VINFO_NUM_SLP_USES when it's true.
9187         (vect_free_slp_instance): Add a final_p parameter and pass it to
9188         vect_free_slp_tree.
9189         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
9190         (vect_analyze_slp_instance): Likewise.
9191         (vect_slp_analyze_operations): Likewise.
9192         (vect_slp_analyze_bb_1): Likewise.
9193         * tree-vectorizer.c (vec_info): Likewise.
9194         * tree-vect-loop.c (vect_transform_loop): Likewise.
9196 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9198         * tree-vect-loop.c (vectorizable_reduction): Assert that the
9199         function is not called for second and subsequent members of
9200         a reduction group.
9202 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9204         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
9205         cases for nested loops from here to ...
9206         (vect_create_epilog_for_reduction): ...here.  Only call
9207         vect_is_simple_use for inner-loop reductions.
9209 2018-07-31  Martin Liska  <mliska@suse.cz>
9211         PR gcov-profile/85338
9212         PR gcov-profile/85350
9213         PR gcov-profile/85372
9214         * profile.c (struct location_triplet): New.
9215         (struct location_triplet_hash): Likewise.
9216         (output_location): Do not output a BB that
9217         is already recorded for a line.
9218         (branch_prob): Use streamed_locations.
9220 2018-07-31  Martin Liska  <mliska@suse.cz>
9222         PR gcov-profile/85370
9223         * coverage.c (coverage_begin_function): Do not mark target
9224         clones as artificial functions.
9226 2018-07-31  Martin Liska  <mliska@suse.cz>
9228         PR gcov-profile/83813
9229         PR gcov-profile/84758
9230         PR gcov-profile/85217
9231         PR gcov-profile/85332
9232         * profile.c (branch_prob): Do not record GOTO expressions
9233         for GIMPLE statements which locations are already streamed.
9235 2018-07-31  Olivier Hainque  <hainque@adacore.com>
9237         * gcc.c (handle_spec_function): Accept a soft_matched_part
9238         argument, as do_spec_1.  Pass it down to ...
9239         (eval_spec_function): Accept a soft_matched_part argument,
9240         and pass it down to ...
9241         (do_spec_2): Accept a soft_matched_part argument, and pass
9242         it down to do_spec_1.
9243         (do_spec_1): Pass soft_matched_part to handle_spec_function.
9244         (handle_braces): Update call to handle_spec_function.
9245         (driver::set_up_specs): Update calls to do_spec_2.
9246         (compare_debug_dump_opt_spec_function): Likewise.
9247         (compare_debug_self_opt_spec_function): Likewise.
9249 2018-07-31  Olivier Hainque  <hainque@adacore.com>
9251         * common.opt (nolibc): New option.
9252         * doc/invoke.texi (Link Options): Document it.
9253         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9254         * config/alpha/linux.h: Likewise.
9255         * config/arc/elf.h: Likewise.
9256         * config/arm/uclinux-elf.h: Likewise.
9257         * config/arm/unknown-elf.h: Likewise.
9258         * config/avr/avrlibc.h: Likewise.
9259         * config/bfin/bfin.h: Likewise.
9260         * config/bfin/linux.h: Likewise.
9261         * config/bfin/uclinux.h: Likewise.
9262         * config/darwin.h: Likewise.
9263         * config/darwin10.h: Likewise.
9264         * config/darwin12.h: Likewise.
9265         * config/gnu-user.h: Likewise.
9266         * config/lm32/uclinux-elf.h: Likewise.
9267         * config/pa/pa-hpux11.h: Likewise.
9268         * config/pa/pa64-hpux.h: Likewise.
9269         * config/sparc/sparc.h: Likewise.
9271 2018-07-31  Olivier Hainque  <hainque@adacore.com>
9273         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9274         undefined variables.
9276 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
9278         PR target/86640
9279         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9280         instead of GEN_INT.
9282 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9284         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9285         terminated string literal.
9287 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
9289         PR rtl-optimization/85160
9290         * combine.c (is_just_move): New function.
9291         (try_combine): Allow combining two instructions into two if neither of
9292         the original instructions was a move.
9294 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
9296         PR target/86673
9297         * doc/extend.texi (Global Register Variables): Discourage use of type
9298         qualifiers.
9299         (Local Register Variables): Likewise.
9301 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
9303         PR tree-optimization/86506
9304         * hwint.h (ceil_log2): Resync with hwint.c implementation.
9306 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
9308         PR target/86547
9309         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9310         hard_regno, make sure no insn between `from` and `to` clobbers it.
9312 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
9313             Tom de Vries  <tdevries@suse.de>
9315         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9316         (PTX_DEFAULT_RUNTIME_DIM): ... this.
9317         (nvptx_goacc_validate_dims): Set default worker and gang dims to
9318         PTX_DEFAULT_RUNTIME_DIM.
9319         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9321 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
9323         * config/pa/pa.c (pa_output_addr_vec): Align address table.
9324         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9325         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9327 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
9329         * config/rs6000/constraints.md (wG constraint): Delete, no longer
9330         used.
9331         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9332         predicate to reflect toc fusion has been deleted.
9333         (toc_fusion_mem_raw): Delete, no longer used.
9334         (toc_fusion_mem_wrapped): Likewise.
9335         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9336         fusion mask bit.
9337         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9338         Delete, no longer used.
9339         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9340         meant to be used for toc fusion.
9341         (rs6000_debug_print_mode): Delete toc fusion debugging.
9342         (rs6000_debug_reg_global): Likewise.
9343         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9344         fusion and secondary reload support that were never used.
9345         (rs6000_option_override_internal): Delete TOC fusion, that was only
9346         partially defined, and it did not work unless you also used the
9347         -mcmodel= switch.
9348         (rs6000_legitimate_address_p): Delete TOC fusion support.
9349         (rs6000_opt_masks): Likewise.
9350         (fusion_wrap_memory_address): Delete function, no longer used.
9351         (fusion_split_address); Delete TOC fusion support.
9352         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9353         longer used with toc fusion being deleted.
9354         (TARGET_TOC_FUSION_FP): Likewise.
9355         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9356         UNSPEC.
9357         (toc fusion spliter): Delete TOC fusion support.
9358         (toc_fusionload_<mode>): Likewise.
9359         (toc_fusionload_di): Likewise.
9360         (fusion_gpr_load_<mode>): Delete generator function, this insn no
9361         longer needs to be named.  Rename predicate to delete TOC fusion.
9362         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9363         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9364         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9365         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9366         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9368 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9370         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9371         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
9372         __int128 in built-in function prototypes.
9373         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9374         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9376 2018-07-27  Martin Sebor  <msebor@redhat.com>
9378         PR tree-optimization/86696
9379         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9380         types, including enums.
9381         (handle_char_store): Be prepared for the above function to fail.
9383 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
9385         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9386         when optimization level is lower than 2 or optimize for size.
9388 2018-07-26  Martin Sebor  <msebor@redhat.com>
9390         PR tree-optimization/86043
9391         PR tree-optimization/86042
9392         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9393         (get_string_cst_length): Rename...
9394         (get_min_string_length): ...to this.  Add argument.
9395         (handle_char_store): Extend to handle multi-character stores by
9396         MEM_REF.
9397         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
9398         * tree.h (initializer_zerop): Add argument.
9400 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
9402         PR middle-end/86660
9403         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9404         declare target to variables if they have always,{to,from,tofrom} map
9405         kinds.
9407 2018-07-26  Martin Liska  <mliska@suse.cz>
9409         PR lto/86548
9410         * lto-wrapper.c: Add linker_output as prefix
9411         for ltrans_output_file.
9413 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
9415         PR rtl-optimization/85805
9416         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9417         value for hard registers if that was written in the same mode.
9419 2018-07-26  Martin Liska  <mliska@suse.cz>
9421         PR gcov-profile/86536
9422         * gcov.c (format_gcov): Use printf format %.*f directly
9423         and do not handle special values.
9425 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
9427         * common/config/arc/arc-common.c (arc_option_optimization_table):
9428         Update default optimizations for size.
9430 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
9432         * config/arc/arc.md (movsf_insn): Add short instruction selection.
9433         * config/arc/constraints.md (CfZ): New constraint.
9434         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9435         (subsf3_fpu): Likewise.
9436         (cmpsf_fpu): Likewise.
9437         (cmpsf_fpu_uneq): Likewise.
9439 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
9441         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9442         accesses as well.
9443         (arc_is_uncached_mem_p): uncached applies to both the variable and
9444         the pointer.
9446 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
9448         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9449         register names.
9451 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
9453         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9454         field "m_scopes" from vec to auto_vec.
9456 2018-07-25  Martin Liska  <mliska@suse.cz>
9458         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9459         return type.
9461 2018-07-25  Richard Biener  <rguenther@suse.de>
9463         PR debug/86654
9464         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9465         special wrt context_die late.
9466         (gen_subprogram_die): Re-use DIEs in local scope.
9468 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
9470         PR tree-optimization/86644
9471         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
9473 2018-07-25  Martin Liska  <mliska@suse.cz>
9475         PR middle-end/86645
9476         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9477         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9479 2018-07-25  Martin Liska  <mliska@suse.cz>
9481         PR sanitizer/79635
9482         * params.def: Explain ASan abbreviation and provide
9483         a documentation link.
9485 2018-07-24  Martin Sebor  <msebor@redhat.com>
9487         PR tree-optimization/86622
9488         PR tree-optimization/86532
9489         * builtins.h (string_length): Declare.
9490         * builtins.c (c_strlen): Correct handling of non-constant offsets.
9491         (check_access): Be prepared for non-constant length ranges.
9492         (string_length): Make extern.
9493         * expr.c (string_constant): Only handle the minor non-constant
9494         array index.  Use string_constant to compute the length of
9495         a generic string constant.
9497 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
9499         PR tree-optimization/86618
9500         * tree-vect-stmts.c (vectorizable_call): Don't take the address
9501         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9503 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
9505         PR tree-optimization/86636
9506         * json.cc (json::object::set): Fix comment.  Add assertions.
9507         (json::array::append): Move here from json.h.  Add comment and an
9508         assertion.
9509         (json::string::string): Likewise.
9510         * json.h (json::array::append): Move to json.cc.
9511         (json::string::string): Likewise.
9512         * optinfo-emit-json.cc
9513         (optrecord_json_writer::impl_location_to_json): Assert that we
9514         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9515         wrapper around it.  Expand the location once, rather than three
9516         times.
9517         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9518         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9519         wrappers.
9520         (optrecord_json_writer::optinfo_to_json): Likewise, in four
9521         places.  Fix some overlong lines.
9523 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
9525         * config/aarch64/aarch64-simd.md
9526         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9527         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9528         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9529         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9530         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9531         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9532         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9533         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9534         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9536 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
9538         PR middle-end/86627
9539         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9540         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
9541         and abs_d == d, do the power of two handling if profitable.
9543 2018-07-24  Richard Biener  <rguenther@suse.de>
9545         * match.pd: Add BIT_FIELD_REF canonicalizations.
9547 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9549         PR c/86617
9550         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9552 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9554         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9555         terminated STRING_CST object.
9557 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9559         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9561 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
9563         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9564         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9565         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9566         the elements into a register.
9567         (rs6000_split_v4si_init_di_reg): Delete.
9568         (rs6000_split_v4si_init): Delete.
9569         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9570         (vsx_init_v4si): Rewrite as a define_expand.
9572 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
9574         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9575         zero_extend argument from memory): New.
9577 2018-07-22  Martin Sebor  <msebor@redhat.com>
9579         PR bootstrap/86621
9580         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9581         diagnosing calls with unknown arguments unless -Walloca-larger-than
9582         is restricted to less than PTRDIFF_MAX bytes.
9584 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
9586         * doc/gcov.texi (Invoking Gcov): Editorial changes.
9588 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
9590         * pretty-print.c (text_info::set_location): Remove redundant
9591         "line_table" parameter from call to rich_location::set_range.
9593 2018-07-20  Martin Sebor  <msebor@redhat.com>
9595         PR middle-end/82063
9596         * builtins.c (expand_builtin_alloca): Adjust.
9597         * calls.c (alloc_max_size): Simplify.
9598         * cgraphunit.c (cgraph_node::expand): Adjust.
9599         * common.opt (larger_than_size, warn_frame_larger_than): Remove
9600         variables.
9601         (frame_larger_than_size): Same.
9602         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9603         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9604         Initialize.
9605         * doc/invoke.texi (GCC Command Options): Document option arguments.
9606         Explain byte-size arguments and suffixes.
9607         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9608         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9609         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9610         * doc/options.texi (UInteger): Expand.
9611         (Host_Wide_Int, ByteSize): Document new properties.
9612         * final.c (final_start_function_1): Include sizes in an error message.
9613         * function.c (frame_offset_overflow): Same.
9614         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9615         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9616         Diagnose unbounded alloca calls only for limits of less than
9617         PTRDIFF_MAX.
9618         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
9619         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
9620         for alloca(0).
9621         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
9622         only for limits of less than PTRDIFF_MAX.
9623         * langhooks-def.h (lhd_handle_option): Change function argument
9624         to HOST_WIDE_INT.
9625         * langhooks.c (lhd_handle_option): Same.
9626         * langhooks.h (handle_option): Same.
9627         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9628         ByteSize flags.
9629         (var_type, var_type_struct): Same.
9630         (var_set): Handle ByteSize flag.
9631         * optc-gen.awk: Add comments to output to ease debugging.  Make
9632         use of HOST_WIDE_INT where appropriate.
9633         * opts-gen-save.awk:  Use %lx to format unsigned long.
9634         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9635         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9636         arguments.  Parse bytes-size suffixes.
9637         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9638         (enum_value_to_arg): Same.
9639         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
9640         (handle_option): Adjust.
9641         (generate_option): Change function argument to HOST_WIDE_INT.
9642         (cmdline_handle_error): Adjust.
9643         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9644         (set_option): Change function argument to HOST_WIDE_INT.
9645         (option_enabled): Handle cl_host_wide_int.
9646         (get_option_state): Handle CLVC_SIZE.
9647         (control_warning_option): Same.
9648         * opts.c (common_handle_option): Change function argument to
9649         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
9650         OPT_Wvla_larger_than_.
9651         * opts.h (enum cl_var_type): Add an enumerator.
9652         * stor-layout.c (layout_decl): Print a more meaningful warning.
9653         * toplev.c (output_stack_usage): Adjust.
9655 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
9657         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9658         call to inline_expand_builtin_string_cmp.
9659         (expand_builtin_strcmp): Likewise.
9660         (expand_builtin_strncmp): Likewise.
9661         (inline_string_cmp): Delete the last parameter, change char_type_node
9662         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9663         two operands.
9664         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9665         the inlining expansion on target where the type of the call has same or
9666         narrower precision than unsigned char.
9668 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
9670         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9671         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9672         * common.opt (fsave-optimization-record): New option.
9673         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9674         * doc/invoke.texi (-fsave-optimization-record): New option.
9675         * dumpfile.c: Include "optinfo-emit-json.h".
9676         (struct kv_pair): Move to coretypes.h.
9677         (optgroup_options): Make non-static.
9678         (dump_context::end_scope): Call
9679         optimization_records_maybe_pop_dump_scope.
9680         * dumpfile.h (optgroup_options): New decl.
9681         * json.cc: New file.
9682         * json.h: New file.
9683         * optinfo-emit-json.cc: New file.
9684         * optinfo-emit-json.h: New file.
9685         * optinfo.cc: Include "optinfo-emit-json.h".
9686         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9687         (optinfo_enabled_p): Check optimization_records_enabled_p.
9688         (optinfo_wants_inlining_info_p): Likewise.
9689         * optinfo.h: Update comment.
9690         * profile-count.c (profile_quality_as_string): New function.
9691         * profile-count.h (profile_quality_as_string): New decl.
9692         (profile_count::quality): New accessor.
9693         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9694         and optinfo_emit_json_cc_tests.
9695         * selftest.h (selftest::json_cc_tests): New decl.
9696         (selftest::optinfo_emit_json_cc_tests): New decl.
9697         * toplev.c: Include "optinfo-emit-json.h".
9698         (compile_file): Call optimization_records_finish.
9699         (do_compile): Call optimization_records_start.
9700         * tree-ssa-live.c: Include optinfo.h.
9701         (remove_unused_scope_block_p): Retain inlining information if
9702         optinfo_wants_inlining_info_p returns true.
9704 2018-07-20  Richard Biener  <rguenther@suse.de>
9706         PR debug/86585
9707         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9708         to cover -flto-partition=none.
9710 2018-07-20  Martin Liska  <mliska@suse.cz>
9712         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9713         (get_decl_source_range): Remove unused function.
9715 2018-07-20  Richard Biener  <rguenther@suse.de>
9717         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9718         (struct vn_phi_s): Likewise.
9719         (struct vn_reference_s): Likewise.
9720         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9721         for searching the slot of an entry known to be in the hash itself.
9722         (vn_phi_hasher::equal): Likewise.
9723         (vn_reference_hasher::equal): Likewise.
9724         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9725         globals.
9726         (optimistic_info, current_info): Remove, keeping only valid_info.
9727         (vn_reference_lookup_1): Remove fallback lookup.
9728         (vn_reference_lookup_2): Likewise.
9729         (vn_nary_op_lookup_1): Likewise.
9730         (vn_phi_lookup): Likewise.
9731         (vn_nary_build_or_lookup_1): Make sure to not chain the built
9732         hash element.
9733         (vn_reference_insert): Adjust, chain the inserted hash element
9734         at last_inserted_ref.
9735         (vn_reference_insert_pieces): Likewise.
9736         (visit_reference_op_call): Likewise.
9737         (vn_nary_op_insert_into): Chain the inserted hash element at
9738         last_inserted_nary.
9739         (vn_nary_op_insert_pieces): Adjust.
9740         (vn_nary_op_insert): Likewise.
9741         (vn_nary_op_insert_stmt): Likewise.
9742         (vn_phi_insert): Adjust, chain the inserted hash element at
9743         last_inserted_phi.
9744         (process_scc): Remove clearing and copying the optimistic
9745         table.  Instead remove elements inserted during an optimistic
9746         iteration from the single table we maintain.
9747         (init_scc_vn): Adjust.
9748         (free_scc_vn): Likewise.
9749         (sccvn_dom_walker::record_cond): Likewise.
9750         (sccvn_dom_walker::after_dom_children): Likewise.
9752 2018-07-19  Martin Sebor  <msebor@redhat.com>
9754         PR tree-optimization/84047
9755         PR tree-optimization/83776
9756         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9757         (check_array_bounds): Call it.
9759 2018-07-19  Martin Sebor  <msebor@redhat.com>
9761         * align.h (align_flags): Use member initialization.
9763 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
9765         * Makefile.in (OBJS): Add optinfo.o.
9766         * coretypes.h (class symtab_node): New forward decl.
9767         (struct cgraph_node): New forward decl.
9768         (class varpool_node): New forward decl.
9769         * dump-context.h: New file.
9770         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9771         "tree-pass.h".
9772         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9773         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9774         (set_alt_dump_file): Likewise.
9775         (dump_context::~dump_context): New dtor.
9776         (dump_gimple_stmt): Move implementation to...
9777         (dump_context::dump_gimple_stmt): ...this new member function.
9778         Add the stmt to any pending optinfo, creating one if need be.
9779         (dump_gimple_stmt_loc): Move implementation to...
9780         (dump_context::dump_gimple_stmt_loc): ...this new member function.
9781         Start a new optinfo and add the stmt to it.
9782         (dump_gimple_expr): Move implementation to...
9783         (dump_context::dump_gimple_expr): ...this new member function.
9784         Add the stmt to any pending optinfo, creating one if need be.
9785         (dump_gimple_expr_loc): Move implementation to...
9786         (dump_context::dump_gimple_expr_loc): ...this new member function.
9787         Start a new optinfo and add the stmt to it.
9788         (dump_generic_expr): Move implementation to...
9789         (dump_context::dump_generic_expr): ...this new member function.
9790         Add the tree to any pending optinfo, creating one if need be.
9791         (dump_generic_expr_loc): Move implementation to...
9792         (dump_context::dump_generic_expr_loc): ...this new member
9793         function.  Add the tree to any pending optinfo, creating one if
9794         need be.
9795         (dump_printf): Move implementation to...
9796         (dump_context::dump_printf_va): ...this new member function.  Add
9797         the text to any pending optinfo, creating one if need be.
9798         (dump_printf_loc): Move implementation to...
9799         (dump_context::dump_printf_loc_va): ...this new member function.
9800         Start a new optinfo and add the stmt to it.
9801         (dump_dec): Move implementation to...
9802         (dump_context::dump_dec): ...this new member function.  Add the
9803         value to any pending optinfo, creating one if need be.
9804         (dump_context::dump_symtab_node): New member function.
9805         (dump_context::get_scope_depth): New member function.
9806         (dump_context::begin_scope): New member function.
9807         (dump_context::end_scope): New member function.
9808         (dump_context::ensure_pending_optinfo): New member function.
9809         (dump_context::begin_next_optinfo): New member function.
9810         (dump_context::end_any_optinfo): New member function.
9811         (dump_context::s_current): New global.
9812         (dump_context::s_default): New global.
9813         (dump_scope_depth): Delete global.
9814         (dumpfile_ensure_any_optinfo_are_flushed): New function.
9815         (dump_symtab_node): New function.
9816         (get_dump_scope_depth): Reimplement in terms of dump_context.
9817         (dump_begin_scope): Likewise.
9818         (dump_end_scope): Likewise.
9819         (selftest::temp_dump_context::temp_dump_context): New ctor.
9820         (selftest::temp_dump_context::~temp_dump_context): New dtor.
9821         (selftest::verify_item): New function.
9822         (ASSERT_IS_TEXT): New macro.
9823         (ASSERT_IS_TREE): New macro.
9824         (ASSERT_IS_GIMPLE): New macro.
9825         (selftest::test_capture_of_dump_calls): New test.
9826         (selftest::dumpfile_c_tests): Call it.
9827         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9828         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9829         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9830         descriptive comment.
9831         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9832         (dump_node, dump_bb): Move these unrelated decls.
9833         (class dump_manager): Add leading comment.
9834         * optinfo.cc: New file.
9835         * optinfo.h: New file.
9837 2018-07-19  Michael Collison  <michael.collison@arm.com>
9838             Richard Henderson <rth@redhat.com>
9840         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9841         (subti): Handle op1 zero.
9842         (subvti4, usub4ti4): New.
9843         (*sub<GPI>3_compare1_imm): New.
9844         (sub<GPI>3_carryinCV): New.
9845         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9846         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9848 2018-07-19  Michael Collison  <michael.collison@arm.com>
9849             Richard Henderson <rth@redhat.com>
9851         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9852         (addti3): Create simpler code if low part is already known to be 0.
9853         (addvti4, uaddvti4): New.
9854         (*add<GPI>3_compareC_cconly_imm): New.
9855         (*add<GPI>3_compareC_cconly): New.
9856         (*add<GPI>3_compareC_imm): New.
9857         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9858         handle constants within this pattern..
9859         (*add<GPI>3_compareV_cconly_imm): New.
9860         (*add<GPI>3_compareV_cconly): New.
9861         (*add<GPI>3_compareV_imm): New.
9862         (add<GPI>3_compareV): New.
9863         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9864         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9865         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9866         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9867         with 'comparison' operator.
9868         (*add<GPI>3_compareV_cconly_imm): Ditto.
9869         (*add<GPI>3_compareV_cconly): Ditto.
9870         (*add<GPI>3_compareV_imm): Ditto.
9871         (add<GPI>3_compareV): Ditto.
9872         (add<mode>3_carryinC): Ditto.
9873         (*add<mode>3_carryinC_zero): Ditto.
9874         (*add<mode>3_carryinC): Ditto.
9875         (add<mode>3_carryinV): Ditto.
9876         (*add<mode>3_carryinV_zero): Ditto.
9877         (*add<mode>3_carryinV): Ditto.
9879 2018-07-19  Michael Collison  <michael.collison@arm.com>
9880             Richard Henderson <rth@redhat.com>
9882         * config/aarch64/aarch64-modes.def (CC_V): New.
9883         * config/aarch64/aarch64-protos.h
9884         (aarch64_addti_scratch_regs): Declare
9885         (aarch64_subvti_scratch_regs): Declare.
9886         (aarch64_expand_subvti): Declare.
9887         (aarch64_gen_unlikely_cbranch): Declare
9888         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9889         for signed overflow using CC_Vmode.
9890         (aarch64_get_condition_code_1): Handle CC_Vmode.
9891         (aarch64_gen_unlikely_cbranch): New function.
9892         (aarch64_addti_scratch_regs): New function.
9893         (aarch64_subvti_scratch_regs): New function.
9894         (aarch64_expand_subvti): New function.
9896 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9898         * config/aarch64/aarch64-option-extensions.def: New entry for profile
9899         extension.
9900         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9901         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9902         extension.
9904 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9906         PR target/83009
9907         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9908         address check not strict.
9910 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9912         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9913         Umq with Umn.
9914         (store_pair_lanes<mode>): Likewise.
9915         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9916         enum value 'ADDR_QUERY_LDP_STP_N'.
9917         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9918         (aarch64_print_address_internal): Add declaration.
9919         (aarch64_print_ldpstp_address): Remove.
9920         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9921         (aarch64_print_operand): Change printing of 'y'.
9922         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9923         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9924         'true' rather than '1'.
9925         * config/aarch64/constraints.md (Uml): Likewise.
9926         (Uml): Rename to Umn.
9927         (Umq): Remove.
9929 2018-07-19  Richard Biener  <rguenther@suse.de>
9931         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
9932         a trailing array.
9933         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
9934         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
9935         (vn_reference_hasher): Likewise.
9936         (struct vn_tables_s): Remove obstack and alloc-pool members.
9937         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
9938         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
9939         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
9940         (vn_reference_insert_pieces): Likewise.
9941         (alloc_vn_nary_op_noinit): Adjust.
9942         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
9943         (vn_phi_eq): Adjust.
9944         (shared_lookup_phiargs): Remove.
9945         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
9946         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
9947         (visit_reference_op_call): Likewise.
9948         (copy_nary, copy_phi, copy_reference): Remove.
9949         (process_scc): Rewind the obstack when iterating.  Do not
9950         copy the elements to valid_info but just move them from one
9951         hashtable to the other.
9952         (allocate_vn_table): Adjust.
9953         (free_vn_table): Likewise.
9954         (init_scc_vn): Likewise.
9955         (free_scc_vn): Likewise.
9957 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
9959         PR target/86560
9960         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
9961         indirect_return as function type attribute.
9962         (ix86_attribute_table): Change indirect_return to function
9963         type attribute.
9964         * doc/extend.texi: Update indirect_return attribute.
9966 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
9968         * wide-int.h (widest2_int): New.
9969         * gimple-fold.c (arith_overflowed_p): Use it.
9970         * tree.h (widest2_int_cst): New.
9971         * tree-vrp.c (wide_int_binop_overflow): Rename from
9972         vrp_int_const_binop.
9973         Rewrite to work on trees.
9974         (extract_range_from_multiplicative_op_1): Abstract code to...
9975         (wide_int_range_min_max): ...here.
9976         (wide_int_range_cross_product): ...and here.
9977         (extract_range_from_binary_expr_1): Abstract overflow code to...
9978         (wide_int_range_mult_wrapping): ...here.
9979         * tree-vrp.h (wide_int_range_cross_product): New.
9980         (wide_int_range_mult_wrapping): New.
9982 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
9983             Julia Koval  <julia.koval@intel.com>
9985         * config/i386/x86-tune-costs.h (skylake_memcpy,
9986         skylake_memset): Replace rep_prefix with unrolling for size 512.
9988 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
9990         PR middle-end/86544
9991         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
9992         comparision with EQ_EXPR in last stmt.
9994 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9996         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
9997         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
9998         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
9999         previously known as "PowerPC AltiVec Built-in Functions".  Move
10000         some material to new subsubsections "PowerPC AltiVec Built-in
10001         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
10002         ISA 2.07".
10003         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
10004         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
10005         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
10006         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
10008 2018-07-18  Richard Biener  <rguenther@suse.de>
10010         PR tree-optimization/86557
10011         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
10012         EXACT_DIV_EXPR.
10014 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
10016         * config/s390/s390.c (s390_function_profiler): Generate CFI.
10018 2018-07-17  Jeff Law  <law@redhat.com>
10020         * config/arm/arm.c (get_label_padding): Update for recent
10021         changes to label_to_alignment.
10023         PR tree-optimization/86010
10024         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
10026         * config/mips/mips.c (vr4130_align_insns): Update for recent
10027         changes to label_to_alignment.
10029         * config/frv/frv.c (frv_label_align): Update for recent changes
10030         to label_to_alignment.
10032         * config/nios2/nios2.c (nios2_label_align): Update for recent
10033         changes which dropped ALIGN_LABELS_LOG.
10035 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
10037         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
10038         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
10040 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
10042         * config/arc/arc.c (arc_label_align): Use align_labels instead of
10043         deprecated align_labels_log.
10045 2018-07-17  Richard Biener  <rguenther@suse.de>
10047         PR lto/86456
10048         * dwarf2out.c (init_sections_and_labels): Always generate
10049         a debug_line_str_section for early LTO debug.
10050         (dwarf2out_finish): Reset debug_line_str_hash output early.
10051         Bump counter for extra dwarf5 .debug_loc labels to not conflict
10052         with fat LTO part.
10053         (dwarf2out_early_finish): Output debug_line_str.
10055 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
10057         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
10058         index register on z196 or later.
10060 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
10062         * config/s390/s390.c (s390_default_align): Set default function
10063         alignment to 16.
10064         (s390_override_options_after_change): Call s390_default align.
10065         (s390_option_override_internal): Call s390_default_align.
10066         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
10068 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
10070         PR middle-end/86542
10071         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
10072         to _looptemp_ clauses, other than the first two.
10074 2018-07-17  Martin Liska  <mliska@suse.cz>
10076         * opts.c: Do not enable OPT_falign_* for -Os.
10078 2018-07-17  Martin Liska  <mliska@suse.cz>
10080         * align.h (MAX_CODE_ALIGN): New.
10081         (MAX_CODE_ALIGN_VALUE): New.
10082         * common/config/i386/i386-common.c (ix86_handle_option):
10083         (MAX_CODE_ALIGN): Moved to align.h.
10084         * final.c (MAX_CODE_ALIGN): Likewise.
10085         * opts.c (parse_and_check_align_values):
10086         (MAX_CODE_ALIGN): Likewise.
10087         (MAX_CODE_ALIGN_VALUE): Likewise.
10089 2018-07-17  Martin Liska  <mliska@suse.cz>
10091         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
10092         in order to fulfil coding style.
10093         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
10094         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10095         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10096         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
10097         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
10098         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
10099         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
10100         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
10101         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10103 2018-07-17  Martin Liska  <mliska@suse.cz>
10105         * align.h: New file.
10106         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
10107         directly.
10108         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
10109         align_flags of label_to_alignment.
10110         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
10111         align_flags class.
10112         * config/m68k/m68k.c: Do not use removed align_labels_value and
10113         align_loops_value.
10114         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
10115         (LOOP_ALIGN): Likewise.
10116         (LABEL_ALIGN): Likewise.
10117         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10118         Remove not used macro.
10119         (rs6000_loop_align): Change return type to align_flags.
10120         (rs6000_loop_align_max_skip): Remove.
10121         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
10122         Change return type to align_flags.
10123         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10124         Remove not used macro.
10125         (rs6000_loop_align):  Change return type to align_flags.
10126         (rs6000_loop_align_max_skip): Remove.
10127         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
10128         * config/rx/rx-protos.h (rx_align_for_label): Make it
10129         static function.
10130         * config/rx/rx.c (rx_align_for_label): Change return type
10131         to align_flags.
10132         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
10133         macro definitions.
10134         into align_flags class.
10135         (LABEL_ALIGN): Likewise.
10136         (LOOP_ALIGN): Likewise.
10137         * config/s390/s390.c (s390_label_align): Use align_flags
10138         class member.
10139         (s390_asm_output_function_label): Likewise.
10140         * config/sh/sh.c (sh_override_options_after_change):
10141         Use align_flags class directly without macros.
10142         (find_barrier): Likewise.
10143         (barrier_align): Likewise.
10144         (sh_loop_align): Likewise.
10145         * config/spu/spu.c (spu_option_override):
10146         Use align_flags_tuple::get_value instead of removed macros.
10147         (spu_sched_init): Likewise.
10148         * config/spu/spu.h (GTY): Likewise.
10149         * config/visium/visium.c (visium_option_override):
10150         Set "8" as default secondary alignment.
10151         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
10152         in order to guarantee secondary alignment of 8.
10153         * coretypes.h: Include align.h header file.
10154         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
10155         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
10156         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
10157         * doc/tm.texi.in: Likewise.
10158         * final.c (struct label_alignment): Remove not used structure.
10159         (LABEL_ALIGN): Change type to align_flags.
10160         (LOOP_ALIGN): Likewise.
10161         (JUMP_ALIGN): Likewise.
10162         (default_loop_align_max_skip): Remove.
10163         (default_label_align_max_skip): Likewise.
10164         (default_jump_align_max_skip): Likewise.
10165         (default_label_align_after_barrier_max_skip):
10166         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
10167         (LABEL_TO_MAX_SKIP): Remove.
10168         (label_to_alignment): Return align_flags type instead of integer.
10169         (label_to_max_skip): Remove.
10170         (align_fuzz): Use align_flags type.
10171         (compute_alignments): Use align_flags type and use align_flags::max
10172         to combine multiple alignments.
10173         (grow_label_align): Grow vec instead of C array.
10174         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
10175         (shorten_branches):  Use align_flags type and use align_flags::max
10176         to combine multiple alignments.
10177         (final_scan_insn_1): Remove usage of secondary alignment that comes
10178         from label alignment, but instead use proper secondary alignment
10179         which is computed in grow_label_align.
10180         * flags.h (struct align_flags_tuple): Move to align.h.
10181         (struct align_flags): Likewise.
10182         (state_align_loops): Rename to align_loops.
10183         (state_align_jumps): Rename to align_jumps.
10184         (state_align_labels): Rename to align_labels.
10185         (state_align_functions): Rename to align_functions.
10186         (align_loops_log): Remove.
10187         (align_jumps_log): Remove.
10188         (align_labels_log): Remove.
10189         (align_functions_log): Remove.
10190         (align_loops_max_skip): Remove.
10191         (align_jumps_max_skip): Remove.
10192         (align_labels_max_skip): Remove.
10193         (align_functions_max_skip): Remove.
10194         (align_loops_value): Remove.
10195         (align_jumps_value): Remove.
10196         (align_labels_value): Remove.
10197         (align_functions_value): Remove.
10198         * output.h (label_to_alignment): Change return type to align_flags.
10199         (label_to_max_skip): Remove.
10200         * target.def: Remove loop_align_max_skip, label_align_max_skip,
10201         jump_align_max_skip macros.
10202         * targhooks.h (default_loop_align_max_skip): Remove.
10203         (default_label_align_max_skip): Likewise.
10204         (default_jump_align_max_skip): Likewise.
10205         (default_label_align_after_barrier_max_skip): Remove.
10206         * toplev.c (read_log_maxskip): Use ::normalize function.
10207         (parse_N_M): Remove not used argument and also call ::normalize.
10208         (parse_alignment_opts): Do not pass unused arguments.
10209         * varasm.c (assemble_start_function): Use directly align_functions
10210         instead of removed macros.
10211         * system.h: Do not poison removed macros.
10213 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
10215         PR middle-end/86539
10216         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10217         and cond temporaries don't have reference type if iterator has
10218         pointer type.  For init use &for_pre_body instead of pre_p if
10219         for_pre_body is non-empty.
10221 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
10223         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10224         double-double modes to SFmode directly directly.
10225         (trunc<mode>sf2_fprs): Delete.
10227 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
10229         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10230         for conversions between IFmode and the decimal floating point modes.
10231         (init_float128_ieee): Use the correct names for conversions between
10232         KFmode and the decimal floating point modes.
10234 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
10236         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10237         for the conversions between TDmode and IFmode.
10238         (init_float128_ieee): Use more correct names for the conversions
10239         between TDmode and KFmode.
10241 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
10243         PR tree-optimization/86526
10244         * builtins.c (expand_builtin_memcmp): Formatting fixes.
10245         (inline_expand_builtin_string_cmp): Likewise.
10246         (inline_string_cmp): Likewise.  Use c_readstr instead of
10247         builtin_memcpy_read_str.  Add unit_mode temporary.
10249 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10251         PR middle-end/86528
10252         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10253         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10255 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10257         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10258         Alphabetize prototypes of built-in functions, separating out
10259         built-in functions that are listed in this section but should be
10260         described elsewhere.
10262 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
10264         PR target/86511
10265         * expmed.c (emit_store_flag): Do not emit setcc followed by a
10266         conditional move when trapping comparison was split to a
10267         non-trapping one (and vice versa).
10269 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
10271         * config/s390/s390.c (s390_function_profiler): Generate nops
10272         instead of profiler call sequences.
10273         * config/s390/s390.opt: Add the new option.
10275 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
10277         * config/s390/s390.c (s390_function_profiler): Generate
10278         __mcount_loc section.
10279         * config/s390/s390.opt: Add the new option.
10281 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
10283         * common.opt: Add the new warning.
10284         * config/s390/s390.c (s390_function_profiler): Emit "brasl
10285         %r0,__fentry__" when -mfentry is specified.
10286         (s390_option_override_internal): Disallow -mfentry for 31-bit
10287         CPUs.
10288         * config/s390/s390.opt: Add the new option.
10290 2018-07-16  Richard Biener  <rguenther@suse.de>
10292         PR lto/86523
10293         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10294         for function-local FUNCTION_DECL and RESULT_DECL immediately.
10296 2018-07-16  Martin Liska  <mliska@suse.cz>
10298         PR ipa/86529
10299         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10300         to ::get_create.
10302 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
10304         * config/arc/arcHS.md: Update ARCHS scheduling rules.
10306 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
10308         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10309         for ARCHS4x.
10310         * config/arc/arc-cpus.def (hs4x): New cpu.
10311         (hs4xd): Likewise.
10312         * config/arc/arc-tables.opt: Regenerate.
10313         * config/arc/arc.c (arc_sched_issue_rate): New function.
10314         (TARGET_SCHED_ISSUE_RATE): Define.
10315         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10316         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10317         fpu_cvt.
10318         (attr tune): Add ARCHS4x tune values.
10319         (attr tune_dspmpy): Define.
10320         (*tst): Correct instruction type.
10321         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10322         * config/arc/arcHS4x.md: New file.
10323         * config/arc/fpu.md: Update instruction type attributes.
10324         * config/arc/t-multilib: Regenerate.
10326 2018-07-16  Tom de Vries  <tdevries@suse.de>
10328         PR debug/86455
10329         * var-tracking.c (vt_initialize): Fix pre_dec handling.
10331 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10333         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10334         early clobber.
10336 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
10338         PR tree-optimization/86514
10339         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10340         conversion to a boolean type from a type with greater precision.
10342 2018-07-16  Tom de Vries  <tdevries@suse.de>
10344         * var-tracking.c (vt_initialize): Print adjusted insn slim if
10345         dump_flags request TDF_SLIM.
10347 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
10349         * fold-const.c (int_const_binop_1): Abstract...
10350         (wide_int_binop): ...wide int code here.
10351         (poly_int_binop): ...poly int code here.
10352         Abstract the rest of int_const_binop_1 into int_const_binop.
10353         * fold-const.h (wide_int_binop): New.
10354         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10355         Remove useless PLUS/MINUS_EXPR case.
10356         (zero_nonzero_bits_from_vr): Move wide int code...
10357         (zero_nonzero_bits_from_bounds): ...here.
10358         (extract_range_from_binary_expr_1): Move mask optimization code...
10359         (range_easy_mask_min_max): ...here.
10360         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10361         (range_easy_mask_min_max): New.
10363 2018-07-15  Jeff Law  <law@redhat.com>
10365         PR target/85993
10366         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10367         block.
10369 2018-07-14  Jim Wilson  <jimw@sifive.com>
10371         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10373 2018-07-14  Paul Koning  <ni1d@arrl.net>
10375         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10377 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
10379         * lto-streamer-out.c (copy_function_or_variable): Dump info about
10380         copying section.
10382 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
10383             Steve Munroe  <munroesj52@gmail.com>
10385         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10386         (_mm_andnot_si128): Likewise.
10387         (_mm_or_si128): Likewise.
10388         (_mm_xor_si128): Likewise.
10390 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
10392         PR middle-end/78809
10393         * builtins.c (expand_builtin_memcmp): Inline the calls first
10394         when result_eq is false.
10395         (expand_builtin_strcmp): Inline the calls first.
10396         (expand_builtin_strncmp): Likewise.
10397         (inline_string_cmp): New routine. Expand a string compare
10398         call by using a sequence of char comparison.
10399         (inline_expand_builtin_string_cmp): New routine. Inline expansion
10400         a call to str(n)cmp/memcmp.
10401         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10402         New option.
10403         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10405 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
10407         * config/arm/driver-arm.c: Include arm-native.h.
10408         (host_detect_local_cpu): Use auto-generated data tables.
10409         (vendors, arm_cpu_table): Delete.  Move part information to ...
10410         * config/arm/arm-cpus.in: ... here.
10411         * config/arm/parsecpu.awk (gen_native): New function.
10412         (vendor, part): New CPU fields.
10413         (END): Add support for building the native CPU detection tables.
10414         * config/arm/t-arm (arm-native.h): Add build rule.
10415         (driver-arm.o): Add dependency on arm-native.h.
10417 2018-07-13  Richard Biener  <rguenther@suse.de>
10419         PR middle-end/85974
10420         * match.pd (addr1 - addr2): Allow either of the operand to
10421         have a conversion.
10423 2018-07-13  Tom de Vries  <tdevries@suse.de>
10425         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10426         in remap_ssa_name.
10428 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
10430         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10431         arrays instead of numbered variables.
10433 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
10435         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10436         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10438 2018-07-13  Richard Biener  <rguenther@suse.de>
10440         PR debug/86452
10441         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10442         instead of get_context_die.
10444 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
10445             Richard Biener  <rguenther@suse.de>
10447         PR middle-end/86489
10448         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10449         that the loop latch destination where phi is defined.
10451 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
10453         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10454         (riscv_expand_epilogue): Add assertion to check interrupt mode.
10455         (riscv_set_current_function): Extract getting interrupt type to new
10456         function.
10457         (riscv_get_interrupt_type): New function.
10458         (riscv_merge_decl_attributes): New function, checking interrupt type is
10459         same.
10460         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10462 2018-07-12  Paul Koning  <ni1d@arrl.net>
10464         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10465         directive.
10467 2018-07-12  Paul Koning  <ni1d@arrl.net>
10469         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10470         zero reference, add doloop_end instead.
10471         * doc/md.texi (decrement_and_branch_until_zero): Remove.
10472         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
10473         detail for doloop_end.
10475 2018-07-12  Martin Sebor  <msebor@redhat.com>
10477         PR c/86453
10478         * attribs.c (decl_attributes): Reject conflicting attributes before
10479         calling attribute handlers.
10481 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
10483         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10484          parameter.
10485         (gcc::dump_manager::get_dump_file_name): likewise.
10486         (dump_begin): Likewise.
10487         * dumpfile.h (dump_begin): Update prototype.
10488         (gcc::dump_manager::get_dump_file_name,
10489         gcc::dump_manager::get_dump_file_name): Update prototype.
10491 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10493         * internal-fn.h (vectorizable_internal_fn_p): New function.
10494         * tree-vect-slp.c (compatible_calls_p): Likewise.
10495         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
10496         to internal functions.
10497         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10499 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10501         * fold-const.h (inverse_conditions_p): Declare.
10502         * fold-const.c (inverse_conditions_p): New function.
10503         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
10504         that test the inverse condition of a conditional internal function.
10505         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10506         * internal-fn.c (internal_fn_mask_index): Handle conditional
10507         internal functions.
10508         (vectorized_internal_fn_supported_p): New function.
10509         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10510         (any_pred_load_store): Replace with...
10511         (need_to_predicate): ...this new variable.
10512         (redundant_ssa_names): New variable.
10513         (ifcvt_can_use_mask_load_store): Move initial checks to...
10514         (ifcvt_can_predicate): ...this new function.  Handle tree codes
10515         for which a conditional internal function exists.
10516         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10517         instead of ifcvt_can_use_mask_load_store.  Update after variable
10518         name change.
10519         (predicate_load_or_store): New function, split out from
10520         predicate_mem_writes.
10521         (check_redundant_cond_expr): New function.
10522         (value_available_p): Likewise.
10523         (predicate_rhs_code): Likewise.
10524         (predicate_mem_writes): Rename to...
10525         (predicate_statements): ...this.  Use predicate_load_or_store
10526         and predicate_rhs_code.
10527         (combine_blocks, tree_if_conversion): Update after above name changes.
10528         (ifcvt_local_dce): Handle redundant_ssa_names.
10529         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10530         general conditional functions.
10531         * tree-vect-stmts.c (vectorizable_call): Likewise.
10533 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10534             Alan Hayward  <alan.hayward@arm.com>
10535             David Sherwood  <david.sherwood@arm.com>
10537         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10538         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10539         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10540         plus and minus and convert them into IFN_COND_FMA-based sequences.
10541         (convert_mult_to_fma): Handle conditional plus and minus.
10543 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10545         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10546         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10547         (cond_fnms_optab): New optabs.
10548         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10549         internal functions.
10550         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10551         * internal-fn.h (get_conditional_internal_fn): Declare.
10552         (get_unconditional_internal_fn): Likewise.
10553         * internal-fn.c (cond_ternary_direct): New macro.
10554         (expand_cond_ternary_optab_fn): Likewise.
10555         (direct_cond_ternary_optab_supported_p): Likewise.
10556         (FOR_EACH_COND_FN_PAIR): Likewise.
10557         (get_conditional_internal_fn): New function.
10558         (get_unconditional_internal_fn): Likewise.
10559         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10560         (gimple_match_op::gimple_match_op): Add a new overload for 5
10561         operands.
10562         (gimple_match_op::set_op): Likewise.
10563         (gimple_resimplify5): Declare.
10564         * genmatch.c (decision_tree::gen): Generate simplifications for
10565         5 operands.
10566         * gimple-match-head.c (gimple_simplify): Define an overload for
10567         5 operands.  Handle calls with 5 arguments in the top-level overload.
10568         (convert_conditional_op): Handle conversions from unconditional
10569         internal functions to conditional ones.
10570         (gimple_resimplify5): New function.
10571         (build_call_internal): Pass a fifth operand.
10572         (maybe_push_res_to_seq): Likewise.
10573         (try_conditional_simplification): Try converting conditional
10574         internal functions to unconditional internal functions.
10575         Handle 3-operand unconditional forms.
10576         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10577         Define ternary equivalents of the current rules for binary conditional
10578         internal functions.
10579         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10580         ternary operations.
10581         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10582         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10583         (optab): Handle them.
10584         (SVE_COND_FP_TERNARY): New int iterator.
10585         (sve_fmla_op, sve_fmad_op): New int attributes.
10586         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10587         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10588         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10590 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
10592         * target.def (preferred_else_value): New target hook.
10593         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10594         * doc/tm.texi: Regenerate.
10595         * targhooks.h (default_preferred_else_value): Declare.
10596         * targhooks.c (default_preferred_else_value): New function.
10597         * internal-fn.h (conditional_internal_fn_code): Declare.
10598         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10599         (get_conditional_internal_fn): Use it.
10600         (conditional_internal_fn_code): New function.
10601         * gimple-match.h (gimple_match_cond): New struct.
10602         (gimple_match_op): Add a cond member function.
10603         (gimple_match_op::gimple_match_op): Update all forms to take a
10604         gimple_match_cond.
10605         * genmatch.c (expr::gen_transform): Use the same condition as res_op
10606         for the suboperation, but don't specify a particular else_value.
10607         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10608         (visit_nary_op, visit_reference_op_load): Pass
10609         gimple_match_cond::UNCOND to the gimple_match_op constructor.
10610         * gimple-match-head.c: Include tree-eh.h
10611         (convert_conditional_op): New function.
10612         (maybe_resimplify_conditional_op): Likewise.
10613         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10614         (gimple_resimplify2): Likewise.
10615         (gimple_resimplify3): Likewise.
10616         (gimple_resimplify4): Likewise.
10617         (maybe_push_res_to_seq): Return null for conditional operations.
10618         (try_conditional_simplification): New function.
10619         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
10620         constructor.
10621         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10622         IFN_COND_* call.
10623         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10624         function.
10625         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10627 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
10629         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10630         DECL_FCONTEXT
10631         (hash_tree): Do not hash DECL_FCONTEXT
10632         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10633         Do not stream DECL_FCONTEXT.
10634         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10635         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10637 2018-07-12  Richard Biener  <rguenther@suse.de>
10639         PR debug/86462
10640         * dwarf2out.c (gen_block_die): Only output blocks when they have
10641         at least one !DECL_IGNORED_P variable.
10643 2018-07-12  Richard Biener  <rguenther@suse.de>
10645         PR target/84829
10646         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10647         Remove -mieee-fp handling.
10649 2018-07-12  Richard Biener  <rguenther@suse.de>
10651         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10652         left-over from last patch.
10654 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
10656         PR tree-optimization/86492
10657         * gimple-ssa-store-merging.c
10658         (imm_store_chain_info::coalesce_immediate_stores): Call
10659         check_no_overlap even for the merge_overlapping case.  Formatting fix.
10661 2018-07-12  Richard Biener  <rguenther@suse.de>
10663         PR middle-end/86479
10664         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10665         move possibly trapping operations into the conditional.
10667 2018-07-12  Richard Biener  <rguenther@suse.de>
10669         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10670         (vn_lookup_simplify_result): Remove recursion limit applied
10671         here.
10672         (vn_nary_build_or_lookup_1): Adjust.
10673         (try_to_simplify): Likewise.
10674         * gimple-match-head.c (gimple_resimplify1): Instead apply one
10675         here.
10676         (gimple_resimplify2): Likewise.
10677         (gimple_resimplify3): Likewise.
10678         (gimple_resimplify4): Likewise.
10680 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
10682         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10683         Use __mmask64 type instead of __mmask8 for __M argument.
10684         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10685         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10686         __U argument.
10687         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10688         __mmask16 for __M argument.
10689         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10690         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10691         to __mmask16 instead of __mmask8.
10692         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10693         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10694         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10695         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10696         instead of __mmask16 for __U argument.
10697         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10698         __mmask16 instead of __mmask8 for __U argument.
10699         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10700         __U argument.
10701         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10702         __mmask16.
10703         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10704         argument.
10705         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10706         __U argument.
10707         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10708         __mmask16.
10709         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10710         of __mmask16.
10711         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10712         __U argument.
10713         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10714         __U argument.
10715         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10716         __U argument.
10717         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10718         __U argument.
10719         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10720         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10721         return type as well as __M argument type and all casts from __mmask8
10722         to __mmask32.
10723         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10724         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10725         return type as well as __M argument type and all casts from __mmask8
10726         to __mmask16.
10727         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10728         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10729         return type as well as __M argument type and all casts from __mmask8
10730         to __mmask32.
10731         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10732         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10733         return type as well as __M argument type and all casts from __mmask8
10734         to __mmask16.
10735         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10736         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10737         __mmask16.
10739 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
10741         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10742         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10743         for __U argument.
10745 2018-07-11  Paul Koning  <ni1d@arrl.net>
10747         * doc/md.texi (define_subst): Document how multiple occurrences of
10748         the same argument in the replacement pattern are handled.
10750 2018-07-11  Paul Koning  <ni1d@arrl.net>
10752         * doc/extend.texi (Common Variable Attributes): Move "mode" into
10753         alphabetical order.
10754         (Common Type Attributes): Add "mode" attribute.
10756 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
10758         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10759         stream DECL_ORIGINAL_TYPE.
10760         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10761         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10762         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10763         Do not walk original type.
10764         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10765         external decls.
10766         (write_ts_decl_non_common_tree_pointers): Do not stream
10767         DECL_ORIGINAL_TYPE
10768         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10769         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10771 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
10773         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10774         thread twice from the same starting edge.
10776 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
10778         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10779         * gimple.c (gimple_call_nonnull_result_p): ...here...
10780         (gimple_call_nonnull_arg): ...and here.
10781         * gimple.h (gimple_call_nonnull_result_p): New.
10782         (gimple_call_nonnull_arg): New.
10784 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
10786         * config/arm/arm-cpus.in: Move information from fpu field of each
10787         cpu definition to the isa field.
10788         * config/arm/parsecpu.awk (fpu): Delete match rule.
10789         (gen_comm_data): Don't add bits from the CPU's FPU entry.
10791 2018-07-11  Richard Biener  <rguenther@suse.de>
10793         PR debug/86457
10794         * dwarf2out.c (init_sections_and_labels): Use
10795         output_asm_line_debug_info consistently.
10796         (dwarf2out_early_finish): Likewise.
10797         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10798         type units.
10800 2018-07-11  Richard Biener  <rguenther@suse.de>
10802         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10803         Rework father_bb setting in a way to avoid propagating constants
10804         multiple times on a loop body.
10806 2018-07-10  Mark Wielaard  <mark@klomp.org>
10808         PR debug/86459
10809         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10811 2018-07-10  Richard Biener  <rguenther@suse.de>
10813         * hash-map.h (hash_map::iterator::operator*): Return
10814         references to key and value.
10816 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
10818         PR c++/86443
10819         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10820         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10821         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10822         (gimplify_omp_for): For composite loops, move outer
10823         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10824         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
10825         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
10826         TREE_LIST for both the original class iterator and the "last" helper
10827         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
10828         loop, remember has_decl_expr from outer composite loops for the
10829         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10831 2018-07-09  Martin Sebor  <msebor@redhat.com>
10833         PR middle-end/77357
10834         PR middle-end/86428
10835         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10836         accessing implicitly initialized array elements.
10837         * expr.c (string_constant): Handle string initializers of
10838         character arrays within aggregates.
10839         * gimple-fold.c (fold_array_ctor_reference): Add argument.
10840         Store element offset.  As a special case, handle zero size.
10841         (fold_nonarray_ctor_reference): Same.
10842         (fold_ctor_reference): Add argument.  Store subobject offset.
10843         * gimple-fold.h (fold_ctor_reference): Add argument.
10845 2018-07-09  Paul Koning  <ni1d@arrl.net>
10847         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10848         (pdp11_insn_cost): New function.
10849         (pdp11_md_asm_adjust): New function.
10850         (TARGET_INVALID_WITHIN_DOLOOP): Define.
10851         (pdp11_rtx_costs): Update to match machine better.
10852         (output_addr_const_pdp11): Correct format mismatch warnings.
10853         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10854         * config/pdp11/pdp11.md: General change to add base_cost and/or
10855         length attributes for use by new pdp11_insn_cost function.
10856         (MIN_BRANCH): Correct definition.
10857         (MIN_SOB): Ditto.
10858         (doloop_end): Use standard pattern name for looping pattern.
10859         (doloop_end_nocc): New.
10860         (movsf): Add another constraint alternative.
10861         (zero_extendqihi2): Add constraint alternatives for not in place
10862         extend.
10863         (zero_extendhisi2): Remove.
10864         (shift patterns): Add CC handling variants.
10865         (bswaphi2): New.
10866         (bswapsi2): New.
10867         (rothi3): New.
10868         (define_peephole2): New peephole to recognize mov that sets CC for
10869         subsequent test.
10871 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10873         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10874         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10875         wi::add.
10877 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
10879         PR c/86420
10880         * real.c (real_nextafter): Return true if result is denormal.
10882 2018-07-09  Martin Liska  <mliska@suse.cz>
10884         * common.opt: Add back wrongly removed attribute.
10886 2018-07-09  Richard Biener  <rguenther@suse.de>
10888         PR debug/86413
10889         * dwarf2out.c (gen_block_die): For an early generated DIE
10890         always output high/low PC attributes.
10892 2018-07-09  Tom de Vries  <tdevries@suse.de>
10894         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10895         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10896         onto VAR_DECL with abstract origin.
10898 2018-07-07  Jim Wilson  <jimw@sifive.com>
10900         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10902 2018-07-07  Tom de Vries  <tdevries@suse.de>
10904         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10906 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
10908         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10909         overflow_type.
10910         (combine_bound): Use wide-int overflow calculation instead of
10911         rolling our own.
10912         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10913         overflow_type.
10914         * fold-const.c (int_const_binop_2): Same.
10915         (extract_muldiv_1): Same.
10916         (fold_div_compare): Same.
10917         (fold_abs_const): Same.
10918         * match.pd: Same.
10919         * poly-int.h (add): Same.
10920         (sub): Same.
10921         (neg): Same.
10922         (mul): Same.
10923         * predict.c (predict_iv_comparison): Same.
10924         * profile-count.c (slow_safe_scale_64bit): Same.
10925         * simplify-rtx.c (simplify_const_binary_operation): Same.
10926         * tree-chrec.c (tree_fold_binomial): Same.
10927         * tree-data-ref.c (split_constant_offset_1): Same.
10928         * tree-if-conv.c (idx_within_array_bound): Same.
10929         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
10930         * tree-ssa-phiopt.c (minmax_replacement): Same.
10931         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
10932         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
10933         * vr-values.c (vr_values::adjust_range_with_scev): Same.
10934         * wide-int.cc (wi::add_large): Same.
10935         (wi::mul_internal): Same.
10936         (wi::sub_large): Same.
10937         (wi::divmod_internal): Same.
10938         * wide-int.h: Change overflow type to overflow_type for neg, add,
10939         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
10940         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
10941         mul_internal, divmod_internal.
10942         (overflow_type): New enum.
10943         (accumulate_overflow): New.
10945 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
10947         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
10948         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
10950 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
10952         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
10953         argument is checked for zero before entering loop, avoid checking again.
10955 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
10957         * gimplify.h (generic_expr_could_trap_p): Set as global function.
10958         * gimplify.h (generic_expr_could_trap_p): Likwise.
10959         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
10961 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
10963         PR tree-optimization/86401
10964         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
10965         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
10966         (fold_bit_and_mask): ... here.  New helper function for match.pd.
10967         * fold-const.h (fold_bit_and_mask): Declare.
10968         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
10970 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
10972         PR target/86324
10973         * target.def (translate_mode_attribute): New hook.
10974         * targhooks.h (default_translate_mode_attribute): Declare.
10975         * targhooks.c (default_translate_mode_attribute): New function.
10976         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
10977         * doc/tm.texi: Regenerate.
10978         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
10979         (rs6000_translate_mode_attribute): New function.
10981 2018-07-06  Paul Koning  <ni1d@arrl.net>
10983         * doc/md.texi (define_split): Document DONE and FAIL.
10984         (define_peephole2): Ditto.
10986 2018-07-05  Jeff Law  <law@redhat.com>
10988         PR tree-optimization/86010
10989         * tree-ssa-dse.c (compute_trims): More aggressively trim at
10990         both the head and tail of mem* and str* calls.
10992 2018-07-05  Jim Wilson  <jimw@sifive.com>
10994         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
10996 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
10998         * config/aarch64/aarch64-simd.md: correct flags text for
10999         MIN_EXPR replacement.
11001 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
11003         * configure: Regenerated.
11005 2018-07-05  Carl Love  <cel@us.ibm.com>
11007         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
11008         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
11009         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
11010         VSX_BUILTIN_DOUBLEL_V4SF.
11012 2018-07-05  Martin Sebor  <msebor@redhat.com>
11014         PR c++/86400
11015         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
11016         than its domain to compute its the upper bound of a char array.
11018 2018-07-05  Nathan Sidwell  <nathan@acm.org>
11020         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
11021         * doc/cpp.texi: Update comment.
11022         * doc/tm.texi: Rebuilt.
11023         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
11024         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
11025         * doc/extend.texi (Backwards Compatibility): Clarify it is system
11026         headers affected by extern "C".
11027         * system.h: Poison NO_IMPLICIT_EXTERN_C.
11028         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
11029         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
11030         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
11031         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
11032         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
11033         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
11034         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
11035         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
11036         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
11037         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
11038         config/sparc/sp64-elf.h, config/spu/spu.h,
11039         config/stormy16/stormy16.h, config/v850/v850.h,
11040         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
11041         define NO_IMPLICIT_EXTERN_C.
11042         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
11044 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
11046         PR target/84711
11047         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11048         instead of GET_MODE_SIZE when comparing Units.
11050 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
11052         PR target/84711
11053         * rtlanal.c (set_noop_p): Constrain on mode change,
11054         include hard-reg-set.h
11056 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
11058         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
11060 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
11062         Revert
11063         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
11065         PR sanitizer/84250
11066         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11067         libasan.
11068         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11070 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
11072         PR sanitizer/84250
11073         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11074         libasan.
11075         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11077 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
11079         PR middle-end/86380
11080         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
11082 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
11084         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
11085         neg_*_op* variables.
11087 2018-07-04  Martin Liska  <mliska@suse.cz>
11089         * tree-switch-conversion.c: Define
11090         max_ratio_for_speed and max_ratio_for_size constants.
11092 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
11093             Martin Liska  <mliska@suse.cz>
11095         PR middle-end/66240
11096         PR target/45996
11097         PR c/84100
11098         * common.opt: Rename align options with 'str_' prefix.
11099         * common/config/i386/i386-common.c (set_malign_value): New
11100         function.
11101         (ix86_handle_option): Use it to set -falign-* options/
11102         * config/aarch64/aarch64-protos.h (struct tune_params): Change
11103         type from int to string.
11104         * config/aarch64/aarch64.c: Update default values from int
11105         to string.
11106         * config/alpha/alpha.c (alpha_override_options_after_change):
11107         Likewise.
11108         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
11109         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11110         max skip conditionally.
11111         * config/i386/freebsd.h (SUBALIGN_LOG): New.
11112         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11113         max skip conditionally.
11114         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11115         max skip conditionally.
11116         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
11117         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11118         max skip conditionally.
11119         * config/i386/i386.c (struct ptt): Change type from int to
11120         string.
11121         (ix86_default_align): Set default values.
11122         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
11123         max skip conditionally.
11124         * config/i386/iamcu.h (SUBALIGN_LOG): New.
11125         (ASM_OUTPUT_MAX_SKIP_ALIGN):
11126         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
11127         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11128         max skip conditionally.
11129         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
11130         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
11131         * config/i386/x86-64.h (SUBALIGN_LOG): New.
11132         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11133         max skip conditionally.
11134         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11135         * config/ia64/ia64.c (ia64_option_override): Set default values
11136         for alignment options.
11137         * config/m68k/m68k.c: Handle new str_align_* options.
11138         * config/mips/mips.c (mips_set_compression_mode): Change
11139         type of constants.
11140         (mips_option_override): Set default values for options.
11141         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
11142         Likewise.
11143         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11144         Likewise.
11145         * config/rx/rx.c (rx_option_override): Likewise.
11146         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
11147         (LABEL_ALIGN): Use align_labels_log.
11148         (LOOP_ALIGN): Use align_loops_align.
11149         * config/s390/s390.c (s390_asm_output_function_label): Use new
11150         macros.
11151         * config/sh/sh.c (sh_override_options_after_change):
11152         Change type of constants.
11153         * config/spu/spu.c (spu_sched_init): Likewise.
11154         * config/sparc/sparc.c (sparc_option_override): Set default
11155         values for options.
11156         * config/visium/visium.c (visium_option_override): Likewise.
11157         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
11158         emit p2align format with last argument if it's not needed.
11159         * doc/invoke.texi: Document extended format of -falign-*.
11160         * final.c: Use align_labels alignment.
11161         * flags.h (struct target_flag_state): Change type to use
11162         align_flags.
11163         (struct align_flags_tuple): New.
11164         (struct align_flags): Likewise.
11165         (align_loops_log): Redefine macro to use new types.
11166         (align_loops_max_skip): Redefine macro to use new types.
11167         (align_jumps_log): Redefine macro to use new types.
11168         (align_jumps_max_skip): Redefine macro to use new types.
11169         (align_labels_log): Redefine macro to use new types.
11170         (align_labels_max_skip): Redefine macro to use new types.
11171         (align_functions_log): Redefine macro to use new types.
11172         (align_loops): Redefine macro to use new types.
11173         (align_jumps): Redefine macro to use new types.
11174         (align_labels): Redefine macro to use new types.
11175         (align_functions): Redefine macro to use new types.
11176         (align_functions_max_skip): Redefine macro to use new types.
11177         (align_loops_value): New macro.
11178         (align_jumps_value): New macro.
11179         (align_labels_value): New macro.
11180         (align_functions_value): New macro.
11181         * function.c (invoke_set_current_function_hook): Propagate
11182         alignment values from flags to global variables default in
11183         topleev.h.
11184         * ipa-icf.c (sem_function::equals_wpa): Use
11185         cl_optimization_option_eq instead of memcmp.
11186         * lto-streamer.h (cl_optimization_stream_out): Support streaming
11187         of string types.
11188         (cl_optimization_stream_in): Likewise.
11189         * optc-save-gen.awk: Support strings in cl_optimization.
11190         * opth-gen.awk: Likewise.
11191         * opts.c (finish_options): Remove error checking of invalid
11192         value ranges.
11193         (MAX_CODE_ALIGN): Remove.
11194         (MAX_CODE_ALIGN_VALUE): Likewise.
11195         (parse_and_check_align_values): New function.
11196         (check_alignment_argument): Likewise.
11197         (common_handle_option): Use check_alignment_argument.
11198         * opts.h (parse_and_check_align_values): Declare.
11199         * toplev.c (init_alignments): Remove.
11200         (read_log_maxskip): New.
11201         (parse_N_M): Likewise.
11202         (parse_alignment_opts): Likewise.
11203         (backend_init_target): Remove usage of init_alignments.
11204         * toplev.h (parse_alignment_opts): Declare.
11205         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
11206         argument.
11207         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
11208         * tree.c (cl_option_hasher::equal): New.
11209         * varasm.c: Use new global macros.
11211 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
11213         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11214         Use a simpler align directive also if MAXSKIP = ALIGN-1.
11215         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11216         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11217         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11218         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11219         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11220         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11221         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11222         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11223         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11224         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11225         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11227 2018-07-04  Martin Liska  <mliska@suse.cz>
11228             Jonathan Wakely  <jwakely@redhat.com>
11230         * coverage.c: Use correct type.
11231         * doc/invoke.texi: Language correction.
11233 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
11235         PR target/85620
11236         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11237         ENDBRANCH for non-tail call which may return via indirect branch.
11238         * doc/extend.texi: Document indirect_return attribute.
11240 2018-07-03  Martin Sebor  <msebor@redhat.com>
11242         PR tree-optimization/86274
11243         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11244         precondition.
11245         (format_floating): Correct handling of infinities and NaNs.
11247 2018-07-03  Martin Sebor  <msebor@redhat.com>
11249         * print-tree.c (print_real_cst): New function.
11250         (print_node_brief): Call it.
11251         (print_node): Ditto.
11253 2018-07-03  Jeff Law  <law@redhat.com>
11255         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11256         into a single pattern.
11258         * config/h8300/h8300.md (ors code_iterator): New.
11259         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11260         a single pattern and single splitter.
11261         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11262         (iorqi3_1, xorqi3_1): Likewise.
11263         (iorqi3, xorqi3 expanders): Similarly.
11265         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11266         (movmd_internal) into a single pattern using the P mode iterator.
11267         (movmd splitters): Similarly.
11268         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11269         (movsd splitters): Similarly.
11271         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11272         ADDB, ADDW and ADDL into a single ADD attribute which selects the
11273         right table based on the size of the operand.
11274         * config/h8300/h8300.md (length_table): Corresponding changes. All
11275         references to "addb", "addw" and "addl" changed to "add".
11276         (btst patterns): Merge two variants into a single pattern.
11277         (tstqi, tsthi): Likewise.
11278         (addhi3_incdec, addsi3_incdec): Likewise.
11279         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11280         (mulhi3, mulsi3): Likewise.
11281         (udivhi3, udivsi3): Likewise.
11282         (divhi3, divsi3): Likewise.
11283         (andorqi3, andorhi3, andorsi3): Likewise.
11285 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
11287         PR target/85694
11288         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11289         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11291 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11293         PR tree-optimization/85694
11294         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11295         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11296         UNSPEC_URHADD.
11297         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11298         (<u>avg<mode>3_ceil): New patterns.
11300 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
11302         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11303         scan-tree-dump directive.
11304         * gcc.dg/vect/slp-perm-2.c: Likewise.
11305         * gcc.dg/vect/slp-perm-3.c: Likewise.
11306         * gcc.dg/vect/slp-perm-5.c: Likewise.
11307         * gcc.dg/vect/slp-perm-6.c: Likewise.
11308         * gcc.dg/vect/slp-perm-7.c: Likewise.
11309         * gcc.dg/vect/slp-perm-8.c: Likewise.
11311 2018-07-03  Marek Polacek  <polacek@redhat.com>
11313         PR middle-end/86202
11314         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11316 2018-07-03  Richard Biener  <rguenther@suse.de>
11318         PR ipa/86389
11319         * tree-ssa-structalias.c (find_func_clobbers): Properly
11320         handle indirect calls.
11322 2018-07-03  Jeff Law  <law@redhat.com>
11324         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11325         (shifts): New code iterator.
11326         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11327         expander.  Fix HImode handling on H8/SX.
11328         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11329         (subqi3, subhi3, subsi3 expanders): Likewise.
11330         (andqi3, andhi3, andsi3 expanders): Likewise.
11331         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11332         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11333         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11334         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11335         (zero_extendqihi2, zero_extendqisi2): Likewise.
11336         (extendqihi2, extendqisi2): Likewise.
11337         (rotlqi3, rotlhi3, rotlsi3): Likewise.
11338         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11339         (rotlqi3_1, rotlhi3_1): Likewise.
11340         (logicalhi3_sn, logicalsi3_sn): Likewise.
11341         (logicalhi3, logicalsi3): Likewise.
11343 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11345         * tree-vect-patterns.c (vect_recog_rotate_pattern)
11346         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11347         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11348         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11349         type to append_pattern_def_seq instead of creating a stmt_vec_info
11350         directly.
11351         (build_mask_conversion): Likewise.  Remove vinfo argument.
11352         (vect_add_conversion_to_patterm): Likewise, renaming to...
11353         (vect_add_conversion_to_pattern): ...this.
11354         (vect_recog_mask_conversion_pattern): Update call to
11355         build_mask_conversion.  Pass the vector type to
11356         append_pattern_def_seq here too.
11357         (vect_recog_gather_scatter_pattern): Update call to
11358         vect_add_conversion_to_pattern.
11360 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11362         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11363         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11364         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11365         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11366         STMT_VINFO_PATTERN_DEF_SEQ to null here.
11367         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11368         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11369         append_pattern_def_seq instead of new_pattern_def_seq.
11370         (vect_recog_divmod_pattern): Do both of the above.
11371         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11372         is null.
11374 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11376         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11377         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11378         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11379         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11380         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11381         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11382         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11383         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11384         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11385         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11386         parameter with a single stmt_vec_info.
11387         (vect_recog_func_ptr): Likewise.
11388         (vect_recog_gather_scatter_pattern): Likewise, folding in...
11389         (vect_try_gather_scatter_pattern): ...this.
11390         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11391         the stmt_vec_info of the statement to be matched.  Don't clear
11392         STMT_VINFO_RELATED_STMT.
11393         (vect_pattern_recog): Update call accordingly.
11395 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11397         PR tree-optimization/85694
11398         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11399         (uavgM3_ceil): Document new optabs.
11400         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11401         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11402         functions.
11403         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11404         (savg_ceil_optab): New optabs.
11405         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11406         (vect_vect_recog_func_ptrs): Add it.
11407         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11408         constant directly from the associated lhs.
11410 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11412         * tree-vect-patterns.c (vect_split_statement): New function.
11413         (vect_convert_input): Use it to try to split an existing cast.
11415 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11417         * poly-int.h (print_hex): New function.
11418         * dumpfile.h (dump_dec, dump_hex): Declare.
11419         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11420         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11421         min_input_precision, operation_precision and operation_sign.
11422         * tree-vect-patterns.c (vect_get_range_info): New function.
11423         (vect_same_loop_or_bb_p, vect_single_imm_use)
11424         (vect_operation_fits_smaller_type): Delete.
11425         (vect_look_through_possible_promotion): Add an optional
11426         single_use_p parameter.
11427         (vect_recog_over_widening_pattern): Rewrite to use new
11428         stmt_vec_info infomration.  Handle one operation at a time.
11429         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11430         (vect_truncatable_operation_p, vect_set_operation_type)
11431         (vect_set_min_input_precision): New functions.
11432         (vect_determine_min_output_precision_1): Likewise.
11433         (vect_determine_min_output_precision): Likewise.
11434         (vect_determine_precisions_from_range): Likewise.
11435         (vect_determine_precisions_from_users): Likewise.
11436         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11437         (vect_vect_recog_func_ptrs): Put over_widening first.
11438         Add cast_forwprop.
11439         (vect_pattern_recog): Call vect_determine_precisions.
11441 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
11443         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11444         statements that have been replaced by further pattern statements.
11445         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11447 2018-07-03  Richard Biener  <rguenther@suse.de>
11449         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11450         always set *dt.  Dump vectype in vectype overload.
11451         * dumpfile.h (dump_gimple_expr): New function.
11452         (dump_gimple_expr_loc): Likewise.
11453         * dumpfile.c (dump_gimple_expr): New function.
11454         (dump_gimple_expr_loc): Likewise.
11456 2018-07-02  Jeff Law  <law@redhat.com>
11458         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11459         the H8/300, H8/300H and H8/S variants into a single pattern.
11460         (movhi_h8300, movqi_h8300hs): Similarly.
11461         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11462         (QHI mode iterator): New.
11464         * config/h8300/h8300.md: Remove trailing whitespace.
11466 2018-07-02  Jim Wilson  <jimw@sifive.com>
11468         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11469         instead of emit_insn for interrupt returns.
11470         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11471         (riscv_sret, riscv_uret): Likewise.
11473 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
11475         * pretty-print.c (selftest::test_pp_format): Move save and restore
11476         of quotes to class auto_fix_quotes, and add an instance.
11477         * selftest.c: Include "intl.h".
11478         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11479         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11480         * selftest.h (selftest::auto_fix_quotes): New class.
11482 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
11484         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11485         (aarch64_sve_prepare_conditional_op): Remove.
11486         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11487         Allow aarch64_simd_reg_or_zero as select operand; remove
11488         the aarch64_sve_prepare_conditional_op call.
11489         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11490         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11491         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11492         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11493         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11494         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11495         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11496         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11497         and a splitters to match all of the *_any patterns.
11498         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11500         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11501         (SVE_COND_FP_BINARY_REV): Remove.
11502         (sve_int_op_rev, sve_fp_op_rev): New.
11503         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11504         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11505         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11506         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11507         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11508         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11509         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11510         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11511         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11513         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11514         Remove match_dup 1 from the inner unspec.
11515         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11517         * config/aarch64/aarch64.md (movprfx): New attr.
11518         (length): Default movprfx to 8.
11519         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11520         (*madd<SVE_I>, *msub<SVE_I): Likewise.
11521         (*<su>mul<SVE_I>3_highpart): Likewise.
11522         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11523         (*v<ASHIFT><SVE_I>3): Likewise.
11524         (*<su><MAXMIN><SVE_I>3): Likewise.
11525         (*<su><MAXMIN><SVE_F>3): Likewise.
11526         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11527         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11528         (*div<SVE_F>4): Likewise.
11530 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
11532         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11533         in dump string.
11535 2018-07-02  Richard Biener  <rguenther@suse.de>
11537         PR tree-optimization/86363
11538         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11539         memset argument refers to a non-variable address.
11541 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
11543         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11544         {PLUS,MINUS}_EXPR code to...
11545         (adjust_symbolic_bound): ...here,
11546         (combine_bound): ...here,
11547         (set_value_range_with_overflow): ...and here.
11549 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
11551         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11552         code...
11553         (extract_range_from_abs_expr): ...here.
11555 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
11557         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11558         -fno-omit-frame-pointer when not optimizing.
11560 2018-07-02  Martin Liska  <mliska@suse.cz>
11562         PR ipa/86279
11563         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11564         (propagate_nothrow): Likewise.
11566 2018-07-02  Martin Liska  <mliska@suse.cz>
11568         PR ipa/86323
11569         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11571 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
11573         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11574         function in r262149, changing "loc" param from source_location to
11575         const dump_location_t &.
11576         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11577         declaration, as above.
11579 2018-07-01  Paul Koning  <ni1d@arrl.net>
11581         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11582         -munit-asm, -mgnu-asm, -mdec-asm.
11583         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11584         (pdp11_output_labelref): New.
11585         (pdp11_output_def): New.
11586         (pdp11_output_addr_vec_elt): New.
11587         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
11588         %# and %@ format codes.
11589         (pdp11_option_override): New.
11590         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11591         (pdp11_output_ident): New.
11592         (pdp11_asm_named_section): New.
11593         (pdp11_asm_init_sections): New.
11594         (pdp11_file_start): New.
11595         (pdp11_file_end): New.
11596         (output_ascii): Use .ascii/.asciz for -mdec-asm.
11597         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
11598         %o, like %c but octal.
11599         (pdp11_option_override): New.
11600         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11601         -mdec-asm.
11602         (DATA_SECTION_ASM_OP): Ditto.
11603         (READONLY_DATA_SECTION_ASM_OP): New.
11604         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11605         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11606         (ASM_OUTPUT_LABELREF): Ditto.
11607         (ASM_OUTPUT_DEF): Ditto.
11608         (ASM_OUTPUT_EXTERNAL): New.
11609         (ASM_OUTPUT_SOURCE_FILENAME): New.
11610         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11611         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11612         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
11613         %# and %@ format codes.
11614         * config/pdp11/pdp11.opt (mgnu-asm): New.
11615         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11616         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11617         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11619 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
11621         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11622         dereferencing path[] beyond its length.
11623         (debug_path): New.
11624         (debug_all_paths): New.
11625         (rewire_first_differing_edge): New.
11626         (adjust_paths_after_duplication): New.
11627         (duplicate_thread_path): Call adjust_paths_after_duplication.
11628         Add new argument.
11629         (thread_through_all_blocks): Add new argument to
11630         duplicate_thread_path.
11632 2018-06-30  Jim Wilson  <jimw@sifive.com>
11634         * config/riscv/predicates.md (p2m1_shift_operand): New.
11635         (high_mask_shift_operand): New.
11636         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11637         pattern using p2m1_shift_operand.
11638         (lshsi3_zero_extend_3+2): New combiner pattern using
11639         high_mask_shift_operand.
11641 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11643         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11644         split out from...
11645         (vect_recog_rotate_pattern): ...here.
11646         (vect_convert_input): Try to insert casts of invariants in the
11647         preheader.
11648         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11649         preheader to be empty.
11651 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11653         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11654         vector type.  If given, install it in the new statement's
11655         STMT_VINFO_VECTYPE.
11656         (vect_element_precision): New function.
11657         (vect_unpromoted_value): New struct.
11658         (vect_unpromoted_value::vect_unpromoted_value): New function.
11659         (vect_unpromoted_value::set_op): Likewise.
11660         (vect_look_through_possible_promotion): Likewise.
11661         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11662         (vect_widened_op_tree, vect_convert_input): Likewise.
11663         (vect_convert_inputs, vect_convert_output): Likewise.
11664         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11665         to handle the optional cast of the multiplication result and
11666         vect_widened_op_tree to detect the widened multiplication itself.
11667         Do not require the input and output of promotion casts to have
11668         the same sign, but base the signedness of the operation on the
11669         input rather than the result.  If the pattern includes two
11670         promotions, check that those promotions have the same sign.
11671         Do not restrict the MULT_EXPR handling to a double-width result;
11672         handle quadruple-width results and wider.  Use vect_convert_inputs
11673         to convert the inputs to the common type.
11674         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
11675         to handle the optional cast of the ABS result.  Also allow a sign
11676         change or a sign extension between the ABS and MINUS.
11677         Use vect_widened_op_tree to detect the widened subtraction and use
11678         vect_convert_inputs to convert the inputs to the common type.
11679         (vect_handle_widen_op_by_const): Delete.
11680         (vect_recog_widen_op_pattern): New function.
11681         (vect_recog_widen_mult_pattern): Use it.
11682         (vect_recog_widen_shift_pattern): Likewise.
11683         (vect_recog_widen_sum_pattern): Use
11684         vect_look_through_possible_promotion to handle the promoted
11685         PLUS_EXPR operand.
11687 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11689         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11690         the containing gimple_seq *.
11691         * gimple-iterator.h (gsi_for_stmt): Declare it.
11692         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11693         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11694         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11695         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11696         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11697         checks.
11698         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11699         split out from...
11700         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
11701         statement being replaced is part of an existing pattern
11702         definition sequence, inserting the new pattern statements before
11703         the original one.
11704         (vect_pattern_recog_1): Don't return a bool.  If the statement
11705         is already part of a pattern, instead apply pattern matching
11706         to the pattern definition statements.  Don't clear the
11707         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11708         (vect_pattern_recog): Don't break after the first match;
11709         continue processing the pattern definition statements instead.
11710         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11712 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11714         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11715         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11716         (vect_recog_widen_sum_pattern): Use it.
11718 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11720         * tree-vect-loop.c (vectorizable_reduction): Assert that the
11721         phi is not a pattern statement and has not been replaced by
11722         a pattern statement.
11723         * tree-vect-patterns.c (type_conversion_p): Don't check
11724         STMT_VINFO_IN_PATTERN_P.
11725         (vect_recog_vector_vector_shift_pattern): Likewise.
11726         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11727         the pattern statement rather than the original statement; check
11728         directly for a WIDEN_MULT_EXPR here.
11729         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11730         vect_is_simple_use to return the pattern statement rather
11731         than the original statement; use is_pattern_stmt_p to check
11732         for such a pattern statement.
11733         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11734         to return the pattern statement rather than the original statement;
11735         don't do the same transformation here.
11736         (vect_is_simple_use): If the defining statement has been replaced
11737         by a pattern statement, return the pattern statement instead.
11738         Remove the corresponding (local) transformation from the vectype
11739         overload.
11741 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
11743         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11744         end and default to null.
11745         * tree-vect-loop.c (vect_create_epilog_for_reduction)
11746         (vectorizable_reduction): Update calls accordingly, dropping the
11747         gimple ** argument if the passed-back statement isn't needed.
11748         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11749         (vect_recog_rotate_pattern): Likewise.
11750         (vect_recog_mask_conversion_pattern): Likewise.
11751         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11752         (vect_mask_constant_operand_p): Likewise.
11753         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11754         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11755         (get_group_load_store_type, get_load_store_type): Likewise.
11756         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11757         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11758         (vectorizable_conversion, vectorizable_assignment): Likewise.
11759         (vectorizable_shift, vectorizable_operation): Likewise.
11760         (vectorizable_store, vect_is_simple_cond): Likewise.
11761         (vectorizable_condition, vectorizable_comparison): Likewise.
11762         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11763         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11764         and move it to the end.  Cope with null def_stmt_outs.
11766 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11768         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11770 2018-06-29  Jeff Law  <law@redhat.com>
11772         * config/v850/v850.c (v850_legitimate_address_p): Handle large
11773         displacements for TARGET_V850E2V3 and newer.
11774         (TARGET_LRA_P): Remove.  Defaults to LRA now.
11775         * config/v850/v850.md (sign23byte_load): Remove.
11776         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11777         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11779 2018-06-29  Martin Liska  <mliska@suse.cz>
11781         PR lto/85759
11782         * coverage.c (coverage_init): Mangle full path name.
11783         * doc/invoke.texi: Document the change.
11784         * gcov-io.c (mangle_path): New.
11785         * gcov-io.h (mangle_path): Likewise.
11786         * gcov.c (mangle_name): Use mangle_path for path mangling.
11788 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11790         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11791         if starting source register is not even.
11793 2018-06-29  Martin Liska  <mliska@suse.cz>
11795         PR tree-optimization/86263
11796         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11797         Make edge redirection.
11799 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
11801         * dumpfile.c (dump_loc): Add indentation based on scope depth.
11802         (dump_scope_depth): New variable.
11803         (get_dump_scope_depth): New function.
11804         (dump_begin_scope): New function.
11805         (dump_end_scope): New function.
11806         * dumpfile.h (get_dump_scope_depth): New declaration.
11807         (dump_begin_scope): New declaration.
11808         (dump_end_scope): New declaration.
11809         (class auto_dump_scope): New class.
11810         (AUTO_DUMP_SCOPE): New macro.
11811         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11812         AUTO_DUMP_SCOPE.
11814 2018-06-29  Richard Biener  <rguenther@suse.de>
11816         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11817         compute_all_dependences succeeds.
11818         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11819         exceed --param loop-max-datarefs-for-datadeps.
11821 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
11823         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11825 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
11827         PR target/86348
11828         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11829         alternative 0 in preferred_for_speed attribute.
11831 2018-06-28  Paul Koning  <ni1d@arrl.net>
11833         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11834         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11835         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11836         * config/pdp11/pdp11.md: Correct "length" attribute calculation
11837         for shift insn patterns.
11839 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
11841         * cgraph.c (cgraph_node::get_body): Replace assignments to
11842         "dump_file" with calls to set_dump_file.
11843         * dumpfile.c (alt_dump_file): Make static, and group with...
11844         (alt_flags): ...this definition.
11845         (dumps_are_enabled): New variable.
11846         (refresh_dumps_are_enabled): New function.
11847         (set_dump_file): New function.
11848         (set_alt_dump_file): New function.
11849         (gcc::dump_manager::dump_start): Replace assignments to
11850         "dump_file" and "alt_dump_file" with calls to set_dump_file and
11851         set_alt_dump_file.
11852         (gcc::dump_manager::dump_finish): Likewise.
11853         * dumpfile.h (alt_dump_file): Delete decl.
11854         (dumps_are_enabled): New variable decl.
11855         (set_dump_file): New function decl.
11856         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11857         global.
11858         * tree-nested.c (lower_nested_functions): Replace assignments to
11859         "dump_file" with calls to set_dump_file.
11861 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
11863         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11864         goto_locus of each outgoing edge of each basic block.
11866 2018-06-28  Richard Biener  <rguenther@suse.de>
11868         * dwarf2out.c (decl_scope_table): Remove.
11869         (push_decl_scope): Likewise.
11870         (pop_decl_scope): Likewise.
11871         (gen_type_die_for_member): Do not call push/pop_decl_scope.
11872         (gen_struct_or_union_type_die): Likewise.
11873         (gen_tagged_type_die): Likewise.
11874         (dwarf2out_init): Do not initialize decl_scope_table.
11875         (dwarf2out_c_finalize): Do not free it.
11877 2018-06-28  Richard Biener  <rguenther@suse.de>
11879         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11880         deciding whether to not re-use a DIE.
11882 2018-06-28  Richard Biener  <rguenther@suse.de>
11884         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11885         DW_AT_abstract_origin attribute.
11887 2018-06-28  Martin Liska  <mliska@suse.cz>
11889         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11890         Use newly introduced constants.
11891         * tree-switch-conversion.h (struct jump_table_cluster):
11892         Define max_ratio_for_size and max_ratio_for_speed.
11894 2018-06-28  Martin Liska  <mliska@suse.cz>
11896         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11897         Add new checking assert to catch invalid state.
11898         (jump_table_cluster::can_be_handled): Handle single case
11899         clusters.
11900         (jump_table_cluster::is_beneficial): Bail out for such case.
11901         (bit_test_cluster::find_bit_tests):
11902         Add new checking assert to catch invalid state.
11903         (bit_test_cluster::can_be_handled): Handle single case
11904         clusters.
11905         (bit_test_cluster::is_beneficial): Bail out for such case.
11906         (switch_decision_tree::analyze_switch_statement):
11907         Fix comment.
11909 2018-06-28  Martin Liska  <mliska@suse.cz>
11911         * common.opt: Introduce -completion option.
11912         * gcc.c (driver_handle_option): Handle it.
11913         (driver::main): Print completions if completion
11914         is set.
11915         * opt-suggestions.c (option_proposer::get_completions):
11916         New function.
11917         (option_proposer::suggest_completion): Likewise.
11918         (option_proposer::find_param_completions): Likewise.
11919         (verify_autocompletions): Likewise.
11920         (test_completion_valid_options): Likewise.
11921         (test_completion_valid_params): Likewise.
11922         (in_completion_p): Likewise.
11923         (empty_completion_p): Likewise.
11924         (test_completion_partial_match): Likewise.
11925         (test_completion_garbage): Likewise.
11926         (opt_proposer_c_tests): Likewise.
11927         * opt-suggestions.h: Declare new functions.
11928         * opts.c (common_handle_option): Handle OPT__completion_.
11929         * selftest-run-tests.c (selftest::run_tests): Add
11930         opt_proposer_c_tests.
11931         * selftest.c (assert_str_startswith): New.
11932         * selftest.h (assert_str_startswith): Likewise.
11933         (opt_proposer_c_tests): New.
11934         (ASSERT_STR_STARTSWITH): Likewise.
11936 2018-06-28  Martin Liska  <mliska@suse.cz>
11938         * Makefile.in: Add opt-suggestions.o.
11939         * gcc-main.c: Include opt-suggestions.h.
11940         * gcc.c (driver::driver): Likewise.
11941         (driver::~driver): Remove m_option_suggestions.
11942         (driver::build_option_suggestions): Moved to option_proposer.
11943         (driver::suggest_option): Likewise.
11944         (driver::handle_unrecognized_options): Use option_proposer.
11945         * gcc.h (class driver): Add new memver m_option_proposer.
11946         * opt-suggestions.c: New file.
11947         * opt-suggestions.h: New file.
11949 2018-06-28  Martin Liska  <mliska@suse.cz>
11951         * vec.h (class auto_string_vec): New (moved from auto_argvec).
11952         (auto_string_vec::~auto_string_vec): Likewise.
11954 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
11956         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
11957         prevent_decl_creation_for_types fields up and add reset_location field.
11958         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
11959         statement if id->reset_location is true.
11960         (copy_edges_for_bb): Do not set goto_locus on the new edges if
11961         id->reset_location is true.
11962         (copy_phis_for_bb): Force input_location on the arguments if
11963         id->reset_location is true.
11964         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
11965         is set on the function to be inlined.
11967 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
11969         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
11971 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
11973         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
11974         registers for Pmode.
11975         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
11976         hard registers for the clobbered pseudo.
11978 2018-06-27  Paul Koning  <ni1d@arrl.net>
11980         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11981         mutually exclusive options.
11982         * config/pdp11/constraints.md (h): New constraint.
11983         (O): Update definition to match shift code generation.
11984         (D): New constraint.
11985         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
11986         (CCFP): Remove.
11987         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
11988         function.
11989         (output_jump): Change arguments.
11990         (pdp11_fixed_cc_regs): New function.
11991         (pdp11_cc_mode): Ditto.
11992         (pdp11_expand_shift): Ditto.
11993         (pdp11_assemble_shift): Ditto.
11994         (pdp11_small_shift): Ditto.
11995         (pdp11_branch_cost): Remove.
11996         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
11997         from output.
11998         (pdp11_register_move_cost): Update for CC registers.
11999         (pdp11_rtx_costs): Add case for LSHIFTRT.
12000         (pdp11_output_jump): Add CCNZ mode conditional branches.
12001         (notice_update_cc_on_set): Remove.
12002         (pdp11_cc_mode): New function.
12003         (simple_memory_operand): Correct pre/post decrement case.
12004         (no_side_effect_operand): New function.
12005         (pdp11_regno_reg_class): Add CC_REGS class.
12006         (pdp11_fixed_cc_regs): New function.
12007         (pdp11_small_shift): New function.
12008         (pdp11_expand_shift): New function to expand shift insns.
12009         (pdp11_assemble_shift): New function to output shifts.
12010         (pdp11_branch_cost): Remove.
12011         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
12012         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
12013         (WCHAR_TYPE): Ditto.
12014         (PTRDIFF_TYPE): Ditto.
12015         (ADJUST_INSN_LENGTH): New macro.
12016         (FIXED_REGISTERS): Add CC registers.
12017         (CALL_USED_REGISTERS): Ditto.
12018         (reg_class): Ditto.
12019         (REG_CLASS_NAMES): Ditto.
12020         (REG_CLASS_CONTENTS): Ditto.
12021         (SELECT_CC_MODE): Use new function.
12022         (TARGET_FLAGS_REGNUM): New macro.
12023         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
12024         (cc0_reg_rtx): Remove.
12025         (CC_STATUS_MDEP): Remove.
12026         (CC_STATUS_MDEFP_INIT): Remove.
12027         (CC_IN_FPU): Remove.
12028         (NOTICE_UPDATE_CC): Remove.
12029         (REGISTER_NAMES): Add CC registers.
12030         (BRANCH_COST): Change to constant 1.
12031         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
12032         handling.
12033         * config/pdp11/pdp11.opt (mbcopy): Remove.
12034         (mbcopy-builtin): Remove.
12035         (mbranch-cheap): Remove.
12036         (mbranch-expensive): Remove.
12037         * config/pdp11/predicates.md (expand_shift_operand): Update to
12038         match shift code generation.
12039         (ccnz_operator): New predicate.
12040         * doc/invoke.texi (PDP-11 Options): Remove deleted options
12041         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
12042         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
12043         exclusive options.
12044         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
12045         description of O constraint.
12047 2018-06-27  Jeff Law  <law@redhat.com>
12048             Austin Law  <austinklaw@gmail.com>
12050         * config/v850/v850.md (addsi3_set_flags): New pattern.
12051         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
12052         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
12053         (zero_extendhisi2_v850_set_flags): Likewise.
12054         (zero_extendqisi2_v850_set_flags): Likewise.
12055         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
12056         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
12057         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
12059         * config/v850/v850-protos.h (notice_update_cc): Remove.
12060         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
12061         (v850_print_operand): Handle 'D' and "d".
12062         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
12063         Add handling of arithmetic/logical operations compared against zero.
12064         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
12065         Do not look at v850_compare_op, instead get mode from last argument.
12066         (v850_gen_compare): Remove
12067         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
12068         after reload for prologue insns.
12069         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
12070         patterns.
12071         (construct_save_jarl): Likewise.
12072         (TARGET_FLAGS_REGNUM): Define.
12073         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
12074         (NOTICE_UPDATE_CC): Remove.
12075         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
12076         than cc0.  Conditionalize on reload_completed.
12077         (cmpsi_insn, setfcc_insn): Likewise.
12078         (tst1 splitter): Turn into define_and_split which sets the flags
12079         after reload.
12080         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
12081         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
12082         (cstoresf4, cstoredf4): Clobber the flags.
12083         (cmpsi, cmpsf, cmpdf): Remove expanders.
12084         (setf_insn): Remove pattern.
12085         (addsi3): Turn into define_and_split which clobbers the flags after
12086         reload and a suitable pattern (addsi3_clobber_flags) for use after
12087         reload.
12088         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
12089         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
12090         (ashrsi3, ashrsi3_v850e2): Likewise.
12091         (bins): Clobber the flags.
12092         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
12093         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
12094         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
12095         (call_value_internal_short, call_value_internal_long): Likewise.
12096         (callt_save_interrupt, callt_return_interrupt): Likewise.
12097         (save_interrupt, return_interrupt): Likewise.
12098         (callt_save_all_interrupt, save_all_interrupt): Likewise.
12099         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
12100         (restore_all_interrupt, _restore_all_interrupt): Likewise.
12101         (All FP comparisons): Only allow after reload has completed.
12102         (trfsr): Likewise.
12103         (divh, divhu): Tweak output template.
12104         (branch_z_normal, branch_z_invert): Remove
12105         (branch_nz_normal, branch_nz_invert): Likewise.
12106         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
12108         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
12109         * config/v850/v850.c (notice_update_cc): Remove.
12110         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
12111         (CC_NO_CARRY): Likewise.
12112         (NOTICE_UPDATE_CC): Define to nothing.
12113         * config/v850/v850.md: Remove block comment on cc0 handling
12114         Remove "cc" attribute from all patterns.  Remove cc_status handling
12115         from all patterns.  Minor formatting fixes.
12117 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12119         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
12120         (cortex-a76.cortex-a55): Likewise.
12121         * config/aarch64/aarch64-tune.md: Regenerate.
12122         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
12123         cortex-a76.cortex-a55.
12125 2018-06-27  Jeff Law  <law@redhat.com>
12127         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
12128         (MULTILIB_DIRNAMES): Similarly.
12130 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
12132         * gimple.h (gimple_return_retbnd): Delete.
12133         (gimple_return_set_retbnd): Likewise.
12134         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
12135         gimple_return_set_retbnd.
12136         * gimple-pretty-print.c (dump_gimple_return): Remove call to
12137         gimple_return_retbnd and adjust.
12138         * tree-inline.h (struct copy_body_data): Remove retbnd field.
12139         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
12140         Explicitly return NULL in a couple more cases.  Move assertion
12141         on debug statements and remove unreachable code.
12142         (reset_debug_binding): Do not test id->retbnd.
12143         (expand_call_inline): Do not set it.
12145 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
12147         * configure.ac: Add --disable-gcov option.
12148         * configure: Regenerate.
12149         * Makefile.in: Honour @enable_gcov@.
12150         * doc/install.texi: Document --disable-gcov.
12152 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12154         * config/arm/arm-cpus.in (cortex-a76): New entry.
12155         (cortex-a76.cortex-a55): Likewise.
12156         * config/arm/arm-tables.opt: Regenerate.
12157         * config/arm/arm-tune.md: Likewise.
12158         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
12159         * doc/invoke.texi (ARM Options): Document cortex-a76 and
12160         cortex-a76.cortex-a55.
12162 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
12164         PR target/85769
12165         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
12167 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
12169         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
12170         comment.
12171         (EPILOGUE_USES): Likewise.
12173 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
12175         * tree-inline.c (remap_location): New function extracted from...
12176         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
12177         (copy_phis_for_bb): ...here.  Call remap_location.
12178         (copy_cfg_body): Adjust call to copy_edges_for_bb.
12180 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
12182         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
12183         unaligned vsx for 16B memset.
12185 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
12187         PR target/86285
12188         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
12189         ieee128_float_type_node to long_double_type_node unless
12190         TARGET_LONG_DOUBLE_128 is set.
12192 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
12194         * cfgloop.c (get_loop_location): Convert return type from
12195         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
12196         by implicit construction from rtx_insn *, and using
12197         dump_user_location_t::from_function_decl for the fallback case.
12198         * cfgloop.h (get_loop_location): Convert return type from
12199         location_t to dump_user_location_t.
12200         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
12201         dump_printf_loc to pass in a dump_location_t rather than a
12202         location_t, via the gimple stmt.
12203         * coverage.c (get_coverage_counts): Update calls to
12204         dump_printf_loc to pass in dump_location_t rather than a
12205         location_t.
12206         * doc/optinfo.texi (Dump types): Convert example of
12207         dump_printf_loc from taking "locus" to taking "insn".  Update
12208         description of the "_loc" calls to cover dump_location_t.
12209         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
12210         "selftest.h".
12211         (dump_user_location_t::dump_user_location_t): New constructors,
12212         from gimple *stmt and rtx_insn *.
12213         (dump_user_location_t::from_function_decl): New function.
12214         (dump_loc): Make static.
12215         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12216         const dump_location_t &.
12217         (dump_generic_expr_loc): Delete.
12218         (dump_printf_loc): Convert param "loc" from location_t to
12219         const dump_location_t &.
12220         (selftest::test_impl_location): New function.
12221         (selftest::dumpfile_c_tests): New function.
12222         * dumpfile.h: Include "profile-count.h".
12223         (class dump_user_location_t): New class.
12224         (struct dump_impl_location_t): New struct.
12225         (class dump_location_t): New class.
12226         (dump_printf_loc): Convert 2nd param from source_location to
12227         const dump_location_t &.
12228         (dump_generic_expr_loc): Delete.
12229         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12230         const dump_location_t &.
12231         * gimple-fold.c (fold_gimple_assign): Update call to
12232         dump_printf_loc to pass in a dump_location_t rather than a
12233         location_t, via the gimple stmt.
12234         (gimple_fold_call): Likewise.
12235         * gimple-loop-interchange.cc
12236         (loop_cand::analyze_iloop_reduction_var): Update for change to
12237         check_reduction_path.
12238         (tree_loop_interchange::interchange): Update for change to
12239         find_loop_location.
12240         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12241         change in return-type of find_loop_location.
12242         (graphite_regenerate_ast_isl): Likewise.
12243         * graphite-optimize-isl.c (optimize_isl): Likewise.
12244         * graphite.c (graphite_transform_loops): Likewise.
12245         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12246         pass in a dump_location_t rather than a location_t, via the
12247         gimple stmt.
12248         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12249         * ipa.c (walk_polymorphic_call_targets): Likewise.
12250         * loop-unroll.c (report_unroll): Convert "locus" param from
12251         location_t to dump_location_t.
12252         (decide_unrolling): Update for change to get_loop_location's
12253         return type.
12254         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12255         location_t to dump_user_location_t.
12256         (grid_find_single_omp_among_assignments_1): Updates calls to
12257         dump_printf_loc to pass in a dump_location_t rather than a
12258         location_t, via the gimple stmt.
12259         (grid_parallel_clauses_gridifiable): Convert "tloc" from
12260         location_t to dump_location_t.  Updates calls to dump_printf_loc
12261         to pass in a dump_location_t rather than a location_t, via the
12262         gimple stmt.
12263         (grid_inner_loop_gridifiable_p): Likewise.
12264         (grid_dist_follows_simple_pattern): Likewise.
12265         (grid_gfor_follows_tiling_pattern): Likewise.
12266         (grid_target_follows_gridifiable_pattern): Likewise.
12267         (grid_attempt_target_gridification): Convert initialization
12268         of local "grid" from memset to zero-initialization; FIXME: does
12269         this require C++11?  Update call to dump_printf_loc to pass in a
12270         optinfo_location rather than a location_t, via the gimple stmt.
12271         * profile.c (read_profile_edge_counts): Updates call to
12272         dump_printf_loc to pass in a dump_location_t rather than a
12273         location_t
12274         (compute_branch_probabilities): Likewise.
12275         * selftest-run-tests.c (selftest::run_tests): Call
12276         dumpfile_c_tests.
12277         * selftest.h (dumpfile_c_tests): New decl.
12278         * tree-loop-distribution.c (pass_loop_distribution::execute):
12279         Update for change in return type of find_loop_location.
12280         * tree-parloops.c (parallelize_loops): Likewise.
12281         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12282         "locus" from location_t to dump_user_location_t.
12283         (canonicalize_loop_induction_variables): Likewise.
12284         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12285         for change in return type of find_loop_location.
12286         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12287         to dump_printf_loc to pass in a dump_location_t rather than a
12288         location_t, via the stmt.
12289         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12290         Likewise.
12291         * tree-vect-loop-manip.c (find_loop_location): Convert return
12292         type from source_location to dump_user_location_t.
12293         (vect_do_peeling): Update for above change.
12294         (vect_loop_versioning): Update for change in type of
12295         vect_location.
12296         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12297         from location_t to dump_user_location_t.
12298         (vect_estimate_min_profitable_iters): Update for change in type
12299         of vect_location.
12300         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12301         location_t to dump_location_t.
12302         (vect_slp_bb): Update for change in type of vect_location.
12303         * tree-vectorizer.c (vect_location): Convert from source_location
12304         to dump_user_location_t.
12305         (try_vectorize_loop_1): Update for change in vect_location's type.
12306         (vectorize_loops): Likewise.
12307         (increase_alignment): Likewise.
12308         * tree-vectorizer.h (vect_location): Convert from source_location
12309         to dump_user_location_t.
12310         (find_loop_location): Convert return type from source_location to
12311         dump_user_location_t.
12312         (check_reduction_path): Convert 1st param from location_t to
12313         dump_user_location_t.
12314         * value-prof.c (check_counter): Update call to dump_printf_loc to
12315         pass in a dump_user_location_t rather than a location_t; update
12316         call to error_at for change in type of "locus".
12317         (check_ic_target): Update call to dump_printf_loc to
12318         pass in a dump_user_location_t rather than a location_t, via the
12319         call_stmt.
12321 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
12323         * config/s390/s390.h (enum processor_flags): Do not use
12324         default tune parameter when -march was specified.
12326 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
12328         PR target/86314
12329         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12330         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12331         operands.
12333 2018-06-26  Richard Biener  <rguenther@suse.de>
12335         PR tree-optimization/86287
12336         PR bootstrap/86316
12337         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12338         (vect_analyze_loop): Initialize n_stmts.
12340 2018-06-26  Richard Biener  <rguenther@suse.de>
12342         PR middle-end/86271
12343         * fold-const.c (fold_convertible_p): Pointer extension
12344         isn't valid.
12346 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
12348         PR debug/86064
12349         * dwarf2out.c (loc_list_has_views): Adjust comments.
12350         (dw_loc_list): Split single cross-partition range with
12351         nonzero locview.
12353 2018-06-25  Jeff Law  <law@redhat.com>
12355         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12356         on -mbig-switch by default.
12358         * config/v850/predicates.md (const_float_1_operand): Fix match_code
12359         test.
12360         (const_float_0_operand): Remove unused predicate.
12361         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12362         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12363         (recipsf2): New expander.  Original pattern now called
12364         (recipsf2_insn).
12365         (recipdf2, recipdf2_insn): Similarly.
12366         (rsqrtsf2, rsqrtsf2_insn): Similarly
12367         (rsqrtdf2, rsqrtdf2_insn): Similarly
12369 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
12371         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12372         Simplify logic for FreeBSD (twice).
12374 2018-06-25  Martin Sebor  <msebor@redhat.com>
12376         PR tree-optimization/86204
12377         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12378         a strnlen result if it's less than the length of the string.
12380 2018-06-25  Martin Sebor  <msebor@redhat.com>
12382         PR tree-optimization/85700
12383         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12384         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12385         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12387 2018-06-25  Martin Sebor  <msebor@redhat.com>
12389         * doc/extend.texi (Zero-length arrays): Update and clarify.
12391 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
12393         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12394         added IEEE/IBM long double multilib support on PowerPC little
12395         endian Linux systems.
12396         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12397         (MULTILIB_DEFAULTS): Likewise.
12398         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12399         Likewise.
12400         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12401         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12402         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12404 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
12406         PR middle-end/86311
12407         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12408         (REORDER_45): Likewise.
12410 2018-06-25  Jeff Law  <law@redhat.com>
12412         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12413         dividend to 32 bits.  Adjust length.
12414         (udivmodhi4): Cleanup output template.  Fix length.
12416 2018-06-25  Carl Love  <cel@us.ibm.com>
12418         * config/rs6000/vsx.md: Change word selector to prefered location.
12420 2018-06-25  Richard Biener  <rguenther@suse.de>
12422         PR tree-optimization/86304
12423         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12424         epilogue-if-converted loops as well.
12426 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
12428         * lto-section-out.c (lto_begin_section): Do not print section
12429         name for noaddr and unnumbered dumps.
12431 2018-06-25  Richard Biener  <rguenther@suse.de>
12433         * tree-vectorizer.h (struct vec_info_shared): New structure
12434         with parts split out from struct vec_info and loop_nest from
12435         struct _loop_vec_info.
12436         (struct vec_info): Adjust accordingly.
12437         (struct _loop_vec_info): Likewise.
12438         (LOOP_VINFO_LOOP_NEST): Adjust.
12439         (LOOP_VINFO_DATAREFS): Likewise.
12440         (LOOP_VINFO_DDRS): Likewise.
12441         (struct _bb_vec_info): Likewise.
12442         (BB_VINFO_DATAREFS): Likewise.
12443         (BB_VINFO_DDRS): Likewise.
12444         (struct _stmt_vec_info): Add dr_aux member.
12445         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12446         (DR_MISALIGNMENT_UNINITIALIZED): New.
12447         (set_dr_misalignment): Adjust.
12448         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12449         (vect_analyze_loop): Adjust prototype.
12450         (vect_analyze_loop_form): Likewise.
12451         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12452         Compute dependences lazily.
12453         (vect_record_base_alignments): Use shared datarefs/ddrs.
12454         (vect_verify_datarefs_alignment): Likewise.
12455         (vect_analyze_data_refs_alignment): Likewise.
12456         (vect_analyze_data_ref_accesses): Likewise.
12457         (vect_analyze_data_refs): Likewise.
12458         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12459         constructor parameter for shared part.
12460         (vect_analyze_loop_form): Pass in shared part and adjust.
12461         (vect_analyze_loop_2): Pass in storage for the number of
12462         stmts.  Move loop nest finding to the caller.  Compute
12463         datarefs lazily.
12464         (vect_analyze_loop): Pass in shared part.
12465         (vect_transform_loop): Verify shared datarefs are unchanged.
12466         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12467         constructor parameter for shared part.
12468         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12469         (vect_slp_bb): Verify shared datarefs are unchanged before
12470         transform.
12471         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12472         change.
12473         (new_stmt_vec_info): Initialize DR_AUX misalignment to
12474         DR_MISALIGNMENT_UNINITIALIZED.
12475         * tree-vectorizer.c (vec_info::vec_info): Add constructor
12476         parameter for shared part.
12477         (vec_info::~vec_info): Adjust.
12478         (vec_info_shared::vec_info_shared): New.
12479         (vec_info_shared::~vec_info_shared): Likewise.
12480         (vec_info_shared::save_datarefs): Likewise.
12481         (vec_info_shared::check_datarefs): Likewise.
12482         (try_vectorize_loop_1): Construct shared part live for analyses
12483         of a single loop for multiple vector sizes.
12484         * tree-parloops.c (gather_scalar_reductions): Adjust.
12486 2018-06-25  Richard Biener  <rguenther@suse.de>
12488         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12489         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12490         (vect_analyze_data_refs): Remove similar code from here and
12491         simplify accordingly.
12493 2018-06-25  Richard Biener  <rguenther@suse.de>
12495         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12496         for reverse storage order accesses rather than asserting
12497         they cannot happen here.
12499 2018-06-25  Tom de Vries  <tdevries@suse.de>
12501         PR debug/86257
12502         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12503         Use data16 instead of .byte for insn prefix.
12505 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
12507         PR C++/86082
12508         * parser.c (make_char_string_pack): Pass this literal chars
12509         through cpp_interpret_string.
12510         (cp_parser_userdef_numeric_literal): Check the result of
12511         make_char_string_pack.
12513 2018-06-24  Maya Rashish  <coypu@sdf.org>
12515         * ginclude/stddef.h: Simplify conditions around avoiding
12516         re-definition of __size_t.
12518 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
12520         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12521         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12523 2018-06-22  Maya Rashish  <coypu@sdf.org>
12525         * doc/invoke.texi (mno-fancy-math-387): Update for changes
12526         made to OpenBSD and NetBSD through the years.
12528 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12530         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12531         behavior of vec_pack (vector double, vector double) to match
12532         behavior of vec_float2 (vector double, vector double).
12534 2018-06-22  Olivier Hainque  <hainque@adacore.com>
12536         * gimplify.c (gimplify_function_tree): Prevent creation
12537         of a trampoline for the address of the current function
12538         passed to entry/exit instrumentation hooks.
12540 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
12542         PR target/86222
12543         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12544         correctly.
12546 2018-06-22  Martin Liska  <mliska@suse.cz>
12548         PR tree-optimization/86263
12549         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12550         Bail out if is_enabled is false.
12551         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12552         New declaration.
12553         (jump_table_cluster::is_enabled): New function.
12555 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
12557         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12558         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12559         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12560         (lto_input_ts_binfo_tree_pointers): Likewise.
12561         * tree-streamer-out.c (streamer_write_tree_bitfields,
12562         write_ts_binfo_tree_pointers): Likewise.
12563         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12565 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
12567         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12569 2018-06-22  Martin Liska  <mliska@suse.cz>
12571         * symbol-summary.h (get): Make it pure and inline move
12572         functionality from ::get function.
12573         (get): Remove and inline into ::get and ::get_create.
12574         (get_create): Move code from ::get function.
12576 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12578         PR target/85994
12579         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12580         -x assembler-with-cpp.
12582 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12584         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12585         _FILE_OFFSET_BITS=64 for C++.
12587 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
12589         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12590         conversion insn that shows up when pr85657-3.c is compiled using
12591         IEEE 128-bit long double.
12592         (neg<mode>2_internal): Use the correct mode to check whether the
12593         mode is IBM extended.
12594         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12595         multiply and divide external functions from being created more
12596         than once.
12598 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12600         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12601         functions.
12602         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
12603         the edge can be forwarded.
12604         (cfg_layout_merge_blocks): Likewise.
12606 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12608         * except.c (finish_eh_generation): Commit edge insertions only after
12609         the EH edges have been redirected from post-landing to landing pads.
12611 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12613         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12614         create_tmp_var_for to create the FRAME decl.
12615         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12617 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
12619         * tree-inline.c (copy_edges_for_bb): Minor tweak.
12620         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12621         debug statement when resetting its value.
12622         (expand_call_inline): Copy the locus of the call onto the assignment
12623         of the return value, if any.  Use local variable in more cases.
12625 2018-06-21  Martin Liska  <mliska@suse.cz>
12627         * ipa-pure-const.c (propagate_nothrow): Use
12628         funct_state_summaries->get.
12629         (dump_malloc_lattice): Likewise.
12630         (propagate_malloc): Likewise.
12632 2018-06-21  Richard Biener  <rguenther@suse.de>
12634         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12635         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12636         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12637         comment.
12638         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12639         BLOCK_ABSTRACT_ORIGIN unconditionally.
12641 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
12643         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12644         deleting it.
12645         * ipa-reference.c (ipa_reference_c_finalize): Delete
12646         ipa_ref_opt_sum_summaries and set it to NULL.
12648 2018-06-21  Tom de Vries  <tdevries@suse.de>
12650         PR tree-optimization/85859
12651         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12652         test with comment from bb_no_side_effects_p.
12654 2018-06-21  Richard Biener  <rguenther@suse.de>
12656         PR tree-optimization/86232
12657         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12658         max for constant niter.
12660 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12662         * config/aarch64/aarch64-simd.md
12663         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12665 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12667         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12668         Make opernads of the unspec commutative.
12670 2018-06-21  Richard Biener  <rguenther@suse.de>
12672         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12673         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12674         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12675         (vect_analyze_data_ref_dependence): Re-order checks to deal with
12676         NULL DR_STEP.
12677         (vect_record_base_alignments): Do not record base alignment
12678         for gathers or scatters.
12679         (vect_compute_data_ref_alignment): Drop return value that is always
12680         true.  Bail out early for gathers or scatters.
12681         (vect_enhance_data_refs_alignment): Bail out early for gathers
12682         or scatters.
12683         (vect_find_same_alignment_drs): Likewise.
12684         (vect_analyze_data_refs_alignment): Remove dead code.
12685         (vect_slp_analyze_and_verify_node_alignment): Likewise.
12686         (vect_analyze_data_refs): For possible gathers or scatters do
12687         not create an alternate DR, just check their possible validity
12688         and mark them.  Adjust DECL_NONALIASED handling to not rely
12689         on DR_BASE_ADDRESS.
12690         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12691         update inits of gathers or scatters.
12692         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12693         Also copy gather/scatter flag to pattern vinfo.
12695 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12697         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12698         behavior of vec_packsu (vector unsigned long long, vector unsigned
12699         long long) to match behavior of vec_packs with same signature.
12701 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
12702             Thomas Schwinge <thomas@codesourcery.com>
12703             Cesar Philippidis  <cesar@codesourcery.com>
12705         * gimplify.c (gimplify_scan_omp_clauses): Add support for
12706         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12707         (gimplify_adjust_omp_clauses): Likewise.
12708         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12709         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12710         (gimplify_omp_target_update): Update handling of acc update and
12711         enter/exit data.
12712         * omp-low.c (install_var_field): Remove unused parameter
12713         base_pointers_restrict.
12714         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12715         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12716         FINALIZE}
12717         (omp_target_base_pointers_restrict_p): Delete.
12718         (scan_omp_target): Update call to scan_sharing_clauses.
12719         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12720         FINALIZE}.
12721         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12722         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12723         (convert_local_omp_clauses): Likewise.
12724         * tree-pretty-print.c (dump_omp_clause): Likewise.
12725         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
12726         FINALIZE}.
12727         (omp_clause_code_name): Likewise.
12729 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
12731         PR debug/86194
12732         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12733         be narrowed.
12735         PR tree-optimization/86231
12736         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
12737         anti-range don't overwrite *vr0min before using it to compute *vr0max.
12739 2018-06-20  Tom de Vries  <tdevries@suse.de>
12741         PR tree-optimization/86097
12742         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12743         iv type if signedness of iv type is not the same as that of *nit.
12745 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
12747         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
12748         EDGE_EH edges, verify they are all EDGE_EH.
12750 2018-06-20  Maya Rashish  <coypu@sdf.org>
12752         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12754 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12756         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12757         * config/aarch64/aarch64.c (xgene1_tunings): Add
12758         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12759         (aarch64_mode_valid_for_sched_fusion_p):
12760         Allow 16-byte modes.
12761         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12762         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12763         128-bit modes.
12764         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12765         New pattern.
12766         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12767         * config/aarch64/iterators.md (VQ2): New mode iterator.
12769 2018-06-20  Martin Liska  <mliska@suse.cz>
12771         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12772         Change default ratio from 10 to 8.
12774 2018-06-20  Martin Liska  <mliska@suse.cz>
12776         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12777         New.
12778         (bit_test_cluster::find_bit_tests): Likewise.
12779         (switch_decision_tree::analyze_switch_statement): Find clusters.
12780         * tree-switch-conversion.h (struct jump_table_cluster): Document
12781         hierarchy.
12783 2018-06-20  Martin Liska  <mliska@suse.cz>
12785         * tree-switch-conversion.c (switch_conversion::collect):
12786         Record m_uniq property.
12787         (switch_conversion::expand): Bail out for special conditions.
12788         (group_cluster::~group_cluster): New.
12789         (group_cluster::group_cluster): Likewise.
12790         (group_cluster::dump): Likewise.
12791         (jump_table_cluster::emit): New.
12792         (switch_decision_tree::fix_phi_operands_for_edges): New.
12793         (struct case_node): Remove struct.
12794         (jump_table_cluster::can_be_handled): New.
12795         (case_values_threshold): Moved to header.
12796         (reset_out_edges_aux): Likewise.
12797         (jump_table_cluster::is_beneficial): New.
12798         (bit_test_cluster::can_be_handled): Likewise.
12799         (add_case_node): Remove.
12800         (bit_test_cluster::is_beneficial): New.
12801         (case_bit_test::cmp): New.
12802         (bit_test_cluster::emit): New.
12803         (expand_switch_as_decision_tree_p): Remove.
12804         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12805         (fix_phi_operands_for_edge): Likewise.
12806         (switch_decision_tree::analyze_switch_statement): New.
12807         (compute_cases_per_edge): Move ...
12808         (switch_decision_tree::compute_cases_per_edge): ... here.
12809         (try_switch_expansion): Likewise.
12810         (switch_decision_tree::try_switch_expansion): Likewise.
12811         (record_phi_operand_mapping): Likewise.
12812         (switch_decision_tree::record_phi_operand_mapping): Likewise.
12813         (emit_case_decision_tree): Likewise.
12814         (switch_decision_tree::emit): Likewise.
12815         (balance_case_nodes): Likewise.
12816         (switch_decision_tree::balance_case_nodes): Likewise.
12817         (dump_case_nodes): Likewise.
12818         (switch_decision_tree::dump_case_nodes): Likewise.
12819         (emit_jump): Likewise.
12820         (switch_decision_tree::emit_jump): Likewise.
12821         (emit_cmp_and_jump_insns): Likewise.
12822         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12823         (emit_case_nodes): Likewise.
12824         (switch_decision_tree::emit_case_nodes): Likewise.
12825         (conditional_probability): Remove.
12826         * tree-switch-conversion.h (enum cluster_type): New.
12827         (PRINT_CASE): New.
12828         (struct cluster): Likewise.
12829         (cluster::cluster): Likewise.
12830         (struct simple_cluster): Likewise.
12831         (simple_cluster::simple_cluster): Likewise.
12832         (struct group_cluster): Likewise.
12833         (struct jump_table_cluster): Likewise.
12834         (struct bit_test_cluster): Likewise.
12835         (struct min_cluster_item): Likewise.
12836         (struct case_tree_node): Likewise.
12837         (case_tree_node::case_tree_node): Likewise.
12838         (jump_table_cluster::case_values_threshold): Likewise.
12839         (struct case_bit_test): Likewise.
12840         (struct switch_decision_tree): Likewise.
12841         (struct switch_conversion): Likewise.
12842         (switch_decision_tree::reset_out_edges_aux): Likewise.
12844 2018-06-20  Martin Liska  <mliska@suse.cz>
12846         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12847         (hoist_edge_and_branch_if_true): Likewise.
12848         (expand_switch_using_bit_tests_p): Likewise.
12849         (struct case_bit_test): Likewise.
12850         (case_bit_test_cmp): Likewise.
12851         (emit_case_bit_tests): Likewise.
12852         (switch_conversion::switch_conversion): New class.
12853         (struct switch_conv_info): Remove old struct.
12854         (collect_switch_conv_info): More to ...
12855         (switch_conversion::collect): ... this.
12856         (check_range): Likewise.
12857         (switch_conversion::check_range): Likewise.
12858         (check_all_empty_except_final): Likewise.
12859         (switch_conversion::check_all_empty_except_final): Likewise.
12860         (check_final_bb): Likewise.
12861         (switch_conversion::check_final_bb): Likewise.
12862         (create_temp_arrays): Likewise.
12863         (switch_conversion::create_temp_arrays): Likewise.
12864         (free_temp_arrays): Likewise.
12865         (gather_default_values): Likewise.
12866         (switch_conversion::gather_default_values): Likewise.
12867         (build_constructors): Likewise.
12868         (switch_conversion::build_constructors): Likewise.
12869         (constructor_contains_same_values_p): Likewise.
12870         (switch_conversion::contains_same_values_p): Likewise.
12871         (array_value_type): Likewise.
12872         (switch_conversion::array_value_type): Likewise.
12873         (build_one_array): Likewise.
12874         (switch_conversion::build_one_array): Likewise.
12875         (build_arrays): Likewise.
12876         (switch_conversion::build_arrays): Likewise.
12877         (gen_def_assigns): Likewise.
12878         (switch_conversion::gen_def_assigns): Likewise.
12879         (prune_bbs): Likewise.
12880         (switch_conversion::prune_bbs): Likewise.
12881         (fix_phi_nodes): Likewise.
12882         (switch_conversion::fix_phi_nodes): Likewise.
12883         (gen_inbound_check): Likewise.
12884         (switch_conversion::gen_inbound_check): Likewise.
12885         (process_switch): Use the newly created class.
12886         (switch_conversion::expand): New.
12887         (switch_conversion::~switch_conversion): New.
12888         * tree-switch-conversion.h: New file.
12890 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12892         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12893         tree-vect-patterns.c.
12894         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12895         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
12896         (vect_recog_sad_pattern): Likewise.
12897         (vect_recog_widen_sum_pattern): Likewise.
12898         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
12899         (vect_recog_widen_shift_pattern): Remove the type_in argument.
12900         (vect_recog_rotate_pattern): Likewise.
12901         (vect_recog_mult_pattern): Likewise.
12902         (vect_recog_vector_vector_shift_pattern): Likewise.
12903         (vect_recog_divmod_pattern): Likewise.
12904         (vect_recog_mixed_size_cond_pattern): Likewise.
12905         (vect_recog_bool_pattern): Likewise.
12906         (vect_recog_mask_conversion_pattern): Likewise.
12907         (vect_try_gather_scatter_pattern): Likewise.
12908         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
12909         (vect_recog_over_widening_pattern): Likewise.
12910         (vect_recog_gather_scatter_pattern): Likewise.
12911         (vect_recog_func_ptr): Move from tree-vectorizer.h
12912         (vect_vect_recog_func_ptrs): Move further down the file.
12913         (vect_recog_func): Likewise.  Remove the third argument.
12914         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12915         (vect_pattern_recog_1): Expect the pattern function to do any
12916         necessary target tests.  Also expect it to provide a vector type.
12917         Remove the type_in handling.
12919 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12921         * tree-vect-patterns.c (vect_pattern_detected): New function.
12922         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12923         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12924         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12925         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12926         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12927         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12928         (vect_recog_mask_conversion_pattern)
12929         (vect_try_gather_scatter_pattern): Likewise.
12931 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12933         * tree-vect-patterns.c (vect_get_internal_def): New function.
12934         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12935         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
12936         (search_type_for_mask_1): Use it.
12938 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12940         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12941         redundant WIDEN_SUM_EXPR handling.
12942         (vect_recog_sad_pattern): Likewise.
12944 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12946         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
12947         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
12948         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
12949         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
12950         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
12952 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12954         * tree-vect-stmts.c (vectorizable_call): Make sure that we
12955         use the stmt_vec_info of the original bb statement for the
12956         new zero assignment, even if the call is part of a pattern.
12958 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12960         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
12961         that the sequence is attached to the original statement rather
12962         than the pattern statement.
12963         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
12964         PATTERN_DEF_SEQ from the original statement rather than
12965         the main pattern statement.
12966         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
12967         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
12968         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
12970 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
12972         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
12973         definition statements before the early exit for statements that aren't
12974         live or relevant.
12975         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
12976         split out from...
12977         (vect_transform_loop): ...here.  Process pattern definition
12978         statements without first checking whether the main pattern
12979         statement is live or relevant.
12981 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
12983         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
12984         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
12986 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
12988         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
12989         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
12990         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
12991         (expand_block_compare): Change select_block_compare_mode call.
12992         (expand_strncmp_align_check): Use new functions, fix comment.
12993         (emit_final_str_compare_gpr): New function.
12994         (expand_strn_compare): Refactor and clean up code.
12995         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
12997 2018-06-19  Tony Reix  <tony.reix@atos.com>
12998             Damien Bergamini  <damien.bergamini@atos.com>
12999             David Edelsohn  <dje.gcc@gmail.com>
13001         * collect2.c (static_obj): New variable.
13002         (static_libs): New variable.
13003         (is_in_list): Uncomment declaration.
13004         (main): Track AIX libraries linked statically.
13005         (is_in_list): Uncomment definition.
13006         (scan_prog_file): Don't add AIX shared libraries initializer
13007         to constructor list if linking statically.
13009 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
13011         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
13012         constant.
13013         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
13015 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
13017         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
13018         blocks.
13020 2018-06-19  Martin Liska  <mliska@suse.cz>
13022         * config/i386/i386.c (ix86_can_inline_p): Do not use
13023         ipa_fn_summaries::get_create.
13024         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
13025         get.
13026         (devirtualization_time_bonus): Likewise.
13027         (ipcp_propagate_stage): Likewise.
13028         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13029         (edge_set_predicate): Likewise.
13030         (evaluate_conditions_for_known_args): Likewise.
13031         (evaluate_properties_for_edge): Likewise.
13032         (ipa_call_summary::reset): Tranform to ...
13033         (ipa_call_summary::~ipa_call_summary): ... this.
13034         (ipa_fn_summary::reset): Transform to ...
13035         (ipa_fn_summary::~ipa_fn_summary): ... this.
13036         (ipa_fn_summary_t::remove): Rename to ...
13037         (ipa_fn_summary_t::remove_callees): ... this.
13038         (ipa_fn_summary_t::duplicate): Use placement new
13039         instead of memory copy.
13040         (ipa_call_summary_t::duplicate): Likewise.
13041         (ipa_call_summary_t::remove): Remove.
13042         (dump_ipa_call_summary): Change get_create to get.
13043         (ipa_dump_fn_summary): Dump only when summary exists.
13044         (analyze_function_body): Use symbol_summary::get instead
13045         of get_create.
13046         (compute_fn_summary): Likewise.
13047         (estimate_edge_devirt_benefit): Likewise.
13048         (estimate_edge_size_and_time): Likewise.
13049         (inline_update_callee_summaries): Likewise.
13050         (remap_edge_change_prob): Likewise.
13051         (remap_edge_summaries): Likewise.
13052         (ipa_merge_fn_summary_after_inlining): Likewise.
13053         (write_ipa_call_summary): Likewise.
13054         (ipa_fn_summary_write): Likewise.
13055         (ipa_free_fn_summary): Likewise.
13056         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
13057         (struct ipa_call_summary): Likewise.
13058         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
13059         of get_create.
13060         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
13061         (estimate_size_after_inlining): Likewise.
13062         (estimate_growth): Likewise.
13063         (growth_likely_positive): Likewise.
13064         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13065         (inline_call): Likewise.
13066         * ipa-inline.c (caller_growth_limits): Likewise.
13067         (can_inline_edge_p): Likewise.
13068         (can_inline_edge_by_limits_p): Likewise.
13069         (compute_uninlined_call_time): Likewise.
13070         (compute_inlined_call_time): Likewise.
13071         (want_inline_small_function_p): Likewise.
13072         (edge_badness): Likewise.
13073         (update_caller_keys): Likewise.
13074         (update_callee_keys): Likewise.
13075         (inline_small_functions): Likewise.
13076         (inline_to_all_callers_1): Likewise.
13077         (dump_overall_stats): Likewise.
13078         (early_inline_small_functions): Likewise.
13079         (early_inliner): Likewise.
13080         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13081         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13082         * ipa-pure-const.c (malloc_candidate_p): Likewise.
13083         * ipa-split.c (execute_split_functions): Likewise.
13084         * symbol-summary.h: Likewise.
13085         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13087 2018-06-19  Richard Biener  <rguenther@suse.de>
13089         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
13090         (vectorize_loops): ... here.  Fix dbgcnt handling.
13091         (try_vectorize_loop): Wrap try_vectorize_loop_1.
13093 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
13095         PR target/86197
13096         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
13097         ieee128 argument takes up only one (vector) register, not two (floating
13098         point) registers.
13100 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
13102         * gimplify.c (gimplify_init_constructor): Really never clear for an
13103         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
13105 2018-06-19  Richard Biener  <rguenther@suse.de>
13107         PR tree-optimization/86179
13108         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
13109         after failed recognition.
13111 2018-06-18  Martin Sebor  <msebor@redhat.com>
13113         PR middle-end/85602
13114         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
13115         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
13116         Handle integer subtraction.
13117         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
13118         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
13120 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
13122         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
13123         param from rtx to rtx_insn *.
13124         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
13125         param.
13126         (frv_ifcvt_modify_insn): Likwise.
13127         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
13128         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
13129         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
13130         as_a <rtx_insn *> cast to local "unprotected_region" once
13131         it's been established that it's not NULL or pc_rtx.
13132         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
13133         param "sethi" from rtx to rtx_insn *.
13134         (nds32_group_float_insns): Likewise for param "insn".
13135         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
13136         param.
13137         (vax_output_int_subtract): Likewise.
13138         * config/vax/vax.c (vax_output_int_add): Likewise for param
13139         "insn".
13140         (vax_output_int_subtract): Likewise.
13141         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
13142         (emit_pattern_after): Likewise for param "after".
13143         (emit_insn_after): Likewise.
13144         (emit_jump_insn_after): Likewise.
13145         (emit_call_insn_after): Likewise.
13146         (emit_debug_insn_after): Likewise.
13147         (emit_pattern_before): Likewise for param "before".
13148         (emit_insn_before): Likewise.
13149         (emit_jump_insn_before): Likewise.
13150         * final.c (get_insn_template): Likewise for param "insn", removing
13151         a cast.
13152         * output.h (get_insn_template): Likewise for 2nd param.
13153         * rtl.h (emit_insn_before): Likewise.
13154         (emit_jump_insn_before): Likewise.
13155         (emit_debug_insn_before_noloc): Likewise.
13156         (emit_insn_after): Likewise.
13157         (emit_jump_insn_after): Likewise.
13158         (emit_call_insn_after): Likewise.
13159         (emit_debug_insn_after): Likewise.
13160         (set_insn_deleted): Likewise for param.
13162 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
13164         PR target/85358
13165         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
13166         floating point modes, so that IFmode is numerically greater than
13167         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
13168         to declare the ordering.  This prevents IFmode from being
13169         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
13170         machine.  Include rs6000-modes.h to share the fractional values
13171         between genmodes* and the rest of the compiler.
13172         (IFmode): Likewise.
13173         (KFmode): Likewise.
13174         (TFmode): Likewise.
13175         * config/rs6000/rs6000-modes.h: New file.
13176         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
13177         meaning of rs6000_long_double_size so that 126..128 selects an
13178         appropriate 128-bit floating point type.
13179         (rs6000_option_override_internal): Likewise.
13180         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
13181         (TARGET_LONG_DOUBLE_128): Change the meaning of
13182         rs6000_long_double_size so that 126..128 selects an appropriate
13183         128-bit floating point type.
13184         (LONG_DOUBLE_TYPE_SIZE): Update comment.
13185         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
13186         source and destination to match the standard usage.
13187         (truncifkf2): Likewise.
13188         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
13189         ISA 2.07 to use an explicit clobber, instead of passing in a
13190         temporary.
13191         (copysign<mode>3_soft): Likewise.
13193 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
13195         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13196         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
13197         (vect_slp_analyze_instance_dependence): Likewise.
13198         (vect_enhance_data_refs_alignment): Likewise.
13199         (vect_analyze_data_refs_alignment): Likewise.
13200         (vect_slp_analyze_and_verify_instance_alignment
13201         (vect_analyze_data_ref_accesses): Likewise.
13202         (vect_prune_runtime_alias_test_list): Likewise.
13203         (vect_analyze_data_refs): Likewise.
13204         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
13205         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13206         (vect_analyze_scalar_cycles_1): Likewise.
13207         (vect_get_loop_niters): Likewise.
13208         (vect_analyze_loop_form_1): Likewise.
13209         (vect_update_vf_for_slp): Likewise.
13210         (vect_analyze_loop_operations): Likewise.
13211         (vect_analyze_loop): Likewise.
13212         (vectorizable_induction): Likewise.
13213         (vect_transform_loop): Likewise.
13214         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13215         * tree-vect-slp.c (vect_analyze_slp): Likewise.
13216         (vect_make_slp_decision): Likewise.
13217         (vect_detect_hybrid_slp): Likewise.
13218         (vect_slp_analyze_operations): Likewise.
13219         (vect_slp_bb): Likewise.
13220         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13221         (vectorizable_bswap): Likewise.
13222         (vectorizable_call): Likewise.
13223         (vectorizable_simd_clone_call): Likewise.
13224         (vectorizable_conversion): Likewise.
13225         (vectorizable_assignment): Likewise.
13226         (vectorizable_shift): Likewise.
13227         (vectorizable_operation): Likewise.
13228         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13230 2018-06-18  Martin Sebor  <msebor@redhat.com>
13232         PR tree-optimization/81384
13233         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13234         * builtins.c (expand_builtin_strnlen): New function.
13235         (expand_builtin): Call it.
13236         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13237         * builtins.def (BUILT_IN_STRNLEN): New.
13238         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13239         Warn for bounds in excess of maximum object size.
13240         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13241         single-value ranges.  Handle strnlen.
13242         (handle_builtin_strlen): Handle strnlen.
13243         (strlen_check_and_optimize_stmt): Same.
13244         * doc/extend.texi (Other Builtins): Document strnlen.
13246 2018-06-18  Maya Rashish  <coypu@sdf.org>
13248         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13249         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13250         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13252         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13253         here to ...
13254         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13256 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13258         * tree.c (escaped_string::escape): Replace cast to char * by
13259         const_cast<char *> (unescaped).
13261 2018-06-18  Nick Clifton  <nickc@redhat.com>
13263         PR 84195
13264         * tree.c (escaped_string): New class.  Converts an unescaped
13265         string into its escaped equivalent.
13266         (warn_deprecated_use): Use the new class to convert the
13267         deprecation message, if present.
13268         (test_escaped_strings): New self test.
13269         (test_c_tests): Add test_escaped_strings.
13270         * doc/extend.texi (deprecated): Add a note that the
13271         deprecation message is affected by the -fmessage-length
13272         option, and that control characters will be escaped.
13273         (#pragma GCC error): Document this pragma.
13274         (#pragma GCC warning): Likewise.
13275         * doc/invoke.texi (-fmessage-length): Document this option's
13276         effect on the #warning and #error preprocessor directives and
13277         the deprecated attribute.
13279 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
13281         * tree.c (decl_value_expr_lookup): Revert latest change.
13282         (decl_value_expr_insert): Likewise.
13284 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
13286         * gimplify.c (nonlocal_vlas): Delete.
13287         (nonlocal_vla_vars): Likewise.
13288         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13289         referenced VLAs.
13290         (gimplify_body): Do not create and destroy nonlocal_vlas.
13291         * tree-nested.c: Include diagnostic.h.
13292         (use_pointer_in_frame): Tweak.
13293         (lookup_field_for_decl): Add assertion and declare the transformation.
13294         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13295         internal error when the reference is in a wrong context.  Do not
13296         create a debug decl by default.
13297         (note_nonlocal_block_vlas): Delete.
13298         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13299         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
13300         create a debug decl by default.
13301         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13302         call is in a wrong context.
13303         (fixup_vla_decls): New function.
13304         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
13305         debug variables were created.
13306         * tree.c (decl_value_expr_lookup): Add checking assertion.
13307         (decl_value_expr_insert): Likewise.
13309 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
13311         PR middle-end/82479
13312         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13313         * tree-scalar-evolution.c (interpret_expr): Likewise.
13314         (expression_expensive_p): Likewise.
13315         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13316         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13317         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13318         (ssa_defined_by_minus_one_stmt_p): New.
13320 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
13322         PR middle-end/64946
13323         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13324         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13325         * dojump.c (do_jump): Likewise.
13326         * expr.c (expand_expr_real_2): Check operand type's sign.
13327         * fold-const.c (const_unop): Handle ABSU_EXPR.
13328         (fold_abs_const): Likewise.
13329         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13330         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13331         (strip_sign_op_1): Likesise.
13332         * match.pd: Add new pattern to generate ABSU_EXPR.
13333         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13334         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13335         * tree-eh.c (operation_could_trap_helper_p): Likewise.
13336         * tree-inline.c (estimate_operator_cost): Likewise.
13337         * tree-pretty-print.c (dump_generic_node): Likewise.
13338         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13339         * tree.def (ABSU_EXPR): New.
13341 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
13343         PR middle-end/86095
13344         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13345         documented as preserved for backward compatibility only.
13346         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13348         PR rtl-optimization/86108
13349         * bb-reorder.c (create_forwarder_block): Renamed to ...
13350         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
13351         jump from new landing pad to the second part.
13352         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13353         Adjust callers.
13355 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
13357         PR middle-end/85878
13358         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13359         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13360         Only call store_expr for halves if the mode is the same.
13362         PR middle-end/86123
13363         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13364         Fix up comment formatting.
13366 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13368         * typed-splay-tree.h (typed_splay_tree::remove): New function.
13369         (typed_splay_tree::closure,
13370         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13371         (typed_splay_tree::typed_splay_tree,
13372         typed_splay_tree::operator =): Declared private.
13373         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13374         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13375         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13376         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13377         typed_splay_tree::splay_tree_splay,
13378         typed_splay_tree::splay_tree_foreach_helper,
13379         typed_splay_tree::splay_tree_insert,
13380         typed_splay_tree::splay_tree_remove,
13381         typed_splay_tree::splay_tree_lookup,
13382         typed_splay_tree::splay_tree_predecessor,
13383         typed_splay_tree::splay_tree_successor,
13384         typed_splay_tree::splay_tree_min,
13385         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13386         (typed_splay_tree::root, typed_splay_tree::comp,
13387         typed_splay_tree::delete_key,
13388         typed_splay_tree::delete_value): New data members.
13389         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13390         typed_splay_tree::remove.
13392 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
13394         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13395         -mginv and -mno-ginv to the assembler.
13396         * config/mips/mips.opt (-mcrc): New option.
13397         (-mginv): Likewise.
13398         * doc/invoke.text (-mcrc): Document.
13399         (-mginv): Likewise.
13401 2018-06-15  Nick Clifton  <nickc@redhat.com>
13403         PR 84195
13404         * tree.c (escaped_string): New class.  Converts an unescaped
13405         string into its escaped equivalent.
13406         (warn_deprecated_use): Use the new class to convert the
13407         deprecation message, if present.
13408         (test_escaped_strings): New self test.
13409         (test_c_tests): Add test_escaped_strings.
13410         * doc/extend.texi (deprecated): Add a note that the
13411         deprecation message is affected by the -fmessage-length
13412         option, and that control characters will be escaped.
13413         (#pragma GCC error): Document this pragma.
13414         (#pragma GCC warning): Likewise.
13415         * doc/invoke.texi (-fmessage-length): Document this option's
13416         effect on the #warning and #error preprocessor directives and
13417         the deprecated attribute.
13419 2018-06-15  Richard Biener  <rguenther@suse.de>
13421         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13422         here, also noting vector size used.
13423         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
13424         size used in MSG_OPTIMIZED_LOCATIONS dump.
13425         (pass_slp_vectorize::execute): Adjust.
13427 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
13429         PR target/85968
13430         * config/arc/arc.c (arc_return_address_register): Fix
13431         if-condition.
13433 2018-06-15  Richard Biener  <rguenther@suse.de>
13435         PR middle-end/86159
13436         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13437         leave useless conversion stripping to force_gimple_operand_gsi.
13438         (gimplify_build2): Likewise.
13439         (gimplify_build1): Likewise.
13441 2018-06-15  Richard Biener  <rguenther@suse.de>
13443         PR middle-end/86076
13444         * tree-cfg.c (move_stmt_op): unshare invariant addresses
13445         before adjusting their block.
13447 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13449         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13450         multilibs for *-*-rtems*.
13451         * config/riscv/t-rtems: New file.
13453 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
13455         PR middle-end/86122
13456         * match.pd ((A +- CST1) +- CST2): Punt if last resort
13457         unsigned_type_for returns NULL.
13459         PR target/85945
13460         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13461         subregs of multi-word pseudos unless the float mode has word size.
13463 2018-06-14  Richard Biener  <rguenther@suse.de>
13465         PR middle-end/86139
13466         * tree-vect-generic.c (build_word_mode_vector_type): Remove
13467         duplicate and harmful type_hash_canon.
13468         * tree.c (type_hash_canon): Assert we didn't find ourselves.
13470 2018-06-14  Richard Biener  <rguenther@suse.de>
13472         PR ipa/86124
13473         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13474         NULL cgraph_node.
13476 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13478         * config/rtems.h (STDINT_LONG32): Define.
13480 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
13481             Prachi Godbole  <prachi.godbole@imgtec.com>
13483         * config/mips/mips-cpus.def: Define P6600.
13484         * config/mips/mips-tables.opt: Regenerate.
13485         * config/mips/mips.c (mips_ucbranch_type): New enum.
13486         (mips_rtx_cost_data): Add support for P6600.
13487         (mips_issue_rate): Likewise.
13488         (mips_multipass_dfa_lookahead): Likewise.
13489         (mips_avoid_hazard): Likewise.
13490         (mips_reorg_process_insns): Likewise.
13491         (mips_classify_branch_p6600): New function.
13492         * config/mips/mips.h (TUNE_P6600): New define.
13493         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13494         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13495         * config/mips/mips.md: Include p6600.md.
13496         (processor): Add p6600.
13497         * config/mips/p6600.md: New file.
13498         * doc/invoke.texi: Add p6600 to supported architectures.
13500 2018-06-13  Martin Sebor  <msebor@redhat.com>
13502         PR tree-optimization/86114
13503         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13504         of integer types.
13505         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13507 2018-06-13  Richard Biener  <rguenther@suse.de>
13509         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13510         Properly set vector type of the intermediate stmt.
13511         * tree-vect-stmts.c (vectorizable_operation): The destination
13512         var always has vectype_out type.
13514 2018-06-13  Jeff Law  <law@redhat.com>
13516         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13517         integer 0 for argument to print_rtl_with_bb.
13518         (rl78_reorg): Likewise.
13520 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
13522         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13523         from rtx to rtx_insn *.
13524         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13525         "label".
13526         (add_sched_insns_for_speculation): Likewise for local "target",
13527         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13528         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13529         from rtx_insn ** to rtx_code_label **.
13530         (reorg_emit_nops): Likewise.
13531         (c6x_reorg): Likewise for local "call_labels".
13532         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13533         rtx to rtx_insn *.
13534         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13535         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13536         the loops over LABEL_REFS.
13537         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13538         braf_label.
13539         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13540         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13541         (split_branches): Strengthen local "olabel" from rtx to
13542         rtx_insn *, adding a safe_as_a cast.
13543         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13544         to "rtx_insn *".
13545         (add_insn_after): Likewise for first two params.
13546         (add_insn_before): Likewise.
13547         (remove_insn): Likewise for param.
13548         (emit_pattern_before_noloc): Likewise for second and third params.
13549         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13550         (emit_call_insn_before_noloc): Likewise.
13551         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13552         to "rtx_insn *".
13553         (emit_barrier_before): Likewise.
13554         (emit_label_before): Strengthen "label" param from "rtx" to
13555         "rtx_code_label *".  Strengthen "before" param from "rtx" to
13556         "rtx_insn *".
13557         (emit_insn_after_1): Strengthen "after" param from "rtx" to
13558         "rtx_insn *".
13559         (emit_pattern_after_noloc): Likewise.
13560         (emit_insn_after_noloc): Likewise.
13561         (emit_jump_insn_after_noloc): Likewise.
13562         (emit_call_insn_after_noloc): Likewise.
13563         (emit_debug_insn_after_noloc): Likewise.
13564         (emit_barrier_after): Likewise.
13565         (emit_label_after): Likewise for both params.
13566         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
13567         "loc" param from "int" to "location_t".
13568         (emit_insn_after_setloc): Likewise.
13569         (emit_jump_insn_after_setloc): Likewise.
13570         (emit_call_insn_after_setloc): Likewise.
13571         (emit_debug_insn_after_setloc): Likewise.
13572         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
13573         "loc" param from "int" to "location_t".
13574         (emit_pattern_before): Convert NULL_RTX to NULL.
13575         (emit_insn_before_setloc): Convert "loc" param from "int" to
13576         "location_t".
13577         (emit_jump_insn_before_setloc): Likewise.
13578         (emit_call_insn_before_setloc): Likewise.
13579         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13580         rtx_insn *.  Convert "loc" param from "int" to "location_t".
13581         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13582         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13583         Convert 3rd param from "int" to "location_t".
13584         (emit_barrier_before, emit_barrier_after, next_real_insn):
13585         Strengthen param from rtx to rtx_insn *.
13586         (emit_label_before): Strengthen 1st param from "rtx" to
13587         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
13588         "rtx_insn *".
13589         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13590         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13591         Strengthen 2nd param from "rtx" to "rtx_insn *".
13592         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13593         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13594         Likewise. Convert 3rd param from "int" to "location_t".
13595         (emit_label_after): Strengthen 1st param from "rtx" to
13596         "rtx_code_label *".
13597         (next_real_insn, remove_insn): Strengthen param from "rtx" to
13598         "rtx_insn *".
13599         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13600         from "rtx" to "rtx_insn *".
13602 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
13604         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13605         bodies streamed in with -Q.
13606         * dumpfile.c (dump_files): Add lto-stream-out dump file.
13607         * dumpfile.h (tree_dump_index): Add lto_stream_out.
13608         * gimple-streamer-out.c: Include gimple-pretty-print.h
13609         (output_bb): Dump stmts streamed.
13610         * lto-section-out.c: Include print-tree.h
13611         (lto_begin_section): Dump sections created.
13612         (lto_output_decl_index): Dump decl encoded.
13613         * lto-streamer-out.c: Include print-tree.h
13614         (create_output_block): Dump output block created.
13615         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13616         (output_function): Dump function output.
13617         (output_constructor): Dump constructor streamed.
13618         (write_global_stream): Output indexes encoded.
13619         (produce_asm_for_decls): Dump streams encoded.
13620         * lto-streamer.c (streamer_dump_file): New global var.
13621         * lto-streamer.h (streamer_dump_file): Declare.
13622         * passes.c (ipa_write_summaries): Initialize streamer dump.
13623         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13624         in.
13626 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
13628         PR target/86048
13629         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13630         offsets for register save directives.  Emit a second batch of save
13631         directives, if need be, when the function accesses prior frames.
13633 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13635         * config/arc/fpu.md (fmasf4): Force operand to register.
13636         (fnmasf4): Likewise.
13638 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13640         * config/arc/arc-protos.h (arc_pad_return): Remove.
13641         * config/arc/arc.c (machine_function): Remove force_short_suffix
13642         and size_reason.
13643         (arc_print_operand): Adjust printing of '&'.
13644         (arc_verify_short): Remove conditional printing of short suffix.
13645         (arc_final_prescan_insn): Remove reference to size_reason.
13646         (pad_return): New function.
13647         (arc_reorg): Call pad_return.
13648         (arc_pad_return): Remove.
13649         (arc_init_machine_status): Remove reference to force_short_suffix.
13650         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13651         (attr length): When attribute iscompact is true force to 2
13652         regardless; in the case of maybe check if we want to force the
13653         instruction to have 4 bytes length.
13654         (nopv): Change it to generate 4 byte long nop as well.
13655         (blockage): New pattern.
13656         (simple_return): Remove call to arc_pad_return.
13657         (p_return_i): Likewise.
13659 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13661         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13663 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13665         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13666         ARC cores.
13668 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13670         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13671         for ARC700 and ARCv2.
13673 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
13675         PR target/86076
13676         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13677         operands[2] instead of operands[1].
13680 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
13682         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13683         case, check whether the outer register overlaps an unallocatable
13684         register, not just whether it fits the required class.
13686 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
13688         * poly-int.h (can_div_trunc_p): Add new overload in which all values
13689         are poly_ints.
13690         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13691         (memrefs_conflict_p): Likewise.
13692         (init_alias_analysis): Likewise.
13693         * cfgexpand.c (expand_debug_expr): Likewise.
13694         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13695         * cse.c (fold_rtx): Likewise.
13696         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13697         * expr.c (emit_block_move_hints): Likewise.
13698         (clear_storage_hints, push_block, emit_push_insn): Likewise.
13699         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13700         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13701         (emit_group_store): Likewise.
13702         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
13703         to read the PRE/POST_MODIFY increment.
13704         * calls.c (store_one_arg): Use strip_offset.
13705         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13706         poly_int_rtx_p.
13707         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13708         by a VEC_SELECT.
13709         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13710         (simplify_binary_operation_1): Extend CONST_INT handling to
13711         poly_int_rtx_p.
13712         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13713         than a HOST_WIDE_INT.
13714         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13715         poly_int64.
13716         (adjust_mems, add_stores): Update accodingly.
13717         (vt_canonicalize_addr): Track polynomial offsets.
13718         (emit_note_insn_var_location): Likewise.
13719         (vt_add_function_parameter): Likewise.
13720         (vt_initialize): Likewise.
13722 2018-06-12  Jeff Law  <law@redhat.com>
13724         * config.gcc (alpha*-*-freebsd*): Remove.
13725         * config/alpha/freebsd.h: Remove.
13727 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
13729         PR other/69968
13730         * spellcheck-tree.c (levenshtein_distance): Rename to...
13731         (get_edit_distance): ...this, and update for underlying renaming.
13732         * spellcheck-tree.h (levenshtein_distance): Rename to...
13733         (get_edit_distance): ...this.
13734         * spellcheck.c (levenshtein_distance): Rename to...
13735         (get_edit_distance): ...this.  Convert from Levenshtein distance
13736         to Damerau-Levenshtein distance by supporting transpositions of
13737         adjacent characters.  Rename "v1" to "v_next" and "v0" to
13738         "v_one_ago".
13739         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13740         (selftest::test_edit_distance_unit_test_oneway): ...this, and
13741         update for underlying renaming.
13742         (selftest::levenshtein_distance_unit_test): Rename to...
13743         (selftest::test_get_edit_distance_unit): ...this, and update for
13744         underlying renaming.
13745         (selftest::test_find_closest_string): Add example from PR 69968
13746         where transposition helps
13747         (selftest::test_metric_conditions): Update for renaming.
13748         (selftest::test_metric_conditions): Likewise.
13749         (selftest::spellcheck_c_tests): Likewise.
13750         * spellcheck.h (levenshtein_distance): Rename both overloads to...
13751         (get_edit_distance): ...this.
13752         (best_match::consider): Update for renaming.
13754 2018-06-12  Martin Sebor  <msebor@redhat.com>
13756         PR tree-optimization/85259
13757         * builtins.c (compute_objsize): Handle constant offsets.
13758         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13759         true iff a warning has been issued.
13760         * gimple.h (gimple_nonartificial_location): New function.
13761         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13762         gimple_nonartificial_location and handle -Wno-system-headers.
13763         (handle_builtin_stxncpy): Same.
13765 2018-06-12  Martin Sebor  <msebor@redhat.com>
13767         PR c/85931
13768         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13770 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
13772         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13773         BUILTIN_VEC_XST entries for pointer to double and long long.
13775 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
13777         PR target/85990
13778         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13779         Update comments.
13780         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13781         Likewise.
13783 2018-06-12  Martin Liska  <mliska@suse.cz>
13785         * doc/options.texi: Document IntegerRange.
13787 2018-06-12  Martin Liska  <mliska@suse.cz>
13789         * config/i386/i386.opt: Make MPX-related options as Deprecated.
13790         * opt-functions.awk: Handle Deprecated flag.
13791         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13792         and report error.
13793         (read_cmdline_option): Report warning for a deprecated option.
13794         * opts.h (struct cl_option): Add new field cl_deprecated.
13795         (CL_ERR_DEPRECATED): New.
13797 2018-06-12  Martin Liska  <mliska@suse.cz>
13799         * doc/options.texi: Document Deprecated option flag.
13801 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13803         * config/arc/arc-arch.h (arc_extras): New enum.
13804         (arc_cpu_t):Add field extra.
13805         (arc_cpu_types): Consider the extras.
13806         * config/arc/arc-cpus.def: Add extras info.
13807         * config/arc/arc-opts.h (processor_type): Consider extra field.
13808         * config/arc/arc.c (arc_override_options): Handle extra field.
13810 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
13812         * config/arc/arc-arch.h: Update ARC_OPTX macro.
13813         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13814         field.
13815         * config/arc/arc.c (arc_init): Update pic warning.
13816         (irq_range): Update irq range parsing warnings.
13817         (arc_override_options): Update various warning messages.
13818         (arc_handle_aux_attribute): Likewise.
13820 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
13822         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13824 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13826         * doc/sourcebuild.texi: Document usage of line number 0 in verify
13827         compiler messages directives.
13829 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
13831         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13832         * config/mips/mips-tables.opt: Regenerate.
13833         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13834         mips64r6.
13835         * doc/invoke.texi: Document -march=i6500.
13837 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
13839         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13840         (i6400_gpmul): Add cpu_unit.
13841         (i6400_gpdiv): Likewise.
13842         (i6400_msa_add_d): Update reservations.
13843         (i6400_msa_int_add) Likewise.
13844         (i6400_msa_short_logic3) Likewise.
13845         (i6400_msa_short_logic2) Likewise.
13846         (i6400_msa_short_logic) Likewise.
13847         (i6400_msa_move) Likewise.
13848         (i6400_msa_cmp) Likewise.
13849         (i6400_msa_short_float2) Likewise.
13850         (i6400_msa_div_d) Likewise.
13851         (i6400_msa_long_logic1) Likewise.
13852         (i6400_msa_long_logic2) Likewise.
13853         (i6400_msa_mult) Likewise.
13854         (i6400_msa_long_float2) Likewise.
13855         (i6400_msa_long_float4) Likewise.
13856         (i6400_msa_long_float5) Likewise.
13857         (i6400_msa_long_float8) Likewise.
13858         (i6400_fpu_fadd): Include frint type.
13859         (i6400_fpu_store): New define_insn_reservation.
13860         (i6400_fpu_load): Likewise.
13861         (i6400_fpu_move): Likewise.
13862         (i6400_fpu_fcmp): Likewise.
13863         (i6400_fpu_fmadd): Likewise.
13864         (i6400_int_mult): Include imul3nc type and update reservation.
13865         (i6400_int_div): Include idiv3 type and update reservation.
13866         (i6400_int_load): Update to check type not move_type.
13867         (i6400_int_store): Likewise.
13868         (i6400_int_prefetch): Set zero latency.
13870 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
13872         * gcc.c: Document new %@{...} sequence.
13873         (LINK_COMMAND_SPEC): Use it for the -L switches.
13874         (cpp_unique_options): Use it for the -I switches.
13875         (at_file_argbuf): New global variable.
13876         (in_at_file): Likewise.
13877         (alloc_args): Create at_file_argbuf.
13878         (clear_args): Truncate at_file_argbuf.
13879         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13880         (open_at_file): New function.
13881         (close_at_file): Likewise.
13882         (create_at_file): Delete.
13883         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13884         <'o'>: Likewise.
13885         <'@'>: New case.
13886         (validate_switches_from_spec): Deal with %@{...} sequence.
13887         (validate_switches): Likewise.
13888         (driver::finalize): Call clear_args.
13890 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
13892         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13894 2018-06-11  Martin Sebor  <msebor@redhat.com>
13896         * doc/invoke.texi (-Wall): List -Wc++17-compat.
13897         (Wno-class-memaccess): Add @opindex.
13898         (Wno-templates, Wno-multiple-inheritance): Same.
13899         (Wno-virtual-inheritance, Wno-namespaces): Same.
13900         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13901         (Wno-format-overflow, Wno-format-truncation): Same.
13902         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13903         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13904         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13905         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13906         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13907         (Wno-misspelled-isr): Same.
13909 2018-06-11  Martin Sebor  <msebor@redhat.com>
13911         * PR tree-optimization/86083
13912         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13914 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
13916         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13918 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
13920         PR target/85755
13921         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13922         on the correct operand.
13923         (*movdi_internal64): Ditto.
13925 2018-06-11  Martin Liska  <mliska@suse.cz>
13927         PR tree-optimization/86089
13928         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
13930 2018-06-11  Julia Koval  <julia.koval@intel.com>
13932         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
13933         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
13934         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
13936 2018-06-11  Olivier Hainque  <hainque@adacore.com>
13938         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
13939         for Ada with strict dwarf2.
13941 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
13943         PR target/85755
13944         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
13945         addresses.
13947 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
13949         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
13951 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
13953         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
13954         TARGET_ELF.
13956 2018-06-08  Martin Liska  <mliska@suse.cz>
13958         * tree-cfg.h (debug_function): Fix argument type to match
13959         implementation.
13961 2018-06-08  Martin Liska  <mliska@suse.cz>
13963         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
13964         Remove usage of MPX-related (and removed) fields.
13965         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
13967 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
13969         * cfg.c (debug): Use TDF_NONE rather than 0.
13970         * cfghooks.c (debug): Likewise.
13971         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
13972         (struct dump_option_value_info): Convert to...
13973         (struct kv_pair): ...this template type.
13974         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
13975         rather than 0.
13976         (optinfo_verbosity_options): Likewise.
13977         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
13978         OPTGROUP_NONE.
13979         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
13980         than int for "optgroup_flags" param.
13981         (dump_generic_expr_loc): Use dump_flags_t rather than int for
13982         "dump_kind" param.
13983         (dump_dec): Likewise.
13984         (dump_finish): Use TDF_NONE rather than 0.
13985         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
13986         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
13987         than 0.  Update for change to option_ptr.
13988         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
13989         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
13990         0.  Update for changes to optinfo_verbosity_options and
13991         optgroup_options.
13992         (opt_info_switch_p): Convert optgroup_flags from int to
13993         optgroup_flags_t.
13994         (dump_basic_block): Use dump_flags_t rather than int
13995         for "dump_kind" param.
13996         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
13997         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
13998         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
13999         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
14000         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
14001         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
14002         TDF_NONE): Convert from macros to...
14003         (enum dump_flag): ...this new enum.
14004         (dump_flags_t): Update to use enum.
14005         (operator|, operator&, operator~, operator|=, operator&=):
14006         Implement for dump_flags_t.
14007         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
14008         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
14009         Convert from macros to...
14010         (enum optgroup_flag): ...this new enum.
14011         (optgroup_flags_t): New typedef.
14012         (operator|, operator|=): Implement for optgroup_flags_t.
14013         (struct dump_file_info): Convert field "alt_flags" to
14014         dump_flags_t.  Convert field "optgroup_flags" to
14015         optgroup_flags_t.
14016         (dump_basic_block): Use dump_flags_t rather than int for param.
14017         (dump_generic_expr_loc): Likewise.
14018         (dump_dec): Likewise.
14019         (dump_register): Convert param "optgroup_flags" to
14020         optgroup_flags_t.
14021         (opt_info_enable_passes): Likewise.
14022         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
14023         than 0.
14024         * gimple-pretty-print.c (debug): Likewise.
14025         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
14026         (merged_store_group::apply_stores): Likewise.
14027         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
14028         * gimple.c (verify_gimple_pp): Likewise.
14029         * graphite-poly.c (print_pbb_body): Likewise.
14030         * passes.c (pass_manager::register_one_dump_file): Convert
14031         local "optgroup_flags" to optgroup_flags_t.
14032         * print-tree.c (print_node): Use TDF_NONE rather than 0.
14033         (debug): Likewise.
14034         (debug_body): Likewise.
14035         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
14036         to optgroup_flags_t.
14037         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
14038         than 0.
14039         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
14040         (convert_mult_to_fma): Likewise.
14041         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
14042         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
14043         * tree-vect-data-refs.c (dump_lower_bound): Convert param
14044         "dump_kind" to dump_flags_t.
14046 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
14048         * config/rs6000/rs6000.c (min, max): Delete.
14050 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
14052         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
14053         -mabi=spe and -mabi=no-spe.
14055 2018-06-08  Martin Liska  <mliska@suse.cz>
14057         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
14058         where we expect an existing summary.
14060 2018-06-08  Martin Liska  <mliska@suse.cz>
14062         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
14063         * ipa-inline.h (estimate_edge_growth): Likewise.
14065 2018-06-08  Martin Liska  <mliska@suse.cz>
14067         * cgraph.c (function_version_hasher::hash): Use
14068         cgraph_node::get_uid ().
14069         (function_version_hasher::equal):
14070         * cgraph.h (cgraph_node::get_uid): New method.
14071         * ipa-inline.c (update_caller_keys): Use
14072         cgraph_node::get_uid ().
14073         (update_callee_keys): Likewise.
14074         * ipa-utils.c (searchc): Likewise.
14075         (ipa_reduced_postorder): Likewise.
14076         * lto-cgraph.c (input_node): Likewise.
14077         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
14078         * symbol-summary.h (symtab_insertion): Likewise.
14079         (symtab_removal): Likewise.
14080         (symtab_duplication): Likewise.
14081         * tree-pretty-print.c (dump_function_header): Likewise.
14082         * tree-sra.c (convert_callers_for_node): Likewise.
14084 2018-06-08  Martin Liska  <mliska@suse.cz>
14086         * cgraph.c (symbol_table::create_edge): Always assign a new
14087         unique number.
14088         (symbol_table::free_edge): Do not recycle numbers.
14089         * cgraph.h (cgraph_edge::get): New method.
14090         * symbol-summary.h (symtab_removal): Use it.
14091         (symtab_duplication): Likewise.
14092         (call_summary::hashable_uid): Remove.
14094 2018-06-08  Martin Liska  <mliska@suse.cz>
14096         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
14097         (initialize_growth_caches): Remove.
14098         (free_growth_caches): Likewise.
14099         (do_estimate_edge_time): Use edge_growth_cache.
14100         (do_estimate_edge_size): Likewise.
14101         (do_estimate_edge_hints): Likewise.
14102         * ipa-inline.c (reset_edge_caches): Likewise.
14103         (recursive_inlining): Likewise.
14104         (inline_small_functions): Likewise.
14105         * ipa-inline.h (initialize_growth_caches): Remove.
14106         (estimate_edge_size): Likewise.
14107         (estimate_edge_time): Likewise.
14108         (estimate_edge_hints): Likewise.
14109         (reset_edge_growth_cache): Likewise.
14110         * symbol-summary.h (call_summary::remove): New method.
14112 2018-06-08  Martin Liska  <mliska@suse.cz>
14114         * ipa-cp.c (class edge_clone_summary): New summary.
14115         (grow_edge_clone_vectors): Remove.
14116         (ipcp_edge_duplication_hook): Remove.
14117         (class edge_clone_summary_t): New call_summary class.
14118         (ipcp_edge_removal_hook): Remove.
14119         (edge_clone_summary_t::duplicate): New function.
14120         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
14121         (create_specialized_node): Likewise.
14122         (ipcp_driver): Initialize edge_clone_summaries and do not
14123         register hooks.
14125 2018-06-08  Martin Liska  <mliska@suse.cz>
14127         * symbol-summary.h (get): New function.
14128         (call_summary::m_initialize_when_cloning): New class member.
14130 2018-06-08  Martin Liska  <mliska@suse.cz>
14132         * cgraph.c (cgraph_node::remove): Do not recycle uid.
14133         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
14134         (symbol_table::allocate_cgraph_symbol): Do not set uid.
14135         * passes.c (uid_hash_t): Record removed_nodes by their uids.
14136         (remove_cgraph_node_from_order): Use the removed_nodes set.
14137         (do_per_function_toporder): Likwise.
14138         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
14139         instead of summary_uid.
14140         (symtab_removal): Likewise.
14141         (symtab_duplication): Likewise.
14143 2018-06-08  Martin Liska  <mliska@suse.cz>
14145         * ipa-cp.c (ipcp_store_bits_results): Use
14146         ipcp_transformation_sum.
14147         (ipcp_store_vr_results): Likewise.
14148         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
14149         to ...
14150         (ipcp_transformation_initialize): ... this.
14151         (ipa_set_node_agg_value_chain):
14152         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
14153         (write_ipcp_transformation_info): Likewise.
14154         (read_ipcp_transformation_info): Likewise.
14155         (ipcp_update_bits): Likewise.
14156         (ipcp_update_vr): Likewise.
14157         (ipcp_transform_function): Likewise.
14158         * ipa-prop.h: Rename ipcp_transformation_summary to
14159         ipcp_transformation.
14160         (class ipcp_transformation_t): New function summary.
14161         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
14162         (ipa_get_agg_replacements_for_node): Likewise.
14164 2018-06-08  Martin Liska  <mliska@suse.cz>
14166         * ipa-pure-const.c (struct funct_state_d): Do it class instead
14167         of struct.
14168         (class funct_state_summary_t): New function_summary class.
14169         (has_function_state): Remove.
14170         (get_function_state): Likewise.
14171         (set_function_state): Likewise.
14172         (add_new_function): Likewise.
14173         (funct_state_summary_t::insert): New function.
14174         (duplicate_node_data): Remove.
14175         (remove_node_data): Remove.
14176         (funct_state_summary_t::duplicate): New function.
14177         (register_hooks): Create new funct_state_summaries.
14178         (pure_const_generate_summary): Use it.
14179         (pure_const_write_summary): Likewise.
14180         (pure_const_read_summary): Likewise.
14181         (propagate_pure_const): Likewise.
14182         (propagate_nothrow): Likewise.
14183         (dump_malloc_lattice): Likewise.
14184         (propagate_malloc): Likewise.
14185         (execute): Do not register hooks, just remove summary
14186         instead.
14187         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
14188         constructor.
14190 2018-06-08  Martin Liska  <mliska@suse.cz>
14192         * ipa-reference.c (remove_node_data): Remove.
14193         (duplicate_node_data): Likewise.
14194         (class ipa_ref_var_info_summary_t): New class.
14195         (class ipa_ref_opt_summary_t): Likewise.
14196         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
14197         (get_reference_optimization_summary): Use
14198         ipa_ref_opt_sum_summaries.
14199         (set_reference_vars_info): Remove.
14200         (set_reference_optimization_summary): Likewise.
14201         (ipa_init): Create summaries.
14202         (init_function_info): Use function summary.
14203         (ipa_ref_opt_summary_t::duplicate): New function.
14204         (ipa_ref_opt_summary_t::remove): New function.
14205         (get_read_write_all_from_node): Fix GNU coding style.
14206         (propagate): Use function summary.
14207         (write_node_summary_p): Fix GNU coding style.
14208         (stream_out_bitmap): Likewise.
14209         (ipa_reference_read_optimization_summary): Use function summary.
14210         (ipa_reference_c_finalize): Do not release hooks.
14212 2018-06-08  Martin Liska  <mliska@suse.cz>
14214         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14215         (analyze_function_body): Extract multiple calls of get_create.
14216         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14217         * ipa-inline.c (recursive_inlining): Use ::get method.
14218         * ipa-inline.h (estimate_edge_growth): Likewise.
14220 2018-06-08  Martin Liska  <mliska@suse.cz>
14222         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14223         HSA_INVALID.
14224         (hsa_function_summary::hsa_function_summary): Use the new enum
14225         value.
14226         (hsa_gpu_implementation_p): Use hsa_summaries::get.
14227         * hsa-gen.c (hsa_get_host_function): Likewise.
14228         (get_brig_function_name): Likewise.
14229         * ipa-hsa.c (process_hsa_functions): Likewise.
14230         (ipa_hsa_write_summary): Likewise.
14231         * symbol-summary.h (symtab_duplication): Use ::get function/
14232         (get): New function.
14234 2018-06-08  Martin Liska  <mliska@suse.cz>
14236         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14237         of get.
14238         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14239         (hsa_register_kernel): Likewise.
14240         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14241         * hsa-gen.c (hsa_get_host_function): Likewise.
14242         (get_brig_function_name): Likewise.
14243         (generate_hsa): Likewise.
14244         (pass_gen_hsail::execute): Likewise.
14245         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14246         (devirtualization_time_bonus): Likewise.
14247         (ipcp_propagate_stage): Likewise.
14248         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14249         (edge_set_predicate): Likewise.
14250         (evaluate_conditions_for_known_args): Likewise.
14251         (evaluate_properties_for_edge): Likewise.
14252         (ipa_fn_summary::reset): Likewise.
14253         (ipa_fn_summary_t::duplicate): Likewise.
14254         (dump_ipa_call_summary): Likewise.
14255         (ipa_dump_fn_summary): Likewise.
14256         (analyze_function_body): Likewise.
14257         (compute_fn_summary): Likewise.
14258         (estimate_edge_devirt_benefit): Likewise.
14259         (estimate_edge_size_and_time): Likewise.
14260         (estimate_calls_size_and_time): Likewise.
14261         (estimate_node_size_and_time): Likewise.
14262         (inline_update_callee_summaries): Likewise.
14263         (remap_edge_change_prob): Likewise.
14264         (remap_edge_summaries): Likewise.
14265         (ipa_merge_fn_summary_after_inlining): Likewise.
14266         (ipa_update_overall_fn_summary): Likewise.
14267         (read_ipa_call_summary): Likewise.
14268         (inline_read_section): Likewise.
14269         (write_ipa_call_summary): Likewise.
14270         (ipa_fn_summary_write): Likewise.
14271         (ipa_free_fn_summary): Likewise.
14272         * ipa-hsa.c (process_hsa_functions): Likewise.
14273         (ipa_hsa_write_summary): Likewise.
14274         (ipa_hsa_read_section): Likewise.
14275         * ipa-icf.c (sem_function::merge): Likewise.
14276         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14277         (do_estimate_edge_time): Likewise.
14278         (estimate_size_after_inlining): Likewise.
14279         (estimate_growth): Likewise.
14280         (growth_likely_positive): Likewise.
14281         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14282         (inline_call): Likewise.
14283         * ipa-inline.c (caller_growth_limits): Likewise.
14284         (can_inline_edge_p): Likewise.
14285         (can_inline_edge_by_limits_p): Likewise.
14286         (compute_uninlined_call_time): Likewise.
14287         (compute_inlined_call_time): Likewise.
14288         (want_inline_small_function_p): Likewise.
14289         (edge_badness): Likewise.
14290         (update_caller_keys): Likewise.
14291         (update_callee_keys): Likewise.
14292         (recursive_inlining): Likewise.
14293         (inline_small_functions): Likewise.
14294         (inline_to_all_callers_1): Likewise.
14295         (dump_overall_stats): Likewise.
14296         (early_inline_small_functions): Likewise.
14297         (early_inliner): Likewise.
14298         * ipa-inline.h (estimate_edge_growth): Likewise.
14299         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14300         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14301         * ipa-prop.h (IPA_NODE_REF): Likewise.
14302         (IPA_EDGE_REF): Likewise.
14303         * ipa-pure-const.c (malloc_candidate_p): Likewise.
14304         (propagate_malloc): Likewise.
14305         * ipa-split.c (execute_split_functions): Likewise.
14306         * symbol-summary.h: Rename get to get_create.
14307         (get): Likewise.
14308         (get_create): Likewise.
14309         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14311 2018-06-08  Martin Liska  <mliska@suse.cz>
14313         * symbol-summary.h (release): Move definition out of class
14314         declaration.
14315         (symtab_removal): Likewise.
14316         (symtab_duplication): Likewise.
14318 2018-06-08  Martin Liska  <mliska@suse.cz>
14320         * symbol-summary.h (function_summary): Move constructor
14321         implementation out of class declaration.
14322         (release): Likewise.
14323         (symtab_insertion): Likewise.
14324         (symtab_removal): Likewise.
14325         (symtab_duplication): Likewise.
14326         (get): Likewise.
14328 2018-06-08  Martin Liska  <mliska@suse.cz>
14330         * Makefile.in: Remove support for MPX (macros, related functions,
14331         fields in cgraph_node, ...).
14332         * builtin-types.def (BT_BND): Likewise.
14333         (BT_FN_BND_CONST_PTR): Likewise.
14334         (BT_FN_CONST_PTR_BND): Likewise.
14335         (BT_FN_VOID_PTR_BND): Likewise.
14336         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14337         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14338         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14339         (expand_builtin_mempcpy_with_bounds): Likewise.
14340         (expand_builtin_memset_with_bounds): Likewise.
14341         (expand_builtin_memset_args): Likewise.
14342         (std_expand_builtin_va_start): Likewise.
14343         (expand_builtin): Likewise.
14344         (expand_builtin_with_bounds): Likewise.
14345         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14346         (DEF_LIB_BUILTIN_CHKP): Likewise.
14347         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14348         (DEF_CHKP_BUILTIN): Likewise.
14349         (BUILT_IN_MEMCPY): Likewise.
14350         (BUILT_IN_MEMMOVE): Likewise.
14351         (BUILT_IN_MEMPCPY): Likewise.
14352         (BUILT_IN_MEMSET): Likewise.
14353         (BUILT_IN_STPCPY): Likewise.
14354         (BUILT_IN_STRCAT): Likewise.
14355         (BUILT_IN_STRCHR): Likewise.
14356         (BUILT_IN_STRCPY): Likewise.
14357         (BUILT_IN_STRLEN): Likewise.
14358         (BUILT_IN_MEMCPY_CHK): Likewise.
14359         (BUILT_IN_MEMMOVE_CHK): Likewise.
14360         (BUILT_IN_MEMPCPY_CHK): Likewise.
14361         (BUILT_IN_MEMSET_CHK): Likewise.
14362         (BUILT_IN_STPCPY_CHK): Likewise.
14363         (BUILT_IN_STRCAT_CHK): Likewise.
14364         (BUILT_IN_STRCPY_CHK): Likewise.
14365         * calls.c (store_bounds): Likewise.
14366         (emit_call_1): Likewise.
14367         (special_function_p): Likewise.
14368         (maybe_warn_nonstring_arg): Likewise.
14369         (initialize_argument_information): Likewise.
14370         (finalize_must_preallocate): Likewise.
14371         (compute_argument_addresses): Likewise.
14372         (expand_call): Likewise.
14373         * cfgexpand.c (expand_call_stmt): Likewise.
14374         (expand_return): Likewise.
14375         (expand_gimple_stmt_1): Likewise.
14376         (pass_expand::execute): Likewise.
14377         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14378         (cgraph_node::remove): Likewise.
14379         (cgraph_node::dump): Likewise.
14380         (cgraph_node::verify_node): Likewise.
14381         * cgraph.h (chkp_function_instrumented_p): Likewise.
14382         (symtab_node::get_alias_target): Likewise.
14383         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14384         (cgraph_local_p): Likewise.
14385         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14386         (cgraph_edge::rebuild_references): Likewise.
14387         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14388         (walk_polymorphic_call_targets): Likewise.
14389         (cgraph_node::expand_thunk): Likewise.
14390         (symbol_table::output_weakrefs): Likewise.
14391         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14392         (ix86_handle_option): Likewise.
14393         * config/i386/constraints.md: Likewise.
14394         * config/i386/i386-builtin-types.def (BND): Likewise.
14395         (VOID): Likewise.
14396         (PVOID): Likewise.
14397         (ULONG): Likewise.
14398         * config/i386/i386-builtin.def (BDESC_END): Likewise.
14399         (BDESC_FIRST): Likewise.
14400         (BDESC): Likewise.
14401         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14402         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14403         * config/i386/i386.c (enum reg_class): Likewise.
14404         (ix86_target_string): Likewise.
14405         (ix86_option_override_internal): Likewise.
14406         (ix86_conditional_register_usage): Likewise.
14407         (ix86_valid_target_attribute_inner_p): Likewise.
14408         (ix86_set_indirect_branch_type): Likewise.
14409         (ix86_set_current_function): Likewise.
14410         (ix86_function_arg_regno_p): Likewise.
14411         (init_cumulative_args): Likewise.
14412         (ix86_function_arg_advance): Likewise.
14413         (ix86_function_arg): Likewise.
14414         (ix86_pass_by_reference): Likewise.
14415         (ix86_function_value_regno_p): Likewise.
14416         (ix86_function_value_1): Likewise.
14417         (ix86_function_value_bounds): Likewise.
14418         (ix86_return_in_memory): Likewise.
14419         (ix86_setup_incoming_vararg_bounds): Likewise.
14420         (ix86_va_start): Likewise.
14421         (indirect_thunk_need_prefix): Likewise.
14422         (print_reg): Likewise.
14423         (ix86_print_operand): Likewise.
14424         (ix86_expand_call): Likewise.
14425         (ix86_output_function_return): Likewise.
14426         (reg_encoded_number): Likewise.
14427         (BDESC_VERIFYS): Likewise.
14428         (ix86_init_mpx_builtins): Likewise.
14429         (ix86_init_builtins): Likewise.
14430         (ix86_emit_cmove): Likewise.
14431         (ix86_emit_move_max): Likewise.
14432         (ix86_expand_builtin): Likewise.
14433         (ix86_builtin_mpx_function): Likewise.
14434         (ix86_get_arg_address_for_bt): Likewise.
14435         (ix86_load_bounds): Likewise.
14436         (ix86_store_bounds): Likewise.
14437         (ix86_load_returned_bounds): Likewise.
14438         (ix86_store_returned_bounds): Likewise.
14439         (ix86_class_likely_spilled_p): Likewise.
14440         (ix86_hard_regno_mode_ok): Likewise.
14441         (x86_order_regs_for_local_alloc): Likewise.
14442         (ix86_mitigate_rop): Likewise.
14443         (ix86_bnd_prefixed_insn_p): Likewise.
14444         (ix86_mpx_bound_mode): Likewise.
14445         (ix86_make_bounds_constant): Likewise.
14446         (ix86_initialize_bounds): Likewise.
14447         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14448         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14449         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14450         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14451         (TARGET_CHKP_BOUND_MODE): Likewise.
14452         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14453         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14454         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14455         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14456         * config/i386/i386.h (TARGET_MPX): Likewise.
14457         (TARGET_MPX_P): Likewise.
14458         (VALID_BND_REG_MODE): Likewise.
14459         (FIRST_BND_REG): Likewise.
14460         (LAST_BND_REG): Likewise.
14461         (enum reg_class): Likewise.
14462         (BND_REG_P): Likewise.
14463         (BND_REGNO_P): Likewise.
14464         (BNDmode): Likewise.
14465         (ADJUST_INSN_LENGTH): Likewise.
14466         * config/i386/i386.md: Likewise.
14467         * config/i386/i386.opt: Likewise.
14468         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14469         (defined): Likewise.
14470         (LINK_MPX): Likewise.
14471         (MPX_SPEC): Likewise.
14472         (LIBMPX_SPEC): Likewise.
14473         (LIBMPXWRAPPERS_SPEC): Likewise.
14474         (CHKP_SPEC): Likewise.
14475         * config/i386/predicates.md: Likewise.
14476         * dbxout.c (dbxout_type): Likewise.
14477         * doc/extend.texi: Likewise.
14478         * doc/invoke.texi: Likewise.
14479         * doc/md.texi: Likewise.
14480         * doc/tm.texi: Likewise.
14481         * doc/tm.texi.in: Likewise.
14482         * dwarf2out.c (is_base_type): Likewise.
14483         (gen_formal_types_die): Likewise.
14484         (gen_subprogram_die): Likewise.
14485         (gen_type_die_with_usage): Likewise.
14486         (gen_decl_die): Likewise.
14487         (dwarf2out_late_global_decl): Likewise.
14488         * expr.c (expand_assignment): Likewise.
14489         (emit_storent_insn): Likewise.
14490         (store_expr_with_bounds): Likewise.
14491         (store_expr): Likewise.
14492         (expand_expr_real_1): Likewise.
14493         * expr.h (store_expr_with_bounds): Likewise.
14494         * function.c (use_register_for_decl): Likewise.
14495         (struct bounds_parm_data): Likewise.
14496         (assign_parms_augmented_arg_list): Likewise.
14497         (assign_parm_find_entry_rtl): Likewise.
14498         (assign_parm_is_stack_parm): Likewise.
14499         (assign_parm_load_bounds): Likewise.
14500         (assign_bounds): Likewise.
14501         (assign_parms): Likewise.
14502         (expand_function_start): Likewise.
14503         * gcc.c (CHKP_SPEC): Likewise.
14504         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14505         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14506         (wrestrict_dom_walker::check_call): Likewise.
14507         * gimple.c (gimple_build_call_from_tree): Likewise.
14508         * gimple.h (enum gf_mask): Likewise.
14509         (gimple_call_with_bounds_p): Likewise.
14510         (gimple_call_set_with_bounds): Likewise.
14511         * gimplify.c (gimplify_init_constructor): Likewise.
14512         * ipa-cp.c (initialize_node_lattices): Likewise.
14513         (propagate_constants_across_call): Likewise.
14514         (find_more_scalar_values_for_callers_subset): Likewise.
14515         * ipa-hsa.c (process_hsa_functions): Likewise.
14516         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14517         * ipa-icf.c (sem_function::merge): Likewise.
14518         * ipa-inline.c (early_inliner): Likewise.
14519         * ipa-pure-const.c (warn_function_noreturn): Likewise.
14520         (warn_function_cold): Likewise.
14521         (propagate_pure_const): Likewise.
14522         * ipa-ref.h (enum GTY): Likewise.
14523         * ipa-split.c (find_retbnd): Likewise.
14524         (consider_split): Likewise.
14525         (split_function): Likewise.
14526         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14527         * ipa.c (walk_polymorphic_call_targets): Likewise.
14528         (symbol_table::remove_unreachable_nodes): Likewise.
14529         (process_references): Likewise.
14530         (cgraph_build_static_cdtor_1): Likewise.
14531         * lto-cgraph.c (lto_output_node): Likewise.
14532         (output_refs): Likewise.
14533         (compute_ltrans_boundary): Likewise.
14534         (input_overwrite_node): Likewise.
14535         (input_node): Likewise.
14536         (input_cgraph_1): Likewise.
14537         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14538         * passes.c (pass_manager::execute_early_local_passes): Likewise.
14539         (class pass_chkp_instrumentation_passes): Likewise.
14540         (make_pass_chkp_instrumentation_passes): Likewise.
14541         * passes.def: Likewise.
14542         * rtl.h (struct GTY): Likewise.
14543         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14544         * stor-layout.c (layout_type): Likewise.
14545         * symtab.c: Likewise.
14546         * target.def: Likewise.
14547         * targhooks.c (default_chkp_bound_type): Likewise.
14548         (default_chkp_bound_mode): Likewise.
14549         (default_builtin_chkp_function): Likewise.
14550         (default_chkp_function_value_bounds): Likewise.
14551         (default_chkp_make_bounds_constant): Likewise.
14552         (default_chkp_initialize_bounds): Likewise.
14553         * targhooks.h (default_chkp_bound_type): Likewise.
14554         (default_chkp_bound_mode): Likewise.
14555         (default_builtin_chkp_function): Likewise.
14556         (default_chkp_function_value_bounds): Likewise.
14557         (default_chkp_make_bounds_constant): Likewise.
14558         (default_chkp_initialize_bounds): Likewise.
14559         * toplev.c (compile_file): Likewise.
14560         (process_options): Likewise.
14561         * tree-core.h (DEF_BUILTIN): Likewise.
14562         (DEF_BUILTIN_CHKP): Likewise.
14563         * tree-inline.c (declare_return_variable): Likewise.
14564         (remap_gimple_stmt): Likewise.
14565         (copy_bb): Likewise.
14566         (initialize_inlined_parameters): Likewise.
14567         (expand_call_inline): Likewise.
14568         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14569         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14570         (make_pass_ipa_chkp_produce_thunks): Likewise.
14571         (make_pass_chkp): Likewise.
14572         (make_pass_chkp_opt): Likewise.
14573         (make_pass_chkp_instrumentation_passes): Likewise.
14574         * tree-pretty-print.c (dump_generic_node): Likewise.
14575         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14576         * tree-ssa-dce.c (propagate_necessity): Likewise.
14577         (eliminate_unnecessary_stmts): Likewise.
14578         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14579         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14580         * tree-ssa-sccvn.h: Likewise.
14581         * tree-ssa-strlen.c (get_string_length): Likewise.
14582         (valid_builtin_call): Likewise.
14583         (adjust_last_stmt): Likewise.
14584         (handle_builtin_strchr): Likewise.
14585         (handle_builtin_strcpy): Likewise.
14586         (handle_builtin_stxncpy): Likewise.
14587         (handle_builtin_memcpy): Likewise.
14588         (handle_builtin_strcat): Likewise.
14589         (strlen_check_and_optimize_stmt): Likewise.
14590         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14591         * tree-streamer-in.c: Likewise.
14592         * tree-streamer.c (record_common_node): Likewise.
14593         * tree.c (tree_code_size): Likewise.
14594         (wide_int_to_tree_1): Likewise.
14595         (type_contains_placeholder_1): Likewise.
14596         (build_common_tree_nodes): Likewise.
14597         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14598         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14599         (POINTER_BOUNDS_P): Likewise.
14600         (BOUNDED_TYPE_P): Likewise.
14601         (BOUNDED_P): Likewise.
14602         (CALL_WITH_BOUNDS_P): Likewise.
14603         (pointer_bounds_type_node): Likewise.
14604         * value-prof.c (gimple_ic): Likewise.
14605         * var-tracking.c (vt_add_function_parameters): Likewise.
14606         * varasm.c (make_decl_rtl): Likewise.
14607         (assemble_start_function): Likewise.
14608         (output_constant): Likewise.
14609         (maybe_assemble_visibility): Likewise.
14610         * varpool.c (ctor_for_folding): Likewise.
14611         * chkp-builtins.def: Remove.
14612         * ipa-chkp.c: Remove.
14613         * ipa-chkp.h: Remove.
14614         * rtl-chkp.c: Remove.
14615         * rtl-chkp.h: Remove.
14616         * tree-chkp-opt.c: Remove.
14617         * tree-chkp.c: Remove.
14618         * tree-chkp.h: Remove.
14620 2018-06-07  Carl Love  <cel@us.ibm.com>
14622         * config/rs6000/vsx.md (vextract_fp_from_shorth,
14623         vextract_fp_from_shortl): Add BE support.
14625 2018-06-07  Paul Koning  <ni1d@arrl.net>
14627         * compare-elim.c (try_merge_compare): Don't merge compare if
14628         address contains a side effect.
14629         (try_eliminate_compare): Likewise.
14631 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
14633         * config.gcc: Support "tremont".
14634         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14635         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14636         PROCESSOR_TREMONT.
14637         * config/i386/i386.c (m_TREMONT): Define.
14638         (processor_target_table): Add "tremont".
14639         (PTA_TREMONT): Define.
14640         (ix86_lea_outperforms): Add TARGET_TREMONT.
14641         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14642         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14643         and M_INTEL_GOLDMONT_PLUS.
14644         (fold_builtin_cpu): Add "tremont".
14645         (ix86_add_stmt_cost): Add TARGET_TREMONT.
14646         (ix86_option_override_internal): Add "tremont".
14647         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14648         (processor_type): Add PROCESSOR_TREMONT.
14649         * config/i386/x86-tune.def: Add m_TREMONT.
14650         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14652 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14654         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14655         symbol defined for msp430i* devices to be lower case.
14657 2018-06-07  Richard Biener  <rguenther@suse.de>
14659         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14660         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
14661         Properly wrap signed arithmetic if overflow wraps.
14663 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
14665         PR tree-optimization/69615
14666         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14667         of a cast from a same precision integral SSA_NAME in a bb dominated
14668         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
14669         cast to utype if rhs2 has already a compatible type.
14671 2018-06-07  Richard Biener  <rguenther@suse.de>
14673         PR tree-optimization/85935
14674         * graphite-scop-detection.c (find_params_in_bb): Analyze
14675         condition operands with respect to the correct loop.  Assert
14676         the analysis doesn't fail.
14678 2018-06-04  Carl Love  <cel@us.ibm.com>
14680         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14681         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
14682         as it is slightly cheaper.
14683         (first_match_or_eos_index_<mode>):
14684         Calculate index using natural element order.
14685         (first_match_index_<mode>):
14686         Calculate index using natural element order.
14687         (first_match_or_eos_index_<mode>):
14688         Calculate index using natural order.
14689         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14690         for BE and LE modes.
14691         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14692         P9V_BUILTIN_VCLZLSBB_V16QI.
14693         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14694         specific.
14696 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14698         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14699         indentation and line wrap for many prototypes.  Add missing
14700         @smallexample directives around block of prototypes for vec_xl and
14701         vec_xst.
14703 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
14705         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14706         track if we pass or return IEEE 128-bit floating point.
14707         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14708         C++ mangling that is compatible with GCC 8.1.
14709         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14710         (init_cumulative_args): Note if we pass or return IEEE 128-bit
14711         floating point types.
14712         (rs6000_function_arg_advance_1): Likewise.
14713         (rs6000_mangle_type): Optionally generate mangled names that match
14714         what GCC 8.1 generated for IEEE 128-bit floating point types.
14715         (rs6000_globalize_decl_name): If we have an external function that
14716         passes or returns IEEE 128-bit types, generate a weak reference
14717         from the mangled name used in GCC 8.1 to the current mangled
14718         name.
14719         (rs6000_init_builtins): Make __ibm128 use the long double type if
14720         long double is IBM extended double.  Make __float128 use the long
14721         double type if long double is IEEE 128-bit.
14723         PR target/85657
14724         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14725         macro for __ibm128 built-in functions.
14726         (PACK_IF): Add __ibm128 pack/unpack functions.
14727         (UNPACK_IF): Likewise.
14728         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14729         enable long double built-in functions if long double is IEEE
14730         128-bit floating point.
14731         (rs6000_invalid_builtin): Update long double built-in function
14732         error message.
14733         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14734         functions, adjust the built-in function to use the long double
14735         built-in function if __ibm128 and long double are the same type.
14736         * doc/extend.texi (PowerPC builtins): Update documention for
14737         __builtin_{,un}pack_longdouble.  Add documentation for
14738         __builtin_{,un}pack_ibm128.
14740 2018-06-06  Jim Wilson  <jimw@sifive.com>
14742         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14743         (struct machine_function): New field interrupt_mode.
14744         (riscv_handle_type_attribute): New function.  Add forward declaration.
14745         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14746         (riscv_expand_epilogue): Check interrupt_mode field.
14747         (riscv_set_current_function): Check interrupt attribute args and
14748         set interrupt_mode field.
14749         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14750         (riscv_sret, riscv_uret): New.
14751         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14752         new arguments to interrupt attribute.
14754 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
14756         PR target/63177
14757         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14758         Don't handle -mcpu=power8 if -mpower9-vector is also used.
14760 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14762         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14763         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14764         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14765         several redundant entries.
14767 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
14769         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14770         type from "rtx" to "rtx_insn *".
14771         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14772         for local "call_insn", removing cast.
14773         (ix86_expand_call): Likewise, introducing a "call_insn" local.
14775 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
14777         PR tree-optimization/86066
14778         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14779         for BIT_INSERT_EXPR stores.
14781 2018-06-06  Richard Biener  <rguenther@suse.de>
14783         PR tree-optimization/86062
14784         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14785         component refs ontop
14786         of to be offsetted base.
14788 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14790         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14791         to be static and remove check on interrupt attribute name.
14793 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14795         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14796         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14798 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
14800         PR target/79924
14801         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14802         second argument.
14803         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14804         Remove second argument, change how error is called.
14805         (aarch64_layout_arg): Remove second argument from
14806         aarch64_err_no_fpadvsimd call.
14807         (aarch64_init_cumulative_args): Ditto.
14808         (aarch64_gimplify_va_arg_expr): Ditto.
14809         * config/aarch64/aarch64.md (mov<mode>): Ditto.
14811 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
14813         * config/i386/i386.md (simple_return_indirect_internal): New expander.
14814         (*simple_return_indirect_internal<mode>): Rename from
14815         simple_return_indirect_internal.  Use W mode iterator.
14816         (rstorssp): New expander.
14817         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
14818         (clrssbsy): New expander.
14819         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
14821 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14823         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14824         __typeof__.
14825         (cmse_check_pointed_object): Likewise.
14827 2018-06-05  Martin Liska  <mliska@suse.cz>
14829         PR gcov-profile/47618
14830         * doc/invoke.texi: Document how -fprofile-dir format
14831         is extended.
14833 2018-06-05  Richard Biener  <rguenther@suse.de>
14835         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14836         removal pretend DOM info isn't available so we do not update
14837         it and only remove edges, not dominated blocks.  Actually free
14838         DOM info in case we removed something.  Remove unreachable blocks.
14839         (mfb_keep_latches): Work with either DOM info or marked backedges.
14840         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14841         first.  Mark backedges if DOM info isn't available.
14842         (Re-)compute DOM info after cleanup_control_flow_pre.
14844 2018-06-05  Richard Biener  <rguenther@suse.de>
14846         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14847         (locus_discrim_hasher::hash): Adjust.
14848         (locus_discrim_hasher::equal): Likewise.
14849         (next_discriminator_for_locus): Work on line directly.
14850         (same_line_p): Pass in expanded locus1 as well.
14851         (assign_discriminators): Avoid redundant location expansions.
14853 2018-06-05  Richard Biener  <rguenther@suse.de>
14855         PR tree-optimization/86046
14856         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14857         if required after clearing TREE_ADDRESSABLE.
14859 2018-06-05  Richard Biener  <rguenther@suse.de>
14861         PR tree-optimization/86047
14862         * tree-ssa-loop.c (for_each_index): Glob handling of all
14863         decls and constants and really handle all of them.
14865 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14867         PR target/81497
14868         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14869         qualifier_void_pointer and qualifier_const_void_pointer.
14870         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14871         (arm_init_builtins): Handle the above.
14872         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14873         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14874         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14875         void intrinsics.
14877 2018-06-05  Martin Liska  <mliska@suse.cz>
14879         * auto-profile.c (read_autofdo_file): Do not use
14880         gcov_ctr_summary struct.
14881         (afdo_callsite_hot_enough_for_early_inline): Likewise.
14882         * coverage.c (struct counts_entry): Likewise.
14883         (read_counts_file): Read just single summary entry.
14884         (get_coverage_counts): Use gcov_summary struct.
14885         * coverage.h (get_coverage_counts): Likewise.
14886         * gcov-dump.c (dump_working_sets): Likewise.
14887         (tag_summary): Dump just single summary.
14888         * gcov-io.c (gcov_write_summary): Write just histogram
14889         summary.
14890         (gcov_read_summary): Read just single summary.
14891         (compute_working_sets): Use gcov_summary struct.
14892         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14893         of GCOV_COUNTERS_SUMMABLE.
14894         (GCOV_COUNTERS_SUMMABLE): Remove.
14895         (GCOV_FIRST_VALUE_COUNTER): Replace with
14896         GCOV_COUNTER_V_INTERVAL.
14897         (struct gcov_ctr_summary): Remove.
14898         (struct gcov_summary): Directly use fields of former
14899         gcov_ctr_summary.
14900         (compute_working_sets): Use gcov_summary struct.
14901         * gcov.c (read_count_file): Do not use ctrs fields.
14902         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14903         struct.
14904         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14905         struct.
14906         * profile.c: Likewise.
14907         * profile.h: Likewise.
14909 2018-06-05  Martin Liska  <mliska@suse.cz>
14911         PR gcov-profile/84846
14912         * gcov.c (output_lines): Print working directory only
14913         in intermediate format.
14915 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
14917         * config/s390/s390-builtin-types.def: Add void function type.
14918         * config/s390/s390-builtins.def: Use the function type for the
14919         tbeginc builtin.
14921 2018-06-04  Jim Wilson  <jimw@sifive.com>
14923         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14924         to int.
14925         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14926         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
14927         handle EH_RETURN_DATA_REGNO registers properly.
14928         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14929         (riscv_expand_epilogue): Update comment.  Change argument name and
14930         type.  Update code to use new name and type.  Pass new args to
14931         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
14932         EXCEPTION_RETURN.
14933         * config/riscv/riscv.md (NORMAL_RETURN): New.
14934         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
14935         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
14936         (eh_return): Call gen_eh_return_internal and emit barrier.
14937         (eh_return_internal): Call riscv_expand_epilogue.
14939 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
14941         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
14942         bit_insertion field and declare can_be_merged_into method.
14943         (merged_store_group::can_be_merged_into): New method.
14944         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
14945         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
14946         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
14948 2018-06-04  Richard Biener  <rguenther@suse.de>
14950         PR tree-optimization/85955
14951         * builtins.c (fold_builtin_sincos): Convert pointers to
14952         destination to appropriate type before dereferencing.
14954 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
14956         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
14958 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
14960         * expr.c (expand_expr_real_1): Force the operand into memory if
14961         its TYPE_MODE is BLKmode and if there is no integer mode for
14962         the number of bits being extracted.
14964 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
14966         PR target/85832
14967         PR target/86036
14968         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14969         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
14971 2018-06-04  Richard Biener  <rguenther@suse.de>
14973         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
14974         (cleanup_tree_cfg_noloop): ... single caller.  Do
14975         start_recording_case_labels later.
14977 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
14979         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
14980         to _IMMINTRIN_H_INCLUDED.
14981         * config/i386/pconfigintrin.h: Ditto.
14982         * config/i386/waitpkgintrin.h: Ditto.
14983         * config/i386/immintrin.h: Add includes for sgxintrin.h,
14984         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
14985         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
14986         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
14987         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
14988         waitpkgintrin.h and cldemoteintrin.h.
14990 2018-06-04  Richard Biener  <rguenther@suse.de>
14992         PR tree-optimization/86038
14993         * tracer.c (find_best_successor): Check probability for
14994         being initialized, bail out if not.
14996 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
14998         PR target/86003
14999         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
15000         of bits to ignore when comparing architectures.
15002 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
15004         PR tree-optimization/69615
15005         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
15006         maximum or minimum of the type, try to merge it also as if
15007         range1 is + [-, x - 1] or + [x + 1, -].
15009         PR c++/86025
15010         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
15012 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
15014         PR tree-optimization/86034
15015         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
15016         the unsigned bitfield type in a bit insertion sequence if it does not
15017         have a larger precision than the bitfield size.
15018         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
15020 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
15022         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
15024 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15026         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
15027         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
15028         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
15029         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
15031 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15033         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
15034         Disable -fdelete-null-pointer-checks for ELF toolchain.
15036 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15037             Kito Cheng  <kito.cheng@gmail.com>
15039         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
15040         (nds32le-*-*, nds32be-*-*): Integrate checking process.
15041         (nds32*-*-*): Add glibc and uclibc conditions.
15042         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
15043         (TARGET_EXCEPT_UNWIND_INFO): Define.
15044         * config/nds32/elf.h: New file.
15045         * config/nds32/linux.h: New file.
15046         * config/nds32/nds32-elf.opt: New file.
15047         * config/nds32/nds32-linux.opt: New file.
15048         * config/nds32/nds32-fp-as-gp.c
15049         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
15050         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
15051         TARGET_LINUX_ABI.
15052         (nds32_asm_file_end): Ditto.
15053         (nds32_print_operand): Ditto.
15054         (nds32_insert_attributes): Ditto.
15055         (nds32_init_libfuncs): New function.
15056         (TARGET_HAVE_TLS): Define.
15057         (TARGET_INIT_LIBFUNCS): Define.
15058         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
15059         spec content.
15060         (TARGET_ELF): Apply different mcmodel setting.
15061         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
15062         been migrated into elf.h and linux.h files.
15063         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
15064         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
15065         (mcmodel): The content has been migrated into nds32-elf.opt and
15066         nds32-linux.opt files.
15067         * config/nds32/t-elf: New file.
15068         * config/nds32/t-linux: New file.
15070 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15071             Shiva Chen  <shiva0217@gmail.com>
15073         * config/nds32/constants.md (unspec_volatile_element): Add
15074         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
15075         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
15076         optimization.
15077         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
15078         (make_pass_nds32_fp_as_gp): Declare.
15079         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
15080         optmization pass.
15081         (nds32_asm_function_end_prologue): Remove unused asm output.
15082         (nds32_asm_function_begin_epilogue): Remove unused asm output.
15083         (nds32_asm_file_start): Output necessary fp_as_gp information.
15084         (nds32_option_override): Adjust register usage.
15085         (nds32_expand_prologue): Consider fp_as_gp situation.
15086         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
15087         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
15088         (epilogue): Ditto.
15089         (return): Ditto.
15090         (simple_return): Ditto.
15091         (omit_fp_begin): Output special directive for fp_as_gp.
15092         (omit_fp_end): Output special directive for fp_as_gp.
15093         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
15094         mforbid-fp-as-gp): New options.
15096 2018-06-01  Mark Wielaard  <mark@klomp.org>
15098         * dwarf2out.c (dwarf2out_finish): Remove generation of
15099         DW_AT_loclists_base.
15101 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
15103         * gimple-ssa-store-merging.c: Include gimple-fold.h.
15104         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
15105         (struct merged_store_group): Add bit_insertion field.
15106         (dump_char_array): Use standard hexadecimal format.
15107         (merged_store_group::merged_store_group): Set bit_insertion to false.
15108         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
15109         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
15110         also print the mask in the dump file.
15111         (pass_store_merging::gate): Minor tweak.
15112         (imm_store_chain_info::coalesce_immediate): Fix wrong association
15113         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
15114         stores with INTEGER_CST stores.
15115         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
15116         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
15117         and use it throughout.  Generate bit insertion sequences if need be.
15118         (pass_store_merging::process_store): Remove redundant condition.
15119         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
15121 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
15123         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
15124         the 128-bit floating point types.  Fix function comment.
15126 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15128         * config/aarch64/aarch64-simd.md
15129         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
15130         mnemonics.
15131         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
15132         mnemonics.
15134 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
15136         PR tree-optimization/85989
15137         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
15138         variable.
15139         (backprop::intersect_uses): Check it when deciding whether this
15140         is a backedge reference.
15141         (backprop::process_block): Add each phi to m_visited_phis
15142         after visiting it, then clear it at the end.
15144 2018-06-01  Richard Biener  <rguenther@suse.de>
15146         * tree-vectorizer.h (vect_dr_stmt): New function.
15147         (vect_get_load_cost): Adjust.
15148         (vect_get_store_cost): Likewise.
15149         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
15150         Use vect_dr_stmt instead of DR_SMTT.
15151         (vect_record_base_alignments): Likewise.
15152         (vect_calculate_target_alignment): Likewise.
15153         (vect_compute_data_ref_alignment): Likewise and make static.
15154         (vect_update_misalignment_for_peel): Likewise.
15155         (vect_verify_datarefs_alignment): Likewise.
15156         (vector_alignment_reachable_p): Likewise.
15157         (vect_get_data_access_cost): Likewise.  Pass down
15158         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
15159         (vect_get_peeling_costs_all_drs): Likewise.
15160         (vect_peeling_hash_get_lowest_cost): Likewise.
15161         (vect_enhance_data_refs_alignment): Likewise.
15162         (vect_find_same_alignment_drs): Likewise.
15163         (vect_analyze_data_refs_alignment): Likewise.
15164         (vect_analyze_group_access_1): Likewise.
15165         (vect_analyze_group_access): Likewise.
15166         (vect_analyze_data_ref_access): Likewise.
15167         (vect_analyze_data_ref_accesses): Likewise.
15168         (vect_vfa_segment_size): Likewise.
15169         (vect_small_gap_p): Likewise.
15170         (vectorizable_with_step_bound_p): Likewise.
15171         (vect_prune_runtime_alias_test_list): Likewise.
15172         (vect_analyze_data_refs): Likewise.
15173         (vect_supportable_dr_alignment): Likewise.
15174         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15175         (vect_gen_prolog_loop_niters): Likewise.
15176         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15177         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
15178         modify DR_STMT.
15179         (vect_recog_mask_conversion_pattern): Likewise.
15180         (vect_try_gather_scatter_pattern): Likewise.
15181         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
15182         to vect_get_store_cost.
15183         (vect_get_store_cost): Get stmt_info instead of DR.
15184         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
15185         (vect_get_load_cost): Get stmt_info instead of DR.
15187 2018-06-01  Richard Biener  <rguenther@suse.de>
15189         PR middle-end/86017
15190         * gimple-fold.c (var_decl_component_p): Also allow offsetted
15191         vars wrapped in MEM_REFs.
15193 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
15195         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15196         Fix subreg tests so that we only return a choice between
15197         GENERAL_REGS and FP_REGS if the original classes included both.
15199 2018-06-01  Richard Biener  <rguenther@suse.de>
15201         PR ipa/85960
15202         * tree-ssa-structalias.c (get_function_part_constraint):
15203         Handle NULL fi->decl.
15204         (find_func_aliases_for_call): Properly handle indirect
15205         fi from direct call.
15206         (find_func_clobbers): Likewise.
15207         (ipa_pta_execute): Likewise.
15208         (create_variable_info_for): For functions that are ifunc_resolver
15209         resolve to a varinfo that contains the result of the resolver call.
15210         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15211         aliases.
15213 2018-05-31  Michael Collison  <michael.collison@arm.com>
15215         * config/aarch64/aarch64.md:
15216         (*fix_to_zero_extenddfdi2): New pattern.
15217         * gcc.target/aarch64/fix_extend1.c: New testcase.
15219 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
15221         PR middle-end/78809
15222         PR middle-end/83026
15223         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15224         and BUILT_IN_STRNCMP_EQ.
15225         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15226         BUILT_IN_STRNCMP_EQ.
15227         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15228         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15229         (gimple_fold_builtin): Likewise.
15230         * tree-ssa-strlen.c (compute_string_length): New function.
15231         (determine_min_obsize): New function.
15232         (handle_builtin_string_cmp): New function to handle calls to
15233         string compare functions.
15234         (strlen_optimize_stmt): Add handling to builtin string compare
15235         calls.
15236         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15237         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15238         * tree.c (build_common_builtin_nodes): Add new defines of
15239         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15241 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
15243         PR target/85984
15244         * bb-reorder.c (pass_partition_blocks::gate): Return false for
15245         functions with naked attribute.
15247 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
15249         * config/i386/sse.md (avx_vec_concat<mode>):
15250         Substitute concat_tg_mode mode attribute with xtg_mode.
15251         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15252         (concat_tg_mode): Remove mode attribute.
15254 2018-05-31  Martin Sebor  <msebor@redhat.com>
15256         PR c/82063
15257         * calls.c (alloc_max_size): Correct a logic error/typo.
15258         Treat excessive arguments as infinite.  Warn for invalid arguments.
15259         * doc/invoke.texi (-Walloc-size-larger-than): Update.
15261 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
15263         PR target/85829
15264         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15265         and movx for Haswell.
15267 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
15268             Cesar Philippidis  <cesar@codesourcery.com>
15270         PR middle-end/85879
15271         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15272         when emitting error on private/firstprivate reductions.
15273         * omp-low.c (lower_omp_target): Avoid reference-type processing
15274         on pointers for firstprivate clause.
15276 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
15278         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15279         (st1x2): Likewise.
15280         (st1x3): Likewise.
15281         * config/aarch64/aarch64-simd.md
15282         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15283         (aarch64_ld1_x3_<mode>): Likewise
15284         (aarch64_st1x2<VALLDIF:mode>): Likewise
15285         (aarch64_st1_x2_<mode>): Likewise
15286         (aarch64_st1x3<VALLDIF:mode>): Likewise
15287         (aarch64_st1_x3_<mode>): Likewise
15288         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15289         (vld1_s8_x3): Likewise.
15290         (vld1_u16_x3): Likewise.
15291         (vld1_s16_x3): Likewise.
15292         (vld1_u32_x3): Likewise.
15293         (vld1_s32_x3): Likewise.
15294         (vld1_u64_x3): Likewise.
15295         (vld1_s64_x3): Likewise.
15296         (vld1_f16_x3): Likewise.
15297         (vld1_f32_x3): Likewise.
15298         (vld1_f64_x3): Likewise.
15299         (vld1_p8_x3): Likewise.
15300         (vld1_p16_x3): Likewise.
15301         (vld1_p64_x3): Likewise.
15302         (vld1q_u8_x3): Likewise.
15303         (vld1q_s8_x3): Likewise.
15304         (vld1q_u16_x3): Likewise.
15305         (vld1q_s16_x3): Likewise.
15306         (vld1q_u32_x3): Likewise.
15307         (vld1q_s32_x3): Likewise.
15308         (vld1q_u64_x3): Likewise.
15309         (vld1q_s64_x3): Likewise.
15310         (vld1q_f16_x3): Likewise.
15311         (vld1q_f32_x3): Likewise.
15312         (vld1q_f64_x3): Likewise.
15313         (vld1q_p8_x3): Likewise.
15314         (vld1q_p16_x3): Likewise.
15315         (vld1q_p64_x3): Likewise.
15316         (vst1_s64_x2): Likewise.
15317         (vst1_u64_x2): Likewise.
15318         (vst1_f64_x2): Likewise.
15319         (vst1_s8_x2): Likewise.
15320         (vst1_p8_x2): Likewise.
15321         (vst1_s16_x2): Likewise.
15322         (vst1_p16_x2): Likewise.
15323         (vst1_s32_x2): Likewise.
15324         (vst1_u8_x2): Likewise.
15325         (vst1_u16_x2): Likewise.
15326         (vst1_u32_x2): Likewise.
15327         (vst1_f16_x2): Likewise.
15328         (vst1_f32_x2): Likewise.
15329         (vst1_p64_x2): Likewise.
15330         (vst1q_s8_x2): Likewise.
15331         (vst1q_p8_x2): Likewise.
15332         (vst1q_s16_x2): Likewise.
15333         (vst1q_p16_x2): Likewise.
15334         (vst1q_s32_x2): Likewise.
15335         (vst1q_s64_x2): Likewise.
15336         (vst1q_u8_x2): Likewise.
15337         (vst1q_u16_x2): Likewise.
15338         (vst1q_u32_x2): Likewise.
15339         (vst1q_u64_x2): Likewise.
15340         (vst1q_f16_x2): Likewise.
15341         (vst1q_f32_x2): Likewise.
15342         (vst1q_f64_x2): Likewise.
15343         (vst1q_p64_x2): Likewise.
15344         (vst1_s64_x3): Likewise.
15345         (vst1_u64_x3): Likewise.
15346         (vst1_f64_x3): Likewise.
15347         (vst1_s8_x3): Likewise.
15348         (vst1_p8_x3): Likewise.
15349         (vst1_s16_x3): Likewise.
15350         (vst1_p16_x3): Likewise.
15351         (vst1_s32_x3): Likewise.
15352         (vst1_u8_x3): Likewise.
15353         (vst1_u16_x3): Likewise.
15354         (vst1_u32_x3): Likewise.
15355         (vst1_f16_x3): Likewise.
15356         (vst1_f32_x3): Likewise.
15357         (vst1_p64_x3): Likewise.
15358         (vst1q_s8_x3): Likewise.
15359         (vst1q_p8_x3): Likewise.
15360         (vst1q_s16_x3): Likewise.
15361         (vst1q_p16_x3): Likewise.
15362         (vst1q_s32_x3): Likewise.
15363         (vst1q_s64_x3): Likewise.
15364         (vst1q_u8_x3): Likewise.
15365         (vst1q_u16_x3): Likewise.
15366         (vst1q_u32_x3): Likewise.
15367         (vst1q_u64_x3): Likewise.
15368         (vst1q_f16_x3): Likewise.
15369         (vst1q_f32_x3): Likewise.
15370         (vst1q_f64_x3): Likewise.
15371         (vst1q_p64_x3): Likewise.
15373 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
15375         * config/msp430/msp430.c (msp430_output_labelref): Prepend
15376         user_label_prefix to name.
15378         * tree-core.h: Update comment about the format of NAME string
15379         passed to handler in attribute_spec.
15381         * config/msp430/msp430.md: Remove erroneous subreg expression from
15382         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15383         zero_extend{q,h}isi2.
15385 2018-05-30  Borislav Petkov  <bp@suse.de>
15387         * doc/extend.texi: Document some architecture specific
15388         constraints and sort entries.
15390 2018-05-30  Martin Sebor  <msebor@redhat.com>
15392         PR middle-end/85369
15393         * builtins.c (expand_builtin_stpcpy_1): New function.
15394         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15395         only if the former succeeds.
15397 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
15399         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15400         in saphira.
15402 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
15404         * doc/invoke.texi (-flinker-output): Document
15406 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
15408         * passes.c (ipa_write_summaries): Only modify statements if body
15409         is in memory.
15410         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15411         incrementally linking.
15412         (ipa_passes): Likewise.
15413         * lto-cgraph.c (lto_output_node): When incrementally linking do not
15414         pass down resolution info.
15415         * common.opt (flag_incremental_link): Update info.
15416         * gcc.c (plugin specs): Turn flinker-output=* to
15417         -plugin-opt=-linker-output-known
15418         * toplev.c (compile_file): Also cut compilation when doing incremental
15419         link.
15420         * flag-types. (enum lto_partition_model): Add
15421         LTO_LINKER_OUTPUT_NOLTOREL.
15422         (invoke.texi): Add -flinker-output docs.
15423         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15424         link same way as WPA; do not stream in dead initializers.
15426         * dwarf2out.c (dwarf2out_die_ref_for_decl,
15427         darf2out_register_external_decl): Support incremental link.
15429 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
15431         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15433 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
15435         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15436         it down to simple_object_copy_lto_debug_sections.
15437         (run_gcc): Determine incremental LTO link time and configure
15438         lto1 into non-wpa mode, disable renaming of debug sections.
15440 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15442         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15443         descriptions of various incorrectly documented functions.
15445 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
15447         Revert:
15448         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15449         address check not strict.
15451 2018-05-30  Richard Biener  <rguenther@suse.de>
15453         PR tree-optimization/85964
15454         * tracer.c (better_p): Drop initialized count check, we only
15455         call the function with initialized counts now.
15456         (find_best_successor): Do find a best edge if one
15457         has uninitialized count.
15458         (find_best_predecessor): Likewise.  Do BB frequency check only
15459         if count is initialized.
15461 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
15463         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15464         (aarch64_ldrstr_offset_compare): New.
15465         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15466         load/store orderings.
15467         (aarch64_gen_adjusted_ldpstp): Likewise.
15469 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
15471         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15472         Check for subset of GENERAL_REGS and FP_REGS.
15473         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15474         r=w alternative.
15476 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
15478         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15479         and wi::to_poly_offset.  Add the current offset and then check
15480         whether the sum fits, rather than using an unchecked addition of
15481         a checked term.  Check for a shwi rather than a uhwi.
15482         * expr.c (get_bit_range): Use tree_to_poly_uint64.
15483         (store_constructor): Use poly_int_tree_p.
15484         (expand_expr_real_1): Likewise.
15485         * function.c (assign_temp): Likewise.
15486         * fold-const.c (const_binop): Use poly_int_tree_p and
15487         wi::to_poly_offset.
15488         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
15489         division.
15490         * ipa-icf-gimple.c (func_checker::compare_operand): Use
15491         to_poly_offset for MEM offsets.
15492         * ipa-icf.c (sem_variable::equals): Likewise.
15493         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15494         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15495         wi::to_poly_offset for BIT_FIELD_REF offsets.
15496         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15497         wi::to_poly_offset.
15498         * var-tracking.c (emit_note_insn_var_location): Use
15499         tree_to_poly_uint64.
15501 2018-05-29  Jim Wilson  <jimw@sifive.com>
15503         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15505 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
15507         PR target/85950
15508         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15509         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15510         sequence.
15511         (sse4_1_round<mode>2): Use nonimmediate_operand
15512         for operand 1 predicate.
15514 2018-05-29  Martin Sebor  <msebor@redhat.com>
15515             Richard Biener  <rguenther@suse.de>
15517         PR testsuite/85888
15518         * calls.c (get_size_range): Call determine_value_range instead
15519         of get_value_range..
15520         * tree-vrp.h (determine_value_range): Declared new function.
15521         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15523 2018-05-29  Richard Biener  <rguenther@suse.de>
15525         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15526         sure to use non-pattern stmts for get_earlier_stmt arguments.
15527         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15528         called on pattern stmts.
15529         (get_later_stmt): Likewise.
15531 2018-05-29  Martin Liska  <mliska@suse.cz>
15533         PR gcov-profile/85759
15534         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15535         env variables.
15537 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
15539         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15540         VEC_UNPACK_*_EXPR.
15541         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15542         VEC_PACK_*_EXPR.
15544         PR target/85918
15545         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15546         VEC_PACK_FLOAT_EXPR): New tree codes.
15547         * tree-pretty-print.c (op_code_prio): Handle
15548         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15549         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15550         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15551         * tree-inline.c (estimate_operator_cost): Likewise.
15552         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15553         * fold-const.c (const_binop): Likewise.
15554         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15555         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15556         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15557         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15558         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15559         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15560         * expr.c (expand_expr_real_2): Likewise.
15561         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15562         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15563         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15564         optabs.
15565         * optabs.c (expand_widen_pattern_expr): For
15566         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15567         sign from result type rather than operand's type.
15568         (expand_binop_directly): For vec_packu_float_optab and
15569         vec_packs_float_optab allow result type to be different from operand's
15570         type.
15571         * optabs-tree.c (optab_for_tree_code): Handle
15572         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15573         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
15574         * tree-vect-generic.c (expand_vector_operations_1):  Handle
15575         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15576         VEC_PACK_FLOAT_EXPR.
15577         * tree-vect-stmts.c (supportable_widening_operation): Handle
15578         FIX_TRUNC_EXPR.
15579         (supportable_narrowing_operation): Handle FLOAT_EXPR.
15580         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15581         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15582         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
15583         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15584         mode attributes.
15585         (vec_pack<floatprefix>_float_<mode>): New expander.
15586         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15587         attributes.
15588         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15589         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15590         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15591         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15592         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15593         Document.
15594         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15595         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15596         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15597         VEC_PACK_FLOAT_EXPR): Document.
15599 2018-05-29  Richard Biener  <rguenther@suse.de>
15601         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15602         member.
15603         (stmt_vec_info_vec): Make pointer.
15604         (init_stmt_vec_info_vec): Remove.
15605         (free_stmt_vec_info_vec): Likewise.
15606         (set_stmt_vec_info_vec): New function.
15607         (free_stmt_vec_infos): Likewise.
15608         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15609         (set_vinfo_for_stmt): Likewise.
15610         (get_earlier_stmt): Likewise.
15611         (get_later_stmt): Likewise.
15612         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15613         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15614         (vec_info::~vec_info): Free stmt_vec_infos.
15615         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15616         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15617         (pass_slp_vectorize::execute): Likewise.
15618         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15619         (free_stmt_vec_info_vec): Likewise.
15620         (set_stmt_vec_info_vec): New function.
15621         (free_stmt_vec_infos): Likewise.
15622         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15623         the global stmt_vec_info_vec.
15624         * tree-parloops.c (gather_scalar_reductions): Use
15625         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15626         vector.
15628 2018-05-29  Richard Biener  <rguenther@suse.de>
15630         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15632 2018-05-29  Martin Liska  <mliska@suse.cz>
15633             David Malcolm  <dmalcolm@redhat.com>
15635         * vec.c (test_reverse): New.
15636         (vec_c_tests): Add new test.
15637         * vec.h (vl_ptr>::reverse): New function.
15639 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
15641         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15643         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15644         and later.
15646 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15648         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15650 2018-05-28  Richard Biener  <rguenther@suse.de>
15652         PR tree-optimization/85933
15653         * tree-vect-data-refs.c (vect_record_base_alignments): Only
15654         look at stmts marked as vectorizable.
15656 2018-05-28  Richard Biener  <rguenther@suse.de>
15658         PR tree-optimization/85934
15659         * tree-vect-generic.c (expand_vector_operations_1): Hoist
15660         vector boolean check before scalar optimization.
15662 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
15664         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15665         for armv5te.
15667 2018-05-28  Mark Wielaard  <mark@klomp.org>
15669         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15670         if it is an expression containing a minus sign.
15672 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
15674         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15676 2018-05-27  Paul Koning  <ni1d@arrl.net>
15678         * config/pdp11/pdp11.md (truncsihi2): Remove.
15680 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
15681             Chung-Ju Wu  <jasonwucj@gmail.com>
15683         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15684         implementation.
15685         (unaligned_store_dw): Ditto.
15686         * config/nds32/nds32-memory-manipulation.c
15687         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15688         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15689         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15690         (emit_setmem_word_loop): Rename to ...
15691         (emit_setmem_doubleword_loop): ... this.
15692         (nds32_gen_dup_4_byte_to_word_value): New function.
15693         (nds32_gen_dup_8_byte_to_double_word_value): New function.
15694         (nds32_expand_setmem_loop): Refine implementation.
15695         (nds32_expand_setmem_loop_v3m): Ditto.
15696         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15697         pattern.
15699 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15701         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15703 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15705         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15706         (nds32_init_machine_status): Initialize machine->attr_naked_p and
15707         machine->attr_no_prologue_p.
15708         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15709         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15710         (nds32_expand_epilogue): Consider attr_naked_p.
15711         (nds32_expand_epilogue_v3pop): Likewise.
15712         (nds32_can_use_return_insn): Likewise.
15713         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15714         attr_no_prologue_p fields.
15715         * config/nds32/nds32.opt (mret-in-naked-func): New option.
15717 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
15719         PR target/85918
15720         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15721         attributes.
15722         * config/i386/sse.md
15723         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15724         Rename to ...
15725         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15726         ... this.
15727         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15728         Rename to ...
15729         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15730         ... this.
15731         (*<floatsuffix>floatv2div2sf2): Rename to ...
15732         (*float<floatunssuffix>v2div2sf2): ... this.
15733         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15734         (float<floatunssuffix>v2div2sf2_mask): ... this.
15735         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15736         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15737         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15738         to ...
15739         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15740         ... this.
15741         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15742         Rename to ...
15743         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15744         ... this.
15745         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15746         Rename to ...
15747         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15748         ... this.
15749         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15750         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15751         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15752         gen_ufix_truncv8dfv8si2.
15753         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15754         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15755         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15756         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15757         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15758         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15759         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15760         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15762 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
15764         PR target/85900
15765         PR target/85345
15766         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15768 2018-05-25  Jim Wilson  <jimw@sifive.com>
15770         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15771         * config/riscv/riscv.c (struct machine_function): Add
15772         interrupt_handler_p and attribute_checked_p fields.
15773         (riscv_attribute_table): Add interrupt.
15774         (riscv_interrupt_type_p): New.
15775         (riscv_save_reg_p): Save extra regs for interrupt handler.
15776         (riscv_use_save_libcall): Return false  for interrupt handler.
15777         (riscv_first_stack_step): Add forward declaration.
15778         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
15779         for interrupt handler with large frame.  Use it for saved reg list.
15780         (riscv_expand_prologue): Move flag_stack_usage_info support to
15781         eliminate duplication.
15782         (riscv_expand_epilogue): Generate mret for interrupt handler.
15783         (riscv_epilogue_uses): New.
15784         (riscv_can_use_return_insn): Return false for interrupt handler.
15785         (riscv_function_ok_for_sibcall): Likewise.
15786         (riscv_set_current_function): Add interrupt handler support.
15787         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15788         * config/riscv/riscv.md (UNSPECV_MRET): New.
15789         (GP_REGNUM): New.
15790         (riscv_frflags, riscv_fsflags): Use tab after opcode.
15791         (riscv_mret): New.
15792         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15794 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
15796         PR tree-optimization/85712
15797         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15798         this candidate has already been replaced in-situ by a copy.
15800 2018-05-25  Jason Merrill  <jason@redhat.com>
15802         PR c++/80485 - inline function non-zero address.
15803         * symtab.c (nonzero_address): Check DECL_COMDAT.
15805 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
15807         PR target/83628
15808         * config/alpha/alpha.md (ashlsi3): New insn pattern.
15809         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
15810         extension of SImode operation.  Use const123_operand predicate.
15811         (*saddsi_1): Remove.
15812         (*saddl_se_1): Ditto.
15813         (*ssubsi_1): Ditto.
15814         (*ssubl_se_1): Ditto.
15815         * config/alpha/predicates.md (const123_operand): New predicate.
15816         * config/alpha/constraints.md (P): Use IN_RANGE.
15818 2018-05-25  Richard Biener  <rguenther@suse.de>
15820         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15821         defaulted to true.
15822         (ref_maybe_used_by_stmt_p): Likewise.
15823         (stmt_may_clobber_ref_p): Likewise.
15824         (stmt_may_clobber_ref_p_1): Likewise.
15825         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15826         and pass it along.
15827         (ref_maybe_used_by_stmt_p): Likewise.
15828         (stmt_may_clobber_ref_p): Likewise.
15829         (stmt_may_clobber_ref_p_1): Likewise.
15830         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15831         the alias oracle to disambiguate DRs with stmts DR analysis
15832         couldn't handle.
15833         (vect_analyze_data_refs): Do not give up on not analyzable
15834         DRs for BB vectorization.  Remove code truncating the dataref
15835         vector.
15837 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
15839         PR target/85832
15840         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15841         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
15842         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15844 2018-05-25  Richard Biener  <rguenther@suse.de>
15846         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15847         function, combining stmt data ref gathering and fatal analysis
15848         parts.
15849         (vect_analyze_data_refs): Remove now redudnant code and simplify.
15850         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15851         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15852         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15853         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15855 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15857         PR tree-optimization/85720
15858         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15859         SCC if all partitions are builtins.
15860         (version_loop_by_alias_check): New parameter.  Generate cancelable
15861         runtime alias check if all partitions are builtins.
15862         (distribute_loop): Update call to above function.
15864 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15866         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15867         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15868         (parm_default_def_partition_arg): Ditto.
15869         (set_parm_default_def_partition): Ditto.
15870         (get_parm_default_def_partitions): Ditto and make it static.
15871         (get_undefined_value_partitions): Ditto and make it static.
15872         (remove_ssa_form): Refactor call to init_var_map here.
15873         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15874         computation for loop region.
15875         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15876         (register_default_def): Delete.
15877         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15878         (parm_default_def_partition_arg): Ditto.
15879         (set_parm_default_def_partition): Ditto.
15880         (get_parm_default_def_partitions): Ditto and make it static.
15881         (get_undefined_value_partitions): Ditto and make it static.
15882         (coalesce_with_default, coalesce_with_default): Update comment.
15883         (create_coalesce_list_for_region): New func factored out from
15884         create_outofssa_var_map.
15885         (populate_coalesce_list_for_outofssa): New func factored out from
15886         create_outofssa_var_map and coalesce_ssa_name.
15887         (create_outofssa_var_map): Delete.
15888         (coalesce_ssa_name): Refactor to support live range computation.
15889         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15890         (get_parm_default_def_partitions): Delete.
15891         (get_undefined_value_partitions): Ditto.
15892         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15893         computation for loop region.
15894         (new_tree_live_info, loe_visit_block): Ditto.
15895         (live_worklist, set_var_live_on_entry): Ditto.
15896         (calculate_live_on_exit, verify_live_on_entry): Ditto.
15897         * tree-ssa-live.h (struct _var_map): New fields.
15898         (init_var_map): Change decl.
15899         (region_contains_p): New.
15901 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
15903         * tree-ssa-live.h (live_merge_and_clear): Delete.
15905 2018-05-25  Richard Biener  <rguenther@suse.de>
15907         PR c++/85912
15908         * tree-dump.c (dequeue_and_dump): Remove access to removed
15909         operand 2 of a SWITCH_EXPR.
15911 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15913         * doc/sourcebuild.texi (vect_double_cond_arith): Include
15914         multiplication and division.
15915         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15916         (cond_udiv@var{m}, cond_umod@var{m}): Document.
15917         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15918         (cond_udiv_optab, cond_umod_optab): New optabs.
15919         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15920         (IFN_COND_RDIV): New internal functions.
15921         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15922         TRUNC_MOD_EXPR and RDIV_EXPR.
15923         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15924         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15925         New unspecs.
15926         (SVE_INT_BINARY): Include mult.
15927         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15928         (optab, sve_int_op): Handle mult.
15929         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
15930         UNSPEC_COND_DIV.
15931         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
15932         for SVE_INT_BINARY_SD.
15934 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15936         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
15937         (optab, sve_int_op): Handle div and udiv.
15938         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
15939         for SVE_INT_BINARY_SD.
15940         (*<optab><mode>3): New insn for the same.
15942 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15944         * tree-vect-patterns.c: Include predict.h.
15945         (vect_recog_divmod_pattern): Restrict check for division support
15946         to when optimizing for size.
15948 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
15950         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
15951         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
15952         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
15953         (gimple_match_op::set_op): Likewise.
15954         (gimple_resimplify4): Declare.
15955         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
15956         (expr::gen_transform): Likewise.
15957         (decision_tree::gen): Generate a simplification routine for 4 operands.
15958         * gimple-match-head.c (gimple_simplify): Add an overload for
15959         4 operands.  In the top-level function, handle up to 4 call
15960         arguments and call gimple_resimplify4.
15961         (gimple_resimplify4): New function.
15962         (build_call_internal): Pass a fourth operand.
15963         (maybe_push_to_seq): Likewise.
15964         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
15965         Fold VEC_COND_EXPRs of an operation and a default value into
15966         an IFN_COND_* function if possible.
15967         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
15968         New unspecs.
15969         (SVE_COND_FP_BINARY): Include them.
15970         (optab, sve_fp_op): Handle them.
15971         (SVE_INT_BINARY_REV): New code iterator.
15972         (SVE_COND_FP_BINARY_REV): New int iterator.
15973         (commutative): New int attribute.
15974         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
15975         Declare.
15976         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
15977         function.
15978         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
15979         (*cond_<optab><mode>): New patterns for reversed operands.
15981 2018-05-25  Richard Biener  <rguenther@suse.de>
15983         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
15984         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
15985         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
15986         (STMT_VINFO_GROUPED_ACCESS): Adjust.
15987         * tree-vect-data-refs.c (everywhere): Adjust users.
15988         * tree-vect-loop.c (everywhere): Likewise.
15989         * tree-vect-slp.c (everywhere): Likewise.
15990         * tree-vect-stmts.c (everywhere): Likewise.
15991         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
15993 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15995         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
15996         Rename to...
15997         (gcc_cv_as_section_exclude): ... this.
15998         Try Solaris as #exclude syntax.
15999         * configure: Regenerate.
16000         * config.in: Regenerate.
16001         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
16002         SECTION_EXCLUDE.
16003         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
16004         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
16006         * varasm.c (default_elf_asm_named_section): Don't check if
16007         HAVE_GAS_SECTION_EXCLUDE is defined.
16009 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
16011         * doc/md.texi: Update the documentation of the cond_* optabs
16012         to mention the new final operand.  Fix GET_MODE_NUNITS call.
16013         Describe the scalar case too.
16014         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
16015         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
16016         instead of 2.
16017         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
16018         (get_conditional_internal_fn): Update comment.
16019         * tree-vect-loop.c (vectorizable_reduction): Pass the original
16020         accumulator value as a final argument to conditional functions.
16021         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
16022         a define_expand and add an "else" operand.  Assert for now that
16023         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
16024         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
16025         (*cond_<optab><mode>): New patterns.
16026         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
16027         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16028         (UNSPEC_COND_EOR): Delete.
16029         (optab): Remove associated mappings.
16030         (SVE_INT_BINARY): New code iterator.
16031         (sve_int_op): Remove int attribute and add "minus" to the code
16032         attribute.
16033         (SVE_COND_INT_OP): Delete.
16034         (SVE_COND_FP_OP): Rename to...
16035         (SVE_COND_FP_BINARY): ...this.
16037 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
16039         * optabs.c (can_reuse_operands_p): New function.
16040         (maybe_legitimize_operands): Try to reuse the results for
16041         earlier operands.
16043 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
16045         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
16046         Add {q} suffix to insn mnemonic.
16048 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16050         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
16051         (msp430_warn_func_return): New.
16053 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
16055         * fold-const.c (tree_nonzero_bits): New function.
16056         * fold-const.h (tree_nonzero_bits): Likewise.
16057         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
16058         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
16060 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
16062         PR target/85900
16063         PR target/85345
16064         * varasm.c (assemble_alias): Check ifunc_resolver only on
16065         FUNCTION_DECL.
16067 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
16069         PR target/85903
16070         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
16071         when memory input operand is handled.
16073 2018-05-24  Luis Machado  <luis.machado@linaro.org>
16075         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
16076         global.
16077         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
16079 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
16081         * match.pd: Delay FMA folds until after vectorization.
16083 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16085         PR target/83009
16086         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16087         address check not strict.
16089 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
16091         * gimple-match.h (gimple_match_op): New class.
16092         (mprts_hook): Replace parameters with a gimple_match_op *.
16093         (maybe_build_generic_op): Likewise.
16094         (gimple_simplified_result_is_gimple_val): Replace parameters with
16095         a const gimple_match_op *.
16096         (gimple_simplify): Replace code_helper * and tree * parameters with
16097         a gimple_match_op * parameter.
16098         (gimple_resimplify1): Replace code_helper *, tree and tree *
16099         parameters with a gimple_match_op * parameter.
16100         (gimple_resimplify2): Likewise.
16101         (gimple_resimplify3): Likewise.
16102         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
16103         parameters with a gimple_match_op * parameter.
16104         * gimple-match-head.c (gimple_simplify): Change prototypes of
16105         auto-generated functions to take a gimple_match_op * instead of
16106         separate code_helper * and tree * parameters.  Make the same
16107         change in the top-level overload and update calls to the
16108         gimple_resimplify routines.  Update calls to the auto-generated
16109         functions and to maybe_push_res_to_seq in the publicly-facing
16110         operation-specific gimple_simplify overloads.
16111         (gimple_match_op::MAX_NUM_OPS): Define.
16112         (gimple_resimplify1): Replace rcode and ops with a single res_op
16113         parameter.  Update call to gimple_simplify.
16114         (gimple_resimplify2): Likewise.
16115         (gimple_resimplify3): Likewise.
16116         (mprts_hook): Replace parameters with a gimple_match_op *.
16117         (maybe_build_generic_op): Likewise.
16118         (build_call_internal): Replace type, nargs and ops with
16119         a gimple_match_op *.
16120         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
16121         with a single gimple_match_op *.  Update calls to mprts_hook,
16122         build_call_internal and gimple_simplified_result_is_gimple_val.
16123         Factor out code that is common to the tree_code and combined_fn cases.
16124         * genmatch.c (expr::gen_transform): Replace tem_code and
16125         tem_ops with a gimple_match_op called tem_op.  Update calls
16126         to the gimple_resimplify functions and maybe_push_res_to_seq.
16127         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
16128         res_ops.  Update call to the gimple_resimplify functions.
16129         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
16130         (decision_tree::gen): Make the functions take a gimple_match_op *
16131         called res_op instead of separate res_code and res_ops parameters.
16132         Update call accordingly.
16133         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
16134         and ops with a single res_op parameter.  Update calls to
16135         maybe_build_generic_op and maybe_push_res_to_seq.
16136         (fold_stmt_1): Update calls to gimple_simplify and
16137         replace_stmt_with_simplification.
16138         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
16139         and gimple_simplified_result_is_gimple_val.
16140         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
16141         gimple_simplify.
16142         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
16143         with a gimple_match_op *.
16144         (vn_nary_build_or_lookup): Likewise.  Update call to
16145         vn_nary_build_or_lookup_1.
16146         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
16147         gimple_match_op *.  Update calls to the gimple_resimplify routines
16148         and to gimple_simplified_result_is_gimple_val.
16149         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
16150         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
16151         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
16152         (visit_nary_op): Likewise.
16153         (visit_reference_op_load): Likewise.
16155 2018-05-23  Luis Machado  <luis.machado@linaro.org>
16157         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
16158         modifier for printing the step amount.
16160 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
16162         PR target/78849
16163         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
16164         types.
16166 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
16168         * doc/sourcebuild.texi (Endianness): New subsubsection.
16170 2018-05-23  Luis Machado  <luis.machado@linaro.org>
16172         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16173         <prefetch_dynamic_strides>: New const bool field.
16174         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16175         prefetch_dynamic_strides.
16176         (exynosm1_prefetch_tune): Likewise.
16177         (thunderxt88_prefetch_tune): Likewise.
16178         (thunderx_prefetch_tune): Likewise.
16179         (thunderx2t99_prefetch_tune): Likewise.
16180         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
16181         false.
16182         (aarch64_override_options_internal): Update to set
16183         PARAM_PREFETCH_DYNAMIC_STRIDES.
16184         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16185         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16186         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16187         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16188         prefetch-dynamic-strides setting.
16190 2018-05-23  Luis Machado  <luis.machado@linaro.org>
16192         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16193         <minimum_stride>: New const int field.
16194         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16195         minimum_stride field defaulting to -1.
16196         (exynosm1_prefetch_tune): Likewise.
16197         (thunderxt88_prefetch_tune): Likewise.
16198         (thunderx_prefetch_tune): Likewise.
16199         (thunderx2t99_prefetch_tune): Likewise.
16200         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
16201         <default_opt_level>: Set to 3.
16202         (aarch64_override_options_internal): Update to set
16203         PARAM_PREFETCH_MINIMUM_STRIDE.
16204         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16205         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16206         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16207         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16208         stride is constant and is below the minimum stride threshold.
16210 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16212         * config/arm/arm-cpus.in (mode26): Delete.
16213         (armv4): Delete mode26 reference.
16214         * config/arm/arm.c (arm_configure_build_target): Delete use of
16215         isa_bit_mode26.
16217 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
16219         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16220         New insn pattern.
16221         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16222         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
16223         for non-SSE modes.
16224         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
16225         (floatunsdidf2): Ditto.
16227 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
16229         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16230         (fixuns_trunc<mode>si2_avx512f): Ditto.
16231         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16232         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16233         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16235 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
16237         PR rtl-optimization/79985
16238         * df-scan.c (df_insn_refs_collect): Remove special case for
16239         global registers and asm statements.
16241 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
16243         * extend.texi (Global Register Variables): Rewrite the bullet list.
16244         Note that the register is available for allocation. Note that access
16245         via inline asm must use constraints. Add note about async-signal
16246         handlers. Remove paragraph about automagic register selection.
16248 2018-05-23  Richard Biener  <rguenther@suse.de>
16250         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16251         of fixed offset from memset VN.
16253 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
16255         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16256         first_interp field.
16257         (alloc_cand_and_find_basis): Initialize first_interp field.
16258         (slsr_process_mul): Modify first_interp field.
16259         (slsr_process_add): Likewise.
16260         (slsr_process_cast): Modify first_interp field for each new
16261         interpretation.
16262         (slsr_process_copy): Likewise.
16263         (dump_candidate): Dump first_interp field.
16264         (replace_mult_candidate): Process all interpretations, not just
16265         subsequent ones.
16266         (replace_rhs_if_not_dup): Likewise.
16267         (replace_one_candidate): Likewise.
16269 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
16271         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16272         Add new boolean.
16273         (aarch64_needs_frame_chain): New function.
16274         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16276 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
16278         PR target/84882
16279         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16280         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16281         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16282         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16283         as true for strict-align.
16284         (aarch64_can_inline_p): Perform checks even when callee has no
16285         attributes to check for strict alignment.
16286         * doc/extend.texi (AArch64 Function Attributes): Document
16287         no-strict-align.
16288         * doc/invoke.texi: (AArch64 Options): Likewise.
16290 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
16292         PR tree-optimization/85853
16293         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16294         the handling of the root of the node to...
16295         (vect_slp_analyze_node_operations_1): ...this new function,
16296         and run the whole thing with the child nodes' def types
16297         set according to their SLP node's def type.
16299 2018-05-23  Richard Biener  <rguenther@suse.de>
16301         PR middle-end/85874
16302         * tree-data-ref.c (create_runtime_alias_checks): Defer
16303         and ignore overflow warnings.
16305 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
16307         PR tree-optimization/85822
16308         * tree-vrp.c (is_masked_range_test): Fix handling of negative
16309         constants.
16311 2018-05-23  Richard Biener  <rguenther@suse.de>
16313         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16314         memset constants via native_interpret_expr.
16316 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
16318         PR target/85345
16319         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16320         attribute.
16321         (cgraph_node::create_alias): Likewise.
16322         (cgraph_node::get_availability): Check ifunc_resolver instead
16323         of looking up ifunc attribute.
16324         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16325         * varasm.c (do_assemble_alias): Likewise.
16326         (assemble_alias): Likewise.
16327         (default_binds_local_p_3): Likewise.
16328         * cgraph.h (cgraph_node): Add ifunc_resolver.
16329         (cgraph_node::only_called_directly_or_aliased_p): Return false
16330         for IFUNC resolver.
16331         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16332         attribute.
16333         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16334         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16335         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16336         instead of looking up ifunc attribute.
16338 2018-05-22  Luis Machado  <luis.machado@linaro.org>
16340         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16342 2018-05-22  Martin Sebor  <msebor@redhat.com>
16344         PR middle-end/85359
16345         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16346         only when expasion succeeds.
16347         (expand_builtin_strcmp): Same.
16348         (expand_builtin_strncmp): Same.
16350 2018-05-22  Martin Sebor  <msebor@redhat.com>
16352         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16354 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
16355             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16357         * config/aarch64/aarch64-ldpstp.md: Replace uses of
16358         aarch64_mem_pair_operand with memory_operand and delete operand swapping
16359         code.
16360         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16361         Add check for legitimate_address.
16362         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16363         (aarch64_swap_ldrstr_operands): New.
16364         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16365         Define prototype.
16367 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
16368             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16370         * config/aarch64/aarch64.md: New patterns to generate stp
16371         and ldp.
16372         (store_pair_sw, store_pair_dw): New patterns to generate stp for
16373         single words and double words.
16374         (load_pair_sw, load_pair_dw): Likewise.
16375         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16376         Delete.
16377         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16378         Delete.
16379         * config/aarch64/aarch64-ldpstp.md: Modify peephole
16380         for different mode ldpstp and add peephole for merged zero stores.
16381         Likewise for loads.
16382         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16383         Add size check.
16384         (aarch64_gen_store_pair): Rename calls to match new patterns.
16385         (aarch64_gen_load_pair): Rename calls to match new patterns.
16386         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16387         (load_pair<DREG:mode><DREG2:mode>): ... This.
16388         (store_pair<mode>): Rename to...
16389         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16390         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16391         New mode iterators.
16392         (V_INT_EQUIV): Handle SImode.
16393         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16394         New predicate.
16396 2018-05-22  Martin Sebor  <msebor@redhat.com>
16398         PR c/85623
16399         * calls.c (maybe_warn_nonstring_arg): Use string length to set
16400         or ajust the presumed bound on an operation to avoid unnecessary
16401         warnings.
16403 2018-05-22  Martin Sebor  <msebor@redhat.com>
16405         PR tree-optimization/85826
16406         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16407         assuming that a DECL necesarily has a constant size.
16409 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
16411         PR middle-end/85862
16412         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16414 2018-05-22  Richard Biener  <rguenther@suse.de>
16416         PR tree-optimization/85834
16417         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16418         non-constant and non-zero memset arguments.
16420 2018-05-22  Martin Liska  <mliska@suse.cz>
16422         PR ipa/85607
16423         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16425 2018-05-22  Richard Biener  <rguenther@suse.de>
16427         PR tree-optimization/85863
16428         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16429         comparisons when vectype is specified.
16430         (vectorizable_condition): Do not specify vectype for
16431         vect_is_simple_cond when SLP vectorizing.
16433 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
16435         PR target/85657
16436         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16437         define __ibm128 as long double.
16438         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16439         as a distinct type when IEEE 128-bit support is enabled.
16440         (init_float128_ieee): Fix up conversions between IFmode and IEEE
16441         128-bit types to use the correct functions.
16442         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16443         convert between 128-bit floating point types that have different
16444         modes but the same representation, instead of using gen_lowpart to
16445         makean alias.
16446         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16447         KFmode.
16448         (IFKF_reg): New attributes to give the register constraints for
16449         IFmode and KFmode.
16450         (extend<mode>tf2_internal): New insns to mark an explicit
16451         conversion between 128-bit floating point types that have a
16452         different mode but share the same representation.
16454 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
16456         PR tree-optimization/85814
16457         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16458         a null return from get_strinfo when unsharing the next
16459         strinfo in the chain.
16461 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16463         PR gcc/84923
16464         * varasm.c (weak_finish): Clean up weak_decls.
16466 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16468         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16469         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16470         UNSPEC_UADALP values.
16471         * config/aarch64/iterators.md (ABAL): New int iterator.
16472         (ABDL2): Likewise.
16473         (ADALP): Likewise.
16474         (sur): Add mappings for the above.
16475         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16476         New define_insn.
16477         (aarch64_<sur>abal<mode>_4): Likewise.
16478         (aarch64_<sur>adalp<mode>_3): Likewise.
16479         (<sur>sadv16qi): New define_expand.
16481 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
16483         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16484         (*movdf_internal): Ditto.
16485         (*rcpsf2_sse): Ditto.
16486         (*rsqrtsf2_sse): Ditto.
16487         (*sqrt<mode>2_sse): Ditto.
16489 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
16491         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16492         eor3q<mode>4.
16493         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16494         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16495         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16496         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16497         vbcaxq_s64): New.
16498         * config/aarch64/arm_neon.h: Likewise.
16499         * config/aarch64/iterators.md (VQ_I): New.
16501 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
16503         * config.gcc: Add arc/t-multilib-linux to tmake_file for
16504         arc*-*-linux*.
16505         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16506         MULTILIB_DIRNAMES
16508 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
16510         * config/nds32/constraints.md (S): New constraint.
16511         * config/nds32/nds32.md (call_internal): Use constraint S.
16512         (call_value_internal): Likewise.
16513         (sibcall_internal): Likewise.
16514         (sibcall_value_internal): Likewise.
16516 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
16517             Chung-Ju Wu  <jasonwucj@gmail.com>
16519         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16520         into consideration.
16522 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
16523             Chung-Ju Wu  <jasonwucj@gmail.com>
16525         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16526         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16527         (nds32_rtx_costs_impl): Simplify.
16528         (nds32_address_cost_impl): Simplify.
16529         (nds32_init_rtx_costs): New function.
16530         (nds32_rtx_costs_speed_prefer): Likewise.
16531         (nds32_rtx_costs_size_prefer): Likewise.
16532         (nds32_address_cost_speed_prefer): Likewise.
16533         (nds32_address_cost_speed_fwprop): Likewise.
16534         (nds32_address_cost_size_prefer): Likewise.
16535         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16536         * config/nds32/nds32.c (nds32_option_override): Use
16537         nds32_init_rtx_costs function.
16539 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
16541         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16542         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16543         (TARGET_PIPELINE_N8): Likewise.
16544         (TARGET_PIPELINE_N10): Likewise.
16545         (TARGET_PIPELINE_N13): Likewise.
16546         (TARGET_PIPELINE_GRAYWOLF): Likewise.
16548 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
16550         * config/nds32/nds32-fpu.md: Update copyright year.
16552 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16554         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16556 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16558         * config/nds32/nds32.c
16559         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16560         * config/nds32/nds32.opt (minline-asm-r15): New option.
16562 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16564         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16565         MASK_HW_ABS.
16566         * config/nds32/nds32.md (abssi2): New pattern.
16568 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
16570         * config/i386/i386.md (rex64namesuffix): New mode attribute.
16571         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16572         Merge insn pattern from sse_cvtsi2ss<round_name> and
16573         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16574         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16575         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16576         using SWI48 mode iterator.
16577         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16578         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16579         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16580         pattern from sse_cvttss2si<round_saeonly_name>
16581         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16582         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16583         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16584         using SWI48 mode iterator.
16585         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16586         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16587         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16588         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16589         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16590         using SWI48 mode iterator.
16591         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16592         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16593         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16594         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16595         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16596         SWI48 mode iterator.
16597         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16598         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16599         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16600         pattern from sse_cvttsd2si<round_saeonly_name>
16601         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16603 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16605         * config/nds32/nds32-md-auxiliary.c
16606         (nds32_valid_smw_lwm_base_p): Refine.
16607         (nds32_output_smw_single_word): Refine.
16608         (nds32_output_smw_double_word): New.
16609         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16611 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16613         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16614         (nds32_output_stack_pop): Refine.
16615         (nds32_expand_unaligned_load): Refine.
16616         (nds32_expand_unaligned_store): Refine.
16618 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
16619             Chung-Ju Wu  <jasonwucj@gmail.com>
16621         * config/nds32/constants.md: Add TP_REGNUM constant.
16622         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16623         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16624         UNSPEC_ADD32.
16625         * config/nds32/nds32-doubleword.md: Consider flag_pic.
16626         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16627         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16628         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16629         and PIC code generation.
16630         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16631         code generation.
16632         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16633         optimization.
16634         * config/nds32/nds32.md: Support TLS and PIC.
16635         * config/nds32/nds32.c: Support TLS and PIC.
16636         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16637         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16638         predicate.
16640 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
16642         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16643         mode with E_ prefix.
16645 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
16646             Chung-Ju Wu  <jasonwucj@gmail.com>
16648         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16649         * config/nds32/nds32-md-auxiliary.c
16650         (symbolic_reference_mentioned_p): New.
16651         (nds32_legitimize_ict_address): New.
16652         (nds32_expand_ict_move): New.
16653         (nds32_indirect_call_referenced_p): New.
16654         (nds32_symbol_binds_local_p): Delete.
16655         (nds32_long_call_p): Modify.
16656         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16657         * config/nds32/nds32-protos.h
16658         (symbolic_reference_mentioned_p): Declare.
16659         (nds32_legitimize_ict_address): Declare.
16660         (nds32_expand_ict_move): Declare.
16661         (nds32_indirect_call_referenced_p): Declare.
16662         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16663         (nds32_relax_group): Use nds32_ict_const_p as condition.
16664         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16665         (nds32_asm_file_start): Output ict_model directive in asm code.
16666         (nds32_legitimate_address_p): Consider indirect call.
16667         (nds32_print_operand): Consider indirect call.
16668         (nds32_print_operand_address): Consider indirect call.
16669         (nds32_insert_attributes): Handle "indirect_call" attribute.
16670         (TARGET_LEGITIMATE_ADDRESS_P): Define.
16671         (TARGET_LEGITIMATE_CONSTANT_P): Define.
16672         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16673         (TARGET_DELEGITIMIZE_ADDRESS): Define.
16674         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16675         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16676         (TARGET_ICT_MODEL_SMALL): Define.
16677         (TARGET_ICT_MODEL_LARGE): Define.
16678         * config/nds32/nds32.md (movsi): Consider ict model.
16679         (call, call_value): Consider ict model.
16680         (sibcall, sibcall_value): Consider ict model.
16681         * config/nds32/nds32.opt (mict-model): New option.
16682         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16683         model.
16685 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
16686             Monk Chiang  <sh.chiang04@gmail.com>
16687             Jim Wilson <jimw@sifive.com>
16689         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16690         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
16691         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16692         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16693         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
16694         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16695         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16696         compute save_libcall_adjustment properly.
16697         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16698         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16699         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16700         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16701         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16702         (ABI_SPEC): Handle mabi=ilp32e.
16703         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16704         (RVE): Add RVE mask.
16705         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16706         <-march>: Add rv32e as an example.
16708 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
16710         PR c++/82899
16711         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16712         (intra_create_variable_infos): Handle C++ constructors.
16714 2018-05-18  Martin Liska  <mliska@suse.cz>
16716         * passes.def: Remove a redundant pass.
16718 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
16720         PR bootstrap/85838
16721         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16723 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16725         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16726         (ARMv4): Update.
16727         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16728         (ARMv6m): Update.
16729         (armv2, armv2a, armv3, armv3m): Delete architectures.
16730         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16731         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16732         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16733         Delete cpus.
16734         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16735         (*mulsidi3adddi): Likewise.
16736         (mulsidi3): Likewise.
16737         (*mulsidi3_nov6): Likewise.
16738         (umulsidi3): Likewise.
16739         (umulsidi3_nov6): Likewise.
16740         (umaddsidi4): Likewise.
16741         (*umulsidi3adddi): Likewise.
16742         (smulsi3_highpart): Likewise.
16743         (*smulsi3_highpart_nov6): Likewise.
16744         (umulsi3_highpart): Likewise.
16745         (*umulsi3_highpart_nov6): Likewise.
16746         * config/arm/arm.h (arm_arch3m): Delete.
16747         * config/arm/arm.c (arm_arch3m): Delete.
16748         (arm_option_override_internal): Update armv3-related comment.
16749         (arm_configure_build_target): Delete use of isa_bit_mode32.
16750         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16751         (arm_rtx_costs_internal): Delete check of arm_arch3m.
16752         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16753         (mulsa3): Likewise.
16754         (mulusa3): Likewise.
16755         * config/arm/arm-protos.h (arm_arch3m): Delete.
16756         * config/arm/arm-tables.opt: Regenerate.
16757         * config/arm/arm-tune.md: Likewise.
16758         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16759         deleted architectures.
16761 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16763         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16764         (armv5t, armv5te): New features.
16765         (ARMv5, ARMv5e): Delete fgroups.
16766         (ARMv5t, ARMv5te): Adjust for above changes.
16767         (ARMv6m): Likewise.
16768         (armv5, armv5e): Delete arches.
16769         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16770         arm_arch5.
16771         (*call_reg_arm): Likewise.
16772         (*call_value_reg_armv5): Likewise.
16773         (*call_value_reg_arm): Likewise.
16774         (*call_symbol): Likewise.
16775         (*call_value_symbol): Likewise.
16776         (*sibcall_insn): Likewise.
16777         (*sibcall_value_insn): Likewise.
16778         (clzsi2): Likewise.
16779         (prefetch): Likewise.
16780         (define_split and define_peephole2 dependent on arm_arch5):
16781         Likewise.
16782         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16783         arm_arch5e.
16784         (TARGET_ARM_QBIT): Likewise.
16785         (TARGET_DSP_MULTIPLY): Likewise.
16786         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16787         (arm_arch5, arm_arch5e): Delete.
16788         (arm_arch5t, arm_arch5te): Declare.
16789         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16790         (arm_arch5t): Declare.
16791         (arm_option_reconfigure_globals): Update for the above.
16792         (arm_options_perform_arch_sanity_checks): Update comment, replace
16793         use of arm_arch5 with arm_arch5t.
16794         (use_return_insn): Likewise.
16795         (arm_emit_call_insn): Likewise.
16796         (output_return_instruction): Likewise.
16797         (arm_final_prescan_insn): Likewise.
16798         (arm_coproc_builtin_available): Likewise.
16799         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16800         arm_arch5e with arm_arch5t and arm_arch5te.
16801         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16802         (arm_arch5t, arm_arch5te): Declare.
16803         * config/arm/arm-tables.opt: Regenerate.
16804         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16805         * config/arm/t-multilib: Likewise.
16806         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16807         instead of arm_arch5.
16808         (*call_reg_thumb1): Likewise.
16809         (*call_value_reg_thumb1_v5): Likewise.
16810         (*call_value_reg_thumb1): Likewise.
16811         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16812         unreachable path.
16813         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16815 2018-05-18  Martin Liska  <mliska@suse.cz>
16817         PR gcov-profile/84846
16818         * doc/gcov.texi: Document -t option of gcov tool.
16820 2018-05-18  Martin Liska  <mliska@suse.cz>
16822         PR gcov-profile/84846
16823         * gcov.c (print_usage): Add new -t option.
16824         (process_args): Handle the option.
16825         (generate_results): Use stdout as output when requested by
16826         the option.
16828 2018-05-18  Martin Liska  <mliska@suse.cz>
16830         PR gcov-profile/84846
16831         * coverage.c (coverage_init): Write PWD to .gcno file.
16832         * doc/gcov.texi: Document how working directory is printed.
16833         * gcov-dump.c (dump_gcov_file): Print PWD.
16834         * gcov.c (output_intermediate_file): Likewise.
16835         (read_graph_file): Read PWD string.
16836         (output_lines): Print PWD.
16838 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16840         PR middle-end/85817
16841         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16842         for retval and return false if all args to phi are zero.
16844 2018-05-18  Richard Biener  <rguenther@suse.de>
16846         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16847         method.
16848         (evrp_dom_walker::before_dom_children): Call it.
16850 2018-05-18  Richard Biener  <rguenther@suse.de>
16852         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16853         results when processing array refs with variable index.
16855 2018-05-18  Toon Moene  <toon@moene.org>
16857         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16858         directly after that of -floop-interchange. Indicate that both
16859         options are enabled by default when specifying -O3.
16861 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16863         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16864         iterator.  Delete separate integer-mode vec_set<mode> expander.
16865         (aarch64_simd_vec_setv2di): Delete.
16866         (vec_setv2di): Delete.
16867         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16868         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
16869         the "w, r" alternative.
16871 2018-05-18  Martin Liska  <mliska@suse.cz>
16873         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16874         * tree-pass.h (make_pass_lower_switch_O0): New function.
16875         * tree-switch-conversion.c (node_has_low_bound): Remove.
16876         (node_has_high_bound): Likewise.
16877         (node_is_bounded): Likewise.
16878         (class pass_lower_switch): Make it a template type and create
16879         two instances.
16880         (pass_lower_switch::execute): Add template argument.
16881         (make_pass_lower_switch): New function.
16882         (make_pass_lower_switch_O0): New function.
16883         (do_jump_if_equal): Remove.
16884         (emit_case_nodes): Simplify to just handle all 3 cases and leave
16885         all the hard work to tree optimization passes.
16887 2018-05-18  Martin Liska  <mliska@suse.cz>
16889         * dbgcnt.c (limit_low): Renamed from limit.
16890         (limit_high): New variable.
16891         (dbg_cnt_is_enabled): Check for upper limit.
16892         (dbg_cnt): Adjust dumping.
16893         (dbg_cnt_set_limit_by_index): Add new argument for high
16894         value.
16895         (dbg_cnt_set_limit_by_name): Likewise.
16896         (dbg_cnt_process_single_pair): Parse new format.
16897         (dbg_cnt_process_opt): Use strtok.
16898         (dbg_cnt_list_all_counters): Remove 'value' and add
16899         'limit_high'.
16900         * doc/invoke.texi: Document changes.
16902 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
16904         * doc/sourcebuild.texi (scalar_all_fma): Document.
16905         * tree.def (FMA_EXPR): Delete.
16906         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16907         * internal-fn.c (ternary_direct): New macro.
16908         (expand_ternary_optab_fn): Likewise.
16909         (direct_ternary_optab_supported_p): Likewise.
16910         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16911         * builtins.c (fold_builtin_fma): Delete.
16912         (fold_builtin_3): Don't call it.
16913         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16914         * expr.c (expand_expr_real_2): Likewise.
16915         * fold-const.c (operand_equal_p): Likewise.
16916         (fold_ternary_loc): Likewise.
16917         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16918         * gimple.c (DEFTREECODE): Likewise.
16919         * gimplify.c (gimplify_expr): Likewise.
16920         * optabs-tree.c (optab_for_tree_code): Likewise.
16921         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16922         * tree-eh.c (operation_could_trap_p): Likewise.
16923         (stmt_could_throw_1_p): Likewise.
16924         * tree-inline.c (estimate_operator_cost): Likewise.
16925         * tree-pretty-print.c (dump_generic_node): Likewise.
16926         (op_code_prio): Likewise.
16927         * tree-ssa-loop-im.c (stmt_cost): Likewise.
16928         * tree-ssa-operands.c (get_expr_operands): Likewise.
16929         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
16930         * fold-const-call.h (fold_fma): Delete.
16931         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
16932         CFN_FNMA and CFN_FNMS.
16933         (fold_fma): Delete.
16934         * genmatch.c (combined_fn): New enum.
16935         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
16936         (commutative_op): New function.
16937         (commutate): Use it.  Handle more than 2 operands.
16938         (dt_operand::gen_gimple_expr): Use commutative_op.
16939         (parser::parse_expr): Allow :c to be used with non-binary
16940         operators if the commutative operand is known.
16941         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
16942         CFN_FMS, CFN_FNMA and CFN_FNMS.
16943         (backprop::process_assign_use): Remove FMA_EXPR handling.
16944         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
16945         (gen_hsa_fma): New function.
16946         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
16947         IFN_FNMA and IFN_FNMS.
16948         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
16949         * gimple-fold.h (follow_all_ssa_edges): Declare.
16950         * gimple-fold.c (follow_all_ssa_edges): New function.
16951         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
16952         gimple_build interface and use follow_all_ssa_edges to fold the result.
16953         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
16954         instead of checking for optabs directly.
16955         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
16956         rather than FMA_EXPRs.
16957         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
16958         call to IFN_FMA instead of an FMA_EXPR.
16960 2018-05-17  Jim Wilson  <jimw@sifive.com>
16962         * expr.c (do_tablejump): When converting index to Pmode, if we have a
16963         sign extended promoted subreg, and the range does not have the sign bit
16964         set, then do a sign extend.
16966         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
16967         test, check for sign extended subreg and/or constant operands, and
16968         do a sign extend in that case.
16970 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
16972         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
16973         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
16974         Add untyped.
16975         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
16976         Change logics_shift_reg to logics_shift_imm.
16977         (thunderx2t99_fp_loadpair_basic): Delete.
16978         (thunderx2t99_fp_storepair_basic): Delete.
16979         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
16980         (thunderx2t99_asimd_polynomial): Delete.
16981         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
16982         and neon_fp_mul_d_scalar_q.
16983         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
16984         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
16985         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
16986         (thunderx2t99_asimd_lut): Add missing tbl types.
16987         (thunderx2t99_asimd_ext): Delete.
16988         (thunderx2t99_asimd_load1_1_mult): Delete.
16989         (thunderx2t99_asimd_load1_2_mult): Delete.
16990         (thunderx2t99_asimd_load1_ldp): New.
16991         (thunderx2t99_asimd_load1): New.
16992         (thunderx2t99_asimd_load2): Add missing *load2* types.
16993         (thunderx2t99_asimd_load3): New.
16994         (thunderx2t99_asimd_load4): New.
16995         (thunderx2t99_asimd_store1_1_mult): Delete.
16996         (thunderx2t99_asimd_store1_2_mult): Delete.
16997         (thunderx2t99_asimd_store2_mult): Delete.
16998         (thunderx2t99_asimd_store2_onelane): Delete.
16999         (thunderx2t99_asimd_store_stp): New.
17000         (thunderx2t99_asimd_store1): New.
17001         (thunderx2t99_asimd_store2): New.
17002         (thunderx2t99_asimd_store3): New.
17003         (thunderx2t99_asimd_store4): New.
17005 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
17007         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
17008         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
17010 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
17011             Segher Boessenkool  <segher@kernel.crashing.org>
17013         PR target/85698
17014         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
17015         operand.
17017 2018-05-17  Richard Biener  <rguenther@suse.de>
17019         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
17020         for pruning loop and prune defs feeding only already visited PHIs.
17022 2018-05-17  Richard Biener  <rguenther@suse.de>
17024         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
17026 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
17027             Richard Biener  <rguenther@suse.de>
17029         PR tree-optimization/85793
17030         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
17031         for VMAT_ELEMENTWISE.
17033 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
17035         * internal-fn.h (lookup_internal_fn): Declare
17036         * internal-fn.c (lookup_internal_fn): New function.
17037         * gimple.c (gimple_build_call_from_tree): Handle calls to
17038         internal functions.
17039         * gimple-pretty-print.c (dump_gimple_call): Print "." before
17040         internal function names.
17041         * tree-pretty-print.c (dump_generic_node): Likewise.
17042         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
17044 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
17046         * gimple-fold.h (gimple_build): Make the function forms take
17047         combined_fn rather than built_in_function.
17048         (gimple_simplify): Likewise.
17049         * gimple-match-head.c (gimple_simplify): Likewise.
17050         * gimple-fold.c (gimple_build): Likewise.
17051         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
17052         rather than gimple_build_call_internal.
17053         (get_initial_defs_for_reduction): Likewise.
17054         (vect_create_epilog_for_reduction): Likewise.
17055         (vectorizable_live_operation): Likewise.
17057 2018-05-17  Martin Liska  <mliska@suse.cz>
17059         * gimple-ssa-sprintf.c (format_directive): Do not use
17060         space in between 'G_' and '('.
17062 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
17064         PR target/85323
17065         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
17066         even if the mask is not all ones.
17068         PR target/85323
17069         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
17070         vector.
17071         (ix86_gimple_fold_builtin): Likewise.
17073         PR target/85323
17074         * config/i386/i386.c: Include tree-vector-builder.h.
17075         (ix86_vector_shift_count): New function.
17076         (ix86_fold_builtin): Fold shift builtins by scalar count.
17077         (ix86_gimple_fold_builtin): Likewise.
17079         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
17080         _mm512_setzero): New intrinsics.
17082 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
17083             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17085         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
17086         code generation for cases where splatting a value is not useful.
17087         * simplify-rtx.c (simplify_ternary_operation): Simplify
17088         vec_merge across a vec_duplicate and a paradoxical subreg forming
17089         a vector mode to a vec_concat.
17091 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
17093         * config.gcc: Support "goldmont-plus".
17094         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17095         "goldmont-plus".
17096         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17097         PROCESSOR_GOLDMONT_PLUS.
17098         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
17099         (processor_target_table): Add "goldmont-plus".
17100         (PTA_GOLDMONT_PLUS): Define.
17101         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
17102         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
17103         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
17104         (fold_builtin_cpu): Add "goldmont-plus".
17105         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
17106         (ix86_option_override_internal): Add "goldmont-plus".
17107         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
17108         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
17109         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
17110         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
17112 2018-05-17  Richard Biener  <rguenther@suse.de>
17114         PR tree-optimization/85757
17115         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
17116         remove defs that only feed that PHI from further processing.
17118 2018-05-16  Jim Wilson  <jimw@sifive.com>
17120         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
17121         asterisk to name.
17122         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
17124 2018-05-16  Mark Wielaard  <mark@klomp.org>
17126         * dwarf2out.c (count_index_strings): New function.
17127         (output_indirect_strings): Call count_index_strings and generate
17128         header for dwarf_version >= 5.
17130 2018-05-16  Mark Wielaard  <mark@klomp.org>
17132         * dwarf2out.c (dwarf_FORM): New function.
17133         (set_indirect_string): Use dwarf_FORM.
17134         (reset_indirect_string): Likewise.
17135         (size_of_die): Likewise.
17136         (value_format): Likewise.
17137         (output_die): Likewise.
17138         (add_skeleton_AT_string): Likewise.
17139         (output_macinfo_op): Likewise.
17140         (index_string): Likewise.
17141         (output_index_string_offset): Likewise.
17142         (output_index_string): Likewise.
17143         (count_index_strings): Likewise.
17145 2018-05-16  Carl Love  <cel@us.ibm.com>
17147         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17148         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
17150 2018-05-16  Martin Jambor  <mjambor@suse.cz>
17152         * ipa-prop.c (ipa_free_all_edge_args): Remove.
17153         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
17155 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
17157         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
17158         (fnma<mode>4): Likewise.
17159         (fms<mode>4): Likewise.
17160         (fnms<mode>4): Likewise.
17161         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
17162         (aarch64_fnma<mode>4): Likewise.
17163         (aarch64_fms<mode>4): Likewise.
17164         (aarch64_fnms<mode>4): Likewise.
17165         (aarch64_fnmadd<mode>4): Likewise.
17167 2018-05-16  Jason Merrill  <jason@redhat.com>
17169         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
17171 2018-05-16  Richard Biener  <rguenther@suse.de>
17173         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
17174         (dump_stmt_cost): Declare.
17175         (add_stmt_cost): Dump cost we add.
17176         (add_stmt_costs): New function.
17177         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
17178         No longer exported.
17179         (vect_analyze_stmt): Adjust prototype.
17180         (vectorizable_condition): Likewise.
17181         (vectorizable_live_operation): Likewise.
17182         (vectorizable_reduction): Likewise.
17183         (vectorizable_induction): Likewise.
17184         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
17185         cost vector to pass to vectorizable_ and record afterwards.
17186         (vect_model_reduction_cost): Take cost vector argument and adjust.
17187         (vect_model_induction_cost): Likewise.
17188         (vectorizable_reduction): Likewise.
17189         (vectorizable_induction): Likewise.
17190         (vectorizable_live_operation): Likewise.
17191         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
17192         SLP_TREE_NUMBER_OF_VEC_STMTS.
17193         (vect_analyze_slp_cost_1): Remove.
17194         (vect_analyze_slp_cost): Likewise.
17195         (vect_slp_analyze_node_operations): Take visited args and
17196         a target cost vector.  Avoid processing already visited stmt sets.
17197         (vect_slp_analyze_operations): Use a local cost vector to gather
17198         costs and register those of non-discarded instances.
17199         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
17200         (vect_schedule_slp_instance): Remove copying of
17201         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
17202         zero.
17203         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
17204         adding cost.  Record cost entry location.
17205         (vect_prologue_cost_for_slp_op): Function to compute cost of
17206         a constant or invariant generated for SLP vect in the prologue,
17207         split out from vect_analyze_slp_cost_1.
17208         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
17209         (vect_model_promotion_demotion_cost): Likewise.
17210         (vect_model_store_cost): Likewise, make static.
17211         (vect_model_load_cost): Likewise.
17212         (vectorizable_bswap): Add cost vector arg and adjust.
17213         (vectorizable_call): Likewise.
17214         (vectorizable_simd_clone_call): Likewise.
17215         (vectorizable_conversion): Likewise.
17216         (vectorizable_assignment): Likewise.
17217         (vectorizable_shift): Likewise.
17218         (vectorizable_operation): Likewise.
17219         (vectorizable_store): Likewise.
17220         (vectorizable_load): Likewise.
17221         (vectorizable_condition): Likewise.
17222         (vectorizable_comparison): Likewise.
17223         (can_vectorize_live_stmts): Likewise.
17224         (vect_analyze_stmt): Likewise.
17225         (vect_transform_stmt): Adjust calls to vectorizable_*.
17226         * tree-vectorizer.c: Include gimple-pretty-print.h.
17227         (dump_stmt_cost): New function.
17229 2018-05-16  Richard Biener  <rguenther@suse.de>
17231         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17232         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17233         * tree-ssa-dse.c: Include tree-ssa-loop.h.
17234         (check_name): New callback.
17235         (dse_classify_store): Track cycles via a visited bitmap of PHI
17236         defs and simplify handling of in-loop and across loop dead stores
17237         and properly fail for loop-variant refs.  Handle byte-tracking with
17238         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17239         limiting the walk.
17241 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
17243         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17244         (vect_get_mask_type_for_stmt): Likewise.
17245         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17246         split out from...
17247         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
17248         to determine the statement's vector type and the vector type that
17249         should be used for calculating nunits.  Deal with cases in which
17250         the type has to be deferred.
17251         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17252         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17253         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17254         (vect_determine_vf_for_stmt): New functions, split out from...
17255         (vect_determine_vectorization_factor): ...here.
17256         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17257         (vect_get_mask_type_for_stmt): New functions, split out from
17258         vect_determine_vectorization_factor.
17260 2018-05-16  Richard Biener  <rguenther@suse.de>
17262         * tree-cfg.c (verify_gimple_assign_ternary): Properly
17263         verify the [VEC_]COND_EXPR embedded comparison.
17265 2018-05-15  Martin Sebor  <msebor@redhat.com>
17267         PR tree-optimization/85753
17268         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17269         RECORD_TYPE in addition to ARRAY_TYPE.
17271 2018-05-15  Martin Sebor  <msebor@redhat.com>
17273         PR middle-end/85643
17274         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17276 2018-05-15  Richard Biener  <rguenther@suse.de>
17278         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17279         add by_clobber_p one.  Change algorithm to collect all defs
17280         representing uses we need to walk and try reducing them to
17281         a single one before failing.
17282         (dse_dom_walker::dse_optimize_stmt): Adjust.
17284 2018-05-13  Mark Wielaard  <mark@klomp.org>
17286         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17287         (size_of_loc_descr): Likewise.
17288         (output_loc_operands): Likewise.
17289         (output_loc_operands_raw): Likewise.
17290         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17291         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17292         (hash_loc_operands): Likewise.
17293         (compare_loc_operands): Likewise.
17295 2018-05-14  Mark Wielaard  <mark@klomp.org>
17297         * dwarf2out.c (count_index_addrs): New function.
17298         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17300 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17302         PR tree-optimization/83648
17303         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17304         return value as malloc candidate.
17306 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17308         PR ipa/85734
17309         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17310         param as true in call to suggest_attribute.
17312 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
17314         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17315         -mreadonly-in-sdata.
17317 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17319         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17320         New pattern.
17321         (aarch64_crypto_aesd_fused): Likewise.
17323 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
17325         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17326         (movsi_aarch64): Likewise.
17327         (load_pairsi): Likewise.
17328         (load_pairdi): Likewise.
17329         (store_pairsi): Likewise.
17330         (store_pairdi): Likewise.
17331         (load_pairsf): Likewise.
17332         (load_pairdf): Likewise.
17333         (store_pairsf): Likewise.
17334         (store_pairdf): Likewise.
17335         (zero_extend): Likewise.
17336         (trunc): Swap alternatives.
17337         (fcvt_target): Add '?' to prefer w over r.
17339 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
17341         PR target/85756
17342         * config/i386/i386.md: Disallow non-commutative arithmetics in
17343         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17344         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
17345         in the peephole2 before it.
17347 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
17349         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17350         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17351         (ix86_handle_option): Handle -mcldemote.
17352         * config.gcc: New header.
17353         * config/i386/cldemoteintrin.h: New file.
17354         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17355         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17356         -mcldemote.
17357         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17358         OPTION_MASK_ISA_CLDEMOTE.
17359         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17360         (ix86_valid_target_attribute_inner_p): Ditto.
17361         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17362         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17363         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17364         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17365         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17366         (cldemote): New.
17367         * config/i386/i386.opt: Add -mcldemote.
17368         * config/i386/x86intrin.h: New header.
17369         * doc/invoke.texi: Add -mcldemote.
17371 2018-05-14  Richard Biener  <rguenther@suse.de>
17373         * doc/match-and-simplify.texi: Adjust :s documentation.
17375 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
17377         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17378         intended memcpy size.
17379         (REORDER_45): Likewise.
17381 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
17383         * sort.cc: New file.
17384         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17385         * vec.c (qsort_chk): Use gcc_qsort.
17386         * Makefile.in (OBJS-libcommon): Add sort.o.
17387         (build/sort.o): New target.  Use it...
17388         (BUILD_RTL): ... here, and...
17389         (build/gencfn-macros): ... here, and...
17390         (build/genmatch): ... here.
17392 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
17393             Chung-Ju Wu  <jasonwucj@gmail.com>
17395         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17396         * config/nds32/nds32-graywolf.md: New file.
17397         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17398         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17399         pipeline.
17400         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17401         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17402         * config/nds32/nds32.md (pipeline_model): Add graywolf.
17403         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17404         * config/nds32/pipelines.md: Include n15 settings.
17406 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
17407             Chung-Ju Wu  <jasonwucj@gmail.com>
17409         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17410         * config/nds32/nds32-n13.md: New file.
17411         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17412         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17413         pipeline.
17414         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17415         * config/nds32/nds32.md (pipeline_model): Add n13.
17416         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17417         * config/nds32/pipelines.md: Include n13 settings.
17419 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
17420             Chung-Ju Wu  <jasonwucj@gmail.com>
17422         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17423         * config/nds32/nds32-n10.md: New file.
17424         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17425         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17426         pipeline.
17427         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17428         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17429         * config/nds32/nds32.md (pipeline_model): Add n10.
17430         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17431         * config/nds32/pipelines.md: Include n10 settings.
17433 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
17434             Kito Cheng  <kito.cheng@gmail.com>
17435             Chung-Ju Wu  <jasonwucj@gmail.com>
17437         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17438         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17439         Add enum values for DSP extension instructions.
17440         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17441         New constraints.
17442         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17443         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17444         New code iterators.
17445         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17446         * config/nds32/nds32-dspext.md: New file for DSP implementation.
17447         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17448         * config/nds32/nds32-intrinsic.md: Likewise.
17449         * config/nds32/nds32_intrinsic.h: Likewise.
17450         * config/nds32/nds32-md-auxiliary.c: Likewise.
17451         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17452         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17453         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17454         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17455         * config/nds32/nds32-protos.h: New declarations for DSP extension.
17456         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17457         TYPE_DMAC in switch statement.
17458         * config/nds32/nds32.c: New checking and implementation for DSP
17459         extension instructions.
17460         * config/nds32/nds32.h: Likewise.
17461         * config/nds32/nds32.md: Likewise.
17462         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17463         * config/nds32/predicates.md: Implement new predicates for DSP
17464         extension.
17466 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
17468         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17469         Reformat alternatives and attributes so it is easier to identify
17470         which constraints/attributes go with which instruction.
17471         (mov<mode>_hardfloat32, FMOVE64): Likewise.
17472         (mov<mode>_softfloat32, FMOVE64): Likewise.
17473         (mov<mode>_hardfloat64, FMOVE64): Likewise.
17474         (mov<mode>_softfloat64, FMOVE64): Likewise.
17476 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17478         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17479         subsection.
17480         (Basic PowerPC Built-in Functions): The new name of the
17481         subsection previously known as "PowerPC Built-in Functions".
17482         (Basic PowerPC Built-in Functions Available on all Configurations):
17483         New subsubsection.
17484         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17485         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17486         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17487         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17489 2018-05-11  Martin Jambor  <mjambor@suse.cz>
17491         PR ipa/85655
17492         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17493         single const.
17495 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
17497         PR target/85733
17498         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17500 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
17502         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17503         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17504         (ix86_handle_option): Handle -mwaitpkg.
17505         * config.gcc: New header.
17506         * config/i386/cpuid.h (bit_WAITPKG): New bit.
17507         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17508         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17509         function type.
17510         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17511         OPTION_MASK_ISA_WAITPKG.
17512         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17513         (ix86_option_override_internal): Add PTA_WAITPKG.
17514         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17515         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17516         IX86_BUILTIN_TPAUSE.
17517         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17518         __builtin_ia32_umwait and __builtin_ia32_tpause.
17519         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17520         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17521         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17522         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17523         UNSPECV_TPAUSE): New.
17524         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17525         * config/i386/i386.opt: Add -mwaitpkg.
17526         * config/i386/waitpkgintrin.h: New file.
17527         * config/i386/x86intrin.h: New header.
17528         * doc/invoke.texi: Add -mwaitpkg.
17530 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
17532         PR target/85606
17533         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17534         equivalent.
17535         (cortex-m0): Use armv6s-m isa.
17536         (cortex-m0plus): Likewise.
17537         (cortex-m1): Likewise.
17538         (cortex-m0.small-multiply): Likewise.
17539         (cortex-m0plus.small-multiply): Likewise.
17540         (cortex-m1.small-multiply): Likewise.
17542 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
17543             Jakub Jelinek  <jakub@redhat.com>
17545         PR tree-optimization/85692
17546         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17547         source permute as well.
17549 2018-05-11  Martin Liska  <mliska@suse.cz>
17551         PR sanitizer/85556
17552         * doc/extend.texi: Document LLVM style format for no_sanitize
17553         attribute.
17555 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
17557         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17558         mode_supports_vsx_dform_quad to mode_supports_dq_form.
17559         (mode_supports_vsx_dform_quad): Likewise.
17560         (mode_supports_vmx_dform): Move these functions to be next to the
17561         other mode_supports functions.
17562         (mode_supports_dq_form): Likewise.
17563         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17564         mode_supports_dq_form.
17565         (reg_offset_addressing_ok_p): Likewise.
17566         (offsettable_ok_by_alignment): Likewise.
17567         (rs6000_legitimate_offset_address_p): Likewise.
17568         (legitimate_lo_sum_address_p): Likewise.
17569         (rs6000_legitimize_address): Likewise.
17570         (rs6000_legitimize_reload_address): Likewise.
17571         (rs6000_secondary_reload_inner): Likewise.
17572         (rs6000_preferred_reload_class): Likewise.
17573         (rs6000_output_move_128bit): Likewise.
17575 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
17577         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17578         Generate SImode target register for null target.
17579         <case IX86_BUILTIN_XGETBV>: Ditto.
17580         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17581         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17583 2018-05-10  Carl Love  <cel@us.ibm.com>
17585         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17586         dcbtt and dcbtstt if operands[2] is 0.
17588 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
17590         PR target/85693
17591         * config/i386/sse.md (usadv64qi): New expander.
17593 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
17595         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17596         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17597         -maltivec=be support.
17598         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17599         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17600         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17601         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17602         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17603         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17604         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17605         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17606         altivec_vsumsws): Adjust.
17607         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17608         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17609         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17610         support.
17611         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17612         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17613         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17614         (altivec_lve<VI_char>x): Delete expand.
17615         (*altivec_lve<VI_char>x_internal): Rename to...
17616         (altivec_lve<VI_char>x): ... this.
17617         (altivec_lvxl_<mode>): Delete expand.
17618         (*altivec_lvxl_<mode>_internal): Rename to ...
17619         (altivec_lvxl_<mode>): ... this.
17620         (altivec_stvxl_<mode>): Delete expand.
17621         (*altivec_stvxl_<mode>_internal): Rename to ...
17622         (altivec_stvxl_<mode>): ... this.
17623         (altivec_stve<VI_char>x): Delete expand.
17624         (*altivec_stve<VI_char>x_internal): Rename to ...
17625         (altivec_stve<VI_char>x): ... this.
17626         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17627         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17628         reduc_plus_scal_<mode>): Adjust.
17629         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17630         comment.
17631         (rs6000_cpu_cpp_builtins): Adjust.
17632         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17633         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17634         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17635         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17636         -maltivec=be support.
17637         (rs6000_split_vec_extract_var): Adjust.
17638         (rs6000_split_v4si_init): Adjust.
17639         (swap_selector_for_mode): Delete.
17640         (altivec_expand_lvx_be, altivec_expand_stvx_be,
17641         altivec_expand_stvex_be): Delete.
17642         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17643         -maltivec=be support.
17644         (rs6000_gimple_fold_builtin): Ditto.
17645         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17646         Adjust.
17647         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17648         (TARGET_DIRECT_MOVE_64BIT): Adjust.
17649         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17650         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17651         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17652         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17653         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17654         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17655         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17656         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17657         anonymous split): Adjust.
17658         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17659         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17661 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
17663         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17664         when --with-gxx-include-dir is also specified.
17665         * configure: Regenerate.
17667 2018-05-09  Jim Wilson  <jimw@sifive.com>
17669         PR target/84797
17670         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17671         * config/riscv/t-withmultilib: New.
17672         * config/riscv/withmultilib.h: New.
17673         * doc/install.texi: Document RISC-V --with-multilib-list support.
17675 2018-05-09  Richard Biener  <rguenther@suse.de>
17677         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17678         vector.
17679         (vect_bb_vectorization_profitable_p): Adjust.  Compute
17680         actual scalar cost using the cost vector and the add_stmt_cost
17681         machinery.
17683 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17685         PR rtl-optimization/85645
17686         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17687         in the REG_CFA_REGISTER note for LR, don't leave it empty.
17689 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17691         PR rtl-optimization/85645
17692         * shrink-wrap.c (spread_components): Return a boolean saying if
17693         anything was changed.
17694         (try_shrink_wrapping_separate): Iterate spread_components until
17695         nothing changes anymore.
17697 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17699         PR rtl-optimization/85645
17700         * regrename.c (build_def_use): Also kill the chains that include the
17701         destination of a REG_CFA_REGISTER note.
17703 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
17705         PR rtl-optimization/85645
17706         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17707         insn that has a REG_CFA_REGISTER note.
17709 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
17711         * cfgexpand.c (expand_clobber): New function.
17712         (expand_gimple_stmt_1): Use it.
17713         * tree-vect-stmts.c (vect_clobber_variable): New function,
17714         split out from...
17715         (vectorizable_simd_clone_call): ...here.
17716         (vectorizable_store): Emit a clobber either side of an
17717         IFN_STORE_LANES sequence.
17718         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17720 2018-05-09  Tom de Vries  <tom@codesourcery.com>
17722         PR target/85626
17723         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17724         (define_insn "trap_if_false"): Add exit after trap.
17726 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
17728         PR rtl-optimization/85638
17729         * bb-reorder.c: Include common/common-target.h.
17730         (create_forwarder_block): New function extracted from...
17731         (fix_up_crossing_landing_pad): ...here.  Rename into...
17732         (dw2_fix_up_crossing_landing_pad): ...this.
17733         (sjlj_fix_up_crossing_landing_pad): New function.
17734         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17735         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17736         from both partitions and exit the loop after one iteration.
17738 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17740         Revert:
17741         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17742         subsection.
17743         (Basic PowerPC Built-in Functions): The new name of the
17744         subsection previously known as "PowerPC Built-in Functions".
17745         (Basic PowerPC Built-in Functions Available on all Configurations):
17746         New subsubsection.
17747         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17748         subsubsection.
17749         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17750         subsubsection.
17751         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17752         subsubsection.
17753         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17754         subsubsection.
17756 2018-05-08  Jim Wilson  <jimw@sifive.com>
17758         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17759         (LD_EMUL_SUFFIX): New.
17760         (LINK_SPEC): Use it.
17762 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17764         * doc/extend.texi (PowerPC Built-in Functions): Rename this
17765         subsection.
17766         (Basic PowerPC Built-in Functions): The new name of the
17767         subsection previously known as "PowerPC Built-in Functions".
17768         (Basic PowerPC Built-in Functions Available on all Configurations):
17769         New subsubsection.
17770         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17771         subsubsection.
17772         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17773         subsubsection.
17774         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17775         subsubsection.
17776         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17777         subsubsection.
17779 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
17781         PR target/85683
17782         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17783         after cmpelim optimization.
17785 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
17787         * config.gcc: Support "goldmont".
17788         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17789         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17790         PROCESSOR_GOLDMONT.
17791         * config/i386/i386.c (m_GOLDMONT): Define.
17792         (processor_target_table): Add "goldmont".
17793         (PTA_GOLDMONT): Define.
17794         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17795         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17796         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17797         (fold_builtin_cpu): Add "goldmont".
17798         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17799         (ix86_option_override_internal): Add "goldmont".
17800         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17801         (processor_type): Add PROCESSOR_GOLDMONT.
17802         * config/i386/i386.md: Add CPU "glm".
17803         * config/i386/glm.md: New file.
17804         * config/i386/x86-tune.def: Add m_GOLDMONT.
17805         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17807 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
17809         PR target/85572
17810         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17811         E_V4DImode.
17812         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17813         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
17814         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
17816         PR target/85317
17817         * config/i386/i386.c (ix86_fold_builtin): Handle
17818         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17820         PR target/85480
17821         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17822         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17824 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
17826         PR target/85658
17827         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17828         (check_arch): Likewise.
17829         (check_fpu): Return the result rather than printing it.
17830         (end arch): Fix operator precedence.
17831         (end cpu): Likewise.
17832         (END): Print the result from check_fpu.
17834 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
17835             Alan Hayward  <alan.hayward@arm.com>
17836             David Sherwood  <david.sherwood@arm.com>
17838         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17839         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17840         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17841         (*fcmuo<mode>_and): New patterns.
17843 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
17845         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17846         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17847         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17848         (cmp_op, sve_imm_con): New code attributes.
17849         (SVE_COND_INT_CMP, imm_con): Delete.
17850         (cmp_op): Remove above unspecs from int attribute.
17851         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17852         to...
17853         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
17854         comparison-specific unspecs.
17855         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17856         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17857         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17858         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17859         (*vec_fcm<cmp_op><mode>): Rename to...
17860         (*fcm<cmp_op><mode>): ...this and adjust likewise.
17861         (*vec_fcmuo<mode>): Rename to...
17862         (*fcmuo<mode>): ...this and adjust likewise.
17863         (*pred_fcm<cmp_op><mode>): New pattern.
17864         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17865         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17866         functions.
17867         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17868         and UNORDERED.
17869         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17870         (aarch64_emit_sve_predicated_cond): New function.
17871         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17872         (aarch64_emit_unspec_cond_or): Replace with...
17873         (aarch64_emit_sve_or_conds): ...this new function.  Use
17874         aarch64_emit_sve_ptrue_op for the individual comparisons and
17875         aarch64_emit_binop to OR them together.
17876         (aarch64_emit_inverted_unspec_cond): Replace with...
17877         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
17878         aarch64_emit_sve_ptrue_op for the comparison and
17879         aarch64_emit_unop to invert the result.
17880         (aarch64_expand_sve_vec_cmp_float): Update after the above
17881         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
17883 2018-05-07  Nathan Sidwell  <nathan@acm.org>
17885         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17886         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17887         (Backwards Compatibility): Likewise.
17889 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17891         PR bootstrap/85681
17892         Revert:
17893         2018-05-07  Luis Machado  <luis.machado@linaro.org>
17895         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17896         <prefetch_dynamic_strides>: New const bool field.
17897         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17898         prefetch_dynamic_strides.
17899         (exynosm1_prefetch_tune): Likewise.
17900         (thunderxt88_prefetch_tune): Likewise.
17901         (thunderx_prefetch_tune): Likewise.
17902         (thunderx2t99_prefetch_tune): Likewise.
17903         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17904         to false.
17905         (aarch64_override_options_internal): Update to set
17906         PARAM_PREFETCH_DYNAMIC_STRIDES.
17907         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17908         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17909         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17910         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17911         prefetch-dynamic-strides setting.
17913         2018-05-07  Luis Machado  <luis.machado@linaro.org>
17915         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17916         <minimum_stride>: New const int field.
17917         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17918         minimum_stride field.
17919         (exynosm1_prefetch_tune): Likewise.
17920         (thunderxt88_prefetch_tune): Likewise.
17921         (thunderx_prefetch_tune): Likewise.
17922         (thunderx2t99_prefetch_tune): Likewise.
17923         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17924         (aarch64_override_options_internal): Update to set
17925         PARAM_PREFETCH_MINIMUM_STRIDE.
17926         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17927         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17928         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17929         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17930         stride is constant and is below the minimum stride threshold.
17932 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17934         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
17935         to 512.
17937 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17939         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17940         <prefetch_dynamic_strides>: New const bool field.
17941         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17942         prefetch_dynamic_strides.
17943         (exynosm1_prefetch_tune): Likewise.
17944         (thunderxt88_prefetch_tune): Likewise.
17945         (thunderx_prefetch_tune): Likewise.
17946         (thunderx2t99_prefetch_tune): Likewise.
17947         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17948         to false.
17949         (aarch64_override_options_internal): Update to set
17950         PARAM_PREFETCH_DYNAMIC_STRIDES.
17951         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17952         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17953         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17954         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17955         prefetch-dynamic-strides setting.
17957 2018-05-07  Luis Machado  <luis.machado@linaro.org>
17959         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17960         <minimum_stride>: New const int field.
17961         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17962         minimum_stride field.
17963         (exynosm1_prefetch_tune): Likewise.
17964         (thunderxt88_prefetch_tune): Likewise.
17965         (thunderx_prefetch_tune): Likewise.
17966         (thunderx2t99_prefetch_tune): Likewise.
17967         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17968         (aarch64_override_options_internal): Update to set
17969         PARAM_PREFETCH_MINIMUM_STRIDE.
17970         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17971         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17972         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17973         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17974         stride is constant and is below the minimum stride threshold.
17976 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
17978         PR c++/85659
17979         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
17980         the type is addressable.  Don't force op into register if it has
17981         BLKmode.
17983 2018-05-05  Roland McGrath  <mcgrathr@google.com>
17985         PR other/77609
17986         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
17987         any section for which we don't know a specific type it should have,
17988         regardless of name.  Previously this was done only for the exact
17989         names ".init_array", ".fini_array", and ".preinit_array".
17990         (default_elf_asm_named_section): Add comment about
17991         relationship with default_section_type_flags and SECTION_NOTYPE.
17992         (get_section): Don't consider it a type conflict if one side has
17993         SECTION_NOTYPE and the other doesn't, as long as neither has the
17994         SECTION_BSS et al used in the default_section_type_flags logic.
17996 2018-05-05  Tom de Vries  <tom@codesourcery.com>
17998         PR target/85653
17999         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
18000         (workaround_barsyncs): New function.
18001         (nvptx_reorg): Use workaround_barsyncs.
18002         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18003         (define_expand "nvptx_membar_cta"): New define_expand.
18004         (define_insn "*nvptx_membar_cta"): New insn.
18006 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
18008         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
18009         To improve optimization opportunities.
18010         * builtin-types.def: The new needed builtin types for the above.
18012 2018-05-04  Richard Biener  <rguenther@suse.de>
18014         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
18015         * gimple-ssa-store-merging.c
18016         (imm_store_chain_info::output_merged_store): Remove redundant create,
18017         release split_store vector contents on failure.
18018         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
18019         scalar stmt vector on cache hit.
18021 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
18023         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
18024         Xilinx FP support.
18025         * config.gcc (powerpc-xilinx-eabi*): Remove.
18026         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
18027         support.
18028         (fusion_addis_mem_combo_load): Ditto.
18029         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
18030         FP support.
18031         (rs6000_cpu_cpp_builtins): Ditto.
18032         * config/rs6000/rs6000-linux.c
18033         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
18034         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
18035         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
18036         support.
18037         (rs6000_setup_reg_addr_masks): Ditto.
18038         (rs6000_init_hard_regno_mode_ok): Ditto.
18039         (rs6000_option_override_internal): Ditto.
18040         (legitimate_lo_sum_address_p): Ditto.
18041         (rs6000_legitimize_address): Ditto.
18042         (rs6000_legitimize_reload_address): Ditto.
18043         (rs6000_legitimate_address_p): Ditto.
18044         (abi_v4_pass_in_fpr): Ditto.
18045         (setup_incoming_varargs): Ditto.
18046         (rs6000_gimplify_va_arg): Ditto.
18047         (rs6000_split_multireg_move): Ditto.
18048         (rs6000_savres_strategy): Ditto.
18049         (rs6000_emit_prologue_components): Ditto.
18050         (rs6000_emit_epilogue_components): Ditto.
18051         (rs6000_emit_prologue): Ditto.
18052         (rs6000_emit_epilogue): Ditto.
18053         (rs6000_elf_file_end): Ditto.
18054         (rs6000_function_value): Ditto.
18055         (rs6000_libcall_value): Ditto.
18056         * config/rs6000/rs6000.h: Ditto.
18057         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
18058         (TARGET_MINMAX): ... this.  New.
18059         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
18060         * config/rs6000/rs6000.md: Remove Xilinx FP support.
18061         (*movsi_internal1_single): Delete.
18062         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
18063         mfpu=, mxilinx-fpu): Delete.
18064         * config/rs6000/singlefp.h: Delete.
18065         * config/rs6000/sysv4.h: Remove Xilinx FP support.
18066         * config/rs6000/t-rs6000: Ditto.
18067         * config/rs6000/t-xilinx: Delete.
18068         * config/rs6000/titan.md: Adjust for fp_type removal.
18069         * config/rs6000/vsx.md: Remove Xilinx FP support.
18070         (VStype_simple): Delete.
18071         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
18072         * config/rs6000/xfpu.h: Delete.
18073         * config/rs6000/xfpu.md: Delete.
18074         * config/rs6000/xilinx.h: Delete.
18075         * config/rs6000/xilinx.opt: Delete.
18076         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
18077         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
18079 2018-05-04  Tom de Vries  <tom@codesourcery.com>
18081         PR libgomp/85639
18082         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
18083         if ignore == 0.
18085 2018-05-04  Richard Biener  <rguenther@suse.de>
18087         PR middle-end/85627
18088         * tree-complex.c (update_complex_assignment): We are always in SSA form.
18089         (expand_complex_div_wide): Likewise.
18090         (expand_complex_operations_1): Likewise.
18091         (expand_complex_libcall): Preserve EH info of the original stmt.
18092         (tree_lower_complex): Handle removed blocks.
18093         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
18094         on complex multiplication and division libcall builtins.
18096 2018-05-04  Richard Biener  <rguenther@suse.de>
18098         PR middle-end/85574
18099         * fold-const.c (negate_expr_p): Restrict negation of operand
18100         zero of a division to when we know that can happen without
18101         overflow.
18102         (fold_negate_expr_1): Likewise.
18104 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
18106         PR libstdc++/85466
18107         * real.h (real_nextafter): Declare.
18108         * real.c (real_nextafter): New function.
18109         * fold-const-call.c (fold_const_nextafter): New function.
18110         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
18111         CASE_CFN_NEXTTOWARD.
18112         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
18113         even when arg1_mode is different from arg0_mode.
18115 2018-05-03  Nathan Sidwell  <nathan@acm.org>
18117         * doc/extend.texi (Deprecated Features): Remove
18118         -ffriend-injection.
18119         (Backwards Compatibility): Likewise.
18120         * doc/invoke.texi (C++ Language Options): Likewise.
18121         (C++ Dialect Options): Likewise.
18123 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
18125         PR target/85530
18126         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
18127         _mm512_mask_mullox_epi64): New intrinsics.
18129 2018-05-03  Tom de Vries  <tom@codesourcery.com>
18131         PR testsuite/85106
18132         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18133         dump files): Add offload-tree.
18135 2018-05-03  Richard Biener  <rguenther@suse.de>
18137         PR tree-optimization/85615
18138         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
18139         to loops not nested in BBs loop father to avoid creating multi-entry
18140         loops.
18142 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18144         PR tree-optimization/70291
18145         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
18146         arguments.  Change return type to tree.  Emit libcall as a new
18147         statement rather than replacing existing one when inplace_p is true.
18148         (expand_complex_multiplication_components): New function.
18149         (expand_complex_multiplication): Expand floating-point complex
18150         multiplication using the above.
18151         (expand_complex_division): Rename inner_type parameter to type.
18152         Update expand_complex_libcall call-site.
18153         (expand_complex_operations_1): Update expand_complex_multiplication
18154         and expand_complex_division call-sites.
18156 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
18158         PR target/85582
18159         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18160         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18161         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
18162         the highest significant bit of the shift count mask is clear.  In
18163         check whether and[sq]i3 is needed verify that all significant bits
18164         of the shift count other than the highest are set.
18166 2018-05-02  Tom de Vries  <tom@codesourcery.com>
18168         PR libgomp/82428
18169         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
18170         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
18171         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
18172         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
18173         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
18174         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
18175         __builtin_goacc_parlevel_size.
18177 2018-05-02  Richard Biener  <rguenther@suse.de>
18179         PR tree-optimization/85597
18180         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
18181         do not use split vect_get_vec_defs call but call vect_get_slp_defs
18182         directly.
18184 2018-05-02  Tom de Vries  <tom@codesourcery.com>
18186         PR testsuite/85106
18187         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18188         dump files): Add ltrans-tree.
18190 2018-05-02  Tom de Vries  <tom@codesourcery.com>
18192         PR testsuite/85106
18193         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18194         dump files): Add wpa-ipa.
18196 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
18198         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
18199         powerpc*-*-linux*paired* target.
18200         * config/rs6000/750cl.h: Delete.
18201         * config/rs6000/paired.h: Delete.
18202         * config/rs6000/paired.md: Delete.
18203         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
18204         float support.
18205         * config/rs6000/rs6000-builtin.def: Remove paired float support.
18206         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18207         comment.  Remove paired float support.
18208         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
18209         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
18210         VECTOR_PAIRED.
18211         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18212         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18213         declarations.
18214         * config/rs6000/rs6000.c: Remove paired float support.
18215         (paired_expand_vector_init, paired_expand_vector_move,
18216         paired_emit_vector_compare, paired_emit_vector_cond_expr,
18217         (paired_expand_lv_builtin, paired_expand_stv_builtin,
18218         paired_expand_builtin, paired_expand_predicate_builtin,
18219         paired_init_builtins): Delete.
18220         * config/rs6000/rs6000.h: Remove paired float support.
18221         * config/rs6000/rs6000.md: Remove paired float support.
18222         (move_from_CR_ov_bit): Delete.
18223         * config/rs6000/rs6000.opt (mpaired): Delete.
18224         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18225         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18227 2018-05-02  Richard Biener  <rguenther@suse.de>
18229         PR middle-end/85567
18230         * gimplify.c (gimplify_save_expr): When in SSA form allow
18231         SAVE_EXPRs to compute to SSA vars.
18233 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
18235         PR target/85582
18236         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18237         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18238         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18239         clobber operands[2], instead use a new pseudo.  Formatting fixes.
18241 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
18243         PR tree-optimization/85586
18244         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18245         exit early for statements in the same group if the accesses are
18246         not strided.
18248 2018-05-02  Tom de Vries  <tom@codesourcery.com>
18250         PR lto/85451
18251         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18252         error message.
18254 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
18256         PR tree-optimization/85143
18257         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18259 2018-05-01  Tom de Vries  <tom@codesourcery.com>
18261         PR lto/85451
18262         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18263         not found" error message.
18265 2018-05-01  Tom de Vries  <tom@codesourcery.com>
18267         PR other/83786
18268         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18269         * vec.c (test_ordered_remove_if): New function.
18270         (vec_c_tests): Call test_ordered_remove_if.
18271         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18272         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18273         * tree-vect-patterns.c (vect_pattern_recog_1): Use
18274         VEC_ORDERED_REMOVE_IF.
18276 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18278         PR tree-optimization/82665
18279         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18280         pointer subtraction where arguments come from a memchr call.
18282 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
18284         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18285         --push-state --as-needed and --pop-state instead of --as-needed and
18286         --no-as-needed if ld supports it.
18287         * configure: Regenerated.
18289         PR web/85578
18290         * doc/install.texi2html: Replace _002d with - and _002a with * in
18291         generated html files using sed.
18293 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18295         PR c++/85523
18296         * gcc-rich-location.c (blank_line_before_p): New function.
18297         (use_new_line): New function.
18298         (gcc_rich_location::add_fixit_insert_formatted): New function.
18299         * gcc-rich-location.h
18300         (gcc_rich_location::add_fixit_insert_formatted): New function.
18302 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18304         * selftest.c (assert_streq): Rename "expected" and "actual" to
18305         "val1" and "val2".  Extend NULL-handling to cover both inputs
18306         symmetrically, while still requiring both to be non-NULL for a pass.
18307         * selftest.h (assert_streq): Rename "expected" and "actual" to
18308         "val1" and "val2".
18309         (ASSERT_EQ): Likewise.
18310         (ASSERT_EQ_AT): Likewise.
18311         (ASSERT_KNOWN_EQ): Likewise.
18312         (ASSERT_KNOWN_EQ_AT): Likewise.
18313         (ASSERT_NE): Likewise.
18314         (ASSERT_MAYBE_NE): Likewise.
18315         (ASSERT_MAYBE_NE_AT): Likewise.
18316         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
18317         the assertion to pass.
18318         (ASSERT_STREQ_AT): Likewise.
18320 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
18322         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18323         interaction with -pie.
18325 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18327         * selftest.h: Fix alphabetization of per-source-file selftest
18328         declarations.
18330 2018-04-30  Jason Merrill  <jason@redhat.com>
18332         PR c++/61982 - dead stores to destroyed objects.
18333         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18334         of clobber.
18336 2018-04-30  Jason Merrill  <jason@redhat.com>
18338         * tree.c (build_clobber): New.
18339         * tree.h: Declare it.
18340         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18342 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18344         * diagnostic-show-locus.c (layout::layout): Update for
18345         location_get_source_line returning a char_span.
18346         (struct char_span): Move to input.h.
18347         (struct correction): Update for fields in char_span becoming
18348         private.
18349         (struct source_line): Update for location_get_source_line
18350         returning a char_span.
18351         (layout::print_line): Likewise.
18352         * edit-context.c (edited_file::print_content): Likewise.
18353         (edited_file::print_diff_hunk): Likewise.
18354         (edited_file::print_run_of_changed_lines): Likewise.
18355         (edited_file::get_num_lines): Likewise.
18356         (edited_line::edited_line): Likewise.
18357         * final.c (asm_show_source): Likewise.
18358         * input.c (location_get_source_line): Convert return type
18359         from const char * to char_span, losing the final "line_len"
18360         param.
18361         (dump_location_info): Update for the above.
18362         (get_substring_ranges_for_loc): Likewise.  Use a char_span
18363         when handling the literal within the line.
18364         (test_reading_source_line): Update for location_get_source_line
18365         returning a char_span.
18366         * input.h (class char_span): Move here from
18367         diagnostic-show-locus.c, converting from a struct to a class.
18368         Make data members private.
18369         (char_span::operator bool): New.
18370         (char_span::length): New.
18371         (char_span::get_buffer): New.
18372         (char_span::operator[]): New.
18373         (char_span::subspan): Make const.
18374         (char_span::xstrdup): New.
18375         (location_get_source_line): Convert return type from const char *
18376         to char_span, losing the final "line_size" param.
18378 2018-04-30  Jan Hubicka  <jh@suse.cz>
18380         * lto-wrapper.c (ltrans_priorities): New static var.
18381         (cmp_priority): New.
18382         (run_gcc): Read priorities and if doing parallel build order
18383         the Makefile by them.
18385 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
18387         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18389 2018-04-30  Richard Biener  <rguenther@suse.de>
18391         * tree-cfg.c (verify_address): Remove base argument, add
18392         flag whether to check TREE_ADDRESSABLE and do that.
18393         (verify_expr): Remove.
18394         (verify_types_in_gimple_reference): Add pieces from verify_expr.
18395         (verify_gimple_assign_single): Likewise.
18396         (verify_gimple_switch): Likewise.
18397         (verify_expr_location_1): Dereference tp once.  Add (disabled)
18398         piece from verify_expr.
18399         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18401 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
18403         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18405 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
18407         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18408         (small_data_pattern): Likewise.
18409         (arc_rewrite_small_data): Likewise.
18410         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18411         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18412         (get_symbol_alignment): New function.
18413         (legitimate_small_data_address_p): Likewise.
18414         (legitimate_scaled_address): Update, call
18415         legitimate_small_data_address_p.
18416         (output_sdata): New static variable.
18417         (arc_print_operand): Update how we handle small data operands.
18418         (arc_print_operand_address): Likewise.
18419         (arc_legitimate_address_p): Update, use
18420         legitimate_small_data_address_p.
18421         (arc_rewrite_small_data_p): Remove.
18422         (arc_rewrite_small_data_1): Likewise.
18423         (arc_rewrite_small_data): Likewise.
18424         (small_data_pattern): Likewise.
18425         (compact_sda_memory_operand): Update to use
18426         legitimate_small_data_address_p and get_symbol_alignment.
18427         (prepare_move_operands): Don't rewite sdata pattern.
18428         (prepare_extend_operands): Remove.
18429         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18430         pattern.
18431         (zero_extendqisi2): Likewise.
18432         (zero_extendhisi2): Likewise.
18433         (extendqihi2): Likewise.
18434         (extendqisi2): Likewise.
18435         (extendhisi2): Likewise.
18436         (addsi3): Likewise.
18437         (subsi3): Likewise.
18438         (andsi3): Likewise.
18439         * config/arc/constraints.md (Usd): Change it to memory constraint.
18441 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
18443         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18444         as source of std instructions.
18445         * config/arc/arc.md (movsi_insn): Update pattern predicate to
18446         allow 6-bit constants as source for store instructions.
18447         (movdi_insn): Update instruction pattern to allow 6-bit constants
18448         as source for store instructions.
18450 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
18452         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18454 2018-04-30  Nathan Sidwell  <nathan@acm.org>
18455             Sandra Loosemore <sandra@codesourcery.com>
18457         * dumpfile.c (dump_open): Allow '-' for stdout.
18458         * doc/invoke.texi (Developer Options): Document dump filename
18459         determination early.  Document stdin/stdout selection.
18461 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
18463         Microblaze Target: PIC data text relative
18465         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18466         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18467         Add declaration.
18468         * config/microblaze/microblaze.h (microblaze_constant_address_p):
18469         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18470         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18471         New addressing mode for data-text relative position indepenedent code.
18472         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18473         'ADDRESS_SYMBOLIC_TXT_REL'.
18474         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18475         (microblaze_legitimate_pic_operand): Exclude function calls from
18476         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18477         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18478         addresses cases.
18479         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18480         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18481         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18482         for 'address + offset'.
18483         (microblaze_expand_prologue): Add new function prologue call for
18484         'r20' assignation.
18485         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18486         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18487         table in case of TARGET_PIC_DATA_TEXT_REL.
18488         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18489         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18490         Add new macros 'UNSPEC_TEXT',
18491         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18492         + exclude function calls from 'UNSPEC_PLT' in case of data text
18493         relative mode.
18494         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18495         new target hook for generating address diff vector tables in case of
18496         flag_pic.
18497         * doc/tm.texi : Regenerate.
18498         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18499         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18500         of addr diff vector generation.
18501         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18502         target hook definition.
18503         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18504         Add default function for generate_pic_addr_diff_vec -> flag_pic.
18505         * doc/invoke.texi (Add new pic option): Add new microblaze pic
18506         option for data text relative.
18508 2018-04-30  Richard Biener  <rguenther@suse.de>
18510         * tree-chrec.h (evolution_function_is_constant_p): Remove
18511         redundant check.
18512         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18514 2018-04-30  Richard Biener  <rguenther@suse.de>
18516         PR bootstrap/85571
18517         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18519 2018-04-30  Richard Biener  <rguenther@suse.de>
18521         PR tree-optimization/28364
18522         PR tree-optimization/85275
18523         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18524         copying first exit test.
18526 2018-04-28  Mark Wielaard  <mark@klomp.org>
18528         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18529         dwarf_version >= 5.
18530         (dwarf_AT): Handle DW_AT_addr_base.
18531         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18533 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
18535         PR target/84431
18536         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18537         (*ashl<dwi>3_doubleword_mask_1): Ditto.
18538         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18539         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18541 2018-04-28  Richard Biener  <rguenther@suse.de>
18543         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18544         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18545         to reflect use.  Only add interesting stmts.
18547 2018-04-27  Martin Jambor  <mjambor@suse.cz>
18549         PR ipa/85549
18550         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18551         the jump function allows for passing through aggregate values.
18553 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
18555         * input.h (in_system_header_at): Convert from macro to inline
18556         function.
18557         (from_macro_expansion_at): Likewise.
18558         (from_macro_definition_at): Likewise.
18560 2018-04-27  Jeff Law  <law@redhat.com>
18562         * config.gcc: Mark tile* targets as deprecated/obsolete.
18564 2018-04-27  Richard Biener  <rguenther@suse.de>
18566         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18567         fix for ILP32.
18569 2018-04-27  Richard Biener  <rguenther@suse.de>
18571         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18573 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
18575         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18576         with Yd constraint. Set "preferred_for_speed" attribute from
18577         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18578         with Yd constraint.
18579         (*movdi_internal): Ditto.
18580         (movti_interunit splitters): Remove
18581         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18582         (movdi_interunit splitters): Ditto.
18583         * config/i386/constraints.md (Ye): Remove.
18584         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18586 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18588         PR target/85512
18589         * config/aarch64/constraints.md (Usg): Limit to 31.
18590         (Usj): Limit to 63.
18592 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
18594         PR tree-optimization/85529
18595         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18596         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18597         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18598         zero extension or masking of the MSB bit.
18599         (optimize_range_tests): Add FIRST_BB argument, pass it through
18600         to optimize_range_tests_var_bound.
18601         (maybe_optimize_range_tests, reassociate_bb): Adjust
18602         optimize_range_tests callers.
18604 2018-04-26  Richard Biener  <rguenther@suse.de>
18605             Jakub Jelinek  <jakub@redhat.com>
18607         * cgraph.h (symbol_table): Just declare debug method here.
18608         * symtab.c (symbol_table::debug): Define.
18610 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
18612         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18614 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
18616         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18617         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18618         (*movdi_internal): Substitute Yi and Yj constraint with x
18619         and Ym and Yn constraint with y constraint.  Update "isa"
18620         attribute and set "preferred_for_speed" attribute from
18621         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18622         (*movsi_internal): Ditto.
18623         (*movdf_internal): Ditto.
18624         (*movsf_internal): Ditto.
18625         (*zero_extendsidi2): Ditto.
18626         * config/i386/sse.md (vec_set<mode>_0): Ditto.
18627         (sse2_loadld): Ditto.
18628         (*vec_extract<ssevecmodelower>_0): Ditto.
18629         (*vec_extractv4si_0_zext_sse4): Ditto.
18630         (vec_concatv2di): Ditto.
18631         (*vec_dup<mode>): Ditto.
18632         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18633         * config/i386/constraints.md (Yi): Remove.
18634         (Yj): Remove.
18635         (Ym): Remove.
18636         (Yn): Remove.
18638 2018-04-26  Nathan Sidwell  <nathan@acm.org>
18640         * dumpfile.c (dump_open): New.
18641         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18642         (dump_finish): Detect stdio/stderr by value not name.
18644 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
18646         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18648 2018-04-26  Tom de Vries  <tom@codesourcery.com>
18650         PR target/84952
18651         * config/nvptx/nvptx.c (verify_neutering_jumps)
18652         (verify_neutering_labels): New function
18653         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18655 2018-04-26  Tom de Vries  <tom@codesourcery.com>
18657         PR target/84025
18658         * config/nvptx/nvptx.c (needs_neutering_p): New function.
18659         (nvptx_single): Use needs_neutering_p to skip over insns that do not
18660         need neutering.
18662 2018-04-26  Richard Biener <rguenther@suse.de>
18663             Tom de Vries  <tom@codesourcery.com>
18665         PR lto/85422
18666         * lto-streamer-out.c (output_function): Fixup loops if required to match
18667         discovery done in the reader.
18669 2018-04-26  Richard Biener  <rguenther@suse.de>
18671         PR tree-optimization/85116
18672         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18673         have a loop exit from the single latch predecessor.  Remove
18674         case of header with just condition.
18675         (ch_base::copy_headers): Exclude infinite loops from any
18676         processing.
18677         (pass_ch::execute): Record exits.
18679 2018-04-26  Richard Biener  <rguenther@suse.de>
18681         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18682         prologue cost vector and pass it to vect_get_load_cost.
18683         (vect_get_peeling_costs_all_drs): Likewise.
18684         (vect_peeling_hash_get_lowest_cost): Likewise.
18685         (vect_enhance_data_refs_alignment): Likewise.
18687 2018-04-26  Richard Biener  <rguenther@suse.de>
18689         PR middle-end/85450
18690         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18691         checking of integer<->pointer conversions.
18692         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18693         sign-/zero-extending pointer types.
18694         (expand_omp_for_static_chunk): Likewise.
18696 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
18697             Jean Lee  <xiaoyur347@gmail.com>
18699         * config/mips/mips.c (mips_asan_shadow_offset): New function.
18700         (TARGET_ASAN_SHADOW_OFFSET): Define.
18701         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18702         true for -fsanitize=address.
18704 2018-04-25  Mark Wielaard  <mark@klomp.org>
18706         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18707         shorter ones.
18709 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
18711         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18712         than "alu", remove explicit "memory" and "imm_disp" attributes.
18713         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18715         PR middle-end/85414
18716         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18717         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18718         gen_lowpart_no_emit.
18720 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
18722         PR target/85473
18723         * config/i386/i386.c (ix86_expand_builtin): Change memory
18724         operand to XI, extend p0 to Pmode.
18725         * config/i386/i386.md: Change unspec volatile and operand
18726         1 mode to XI, change operand 0 mode to P.
18728 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18730         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18731         GET_MODE_MASK before any checking.
18732         (nds32_can_use_bset_p): Likewise.
18733         (nds32_can_use_btgl_p): Likewise.
18735 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18737         * config/nds32/nds32-doubleword.md: New define_split pattern for
18738         illegal register number.
18740 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18742         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18744 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
18746         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18748 2018-04-25  Richard Biener  <rguenther@suse.de>
18750         * lto-streamer.h (LTO_major_version): Bump to 8.
18752 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
18754         * BASE-VER: Set to 9.0.0.
18756 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
18758         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18759         in __abskf2 and __powikf2.
18761 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18763         PR target/85512
18764         * config/aarch64/constraints.md (Usg, Usj): New constraints.
18765         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18766         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18767         Use the above on operand 2.  Reindent.
18768         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18770 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
18772         PR target/85485
18773         * common/config/i386/i386-common.c (ix86_handle_option): Don't
18774         handle OPT_mcet.
18775         * config/i386/i386.opt (mcet): Removed.
18776         * doc/install.texi: Remove -mcet documentation.
18777         * doc/invoke.texi: Likewise.
18779 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
18781         PR target/85485
18782         * doc/install.texi: Remove -mcet from bootstrap-cet.
18784 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18786         PR target/85511
18787         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18788         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18789         if TARGET_64BIT.
18791         PR target/85503
18792         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18793         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18794         containing a CONST_VECTOR.
18796 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
18798         * doc/install.texi: Update newlib dependency for nvptx.
18800 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18802         PR target/85508
18803         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18804         instead of INTVAL when shifting x left.
18806 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
18808         PR tree-optimization/85478
18809         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18810         vect_grouped_store_supported for single element vectors.
18812 2018-04-24  Richard Biener  <rguenther@suse.de>
18814         PR target/85491
18815         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18816         load cost increase to the case of non-constant step.
18818 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
18820         PR target/84828
18821         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18822         destination if any_malformed_asm.
18824 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
18826         PR middle-end/85496
18827         * expr.c (store_field): In the bitfield case, if the value comes from
18828         a function call and is returned in registers by means of a PARALLEL,
18829         do not change the mode of the temporary unless BLKmode and VOIDmode.
18831 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
18833         PR rtl-optimization/85423
18834         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18835         dependencies to debug insns when the previous insn is non-debug.
18837 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
18839         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18840         enums into a single definition.
18841         (fls): Fix predicates and printing.
18842         (seti): Likewise.
18844 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
18846         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18847         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18848         and short u6 immediate.
18849         (check_if_valid_sleep_operand): Remove.
18850         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18852 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18854         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18855         flag_always_save_lp condition.
18856         * config/nds32/nds32.opt (malways-save-lp): New option.
18858 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18860         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18861         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18862         * config/nds32/nds32.h
18863         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18864         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18866 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18868         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18869         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18871 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
18872             Chung-Ju Wu  <jasonwucj@gmail.com>
18874         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18875         Declare.
18876         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18877         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18879 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18881         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18883 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18885         * config/nds32/nds32-protos.h (nds32_data_alignment,
18886         nds32_local_alignment): Declare.
18887         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18888         nds32_local_alignment): New functions.
18889         (TARGET_CONSTANT_ALIGNMENT): Define.
18890         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18892 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18894         * config/nds32/nds32.c
18895         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18896         (TARGET_MODES_TIEABLE_P): Likewise.
18898 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
18900         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18901         level Ofast and Og.
18903 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
18904             Chung-Ju Wu  <jasonwucj@gmail.com>
18906         * config/nds32/constants.md (unspec_volatile_element): Add enum values
18907         for unaligned access.
18908         * config/nds32/nds32-intrinsic.c: Implementation of expanding
18909         unaligned access.
18910         * config/nds32/nds32-intrinsic.md: Likewise.
18911         * config/nds32/nds32_intrinsic.h: Likewise.
18912         * config/nds32/nds32.h (nds32_builtins): Likewise.
18913         * config/nds32/nds32.opt (munaligned-access): New option.
18914         * config/nds32/nds32.c (nds32_asm_file_start): Display
18915         flag_unaligned_access status.
18917 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
18919         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18920         -mno-relax is present.
18921         * config/riscv/linux.h (LINK_SPEC): Ditto.
18923 2018-04-20  Martin Sebor  <msebor@redhat.com>
18925         PR c/85365
18926         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18927         for null pointers.
18928         (gimple_fold_builtin_stxcpy_chk): Same.
18929         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
18931 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
18933         PR target/85456
18934         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
18935         __powikf2 when long double is IEEE 128-bit.
18937 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
18939         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
18940         step to make sure stack always aligned.
18942 2018-04-20  Carl Love  <cel@us.ibm.com>
18944         PR target/83402
18945         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
18946         size check for arg0.
18948 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
18949             Tom de Vries  <tom@codesourcery.com>
18951         PR target/85445
18952         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
18953         Emit insns for calls too.
18954         (nvptx_find_par): Always look for worker-level predecessor insn.
18955         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
18956         calls.
18957         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
18958         (nvptx_process_pars): Propagate frames for calls.
18960 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
18962         PR target/85469
18963         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
18964         Removed.
18965         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
18966         (ix86_handle_option): Don't handle OPT_mibt.
18967         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
18968         __SHSTK__.
18969         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
18970         has_ibt and ibt.
18971         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
18972         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
18973         (ix86_target_macros): Define __CET__ with flag_cf_protection
18974         for -fcf-protection.
18975         * config/i386/i386.c (isa2_opts): Remove -mibt.
18976         * config/i386/i386.h (TARGET_IBT): Removed.
18977         (TARGET_IBT_P): Likewise.
18978         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
18979         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
18980         * config/i386/i386.opt (mcet): Update help message.
18981         (mshstk): Likewise.
18982         (mibt): Removed.
18983         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
18984         -mcet as an alias for -mshstk.
18986 2018-04-20  Richard Biener <rguenther@suse.de>
18988         PR middle-end/85475
18989         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
18990         complexity by forcing a single use of the multiply operand.
18992 2018-04-20  Martin Jambor  <mjambor@suse.cz>
18994         ipa/85449
18995         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
18996         recursion dependency to only apply to non-clones.
18998 2018-04-20  Martin Jambor  <mjambor@suse.cz>
19000         ipa/85447
19001         * ipa-cp.c (create_specialized_node): Check that clones of
19002         self-recursive edges exist during IPA-CP.
19004 2018-04-19  Toon Moene  <toon@moene.org>
19006         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
19007         by -O3.
19009 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
19011         PR tree-optimization/85467
19012         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
19013         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
19014         VECTOR_CST element to type.
19016 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
19018         PR target/85397
19019         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
19020         * config/i386/i386.md (builtin_setjmp_setup): Removed.
19021         (builtin_longjmp): Likewise.
19022         (save_stack_nonlocal): New pattern.
19023         (restore_stack_nonlocal): Likewise.
19025 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
19027         PR target/85404
19028         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19029         Replace ASM_OUTPUT_LABEL with fprintf.
19031 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
19033         PR target/85417
19034         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19035         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
19036         * config/i386/i386-c.c (ix86_target_macros_internal): Also
19037         define __IBT__ and __SHSTK__ for -fcf-protection.
19038         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
19039         TARGET_IBT.
19040         (ix86_trampoline_init): Likewise.
19041         (x86_output_mi_thunk): Likewise.
19042         (ix86_notrack_prefixed_insn_p): Likewise.
19043         (ix86_option_override_internal): Don't disallow -fcf-protection.
19044         * config/i386/i386.md (rdssp<mode>): Also enable for
19045         -fcf-protection.
19046         (incssp<mode>): Likewise.
19047         (nop_endbr): Likewise.
19048         * config/i386/i386.opt (mcet): Change help message to built-in
19049         functions only.
19050         (mibt): Likewise.
19051         (mshstk): Likewise.
19052         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
19053         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
19054         enable CET built-in functions.
19056 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
19058         * common/config/i386/i386-common.c
19059         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
19060         OPTION_MASK_ISA_MOVDIRI_UNSET,
19061         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
19062         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
19063         * config.gcc (movdirintrin.h): New header.
19064         * config/i386/cpuid.h (bit_MOVDIRI,
19065         bit_MOVDIR64B): New bits.
19066         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
19067         and -mmvodir64b.
19068         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
19069         (VOID, PVOID, PCVOID)): New function types.
19070         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
19071         __builtin_ia32_directstoreu_u64,
19072         __builtin_ia32_movdir64b): New builtins.
19073         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
19074         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
19075         and -mmovdiri.
19076         (ix86_valid_target_attribute_inner_p): Ditto.
19077         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
19078         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
19079         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
19080         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
19081         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
19082         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
19083         (movdiri<mode>, movdir64b_<mode>): New.
19084         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
19085         * config/i386/immintrin.h: Include movdirintrin.h.
19086         * config/i386/movdirintrin.h: New file.
19087         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
19089 2018-04-19  Richard Biener  <rguenther@suse.de>
19091         PR middle-end/85455
19092         * cfg.c (clear_bb_flags): When loop state says we have
19093         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
19095 2018-04-19  Richard Biener  <rguenther@suse.de>
19097         PR tree-optimization/84737
19098         * tree-vect-data-refs.c (vect_copy_ref_info): New function
19099         copying restrict info.
19100         (vect_setup_realignment): Use it.
19101         * tree-vectorizer.h (vect_copy_ref_info): Declare.
19102         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
19103         the first DR to all generated stores.
19104         (vectorizable_load): Likewise for loads.
19106 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
19108         PR tree-optimization/85446
19109         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
19110         the integral and pointer types to have the same precision.
19112         * doc/install.texi: Document --disable-cet being the default and
19113         --enable-cet=auto.
19115 2018-04-18  Martin Liska  <mliska@suse.cz>
19117         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
19118         style.
19120 2018-04-18  Martin Liska  <mliska@suse.cz>
19122         Revert
19123         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
19125         PR ipa/83983
19126         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19127         arguments if they are comparable.
19129 2018-04-18  Martin Liska  <mliska@suse.cz>
19131         Revert
19132         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
19134         PR lto/84805
19135         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19136         incomplete types.
19138 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
19140         PR target/85388
19141         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
19142         ENDBR after calling __morestack.
19144 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
19146         PR jit/85384
19147         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
19148         by using gcc_base_ver to generate a gcc_driver_version, and use
19149         it when generating GCC_DRIVER_NAME.
19150         * configure: Regenerate.
19152 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
19154         PR target/81084
19155         * config.gcc: Obsolete powerpc*-*-*spe*.
19157 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
19159         PR debug/84637
19160         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
19161         (stabstr_D): Change type of unum from unsigned int to
19162         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
19163         type.
19165 2018-04-17  Jim Wilson  <jimw@sifive.com>
19167         PR 84856
19168         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
19169         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
19170         Set arg_pointer_offset after using pretend_args_size.
19172 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
19174         PR rtl-optimization/85431
19175         * dse.c (record_store): Ignore zero width stores.
19177         PR sanitizer/85230
19178         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
19179         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
19180         __builtin_stack_restore rather than after it.
19181         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
19182         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
19183         argument instead of virtual_dynamic_stack_rtx.
19185 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19187         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
19188         New prototype.
19189         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19190         Add note to error message to explain internal mapping of overloaded
19191         built-in function name to non-overloaded built-in function name.
19192         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
19193         function.
19195 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
19197         PR target/85424
19198         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
19199         where the inputs overlap with the output.
19201 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
19203         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
19204         (=v, v) alternative and explicit "memory" attribute.
19205         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
19206         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19207         attributes.
19208         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
19209         "sselog1" type instead of "sselog".
19210         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19211         "sselog".  Remove explicit "memory" attribute.
19212         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19213         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19214         attributes.
19215         (vec_extract_hi_v32hi): Merge all alternatives into one, use
19216         "sselog1" type instead of "sselog".  Remove explicit "memory"
19217         attribute.
19218         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19219         use "sselog1" type instead of "sselog".  Remove explicit "memory"
19220         attribute.
19221         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19222         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19223         attributes.
19224         (vec_extract_hi_v64qi): Merge all alternatives into one, use
19225         "sselog1" type instead of "sselog".  Remove explicit "memory"
19226         attribute.
19227         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19228         use "sselog1" type instead of "sselog".  Remove explicit "memory"
19229         attribute.
19231         PR target/85430
19232         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19234         PR middle-end/85414
19235         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19236         on a SUBREG.
19238 2018-04-17  Martin Jambor  <mjambor@suse.cz>
19240         PR ipa/85421
19241         * ipa-cp.c (create_specialized_node): Call
19242         expand_all_artificial_thunks if necessary.
19244 2018-04-17  Martin Liska  <mliska@suse.cz>
19246         PR lto/85405
19247         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19248         in message, remote space in between '_G' and '('.
19250 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
19252         PR target/85281
19253         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19254         avx512f_vmcmp<mode>3<round_saeonly_name>,
19255         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19256         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19257         avx512f_rndscale<mode><round_saeonly_name>,
19258         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19259         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19260         Use %<iptr>2 instead of %2 for -masm=intel.
19261         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19262         avx512f_vcvttss2usi<round_saeonly_name>,
19263         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19264         -masm=intel.
19265         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19266         avx512f_vcvttsd2usi<round_saeonly_name>,
19267         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19268         Use %q1 instead of %1 for -masm=intel.
19269         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19270         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19271         of %3 for -masm=intel.
19272         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19273         -masm=intel.
19274         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19275         -masm=intel.
19276         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19277         -masm=intel.
19278         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19279         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19280         %g1.
19281         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19282         -masm=intel.
19283         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19284         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19285         %g1 and one with %0 and %1.
19286         (avx512er_vmrcp28<mode><round_saeonly_name>,
19287         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19288         %1 for -masm=intel.
19289         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19290         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19291         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19292         of %0 and %{%4%} for -masm=intel.
19293         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19294         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19295         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19296         order of %0 and %{%5%}%{z%} for -masm=intel.
19298 2018-04-17  Jan Hubicka  <jh@suse.cz>
19300         PR lto/85405
19301         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19303 2018-04-17  Martin Liska  <mliska@suse.cz>
19305         PR ipa/85329
19306         * multiple_target.c (create_dispatcher_calls): Set apostrophes
19307         for target_clone error message.  Make default implementation
19308         clone to be a local declaration.
19309         (separate_attrs): Add new argument and check for an empty
19310         string.
19311         (expand_target_clones): Handle it.
19312         (ipa_target_clone): Make redirection just for target_clones
19313         functions.
19315 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
19316             Tom de Vries  <tom@codesourcery.com>
19318         PR middle-end/84955
19319         * omp-expand.c (expand_oacc_for): Add dummy false branch for
19320         tiled basic blocks without omp continue statements.
19322 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
19324         PR target/83660
19325         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19326         vec_extract expression as having side effects to make sure it gets
19327         a cleanup point.
19329 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
19331         PR target/85403
19332         * config/i386/i386.c (get_builtin_code_for_version): Check
19333         error_mark_node.
19335 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
19337         PR target/84331
19338         * config.gcc: Support "skylake".
19339         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19340         PROCESSOR_SKYLAKE.
19341         * config/i386/i386.c (m_SKYLAKE): Define.
19342         (processor_target_table): Add "skylake".
19343         (ix86_option_override_internal): Add "skylake".
19344         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19345         PROCESSOR_CANNONLAKE.
19346         (get_builtin_code_for_version): Fix priority for
19347         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19348         PROCESSOR_SKYLAKE-AVX512.
19349         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19350         (processor_type): Add PROCESSOR_SKYLAKE.
19352 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
19353             Jason Merrill  <jason@redhat.com>
19355         PR c++/85112
19356         * convert.c (convert_to_integer_1): Use direct recursion for
19357         enumeral types and types with a precision less than the number
19358         of bits in their mode.
19360 2018-04-16  Julia Koval  <julia.koval@intel.com>
19362         PR target/84413
19363         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19364         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19366 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
19368         PR target/85293
19369         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19370         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19371         and -mno-direct-move.
19373 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
19375         PR target/83402
19376         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19377         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19378         Ensure negative shifts result in {0}.
19380 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
19382         PR rtl-optimization/79916
19383         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19384         regs (if any) to define how to gnerate SD moves when LRA is in
19385         progress.
19387 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
19389         PR rtl-optimization/85393
19390         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19391         * except.c (expand_dw2_landing_pad_for_region): Make static.
19392         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19393         a label and unconditional jump to old_bb, rather than
19394         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19395         basic block.
19397         PR rtl-optimization/85376
19398         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19399         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19400         instead of a specific value.
19402 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
19403             Bin Cheng  <bin.cheng@arm.com>
19405         PR tree-optimization/82965
19406         PR tree-optimization/83991
19407         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19408         by_profile_only parameter.
19409         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19410         information if the loop was predicted to iterate too many times.
19411         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19413 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
19415         PR lto/71991
19416         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19417         always inline.
19419 2018-04-13  Martin Liska  <mliska@suse.cz>
19420             Jakub Jelinek  <jakub@redhat.com>
19422         PR middle-end/81657
19423         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19424         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19425         * builtins.c (expand_builtin_memory_copy_args): Use
19426         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19427         handle dest_addr == pc_rtx.
19429 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
19431         PR target/85291
19432         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19433         asked to not generate direct moves.
19434         (fix_trunc<mode>si2_stfiwx): Similar.
19435         (fix_trunc<mode>si2_internal): Similar.
19437 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
19439         PR debug/83157
19440         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19441         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19442         lookup if dest in some wider mode is known to be const0_rtx and
19443         if so, record permanent equivalence for it to be ZERO_EXTEND of
19444         the narrower mode destination.
19446 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
19448         * lto-streamer-out.c (output_function): Revert 259346.
19449         * omp-expand.c (expand_oacc_for): Likewise.
19451 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
19453         PR rtl-optimization/85354
19454         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19455         * sel-sched.c (sel_global_init): ... here.
19457 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
19459         PR target/85238
19460         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19461         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19462         mode for PE-COFF targets.
19463         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19464         (i386_pe_asm_lto_end): Likewise.
19465         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19466         (TARGET_ASM_LTO_END): Likewise.
19467         * config/i386/winnt.c (saved_debug_info_level): New static variable.
19468         (i386_pe_asm_lto_start): New function.
19469         (i386_pe_asm_lto_end): Likewise.
19471 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
19472             Richard Biener  <rguenther@suse.de>
19474         PR middle-end/84955
19475         * lto-streamer-out.c (output_function): Fix CFG loop state before
19476         streaming out.
19477         * omp-expand.c (expand_oacc_for): Handle calls to internal
19478         functions like regular functions.
19480 2018-04-12  Richard Biener  <rguenther@suse.de>
19482         PR lto/85371
19483         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19484         for the early LTO debug to properly generate references to it
19485         during DIE emission.  Do not re-use that for the skeleton for
19486         split-dwarf.
19487         (dwarf2out_early_finish): Likewise.
19489 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
19491         PR target/85328
19492         * config/i386/sse.md
19493         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19494         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19495         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19496         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19497         and output is a reg, avoid creating invalid lowpart subreg, but
19498         instead split into a 512-bit move.  Don't split if not AVX512VL,
19499         input is xmm16+ reg and output is a mem.
19500         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19501         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19502         xmm16+ reg and output is a mem.
19504 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19506         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19507         also for flag_dwarf2_cfi_asm.
19509 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
19511         PR rtl-optimization/85342
19512         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19513         a bool scalar var inside of the loop instead.  Don't try to update
19514         recog_data.operand after failed apply_change_group.
19516 2018-04-12  Tom de Vries  <tom@codesourcery.com>
19518         PR target/85296
19519         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19520         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
19521         array with flexible array member as array without given dimension.
19522         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19523         argument for undefined param to true.
19525 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
19527         PR target/85321
19528         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19529         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19530         from PowerPC section.
19531         * config/rs6000/sysv4.opt (mcall-): Improve help text.
19532         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19533         help text that is too long.
19534         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19535         help text that is too long.
19536         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19537         help text that is too long.
19539 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
19541         * config/alpha/alpha.md (stack_probe_internal): Rename
19542         from "probe_stack".  Update all callers.
19544 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
19546         PR rtl-optimization/84566
19547         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19548         sched_macro_fuse_insns.
19550 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
19552         PR target/84301
19553         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19554         (compute_block_dependences): ... from here.
19556 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
19558         PR tree-optimization/85331
19559         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19560         from int to HOST_WIDE_INT.
19562 2018-04-11  Martin Jambor  <mjambor@suse.cz>
19564         PR ipa/84149
19565         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19566         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19567         not the same as the source val.
19568         (cgraph_edge_brings_value_p): New parameter.
19569         (gather_edges_for_value): Pass destination value to
19570         cgraph_edge_brings_value_p.
19571         (perhaps_add_new_callers): Likewise.
19572         (get_info_about_necessary_edges): Likewise and exclude values brought
19573         only by self-recursive edges.
19574         (create_specialized_node): Redirect only clones of self-calling edges.
19575         (+self_recursive_pass_through_p): New function.
19576         (find_more_scalar_values_for_callers_subset): Use it.
19577         (find_aggregate_values_for_callers_subset): Likewise.
19578         (known_aggs_to_agg_replacement_list): Removed.
19579         (decide_whether_version_node): Re-calculate known constants for all
19580         remaining context clones.
19582 2018-04-11  Richard Biener  <rguenther@suse.de>
19584         PR lto/85339
19585         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19586         from early DWARF output.
19587         (dwarf2out_early_finish): Output line info unconditionally into
19588         early DWARF and add reference to it.
19590 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
19592         PR target/85281
19593         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19594         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19595         other than V2DFmode using iptr mode attribute.
19596         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19598 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
19600         PR rtl-optimization/84659
19601         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19603 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
19605         PR debug/85302
19606         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19607         SIZEP is NULL.
19608         (output_loc_list): Pass address of a dummy size variable even in the
19609         locview handling loop.
19610         (index_location_lists): Add comment on why skip_loc_list_entry can't
19611         call size_of_locs.
19613 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19615         PR target/85261
19616         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19617         into register.
19619 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
19621         PR target/85321
19622         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19623         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19624         and -mstring-compare-inline-limit.
19626 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19628         PR target/85287
19629         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19630         for stack clash protection in a register whenever we need it to be in
19631         a register.
19633 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19635         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19636         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19638 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
19640         PR target/85321
19641         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19642         the help text.
19643         (mlong-double-): Ditto.
19644         * config/rs6000/sysv4.opt (msdata=): Ditto.
19645         (mtls-size=): Ditto.
19647 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19649         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19650         erroneous entries for
19651         "vector int vec_ldl (int, long int *)", and
19652         "vector unsigned int vec_ldl (int, unsigned long int *)".
19653         Add comments and entries for
19654         "vector bool char vec_ldl (int, bool char *)",
19655         "vector bool short vec_ldl (int, bool short *)",
19656         "vector bool int vec_ldl (int, bool int *)",
19657         "vector bool long long vec_ldl (int, bool long long *)",
19658         "vector pixel vec_ldl (int, pixel *)",
19659         "vector long long vec_ldl (int, long long *)",
19660         "vector unsigned long long vec_ldl (int, unsigned long long *)".
19661         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19662         type tree bool_long_long_type_node and correct definition of
19663         bool_V2DI_type_node to make reference to this new type tree.
19664         (rs6000_mangle_type): Replace erroneous reference to
19665         bool_long_type_node with bool_long_long_type_node.
19666         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19667         comments to emphasize sign distinctions for char and int types and
19668         replace RS6000_BTI_bool_long constant with
19669         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
19670         use of RS6000_BTI_pixel.
19671         (bool_long_type_node): Remove this macro definition.
19672         (bool_long_long_type_node): New macro definition
19674 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
19676         PR rtl-optimization/85300
19677         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19678         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19679         simplify_unary_operation fails.
19681 2018-04-10  Martin Liska  <mliska@suse.cz>
19683         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19684         cgraph_edge and ipa_ref.
19686 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
19688         PR target/85177
19689         PR target/85255
19690         * config/i386/sse.md
19691         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19692         computation of the VEC_MERGE selector from mask.
19693         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19694         Fix decoding of the VEC_MERGE selector into mask.
19696 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
19698         PR tree-optimization/85286
19699         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19701 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
19703         * final.c (final_1): Set insn_last_address as well as
19704         insn_current_address.
19706 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19708         PR target/85173
19709         * explow.c (emit_stack_probe): Call validize_mem on memory location
19710         before passing it to gen_probe_stack.  Create address operand and
19711         legitimize it for the probe_stack_address case.
19713 2018-04-09  Jan Hubicka  <jh@suse.cz>
19715         PR lto/85078
19716         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19717         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19718         * tree.c (free_lang_data_in_type): Fix handling of binfos;
19719         walk basetypes.
19720         (free_lang_data): Rebuild type inheritance graph.
19722 2018-04-09  Martin Sebor  <msebor@redhat.com>
19724         * invoke.texi (-finline-small-functions): Mention other optimization
19725         options.
19726         (-findirect-inlining, -fpartial-inlining): Same.
19727         (-finline-functions-called-once): Same.
19728         (-freorder-blocks-and-partition): Same.
19730 2018-04-09  Jan Hubicka  <jh@suse.cz>
19732         PR rtl/84058
19733         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19734         jumps; choose last target that matches the criteria (i.e.
19735         no partition changes for non-crossing jumps).
19736         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19737         support for redirecting crossing jumps to non-crossing.
19739 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
19741         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19742         also for naked functions.
19744 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
19746         * config/arc/arc.md (add_shift): New pattern.
19747         (add_shift2): Likewise.
19748         (sub_shift): Likewise.
19749         (sub_shift_cmp0_noout): Likewise.
19750         (compare_si_ashiftsi): Likewise.
19751         (xbfu_cmp0_noout): New combine pattern.
19752         (xbfu_cmp0"): Likewise.
19753         (movsi_set_cc_insn): Place the predicable variant first.
19754         (commutative_binary_cmp0_noout): Remove clobber.
19755         (commutative_binary_cmp0): New pattern.
19756         (noncommutative_binary_cmp0): Likewise.
19757         (noncommutative_binary_cmp0_noout): Likewise.
19758         (noncommutative_binary_comparison_result_used): Removed.
19759         (rsub_cmp0): New pattern.
19760         (rsub_cmp0_noout): Likewise.
19761         (extzvsi): Changed, keep only meaningful variants.
19762         (SQH, SEZ): New iterators.
19763         (SQH_postfix): New mode attribute.
19764         (SEZ_prefix): New code attribute.
19765         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19766         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19767         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19768         of numerical value.
19769         (noncommutative_operator): Check the availability of barrel
19770         shifter option.
19772 2018-04-09  Richard Biener  <rguenther@suse.de>
19774         PR tree-optimization/85284
19775         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19776         Only use the niter constraining form of simple_iv when the exit
19777         is always executed.
19779 2018-04-09  Tom de Vries  <tom@codesourcery.com>
19781         PR target/84041
19782         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19783         (define_expand "*memory_barrier"): New define_expand.
19784         (define_insn "memory_barrier"): New insn.
19786 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19788         PR rtl-optimization/80463
19789         PR rtl-optimization/83972
19790         PR rtl-optimization/83480
19792         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19793         correct producer for the insn.
19794         (tidy_control_flow): Fixup seqnos in case of debug insns.
19796 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19798         PR rtl-optimization/83913
19800         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19801         different sched-times when merging exprs.
19803 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19805         PR rtl-optimization/83962
19807         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19808         tidy_fallthru_edge and tidy_control_flow.
19810 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
19812         PR rtl-optimization/83530
19814         * sel-sched.c (force_next_insn): New global variable.
19815         (remove_insn_for_debug): When force_next_insn is true, also leave only
19816         next insn in the ready list.
19817         (sel_sched_region): When the region wasn't scheduled, make another pass
19818         over it with force_next_insn set to 1.
19820 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
19822         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19823         into tm_file.
19824         * config/nds32/constants.md (unspec_volatile_element): Add enum values
19825         for interrupt control.
19826         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19827         functions for interrupt control.
19828         * config/nds32/nds32-intrinsic.md: Likewise.
19829         * config/nds32/nds32_intrinsic.h: Likewise.
19830         * config/nds32/nds32.h (nds32_builtins): Likewise.
19832 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
19834         * config/nds32/nds32.c (nds32_init_machine_status,
19835         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19836         strict_aligned_p field.
19837         (nds32_expand_to_rtl_hook): New function.
19838         (TARGET_EXPAND_TO_RTL_HOOK): Define.
19839         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19841 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19842             Chung-Ju Wu  <jasonwucj@gmail.com>
19844         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19845         * config/nds32/nds32-n7.md: New file.
19846         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19847         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19848         pipeline.
19849         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19850         * config/nds32/nds32.md (pipeline_model): Add n7.
19851         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19852         * config/nds32/pipelines.md: Include n7 settings.
19854 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19855             Chung-Ju Wu  <jasonwucj@gmail.com>
19857         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19858         * config/nds32/nds32-e8.md: New file.
19859         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19860         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19861         pipeline.
19862         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19863         * config/nds32/nds32.md (pipeline_model): Add e8.
19864         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19865         * config/nds32/pipelines.md: Include e8 settings.
19867 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19868             Chung-Ju Wu  <jasonwucj@gmail.com>
19870         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19871         * config/nds32/nds32-n8.md: New file.
19872         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19873         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19874         pipeline.
19875         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19876         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19877         * config/nds32/nds32.md (pipeline_model): Add n8.
19878         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19879         * config/nds32/pipelines.md: Include n8 settings.
19881 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
19882             Chung-Ju Wu  <jasonwucj@gmail.com>
19884         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19885         * config/nds32/nds32-n9-2r1w.md: New file.
19886         * config/nds32/nds32-n9-3r2w.md: New file.
19887         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19888         nds32_register_ports): New or modify for cpu n9.
19889         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19890         pipeline.
19891         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19892         * config/nds32/nds32-utils.c: New file.
19893         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19894         TARGET_MUL_SLOW): Define.
19895         * config/nds32/nds32.md (pipeline_model): New attribute.
19896         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19897         New options that support cpu n9.
19898         * config/nds32/pipelines.md: Include n9 settings.
19899         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19901 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
19903         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19904         information if necessary.
19905         (output_cond_branch_compare_zero): Likewise.
19906         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19907         (nds32_target_alignment): Refine for alignment.
19908         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19909         (FUNCTION_BOUNDARY): Modify.
19910         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19911         align case.
19912         * config/nds32/nds32.opt (malways-align, malign-functions): New.
19914 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
19916         * config/nds32/constants.md (unspec_volatile_element): Add values for
19917         TLB operation and data prefetch.
19918         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19919         functions for TLB operation and data prefetch.
19920         * config/nds32/nds32-intrinsic.md: Likewise.
19921         * config/nds32/nds32_intrinsic.h: Likewise.
19922         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19923         (nds32_print_operand): Likewise.
19924         * config/nds32/nds32.h (nds32_builtins): Likewise.
19926 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
19927         Andrew Pinski <pinsika@gcc.gnu.org>
19929         PR middle-end/82976
19930         * match.pd: Use constant_boolean_node of correct type instead of
19931         boolean_true_node or boolean_false_node for simplifying
19932         pointer comparisons to zero.
19934 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
19936         PR tree-optimization/80021
19937         * tree.c (verify_type_variant): Make error call in verify_variant_match
19938         translatable and remove final full stop.
19940 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19942         * config/nds32/constants.md (unspec_volatile_element): Add
19943         UNSPEC_VOLATILE_EH_RETURN.
19944         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
19945         nds32_output_stack_pop): Support dwarf exception handling process.
19946         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
19947         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
19948         exception handling process.
19949         (nds32_compute_stack_frame): Likewise.
19950         (nds32_return_addr_rtx): Likewise.
19951         (nds32_initial_elimination_offset): Likewise.
19952         (nds32_expand_prologue): Likewise.
19953         (nds32_expand_epilogue): Likewise.
19954         (nds32_dynamic_chain_address): New function.
19955         * config/nds32/nds32.h (machine_function): Add fields for dwarf
19956         exception handling.
19957         (DYNAMIC_CHAIN_ADDRESS): Define.
19958         (EH_RETURN_DATA_REGNO): Define.
19959         (EH_RETURN_STACKADJ_RTX): Define.
19960         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
19961         patterns for dwarf exception handling.
19963 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
19965         * config/nds32/nds32.h: Clean up obsolete macros.
19967 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19969         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19970         Add enum values for particular instructions.
19971         * config/nds32/nds32-intrinsic.c: Implementation of expanding
19972         particular intrinsic functions.
19973         * config/nds32/nds32-intrinsic.md: Likewise.
19974         * config/nds32/nds32_intrinsic.h: Likewise.
19975         * config/nds32/nds32.h (nds32_builtins): Likewise.
19976         * config/nds32/nds32.md (type): Add pbsad and pbsada.
19977         (btst, ave): New patterns for particular instructions.
19979 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
19981         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19982         Add enum values for atomic load/store and memory sync.
19983         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
19984         and memory sync.
19985         * config/nds32/nds32-intrinsic.md: Likewise.
19986         * config/nds32/nds32_intrinsic.h: Likewise.
19987         * config/nds32/nds32.h (nds32_builtins): Likewise.
19989 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
19991         PR tree-optimization/85257
19992         * fold-const.c (native_encode_vector): If not all elts could fit
19993         and off is -1, return 0 rather than offset.
19994         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
19995         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
19996         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
19997         adjust buffer in native_interpret_expr call.
19999 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
20001         * config/nds32/constants.md (unspec_volatile_element): Add cache
20002         control enum values.
20003         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
20004         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
20005         * config/nds32/nds32.c (nds32_cctl_names): New.
20006         (nds32_print_operand): Handle cache control register names.
20007         * config/nds32/nds32.h (nds32_builtins): New enum values.
20008         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
20009         macros.
20010         * config/nds32/nds32.md (type): Add mmu.
20011         * config/nds32/pipelines.md (simple_insn): Add mmu.
20013 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
20015         * config/nds32/nds32.md (type): Remove call.
20016         * config/nds32/pipelines.md (simple_insn): Likewise.
20018 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
20020         * config/nds32/constants.md (unspec_volatile_element): Add
20021         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
20022         UNSPEC_VOLATILE_FMFCFG.
20023         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
20024         description for fmfcfg and fmfcsr.
20025         (bdesc_1arg): Add fmtcsr.
20026         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
20027         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
20028         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
20029         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
20030         unspec_fmfcfg): New patterns.
20031         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
20032         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
20033         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
20034         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
20035         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
20036         __nds32__fmfcfg): Define.
20038 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
20040         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
20041         intrinsic register names.
20042         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
20043         intrinsic register enum values and macros.
20045 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
20047         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
20048         for load/store addressing form.
20049         (nds32_print_operand_address): Likewise.
20051 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
20053         PR target/85196
20054         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
20055         based on LABEL_REF.  Remove useless assertion.
20056         (pic_address_needs_scratch): Fix formatting.
20057         (sparc_legitimize_pic_address): Minor tweaks.
20058         (sparc_delegitimize_address): Adjust assertion accordingly.
20059         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
20060         into symbolic_operand.
20061         (movsi_high_pic_label_ref): Likewise.
20062         (movsi_lo_sum_pic_label_ref): Likewise.
20063         (movdi_pic_label_ref): Likewise.
20064         (movdi_high_pic_label_ref): Likewise.
20065         (movdi_lo_sum_pic_label_ref): Likewise.
20067 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
20069         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
20070         custom LIB_SPEC setup.
20072 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
20073             Kito Cheng  <kito.cheng@gmail.com>
20075         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
20076         * config/riscv/freebsd.h: New.
20078 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
20080         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
20081         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
20082         file.
20084 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
20085             Kito Cheng  <kito.cheng@gmail.com>
20087         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
20088         nds32_output_call, nds32_symbol_binds_local_p): New functions.
20089         * config/nds32/nds32-protos.h (nds32_output_call,
20090         nds32_output_return): Declare.
20091         * config/nds32/nds32.md: Refine all the call and return patterns.
20093 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
20095         PR debug/85252
20096         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
20097         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
20099         PR rtl-optimization/84872
20100         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
20101         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
20102         EDGE_CROSSING edge.
20104 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
20106         * expr.c (copy_blkmode_to_reg): Revert 254862.
20107         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
20109 2018-04-06  Richard Biener  <rguenther@suse.de>
20111         PR middle-end/85244
20112         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
20113         after seeing a component reference with an adjacent field.  Treat
20114         refs to arrays at struct end of external decls similar to
20115         refs to unconstrained commons.
20117 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
20119         PR sanitizer/85213
20120         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
20121         look through SAVE_EXPRs with non-side-effects argument.  Adjust
20122         recursive calls.
20123         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
20124         save_p here.
20126 2018-04-06  Richard Biener  <rguenther@suse.de>
20128         PR middle-end/85180
20129         * alias.c (find_base_term): New wrapper around find_base_term
20130         unwinding CSELIB_VAL_PTR changes.
20131         (find_base_term): Do not restore CSELIB_VAL_PTR during the
20132         recursion.
20134 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20136         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
20137         instructions.
20138         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
20139         constant definitions.
20140         ("nop"): lr 0,0 -> nopr r0
20141         ("nop_lr0", "nop_lr1"): New insn definitions.
20143 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
20145         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
20146         NDS32_V3PUSH_AVAILABLE_P macro.
20148 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
20149             Chung-Ju Wu  <jasonwucj@gmail.com>
20151         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
20152         (nds32*-*-*): Add float and fpu_config into supported_defaults.
20153         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
20154         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
20155         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
20156         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
20157         * config/nds32/constraints.md: New constraints and checking for hard
20158         float configuration.
20159         * config/nds32/iterators.md: New mode iterator and attribute for hard
20160         float configuration.
20161         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
20162         patterns.
20163         * config/nds32/nds32-fpu.md: New file.
20164         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
20165         deal with hard float code generation.
20166         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
20167         ARCH_V3S.
20168         (abi_type, float_reg_number): New enum type.
20169         * config/nds32/nds32-predicates.c: New predicates for hard float.
20170         * config/nds32/nds32-protos.h: Declare functions for hard float.
20171         * config/nds32/nds32.c: Implementation for hard float configuration.
20172         * config/nds32/nds32.h: Definitions for hard float configuration.
20173         * config/nds32/nds32.md: Include hard float machine description and
20174         modify patterns for hard float configuration.
20175         * config/nds32/nds32.opt: New options for hard float configuration.
20176         * config/nds32/predicates.md: New predicates for hard float
20177         configuration.
20179 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
20181         * common/config/nds32/nds32-common.c
20182         (nds32_option_optimization_table): Enable -mreleax-hint by default.
20184 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
20186         PR middle-end/85195
20187         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
20188         CONSTRUCTOR_ELT (ctor, ...)->value.
20190 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
20192         PR target/85193
20193         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
20195 2018-04-05  Tom de Vries  <tom@codesourcery.com>
20197         PR target/85204
20198         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
20199         cond jump.
20201 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
20202             Kito Cheng  <kito.cheng@gmail.com>
20204         * config/nds32/constraints.md (U33): Fine-tune checking condition.
20205         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
20206         * config/nds32/nds32.h (nds32_16bit_address_type): Add
20207         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20209 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
20210             Kito Cheng  <kito.cheng@gmail.com>
20212         * config/nds32/constraints.md (Ufe): New memory constraint.
20213         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20214         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20215         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20216         operands.
20217         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20218         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20220 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20222         * config/nds32/nds32.md: Use optimize_size in the condition for
20223         alu-shift instructions.
20225 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20227         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20229 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20231         * config/nds32/nds32.md (negsi2): Refine pattern.
20233 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
20234             Chung-Ju Wu  <jasonwucj@gmail.com>
20236         * config/nds32/iterators.md (shift_rotate): New code iterator.
20237         (shift): New code attribute.
20238         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20239         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20240         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20241         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20242         bit-wise operations.
20243         (andsi3, *andsi3): Ditto.
20244         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20245         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20246         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20247         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20248         nds32_ior_operand, nds32_xor_operand): New predicates.
20250 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20252         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20253         (addsi3, subsi3): ... this.
20255 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20257         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20259 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20261         * config/nds32/nds32.md: Adjust indention.
20263 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
20265         * config/nds32/nds32.md (feature): New attribute.
20267 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
20269         * config/nds32/nds32.md (subtype): New attribute.
20271 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20273         PR target/85203
20274         * config/arm/arm-builtins.c (arm_expand_builtin): Change
20275         expansion to perform a bitwise AND of the argument followed by a
20276         boolean negation of the result.
20278 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
20280         PR rtl-optimization/84878
20281         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20282         the basic block.  Assert the use reference is not artificial and that
20283         it has an associated insn.
20285 2018-04-04  Michael Matz  <matz@suse.de>
20287         * builtins.c (compute_objsize): Pass correct operand
20288         to array_at_struct_end_p.
20290 2018-04-04  Richard Biener  <rguenther@suse.de>
20292         PR lto/85176
20293         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20294         from contexts for DINFO_LEVEL_TERSE and below.
20296 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
20298         * config/nds32/nds32-doubleword.md (move_<mode>): Require
20299         resiter_operand condition.
20300         * config/nds32/nds32.md (*move<mode>): Ditto.
20302 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
20303             Monk Chiang  <sh.chiang04@gmail.com>
20305         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20307 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
20309         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20311 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
20312             Kito Cheng  <kito.cheng@gmail.com>
20314         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20315         nds32_cond_code_str, output_cond_branch,
20316         output_cond_branch_compare_zero, nds32_expand_cbranch,
20317         nds32_expand_cstore, nds32_expand_movcc,
20318         nds32_output_cbranchsi4_equality_zero,
20319         nds32_output_cbranchsi4_equality_reg,
20320         nds32_output_cbranchsi4_equality_reg_or_const_int,
20321         nds32_output_cbranchsi4_greater_less_zero: New functions.
20322         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20323         nds32_expand_cstore, nds32_expand_movcc,
20324         nds32_output_cbranchsi4_equality_zero,
20325         nds32_output_cbranchsi4_equality_reg,
20326         nds32_output_cbranchsi4_equality_reg_or_const_int,
20327         nds32_output_cbranchsi4_greater_less_zero): Declare.
20328         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20329         nds32_rimm11s_operand): New predicates.
20330         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20331         * config/nds32/nds32.md: Rewrite all the branch and conditional move
20332         patterns.
20334 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
20336         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20337         * config/nds32/nds32.md: Ditto.
20338         * config/nds32/pipelines.md: Ditto.
20340 2018-04-04  Richard Biener  <rguenther@suse.de>
20342         PR tree-optimization/85168
20343         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20344         propagating abnormals.
20346 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
20348         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20350 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
20351             Kito Cheng  <kito.cheng@gmail.com>
20353         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20354         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20355         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20356         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20357         * config/nds32/nds32.md (sibcall_internal): New.
20358         (sibcall_register): Remove.
20359         (sibcall_immediate): Remove.
20360         (sibcall_value_internal): New.
20361         (sibcall_value_register): Remove.
20362         (sibcall_value_immediate): Remove.
20363         * config/nds32/predicates.md (nds32_general_register_operand): New.
20364         (nds32_call_address_operand): New.
20366 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
20368         PR rtl-optimization/85167
20369         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20370         bb_defs if *split_p, instead preinitialize it to NULL.
20372         PR tree-optimization/85156
20373         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20374         evaluating the argument multiple times.
20376 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
20378         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20379         than vector.
20380         (_mm_cvtpd_ps): Likewise.
20381         (_mm_cvttpd_epi32): Likewise.
20382         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20383         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20384         vector, pixel, and bool following altivec.h include.
20386 2018-04-03  Martin Sebor  <msebor@redhat.com>
20388         * doc/extend.texi (Common Function Attributes): Clarify.
20389         (const attribute): Likewise.
20390         (pure attribute): Likewise.
20392 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
20394         PR target/85169
20395         * config/i386/i386.c (ix86_expand_vector_set): Use
20396         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
20398 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
20400         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20401         instructions when changing rounding bits to preserve precision bits
20402         in the x87 control word.
20404 2018-04-03  Martin Liska  <mliska@suse.cz>
20406         PR tree-optimization/82491
20407         * rtl.h (strip_offset_and_add): Replace += suboffset with
20408         poly_uint64 () + suboffset.
20410 2018-03-29  Martin Liska  <mliska@suse.cz>
20411             Martin Jambor  <mjambor@suse.cz>
20413         PR ipa/84947
20414         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20415         param_type is not an integral or pointer type.
20417 2018-04-03  Richard Biener  <rguenther@suse.de>
20419         * sese.h (recompute_all_dominators): Remove.
20421 2018-04-02  Martin Sebor  <msebor@redhat.com>
20423         * doc/invoke.texi (-Wrestrict): Fix typos.
20425 2018-04-02  Jim Wilson  <jimw@sifive.com>
20427         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20428         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20429         (<optab>di3, <optab>si3_extend): Likewise.
20430         (<optab>si3_mask, <optab>si3_mask_1): New.
20431         (<optab>di3_mask, <optab>di3_mask_1): New.
20432         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20433         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20434         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20436 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
20438         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20439         example.
20441 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
20443         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20444         (nds32_canonicalize_comparison): New function.
20446 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
20447             Kito Cheng  <kito.cheng@gmail.com>
20448             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
20450         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20451         * config/nds32/constants.md (unspec_volatile_element): Add
20452         UNSPEC_VOLATILE_RELAX_GROUP.
20453         * config/nds32/nds32-relax-opt.c: New file.
20454         * config/nds32/nds32-predicates.c
20455         (nds32_symbol_load_store_p): New function.
20456         * config/nds32/nds32-protos.h
20457         (nds32_symbol_load_store_p): Declare function.
20458         (make_pass_nds32_relax_opt): Declare new rtl pass function.
20459         * config/nds32/nds32.c
20460         (nds32_register_pass): New function to register pass.
20461         (nds32_register_passes): New function to register passes.
20462         * config/nds32/nds32.md (relax_group): New pattern.
20463         * config/nds32/nds32.opt (mrelax-hint): New option.
20464         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20466 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
20468         * config/nds32/t-nds32: Modify files dependency.
20470 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
20472         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20473         (PROFILE_HOOK): Define its implementation.
20475 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
20477         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20478         type and 32-bit size.
20480 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
20482         PR middle-end/85090
20483         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20484         (V_128_256): New mode iterator.
20485         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20486         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20487         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20488         of V.
20489         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20490         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20492 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
20494         PR target/83315
20495         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20496         NaN inputs correctly.
20498 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
20500         PR target/80546
20501         * config/rs6000/vsx.md (??r): New mode attribute.
20502         (*vsx_mov<mode>_64bit): Use it.
20503         (*vsx_mov<mode>_32bit): Likewise.
20505 2018-03-30  Martin Sebor  <msebor@redhat.com>
20507         PR tree-optimization/84818
20508         * builtins.c (check_access): Use warning_n.
20510 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20512         PR target/83822
20513         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20514         condition.
20515         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20516         condition.
20518 2018-03-30  Julia Koval  <julia.koval@intel.com>
20520         PR target/84413
20521         * x86-tune.def (movx, partial_reg_dependency): Enable for
20522         m_SKYLAKE_AVX512.
20524 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
20526         PR inline-asm/84985
20527         * lra-constraints.c (process_alt_operands): Move setting
20528         this_alternative_matches below.
20530 2018-03-29  Martin Liska  <mliska@suse.cz>
20532         PR lto/84995.
20533         * doc/invoke.texi: Document how LTO works with debug info.
20534         Describe auto-load support of binutils.  Mention 'x86-64'
20535         as valid option value of -march option.
20537 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
20539         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20541         PR c/85094
20542         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20543         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20544         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20545         checking.
20547 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
20549         PR target/84912
20550         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20551         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20552         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20553         for RS6000_BTM_POWERPC64.
20554         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20555         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20556         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20557         definition.
20558         (DIVDE): Use it.
20559         (DIVDEU): Likewise.
20561 2018-03-28  Carl Love  <cel@us.ibm.com>
20563         Revert
20564         2017-09-27  Carl Love  <cel@us.ibm.com>
20566         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20567         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20568         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20569         fctiw instruction.
20571 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20573         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20574         instead of __vector bool.
20575         (_mm_max_pu8): Likewise.
20576         (_mm_min_pi16): Likewise.
20578 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
20580         PR target/84912
20581         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20582         (DIVWEUO): Likewise.
20583         (DIVDEO): Likewise.
20584         (DIVDEUO): Likewise.
20585         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20586         DIVWEUO and DIVDEUO.
20587         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20588         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20589         (div_extend): Likewise.
20590         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20591         builtin function.
20592         (__builtin_divweuo): Likewise.
20593         (__builtin_divdeo): Likewise.
20594         (__builtin_divdeuo): Likewise.
20596 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
20598         PR target/85095
20599         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20600         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20602         PR tree-optimization/82004
20603         * gimple-match-head.c (optimize_pow_to_exp): New function.
20604         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20605         Don't fold to exp if optimize_pow_to_exp is false.
20607 2018-03-28  Martin Liska  <mliska@suse.cz>
20609         PR other/84819
20610         * calls.c (initialize_argument_information): Fix trailing space.
20611         * common.opt: Fix typo and provide better explanation for
20612         -fsanitize-coverage option.
20613         * config/i386/i386.opt: Fix typo.
20615 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
20616             Martin Liska  <mliska@suse.cz>
20618         PR sanitizer/85081
20619         * gimplify.c (asan_poison_variable): Don't do the check for
20620         gimplify_omp_ctxp here.
20621         (gimplify_decl_expr): Do it here.
20622         (gimplify_target_expr): Likewise.
20624 2018-03-28  Martin Liska  <mliska@suse.cz>
20626         PR target/84988
20627         * config/i386/i386.c (ix86_function_arg_advance): Do not call
20628         chkp_type_bounds_count if MPX is not enabled.
20630 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20632         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20634 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
20636         PR target/84914
20637         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20638         function to create the function decl for complex long double
20639         multiply and divide for -mabi=ieeelongdouble.
20640         (init_float128_ieee): Call it.
20642 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
20644         PR target/85044
20645         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20646         -fcf-protection=branch -mibt.
20647         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20649 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20651         PR target/81863
20652         * config/arm/arm.c (arm_valid_symbolic_address): Handle
20653         arm_word_relocations.
20655 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
20657         PR target/85056
20658         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20659         extern array declarations.
20661 2018-03-27  Richard Biener  <rguenther@suse.de>
20663         PR middle-end/84067
20664         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20665         explicit single_use checks.
20667 2018-03-27  Richard Biener  <rguenther@suse.de>
20669         PR tree-optimization/85082
20670         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20671         Valueize the VUSE.
20673 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
20675         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20676         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20677         Turn on fasynchronous-unwind-tables and funwind-tables.
20679 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
20681         PR target/85073
20682         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20683         (*bmi_blsr_<mode>_ccz): Ditto.
20685 2018-03-26  Tom de Vries  <tom@codesourcery.com>
20687         PR tree-optimization/85063
20688         * omp-general.c (offloading_function_p): New function.  Factor out
20689         of ...
20690         * omp-offload.c (pass_omp_target_link::gate): ... here.
20691         * omp-general.h (offloading_function_p): Declare.
20692         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20693         with attribute omp declare target for offloading functions.
20695 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
20697         PR tree-optimization/84005
20698         * tree-data-ref.h (get_base_for_alignment): Declare.
20699         * tree-data-ref.c (get_base_for_alignment_1): New function.
20700         (get_base_for_alignment): Likewise.
20701         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20702         get_base_for_alignment to find a suitable base object, instead
20703         of always using drb->base_address.
20705 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
20707         PR inline-asm/85022
20708         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20709         known size by default.
20711 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
20713         PR inline-asm/85030
20714         * lra-constraints.c (process_alt_operands): Don't match BLKmode
20715         and non BLKmode operands.
20717 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20719         PR target/85026
20720         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20721         Clean up attributes.
20723 2018-03-23  Richard Biener  <rguenther@suse.de>
20725         PR debug/85020
20726         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20727         we are going to emit early debug for LTO.
20729 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
20731         PR inline-asm/85034
20732         * function.c (match_asm_constraints_1): Don't optimize if input
20733         doesn't satisfy general_operand predicate for output's mode.
20735         PR inline-asm/85022
20736         * alias.c (write_dependence_p): Don't require for x_canonicalized
20737         non-VOIDmode if x has VOIDmode.
20739         PR sanitizer/85029
20740         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20741         just don't try to optimize it rather than assert it never happens.
20743 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20745         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20746         macro expansions for definition of ST_INTERNAL_<mode> and
20747         LD_INTERNAL_<mode> builtins.
20748         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20749         Remove prototype.
20750         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20751         function.
20752         (altivec_expand_st_builtin): Likewise.
20753         (altivec_expand_builtin): Remove calls to deleted functions.
20754         (rs6000_address_for_altivec): Delete this function.
20755         * config/rs6000/vector.md: Remove expands for
20756         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20758 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
20760         PR target/84826
20761         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20762         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20763         re-computing once computed.
20764         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20765         (arm_init_machine_status): Initialize
20766         machine->static_chain_stack_bytes.
20768 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20770         PR target/84760
20771         * doc/extend.texi: Add four new prototypes for vec_ld.
20772         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20773         definitions for more logical presentation.
20774         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20775         entries for V1TI variants of __builtin_altivec_ld builtin.
20776         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20777         handling of V1TI variant of LVX icode pattern.
20778         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20779         (rs6000_gimple_fold_builtin): Likewise.
20780         (altivec_init_builtins): Add code to define
20781         __builtin_altivec_lvx_v1ti function.
20783 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
20785         PR inline-asm/84941
20786         * function.c (match_asm_constraints_1): Don't do the optimization
20787         if input isn't a REG, SUBREG, MEM or constant.
20789 2018-03-22  Tom de Vries  <tom@codesourcery.com>
20791         PR tree-optimization/84956
20792         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20793         bb_has_abnormal_pred.
20795 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
20797         PR sanitizer/85018
20798         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20799         DECL_INITIAL (decl) to decl at the end.
20800         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20801         adjust the comment.
20803 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
20805         * doc/extend.texi (__builtin_tgmath): Document when complex
20806         integer types are treated as _Complex _Float64.
20808 2018-03-21  Tom de Vries  <tom@codesourcery.com>
20810         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20812 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20814         PR tree-optimization/84960
20815         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20816         if it is ENTRY block, move them into single succ of ENTRY in that case.
20818 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
20820         PR tree-optimization/84811
20821         * poly-int.h (poly_span_traits): Remove the T3 parameter and
20822         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20823         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20824         (known_subrange_p): Update accordingly.  Cast each value involved
20825         in the size comparison, rather than casting the result of the
20826         subtraction.
20828 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20830         PR tree-optimization/84982
20831         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20832         by flipping the least significant bit rather than all bits from
20833         bitpos to bitpos + bitsize - 1.
20835 2018-03-21  Nathan Sidwell  <nathan@acm.org>
20837         * doc/extend.texi (Deprecated Features): Remove mention of
20838         long-deleted deprecations.
20840 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20842         PR jit/84288
20843         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20844         * configure: Regenerate.
20846 2018-03-21  Tom de Vries  <tom@codesourcery.com>
20848         PR tree-optimization/83126
20849         * tree-parloops.c (num_phis): New function.
20850         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20852 2018-03-21  Nathan Sidwell  <nathan@acm.org>
20854         * doc/extend.texi (Deprecated Features): Update deprecated flags,
20855         mention anon-struct/union members and trailing attributes.
20857 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
20859         PR tree-optimization/84969
20860         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20861         builtin memset partitions if they set different rhs values.
20863 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
20865         PR rtl-optimization/84989
20866         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20867         VEC_DUPLICATE with scalar result mode.
20869 2018-03-21  Martin Liska  <mliska@suse.cz>
20871         PR ipa/84963
20872         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20873         not intended return statement.
20875 2018-03-21  Martin Liska  <mliska@suse.cz>
20877         PR target/84988
20878         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20879         (chkp_find_bound_slots_1): Limit number of iterations.
20881 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
20883         PR target/84838
20884         * Minor grammar fixes for x86 options.
20886 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20888         PR debug/84875
20889         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20890         holding REG_CFA_RESTORE notes, instead turn them into a USE.
20892 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
20894         PR target/83789
20895         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20896         (altivec_lvx_<mode>_1op): Likewise.
20897         (altivec_stvx_<mode>_2op): Likewise.
20898         (altivec_stvx_<mode>_1op): Likewise.
20899         (altivec_lvx_<VM2:mode>): New define_expand.
20900         (altivec_stvx_<VM2:mode>): Likewise.
20901         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20902         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20903         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20904         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20905         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20906         (rs6000_gen_lvx): Likewise.
20907         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20908         (altivec_expand_stv_builtin): Likewise.
20909         (altivec_expand_builtin): Likewise.
20910         * config/rs6000/vector.md: Likewise.
20912 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20914         PR target/82518
20915         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20916         BYTES_BIG_ENDIAN.
20918 2018-03-20  Richard Biener  <rguenther@suse.de>
20920         PR target/84986
20921         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20922         sign-conversions as zero, fall back to standard scalar_stmt
20923         cost for the rest.
20925 2018-03-20  Martin Liska  <mliska@suse.cz>
20927         PR ipa/84825
20928         * predict.c (rebuild_frequencies): Handle case when we have
20929         PROFILE_ABSENT, but flag_guess_branch_prob is false.
20931 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20933         PR target/84990
20934         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
20935         flag_section_anchors.
20936         * varasm.c (use_blocks_for_decl_p): Remove hack for
20937         dw2_force_const_mem.
20939         PR target/84845
20940         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
20941         to ...
20942         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
20943         be created, use lowpart_subreg of operands[0] rather than operands[0]
20944         itself.
20945         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
20946         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
20947         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
20948         and n constraint instead of aarch64_shift_imm_di and Usd.
20949         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
20950         (*aarch64_<optab>_reg_minus<mode>3): ... this.
20952 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
20954         PR target/82989
20955         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
20956         to favor GPR over NEON registers.
20957         (<shift>di3_neon): Likewise.
20959 2018-03-20  Tom de Vries  <tom@codesourcery.com>
20961         PR target/84952
20962         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
20963         (nvptx_process_pars): Emit bar.sync asap and alap.
20965 2018-03-20  Tom de Vries  <tom@codesourcery.com>
20967         PR target/84954
20968         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
20969         seen_label if seen_label is already set.
20971 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
20973         PR target/84945
20974         * config/i386/i386.c (fold_builtin_cpu): For features above 31
20975         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
20976         Use 1U instead of 1.  Formatting fixes.
20978         PR c/84953
20979         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
20980         instead of TREE_TYPE (s1) for the return value.
20982 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
20984         PR tree-optimization/84946
20985         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
20986         bitsize + bitsize in poly_uint64 rather than poly_int64.
20988         PR sanitizer/78651
20989         * dwarf2asm.c: Include fold-const.c.
20990         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
20991         of decl rather than decl itself.
20993         PR rtl-optimization/84643
20994         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
20996 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
20998         PR sanitizer/78651
20999         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
21000         calling assemble_variable.
21002 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
21004         PR target/81647
21005         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
21006         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
21008 2018-03-19  Jim Wilson  <jimw@sifive.com>
21010         PR bootstrap/84856
21011         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
21012         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
21013         (riscv_first_stack_step): Likewise.
21014         (riscv_option_override): Use STACK_BOUNDARY instead of
21015         MIN_STACK_BOUNDARY.
21016         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
21017         MIN_STACK_BOUNDARY.
21018         (BIGGEST_ALIGNMENT): Set to 128.
21019         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
21020         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
21021         STACK_BOUNDARY.
21023 2018-03-19  Richard Biener  <rguenther@suse.de>
21025         PR tree-optimization/84933
21026         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
21027         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
21029 2018-03-19  Richard Biener  <rguenther@suse.de>
21031         PR tree-optimization/84859
21032         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
21033         (cond_if_else_store_replacement): Perform sinking operation on
21034         single-store BBs regardless of MAX_STORES_TO_SINK setting.
21035         Generalize what a BB with a single eligible store is.
21037 2018-03-19  Richard Biener  <rguenther@suse.de>
21039         PR tree-optimization/84929
21040         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
21041         chrec_is_positive against non-chrec arg.
21043 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
21045         PR target/84711
21046         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
21048 2018-03-18  Martin Liska  <mliska@suse.cz>
21050         PR rtl-optimization/84635
21051         * regrename.c (build_def_use): Use matches_mode only when
21052         matches >= 0.
21054 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
21056         PR tree-optimization/84913
21057         * tree-vect-loop.c (vectorizable_reduction): Don't try to
21058         vectorize chains of COND_EXPRs.
21060 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
21062         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
21064 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
21066         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
21068 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
21070         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
21072 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
21073             Kito Cheng  <kito.cheng@gmail.com>
21075         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
21076         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
21077         (nds32_adjust_reg_alloc_order): New function.
21078         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
21080 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
21082         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
21083         nds32_print_operand, nds32_print_operand_address): Use
21084         HOST_WIDE_INT_PRINT_DEC instead.
21086 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
21088         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
21090 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
21092         PR target/84902
21093         * config/i386/i386.c (initial_ix86_tune_features,
21094         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
21095         unsigned long long.
21096         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
21097         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
21098         rather than 1u << ix86_tune.  Formatting fix.
21099         (ix86_option_override_internal): Change ix86_arch_mask from
21100         unsigned int to unsigned HOST_WIDE_INT, initialize to
21101         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
21102         (ix86_function_specific_restore): Likewise.
21104 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
21106         PR target/84899
21107         * postreload.c (reload_combine_recognize_pattern): Perform
21108         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
21109         truncate_int_for_mode the result for the destination's mode.
21111         PR c/84909
21112         * hsa-gen.c (mem_type_for_type): Fix comment typo.
21113         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
21114         Likewise.
21115         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21116         Likewise.
21118 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
21120         PR target/84876
21121         * lra-assigns.c (lra_split_hard_reg_for): Don't use
21122         regno_allocno_class_array and sorted_pseudos.
21123         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
21124         insns where regno is used.
21126 2018-03-16  Martin Liska  <mliska@suse.cz>
21128         PR ipa/84833
21129         * multiple_target.c (create_dispatcher_calls): Redirect
21130         reference in the symbol table.
21132 2018-03-16  Martin Liska  <mliska@suse.cz>
21134         PR ipa/84722
21135         * multiple_target.c (create_dispatcher_calls): Redirect also
21136         an alias.
21138 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
21140         PR c++/79937
21141         PR c++/82410
21142         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
21143         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
21144         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
21146 2018-03-16  Julia Koval  <julia.koval@intel.com>
21148         * doc/invoke.texi (Skylake Server): Add CLWB.
21149         Cannonlake): Remove CLWB.
21151 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
21153         PR tree-optimization/84841
21154         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
21155         1 << 3.
21156         (FLOAT_ONE_CONST_TYPE): Define.
21157         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
21158         (sort_by_operand_rank): Put entries with higher constant_type last
21159         rather than first to match comments.
21161 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
21163         * config/nios2/nios2.md (movsi_internal): Fix thinko in
21164         split predicate.
21166 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
21168         PR c++/79085
21169         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
21170         check and use address of target always.
21172 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
21174         PR target/84574
21175         * config/i386/i386.c (indirect_thunk_needed): Update comments.
21176         (indirect_thunk_bnd_needed): Likewise.
21177         (indirect_thunks_used): Likewise.
21178         (indirect_thunks_bnd_used): Likewise.
21179         (indirect_return_needed): New.
21180         (indirect_return_bnd_needed): Likewise.
21181         (output_indirect_thunk_function): Add a bool argument for
21182         function return.
21183         (output_indirect_thunk_function): Don't generate alias for
21184         function return thunk.
21185         (ix86_code_end): Call output_indirect_thunk_function to generate
21186         function return thunks.
21187         (ix86_output_function_return): Set indirect_return_bnd_needed
21188         and indirect_return_needed instead of indirect_thunk_bnd_needed
21189         and indirect_thunk_needed.
21191 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
21193         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
21194         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
21195         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
21197 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
21198             Paul Hua <paul.hua.gm@gmail.com>
21200         PR c/84852
21201         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
21203 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
21205         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
21206         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
21207         resp. SFmode cases.
21209 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
21211         PR target/84711
21212         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21213         instead of GET_MODE_SIZE when comparing Units.
21215 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
21217         PR target/68256
21218         * varasm.c (hash_section): Return an unchangeble hash value
21219         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21220         Return !aarch64_can_use_per_function_literal_pools_p ().
21222 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
21224         PR target/84860
21225         * optabs.c (emit_conditional_move): Pass address of cmode's copy
21226         rather than address of cmode as last argument to prepare_cmp_insn.
21228 2018-03-15  Julia Koval  <julia.koval@intel.com>
21230         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21231         F_AVX512VNNI, F_AVX512BITALG): New.
21233 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
21235         PR target/83451
21236         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
21237         insn for floating-point loads and stores.
21239 2018-03-14  Carl Love  <cel@us.ibm.com>
21241         * config/rs6000/rs6000-c.c: Add macro definitions for
21242         ALTIVEC_BUILTIN_VEC_PERMXOR.
21243         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21244         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21245         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21246         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21247         UNSPEC_VPERMXOR.
21248         * config/doc/extend.texi: Add prototypes for vec_permxor.
21250 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
21252         PR c/84852
21253         * diagnostic-show-locus.c (class layout_point): Convert m_line
21254         from int to linenum_type.
21255         (line_span::comparator): Use linenum "compare" function when
21256         comparing line numbers.
21257         (test_line_span): New function.
21258         (layout_range::contains_point): Convert param "row" from int to
21259         linenum_type.
21260         (layout_range::intersects_line_p): Likewise.
21261         (layout::will_show_line_p): Likewise.
21262         (layout::print_source_line): Likewise.
21263         (layout::should_print_annotation_line_p): Likewise.
21264         (layout::print_annotation_line): Likewise.
21265         (layout::print_leading_fixits): Likewise.
21266         (layout::annotation_line_showed_range_p): Likewise.
21267         (struct line_corrections): Likewise for field m_row.
21268         (line_corrections::line_corrections): Likewise for param "row".
21269         (layout::print_trailing_fixits): Likewise.
21270         (layout::get_state_at_point): Likewise.
21271         (layout::get_x_bound_for_row): Likewise.
21272         (layout::print_line): Likewise.
21273         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21274         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21275         * input.c (selftest::test_linenum_comparisons): New function.
21276         (selftest::input_c_tests): Call it.
21277         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21278         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21279         * selftest.h (ASSERT_GT): New macro.
21280         (ASSERT_GT_AT): New macro.
21281         (ASSERT_LT): New macro.
21282         (ASSERT_LT_AT): New macro.
21284 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
21286         PR rtl-optimization/84780
21287         * combine.c (distribute_links): Don't make a link based on pc_rtx.
21289 2018-03-14  Martin Liska  <mliska@suse.cz>
21291         * tree.c (record_node_allocation_statistics): Use
21292         get_stats_node_kind.
21293         (get_stats_node_kind): New function extracted from
21294         record_node_allocation_statistics.
21295         (free_node): Use get_stats_node_kind.
21297 2018-03-14  Richard Biener  <rguenther@suse.de>
21299         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21300         that the value-set of ANTIC_IN doesn't grow.
21302         Revert
21303         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21304         member.
21305         (BB_VISITED_WITH_VISITED_SUCCS): New define.
21306         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21308 2018-03-14  Julia Koval  <julia.koval@intel.com>
21310         * config.gcc (icelake-client, icelake-server): New.
21311         (icelake): Remove.
21312         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21313         (initial_ix86_arch_features): Ditto.
21314         (PTA_SKYLAKE): Add SGX.
21315         (PTA_ICELAKE): Remove.
21316         (PTA_ICELAKE_CLIENT): New.
21317         (PTA_ICELAKE_SERVER): New.
21318         (ix86_option_override_internal): Split up icelake on icelake client and
21319         icelake server.
21320         (get_builtin_code_for_version): Ditto.
21321         (fold_builtin_cpu): Ditto.
21322         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21323         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21324         * config/i386/i386.h (processor_type): Ditto.
21325         * doc/invoke.texi: Ditto.
21327 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
21329         PR sanitizer/83392
21330         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21331         INTEGER_CST offset, add it together with bitpos / 8 and
21332         sign extend based on POINTER_SIZE.
21334         PR target/84844
21335         Revert
21336         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
21338         PR target/78090
21339         * config/i386/constraints.md (Yc): New register constraint.
21340         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21341         Use Yc constraint for alternative 2 of operand 0.  Remove
21342         preferred_for_speed attribute.
21344 2018-03-14  Richard Biener  <rguenther@suse.de>
21346         PR tree-optimization/84830
21347         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21348         with the old one to avoid oscillations.
21350 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
21352         PR target/83712
21353         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21354         pseudos.
21355         (assign_by_spills): Return a flag of reload assignment failure.
21356         Do not process the reload assignment failures.  Do not spill other
21357         reload pseudos if they has the same reg class.  Update n if
21358         necessary.
21359         (lra_assign): Add a return arg.  Set up from the result of
21360         assign_by_spills call.
21361         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21362         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
21363         usage_insns if it is not NULL.
21364         (spill_hard_reg_in_range): New function.
21365         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21366         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21367         function prototypes.
21368         (lra_assign): Change prototype.
21369         * lra.c (lra): Add code to deal with fails by splitting hard reg
21370         live ranges.
21372 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
21374         * config/riscv/riscv.opt (mrelax): New option.
21375         * config/riscv/riscv.c (riscv_file_start): Emit ".option
21376         "norelax" when riscv_mrelax is disabled.
21377         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21379 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21381         PR target/84743
21382         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21383         reassociation for int modes.
21385 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
21387         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21388         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21389         for big-endian.
21390         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21391         * config/aarch64/aarch64-sve.md
21392         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21393         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21394         (*extend<mode><Vwide>2): Rename to...
21395         (aarch64_sve_extend<mode><Vwide>2): ...this.
21396         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21397         renaming the old pattern to...
21398         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
21399         unsigned packs.
21400         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21401         define_expand, renaming the old pattern to...
21402         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21403         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21404         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21405         account when deciding which SVE instruction the optab should use.
21406         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21408 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
21410         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21411         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21412         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21413         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21414         (tlsdesc_small_<mode>): Turn a define_expand and use
21415         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
21416         (tlsdesc_small_advsimd_<mode>): ...this.
21417         (tlsdesc_small_sve_<mode>): New pattern.
21419 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
21421         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21422         (UNSPEC_UMUL_HIGHPART): New constants.
21423         (MUL_HIGHPART): New int iteraor.
21424         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21425         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21426         define_expand.
21427         (*<su>mul<mode>3_highpart): New define_insn.
21429 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
21431         PR lto/84805
21432         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21433         incomplete types.
21435 2018-03-13  Martin Liska  <mliska@suse.cz>
21437         PR ipa/84658.
21438         * (sem_item_optimizer::sem_item_optimizer): Initialize new
21439         vector.
21440         (sem_item_optimizer::~sem_item_optimizer): Release it.
21441         (sem_item_optimizer::merge_classes): Register variable aliases.
21442         (sem_item_optimizer::fixup_pt_set): New function.
21443         (sem_item_optimizer::fixup_points_to_sets): Likewise.
21444         * ipa-icf.h: Declare new variables and functions.
21446 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
21448         PR middle-end/84834
21449         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21450         integer_pow2p@2 and test integer_pow2p in condition.
21451         (A < 0 ? C : 0): Similarly for @1.
21453         PR middle-end/84831
21454         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21455         characters starting at p contain '\0' character, don't look beyond
21456         that.
21458         PR target/84827
21459         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21460         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21462         PR target/84828
21463         * reg-stack.c (change_stack): Change update_end var from int to
21464         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21465         also call set_block_for_insn on the newly added insns and rescan.
21467         PR target/84786
21468         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21469         on the last operand.
21471         PR c++/84704
21472         * tree.c (stabilize_reference_1): Return save_expr (e) for
21473         STATEMENT_LIST even if it doesn't have side-effects.
21475 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
21477         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21479 2018-03-12  Renlin Li  <renlin.li@arm.com>
21481         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21482         aarch64_output_scalar_simd_mov_immediate.
21484 2018-03-12  Martin Sebor  <msebor@redhat.com>
21486         PR tree-optimization/83456
21487         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21488         for perfectly overlapping calls to memcpy.
21489         (gimple_fold_builtin_memory_chk): Same.
21490         (gimple_fold_builtin_strcpy): Handle no-warning.
21491         (gimple_fold_builtin_stxcpy_chk): Same.
21492         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21494 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
21496         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21497         parameter.  Use it for SFmode.
21498         (rs6000_function_arg_advance_1): Adjust.
21499         (rs6000_function_arg): Adjust.
21500         (rs6000_gimplify_va_arg): Pass false for that new parameter.
21502 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
21504         PR rtl-optimization/84169
21505         PR rtl-optimization/84780
21506         * combine.c (can_combine_p): Check for a 2-insn combination whether
21507         the destination register is used between the two insns, too.
21509 2018-03-12  Richard Biener  <rguenther@suse.de>
21511         PR tree-optimization/84803
21512         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21513         for refs DR analysis didn't process.
21515 2018-03-12  Richard Biener  <rguenther@suse.de>
21517         PR tree-optimization/84777
21518         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21519         force-vectorize loops ignore whether we are optimizing for size.
21521 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
21523         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21524         (TARGET_MD_ASM_ADJUST): Define.
21526 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
21527             Kito Cheng  <kito.cheng@gmail.com>
21528             Chung-Ju Wu  <jasonwucj@gmail.com>
21530         * config/nds32/nds32.c (nds32_compute_stack_frame,
21531         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21532         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21533         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21534         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21535         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21536         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21537         * config/nds32/nds32.md (prologue, epilogue): Use macro
21538         NDS32_V3PUSH_AVAILABLE_P to do checking.
21540 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
21542         PR debug/58150
21543         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21544         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21545         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
21546         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
21547         addition of most attributes on !orig_type_die or the attribute not
21548         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21550 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
21551             Chung-Ju Wu  <jasonwucj@gmail.com>
21553         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21554         __NDS32_VH__ macro.
21555         * config/nds32/nds32.opt (mvh): New option.
21557 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
21558             Chung-Ju Wu  <jasonwucj@gmail.com>
21560         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21561         function.
21562         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21563         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21564         definition.
21566 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
21567             Chung-Ju Wu  <jasonwucj@gmail.com>
21569         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21570         function.
21571         * config/nds32/nds32-multiple.md (strlensi): New pattern.
21572         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21574 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
21575             Kito Cheng  <kito.cheng@gmail.com>
21576             Chung-Ju Wu  <jasonwucj@gmail.com>
21578         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21579         UNSPEC_FFMISM and UNSPEC_FLMISM.
21580         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21581         for ffb, ffmism and flmism.
21582         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21583         (unspec_ffmism): Ditto.
21584         (unspec_flmism): Ditto.
21585         (nds32_expand_builtin_impl): Check if string extension is available.
21586         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21587         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21589 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
21591         Reverting patch:
21592         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
21594         PR target/83712
21595         * lra-assigns.c (assign_by_spills): Return a flag of reload
21596         assignment failure.  Do not process the reload assignment
21597         failures.  Do not spill other reload pseudos if they has the same
21598         reg class.
21599         (lra_assign): Add a return arg.  Set up from the result of
21600         assign_by_spills call.
21601         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21602         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
21603         usage_insns if it is not NULL.
21604         (spill_hard_reg_in_range): New function.
21605         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21606         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21607         function prototypes.
21608         (lra_assign): Change prototype.
21609         * lra.c (lra): Add code to deal with fails by splitting hard reg
21610         live ranges.
21612 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
21614         PR target/84807
21615         * config/i386/i386.opt: Replace Enforcment with Enforcement.
21617 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
21619         PR debug/84620
21620         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21621         (dw_val_node): Add val_symbolic_view.
21622         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21623         (symview_upper_bound): New.
21624         (new_line_info_table): Initialize symviews_since_reset.
21625         (dwarf2out_source_line): Count symviews_since_reset and set
21626         symview_upper_bound.
21627         (dw_val_equal_p): Handle symview.
21628         (add_AT_symview): New.
21629         (print_dw_val): Handle symview.
21630         (attr_checksum, attr_checksum_ordered): Likewise.
21631         (same_dw_val_p, size_of_die): Likewise.
21632         (value_format, output_die): Likewise.
21633         (add_high_low_attributes): Use add_AT_symview for entry_view.
21634         (dwarf2out_finish): Reset symview_upper_bound, clear
21635         zero_view_p.
21637 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
21639         PR target/83969
21640         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21641         Add strict argument and use it.
21642         (rs6000_split_multireg_move): Update for new strict argument.
21643         (mem_operand_gpr): Disallow all non-offsettable addresses.
21644         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21646 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
21648         PR target/84772
21649         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21650         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21651         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21653         PR c++/84767
21654         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21655         decl, use remap_type if we want to use the type.
21657 2018-03-09  Martin Sebor  <msebor@redhat.com>
21659         PR tree-optimization/84526
21660         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21661         Remove dead code.
21662         (builtin_access::generic_overlap): Be prepared to handle non-array
21663         base objects.
21665 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
21667         PR rtl-optimization/84682
21668         * lra-constraints.c (process_address_1): Check is_address flag
21669         for address constraints.
21670         (process_alt_operands): Likewise.
21671         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21672         preprocess_constraints.
21673         * recog.h (preprocess_constraints): Add oploc parameter.
21674         Adjust callers.
21675         * recog.c (preprocess_constraints): Test address_operand for
21676         CT_ADDRESS constraints.
21678 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
21680         PR target/83712
21681         * lra-assigns.c (assign_by_spills): Return a flag of reload
21682         assignment failure.  Do not process the reload assignment
21683         failures.  Do not spill other reload pseudos if they has the same
21684         reg class.
21685         (lra_assign): Add a return arg.  Set up from the result of
21686         assign_by_spills call.
21687         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21688         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
21689         usage_insns if it is not NULL.
21690         (spill_hard_reg_in_range): New function.
21691         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21692         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21693         function prototypes.
21694         (lra_assign): Change prototype.
21695         * lra.c (lra): Add code to deal with fails by splitting hard reg
21696         live ranges.
21698 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21700         PR target/83193
21701         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21702         Accept complain bool parameter.  Only emit errors if it is true.
21703         (arm_parse_cpu_option_name): Likewise.
21704         (arm_target_thumb_only): Adjust callers of the above.
21705         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21706         prototype to take a default true bool parameter.
21707         (arm_parse_arch_option_name): Likewise.
21709 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
21710             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
21712         PR jit/64089
21713         PR jit/84288
21714         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21715         * configure: Regenerate.
21716         * configure.ac ("linker --version-script option"): New.
21717         ("linker soname option"): New.
21719 2018-03-09  Richard Biener  <rguenther@suse.de>
21721         PR tree-optimization/84775
21722         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21723         immediate uses of predicate stmts and mark them modified.
21725         Revert
21726         PR tree-optimization/84178
21727         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21728         to caller.
21729         (version_loop_for_if_conversion): Delay update_ssa call.
21730         (tree_if_conversion): Delay update_ssa until after predicate
21731         insertion.
21733 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
21735         PR target/84763
21736         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21737         when the function accesses prior frames.
21739 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
21741         PR debug/84456
21742         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21743         gen_llsym, otherwise call maybe_gen_llsym.
21745         PR inline-asm/84742
21746         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21747         has ',' character inside of it.
21749 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21751         PR target/84748
21752         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21753         as clobbering CC_REGNUM.
21755 2018-03-08  Richard Biener  <rguenther@suse.de>
21757         PR middle-end/84552
21758         * tree-scalar-evolution.c: Include tree-into-ssa.h.
21759         (follow_copies_to_constant): Do not follow SSA names registered
21760         for update.
21762 2018-03-08  Richard Biener  <rguenther@suse.de>
21764         PR tree-optimization/84178
21765         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21766         to caller.
21767         (version_loop_for_if_conversion): Delay update_ssa call.
21768         (tree_if_conversion): Delay update_ssa until after predicate
21769         insertion.
21771 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
21773         PR tree-optimization/84178
21774         * tree-if-conv.c (release_bb_predicate): Remove the
21775         the assertion that the stmts have NULL use_ops.
21776         Discard the statements, asserting that they haven't
21777         yet been added to a BB.
21779 2018-03-08  Richard Biener  <rguenther@suse.de>
21781         PR tree-optimization/84746
21782         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21783         (phi_translate): Pass in destination ANTIC_OUT set.
21784         (phi_translate_1): Likewise.  For a simplified result lookup
21785         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21786         (phi_translate_set): Adjust.
21787         (do_pre_regular_insertion): Likewise.
21788         (do_pre_partial_partial_insertion): Likewise.
21790 2018-03-08  Martin Liska  <mliska@suse.cz>
21792         PR gcov-profile/84735
21793         * doc/gcov.texi: Document usage of profile files.
21794         * gcov-io.h: Document changes in the format.
21796 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
21798         PR debug/84404
21799         PR debug/84408
21800         * dwarf2out.c (struct dw_line_info_table): Update comments for
21801         view == -1.
21802         (FORCE_RESET_NEXT_VIEW): New.
21803         (FORCE_RESETTING_VIEW_P): New.
21804         (RESETTING_VIEW_P): Check for -1 too.
21805         (ZERO_VIEW_P): Likewise.
21806         (new_line_info_table): Force-reset next view.
21807         (dwarf2out_begin_function): Likewise.
21808         (dwarf2out_source_line): Simplify zero_view_p initialization.
21809         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21810         view directly.  Omit view when omitting .loc at line 0.
21812 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
21814         PR tree-optimization/84740
21815         * tree-switch-conversion.c (process_switch): Call build_constructors
21816         only if info.phi_count is non-zero.
21818         PR tree-optimization/84739
21819         * tree-tailcall.c (find_tail_calls): Check call arguments against
21820         DECL_ARGUMENTS (current_function_decl) rather than
21821         DECL_ARGUMENTS (func) when checking for tail recursion.
21823 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
21825         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21826         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21827         Volker Reichelt's entry and add entries for people that perform
21828         GCC fuzzy testing and report numerous bugs.
21830 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
21832         PR target/82411
21833         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21834         readonly data in sdata, if that is disabled.
21835         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21836         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21837         -mreadonly-in-sdata option.
21839 2018-03-07  Martin Sebor  <msebor@redhat.com>
21841         PR tree-optimization/84468
21842         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21843         basic block when looking for nul assignment.
21845 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
21847         PR target/84277
21848         * except.h (output_function_exception_table): Adjust prototype.
21849         * except.c (output_function_exception_table): Remove FNNAME parameter
21850         and add SECTION parameter.  Ouput one part of the table at a time.
21851         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21852         the first part of the exception table and emit unwind directives.
21853         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21854         (i386_pe_seh_cold_init): Likewise.
21855         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21856         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21857         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21858         (ix86_output_call_insn): Emit a nop in one more case for SEH.
21859         * config/i386/winnt.c: Include except.h.
21860         (struct seh_frame_state): Add reg_offset, after_prologue and
21861         in_cold_section fields.
21862         (i386_pe_seh_end_prologue): Set seh->after_prologue.
21863         (i386_pe_seh_cold_init): New function.
21864         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21865         to seh->in_cold_section.
21866         (seh_emit_push): Record the offset of the push.
21867         (seh_emit_save): Record the offet of the save.
21868         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21869         Test seh->after_prologue to disregard the epilogue.
21870         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21871         (i386_pe_end_cold_function): New function.
21873 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
21875         PR fortran/84565
21876         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21877         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21879         PR c++/84704
21880         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21881         on tmp_var.
21882         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21883         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21885         PR middle-end/84723
21886         * multiple_target.c: Include tree-inline.h and intl.h.
21887         (expand_target_clones): Diagnose and fail if node->definition and
21888         !tree_versionable_function_p (node->decl).
21890 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
21892         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21893         sprint_ul.
21894         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21895         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21896         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21898 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
21900         PR target/84710
21901         * combine.c (try_combine): Use reg_or_subregno instead of handling
21902         just paradoxical SUBREGs and REGs.
21904 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
21906         * config/arc/arc.c (arc_finalize_pic): Remove function.
21907         (arc_must_save_register): We use single base PIC register, remove
21908         checks to save/restore the PIC register.
21909         (arc_expand_prologue): Likewise.
21910         * config/arc/arc-protos.h (arc_set_default_type_attributes):
21911         Remove.
21912         (arc_verify_short): Likewise.
21913         (arc_attr_type): Likewise.
21914         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21915         (walk_stores): Likewise.
21916         (arc_address_cost): Make it static.
21917         (arc_verify_short): Likewise.
21918         (branch_dest): Likewise.
21919         (arc_attr_type): Likewise.
21920         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21921         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21922         (arc_final_prescan_insn): Remove inserting the nops due to
21923         hardware hazards.  It is done in reorg step.
21924         (insn_length_variant_t): Remove.
21925         (insn_length_parameters_t): Likewise.
21926         (arc_insn_length_parameters): Likewise.
21927         (arc_get_insn_variants): Likewise.
21928         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
21930 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
21932         PR inline-asm/84683
21933         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
21934         assertion failure.
21936         PR tree-optimization/84687
21937         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
21938         on new_node->decl.
21939         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
21941 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21943         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
21944         Rename to ppc_speculation_barrier.
21945         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
21946         __builtin_ppc_speculation_barrier.
21948 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
21950         PR target/84700
21951         * combine.c (combine_simplify_rtx): Don't try to simplify if
21952         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
21953         are equal to x.
21955 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
21957         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
21958         to 32 bytes when compiling for POWER9.
21960 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
21962         PR target/84564
21963         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
21964         regparm >= 3 with no arg reg available also for calls with
21965         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
21967         PR target/84524
21968         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
21969         orig,vex.
21970         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
21972 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
21974         PR target/84264
21975         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
21977 2018-03-05  Richard Biener  <rguenther@suse.de>
21979         PR tree-optimization/84486
21980         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
21981         When inserting a __builtin_assume_aligned call set the LHS
21982         SSA name alignment info accordingly.
21984 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
21986         PR tree-optimization/84114
21987         * config/aarch64/aarch64.c (aarch64_reassociation_width)
21988         Avoid reassociation of FLOAT_MODE addition.
21990 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
21992         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
21993         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
21994         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
21995         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
21996         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
21997         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
21998         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
21999         and -mwbnoinvd.
22000         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
22001         __builtin_ia32_wbinvd): New builtins.
22002         (SPECIAL_ARGS2): New.
22003         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
22004         (SPECIAL_ARGS2): New.
22005         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
22006         (ix86_valid_target_attribute_inner_p): Ditto.
22007         (ix86_init_mmx_sse_builtins): Add special_args2.
22008         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
22009         TARGET_WBNOINVD_P): New.
22010         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
22011         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
22012         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
22013         * config/i386/immintrin.h (_wbinvd): New intrinsic.
22014         * config/i386/pconfigintrin.h: New file.
22015         * config/i386/wbnoinvdintrin.h: Ditto.
22016         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
22017         wbnoinvdintrin.h.
22018         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
22020 2018-03-05  Richard Biener  <rguenther@suse.de>
22022         PR tree-optimization/84670
22023         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22024         member.
22025         (BB_VISITED_WITH_VISITED_SUCCS): New define.
22026         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22027         (compute_antic_aux): Only assert the number of values in ANTIC_IN
22028         doesn't grow if all successors (recursively) were visited at least
22029         once.
22031 2018-03-05  Richard Biener  <rguenther@suse.de>
22033         PR tree-optimization/84650
22034         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
22035         if executed in the loop pipeline.
22037 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
22039         * doc/configfiles.texi (Configuration Files): Move info about
22040         conditionalizing $target-protos.h to...
22041         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
22042         differs from $target-protos.h.
22044 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
22045             Chung-Ju Wu  <jasonwucj@gmail.com>
22047         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
22048         * config/nds32/nds32-multiple.md (setmemsi): Define.
22049         * config/nds32/nds32-memory-manipulation.c
22050         (nds32_gen_dup_4_byte_to_word_value): New.
22051         (emit_setmem_word_loop): New.
22052         (emit_setmem_byte_loop): New.
22053         (nds32_expand_setmem_loop): New.
22054         (nds32_expand_setmem_loop_v3m): New.
22055         (nds32_expand_setmem_unroll): New.
22056         (nds32_expand_setmem): New.
22058 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
22059             Chung-Ju Wu  <jasonwucj@gmail.com>
22061         * config/nds32/nds32-memory-manipulation.c
22062         (nds32_emit_load_store): New.
22063         (nds32_emit_post_inc_load_store): New.
22064         (nds32_emit_mem_move): New.
22065         (nds32_emit_mem_move_block): New.
22066         (nds32_expand_movmemsi_loop_unknown_size): New.
22067         (nds32_expand_movmemsi_loop_known_size): New.
22068         (nds32_expand_movmemsi_loop): New.
22069         (nds32_expand_movmemsi_unroll): New.
22070         (nds32_expand_movmemqi): Rename ...
22071         (nds32_expand_movmemsi): ... to this.
22072         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
22073         (movmemsi): ... to this.
22074         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
22075         (nds32_expand_movmemsi): ... to this.
22077 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
22078             Monk Chiang  <sh.chiang04@gmail.com>
22079             Chung-Ju Wu  <jasonwucj@gmail.com>
22081         * config/nds32/nds32-protos.h
22082         (nds32_expand_load_multiple): New arguments.
22083         (nds32_expand_store_multiple): Ditto.
22084         (nds32_valid_multiple_load_store): Rename ...
22085         (nds32_valid_multiple_load_store_p): ... to this.
22086         * config/nds32/nds32-memory-manipulation.c
22087         (nds32_expand_load_multiple): Refine implementation.
22088         (nds32_expand_store_multiple): Ditto.
22089         * config/nds32/nds32-multiple.md
22090         (load_multiple): Update nds32_expand_load_multiple interface.
22091         (store_multiple): Update nds32_expand_store_multiple interface.
22092         * config/nds32/nds32-predicates.c
22093         (nds32_valid_multiple_load_store): Rename ...
22094         (nds32_valid_multiple_load_store_p): ... to this and refine
22095         implementation.
22096         * config/nds32/predicates.md
22097         (nds32_load_multiple_and_update_address_operation): New predicate.
22098         (nds32_store_multiple_and_update_address_operation): New predicate.
22100 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
22101             Chung-Ju Wu  <jasonwucj@gmail.com>
22103         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
22104         (combo): New attribute.
22105         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
22107 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
22109         * config/nds32/nds32.opt: Change -mcmodel= default value.
22111 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
22112             Monk Chiang  <sh.chiang04@gmail.com>
22113             Chung-Ju Wu  <jasonwucj@gmail.com>
22115         * config/nds32/constants.md (unspec_element): New enum.
22116         * config/nds32/constraints.md (Umw): New constraint.
22117         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
22118         * config/nds32/nds32-intrinsic.md: Likewise.
22119         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
22120         (nds32_valid_smw_lwm_base_p): New.
22121         (nds32_output_smw_single_word): New.
22122         (nds32_output_lmw_single_word): New.
22123         (nds32_expand_unaligned_load): New.
22124         (nds32_expand_unaligned_store): New.
22125         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
22126         (nds32_output_smw_single_word): Declare.
22127         (nds32_output_lmw_single_word): Declare.
22128         (nds32_expand_unaligned_load): Declare.
22129         (nds32_expand_unaligned_store): Declare.
22130         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
22131         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
22132         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
22133         NDS32_BUILTIN_UASTORE_DW.
22134         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
22135         predicate.
22137 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
22138             Kito Cheng  <kito.cheng@gmail.com>
22139             Chung-Ju Wu  <jasonwucj@gmail.com>
22141         * config/nds32/nds32-intrinsic.c
22142         (nds32_expand_builtin_null_ftype_reg): Delete.
22143         (nds32_expand_builtin_reg_ftype_imm): Ditto.
22144         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
22145         (nds32_read_argument): New.
22146         (nds32_legitimize_target): Ditto.
22147         (nds32_legitimize_argument): Ditto.
22148         (nds32_check_constant_argument): Ditto.
22149         (nds32_expand_unop_builtin): Ditto.
22150         (nds32_expand_unopimm_builtin): Ditto.
22151         (nds32_expand_binop_builtin): Ditto.
22152         (nds32_builtin_decl_impl): Ditto.
22153         (builtin_description): Ditto.
22154         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
22155         (nds32_init_builtins_impl): Ditto.
22156         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
22157         (nds32_builtin_decl): New.
22158         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
22159         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
22161 2018-03-02  Jeff Law  <law@redhat.com>
22163         * reorg.c (stop_search_p): Handle DEBUG_INSN.
22164         (redundant_insn, fill_simple_delay_slots): Likewise.
22165         (fill_slots_from_thread): Likewise.
22166         * resource.c (mark_referenced_resources): Likewise.
22167         (mark_set_resources, find_dead_or_set_registers): Likewise.
22169 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
22171         * substring-locations.h (format_warning_va): Formatting fix for
22172         ATTRIBUTE_GCC_DIAG.
22173         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
22174         argument.
22175         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
22176         * substring-locations.c: Include intl.h.
22177         (format_warning_va): Turned into small wrapper around
22178         format_warning_n_va, renamed to ...
22179         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
22180         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
22181         use ngettext.
22182         (format_warning_at_substring_n): New function.
22183         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
22184         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
22185         format_warning_at_substring with just a shorter name instead of
22186         const function pointer.
22187         (fmtwarn_n): New function.
22188         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
22189         appropriate, get rid of all the fmtstr temporaries, move conditionals
22190         with G_() wrapped string literals directly into fmtwarn arguments,
22191         cast dir.len to (int), formatting fixes.
22193 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
22195         * doc/invoke.texi: Remove "Cilk Plus" references.
22197 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
22198             Richard Biener  <rguenther@suse.de>
22200         PR ipa/84628
22201         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
22202         for error or warning attributes if CALL_FROM_THUNK_P is set.
22203         Formatting fixes.
22205 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
22207         PR target/56540
22208         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
22209         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
22211         PR target/56540
22212         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22213         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22215         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22216         instead of -1U in last predictors element's probability member.
22218 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
22220         PR ipa/83983
22221         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22222         arguments if they are comparable.
22224 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
22226         PR tree-optimization/84634
22227         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22228         masks and masked_loop_p with a single loop_masks, making sure it's
22229         null for bb vectorization.
22231 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
22233         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22234         (vect_analyze_data_ref_access): Use loop->safe_len rather than
22235         loop->force_vectorize to check whether there is no alias.
22237 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
22239         PR target/84614
22240         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22241         prototypes.
22242         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22243         comments.
22244         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22245         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22246         instead of a loop around prev_real_insn.
22247         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22248         prev_real_insn.
22250         PR inline-asm/84625
22251         * config/i386/i386.c (ix86_print_operand): Use conditional
22252         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22253         zero vector.
22255 2018-03-02  Richard Biener  <rguenther@suse.de>
22257         PR tree-optimization/84427
22258         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22259         (bitmap_set_subtract_values): Rewrite to handle multiple
22260         exprs per value.
22261         (clean): Likewise.
22262         (prune_clobbered_mems): Likewise.
22263         (phi_translate): Take edge instead of pred/phiblock.
22264         (phi_translate_1): Likewise.
22265         (phi_translate_set): Likewise.  Insert all translated
22266         exprs for a value into the set, keeping possibly multiple
22267         expressions per value.
22268         (compute_antic_aux): Adjust for phi_translate changes.
22269         When intersecting union the expressions and prune those
22270         not in the final value set, keeping possibly multiple
22271         expressions per value.  Do not use value-insertion
22272         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22273         all expressions.  Add verification that the value-sets
22274         only shrink during iteration.
22275         (compute_partial_antic_aux): Adjust for the phi_translate changes.
22276         (do_pre_regular_insertion): Likewise.
22277         (do_pre_partial_partial_insertion): Likewise.
22279 2018-03-02  Richard Biener  <rguenther@suse.de>
22281         PR target/82005
22282         * config/darwin.c (saved_debug_info_level): New static global.
22283         (darwin_asm_lto_start): Disable debug info generation for LTO out.
22284         (darwin_asm_lto_end): Restore debug info generation settings.
22286 2018-03-01  Martin Liska  <mliska@suse.cz>
22288         PR sanitizer/82484
22289         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22290         volatile arguments.
22292 2018-03-01  Richard Biener  <rguenther@suse.de>
22294         PR debug/84645
22295         * dwarf2out.c (gen_variable_die): Properly handle late VLA
22296         type annotation with LTO when debug was disabled at compile-time.
22298 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
22300         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22301         XINT with INTVAL.
22302         (mips_final_postscan_insn): Likewise.
22304 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
22306         PR rtl-optimization/84528
22307         * alias.c (init_alias_target): Add commentary.
22308         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22309         a unique base value if the frame pointer is not eliminated
22310         to the stack pointer.
22312 2018-03-01  Tom de Vries  <tom@codesourcery.com>
22314         PR rtl-optimization/83327
22315         * lra-int.h (hard_regs_spilled_into): Declare.
22316         * lra.c (hard_regs_spilled_into): Define.
22317         (init_reg_info): Init hard_regs_spilled_into.
22318         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22319         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22320         (process_bb_lives): Handle hard_regs_spilled_into.
22321         (lra_create_live_ranges_1): Before doing liveness propagation, clear
22322         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22324 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
22326         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22327         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22328         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22329         * config/rs6000/aix72.h: New file.
22331 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
22333         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22334         instead of warning_at with conditional singular and plural messages
22335         where possible.
22337         PR target/52991
22338         * stor-layout.c (update_alignment_for_field): For
22339         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22340         && !DECL_PACKED (field), do the alignment update, just use
22341         only desired_align instead of MAX (type_align, desired_align)
22342         as the alignment.
22343         (place_field): Don't do known_align < desired_align handling
22344         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22345         is non-NULL, instead do it after rli->prev_field handling and
22346         only if not within a bitfield word.  For DECL_PACKED (field)
22347         use type_align of BITS_PER_UNIT.
22349 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
22351         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22352         superfluous parentheses and trailing spaces.
22354 2018-02-28  Richard Biener  <rguenther@suse.de>
22356         PR tree-optimization/84584
22357         * graphite-scop-detection.c (scop_detection::add_scop): Discard
22358         SCoPs with fake exit edge.
22360 2018-02-28  Martin Liska  <mliska@suse.cz>
22362         PR testsuite/84597
22363         * timevar.c (timer::print): Fix format to properly print 100%
22364         values.
22366 2018-02-28  Richard Biener  <rguenther@suse.de>
22368         PR middle-end/84607
22369         * genmatch.c (capture_info::walk_match): Do not mark
22370         captured expressions without operands as expr_p given
22371         they act more like predicates and should be subject to
22372         "lost tail" side-effect preserving.
22374 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
22376         PR rtl-optimization/81611
22377         * auto-inc-dec.c (attempt_change): Move dead note from
22378         mem_insn if it's the next use of regno
22379         (find_address): Take address use of reg holding
22380         non-incremented value.  Add parm to limit search to the named
22381         reg only.
22382         (merge_in_block): Attempt to use a mem insn that is the next
22383         use of the original regno.
22385 2018-02-27  Martin Sebor  <msebor@redhat.com>
22387         PR c++/83871
22388         * doc/invoke.texi (-Wmissing-attributes): New option.
22389         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22391 2018-02-27  Martin Sebor  <msebor@redhat.com>
22393         PR translation/84207
22394         * diagnostic-core.h (warning_n, error_n, inform_n): Change
22395         n argument to unsigned HOST_WIDE_INT.
22396         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22397         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
22398         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22399         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22401 2018-02-27  Richard Biener  <rguenther@suse.de>
22403         PR tree-optimization/84512
22404         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22405         Do not use the estimate returned from record_stmt_cost for
22406         the scalar iteration cost but sum properly using add_stmt_cost.
22408 2018-02-27  Richard Biener  <rguenther@suse.de>
22410         PR tree-optimization/84466
22411         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22412         Adjust last change to less strictly validate use operands.
22414 2018-02-27  Martin Liska  <mliska@suse.cz>
22416         PR gcov-profile/84548
22417         * gcov.c (process_file): Allow partial overlap and consider it
22418         also as group functions.
22419         (output_lines): Properly calculate range of lines for a group.
22421 2018-02-27  Martin Liska  <mliska@suse.cz>
22423         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22424         'ggc' suffixes.  Change first column width.
22425         (timer::print): Fix formatting of the column.
22427 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
22429         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22430         preserve inline entry blocks for the sake of debug inline
22431         entry point markers alone.
22432         (remove_unused_locals): Suggest in comments a better place to
22433         force the preservation of inline entry blocks that are
22434         otherwise unused, but do not preserve them.
22436 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
22438         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22440 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
22442         PR target/84039
22443         * config/i386/constraints.md (Bs): Replace
22444         ix86_indirect_branch_register with
22445         TARGET_INDIRECT_BRANCH_REGISTER.
22446         (Bw): Likewise.
22447         * config/i386/i386.md (indirect_jump): Likewise.
22448         (tablejump): Likewise.
22449         (*sibcall_memory): Likewise.
22450         (*sibcall_value_memory): Likewise.
22451         Peepholes of indirect call and jump via memory: Likewise.
22452         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22453         (*sibcall_value_GOT_32): Likewise.
22454         * config/i386/predicates.md (indirect_branch_operand): Likewise.
22455         (GOT_memory_operand): Likewise.
22456         (call_insn_operand): Likewise.
22457         (sibcall_insn_operand): Likewise.
22458         (GOT32_symbol_operand): Likewise.
22459         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22461 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
22463         PR rtl-optimization/83496
22464         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22465         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
22466         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22467         redundant insn, if any.
22468         (relax_delay_slots): Likewise.
22469         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22471 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
22473         PR tree-optimization/83965
22474         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22475         that grouped statements are part of a reduction chain.  Return
22476         true if the statement is not marked as a reduction itself but
22477         is part of a group.
22478         (vect_recog_dot_prod_pattern): Don't check whether the statement
22479         is part of a group here.
22480         (vect_recog_sad_pattern): Likewise.
22481         (vect_recog_widen_sum_pattern): Likewise.
22483 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
22485         PR debug/84545
22486         * final.c (rest_of_clean_state): Also look for calls inside sequences.
22488 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
22490         PR target/84530
22491         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22492         the bool argument.
22493         (ix86_output_indirect_function_return): New prototype.
22494         (ix86_split_simple_return_pop_internal): Likewise.
22495         * config/i386/i386.c (indirect_return_via_cx): New.
22496         (indirect_return_via_cx_bnd): Likewise.
22497         (indirect_thunk_name): Handle return va CX_REG.
22498         (output_indirect_thunk_function): Create alias for
22499         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22500         (ix86_output_indirect_jmp): Remove the bool argument.
22501         (ix86_output_indirect_function_return): New function.
22502         (ix86_split_simple_return_pop_internal): Likewise.
22503         * config/i386/i386.md (*indirect_jump): Don't pass false
22504         to ix86_output_indirect_jmp.
22505         (*tablejump_1): Likewise.
22506         (simple_return_pop_internal): Change it to define_insn_and_split.
22507         Call ix86_split_simple_return_pop_internal to split it for
22508         -mfunction-return=.
22509         (simple_return_indirect_internal): Call
22510         ix86_output_indirect_function_return instead of
22511         ix86_output_indirect_jmp.
22513 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
22515         PR bootstrap/84405
22516         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22517         memset and value initialization afterwards.
22519 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
22521         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22523 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22525         PR target/84521
22526         * common/config/aarch64/aarch64-common.c
22527         (aarch_option_optimization_table[]): Switch
22528         off fomit-frame-pointer
22530 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
22531             Chung-Ju Wu  <jasonwucj@gmail.com>
22533         * config/nds32/nds32-multiple.md (load_multiple): Disallow
22534         volatile memory.
22535         (store_multiple): Ditto.
22537 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
22539         * config.gcc: Add --with-cpu support for nds32 target.
22540         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22541         * config/nds32/nds32.opt: Add -mcpu= option.
22543 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
22545         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22546         isel=yes): Warn for these deprecated options.
22548 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
22550         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22551         ISA_2_5_MASKS_EMBEDDED.
22553 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
22555         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22556         p->max as pointers rather than using iterative_hash_expr.
22558 2018-02-23  Carl Love  <cel@us.ibm.com>
22560         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22561         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22562         BU_P8V_OVERLOAD_2.
22563         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22564         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22565         P8V_BUILTIN_VEC_VUNSIGNED2.
22567 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
22569         PR target/81572
22570         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22571         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22572         LRA_UNKNOWN_ALT.
22573         * lra-constraints.c (curr_insn_transform): Set up
22574         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
22575         LRA_UNKNOWN_ALT.
22576         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22577         * lra-eliminations.c (spill_pseudos): Ditto.
22578         (process_insn_for_elimination): Ditto.
22579         * lra-lives.c (reg_early_clobber_p): Use the new macros.
22580         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22581         LRA_NON_CLOBBERED_ALT.
22583 2018-02-22  Martin Sebor  <msebor@redhat.com>
22585         PR tree-optimization/84480
22586         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22587         to maybe_diag_stxncpy_trunc.  Call it.
22588         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22589         from gimple_fold_builtin_strcpy.  Print inlining stack.
22590         (handle_builtin_stxncpy): Print inlining stack.
22591         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22593 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
22595         PR target/84176
22596         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22597         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22598         and -fcheck-pointer-bounds are used together.
22599         (indirect_thunk_prefix): New enum.
22600         (indirect_thunk_need_prefix): New function.
22601         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
22602         "_nt" instead of "_bnd" for NOTRACK prefix.
22603         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22604         (output_indirect_thunk_function): Likewise.
22605         (): Likewise.
22606         (ix86_code_end): Update output_indirect_thunk_function calls.
22607         (ix86_output_indirect_branch_via_reg): Replace
22608         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22609         (ix86_output_indirect_branch_via_push): Likewise.
22610         (ix86_output_function_return): Likewise.
22611         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22612         incompatible with -fcf-protection=branch and
22613         -fcheck-pointer-bounds.
22615 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
22617         PR target/83335
22618         * config/aarch64/aarch64.c (aarch64_print_address_internal):
22619         Change gcc_assert call to output_operand_lossage.
22621 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
22623         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22625 2018-02-22  DJ Delorie  <dj@redhat.com>
22626             Sebastian Perta  <sebastian.perta@renesas.com>
22627             Oleg Endo  <olegendo@gcc.gnu.org>
22629         * config/rx/rx.c (rx_rtx_costs): New function.
22630         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22632 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22634         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22636 2018-02-22  Martin Liska  <mliska@suse.cz>
22638         PR driver/83193
22639         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22640         Add "native" as a possible value.
22642 2018-02-22  Martin Liska  <mliska@suse.cz>
22644         PR driver/83193
22645         * config/i386/i386.c (ix86_option_override_internal):
22646         Add "native" as a possible value for -march and -mtune.
22648 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
22650         PR target/84502
22651         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22652         to all type variants.
22654         PR tree-optimization/84503
22655         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22656         width as info->bitpos + info->bitsize - start.
22657         (merged_store_group::merge_overlapping): Simplify width computation.
22658         (check_no_overlap): New function.
22659         (imm_store_chain_info::try_coalesce_bswap): Compute expected
22660         start + width and last_order of the group, fail if check_no_overlap
22661         fails.
22662         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22663         to group if check_no_overlap fails.
22665 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
22667         * config/rs6000/altivec.md: Delete contraint arguments to
22668         define_expand, define_split, and define_peephole2, and in
22669         define_insn_and_split if always unused.
22670         * config/rs6000/darwin.md: Ditto.
22671         * config/rs6000/dfp.md: Ditto.
22672         * config/rs6000/rs6000.md: Ditto.
22673         * config/rs6000/sync.md: Ditto.
22674         * config/rs6000/vector.md: Ditto.
22675         * config/rs6000/vsx.md: Ditto.
22677 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
22679         * config/rs6000/altivec.md: Write output control strings as braced
22680         blocks instead of double-quoted strings.
22681         * config/rs6000/darwin.md: Ditto.
22682         * config/rs6000/rs6000.md: Ditto.
22683         * config/rs6000/vector.md: Ditto.
22684         * config/rs6000/vsx.md: Ditto.
22686 2018-02-21  Jason Merrill  <jason@redhat.com>
22688         PR c++/84314 - ICE with templates and fastcall attribute.
22689         * attribs.c (build_type_attribute_qual_variant): Remove assert.
22691 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
22693         * ipa-cp.c (determine_versionability): Fix comment typos.
22695 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
22697         PR c/84229
22698         * ipa-cp.c (determine_versionability): Do not version functions caling
22699         va_arg_pack.
22701 2018-02-21  Martin Liska  <mliska@suse.cz>
22703         PR driver/83193
22704         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22705         Add "native" as a possible value.
22706         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
22707         the macro when native cpu detection is available.
22709 2018-02-21  Martin Liska  <mliska@suse.cz>
22711         PR driver/83193
22712         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22713         Add "native" as a possible value.
22714         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22715         when native cpu detection is available.
22717 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
22718             Martin Sebor  <msebor@redhat.com>
22720         PR tree-optimization/84478
22721         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22722         false.
22723         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22724         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22725         support which is conservatively correct, for 2 only stay conservative
22726         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
22727         argument to the 2 argument get_range_strlen, adjust 6 arg
22728         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22729         false.
22730         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22731         (gimple_fold_builtin_strlen): Pass true as last argument to
22732         get_range_strlen.
22734 2018-02-20  Martin Sebor  <msebor@redhat.com>
22736         PR middle-end/84095
22737         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22738         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
22739         (builtin_memref::builtin_memref): Factor out parts into
22740         set_base_and_offset and call it.
22742 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
22744         PR middle-end/84406
22745         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22746         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22747         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
22748         search at the associated MODE_INT.
22750 2018-02-20  Jeff Law  <law@redhat.com>
22752         PR middle-end/82123
22753         PR tree-optimization/81592
22754         PR middle-end/79257
22755         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22756         for range data rather than using global data.
22757         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22758         range data rather than using global data.
22759         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22760         pass it to children as needed.
22761         (struct directive::fmtresult): Similarly.
22762         (struct directive::set_width): Similarly.
22763         (struct directive::set_precision): Similarly.
22764         (format_integer, format_directive, parse_directive): Similarly.
22765         (format_none): Accept unnamed vr_values parameter.
22766         (format_percent, format_floating, format_character): Similarly.
22767         (format_string, format_plain): Similarly.
22768         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22769         the EVRP range analyzer for range data rather than using global data.
22770         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22771         gimple-ssa-evrp-analyze.h
22772         (class sprintf_dom_walker): Add after_dom_children member function.
22773         Add evrp_range_analyzer member.
22774         (sprintf_dom_walker::before_dom_children): Call into the EVRP
22775         range analyzer as needed.
22776         (sprintf_dom_walker::after_dom_children): New member function.
22777         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22778         if not optimizing.
22779         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22780         (evrp_range_analyzer::pop_to_marker): Likewise.
22782 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
22784         PR tree-optimization/84419
22785         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22786         with the required type if its current type is compatible but
22787         different.
22789 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
22791         PR middle-end/82004
22792         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22793         after vectorization.
22795 2018-02-20  Martin Liska  <mliska@suse.cz>
22797         PR driver/83193
22798         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22799         possible values if we don't have a hint.
22801 2018-02-20  Martin Liska  <mliska@suse.cz>
22803         PR c/84310
22804         PR target/79747
22805         * final.c (shorten_branches): Build align_tab array with one
22806         more element.
22807         * opts.c (finish_options): Add alignment option limit check.
22808         (MAX_CODE_ALIGN): Likewise.
22809         (MAX_CODE_ALIGN_VALUE): Likewise.
22810         * doc/invoke.texi: Document maximum allowed option value for
22811         all -falign-* options.
22813 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
22815         PR target/84146
22816         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22817         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22818         * var-tracking.c (emit_note_insn_var_location): Remove all references
22819         to NOTE_INSN_CALL_ARG_LOCATION.
22820         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22821         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22822         Use copy_rtx_if_shared.
22823         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22824         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22825         (dwarf2out_var_location): Remove handling of
22826         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22827         on call_insn.
22828         * final.c (final_scan_insn): Remove all references to
22829         NOTE_INSN_CALL_ARG_LOCATION.
22830         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
22831         before dumping final insns.
22832         * except.c (emit_note_eh_region_end): Remove all references to
22833         NOTE_INSN_CALL_ARG_LOCATION.
22834         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22835         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22836         * config/arc/arc.c (hwloop_optimize): Likewise.
22837         * config/arm/arm.c (create_fix_barrier): Likewise.
22838         * config/s390/s390.c (s390_chunkify_start): Likewise.
22839         * config/sh/sh.c (find_barrier): Likewise.
22840         * config/i386/i386.c (rest_of_insert_endbranch,
22841         ix86_seh_fixup_eh_fallthru): Likewise.
22842         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22843         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22844         * config/frv/frv.c (frv_function_prologue): Likewise.
22845         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
22846         reg note.
22847         (note_outside_basic_block_p): Remove all references to
22848         NOTE_INSN_CALL_ARG_LOCATION.
22849         * gengtype.c (adjust_field_rtx_def): Likewise.
22850         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22851         Likewise.
22852         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22853         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22855         PR c++/84444
22856         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22857         is ADDR_EXPR.
22859         PR tree-optimization/84452
22860         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22861         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22862         is NULL.
22864 2018-02-19  Martin Liska  <mliska@suse.cz>
22866         PR sanitizer/82183
22867         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22869 2018-02-19  Martin Liska  <mliska@suse.cz>
22870             Richard Sandiford  <richard.sandiford@linaro.org>
22872         PR tree-optimization/82491
22873         * gimple-fold.c (get_base_constructor): Make earlier bail out
22874         to prevent ubsan.
22876 2018-02-19  Carl Love  <cel@us.ibm.com>
22878         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22879         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22880         BU_P8V_OVERLOAD_1.
22881         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22882         P8V_BUILTIN_VEC_NEG.
22884 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
22886         * config/rl78/rl78.md (movdf): New define expand.
22888 2018-02-19  Martin Liska  <mliska@suse.cz>
22890         PR other/80589
22891         * doc/invoke.texi: Fix typo.
22892         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22894 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
22896         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22897         handle rs6000_single_float and rs6000_double_float specially for
22898         e500 family CPUs.
22900 2018-02-16  Jeff Law  <law@redhat.com>
22902         * config/rx/rx.c (add_pop_cfi_notes): New function.;
22903         (pop_regs): Use it.
22905 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
22907         PR ipa/84425
22908         * ipa-inline.c (inline_small_functions): Fix a typo.
22910 2018-02-16  Nathan Sidwell  <nathan@acm.org>
22912         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22914 2018-02-16  Carl Love  <cel@us.ibm.com>
22916         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22917         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22918         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22919         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22920         expansion to P8V_BUILTIN_VEC_FLOAT2.
22922 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
22924         PR rtl-optimization/70023
22925         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22926         src_regno into account.
22928 2018-02-16  Carl Love  <cel@us.ibm.com>
22930         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
22931         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
22932         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
22933         * config/rs6000/rs6000.c: Remove case statements for
22934         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
22935         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
22936         and P9V_BUILTIN_VEC_VINSERT4B.
22937         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
22938         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
22939         * config/rs6000/vsx.md:
22940         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
22941         vec_insert4b.
22943 2018-02-16  Carl Love  <cel@us.ibm.com>
22945         * config/rs6000/altivec.h: Add builtin names vec_extract4b
22946         vec_insert4b.
22947         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
22948         definitions.
22949         * config/rs6000/rs6000-c.c: Add the definitions for
22950         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
22951         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
22952         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
22953         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
22954         definition for insert4b and define insn *insert3b_internal.
22955         * doc/extend.texi: Add documentation for vec_extract4b.
22957 2018-02-16  Nathan Sidwell  <nathan@acm.org>
22959         * doc/extend.texi (Backwards Compatibility): Mention friend
22960         injection.  Note for-scope is deprecated.
22961         * doc/invoke.texi (-ffriend-injection): Deprecate.
22963 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
22965         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
22966         that moved to I2, also allow destinations that are a paradoxical
22967         subreg (instead of a normal reg).
22969 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
22971         PR target/83831
22972         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
22973         to QImode.
22975 2018-02-16  Richard Biener  <rguenther@suse.de>
22977         PR tree-optimization/84037
22978         PR tree-optimization/84016
22979         PR target/82862
22980         * config/i386/i386.c (ix86_builtin_vectorization_cost):
22981         Adjust vec_construct for the fact we need additional higher latency
22982         128bit inserts for AVX256 and AVX512 vector builds.
22983         (ix86_add_stmt_cost): Scale vector construction cost for
22984         elementwise loads.
22986 2018-02-16  Richard Biener  <rguenther@suse.de>
22988         PR tree-optimization/84417
22989         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
22990         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
22991         (non_rewritable_lvalue_p): Likewise, use poly-ints.
22993 2018-02-16  Martin Liska  <mliska@suse.cz>
22995         PR sanitizer/84307
22996         * internal-fn.def (ASAN_CHECK): Set proper flags.
22997         (ASAN_MARK): Likewise.
22999 2018-02-16  Julia Koval  <julia.koval@intel.com>
23001         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
23002         from PTA_CANNONLAKE.
23004 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
23006         PR target/84272
23007         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
23008         Use ++iter rather than iter++ for std::list iterators.
23009         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
23010         defer deleting them until all nodes in the forest are processed.  Do
23011         free even leaf nodes.  Change to_process into auto_vec.
23013         PR bootstrap/84405
23014         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
23015         * vec.h (vec_default_construct): Use memset instead of placement new
23016         if BROKEN_VALUE_INITIALIZATION is defined.
23017         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
23018         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
23019         is defined.
23021         PR rtl-optimization/83723
23022         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
23023         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
23024         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
23025         recursive calls.
23026         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
23027         callers.
23028         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
23030 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
23032         PR rtl-optimization/81443
23033         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
23034         from inner REGs to paradoxical SUBREGs.
23036 2018-02-16  Richard Biener  <rguenther@suse.de>
23038         PR tree-optimization/84399
23039         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23040         For operands we can analyze at their definition make sure we can
23041         analyze them at each use as well.
23043 2018-02-16  Richard Biener  <rguenther@suse.de>
23045         PR tree-optimization/84190
23046         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
23047         volatile accesses if the decl isn't volatile.
23049 2018-02-15  Jason Merrill  <jason@redhat.com>
23051         PR c++/84314 - ICE with templates and fastcall attribute.
23052         * attribs.c (build_type_attribute_qual_variant): Don't clobber
23053         TYPE_CANONICAL on an existing type.
23055 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
23057         PR tree-optimization/84383
23058         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
23059         dstoff nor call operand_equal_p if dstbase is NULL.
23061         PR tree-optimization/84334
23062         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
23063         also a CONSTANT_CLASS_P, punt.
23065 2018-02-14  Jim Wilson  <jimw@sifive.com>
23067         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
23068         first SMALL_OPERAND check.  New local min_second_step.  Move assert
23069         to where locals are set.  Add TARGET_RVC support.
23070         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
23072 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
23074         * doc/invoke.texi: Correct -Wformat-overflow code sample.
23076 2018-02-14  Martin Sebor  <msebor@redhat.com>
23078         PR tree-optimization/83698
23079         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
23080         arrays constrain the offset range to their bounds.
23081         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
23082         (builtin_access::overlap): Avoid setting the size of overlap if it's
23083         already been set.
23084         (maybe_diag_overlap): Also consider arrays when deciding what values
23085         of offsets to include in diagnostics.
23087 2018-02-14  Martin Sebor  <msebor@redhat.com>
23089         PR c/84108
23090         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
23091         that correspond to the kind of a declaration.
23093 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
23095         PR target/83984
23096         * config/pa/pa.md: Load address of PIC label using the linkage table
23097         if the label is nonlocal.
23099 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23101         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
23102         warning message if user requests -maltivec=be.
23103         * doc/invoke.texi: Document deprecation of -maltivec=be.
23105 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
23107         PR target/84220
23108         * config/rs6000/rs6000-c.c: Update definitions for
23109         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
23110         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
23112 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
23114         PR target/84239
23115         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
23116         add _get_ssp intrinsics. Remove argument from
23117         __builtin_ia32_rdssp[d|q].
23118         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
23119         * config/i386/i386-builtin.def: Remove argument from
23120         __builtin_ia32_rdssp[d|q].
23121         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
23122         ix86_expand_special_args_builtin for _rdssp[d|q].
23123         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
23124         Clear register before usage.
23125         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
23126         Add documentation for new _get_ssp and _inc_ssp intrinsics.
23128 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
23130         PR tree-optimization/84357
23131         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
23132         operand 1 of an ARRAY_REF too.
23134 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
23136         PR target/83831
23137         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
23138         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23139         declarations.
23140         (set_of_reg): New struct.
23141         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
23142         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
23143         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23144         functions.
23145         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
23146         Split into bitclr, bitset, bitinvert patterns if appropriate.
23147         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
23148         use rx_fuse_in_memory_bitop.
23149         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
23150         to named insn, correct maximum insn length.
23152 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
23154         PR target/79242
23155         * machmode.def: Define a complex mode for PARTIAL_INT.
23156         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
23157         MODE_PARTIAL_INT.
23158         * doc/rtl.texi: Document CSPImode.
23159         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
23160         handling.
23161         (msp430_hard_regno_nregs_with_padding): Likewise.
23163 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
23165         PR target/84279
23166         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
23168 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
23170         PR rtl-optimization/84169
23171         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
23172         we generated a parallel as new i3 and we split that to new i2 and i3
23173         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
23174         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
23175         those to i2, not i1.  Partially rewrite this scan code.
23177 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
23179         PR c/82210
23180         * stor-layout.c (place_field): For variable length fields, adjust
23181         offset_align afterwards not just based on the field's alignment,
23182         but also on the size.
23184         PR middle-end/84309
23185         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
23186         of exps and logs in the use_exp2 case.
23188 2018-02-13  Jeff Law  <law@redhat.com>
23190         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
23191         entry for "vector".
23193         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
23194         ARGS as unused.
23196 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
23198         PR debug/84342
23199         PR debug/84319
23200         * common.opt (gas-loc-support, gas-locview-support): New.
23201         (ginline-points, ginternal-reset-location-views): New.
23202         * doc/invoke.texi: Document them.  Use @itemx where intended.
23203         (gvariable-location-views): Adjust.
23204         * target.def (reset_location_view): New.
23205         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
23206         (TARGET_RESET_LOCATION_VIEW): New.
23207         * doc/tm.texi: Rebuilt.
23208         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
23209         (dwarf2out_default_as_locview_support): New.
23210         (output_asm_line_debug_info): Use option variables.
23211         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23212         (output_loc_list): Likewise.
23213         (add_high_low_attributes): Check option variables.
23214         Don't output entry view attribute in strict mode.
23215         (gen_inlined_subroutine_die): Check option variables.
23216         (dwarf2out_inline_entry): Likewise.
23217         (init_sections_and_labels): Likewise.
23218         (dwarf2out_early_finish): Likewise.
23219         (maybe_reset_location_view): New, from...
23220         (dwarf2out_var_location): ... here.  Call it.
23221         * debug.h (dwarf2out_default_as_loc_support): Declare.
23222         (dwarf2out_default_as_locview_support): Declare.
23223         * hooks.c (hook_int_rtx_insn_0): New.
23224         * hooks.h (hook_int_rtx_insn_0): Declare.
23225         * toplev.c (process_options): Take -gas-loc-support and
23226         -gas-locview-support from dwarf2out.  Enable
23227         -gvariable-location-views by default only with locview
23228         assembler support.  Enable -ginternal-reset-location-views by
23229         default only if the target defines the corresponding hook.
23230         Enable -ginline-points by default if location views are
23231         enabled; force it disabled if statement frontiers are
23232         disabled.
23233         * tree-inline.c (expand_call_inline): Check option variables.
23234         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23236 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
23238         PR tree-optimization/84321
23239         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23240         handling.  Also check whether the anti-range contains any values
23241         that satisfy the mask; switch to a VR_RANGE if not.
23243 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
23245         PR sanitizer/84340
23246         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23248 2018-02-13  Martin Jambor  <mjambor@suse.cz>
23250         PR c++/83990
23251         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23252         of call statements, also set location of a load to a temporary.
23254 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
23256         * config/rl78/rl78.c (add_vector_labels): New function.
23257         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23258         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23259         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23260         which checks that no arguments are passed.
23261         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23262         * doc/extend.texi: Documentation for the new attribute.
23264 2018-02-13  Andreas Schwab  <schwab@suse.de>
23266         * config/riscv/linux.h (CPP_SPEC): Define.
23268 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
23270         PR target/84335
23271         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23272         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23273         OPTION_MASK_ISA_AES as first argument to def_builtin_const
23274         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23275         instead of OPTION_MASK_ISA_PCLMUL as first argument to
23276         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23277         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23278         temporarily for AES and PCLMUL builtins.
23280         PR tree-optimization/84339
23281         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23282         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23283         Formatting fixes.
23285         PR middle-end/84309
23286         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23287         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23288         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23289         inline function.
23290         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23291         inline function.
23292         * omp-simd-clone.h: New file.
23293         * omp-simd-clone.c: Include omp-simd-clone.h.
23294         (expand_simd_clones): No longer static.
23295         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23296         cgraph.h and omp-simd-clone.h.
23297         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23298         (vect_recog_widen_shift_pattern): Formatting fix.
23299         (vect_pattern_recog_1): Don't check optab for calls.
23301         PR target/84336
23302         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23303         operands[2] into a REG before using gen_lowpart on it.
23305 2018-02-12  Jeff Law  <law@redhat.com>
23307         PR target/83760
23308         * config/sh/sh.c (find_barrier): Consider a sibling call
23309         a barrier as well.
23311         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23312         successfully back substituting a reg.
23314 2018-02-12  Richard Biener  <rguenther@suse.de>
23316         PR tree-optimization/84037
23317         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23318         parameter, move visited init to caller.
23319         (vect_slp_analyze_operations): Separate cost from validity
23320         check, initialize visited once for all instances.
23321         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23322         for all instances.
23323         * tree-vect-stmts.c (vect_model_simple_cost): Make early
23324         out an assert.
23325         (vect_model_promotion_demotion_cost): Likewise.
23326         (vectorizable_bswap): Guard cost modeling with !slp_node
23327         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23328         SLP stmts.
23329         (vectorizable_call): Likewise.
23330         (vectorizable_conversion): Likewise.
23331         (vectorizable_assignment): Likewise.
23332         (vectorizable_shift): Likewise.
23333         (vectorizable_operation): Likewise.
23334         (vectorizable_store): Likewise.
23335         (vectorizable_load): Likewise.
23336         (vectorizable_condition): Likewise.
23337         (vectorizable_comparison): Likewise.
23339 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
23341         PR sanitizer/84307
23342         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23343         (ASAN_MARK): Fix fnspec to account for return value, change pointer
23344         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23346 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
23348         PR middle-end/83665
23349         * params.def (inline-min-speedup): Increase from 8 to 15.
23350         (max-inline-insns-auto): Decrease from 40 to 30.
23351         * ipa-split.c (consider_split): Add some buffer for function to
23352         be considered inlining candidate.
23353         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23354         default values.
23356 2018-02-12  Richard Biener  <rguenther@suse.de>
23358         PR tree-optimization/84037
23359         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23360         matched stmts if we cannot swap the non-matched ones.
23362 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
23364         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23365         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23366         _mm_maskz_scalef_round_ss): New intrinsics.
23367         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23368         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23369         __builtin_ia32_scalefss_round): Remove.
23370         (__builtin_ia32_scalefsd_mask_round,
23371         __builtin_ia32_scalefss_mask_round): New intrinsics.
23372         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23373         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23374         ((match_operand:VF_128 2 "<round_nimm_predicate>"
23375         "<round_constraint>")): Changed to ...
23376         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23377         "<round_scalar_constraint>")): ... this.
23378         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23379         %0, %1, %2<round_op3>}"): Changed to ...
23380         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23381         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23382         %2<round_scalar_mask_op3>}"): ... this.
23383         * config/i386/subst.md (round_scalar_nimm_predicate): New.
23385 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
23387         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23388         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23389         (_mm_maskz_sqrt_round_ss): New intrinsics.
23390         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23391         (__builtin_ia32_sqrtsd_mask_round)
23392         (__builtin_ia32_sqrtss_mask_round): New builtins.
23393         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23394         (__builtin_ia32_sqrtss_round): Remove.
23395         (__builtin_ia32_sqrtsd_mask_round)
23396         (__builtin_ia32_sqrtss_mask_round): New builtins.
23397         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23398         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23399         ((match_operand:VF_128 1 "vector_operand"
23400         "xBm,<round_constraint>")): Changed to ...
23401         ((match_operand:VF_128 1 "vector_operand"
23402         "xBm,<round_scalar_constraint>")): ... this.
23403         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23404         %0, %2, %<iptr>1<round_op3>}): Changed to ...
23405         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23406         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23407         %<iptr>1<round_scalar_mask_op3>}): ... this.
23408         ((set_attr "prefix" "<round_prefix>")): Changed to ...
23409         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23411 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
23413         PR target/84266
23414         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23415         Cast vec_cmpeq result to correct type.
23416         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23417         Cast vec_cmpgt result to correct type.
23419 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
23421         * final.c (final_scan_insn_1): Renamed from...
23422         (final_scan_insn): ... this.  New wrapper, to recover
23423         seen from the outermost call in recursive ones.
23424         * config/sparc/sparc.c (output_return): Drop seen from call.
23425         (output_sibcall): Likewise.
23426         * config/visium/visium.c (output_branch): Likewise.
23428 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
23430         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23431         function label.
23433 2018-02-10  Alan Modra  <amodra@gmail.com>
23435         PR target/84300
23436         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23437         Specify LR as an input.
23439 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
23441         PR sanitizer/83987
23442         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23443         remove_member_access_dummy_vars): New functions.
23444         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23445         lower_omp_1, execute_lower_omp): Use them.
23447         PR rtl-optimization/84308
23448         * shrink-wrap.c (spread_components): Release todo vector.
23450 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
23452         PR rtl-optimization/57193
23453         * ira-color.c (struct allocno_color_data): Add member
23454         conflict_allocno_hard_prefs.
23455         (update_conflict_allocno_hard_prefs): New.
23456         (bucket_allocno_compare_func): Add a preference based on
23457         conflict_allocno_hard_prefs.
23458         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23459         (color_allocnos): Remove a dead code.  Initiate
23460         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
23462 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
23464         PR target/84226
23465         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23466         constraint from =wa to wa.  Avoid a subreg on the output operand,
23467         instead use a pseudo and subreg it in a move.
23468         (p9_xxbrd_<mode>): Changed to ...
23469         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23470         (p9_xxbrd_v2df): New expander.
23471         (p9_xxbrw_<mode>): Changed to ...
23472         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23473         (p9_xxbrw_v4sf): New expander.
23475 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
23477         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23479 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
23481         PR target/83926
23482         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23483         multiply in 32-bit mode.
23484         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23485         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23486         mode.
23488 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
23490         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23491         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23492         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23493         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23495 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
23497         PR lto/84213
23498         * dwarf2out.c (is_trivial_indirect_ref): New function.
23499         (dwarf2out_late_global_decl): Do not generate a location
23500         attribute for variables that have a non-trivial DECL_VALUE_EXPR
23501         and that are not defined in the current unit.
23503 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
23505         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23506         instead of a libcall for UNORDERED.
23508 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
23510         PR target/82641
23511         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23512         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23514 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23516         PR target/PR84295
23517         * config/s390/s390.c (s390_set_current_function): Invoke
23518         s390_indirect_branch_settings also if fndecl didn't change.
23520 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
23522         * config/rs6000/rs6000.md (blockage): Set length to zero.
23524 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
23526         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23528 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
23530         PR sanitizer/84285
23531         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23532         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23533         -static-lib*san.
23535         PR debug/84252
23536         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23537         PARALLEL incoming that failed vt_get_decl_and_offset check.
23539         PR middle-end/84237
23540         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23541         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23542         TREE_READONLY bit.
23543         (get_variable_section): For decls in named .bss* sections pass true as
23544         second argument to bss_initializer_p.
23546 2018-02-09  Marek Polacek  <polacek@redhat.com>
23547             Jakub Jelinek  <jakub@redhat.com>
23549         PR c++/83659
23550         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23551         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
23552         Sync some changes from cxx_fold_indirect_ref.
23554 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
23556         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23557         markers.
23558         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23559         (BLOCK_INLINE_ENTRY_LABEL): New.
23560         (dwarf2out_var_location): Disregard inline entry markers.
23561         (inline_entry_data): New struct.
23562         (inline_entry_data_hasher): New hashtable type.
23563         (inline_entry_data_hasher::hash): New.
23564         (inline_entry_data_hasher::equal): New.
23565         (inline_entry_data_table): New variable.
23566         (add_high_low_attributes): Add DW_AT_entry_pc and
23567         DW_AT_GNU_entry_view attributes if a pending entry is found
23568         in inline_entry_data_table.  Add old entry_pc attribute only
23569         if debug nonbinding markers are disabled.
23570         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23571         markers are enabled.
23572         (block_within_block_p, dwarf2out_inline_entry): New.
23573         (dwarf2out_finish): Check that no entries remained in
23574         inline_entry_data_table.
23575         * final.c (reemit_insn_block_notes): Handle inline entry notes.
23576         (final_scan_insn, notice_source_line): Likewise.
23577         (rest_of_clean_state): Skip inline entry markers.
23578         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23579         markers.
23580         * gimple.c (gimple_build_debug_inline_entry): New.
23581         * gimple.h (enum gimple_debug_subcode): Add
23582         GIMPLE_DEBUG_INLINE_ENTRY.
23583         (gimple_build_debug_inline_entry): Declare.
23584         (gimple_debug_inline_entry_p): New.
23585         (gimple_debug_nonbind_marker_p): Adjust.
23586         * insn-notes.def (INLINE_ENTRY): New.
23587         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23588         inline entry marker notes.
23589         (print_insn): Likewise.
23590         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23591         (INSN_DEBUG_MARKER_KIND): Likewise.
23592         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23593         * tree-inline.c (expand_call_inline): Build and insert
23594         debug_inline_entry stmt.
23595         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23596         inline entry blocks early, if nonbind markers are enabled.
23597         (dump_scope_block): Dump fragment info.
23598         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23599         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23600         (gimple_build_debug_inline_entry): New.
23601         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23602         Enable/disable inline entry points too.
23603         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23604         (DEBUG_INSN): Describe inline entry markers.
23606         * common.opt (gvariable-location-views): New.
23607         (gvariable-location-views=incompat5): New.
23608         * config.in: Rebuilt.
23609         * configure: Rebuilt.
23610         * configure.ac: Test assembler for view support.
23611         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23612         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23613         * dwarf2out.c (var_loc_view): New typedef.
23614         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23615         (dwarf2out_locviews_in_attribute): New.
23616         (dwarf2out_locviews_in_loclist): New.
23617         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23618         (enum dw_line_info_opcode): Add LI_adv_address.
23619         (struct dw_line_info_table): Add view.
23620         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23621         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23622         (zero_view_p): New variable.
23623         (ZERO_VIEW_P): New macro.
23624         (output_asm_line_debug_info): New.
23625         (struct var_loc_node): Add view.
23626         (add_AT_view_list, AT_loc_list): New.
23627         (add_var_loc_to_decl): Add view param.  Test it against last.
23628         (new_loc_list): Add view params.  Record them.
23629         (AT_loc_list_ptr): Handle loc and view lists.
23630         (view_list_to_loc_list_val_node): New.
23631         (print_dw_val): Handle dw_val_class_view_list.
23632         (size_of_die): Likewise.
23633         (value_format): Likewise.
23634         (loc_list_has_views): New.
23635         (gen_llsym): Set vl_symbol too.
23636         (maybe_gen_llsym, skip_loc_list_entry): New.
23637         (dwarf2out_maybe_output_loclist_view_pair): New.
23638         (output_loc_list): Output view list or entries too.
23639         (output_view_list_offset): New.
23640         (output_die): Handle dw_val_class_view_list.
23641         (output_dwarf_version): New.
23642         (output_compilation_unit_header): Use it.
23643         (output_skeleton_debug_sections): Likewise.
23644         (output_rnglists, output_line_info): Likewise.
23645         (output_pubnames, output_aranges): Update version comments.
23646         (output_one_line_info_table): Output view numbers in asm comments.
23647         (dw_loc_list): Determine current endview, pass it to new_loc_list.
23648         Call maybe_gen_llsym.
23649         (loc_list_from_tree_1): Adjust.
23650         (add_AT_location_description): Create view list attribute if
23651         needed, check it's absent otherwise.
23652         (convert_cfa_to_fb_loc_list): Adjust.
23653         (maybe_emit_file): Call output_asm_line_debug_info for test.
23654         (dwarf2out_var_location): Reset views as needed.  Precompute
23655         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
23656         attribute.  Set view.
23657         (new_line_info_table): Reset next view.
23658         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23659         (dwarf2out_source_line): Likewise.  Output view resets and labels to
23660         the assembler, or select appropriate line info opcodes.
23661         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23662         (optimize_string_length): Catch it.  Adjust.
23663         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
23664         dw_val_class_view_list, and remove it if no longer needed.
23665         (hash_loc_list): Hash view numbers.
23666         (loc_list_hasher::equal): Compare them.
23667         (optimize_location_lists): Check whether a view list symbol is
23668         needed, and whether the locview attribute is present, and
23669         whether they match.  Remove the locview attribute if no longer
23670         needed.
23671         (index_location_lists): Call skip_loc_list_entry for test.
23672         (dwarf2out_finish): Call output_asm_line_debug_info for test.
23673         Use output_dwarf_version.
23674         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23675         (struct dw_val_node): Add val_view_list.
23676         * final.c (SEEN_NEXT_VIEW): New.
23677         (set_next_view_needed): New.
23678         (clear_next_view_needed): New.
23679         (maybe_output_next_view): New.
23680         (final_start_function): Rename to...
23681         (final_start_function_1): ... this.  Take pointer to FIRST,
23682         add SEEN parameter.  Emit param bindings in the initial view.
23683         (final_start_function): Reintroduce SEEN-less interface.
23684         (final): Rename to...
23685         (final_1): ... this.  Take SEEN parameter.  Output final pending
23686         next view at the end.
23687         (final): Reintroduce seen-less interface.
23688         (final_scan_insn): Output pending next view before switching
23689         sections or ending a block.  Mark the next view as needed when
23690         outputting variable locations.  Notify debug backend of section
23691         changes, and of location view changes.
23692         (rest_of_handle_final): Adjust.
23693         * toplev.c (process_options): Autodetect value for debug variable
23694         location views option.  Warn on incompat5 without -gdwarf-5.
23695         * doc/invoke.texi (gvariable-location-views): New.
23696         (gvariable-location-views=incompat5): New.
23697         (gno-variable-location-views): New.
23699 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
23701         PR tree-optimization/84136
23702         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23703         that the result of find_edge is non-NULL.
23705 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
23707         PR target/83008
23708         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23709         storing integer register in SImode.  Fix cost of 256 and 512
23710         byte aligned SSE register store.
23712 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
23714         * config/i386/i386.c (ix86_multiplication_cost): Fix
23715         multiplication cost for TARGET_AVX512DQ.
23717 2018-02-08  Marek Polacek  <polacek@redhat.com>
23719         PR tree-optimization/84238
23720         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23721         get_range_strlen.
23723 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23725         PR tree-optimization/84265
23726         * tree-vect-stmts.c (vectorizable_store): Don't treat
23727         VMAT_CONTIGUOUS accesses as grouped.
23728         (vectorizable_load): Likewise.
23730 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23732         PR tree-optimization/81635
23733         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23734         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23735         (test_round_for_mask): New functions.
23736         (wide_int_cc_tests): Call test_round_for_mask.
23737         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23738         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23739         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23740         range returned by get_range_info.
23742 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
23744         PR ipa/81360
23745         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23746         * symtab.c: Include builtins.h
23747         (symtab_node::output_to_lto_symbol_table_p): Move here
23748         from lto-streamer-out.c:output_symbol_p.
23749         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23750         (output_symbol_p): Move all logic to symtab.c
23751         (produce_symtab): Update.
23753 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23755         * config/s390/s390-opts.h (enum indirect_branch): Define.
23756         * config/s390/s390-protos.h (s390_return_addr_from_memory)
23757         (s390_indirect_branch_via_thunk)
23758         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23759         (enum s390_indirect_branch_type): Define.
23760         * config/s390/s390.c (struct s390_frame_layout, struct
23761         machine_function): Remove.
23762         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23763         (indirect_branch_table_label_no, indirect_branch_table_name):
23764         Define variables.
23765         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23766         (enum s390_indirect_branch_option): Define.
23767         (s390_return_addr_from_memory): New function.
23768         (s390_handle_string_attribute): New function.
23769         (s390_attribute_table): Add new attribute handler.
23770         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23771         (s390_indirect_branch_via_thunk): New function.
23772         (s390_indirect_branch_via_inline_thunk): New function.
23773         (s390_function_ok_for_sibcall): When jumping via thunk disallow
23774         sibling call optimization for non z10 compiles.
23775         (s390_emit_call): Force indirect branch target to be a single
23776         register.  Add r1 clobber for non-z10 compiles.
23777         (s390_emit_epilogue): Emit return jump via return_use expander.
23778         (s390_reorg): Handle JUMP_INSNs as execute targets.
23779         (s390_option_override_internal): Perform validity checks for the
23780         new command line options.
23781         (s390_indirect_branch_attrvalue): New function.
23782         (s390_indirect_branch_settings): New function.
23783         (s390_set_current_function): Invoke s390_indirect_branch_settings.
23784         (s390_output_indirect_thunk_function):  New function.
23785         (s390_code_end): Implement target hook.
23786         (s390_case_values_threshold): Implement target hook.
23787         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23788         macros.
23789         * config/s390/s390.h (struct s390_frame_layout)
23790         (struct machine_function): Move here from s390.c.
23791         (TARGET_INDIRECT_BRANCH_NOBP_RET)
23792         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23793         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23794         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23795         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23796         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23797         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23798         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23799         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23800         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23801         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23802         (mnemonic attribute): Add values which aren't recognized
23803         automatically.
23804         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23805         pattern for branch conversion.  Fix mnemonic attribute.
23806         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23807         indirect branch via thunk if requested.
23808         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23809         ("*indirect_jump"): Disable for branch conversion using out of
23810         line thunks.
23811         ("indirect_jump_via_thunk<mode>_z10")
23812         ("indirect_jump_via_thunk<mode>")
23813         ("indirect_jump_via_inlinethunk<mode>_z10")
23814         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23815         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23816         ("casesi_jump_via_inlinethunk<mode>_z10")
23817         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23818         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23819         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23820         ("*indirect2_jump"): Disable for branch conversion.
23821         ("casesi_jump"): Turn into expander and expand patterns for branch
23822         conversion.
23823         ("return_use"): New expander.
23824         ("*return"): Emit return via thunk and rename it to ...
23825         ("*return<mode>"): ... this one.
23826         * config/s390/s390.opt: Add new options and and enum for the
23827         option values.
23829 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
23831         * lra-constraints.c (match_reload): Unconditionally use
23832         gen_lowpart_SUBREG, rather than selecting between that
23833         and equivalent gen_rtx_SUBREG code.
23835 2018-02-08  Richard Biener  <rguenther@suse.de>
23837         PR tree-optimization/84233
23838         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23839         changed flag instead of boguously re-using phi_inserted.
23841 2018-02-08  Martin Jambor  <mjambor@suse.cz>
23843         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23844         static local variables.
23846 2018-02-08  Richard Biener  <rguenther@suse.de>
23848         PR tree-optimization/84278
23849         * tree-vect-stmts.c (vectorizable_store): When looking for
23850         smaller vector types to perform grouped strided loads/stores
23851         make sure the mode is supported by the target.
23852         (vectorizable_load): Likewise.
23854 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
23856         * config/aarch64/aarch64.c (aarch64_components_for_bb):
23857         Increase LDP/STP opportunities by adding adjacent callee-saves.
23859 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
23861         PR rtl-optimization/84068
23862         PR rtl-optimization/83459
23863         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23865 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
23867         PR tree-optimization/84224
23868         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23869         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23870         non-zero arguments.
23872 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
23874         PR target/84113
23875         * config/rs6000/altivec.md (*restore_world): Remove LR use.
23876         * config/rs6000/predicates.md (restore_world_operation): Adjust op
23877         count, remove one USE.
23879 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
23881         * doc/install.texi (Configuration): Document the
23882         --with-long-double-format={ibm,ieee} PowerPC configuration
23883         options.
23885         PR target/84154
23886         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23887         Convert from define_expand to be define_insn_and_split.  Rework
23888         float/double/_Float128 conversions to QI/HI/SImode to work with
23889         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
23890         conversions to QI/HImode types did a store and then a load to
23891         truncate the value.  For conversions to VSX registers, don't split
23892         the insn, instead emit the code directly.  Use the code iterator
23893         any_fix to combine signed and unsigned conversions.
23894         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23895         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23896         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23897         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23898         (fix_<mode>di2_hw): Likewise.
23899         (fixuns_<mode>di2_hw): Likewise.
23900         (fix_<mode>si2_hw): Likewise.
23901         (fixuns_<mode>si2_hw): Likewise.
23902         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23903         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23904         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23905         fix<uns>_trunc<SFDF:mode>si2_p8.
23906         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23907         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23908         (fix<uns>_<mode>_mem): Likewise.
23909         (fctiw<u>z_<mode>_mem): Likewise.
23910         (fix<uns>_<mode>_mem): Likewise.
23911         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23912         the register allocator from doing a direct move to the GPRs to do
23913         a store, and instead use the ISA 3.0 store byte/half-word from
23914         vector register instruction.  For IEEE 128-bit floating point,
23915         also optimize stores of 32-bit ints.
23916         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23918 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
23920         * genextract.c (push_pathstr_operand): New function to support
23921         [a-zA-Z].
23922         (walk_rtx): Call push_pathstr_operand.
23923         (print_path): Support [a-zA-Z].
23925 2018-02-07  Richard Biener  <rguenther@suse.de>
23927         PR tree-optimization/84037
23928         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23929         (cse_and_gimplify_to_preheader): Declare.
23930         (vect_get_place_in_interleaving_chain): Likewise.
23931         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
23932         ivexpr_map.
23933         (_loop_vec_info::~_loop_vec_info): Delete it.
23934         (cse_and_gimplify_to_preheader): New function.
23935         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
23936         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
23937         (vectorizable_load): Likewise.  For grouped stores always base
23938         the IV on the first element.
23939         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
23940         condition before gimplifying.
23942 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
23944         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
23945         *DIV_EXPR and *MOD_EXPR.
23947 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
23949         PR target/84248
23950         * config/i386/i386.c (ix86_option_override_internal): Mask out
23951         the CF_SET bit when checking -fcf-protection.
23953 2018-02-07  Tom de Vries  <tom@codesourcery.com>
23955         PR libgomp/84217
23956         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
23957         enough.
23959 2018-02-07  Richard Biener  <rguenther@suse.de>
23961         PR tree-optimization/84204
23962         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
23963         this place.
23965         PR tree-optimization/84205
23966         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
23967         special-case isl_ast_op_zdiv_r.
23969         PR tree-optimization/84223
23970         * graphite-scop-detection.c (gather_bbs::before_dom_children):
23971         Only add conditions from within the region.
23972         (gather_bbs::after_dom_children): Adjust.
23974 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
23976         PR target/84209
23977         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
23978         * config/avr/avr.md: Only post-reload split REG-REG moves if
23979         either register is GENERAL_REG_P.
23981 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
23983         PR tree-optimization/84235
23984         * tree-ssa-scopedtables.c
23985         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
23986         if the subtraction is performed in floating point type where NaNs are
23987         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
23988         build 1.  Formatting fix.
23990 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
23992         PR target/84146
23993         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
23994         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
23995         and skip it regardless of bb boundaries.  Use CALL_P macro,
23996         don't test INSN_P (insn) together with CALL_P or JUMP_P check
23997         unnecessarily, formatting fix.
23999 2018-02-06  Michael Collison  <michael.collison@arm.com>
24001         * config/arm/thumb2.md:
24002         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
24003         (*thumb_mov_notscc): Ditto.
24005 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
24007         PR target/84154
24008         * config/rs6000/rs6000.md (su code attribute): Use "u" for
24009         unsigned_fix, not "s".
24011 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24013         * configure.ac (gcc_fn_eh_frame_ro): New function.
24014         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
24015         correct .eh_frame permissions.
24016         * configure: Regenerate.
24018 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
24020         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
24021         irrelevant options.
24023 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24025         * config/rs6000/rs6000.c (rs6000_option_override_internal):
24026         Display warning message for -mno-speculate-indirect-jumps.
24028 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
24030         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
24031         Undocumented.
24032         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
24034 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
24036         PR tree-optimization/84225
24037         * tree-eh.c (find_trapping_overflow): Only call
24038         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
24040 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
24042         PR target/84145
24043         * config/i386/i386.c: Reimplement the check of possible options
24044         -mibt/-mshstk conbination. Change error messages.
24045         * doc/invoke.texi: Fix a typo: remove extra '='.
24047 2018-02-06  Marek Polacek  <polacek@redhat.com>
24049         PR tree-optimization/84228
24050         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
24052 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
24054         PR target/82641
24055         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
24056         emitted arch directives.
24057         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
24058         __ARM_FEATURE_COPROC before changing architectures.
24060 2018-02-06  Richard Biener  <rguenther@suse.de>
24062         * config/i386/i386.c (print_reg): Fix typo.
24063         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
24065 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
24067         * configure: Regenerate.
24069 2018-02-05  Martin Sebor  <msebor@redhat.com>
24071         PR tree-optimization/83369
24072         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
24073         inlining context.
24075 2018-02-05  Martin Liska  <mliska@suse.cz>
24077         * doc/invoke.texi: Cherry-pick upstream r323995.
24079 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
24081         * ira.c (ira_init_register_move_cost): Adjust comment.
24083 2018-02-05  Martin Liska  <mliska@suse.cz>
24085         PR gcov-profile/84137
24086         * doc/gcov.texi: Fix typo in documentation.
24088 2018-02-05  Martin Liska  <mliska@suse.cz>
24090         PR gcov-profile/83879
24091         * doc/gcov.texi: Document necessity of --dynamic-list-data when
24092         using dlopen functionality.
24094 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
24096         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
24097         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
24098         _mm_maskz_range_ss, _mm_mask_range_round_ss,
24099         _mm_maskz_range_round_ss): New intrinsics.
24100         (__builtin_ia32_rangesd128_round)
24101         (__builtin_ia32_rangess128_round): Remove.
24102         (__builtin_ia32_rangesd128_mask_round,
24103         __builtin_ia32_rangess128_mask_round): New builtins.
24104         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
24105         __builtin_ia32_rangess128_round): Remove.
24106         (__builtin_ia32_rangesd128_mask_round,
24107         __builtin_ia32_rangess128_mask_round): New builtins.
24108         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
24109         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
24110         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
24111         "<round_saeonly_constraint>")): Changed to ...
24112         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
24113         "<round_saeonly_scalar_constraint>")): ... this.
24114         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24115         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
24116         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
24117         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
24118         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
24120 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
24122         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
24123         options.
24124         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
24125         Remove all values except native, 8540 and 8548.
24127 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
24129         * config/i386/i386.c (ix86_output_function_return): Pass
24130         INVALID_REGNUM, instead of -1, as invalid register number to
24131         indirect_thunk_name and output_indirect_thunk.
24133 2018-02-02  Julia Koval  <julia.koval@intel.com>
24135         * config.gcc: Add -march=icelake.
24136         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
24137         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
24138         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
24139         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
24140         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
24141         (processor_target_table): Add icelake.
24142         (ix86_option_override_internal): Handle new PTAs.
24143         (get_builtin_code_for_version): Handle icelake.
24144         (M_INTEL_COREI7_ICELAKE): New.
24145         (fold_builtin_cpu): Handle icelake.
24146         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
24147         * doc/invoke.texi: Add -march=icelake.
24149 2018-02-02  Julia Koval  <julia.koval@intel.com>
24151         * config/i386/i386.c (ix86_option_override_internal): Change flags type
24152         to wide_int_bitmask.
24153         * wide-int-bitmask.h: New.
24155 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
24157         PR target/84066
24158         * config/i386/i386.md: Replace Pmode with word_mode in
24159         builtin_setjmp_setup and builtin_longjmp to support x32.
24161 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
24163         PR target/56010
24164         PR target/83743
24165         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
24166         #include "opts.h".
24167         (rs6000_supported_cpu_names): New static variable.
24168         (linux_cpu_translation_table): Likewise.
24169         (elf_platform) <cpu>: Define new static variable and use it.
24170         Translate kernel AT_PLATFORM name to canonical name if needed.
24171         Error if platform name is unknown.
24173 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
24175         PR target/84089
24176         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
24178 2018-02-01  Jeff Law  <law@redhat.com>
24180         PR target/84128
24181         * config/i386/i386.c (release_scratch_register_on_entry): Add new
24182         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
24183         the scratch if RELEASE_VIA_POP is false.
24184         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
24185         If we have to save a temporary register, decrement SIZE appropriately.
24186         Pass new arguments to release_scratch_register_on_entry.
24187         (ix86_adjust_stack_and_probe): Likewise.
24188         (ix86_emit_probe_stack_range): Pass new arguments to
24189         release_scratch_register_on_entry.
24191 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
24193         PR rtl-optimization/84157
24194         * combine.c (change_zero_ext): Use REG_P predicate in
24195         front of HARD_REGISTER_P predicate.
24197 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
24199         * config/avr/avr.c (avr_option_override): Move disabling of
24200         -fdelete-null-pointer-checks to...
24201         * common/config/avr/avr-common.c (avr_option_optimization_table):
24202         ...here.
24204 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24206         PR tree-optimization/81635
24207         * tree-data-ref.c (split_constant_offset_1): For types that
24208         wrap on overflow, try to use range info to prove that wrapping
24209         cannot occur.
24211 2018-02-01  Renlin Li  <renlin.li@arm.com>
24213         PR target/83370
24214         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24215         TAILCALL_ADDR_REGS.
24216         (aarch64_register_move_cost): Likewise.
24217         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24218         TAILCALL_ADDR_REGS.
24219         (REG_CLASS_NAMES): Likewise.
24220         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24221         TAILCALL_ADDR_REGS. Remove IP registers.
24222         * config/aarch64/aarch64.md (Ucs): Update register constraint.
24224 2018-02-01  Richard Biener  <rguenther@suse.de>
24226         * domwalk.h (dom_walker::dom_walker): Add additional constructor
24227         for specifying RPO order and allow NULL for that.
24228         * domwalk.c (dom_walker::dom_walker): Likewise.
24229         (dom_walker::walk): Handle NULL RPO order.
24230         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24231         in RPO order.
24232         (rewrite_update_dom_walker): Likewise.
24233         (mark_def_dom_walker): Likewise.
24235 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24237         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24238         (aarch64_maybe_expand_sve_subreg_move): Declare.
24239         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24240         * config/aarch64/predicates.md (aarch64_any_register_operand): New
24241         predicate.
24242         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24243         that are semantically a reverse operation.
24244         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24245         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24246         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24247         functions.
24248         (aarch64_can_change_mode_class): For big-endian, forbid changes
24249         between two SVE modes if they have different element sizes.
24251 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24253         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24254         the TImode handling for big-endian targets.
24256 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24258         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24259         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
24260         not just bytes.
24261         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24262         Remove BSWAP handing for big-endian targets and use the form of
24263         LD1RQ appropariate for the mode.
24265 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24267         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24268         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24269         duplicated element.
24271 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
24273         PR tearget/83845
24274         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24275         check for operands that need to go through aarch64_sve_reload_be.
24277 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
24279         PR tree-optimization/81661
24280         PR tree-optimization/84117
24281         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24282         * tree-eh.c: Include gimplify.h.
24283         (find_trapping_overflow, replace_trapping_overflow,
24284         rewrite_to_non_trapping_overflow): New functions.
24285         * tree-vect-loop.c: Include tree-eh.h.
24286         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24287         * tree-data-ref.c: Include tree-eh.h.
24288         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24290 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
24292         PR rtl-optimization/84123
24293         * combine.c (change_zero_ext): Check if hard register satisfies
24294         can_change_dest_mode before calling gen_lowpart_SUBREG.
24296 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
24298         PR target/82444
24299         * ira.c (ira_init_register_move_cost): Remove assert.
24301 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
24303         PR rtl-optimization/84071
24304         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24305         * doc/tm.texi: Regenerate.
24307 2018-01-31  Richard Biener  <rguenther@suse.de>
24309         PR tree-optimization/84132
24310         * tree-data-ref.c (analyze_miv_subscript): Properly
24311         check whether evolution_function_is_affine_multivariate_p
24312         before calling gcd_of_steps_may_divide_p.
24314 2018-01-31  Julia Koval  <julia.koval@intel.com>
24316         PR target/83618
24317         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24318         * config/i386/i386.md (rdpid_rex64) New.
24319         (rdpid): Make 32bit only.
24321 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
24323         PR lto/84105
24324         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24325         an IDENTIFIER_NODE for FUNCTION_TYPE's.
24327 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
24329         Revert
24330         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
24332         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24334 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
24336         PR rtl-optimization/84071
24337         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24338         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24340 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
24342         * config/arc/arc.c (arc_handle_aux_attribute): New function.
24343         (arc_attribute_table): Add 'aux' attribute.
24344         (arc_in_small_data_p): Consider aux like variables.
24345         (arc_is_aux_reg_p): New function.
24346         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24347         (arc_get_aux_arg): New function.
24348         (prepare_move_operands): Handle aux-register access.
24349         (arc_handle_aux_attribute): New function.
24350         * doc/extend.texi (ARC Variable attributes): Add subsection.
24352 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
24354         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24355         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24356         (arc_attribute_table): Add 'uncached' attribute.
24357         (arc_print_operand): Print '.di' flag for uncached memory
24358         accesses.
24359         (arc_in_small_data_p): Do not consider for small data the uncached
24360         types.
24361         (arc_is_uncached_mem_p): New function.
24362         * config/arc/predicates.md (compact_store_memory_operand): Check
24363         for uncached memory accesses.
24364         (nonvol_nonimm_operand): Likewise.
24365         * doc/extend.texi (ARC Type Attribute): New subsection.
24367 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
24369         PR c/84100
24370         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24371         falign-loops=): Add Optimization flag.
24373 2018-01-30  Jeff Law  <law@redhat.com>
24375         PR target/84064
24376         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24377         INT_REGISTERS_SAVED.  Check it prior to calling
24378         get_scratch_register_on_entry.
24379         (ix86_adjust_stack_and_probe): Similarly.
24380         (ix86_emit_probe_stack_range): Similarly.
24381         (ix86_expand_prologue): Corresponding changes.
24383 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24385         PR target/40411
24386         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24387         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24389 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
24391         PR target/84112
24392         * lra-constraints.c (curr_insn_transform): Process AND in the
24393         address.
24395 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
24397         PR rtl-optimization/83986
24398         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24399         dependence against last_pending_memory_flush in addition to
24400         pending_jump_insns.
24402 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
24404         PR tree-optimization/81611
24405         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24406         copies.
24408 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24410         PR target/83758
24411         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24412         a reg rtx.
24414 2018-01-30  Richard Biener  <rguenther@suse.de>
24415             Jakub Jelinek  <jakub@redhat.com>
24417         PR tree-optimization/84111
24418         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24419         inner loops added during recursion, as they don't have up-to-date
24420         SSA form.
24422 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
24424         PR ipa/81360
24425         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24426         (can_inline_edge_by_limits_p): ... here.
24427         (can_early_inline_edge_p, check_callers,
24428         update_caller_keys, update_callee_keys, recursive_inlining,
24429         add_new_edges_to_heap, speculation_useful_p,
24430         inline_small_functions,
24431         inline_small_functions, flatten_function,
24432         inline_to_all_callers_1): Update.
24434 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
24436         * profile-count.c (profile_count::combine_with_ipa_count): Handle
24437         zeros correctly.
24439 2018-01-30  Richard Biener  <rguenther@suse.de>
24441         PR tree-optimization/83008
24442         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24443         invariant and constant vector uses in stmts when they need
24444         more than one stmt.
24446 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24448         PR bootstrap/84017
24449         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24450         * configure: Regenerate.
24452 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
24454         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24455         pattern.
24456         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24457         Use gen_rtx_REG rather than gen_lowpart.
24459 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
24461         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24462         rather than 0 when creating partial subregs.
24464 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
24466         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24467         of usage.
24469 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
24471         PR target/81550
24472         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24473         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24474         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24475         flags.  This restores the settings used before the 2017-07-24.
24476         Turning off pre increment/decrement/modify allows IVOPTS to
24477         optimize DF/SF loops where the index is an int.
24479 2018-01-29  Richard Biener  <rguenther@suse.de>
24480             Kelvin Nilsen  <kelvin@gcc.gnu.org>
24482         PR bootstrap/80867
24483         * tree-vect-stmts.c (vectorizable_call): Don't call
24484         targetm.vectorize_builtin_md_vectorized_function if callee is
24485         NULL.
24487 2018-01-22  Carl Love  <cel@us.ibm.com>
24489         * doc/extend.tex: Fix typo in second arg in
24490         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24492 2018-01-29  Richard Biener  <rguenther@suse.de>
24494         PR tree-optimization/84086
24495         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24496         (flush_ssaname_freelist): When SSA names were released reset
24497         the SCEV hash table.
24499 2018-01-29  Richard Biener  <rguenther@suse.de>
24501         PR tree-optimization/84057
24502         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24503         removed paths when removing edges.
24505 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
24507         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24508         -mfunction-return=@var{choice}.
24510 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
24512         PR diagnostic/84034
24513         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24514         Handle CR like TAB.
24515         (layout::print_source_line): Likewise.
24516         (test_get_line_width_without_trailing_whitespace): Add test cases.
24518 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
24520         PR middle-end/84040
24521         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24522         debug insns.
24524 2018-01-26  Jim Wilson  <jimw@sifive.com>
24526         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24528         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24529         specified.
24531 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24533         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24534         and CMP + SUB-immediate -> SUBS.
24536 2018-01-26  Martin Sebor  <msebor@redhat.com>
24538         PR tree-optimization/83896
24539         * tree-ssa-strlen.c (get_string_len): Rename...
24540         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
24541         Avoid assuming length is constant.
24542         (handle_char_store): Use HOST_WIDE_INT for string length.
24544 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
24546         PR target/81763
24547         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24548         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24550 2018-01-26  Richard Biener  <rguenther@suse.de>
24552         PR rtl-optimization/84003
24553         * dse.c (record_store): Only record redundant stores when
24554         the earlier store aliases at least all accesses the later one does.
24556 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
24558         PR rtl-optimization/83985
24559         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24560         REG_CFA_RESTORE insns.
24561         (delete_unmarked_insns): Don't ignore separate shrink wrapping
24562         REG_CFA_RESTORE insns here.
24564         PR c/83989
24565         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24566         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24568 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24570         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24571         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24572         (arc_init): Likewise.
24573         (arc_override_options): Likewise.
24574         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24575         value.
24576         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24577         support.
24578         * config/arc/arc.h (TARGET_DBNZ): Define.
24579         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24580         properly set the tune attribute.
24581         (dbnz): Use TARGET_DBNZ guard.
24582         * config/arc/arc.opt (mtune): Add core3 option.
24584 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24586         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24587         recognize new pic like addresses.
24588         (arc_delegitimize_address): Clean up.
24590 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24592         * config/arc/arc-arches.def: Option mrf16 valid for all
24593         architectures.
24594         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24595         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24596         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24597         * config/arc/arc-tables.opt: Regenerate.
24598         * config/arc/arc.c (arc_conditional_register_usage): Handle
24599         reduced register file case.
24600         (arc_file_start): Set must have build attributes.
24601         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24602         mrf16 option value.
24603         * config/arc/arc.opt (mrf16): Add new option.
24604         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24605         * config/arc/genmultilib.awk: Handle new mrf16 option.
24606         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24607         * config/arc/t-multilib: Regenerate.
24608         * doc/invoke.texi (ARC Options): Document mrf16 option.
24610 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24612         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24613         * config/arc/arc.c (arc_handle_secure_attribute): New function.
24614         (arc_attribute_table): Add 'secure_call' attribute.
24615         (arc_print_operand): Print secure call operand.
24616         (arc_function_ok_for_sibcall): Don't optimize tail calls when
24617         secure.
24618         (arc_is_secure_call_p): New function.  * config/arc/arc.md
24619         (call_i): Add support for sjli instruction.
24620         (call_value_i): Likewise.
24621         * config/arc/constraints.md (Csc): New constraint.
24623 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
24624             John Eric Martin  <John.Martin@emmicro-us.com>
24626         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24627         * config/arc/arc.c (_arc_jli_section): New struct.
24628         (arc_jli_section): New type.
24629         (rc_jli_sections): New static variable.
24630         (arc_handle_jli_attribute): New function.
24631         (arc_attribute_table): Add jli_always and jli_fixed attribute.
24632         (arc_file_end): New function.
24633         (TARGET_ASM_FILE_END): Define.
24634         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24635         (arc_add_jli_section): New function.
24636         (jli_call_scan): Likewise.
24637         (arc_reorg): Call jli_call_scan.
24638         (arc_output_addsi): Remove 'S' from printing asm operand.
24639         (arc_is_jli_call_p): New function.
24640         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24641         operand.
24642         (movhi_insn): Likewise.
24643         (movsi_insn): Likewise.
24644         (movsi_set_cc_insn): Likewise.
24645         (loadqi_update): Likewise.
24646         (load_zeroextendqisi_update): Likewise.
24647         (load_signextendqisi_update): Likewise.
24648         (loadhi_update): Likewise.
24649         (load_zeroextendhisi_update): Likewise.
24650         (load_signextendhisi_update): Likewise.
24651         (loadsi_update): Likewise.
24652         (loadsf_update): Likewise.
24653         (movsicc_insn): Likewise.
24654         (bset_insn): Likewise.
24655         (bxor_insn): Likewise.
24656         (bclr_insn): Likewise.
24657         (bmsk_insn): Likewise.
24658         (bicsi3_insn): Likewise.
24659         (cmpsi_cc_c_insn): Likewise.
24660         (movsi_ne): Likewise.
24661         (movsi_cond_exec): Likewise.
24662         (clrsbsi2): Likewise.
24663         (norm_f): Likewise.
24664         (normw): Likewise.
24665         (swap): Likewise.
24666         (divaw): Likewise.
24667         (flag): Likewise.
24668         (sr): Likewise.
24669         (kflag): Likewise.
24670         (ffs): Likewise.
24671         (ffs_f): Likewise.
24672         (fls): Likewise.
24673         (call_i): Remove 'S' asm letter, add jli instruction.
24674         (call_value_i): Likewise.
24675         * config/arc/arc.op (mjli-always): New option.
24676         * config/arc/constraints.md (Cji): New constraint.
24677         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24678         operand.
24679         (subsf3_fpx): Likewise.
24680         (mulsf3_fpx): Likewise.
24681         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24682         asm operand.
24683         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24684         function attrbutes.
24685         * doc/invoke.texi (ARC): Document mjli-always option.
24687 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
24689         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24690         avoid addition with 0 and use incw and decw where possible.
24692 2018-01-26  Richard Biener  <rguenther@suse.de>
24694         PR tree-optimization/81082
24695         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24696         association if it requires casting to unsigned.
24697         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24698         from fold_plusminus_mult_expr to catch important cases late when
24699         range info is available.
24701 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24703         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24704         * configure.ac (hidden_linkonce): New test.
24705         * configure: Regenerate.
24706         * config.in: Regenerate.
24708 2018-01-26  Julia Koval  <julia.koval@intel.com>
24710         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24711         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24712         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24713         _mm_mask_bitshuffle_epi64_mask): Fix type.
24714         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24715         USI_FTYPE_V4DI_V4DI_USI): Remove.
24716         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24717         __builtin_ia32_vpshufbitqmb256_mask,
24718         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24719         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24720         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24722 2018-01-26  Alan Modra  <amodra@gmail.com>
24724         PR target/84033
24725         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24726         UNSPEC_VBPERMQ.  Sort other unspecs.
24728 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
24730         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24732 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
24734         PR middle-end/83055
24735         * predict.c (drop_profile): Do not push/pop cfun; update also
24736         node->count.
24737         (handle_missing_profiles): Fix logic looking for zero profiles.
24739 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
24741         PR middle-end/83977
24742         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24743         on functions with #pragma omp declare simd or functions with simd
24744         attribute.
24745         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24746         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24747         Remove trailing \n from warning_at calls.
24749 2018-01-25  Tom de Vries  <tom@codesourcery.com>
24751         PR target/84028
24752         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24753         for neutered workers.
24755 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
24757         PR target/68467
24758         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24759         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24761 2018-01-24  Jeff Law  <law@redhat.com>
24763         PR target/83994
24764         * i386.c (get_probe_interval): Move to earlier point.
24765         (ix86_compute_frame_layout): If -fstack-clash-protection and
24766         the frame is larger than the probe interval, then use pushes
24767         to save registers rather than reg->mem moves.
24768         (ix86_expand_prologue): Remove conditional for int_registers_saved
24769         assertion.
24771 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
24773         PR target/84014
24774         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24775         min/max for never referenced object.
24777 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
24779         PR middle-end/83977
24780         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24781         here.
24782         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24783         attributes from DECL_ATTRIBUTES (decl) without affecting
24784         DECL_ATTRIBUTES (current_function_decl).
24785         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24786         functions with non-NULL DECL_ABSTRACT_ORIGIN.
24788 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
24790         PR tree-optimization/83979
24791         * fold-const.c (fold_comparison): Use constant_boolean_node
24792         instead of boolean_{true,false}_node.
24794 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
24796         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24797         with zero counts.
24799 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24801         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24802         Simplify the clause that sets the length attribute.
24803         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24804         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24805         clause that sets the length attribute.
24806         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24808 2018-01-24  Tom de Vries  <tom@codesourcery.com>
24810         PR target/83589
24811         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24812         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24813         Add strict parameter.
24814         (prevent_branch_around_nothing): Insert dummy insn between branch to
24815         label and label with no ptx insn inbetween.
24816         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24818 2018-01-24  Tom de Vries  <tom@codesourcery.com>
24820         PR target/81352
24821         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24822         for neutered threads in warp.
24823         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24825 2018-01-24  Richard Biener  <rguenther@suse.de>
24827         PR tree-optimization/83176
24828         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24829         operands.
24831 2018-01-24  Richard Biener  <rguenther@suse.de>
24833         PR tree-optimization/82819
24834         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24835         code generating pluses that are no-ops in the target precision.
24837 2018-01-24  Richard Biener  <rguenther@suse.de>
24839         PR middle-end/84000
24840         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24842 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24844         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24845         to merge probabilities.
24846         * predict.c (probably_never_executed): Also mark as cold functions
24847         with global 0 profile and guessed local profile.
24848         * profile-count.c (profile_probability::combine_with_count): New
24849         member function.
24850         * profile-count.h (profile_probability::operator*,
24851         profile_probability::operator*=, profile_probability::operator/,
24852         profile_probability::operator/=): Reduce precision to adjusted
24853         and set value to guessed on contradictory divisions.
24854         (profile_probability::combine_with_freq): Remove.
24855         (profile_probability::combine_wiht_count): Declare.
24856         (profile_count::force_nonzero):: Set to adjusted.
24857         (profile_count::probability_in):: Set quality to adjusted.
24858         * tree-ssa-tail-merge.c (replace_block_by): Use
24859         combine_with_count.
24861 2018-01-23  Andrew Waterman  <andrew@sifive.com>
24862             Jim Wilson  <jimw@sifive.com>
24864         * config/riscv/riscv.c (riscv_stack_boundary): New.
24865         (riscv_option_override): Set riscv_stack_boundary.  Handle
24866         riscv_preferred_stack_boundary_arg.
24867         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24868         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24869         (STACK_BOUNDARY): Set to riscv_stack_boundary.
24870         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24871         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24872         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24874 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
24876         PR target/83905
24877         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24878         of struct ix86_frame.
24879         (ix86_expand_epilogue): Likewise.  Add a local variable for
24880         the reg_save_offset field in struct ix86_frame.
24882 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
24884         PR tree-optimization/82604
24885         * tree-loop-distribution.c (enum partition_kind): New enum item
24886         PKIND_PARTIAL_MEMSET.
24887         (partition_builtin_p): Support above new enum item.
24888         (generate_code_for_partition): Ditto.
24889         (compute_access_range): Differentiate cases that equality can be
24890         proven at all loops, the innermost loops or no loops.
24891         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24892         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
24893         (finalize_partitions, distribute_loop): Don't fuse partition of
24894         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24895         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24896         parloop is enabled.
24898 2018-01-23  Martin Liska  <mliska@suse.cz>
24900         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24901         order to ignore the predictor.
24902         (PRED_POLYMORPHIC_CALL): Likewise.
24903         (PRED_RECURSIVE_CALL): Likewise.
24905 2018-01-23  Martin Liska  <mliska@suse.cz>
24907         * tree-profile.c (tree_profiling): Print function header to
24908         aware reader which function we are working on.
24909         * value-prof.c (gimple_find_values_to_profile): Do not print
24910         not interesting value histograms.
24912 2018-01-23  Martin Liska  <mliska@suse.cz>
24914         * profile-count.h (enum profile_quality): Add
24915         profile_uninitialized as the first value. Do not number values
24916         as they are zero based.
24917         (profile_count::verify): Update sanity check.
24918         (profile_probability::verify): Likewise.
24920 2018-01-23  Nathan Sidwell  <nathan@acm.org>
24922         * doc/invoke.texi (ffor-scope): Deprecate.
24924 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24926         PR tree-optimization/83510
24927         * domwalk.c (set_all_edges_as_executable): New function.
24928         (dom_walker::dom_walker): Convert bool param
24929         "skip_unreachable_blocks" to enum reachability.  Move setup of
24930         edge flags to set_all_edges_as_executable and only do it when
24931         reachability is REACHABLE_BLOCKS.
24932         * domwalk.h (enum dom_walker::reachability): New enum.
24933         (dom_walker::dom_walker): Convert bool param
24934         "skip_unreachable_blocks" to enum reachability.
24935         (set_all_edges_as_executable): New decl.
24936         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
24937         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
24938         "reachability".
24939         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
24940         but converting true to REACHABLE_BLOCKS.
24941         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
24942         * tree-vrp.c
24943         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
24944         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
24945         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
24946         REACHABLE_BLOCKS.
24947         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
24948         if check_all_array_refs will be called.
24950 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24952         * tree.c (selftest::test_location_wrappers): Add more test
24953         coverage.
24955 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
24957         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
24958         (selftest::test_bit_in_range): Likewise.
24960 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
24962         PR testsuite/83888
24963         * doc/sourcebuild.texi (vect_float): Say that the selector
24964         only describes the situation when -funsafe-math-optimizations is on.
24965         (vect_float_strict): Document.
24967 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
24969         PR tree-optimization/83965
24970         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
24971         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
24972         instead of checking only for a reduction.
24973         (vect_recog_widen_sum_pattern): Likewise.
24975 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24977         * predict.c (probably_never_executed): Only use precise profile info.
24978         (compute_function_frequency): Skip after inlining hack since we now
24979         have quality checking.
24981 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
24983         * profile-count.h (profile_probability::very_unlikely,
24984         profile_probability::unlikely, profile_probability::even): Set
24985         precision to guessed.
24987 2018-01-23  Richard Biener  <rguenther@suse.de>
24989         PR tree-optimization/83963
24990         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
24991         Properly terminate dominator walk when crossing the exit edge not
24992         when visiting its source block.
24994 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
24996         PR c++/83918
24997         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
24998         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
25000 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
25002         PR tree-optimization/83957
25003         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
25004         semicolon after for body surrounded by braces.
25006         PR tree-optimization/83081
25007         * profile-count.h (profile_probability::split): New method.
25008         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
25009         Use profile_probability::split.
25010         (do_compare_rtx_and_jump): Fix adjustment of probabilities
25011         when splitting a single conditional jump into 2.
25013 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
25015         PR tree-optimization/69452
25016         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
25017         decl.
25019 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25021         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
25022         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
25023         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
25025 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25027         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
25028         declaration.
25029         * config/rl78/rl78.md (movdi): New define_expand.
25030         * config/rl78/rl78.c (rl78_split_movdi): New function.
25032 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
25034         PR target/83862
25035         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
25036         no longer used.
25037         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
25038         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
25039         128-bit to produce an UNSPEC move to get the double word with the
25040         signbit and then a shift directly to do signbit.
25041         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
25042         implementation with a new version that just does either a direct
25043         move or a regular move.  Move memory interface to separate insns.
25044         Move insns so they are next to the expander.
25045         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
25046         with signbit move.  Split big and little endian case.
25047         (signbit<mode>2_dm_mem_le): Likewise.
25048         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
25049         (signbit<mode>2_dm2): Likewise.
25051 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25053         * config/rl78/rl78.md (anddi3): New define_expand.
25055 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25057         * config/rl78/rl78.md (umindi3): New define_expand.
25059 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25061         * config/rl78/rl78.md (smindi3): New define_expand.
25063 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25065         * config/rl78/rl78.md (smaxdi3): New define_expand.
25067 2018-01-22  Carl Love  <cel@us.ibm.com>
25069         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
25070         LVX_V1TI): Add macro expansion.
25071         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
25072         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
25073         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
25074         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
25075         Change check to determine if the instruction is a byte reversing
25076         entry.  Fix typo in comment.
25077         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
25078         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
25079         Add def_builtin calls for new builtins.
25080         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
25081         Add define_insn expansion.
25083 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25085         * config/rl78/rl78.md (umaxdi3): New define_expand.
25087 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
25089         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
25090         for non-QImode registers.
25092 2018-01-22  Richard Biener  <rguenther@suse.de>
25094         PR tree-optimization/83963
25095         * graphite-scop-detection.c (scop_detection::get_sese): Delay
25096         including the loop exit block.
25097         (scop_detection::merge_sese): Likewise.
25098         (scop_detection::add_scop): Do it here instead.
25100 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25102         * doc/sourcebuild.texi (arm_softfloat): Document.
25104 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
25106         PR gcc/77734
25107         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
25108         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
25109         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
25111 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25112             David Edelsohn  <dje.gcc@gmail.com>
25114         PR target/83946
25115         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25116         Change "crset eq" to "crset 2".
25117         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25118         (*call_indirect_aix<mode>_nospec): Likewise.
25119         (*call_value_indirect_aix<mode>_nospec): Likewise.
25120         (*call_indirect_elfv2<mode>_nospec): Likewise.
25121         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
25122         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
25123         change assembly output from . to $.
25124         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25125         (indirect_jump<mode>_nospec): Change assembly output from . to $.
25126         (*tablejump<mode>_internal1_nospec): Likewise.
25128 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
25130         PR target/80870
25131         * config/sh/sh_optimize_sett_clrt.cc:
25132         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
25134 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
25136         PR tree-optimization/83940
25137         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
25138         offset_dt to vect_constant_def rather than vect_unknown_def_type.
25139         (vect_check_load_store_mask): Add a mask_dt_out parameter and
25140         use it to pass back the definition type.
25141         (vect_check_store_rhs): Likewise rhs_dt_out.
25142         (vect_build_gather_load_calls): Add a mask_dt argument and use
25143         it instead of a call to vect_is_simple_use.
25144         (vectorizable_store): Update calls to vect_check_load_store_mask
25145         and vect_check_store_rhs.  Use the dt returned by the latter instead
25146         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
25147         instead of calls to vect_is_simple_use.  Pass the scalar rather
25148         than the vector operand to vect_is_simple_use when handling
25149         second and subsequent copies of an rhs value.
25150         (vectorizable_load): Update calls to vect_check_load_store_mask
25151         and vect_build_gather_load_calls.  Use the cached mask_dt and
25152         gs_info.offset_dt instead of calls to vect_is_simple_use.
25154 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
25156         PR middle-end/83945
25157         * tree-emutls.c: Include gimplify.h.
25158         (lower_emutls_2): New function.
25159         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
25160         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
25161         it before further processing.
25163         PR target/83930
25164         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
25165         UINTVAL (trueop1) instead of INTVAL (op1).
25167 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
25169         PR debug/81570
25170         PR debug/83728
25171         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
25172         INCOMING_FRAME_SP_OFFSET if not defined.
25173         (scan_trace): Add ENTRY argument.  If true and
25174         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
25175         emit a note to adjust the CFA offset.
25176         (create_cfi_notes): Adjust scan_trace callers.
25177         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
25178         INCOMING_FRAME_SP_OFFSET in the CIE.
25179         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
25180         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
25181         Likewise.
25182         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
25183         * doc/tm.texi: Regenerated.
25185 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25187         PR rtl-optimization/83147
25188         * lra-constraints.c (remove_inheritance_pseudos): Use
25189         lra_substitute_pseudo_within_insn.
25191 2018-01-19  Tom de Vries  <tom@codesourcery.com>
25192             Cesar Philippidis  <cesar@codesourcery.com>
25194         PR target/83920
25195         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
25197 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
25199         PR target/83790
25200         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
25201         spaces for function labels.
25203 2018-01-19  Martin Liska  <mliska@suse.cz>
25205         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
25206         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
25207         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
25208         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
25209         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
25210         (PRED_CONST_RETURN): Change from 69 to 65.
25211         (PRED_NULL_RETURN): Change from 91 to 71.
25212         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25213         (PRED_LOOP_GUARD): Change from 66 to 73.
25215 2018-01-19  Martin Liska  <mliska@suse.cz>
25217         * predict.c (predict_insn_def): Add new assert.
25218         (struct branch_predictor): Change type to signed integer.
25219         (test_prediction_value_range): Amend test to cover
25220         PROB_UNINITIALIZED.
25221         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25222         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25223         (PRED_LOOP_ITERATIONS_MAX): Likewise.
25224         (PRED_LOOP_IV_COMPARE): Likewise.
25225         * predict.h (PROB_UNINITIALIZED): Define new constant.
25227 2018-01-19  Martin Liska  <mliska@suse.cz>
25229         * predict.c (dump_prediction): Add new format for
25230         analyze_brprob.py script which is enabled with -details
25231         suboption.
25232         * profile-count.h (precise_p): New function.
25234 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
25236         PR tree-optimization/83922
25237         * tree-vect-loop.c (vect_verify_full_masking): Return false if
25238         there are no statements that need masking.
25239         (vect_active_double_reduction_p): New function.
25240         (vect_analyze_loop_operations): Use it when handling phis that
25241         are not in the loop header.
25243 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
25245         PR tree-optimization/83914
25246         * tree-vect-loop.c (vectorizable_induction): Don't convert
25247         init_expr or apply the peeling adjustment for inductions
25248         that are nested within the vectorized loop.
25250 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25252         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25253         instead of NEG.
25255 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
25257         PR sanitizer/81715
25258         PR testsuite/83882
25259         * function.h (gimplify_parameters): Add gimple_seq * argument.
25260         * function.c: Include gimple.h and options.h.
25261         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25262         for the added local temporaries if needed.
25263         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25264         if there are any parameter cleanups, wrap whole body into a
25265         try/finally with the cleanups.
25267 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
25269         PR target/82964
25270         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25271         Use GET_MODE_CLASS for scalar floating point.
25273 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
25275         PR ipa/82256
25276         patch by PaX Team
25277         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25278         Fix call of call_cgraph_insertion_hooks.
25280 2018-01-18  Martin Sebor  <msebor@redhat.com>
25282         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25284 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
25286         PR ipa/83619
25287         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25288         frequencies.
25290 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
25292         PR other/70268
25293         * common.opt: (-ffile-prefix-map): New option.
25294         * opts.c (common_handle_option): Defer it.
25295         * opts-global.c (handle_common_deferred_options): Handle it.
25296         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25297         * file-prefix-map.h: New file.
25298         (remap_debug_filename, add_debug_prefix_map): ...here.
25299         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25300         * final.c (debug_prefix_map, add_debug_prefix_map
25301         remap_debug_filename): Move to...
25302         * file-prefix-map.c: New file.
25303         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25304         generalize, get rid of alloca(), use strrchr() instead of strchr().
25305         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25306         Implement in terms of add_prefix_map().
25307         (remap_macro_filename, remap_debug_filename): Implement in term of
25308         remap_filename().
25309         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25310         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25311         * dbxout.c: Include file-prefix-map.h.
25312         * varasm.c: Likewise.
25313         * vmsdbgout.c: Likewise.
25314         * xcoffout.c: Likewise.
25315         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25316         * doc/cppopts.texi (-fmacro-prefix-map): Document.
25317         * doc/invoke.texi (-ffile-prefix-map): Document.
25318         (-fdebug-prefix-map): Update description.
25320 2018-01-18  Martin Liska  <mliska@suse.cz>
25322         * config/i386/i386.c (indirect_thunk_name): Document that also
25323         lfence is emitted.
25324         (output_indirect_thunk): Document why both instructions
25325         (pause and lfence) are generated.
25327 2018-01-18  Richard Biener  <rguenther@suse.de>
25329         PR tree-optimization/83887
25330         * graphite-scop-detection.c
25331         (scop_detection::get_nearest_dom_with_single_entry): Remove.
25332         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25333         (scop_detection::merge_sese): Re-implement with a flood-fill
25334         algorithm that properly finds a SESE region if it exists.
25336 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
25338         PR c/61240
25339         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25340         pointer_diff optimizations use view_convert instead of convert.
25342 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25344         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25345         Generate different code for -mno-speculate-indirect-jumps.
25346         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25347         (*call_indirect_aix<mode>): Disable for
25348         -mno-speculate-indirect-jumps.
25349         (*call_indirect_aix<mode>_nospec): New define_insn.
25350         (*call_value_indirect_aix<mode>): Disable for
25351         -mno-speculate-indirect-jumps.
25352         (*call_value_indirect_aix<mode>_nospec): New define_insn.
25353         (*sibcall_nonlocal_sysv<mode>): Generate different code for
25354         -mno-speculate-indirect-jumps.
25355         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25357 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
25359         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25360         long double type, set the flags for noting the default long double
25361         type, even if we don't pass or return a long double type.
25363 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
25365         PR ipa/83051
25366         * ipa-inline.c (flatten_function): Do not overwrite final inlining
25367         failure.
25369 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
25371         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25372         support for merge[hl].
25373         (fold_mergehl_helper): New helper function.
25374         (tree-vector-builder.h): New #include for tree_vector_builder usage.
25375         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25376         (altivec_vmrglw_direct): Add xxmrglw insn.
25378 2018-01-17  Andrew Waterman  <andrew@sifive.com>
25380         * config/riscv/riscv.c (riscv_conditional_register_usage): If
25381         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25383 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
25385         PR lto/83121
25386         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25387         call the lto_location_cache before reading the
25388         DECL_SOURCE_LOCATION of the types.
25390 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
25391             Richard Sandiford  <richard.sandiford@linaro.org>
25393         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25394         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25395         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25396         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25397         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25398         Add declaration.
25399         * config/aarch64/constraints.md (aarch64_movti_operand):
25400         Limit immediates.
25401         * config/aarch64/predicates.md (Uti): Add new constraint.
25403 2018-01-17  Carl Love  <cel@us.ibm.com>
25405         * config/rs6000/vsx.md (define_expand xl_len_r,
25406         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25407         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25408         lxvll.
25409         (define_expand, define_insn): Move the shift left from  the
25410         define_insn to the define_expand for lxvl and stxvl instructions.
25411         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25412         and XL_LEN_R definitions to PURE.
25414 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
25416         * config/i386/i386.c (indirect_thunk_name): Declare regno
25417         as unsigned int.  Compare regno with INVALID_REGNUM.
25418         (output_indirect_thunk): Ditto.
25419         (output_indirect_thunk_function): Ditto.
25420         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
25421         in the call to output_indirect_thunk_function.
25423 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
25425         PR middle-end/83884
25426         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25427         rather than the size of inner_type to determine the stack slot size
25428         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25430 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
25432         PR target/83546
25433         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25434         to PTA_SILVERMONT.
25436 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
25438         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25439         endian Linux systems to optionally enable multilibs for selecting
25440         the long double type if the user configured an explicit type.
25441         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25442         have no long double multilibs if not defined.
25443         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25444         warn if the user used -mabi={ieee,ibm}longdouble and we built
25445         multilibs for long double.
25446         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25447         appropriate multilib option.
25448         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25449         multilib options.
25450         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25451         for building long double multilibs.
25452         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25454 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
25456         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25457         copies.
25459         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25460         64 bits.
25461         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25462         128 bits.
25464         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25465         variables.
25467         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25468         return value.
25470 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
25472         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25473         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25475 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25477         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25478         different rtl trees depending on TARGET_64BIT.
25479         (rs6000_gen_lvx): Likewise.
25481 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
25483         * config/visium/visium.md (nop): Tweak comment.
25484         (hazard_nop): Likewise.
25486 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25488         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25489         -mspeculate-indirect-jumps.
25490         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25491         for -mno-speculate-indirect-jumps.
25492         (*call_indirect_elfv2<mode>_nospec): New define_insn.
25493         (*call_value_indirect_elfv2<mode>): Disable for
25494         -mno-speculate-indirect-jumps.
25495         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25496         (indirect_jump): Emit different RTL for
25497         -mno-speculate-indirect-jumps.
25498         (*indirect_jump<mode>): Disable for
25499         -mno-speculate-indirect-jumps.
25500         (*indirect_jump<mode>_nospec): New define_insn.
25501         (tablejump): Emit different RTL for
25502         -mno-speculate-indirect-jumps.
25503         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25504         (tablejumpsi_nospec): New define_expand.
25505         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25506         (tablejumpdi_nospec): New define_expand.
25507         (*tablejump<mode>_internal1): Disable for
25508         -mno-speculate-indirect-jumps.
25509         (*tablejump<mode>_internal1_nospec): New define_insn.
25510         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25511         option.
25513 2018-01-16  Artyom Skrobov tyomitch@gmail.com
25515         * caller-save.c (insert_save): Drop unnecessary parameter.  All
25516         callers updated.
25518 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
25519             Richard Biener  <rguenth@suse.de>
25521         PR libgomp/83590
25522         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25523         return early, inline manually is_gimple_sizepos.  Make sure if we
25524         call gimplify_expr we don't end up with a gimple constant.
25525         * tree.c (variably_modified_type_p): Don't return true for
25526         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
25527         * gimplify.h (is_gimple_sizepos): Remove.
25529 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25531         PR tree-optimization/83857
25532         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25533         vectorizable_live_operation for pure SLP statements.
25534         (vectorizable_live_operation): Handle PHIs.
25536 2018-01-16  Richard Biener  <rguenther@suse.de>
25538         PR tree-optimization/83867
25539         * tree-vect-stmts.c (vect_transform_stmt): Precompute
25540         nested_in_vect_loop_p since the scalar stmt may get invalidated.
25542 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
25544         PR c/83844
25545         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25546         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25547         If off is not INTEGER_CST, issue a may not be aligned warning
25548         rather than isn't aligned.  Use isn%'t rather than isn't.
25549         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25550         into MULT_EXPR.
25551         <case MULT_EXPR>: Improve the case when bottom and one of the
25552         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25553         operand, in that case check if the other operand is multiple of
25554         bottom divided by the INTEGER_CST operand.
25556 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25558         PR target/83858
25559         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25560         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25561         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25562         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25563         * config/pa/pa.c (pa_function_arg_advance): Likewise.
25564         (pa_function_arg, pa_arg_partial_bytes): Likewise.
25565         (pa_function_arg_size): New function.
25567 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25569         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25570         in a separate statement.
25572 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
25574         PR tree-optimization/83847
25575         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25576         group gathers and scatters.
25578 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
25580         PR rtl-optimization/86620
25581         * params.def (max-sched-ready-insns): Bump minimum value to 1.
25583         PR rtl-optimization/83213
25584         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25585         to last if both are JUMP_INSNs.
25587         PR tree-optimization/83843
25588         * gimple-ssa-store-merging.c
25589         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25590         store_immediate_info for bswap/nop orig_stores.
25592 2018-01-15  Andrew Waterman  <andrew@sifive.com>
25594         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25595         !TARGET_MUL.
25596         <UDIV>: Increase cost if !TARGET_DIV.
25598 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
25600         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25601         (define_attr "cr_logical_3op"): New.
25602         (cceq_ior_compare): Adjust.
25603         (cceq_ior_compare_complement): Adjust.
25604         (*cceq_rev_compare): Adjust.
25605         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25606         (is_cracked_insn): Adjust.
25607         (insn_must_be_first_in_group): Adjust.
25608         * config/rs6000/40x.md: Adjust.
25609         * config/rs6000/440.md: Adjust.
25610         * config/rs6000/476.md: Adjust.
25611         * config/rs6000/601.md: Adjust.
25612         * config/rs6000/603.md: Adjust.
25613         * config/rs6000/6xx.md: Adjust.
25614         * config/rs6000/7450.md: Adjust.
25615         * config/rs6000/7xx.md: Adjust.
25616         * config/rs6000/8540.md: Adjust.
25617         * config/rs6000/cell.md: Adjust.
25618         * config/rs6000/e300c2c3.md: Adjust.
25619         * config/rs6000/e500mc.md: Adjust.
25620         * config/rs6000/e500mc64.md: Adjust.
25621         * config/rs6000/e5500.md: Adjust.
25622         * config/rs6000/e6500.md: Adjust.
25623         * config/rs6000/mpc.md: Adjust.
25624         * config/rs6000/power4.md: Adjust.
25625         * config/rs6000/power5.md: Adjust.
25626         * config/rs6000/power6.md: Adjust.
25627         * config/rs6000/power7.md: Adjust.
25628         * config/rs6000/power8.md: Adjust.
25629         * config/rs6000/power9.md: Adjust.
25630         * config/rs6000/rs64.md: Adjust.
25631         * config/rs6000/titan.md: Adjust.
25633 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25635         * config/i386/predicates.md (indirect_branch_operand): Rewrite
25636         ix86_indirect_branch_register logic.
25638 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25640         * config/i386/constraints.md (Bs): Update
25641         ix86_indirect_branch_register check.  Don't check
25642         ix86_indirect_branch_register with GOT_memory_operand.
25643         (Bw): Likewise.
25644         * config/i386/predicates.md (GOT_memory_operand): Don't check
25645         ix86_indirect_branch_register here.
25646         (GOT32_symbol_operand): Likewise.
25648 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25650         * config/i386/predicates.md (constant_call_address_operand):
25651         Rewrite ix86_indirect_branch_register logic.
25652         (sibcall_insn_operand): Likewise.
25654 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25656         * config/i386/constraints.md (Bs): Replace
25657         ix86_indirect_branch_thunk_register with
25658         ix86_indirect_branch_register.
25659         (Bw): Likewise.
25660         * config/i386/i386.md (indirect_jump): Likewise.
25661         (tablejump): Likewise.
25662         (*sibcall_memory): Likewise.
25663         (*sibcall_value_memory): Likewise.
25664         Peepholes of indirect call and jump via memory: Likewise.
25665         * config/i386/i386.opt: Likewise.
25666         * config/i386/predicates.md (indirect_branch_operand): Likewise.
25667         (GOT_memory_operand): Likewise.
25668         (call_insn_operand): Likewise.
25669         (sibcall_insn_operand): Likewise.
25670         (GOT32_symbol_operand): Likewise.
25672 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
25674         PR middle-end/83837
25675         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25676         type rather than type addr's type points to.
25677         (expand_omp_atomic_mutex): Likewise.
25678         (expand_omp_atomic): Likewise.
25680 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
25682         PR target/83839
25683         * config/i386/i386.c (output_indirect_thunk_function): Use
25684         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25685         for  __x86_return_thunk.
25687 2018-01-15  Richard Biener  <rguenther@suse.de>
25689         PR middle-end/83850
25690         * expmed.c (extract_bit_field_1): Fix typo.
25692 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25694         PR target/83687
25695         * config/arm/iterators.md (VF): New mode iterator.
25696         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25697         Remove integer-related logic from pattern.
25698         (neon_vabd<mode>_3): Likewise.
25700 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
25702         PR middle-end/82694
25703         * common.opt (fstrict-overflow): No longer an alias.
25704         (fwrapv-pointer): New option.
25705         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25706         also for pointer types based on flag_wrapv_pointer.
25707         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25708         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25709         opts->x_flag_wrapv got set.
25710         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25711         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25712         POINTER_TYPE_OVERFLOW_UNDEFINED.
25713         * match.pd: Likewise in address comparison pattern.
25714         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25716 2018-01-15  Richard Biener  <rguenther@suse.de>
25718         PR lto/83804
25719         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25720         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
25721         Reset type names to their identifier if their TYPE_DECL doesn't
25722         have linkage (and thus is used for ODR and devirt).
25723         (save_debug_info_for_decl): Remove.
25724         (save_debug_info_for_type): Likewise.
25725         (add_tree_to_fld_list): Adjust.
25726         * tree-pretty-print.c (dump_generic_node): Make dumping of
25727         type names more robust.
25729 2018-01-15  Richard Biener  <rguenther@suse.de>
25731         * BASE-VER: Bump to 8.0.1.
25733 2018-01-14  Martin Sebor  <msebor@redhat.com>
25735         PR other/83508
25736         * builtins.c (check_access): Avoid warning when the no-warning bit
25737         is set.
25739 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
25741         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25742         * ira-color (allocno_hard_regs_compare): Likewise.
25744 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
25746         PR target/83013
25747         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25748         Use .pushsection/.popsection.
25750 2018-01-14  Martin Sebor  <msebor@redhat.com>
25752         PR c++/81327
25753         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25755 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
25757         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25758         entry from extra_headers.
25759         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25760         extra_headers, make the list bitwise identical to the i?86-*-* one.
25762 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25764         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25765         -mcmodel=large with -mindirect-branch=thunk,
25766         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25767         -mfunction-return=thunk-extern.
25768         * doc/invoke.texi: Document -mcmodel=large is incompatible with
25769         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25770         -mfunction-return=thunk and -mfunction-return=thunk-extern.
25772 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25774         * config/i386/i386.c (print_reg): Print the name of the full
25775         integer register without '%'.
25776         (ix86_print_operand): Handle 'V'.
25777         * doc/extend.texi: Document 'V' modifier.
25779 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25781         * config/i386/constraints.md (Bs): Disallow memory operand for
25782         -mindirect-branch-register.
25783         (Bw): Likewise.
25784         * config/i386/predicates.md (indirect_branch_operand): Likewise.
25785         (GOT_memory_operand): Likewise.
25786         (call_insn_operand): Likewise.
25787         (sibcall_insn_operand): Likewise.
25788         (GOT32_symbol_operand): Likewise.
25789         * config/i386/i386.md (indirect_jump): Call convert_memory_address
25790         for -mindirect-branch-register.
25791         (tablejump): Likewise.
25792         (*sibcall_memory): Likewise.
25793         (*sibcall_value_memory): Likewise.
25794         Disallow peepholes of indirect call and jump via memory for
25795         -mindirect-branch-register.
25796         (*call_pop): Replace m with Bw.
25797         (*call_value_pop): Likewise.
25798         (*sibcall_pop_memory): Replace m with Bs.
25799         * config/i386/i386.opt (mindirect-branch-register): New option.
25800         * doc/invoke.texi: Document -mindirect-branch-register option.
25802 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25804         * config/i386/i386-protos.h (ix86_output_function_return): New.
25805         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25806         set function_return_type.
25807         (indirect_thunk_name): Add ret_p to indicate thunk for function
25808         return.
25809         (output_indirect_thunk_function): Pass false to
25810         indirect_thunk_name.
25811         (ix86_output_indirect_branch_via_reg): Likewise.
25812         (ix86_output_indirect_branch_via_push): Likewise.
25813         (output_indirect_thunk_function): Create alias for function
25814         return thunk if regno < 0.
25815         (ix86_output_function_return): New function.
25816         (ix86_handle_fndecl_attribute): Handle function_return.
25817         (ix86_attribute_table): Add function_return.
25818         * config/i386/i386.h (machine_function): Add
25819         function_return_type.
25820         * config/i386/i386.md (simple_return_internal): Use
25821         ix86_output_function_return.
25822         (simple_return_internal_long): Likewise.
25823         * config/i386/i386.opt (mfunction-return=): New option.
25824         (indirect_branch): Mention -mfunction-return=.
25825         * doc/extend.texi: Document function_return function attribute.
25826         * doc/invoke.texi: Document -mfunction-return= option.
25828 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
25830         * config/i386/i386-opts.h (indirect_branch): New.
25831         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25832         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25833         with local indirect jump when converting indirect call and jump.
25834         (ix86_set_indirect_branch_type): New.
25835         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25836         (indirectlabelno): New.
25837         (indirect_thunk_needed): Likewise.
25838         (indirect_thunk_bnd_needed): Likewise.
25839         (indirect_thunks_used): Likewise.
25840         (indirect_thunks_bnd_used): Likewise.
25841         (INDIRECT_LABEL): Likewise.
25842         (indirect_thunk_name): Likewise.
25843         (output_indirect_thunk): Likewise.
25844         (output_indirect_thunk_function): Likewise.
25845         (ix86_output_indirect_branch_via_reg): Likewise.
25846         (ix86_output_indirect_branch_via_push): Likewise.
25847         (ix86_output_indirect_branch): Likewise.
25848         (ix86_output_indirect_jmp): Likewise.
25849         (ix86_code_end): Call output_indirect_thunk_function if needed.
25850         (ix86_output_call_insn): Call ix86_output_indirect_branch if
25851         needed.
25852         (ix86_handle_fndecl_attribute): Handle indirect_branch.
25853         (ix86_attribute_table): Add indirect_branch.
25854         * config/i386/i386.h (machine_function): Add indirect_branch_type
25855         and has_local_indirect_jump.
25856         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25857         to true.
25858         (tablejump): Likewise.
25859         (*indirect_jump): Use ix86_output_indirect_jmp.
25860         (*tablejump_1): Likewise.
25861         (simple_return_indirect_internal): Likewise.
25862         * config/i386/i386.opt (mindirect-branch=): New option.
25863         (indirect_branch): New.
25864         (keep): Likewise.
25865         (thunk): Likewise.
25866         (thunk-inline): Likewise.
25867         (thunk-extern): Likewise.
25868         * doc/extend.texi: Document indirect_branch function attribute.
25869         * doc/invoke.texi: Document -mindirect-branch= option.
25871 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
25873         PR ipa/83051
25874         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25876 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
25878         * ipa-inline.c (want_inline_small_function_p): Return false if
25879         inlining has already failed with CIF_FINAL_ERROR.
25880         (update_caller_keys): Call want_inline_small_function_p before
25881         can_inline_edge_p.
25882         (update_callee_keys): Likewise.
25884 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25886         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25887         New function.
25888         (rs6000_quadword_masked_address_p): Likewise.
25889         (quad_aligned_load_p): Likewise.
25890         (quad_aligned_store_p): Likewise.
25891         (const_load_sequence_p): Add comment to describe the outer-most loop.
25892         (mimic_memory_attributes_and_flags): New function.
25893         (rs6000_gen_stvx): Likewise.
25894         (replace_swapped_aligned_store): Likewise.
25895         (rs6000_gen_lvx): Likewise.
25896         (replace_swapped_aligned_load): Likewise.
25897         (replace_swapped_load_constant): Capitalize argument name in
25898         comment describing this function.
25899         (rs6000_analyze_swaps): Add a third pass to search for vector loads
25900         and stores that access quad-word aligned addresses and replace
25901         with stvx or lvx instructions when appropriate.
25902         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25903         New function prototype.
25904         (rs6000_quadword_masked_address_p): Likewise.
25905         (rs6000_gen_lvx): Likewise.
25906         (rs6000_gen_stvx): Likewise.
25907         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25908         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25909         when memory address is aligned.
25910         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25911         this split to select lvx instruction when memory address is aligned.
25912         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25913         instruction when memory address is aligned.
25914         (*vsx_le_perm_load_v16qi): Likewise.
25915         (four unnamed splitters): Modify to select the stvx instruction
25916         when memory is aligned.
25918 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
25920         * predict.c (determine_unlikely_bbs): Handle correctly BBs
25921         which appears in the queue multiple times.
25923 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25924             Alan Hayward  <alan.hayward@arm.com>
25925             David Sherwood  <david.sherwood@arm.com>
25927         * tree-vectorizer.h (vec_lower_bound): New structure.
25928         (_loop_vec_info): Add check_nonzero and lower_bounds.
25929         (LOOP_VINFO_CHECK_NONZERO): New macro.
25930         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
25931         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
25932         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
25933         fields.  Make seg_len the distance travelled, not including the
25934         access size.
25935         (dr_direction_indicator): Declare.
25936         (dr_zero_step_indicator): Likewise.
25937         (dr_known_forward_stride_p): Likewise.
25938         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
25939         tree-ssanames.h.
25940         (runtime_alias_check_p): Allow runtime alias checks with
25941         variable strides.
25942         (operator ==): Compare access_size and align.
25943         (prune_runtime_alias_test_list): Rework for new distinction between
25944         the access_size and seg_len.
25945         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
25946         segment lengths.
25947         (get_segment_min_max): New function.
25948         (create_intersect_range_checks): Use it.
25949         (dr_step_indicator): New function.
25950         (dr_direction_indicator): Likewise.
25951         (dr_zero_step_indicator): Likewise.
25952         (dr_known_forward_stride_p): Likewise.
25953         * tree-loop-distribution.c (data_ref_segment_size): Return
25954         DR_STEP * (niters - 1).
25955         (compute_alias_check_pairs): Update call to the dr_with_seg_len
25956         constructor.
25957         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
25958         (vect_preserves_scalar_order_p): New function, split out from...
25959         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
25960         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
25961         (vect_vfa_access_size): New function.
25962         (vect_vfa_align): Likewise.
25963         (vect_compile_time_alias): Take access_size_a and access_b arguments.
25964         (dump_lower_bound): New function.
25965         (vect_check_lower_bound): Likewise.
25966         (vect_small_gap_p): Likewise.
25967         (vectorizable_with_step_bound_p): Likewise.
25968         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
25969         depencies if the vectorization factor is 1.  Convert the checks
25970         for nonzero steps into checks on the bounds of DR_STEP.  Try using
25971         a bunds check for variable steps if the minimum required step is
25972         relatively small. Update calls to the dr_with_seg_len
25973         constructor and to vect_compile_time_alias.
25974         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
25975         function.
25976         (vect_loop_versioning): Call it.
25977         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
25978         when retrying.
25979         (vect_estimate_min_profitable_iters): Account for any bounds checks.
25981 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25982             Alan Hayward  <alan.hayward@arm.com>
25983             David Sherwood  <david.sherwood@arm.com>
25985         * doc/sourcebuild.texi (vect_scatter_store): Document.
25986         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
25987         optabs.
25988         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
25989         Document.
25990         * genopinit.c (main): Add supports_vec_scatter_store and
25991         supports_vec_scatter_store_cached to target_optabs.
25992         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
25993         IFN_MASK_SCATTER_STORE.
25994         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
25995         functions.
25996         * internal-fn.h (internal_store_fn_p): Declare.
25997         (internal_fn_stored_value_index): Likewise.
25998         * internal-fn.c (scatter_store_direct): New macro.
25999         (expand_scatter_store_optab_fn): New function.
26000         (direct_scatter_store_optab_supported_p): New macro.
26001         (internal_store_fn_p): New function.
26002         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
26003         IFN_MASK_SCATTER_STORE.
26004         (internal_fn_mask_index): Likewise.
26005         (internal_fn_stored_value_index): New function.
26006         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
26007         for scatter stores.
26008         * optabs-query.h (supports_vec_scatter_store_p): Declare.
26009         * optabs-query.c (supports_vec_scatter_store_p): New function.
26010         * tree-vectorizer.h (vect_get_store_rhs): Declare.
26011         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
26012         true for scatter stores.
26013         (vect_gather_scatter_fn_p): Handle scatter stores too.
26014         (vect_check_gather_scatter): Consider using scatter stores if
26015         supports_vec_scatter_store_p.
26016         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
26017         scatter stores too.
26018         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26019         internal_fn_stored_value_index.
26020         (check_load_store_masking): Handle scatter stores too.
26021         (vect_get_store_rhs): Make public.
26022         (vectorizable_call): Use internal_store_fn_p.
26023         (vectorizable_store): Handle scatter store internal functions.
26024         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
26025         when deciding whether the end of the group has been reached.
26026         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
26027         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
26028         (mask_scatter_store<mode>): New insns.
26030 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26031             Alan Hayward  <alan.hayward@arm.com>
26032             David Sherwood  <david.sherwood@arm.com>
26034         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
26035         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
26036         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
26037         function.
26038         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
26039         Use vect_truncate_gather_scatter_offset if we can't treat the
26040         operation as a normal gather load or scatter store.
26041         (get_group_load_store_type): Take the gather_scatter_info
26042         as argument.  Try using a gather load or scatter store for
26043         single-element groups.
26044         (get_load_store_type): Update calls to get_group_load_store_type
26045         and vect_use_strided_gather_scatters_p.
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         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
26052         optional tree argument.
26053         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
26054         null target hooks.
26055         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
26056         but continue to use the current value as a fallback.
26057         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
26058         to compare the updates.
26059         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
26060         (get_load_store_type): Use it when handling a strided access.
26061         (vect_get_strided_load_store_ops): New function.
26062         (vect_get_data_ptr_increment): Likewise.
26063         (vectorizable_load): Handle strided gather loads.  Always pass
26064         a step to vect_create_data_ref_ptr and bump_vector_ptr.
26066 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26067             Alan Hayward  <alan.hayward@arm.com>
26068             David Sherwood  <david.sherwood@arm.com>
26070         * doc/md.texi (gather_load@var{m}): Document.
26071         (mask_gather_load@var{m}): Likewise.
26072         * genopinit.c (main): Add supports_vec_gather_load and
26073         supports_vec_gather_load_cached to target_optabs.
26074         * optabs-tree.c (init_tree_optimization_optabs): Use
26075         ggc_cleared_alloc to allocate target_optabs.
26076         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
26077         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
26078         functions.
26079         * internal-fn.h (internal_load_fn_p): Declare.
26080         (internal_gather_scatter_fn_p): Likewise.
26081         (internal_fn_mask_index): Likewise.
26082         (internal_gather_scatter_fn_supported_p): Likewise.
26083         * internal-fn.c (gather_load_direct): New macro.
26084         (expand_gather_load_optab_fn): New function.
26085         (direct_gather_load_optab_supported_p): New macro.
26086         (direct_internal_fn_optab): New function.
26087         (internal_load_fn_p): Likewise.
26088         (internal_gather_scatter_fn_p): Likewise.
26089         (internal_fn_mask_index): Likewise.
26090         (internal_gather_scatter_fn_supported_p): Likewise.
26091         * optabs-query.c (supports_at_least_one_mode_p): New function.
26092         (supports_vec_gather_load_p): Likewise.
26093         * optabs-query.h (supports_vec_gather_load_p): Declare.
26094         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
26095         and memory_type field.
26096         (NUM_PATTERNS): Bump to 15.
26097         * tree-vect-data-refs.c: Include internal-fn.h.
26098         (vect_gather_scatter_fn_p): New function.
26099         (vect_describe_gather_scatter_call): Likewise.
26100         (vect_check_gather_scatter): Try using internal functions for
26101         gather loads.  Recognize existing calls to a gather load function.
26102         (vect_analyze_data_refs): Consider using gather loads if
26103         supports_vec_gather_load_p.
26104         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
26105         (vect_get_gather_scatter_offset_type): Likewise.
26106         (vect_convert_mask_for_vectype): Likewise.
26107         (vect_add_conversion_to_patterm): Likewise.
26108         (vect_try_gather_scatter_pattern): Likewise.
26109         (vect_recog_gather_scatter_pattern): New pattern recognizer.
26110         (vect_vect_recog_func_ptrs): Add it.
26111         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26112         internal_fn_mask_index and internal_gather_scatter_fn_p.
26113         (check_load_store_masking): Take the gather_scatter_info as an
26114         argument and handle gather loads.
26115         (vect_get_gather_scatter_ops): New function.
26116         (vectorizable_call): Check internal_load_fn_p.
26117         (vectorizable_load): Likewise.  Handle gather load internal
26118         functions.
26119         (vectorizable_store): Update call to check_load_store_masking.
26120         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
26121         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
26122         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
26123         (aarch64_gather_scale_operand_d): New predicates.
26124         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
26125         (mask_gather_load<mode>): New insns.
26127 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26128             Alan Hayward  <alan.hayward@arm.com>
26129             David Sherwood  <david.sherwood@arm.com>
26131         * optabs.def (fold_left_plus_optab): New optab.
26132         * doc/md.texi (fold_left_plus_@var{m}): Document.
26133         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
26134         * internal-fn.c (fold_left_direct): Define.
26135         (expand_fold_left_optab_fn): Likewise.
26136         (direct_fold_left_optab_supported_p): Likewise.
26137         * fold-const-call.c (fold_const_fold_left): New function.
26138         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
26139         * tree-parloops.c (valid_reduction_p): New function.
26140         (gather_scalar_reductions): Use it.
26141         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
26142         (vect_finish_replace_stmt): Declare.
26143         * tree-vect-loop.c (fold_left_reduction_fn): New function.
26144         (needs_fold_left_reduction_p): New function, split out from...
26145         (vect_is_simple_reduction): ...here.  Accept reductions that
26146         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
26147         (vect_force_simple_reduction): Also store the reduction type in
26148         the assignment's STMT_VINFO_REDUC_TYPE.
26149         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
26150         (merge_with_identity): New function.
26151         (vect_expand_fold_left): Likewise.
26152         (vectorize_fold_left_reduction): Likewise.
26153         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
26154         scalar phi in place for it.  Check for target support and reject
26155         cases that would reassociate the operation.  Defer the transform
26156         phase to vectorize_fold_left_reduction.
26157         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
26158         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
26159         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
26161 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26163         * tree-if-conv.c (predicate_mem_writes): Remove redundant
26164         call to ifc_temp_var.
26166 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26167             Alan Hayward  <alan.hayward@arm.com>
26168             David Sherwood  <david.sherwood@arm.com>
26170         * target.def (legitimize_address_displacement): Take the original
26171         offset as a poly_int.
26172         * targhooks.h (default_legitimize_address_displacement): Update
26173         accordingly.
26174         * targhooks.c (default_legitimize_address_displacement): Likewise.
26175         * doc/tm.texi: Regenerate.
26176         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
26177         as an argument, moving assert of ad->disp == ad->disp_term to...
26178         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
26179         Try calling targetm.legitimize_address_displacement before expanding
26180         the address rather than afterwards, and adjust for the new interface.
26181         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
26182         Match the new hook interface.  Handle SVE addresses.
26183         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
26184         new hook interface.
26186 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26188         * Makefile.in (OBJS): Add early-remat.o.
26189         * target.def (select_early_remat_modes): New hook.
26190         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
26191         * doc/tm.texi: Regenerate.
26192         * targhooks.h (default_select_early_remat_modes): Declare.
26193         * targhooks.c (default_select_early_remat_modes): New function.
26194         * timevar.def (TV_EARLY_REMAT): New timevar.
26195         * passes.def (pass_early_remat): New pass.
26196         * tree-pass.h (make_pass_early_remat): Declare.
26197         * early-remat.c: New file.
26198         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
26199         function.
26200         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
26202 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26203             Alan Hayward  <alan.hayward@arm.com>
26204             David Sherwood  <david.sherwood@arm.com>
26206         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
26207         vfm1 with a bound_epilog parameter.
26208         (vect_do_peeling): Update calls accordingly, and move the prologue
26209         call earlier in the function.  Treat the base bound_epilog as 0 for
26210         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
26211         this base when peeling for gaps.
26212         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26213         with fully-masked loops.
26214         (vect_estimate_min_profitable_iters): Handle the single peeled
26215         iteration in that case.
26217 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26218             Alan Hayward  <alan.hayward@arm.com>
26219             David Sherwood  <david.sherwood@arm.com>
26221         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26222         single-element interleaving even if the size is not a power of 2.
26223         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26224         accesses for single-element interleaving if the group size is
26225         not a power of 2.
26227 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26228             Alan Hayward  <alan.hayward@arm.com>
26229             David Sherwood  <david.sherwood@arm.com>
26231         * doc/md.texi (fold_extract_last_@var{m}): Document.
26232         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26233         * optabs.def (fold_extract_last_optab): New optab.
26234         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26235         * internal-fn.c (fold_extract_direct): New macro.
26236         (expand_fold_extract_optab_fn): Likewise.
26237         (direct_fold_extract_optab_supported_p): Likewise.
26238         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26239         * tree-vect-loop.c (vect_model_reduction_cost): Handle
26240         EXTRACT_LAST_REDUCTION.
26241         (get_initial_def_for_reduction): Do not create an initial vector
26242         for EXTRACT_LAST_REDUCTION reductions.
26243         (vectorizable_reduction): Leave the scalar phi in place for
26244         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
26245         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
26246         epilogue code for EXTRACT_LAST_REDUCTION and defer the
26247         transform phase to vectorizable_condition.
26248         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26249         split out from...
26250         (vect_finish_stmt_generation): ...here.
26251         (vect_finish_replace_stmt): New function.
26252         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26253         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26254         pattern.
26255         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26257 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26258             Alan Hayward  <alan.hayward@arm.com>
26259             David Sherwood  <david.sherwood@arm.com>
26261         * doc/md.texi (extract_last_@var{m}): Document.
26262         * optabs.def (extract_last_optab): New optab.
26263         * internal-fn.def (EXTRACT_LAST): New internal function.
26264         * internal-fn.c (cond_unary_direct): New macro.
26265         (expand_cond_unary_optab_fn): Likewise.
26266         (direct_cond_unary_optab_supported_p): Likewise.
26267         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26268         loops using EXTRACT_LAST.
26269         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26270         (extract_last_<mode>): ...this optab.
26271         (vec_extract<mode><Vel>): Update accordingly.
26273 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26274             Alan Hayward  <alan.hayward@arm.com>
26275             David Sherwood  <david.sherwood@arm.com>
26277         * target.def (empty_mask_is_expensive): New hook.
26278         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26279         * doc/tm.texi: Regenerate.
26280         * targhooks.h (default_empty_mask_is_expensive): Declare.
26281         * targhooks.c (default_empty_mask_is_expensive): New function.
26282         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26283         if the target says that empty masks are expensive.
26284         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26285         New function.
26286         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26288 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26289             Alan Hayward  <alan.hayward@arm.com>
26290             David Sherwood  <david.sherwood@arm.com>
26292         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26293         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26294         (vect_use_loop_mask_for_alignment_p): New function.
26295         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26296         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26297         niters_skip argument.  Make sure that the first niters_skip elements
26298         of the first iteration are inactive.
26299         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26300         Update call to vect_set_loop_masks_directly.
26301         (get_misalign_in_elems): New function, split out from...
26302         (vect_gen_prolog_loop_niters): ...here.
26303         (vect_update_init_of_dr): Take a code argument that specifies whether
26304         the adjustment should be added or subtracted.
26305         (vect_update_init_of_drs): Likewise.
26306         (vect_prepare_for_masked_peels): New function.
26307         (vect_do_peeling): Skip prologue peeling if we're using a mask
26308         instead.  Update call to vect_update_inits_of_drs.
26309         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26310         mask_skip_niters.
26311         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26312         alignment.  Do not include the number of peeled iterations in
26313         the minimum threshold in that case.
26314         (vectorizable_induction): Adjust the start value down by
26315         LOOP_VINFO_MASK_SKIP_NITERS iterations.
26316         (vect_transform_loop): Call vect_prepare_for_masked_peels.
26317         Take the number of skipped iterations into account when calculating
26318         the loop bounds.
26319         * tree-vect-stmts.c (vect_gen_while_not): New function.
26321 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26322             Alan Hayward  <alan.hayward@arm.com>
26323             David Sherwood  <david.sherwood@arm.com>
26325         * doc/sourcebuild.texi (vect_fully_masked): Document.
26326         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26327         default value to 0.
26328         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26329         split out from...
26330         (vect_analyze_loop_2): ...here. Don't check the vectorization
26331         factor against the number of loop iterations if the loop is
26332         fully-masked.
26334 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26335             Alan Hayward  <alan.hayward@arm.com>
26336             David Sherwood  <david.sherwood@arm.com>
26338         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26339         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26340         (dump_groups): Update accordingly.
26341         (iv_use::mem_type): New member variable.
26342         (address_p): New function.
26343         (record_use): Add a mem_type argument and initialize the new
26344         mem_type field.
26345         (record_group_use): Add a mem_type argument.  Use address_p.
26346         Remove obsolete null checks of base_object.  Update call to record_use.
26347         (find_interesting_uses_op): Update call to record_group_use.
26348         (find_interesting_uses_cond): Likewise.
26349         (find_interesting_uses_address): Likewise.
26350         (get_mem_type_for_internal_fn): New function.
26351         (find_address_like_use): Likewise.
26352         (find_interesting_uses_stmt): Try find_address_like_use before
26353         calling find_interesting_uses_op.
26354         (addr_offset_valid_p): Use the iv mem_type field as the type
26355         of the addressed memory.
26356         (add_autoinc_candidates): Likewise.
26357         (get_address_cost): Likewise.
26358         (split_small_address_groups_p): Use address_p.
26359         (split_address_groups): Likewise.
26360         (add_iv_candidate_for_use): Likewise.
26361         (autoinc_possible_for_pair): Likewise.
26362         (rewrite_groups): Likewise.
26363         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26364         (determine_group_iv_cost): Update after split of USE_ADDRESS.
26365         (get_alias_ptr_type_for_ptr_address): New function.
26366         (rewrite_use_address): Rewrite address uses in calls that were
26367         identified by find_address_like_use.
26369 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26370             Alan Hayward  <alan.hayward@arm.com>
26371             David Sherwood  <david.sherwood@arm.com>
26373         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26374         TARGET_MEM_REFs.
26375         * gimple-expr.h (is_gimple_addressable: Likewise.
26376         * gimple-expr.c (is_gimple_address): Likewise.
26377         * internal-fn.c (expand_call_mem_ref): New function.
26378         (expand_mask_load_optab_fn): Use it.
26379         (expand_mask_store_optab_fn): Likewise.
26381 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26382             Alan Hayward  <alan.hayward@arm.com>
26383             David Sherwood  <david.sherwood@arm.com>
26385         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26386         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26387         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26388         (cond_umax@var{mode}): Document.
26389         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26390         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26391         (cond_umin_optab, cond_umax_optab): New optabs.
26392         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26393         (COND_IOR, COND_XOR): New internal functions.
26394         * internal-fn.h (get_conditional_internal_fn): Declare.
26395         * internal-fn.c (cond_binary_direct): New macro.
26396         (expand_cond_binary_optab_fn): Likewise.
26397         (direct_cond_binary_optab_supported_p): Likewise.
26398         (get_conditional_internal_fn): New function.
26399         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26400         Cope with reduction statements that are vectorized as calls rather
26401         than assignments.
26402         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26403         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26404         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26405         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26406         (UNSPEC_COND_EOR): New unspecs.
26407         (optab): Add mappings for them.
26408         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26409         (sve_int_op, sve_fp_op): New int attributes.
26411 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26412             Alan Hayward  <alan.hayward@arm.com>
26413             David Sherwood  <david.sherwood@arm.com>
26415         * optabs.def (while_ult_optab): New optab.
26416         * doc/md.texi (while_ult@var{m}@var{n}): Document.
26417         * internal-fn.def (WHILE_ULT): New internal function.
26418         * internal-fn.h (direct_internal_fn_supported_p): New override
26419         that takes two types as argument.
26420         * internal-fn.c (while_direct): New macro.
26421         (expand_while_optab_fn): New function.
26422         (convert_optab_supported_p): Likewise.
26423         (direct_while_optab_supported_p): New macro.
26424         * wide-int.h (wi::udiv_ceil): New function.
26425         * tree-vectorizer.h (rgroup_masks): New structure.
26426         (vec_loop_masks): New typedef.
26427         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26428         and fully_masked_p.
26429         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26430         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26431         (vect_max_vf): New function.
26432         (slpeel_make_loop_iterate_ntimes): Delete.
26433         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26434         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26435         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26436         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26437         internal-fn.h, stor-layout.h and optabs-query.h.
26438         (vect_set_loop_mask): New function.
26439         (add_preheader_seq): Likewise.
26440         (add_header_seq): Likewise.
26441         (interleave_supported_p): Likewise.
26442         (vect_maybe_permute_loop_masks): Likewise.
26443         (vect_set_loop_masks_directly): Likewise.
26444         (vect_set_loop_condition_masked): Likewise.
26445         (vect_set_loop_condition_unmasked): New function, split out from
26446         slpeel_make_loop_iterate_ntimes.
26447         (slpeel_make_loop_iterate_ntimes): Rename to..
26448         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
26449         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26450         (vect_do_peeling): Update call accordingly.
26451         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26452         loops.
26453         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26454         mask_compare_type, can_fully_mask_p and fully_masked_p.
26455         (release_vec_loop_masks): New function.
26456         (_loop_vec_info): Use it to free the loop masks.
26457         (can_produce_all_loop_masks_p): New function.
26458         (vect_get_max_nscalars_per_iter): Likewise.
26459         (vect_verify_full_masking): Likewise.
26460         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26461         retries, and free the mask rgroups before retrying.  Check loop-wide
26462         reasons for disallowing fully-masked loops.  Make the final decision
26463         about whether use a fully-masked loop or not.
26464         (vect_estimate_min_profitable_iters): Do not assume that peeling
26465         for the number of iterations will be needed for fully-masked loops.
26466         (vectorizable_reduction): Disable fully-masked loops.
26467         (vectorizable_live_operation): Likewise.
26468         (vect_halve_mask_nunits): New function.
26469         (vect_double_mask_nunits): Likewise.
26470         (vect_record_loop_mask): Likewise.
26471         (vect_get_loop_mask): Likewise.
26472         (vect_transform_loop): Handle the case in which the final loop
26473         iteration might handle a partial vector.  Call vect_set_loop_condition
26474         instead of slpeel_make_loop_iterate_ntimes.
26475         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26476         (check_load_store_masking): New function.
26477         (prepare_load_store_mask): Likewise.
26478         (vectorizable_store): Handle fully-masked loops.
26479         (vectorizable_load): Likewise.
26480         (supportable_widening_operation): Use vect_halve_mask_nunits for
26481         booleans.
26482         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26483         (vect_gen_while): New function.
26484         * config/aarch64/aarch64.md (umax<mode>3): New expander.
26485         (aarch64_uqdec<mode>): New insn.
26487 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26488             Alan Hayward  <alan.hayward@arm.com>
26489             David Sherwood  <david.sherwood@arm.com>
26491         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26492         (reduc_xor_scal_optab): New optabs.
26493         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26494         (reduc_xor_scal_@var{m}): Document.
26495         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26496         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26497         internal functions.
26498         * fold-const-call.c (fold_const_call): Handle them.
26499         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26500         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26501         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26502         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26503         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26504         (UNSPEC_XORV): New unspecs.
26505         (optab): Add entries for them.
26506         (BITWISEV): New int iterator.
26507         (bit_reduc_op): New int attributes.
26509 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26510             Alan Hayward  <alan.hayward@arm.com>
26511             David Sherwood  <david.sherwood@arm.com>
26513         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26514         * internal-fn.def (VEC_SHL_INSERT): New internal function.
26515         * optabs.def (vec_shl_insert_optab): New optab.
26516         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26517         (duplicate_and_interleave): Likewise.
26518         * tree-vect-loop.c: Include internal-fn.h.
26519         (neutral_op_for_slp_reduction): New function, split out from
26520         get_initial_defs_for_reduction.
26521         (get_initial_def_for_reduction): Handle option 2 for variable-length
26522         vectors by loading the neutral value into a vector and then shifting
26523         the initial value into element 0.
26524         (get_initial_defs_for_reduction): Replace the code argument with
26525         the neutral value calculated by neutral_op_for_slp_reduction.
26526         Use gimple_build_vector for constant-length vectors.
26527         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26528         but the first group_size elements have a neutral value.
26529         Use duplicate_and_interleave otherwise.
26530         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26531         Update call to get_initial_defs_for_reduction.  Handle SLP
26532         reductions for variable-length vectors by creating one vector
26533         result for each scalar result, with the elements associated
26534         with other scalar results stubbed out with the neutral value.
26535         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26536         Require IFN_VEC_SHL_INSERT for double reductions on
26537         variable-length vectors, or SLP reductions that have
26538         a neutral value.  Require can_duplicate_and_interleave_p
26539         support for variable-length unchained SLP reductions if there
26540         is no neutral value, such as for MIN/MAX reductions.  Also require
26541         the number of vector elements to be a multiple of the number of
26542         SLP statements when doing variable-length unchained SLP reductions.
26543         Update call to vect_create_epilog_for_reduction.
26544         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26545         and remove initial values.
26546         (duplicate_and_interleave): Make public.
26547         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26548         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26550 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26551             Alan Hayward  <alan.hayward@arm.com>
26552             David Sherwood  <david.sherwood@arm.com>
26554         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26555         (can_duplicate_and_interleave_p): New function.
26556         (vect_get_and_check_slp_defs): Take the vector of statements
26557         rather than just the current one.  Remove excess parentheses.
26558         Restriction rejectinon of vect_constant_def and vect_external_def
26559         for variable-length vectors to boolean types, or types for which
26560         can_duplicate_and_interleave_p is false.
26561         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26562         (duplicate_and_interleave): New function.
26563         (vect_get_constant_vectors): Use gimple_build_vector for
26564         constant-length vectors and suitable variable-length constant
26565         vectors.  Use duplicate_and_interleave for other variable-length
26566         vectors.  Don't defer the update when inserting new statements.
26568 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26569             Alan Hayward  <alan.hayward@arm.com>
26570             David Sherwood  <david.sherwood@arm.com>
26572         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26573         min_profitable_iters doesn't go negative.
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_mask_load_lanes@var{m}@var{n}): Document.
26580         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26581         * optabs.def (vec_mask_load_lanes_optab): New optab.
26582         (vec_mask_store_lanes_optab): Likewise.
26583         * internal-fn.def (MASK_LOAD_LANES): New internal function.
26584         (MASK_STORE_LANES): Likewise.
26585         * internal-fn.c (mask_load_lanes_direct): New macro.
26586         (mask_store_lanes_direct): Likewise.
26587         (expand_mask_load_optab_fn): Handle masked operations.
26588         (expand_mask_load_lanes_optab_fn): New macro.
26589         (expand_mask_store_optab_fn): Handle masked operations.
26590         (expand_mask_store_lanes_optab_fn): New macro.
26591         (direct_mask_load_lanes_optab_supported_p): Likewise.
26592         (direct_mask_store_lanes_optab_supported_p): Likewise.
26593         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26594         parameter.
26595         (vect_load_lanes_supported): Likewise.
26596         * tree-vect-data-refs.c (strip_conversion): New function.
26597         (can_group_stmts_p): Likewise.
26598         (vect_analyze_data_ref_accesses): Use it instead of checking
26599         for a pair of assignments.
26600         (vect_store_lanes_supported): Take a masked_p parameter.
26601         (vect_load_lanes_supported): Likewise.
26602         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26603         vect_store_lanes_supported and vect_load_lanes_supported.
26604         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26605         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26606         parameter.  Don't allow gaps for masked accesses.
26607         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
26608         and vect_load_lanes_supported.
26609         (get_load_store_type): Take a masked_p parameter and update
26610         call to get_group_load_store_type.
26611         (vectorizable_store): Update call to get_load_store_type.
26612         Handle IFN_MASK_STORE_LANES.
26613         (vectorizable_load): Update call to get_load_store_type.
26614         Handle IFN_MASK_LOAD_LANES.
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         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26621         modes for SVE.
26622         * config/aarch64/aarch64-protos.h
26623         (aarch64_sve_struct_memory_operand_p): Declare.
26624         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26625         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26626         (VPRED, vpred): Handle SVE structure modes.
26627         * config/aarch64/constraints.md (Utx): New constraint.
26628         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26629         (aarch64_sve_struct_nonimmediate_operand): New predicates.
26630         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26631         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26632         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26633         structure modes.  Split into pieces after RA.
26634         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26635         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26636         New patterns.
26637         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26638         SVE structure modes.
26639         (aarch64_classify_address): Likewise.
26640         (sizetochar): Move earlier in file.
26641         (aarch64_print_operand): Handle SVE register lists.
26642         (aarch64_array_mode): New function.
26643         (aarch64_sve_struct_memory_operand_p): Likewise.
26644         (TARGET_ARRAY_MODE): Redefine.
26646 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26647             Alan Hayward  <alan.hayward@arm.com>
26648             David Sherwood  <david.sherwood@arm.com>
26650         * target.def (array_mode): New target hook.
26651         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26652         * doc/tm.texi: Regenerate.
26653         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26654         * hooks.c (hook_optmode_mode_uhwi_none): New function.
26655         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26656         targetm.array_mode.
26657         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
26658         type sizes.
26660 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26661             Alan Hayward  <alan.hayward@arm.com>
26662             David Sherwood  <david.sherwood@arm.com>
26664         * fold-const.c (fold_binary_loc): Check the argument types
26665         rather than the result type when testing for a vector operation.
26667 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26669         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26670         * doc/tm.texi: Regenerate.
26672 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26673             Alan Hayward  <alan.hayward@arm.com>
26674             David Sherwood  <david.sherwood@arm.com>
26676         * doc/invoke.texi (-msve-vector-bits=): Document new option.
26677         (sve): Document new AArch64 extension.
26678         * doc/md.texi (w): Extend the description of the AArch64
26679         constraint to include SVE vectors.
26680         (Upl, Upa): Document new AArch64 predicate constraints.
26681         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26682         enum.
26683         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26684         (msve-vector-bits=): New option.
26685         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26686         SVE when these are disabled.
26687         (sve): New extension.
26688         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26689         modes.  Adjust their number of units based on aarch64_sve_vg.
26690         (MAX_BITSIZE_MODE_ANY_MODE): Define.
26691         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26692         aarch64_addr_query_type.
26693         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26694         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26695         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26696         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26697         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26698         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26699         (aarch64_simd_imm_zero_p): Delete.
26700         (aarch64_check_zero_based_sve_index_immediate): Declare.
26701         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26702         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26703         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26704         (aarch64_sve_float_mul_immediate_p): Likewise.
26705         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26706         rather than an rtx.
26707         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26708         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26709         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26710         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26711         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26712         (aarch64_regmode_natural_size): Likewise.
26713         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26714         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26715         left one place.
26716         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26717         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26718         for VG and the SVE predicate registers.
26719         (V_ALIASES): Add a "z"-prefixed alias.
26720         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26721         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26722         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26723         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26724         (REG_CLASS_NAMES): Add entries for them.
26725         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
26726         and the predicate registers.
26727         (aarch64_sve_vg): Declare.
26728         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26729         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26730         (REGMODE_NATURAL_SIZE): Define.
26731         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26732         SVE macros.
26733         * config/aarch64/aarch64.c: Include cfgrtl.h.
26734         (simd_immediate_info): Add a constructor for series vectors,
26735         and an associated step field.
26736         (aarch64_sve_vg): New variable.
26737         (aarch64_dbx_register_number): Handle VG and the predicate registers.
26738         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26739         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26740         (VEC_ANY_DATA, VEC_STRUCT): New constants.
26741         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26742         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26743         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26744         (aarch64_get_mask_mode): New functions.
26745         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26746         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26747         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
26748         predicate modes and predicate registers.  Explicitly restrict
26749         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
26750         to store a vector mode if it is recognized by
26751         aarch64_classify_vector_mode.
26752         (aarch64_regmode_natural_size): New function.
26753         (aarch64_hard_regno_caller_save_mode): Return the original mode
26754         for predicates.
26755         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26756         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26757         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26758         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26759         functions.
26760         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
26761         does not overlap dest if the function is frame-related.  Handle
26762         SVE constants.
26763         (aarch64_split_add_offset): New function.
26764         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26765         them aarch64_add_offset.
26766         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26767         and update call to aarch64_sub_sp.
26768         (aarch64_add_cfa_expression): New function.
26769         (aarch64_expand_prologue): Pass extra temporary registers to the
26770         functions above.  Handle the case in which we need to emit new
26771         DW_CFA_expressions for registers that were originally saved
26772         relative to the stack pointer, but now have to be expressed
26773         relative to the frame pointer.
26774         (aarch64_output_mi_thunk): Pass extra temporary registers to the
26775         functions above.
26776         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
26777         IP0 and IP1 values for SVE frames.
26778         (aarch64_expand_vec_series): New function.
26779         (aarch64_expand_sve_widened_duplicate): Likewise.
26780         (aarch64_expand_sve_const_vector): Likewise.
26781         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26782         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
26783         into the register, rather than emitting a SET directly.
26784         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26785         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26786         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26787         (offset_9bit_signed_scaled_p): New functions.
26788         (aarch64_replicate_bitmask_imm): New function.
26789         (aarch64_bitmask_imm): Use it.
26790         (aarch64_cannot_force_const_mem): Reject expressions involving
26791         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
26792         (aarch64_classify_index): Handle SVE indices, by requiring
26793         a plain register index with a scale that matches the element size.
26794         (aarch64_classify_address): Handle SVE addresses.  Assert that
26795         the mode of the address is VOIDmode or an integer mode.
26796         Update call to aarch64_classify_symbol.
26797         (aarch64_classify_symbolic_expression): Update call to
26798         aarch64_classify_symbol.
26799         (aarch64_const_vec_all_in_range_p): New function.
26800         (aarch64_print_vector_float_operand): Likewise.
26801         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
26802         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
26803         and the FP immediates 1.0 and 0.5.
26804         (aarch64_print_address_internal): Handle SVE addresses.
26805         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26806         (aarch64_regno_regclass): Handle predicate registers.
26807         (aarch64_secondary_reload): Handle big-endian reloads of SVE
26808         data modes.
26809         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26810         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26811         (aarch64_convert_sve_vector_bits): New function.
26812         (aarch64_override_options): Use it to handle -msve-vector-bits=.
26813         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26814         rather than an rtx.
26815         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26816         Handle SVE vector and predicate modes.  Accept VL-based constants
26817         that need only one temporary register, and VL offsets that require
26818         no temporary registers.
26819         (aarch64_conditional_register_usage): Mark the predicate registers
26820         as fixed if SVE isn't available.
26821         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26822         Return true for SVE vector and predicate modes.
26823         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26824         rather than an unsigned int.  Handle SVE modes.
26825         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
26826         SVE modes.
26827         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26828         if SVE is enabled.
26829         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26830         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26831         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26832         (aarch64_sve_float_mul_immediate_p): New functions.
26833         (aarch64_sve_valid_immediate): New function.
26834         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26835         Explicitly reject structure modes.  Check for INDEX constants.
26836         Handle PTRUE and PFALSE constants.
26837         (aarch64_check_zero_based_sve_index_immediate): New function.
26838         (aarch64_simd_imm_zero_p): Delete.
26839         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26840         vector modes.  Accept constants in the range of CNT[BHWD].
26841         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26842         ask for an Advanced SIMD mode.
26843         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26844         (aarch64_simd_vector_alignment): Handle SVE predicates.
26845         (aarch64_vectorize_preferred_vector_alignment): New function.
26846         (aarch64_simd_vector_alignment_reachable): Use it instead of
26847         the vector size.
26848         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26849         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26850         functions.
26851         (MAX_VECT_LEN): Delete.
26852         (expand_vec_perm_d): Add a vec_flags field.
26853         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26854         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26855         (aarch64_evpc_ext): Don't apply a big-endian lane correction
26856         for SVE modes.
26857         (aarch64_evpc_rev): Rename to...
26858         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
26859         (aarch64_evpc_rev_global): New function.
26860         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26861         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26862         MAX_VECT_LEN.
26863         (aarch64_evpc_sve_tbl): New function.
26864         (aarch64_expand_vec_perm_const_1): Update after rename of
26865         aarch64_evpc_rev.  Handle SVE permutes too, trying
26866         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26867         than aarch64_evpc_tbl.
26868         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26869         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26870         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26871         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26872         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26873         (aarch64_expand_sve_vcond): New functions.
26874         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26875         of aarch64_vector_mode_p.
26876         (aarch64_dwarf_poly_indeterminate_value): New function.
26877         (aarch64_compute_pressure_classes): Likewise.
26878         (aarch64_can_change_mode_class): Likewise.
26879         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26880         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26881         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26882         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26883         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26884         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26885         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26886         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26887         constraints.
26888         (Dn, Dl, Dr): Accept const as well as const_vector.
26889         (Dz): Likewise.  Compare against CONST0_RTX.
26890         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26891         of "vector" where appropriate.
26892         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26893         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26894         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26895         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26896         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26897         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26898         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26899         (v_int_equiv): Extend to SVE modes.
26900         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26901         mode attributes.
26902         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26903         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26904         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26905         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26906         (SVE_COND_FP_CMP): New int iterators.
26907         (perm_hilo): Handle the new unpack unspecs.
26908         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26909         attributes.
26910         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26911         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26912         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26913         (aarch64_equality_operator, aarch64_constant_vector_operand)
26914         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26915         (aarch64_sve_nonimmediate_operand): Likewise.
26916         (aarch64_sve_general_operand): Likewise.
26917         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26918         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26919         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26920         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26921         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26922         (aarch64_sve_float_arith_immediate): Likewise.
26923         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26924         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26925         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26926         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26927         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26928         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26929         (aarch64_sve_float_arith_operand): Likewise.
26930         (aarch64_sve_float_arith_with_sub_operand): Likewise.
26931         (aarch64_sve_float_mul_operand): Likewise.
26932         (aarch64_sve_vec_perm_operand): Likewise.
26933         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
26934         (aarch64_mov_operand): Accept const_poly_int and const_vector.
26935         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
26936         as well as const_vector.
26937         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
26938         in file.  Use CONST0_RTX and CONSTM1_RTX.
26939         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
26940         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
26941         Use aarch64_simd_imm_zero.
26942         * config/aarch64/aarch64-sve.md: New file.
26943         * config/aarch64/aarch64.md: Include it.
26944         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
26945         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
26946         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
26947         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
26948         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
26949         (sve): New attribute.
26950         (enabled): Disable instructions with the sve attribute unless
26951         TARGET_SVE.
26952         (movqi, movhi): Pass CONST_POLY_INT operaneds through
26953         aarch64_expand_mov_immediate.
26954         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
26955         CNT[BHSD] immediates.
26956         (movti): Split CONST_POLY_INT moves into two halves.
26957         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
26958         Split additions that need a temporary here if the destination
26959         is the stack pointer.
26960         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
26961         (*add<mode>3_poly_1): New instruction.
26962         (set_clobber_cc): New expander.
26964 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26966         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
26967         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
26968         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
26969         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
26970         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
26971         Change innermode from fixed_mode_size to machine_mode.
26972         (simplify_subreg): Update call accordingly.  Handle a constant-sized
26973         subreg of a variable-length CONST_VECTOR.
26975 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
26976             Alan Hayward  <alan.hayward@arm.com>
26977             David Sherwood  <david.sherwood@arm.com>
26979         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
26980         (add_offset_to_base): New function, split out from...
26981         (create_mem_ref): ...here.  When handling a scale other than 1,
26982         check first whether the address is valid without the offset.
26983         Add it into the base if so, leaving the index and scale as-is.
26985 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
26987         PR c++/83778
26988         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
26989         fold_for_warn before checking if arg2 is INTEGER_CST.
26991 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
26993         * config/rs6000/predicates.md (load_multiple_operation): Delete.
26994         (store_multiple_operation): Delete.
26995         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
26996         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
26997         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
26998         guarded by TARGET_STRING.
26999         (rs6000_output_load_multiple): Delete.
27000         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27001         OPTION_MASK_STRING / TARGET_STRING handling.
27002         (print_operand) <'N', 'O'>: Add comment that these are unused now.
27003         (const rs6000_opt_masks) <"string">: Change mask to 0.
27004         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
27005         (MASK_STRING): Delete.
27006         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
27007         parts.  Simplify.
27008         (load_multiple): Delete.
27009         (*ldmsi8): Delete.
27010         (*ldmsi7): Delete.
27011         (*ldmsi6): Delete.
27012         (*ldmsi5): Delete.
27013         (*ldmsi4): Delete.
27014         (*ldmsi3): Delete.
27015         (store_multiple): Delete.
27016         (*stmsi8): Delete.
27017         (*stmsi7): Delete.
27018         (*stmsi6): Delete.
27019         (*stmsi5): Delete.
27020         (*stmsi4): Delete.
27021         (*stmsi3): Delete.
27022         (movmemsi_8reg): Delete.
27023         (corresponding unnamed define_insn): Delete.
27024         (movmemsi_6reg): Delete.
27025         (corresponding unnamed define_insn): Delete.
27026         (movmemsi_4reg): Delete.
27027         (corresponding unnamed define_insn): Delete.
27028         (movmemsi_2reg): Delete.
27029         (corresponding unnamed define_insn): Delete.
27030         (movmemsi_1reg): Delete.
27031         (corresponding unnamed define_insn): Delete.
27032         * config/rs6000/rs6000.opt (mno-string): New.
27033         (mstring): Replace by deprecation warning stub.
27034         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
27036 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
27038         * regrename.c (regrename_do_replace): If replacing the same
27039         reg multiple times, try to reuse last created gen_raw_REG.
27041         PR debug/81155
27042         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
27043         main to workaround a bug in GDB.
27045 2018-01-12  Tom de Vries  <tom@codesourcery.com>
27047         PR target/83737
27048         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
27050 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
27052         PR rtl-optimization/80481
27053         * ira-color.c (get_cap_member): New function.
27054         (allocnos_conflict_by_live_ranges_p): Use it.
27055         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
27056         (setup_slot_coalesced_allocno_live_ranges): Ditto.
27058 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
27060         PR target/83628
27061         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
27062         (*saddl_se_1): Ditto.
27063         (*ssubsi_1): Ditto.
27064         (*ssubl_se_1): Ditto.
27066 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
27068         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
27069         rather than wi::to_widest for DR_INITs.
27070         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
27071         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
27072         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
27073         INTEGER_CSTs.
27074         (vect_analyze_group_access_1): Note that here.
27076 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
27078         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
27079         polynomial type sizes.
27081 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
27083         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
27084         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
27085         (gimple_add_tmp_var): Likewise.
27087 2018-01-12  Martin Liska  <mliska@suse.cz>
27089         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
27090         (gimple_alloc_sizes): Likewise.
27091         (dump_gimple_statistics): Use PRIu64 in printf format.
27092         * gimple.h: Change uint64_t to int.
27094 2018-01-12  Martin Liska  <mliska@suse.cz>
27096         * tree-core.h: Use uint64_t instead of int.
27097         * tree.c (tree_node_counts): Likewise.
27098         (tree_node_sizes): Likewise.
27099         (dump_tree_statistics): Use PRIu64 in printf format.
27101 2018-01-12  Martin Liska  <mliska@suse.cz>
27103         * Makefile.in: As qsort_chk is implemented in vec.c, add
27104         vec.o to linkage of gencfn-macros.
27105         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
27106         passing the info to record_node_allocation_statistics.
27107         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
27108         and pass the info.
27109         * ggc-common.c (struct ggc_usage): Add operator== and use
27110         it in operator< and compare function.
27111         * mem-stats.h (struct mem_usage): Likewise.
27112         * vec.c (struct vec_usage): Remove operator< and compare
27113         function. Can be simply inherited.
27115 2018-01-12  Martin Jambor  <mjambor@suse.cz>
27117         PR target/81616
27118         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
27119         * tree-ssa-math-opts.c: Include domwalk.h.
27120         (convert_mult_to_fma_1): New function.
27121         (fma_transformation_info): New type.
27122         (fma_deferring_state): Likewise.
27123         (cancel_fma_deferring): New function.
27124         (result_of_phi): Likewise.
27125         (last_fma_candidate_feeds_initial_phi): Likewise.
27126         (convert_mult_to_fma): Added deferring logic, split actual
27127         transformation to convert_mult_to_fma_1.
27128         (math_opts_dom_walker): New type.
27129         (math_opts_dom_walker::after_dom_children): New method, body moved
27130         here from pass_optimize_widening_mul::execute, added deferring logic
27131         bits.
27132         (pass_optimize_widening_mul::execute): Moved most of code to
27133         math_opts_dom_walker::after_dom_children.
27134         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
27135         * config/i386/i386.c (ix86_option_override_internal): Added
27136         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
27138 2018-01-12  Richard Biener  <rguenther@suse.de>
27140         PR debug/83157
27141         * dwarf2out.c (gen_variable_die): Do not reset old_die for
27142         inline instance vars.
27144 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
27146         PR target/81819
27147         * config/rx/rx.c (rx_is_restricted_memory_address):
27148         Handle SUBREG case.
27150 2018-01-12  Richard Biener  <rguenther@suse.de>
27152         PR tree-optimization/80846
27153         * target.def (split_reduction): New target hook.
27154         * targhooks.c (default_split_reduction): New function.
27155         * targhooks.h (default_split_reduction): Declare.
27156         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
27157         target requests first reduce vectors by combining low and high
27158         parts.
27159         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
27160         (get_vectype_for_scalar_type_and_size): Export.
27161         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
27162         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
27163         * doc/tm.texi: Regenerate.
27164         * config/i386/i386.c (ix86_split_reduction): Implement
27165         TARGET_VECTORIZE_SPLIT_REDUCTION.
27167 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
27169         PR target/83368
27170         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
27171         in PIC mode except for TARGET_VXWORKS_RTP.
27172         * config/sparc/sparc.c: Include cfgrtl.h.
27173         (TARGET_INIT_PIC_REG): Define.
27174         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
27175         (sparc_pic_register_p): New predicate.
27176         (sparc_legitimate_address_p): Use it.
27177         (sparc_legitimize_pic_address): Likewise.
27178         (sparc_delegitimize_address): Likewise.
27179         (sparc_mode_dependent_address_p): Likewise.
27180         (gen_load_pcrel_sym): Remove 4th parameter.
27181         (load_got_register): Adjust call to above.  Remove obsolete stuff.
27182         (sparc_expand_prologue): Do not call load_got_register here.
27183         (sparc_flat_expand_prologue): Likewise.
27184         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
27185         (sparc_use_pseudo_pic_reg): New function.
27186         (sparc_init_pic_reg): Likewise.
27187         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27188         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
27190 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
27192         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27193         Add item for branch_cost.
27195 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
27197         PR rtl-optimization/83565
27198         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
27199         not extend the result to a larger mode for rotate operations.
27200         (num_sign_bit_copies1): Likewise.
27202 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27204         PR target/40411
27205         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
27206         -symbolic.
27207         Use values-Xc.o for -pedantic.
27208         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
27210 2018-01-12  Martin Liska  <mliska@suse.cz>
27212         PR ipa/83054
27213         * ipa-devirt.c (final_warning_record::grow_type_warnings):
27214         New function.
27215         (possible_polymorphic_call_targets): Use it.
27216         (ipa_devirt): Likewise.
27218 2018-01-12  Martin Liska  <mliska@suse.cz>
27220         * profile-count.h (enum profile_quality): Use 0 as invalid
27221         enum value of profile_quality.
27223 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
27225         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27226         -mext-string options.
27228 2018-01-12  Richard Biener  <rguenther@suse.de>
27230         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27231         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27232         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27233         Likewise.
27234         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27236 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
27238         * configure.ac (--with-long-double-format): Add support for the
27239         configuration option to change the default long double format on
27240         PowerPC systems.
27241         * config.gcc (powerpc*-linux*-*): Likewise.
27242         * configure: Regenerate.
27243         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27244         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27245         used without modification.
27247 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27249         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27250         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27251         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27252         MISC_BUILTIN_SPEC_BARRIER.
27253         (rs6000_init_builtins): Likewise.
27254         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27255         enum value.
27256         (speculation_barrier): New define_insn.
27257         * doc/extend.texi: Document __builtin_speculation_barrier.
27259 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
27261         PR target/83203
27262         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27263         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27264         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27265         iterators.
27266         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
27267         integral modes instead of "ss" and "sd".
27268         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27269         vectors with 32-bit and 64-bit elements.
27270         (vecdupssescalarmodesuffix): New mode attribute.
27271         (vec_dup<mode>): Use it.
27273 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
27275         PR target/83330
27276         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27277         frame if argument is passed on stack.
27279 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
27281         PR target/82682
27282         * ree.c (combine_reaching_defs): Optimize also
27283         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27284         reg2=any_extend(exp); reg1=reg2;, formatting fix.
27286 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
27288         PR middle-end/83189
27289         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27291 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
27293         PR middle-end/83718
27294         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27295         after they are computed.
27297 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
27299         PR tree-optimization/83695
27300         * gimple-loop-linterchange.cc
27301         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27302         reset cached scev information after interchange.
27303         (pass_linterchange::execute): Remove call to scev_reset_htab.
27305 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27307         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27308         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27309         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27310         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27311         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27312         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27313         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27314         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27315         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27316         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27317         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27318         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27319         (V_lane_reg): Likewise.
27320         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27321         New define_expand.
27322         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27323         (vfmal_lane_low<mode>_intrinsic,
27324         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27325         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27326         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27327         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27328         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27329         vfmsl_lane_high<mode>_intrinsic): New define_insns.
27331 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27333         * config/arm/arm-cpus.in (fp16fml): New feature.
27334         (ALL_SIMD): Add fp16fml.
27335         (armv8.2-a): Add fp16fml as an option.
27336         (armv8.3-a): Likewise.
27337         (armv8.4-a): Add fp16fml as part of fp16.
27338         * config/arm/arm.h (TARGET_FP16FML): Define.
27339         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27340         when appropriate.
27341         * config/arm/arm-modes.def (V2HF): Define.
27342         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27343         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27344         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27345         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27346         vfmsl_low, vfmsl_high): New set of builtins.
27347         * config/arm/iterators.md (PLUSMINUS): New code iterator.
27348         (vfml_op): New code attribute.
27349         (VFMLHALVES): New int iterator.
27350         (VFML, VFMLSEL): New mode attributes.
27351         (V_reg): Define mapping for V2HF.
27352         (V_hi, V_lo): New mode attributes.
27353         (VF_constraint): Likewise.
27354         (vfml_half, vfml_half_selector): New int attributes.
27355         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27356         define_expand.
27357         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27358         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27359         New define_insn.
27360         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27361         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27362         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27363         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
27364         documentation.
27365         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27366         Document new effective target and option set.
27368 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27370         * config/arm/arm-cpus.in (armv8_4): New feature.
27371         (ARMv8_4a): New fgroup.
27372         (armv8.4-a): New arch.
27373         * config/arm/arm-tables.opt: Regenerate.
27374         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27375         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27376         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27377         Add matching rules for -march=armv8.4-a and extensions.
27378         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27380 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
27382         PR target/81821
27383         * config/rx/rx.md (BW): New mode attribute.
27384         (sync_lock_test_and_setsi): Add mode suffix to insn output.
27386 2018-01-11  Richard Biener  <rguenther@suse.de>
27388         PR tree-optimization/83435
27389         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27390         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27391         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27393 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27394             Alan Hayward  <alan.hayward@arm.com>
27395             David Sherwood  <david.sherwood@arm.com>
27397         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27398         field.
27399         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
27400         (aarch64_print_address_internal): Use it to check for a zero offset.
27402 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27403             Alan Hayward  <alan.hayward@arm.com>
27404             David Sherwood  <david.sherwood@arm.com>
27406         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27407         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27408         Return a poly_int64 rather than a HOST_WIDE_INT.
27409         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27410         rather than a HOST_WIDE_INT.
27411         * config/aarch64/aarch64.h (aarch64_frame): Protect with
27412         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
27413         hard_fp_offset, frame_size, initial_adjust, callee_offset and
27414         final_offset from HOST_WIDE_INT to poly_int64.
27415         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27416         to_constant when getting the number of units in an Advanced SIMD
27417         mode.
27418         (aarch64_builtin_vectorized_function): Check for a constant number
27419         of units.
27420         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27421         GET_MODE_SIZE.
27422         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27423         attribute instead of GET_MODE_NUNITS.
27424         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27425         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27426         GET_MODE_SIZE for fixed-size registers.
27427         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27428         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27429         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27430         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27431         (aarch64_print_operand, aarch64_print_address_internal)
27432         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27433         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27434         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27435         Handle polynomial GET_MODE_SIZE.
27436         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
27437         wider than SImode without modification.
27438         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27439         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27440         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27441         passing and returning SVE modes.
27442         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27443         rather than GEN_INT.
27444         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27445         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27446         (aarch64_allocate_and_probe_stack_space): Likewise.
27447         (aarch64_layout_frame): Cope with polynomial offsets.
27448         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27449         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
27450         polynomial offsets.
27451         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27452         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27453         poly_int64 rather than a HOST_WIDE_INT.
27454         (aarch64_get_separate_components, aarch64_process_components)
27455         (aarch64_expand_prologue, aarch64_expand_epilogue)
27456         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27457         (aarch64_anchor_offset): New function, split out from...
27458         (aarch64_legitimize_address): ...here.
27459         (aarch64_builtin_vectorization_cost): Handle polynomial
27460         TYPE_VECTOR_SUBPARTS.
27461         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27462         GET_MODE_NUNITS.
27463         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27464         number of elements from the PARALLEL rather than the mode.
27465         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27466         rather than GET_MODE_BITSIZE.
27467         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27468         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27469         (aarch64_expand_vec_perm_const_1): Handle polynomial
27470         d->perm.length () and d->perm elements.
27471         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
27472         Apply to_constant to d->perm elements.
27473         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27474         polynomial CONST_VECTOR_NUNITS.
27475         (aarch64_move_pointer): Take amount as a poly_int64 rather
27476         than an int.
27477         (aarch64_progress_pointer): Avoid temporary variable.
27478         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27479         the mode attribute instead of GET_MODE.
27481 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27482             Alan Hayward  <alan.hayward@arm.com>
27483             David Sherwood  <david.sherwood@arm.com>
27485         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27486         x exists before using it.
27487         (aarch64_add_constant_internal): Rename to...
27488         (aarch64_add_offset_1): ...this.  Replace regnum with separate
27489         src and dest rtxes.  Handle the case in which they're different,
27490         including when the offset is zero.  Replace scratchreg with an rtx.
27491         Use 2 additions if there is no spare register into which we can
27492         move a 16-bit constant.
27493         (aarch64_add_constant): Delete.
27494         (aarch64_add_offset): Replace reg with separate src and dest
27495         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
27496         Use aarch64_add_offset_1.
27497         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27498         an rtx rather than an int.  Take the delta as a poly_int64
27499         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
27500         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27501         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27502         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27503         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27504         and aarch64_add_sp.
27505         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27506         aarch64_add_constant.
27508 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27510         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27511         Use scalar_float_mode.
27513 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27515         * config/aarch64/aarch64-simd.md
27516         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27517         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27518         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27519         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27520         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27521         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27522         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27523         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27524         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27525         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27527 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27529         PR target/83514
27530         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27531         targ_options->x_arm_arch_string is non NULL.
27533 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
27535         * config/aarch64/aarch64.h
27536         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
27538 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
27540         PR target/82096
27541         * expmed.c (emit_store_flag_force): Swap if const op0
27542         and change VOIDmode to mode of op0.
27544 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
27546         PR rtl-optimization/83761
27547         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27548         than bytes to mode_for_size.
27550 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
27552         PR middle-end/83189
27553         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27554         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27555         profile.
27557 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
27559         PR middle-end/83575
27560         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27561         when in layout mode.
27562         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27563         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27564         partition fixup.
27566 2018-01-10  Michael Collison  <michael.collison@arm.com>
27568         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27569         * config/aarch64/aarch64-option-extension.def: Add
27570         AARCH64_OPT_EXTENSION of 'fp16fml'.
27571         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27572         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27573         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27574         * config/aarch64/constraints.md (Ui7): New constraint.
27575         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27576         (VFMLA_SEL_W): Ditto.
27577         (f16quad): Ditto.
27578         (f16mac1): Ditto.
27579         (VFMLA16_LOW): New int iterator.
27580         (VFMLA16_HIGH): Ditto.
27581         (UNSPEC_FMLAL): New unspec.
27582         (UNSPEC_FMLSL): Ditto.
27583         (UNSPEC_FMLAL2): Ditto.
27584         (UNSPEC_FMLSL2): Ditto.
27585         (f16mac): New code attribute.
27586         * config/aarch64/aarch64-simd-builtins.def
27587         (aarch64_fmlal_lowv2sf): Ditto.
27588         (aarch64_fmlsl_lowv2sf): Ditto.
27589         (aarch64_fmlalq_lowv4sf): Ditto.
27590         (aarch64_fmlslq_lowv4sf): Ditto.
27591         (aarch64_fmlal_highv2sf): Ditto.
27592         (aarch64_fmlsl_highv2sf): Ditto.
27593         (aarch64_fmlalq_highv4sf): Ditto.
27594         (aarch64_fmlslq_highv4sf): Ditto.
27595         (aarch64_fmlal_lane_lowv2sf): Ditto.
27596         (aarch64_fmlsl_lane_lowv2sf): Ditto.
27597         (aarch64_fmlal_laneq_lowv2sf): Ditto.
27598         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27599         (aarch64_fmlalq_lane_lowv4sf): Ditto.
27600         (aarch64_fmlsl_lane_lowv4sf): Ditto.
27601         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27602         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27603         (aarch64_fmlal_lane_highv2sf): Ditto.
27604         (aarch64_fmlsl_lane_highv2sf): Ditto.
27605         (aarch64_fmlal_laneq_highv2sf): Ditto.
27606         (aarch64_fmlsl_laneq_highv2sf): Ditto.
27607         (aarch64_fmlalq_lane_highv4sf): Ditto.
27608         (aarch64_fmlsl_lane_highv4sf): Ditto.
27609         (aarch64_fmlalq_laneq_highv4sf): Ditto.
27610         (aarch64_fmlsl_laneq_highv4sf): Ditto.
27611         * config/aarch64/aarch64-simd.md:
27612         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27613         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27614         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27615         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27616         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27617         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27618         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27619         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27620         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27621         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27622         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27623         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27624         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27625         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27626         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27627         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27628         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27629         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27630         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27631         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27632         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27633         (vfmlsl_low_u32): Ditto.
27634         (vfmlalq_low_u32): Ditto.
27635         (vfmlslq_low_u32): Ditto.
27636         (vfmlal_high_u32): Ditto.
27637         (vfmlsl_high_u32): Ditto.
27638         (vfmlalq_high_u32): Ditto.
27639         (vfmlslq_high_u32): Ditto.
27640         (vfmlal_lane_low_u32): Ditto.
27641         (vfmlsl_lane_low_u32): Ditto.
27642         (vfmlal_laneq_low_u32): Ditto.
27643         (vfmlsl_laneq_low_u32): Ditto.
27644         (vfmlalq_lane_low_u32): Ditto.
27645         (vfmlslq_lane_low_u32): Ditto.
27646         (vfmlalq_laneq_low_u32): Ditto.
27647         (vfmlslq_laneq_low_u32): Ditto.
27648         (vfmlal_lane_high_u32): Ditto.
27649         (vfmlsl_lane_high_u32): Ditto.
27650         (vfmlal_laneq_high_u32): Ditto.
27651         (vfmlsl_laneq_high_u32): Ditto.
27652         (vfmlalq_lane_high_u32): Ditto.
27653         (vfmlslq_lane_high_u32): Ditto.
27654         (vfmlalq_laneq_high_u32): Ditto.
27655         (vfmlslq_laneq_high_u32): Ditto.
27656         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27657         (AARCH64_FL_FOR_ARCH8_4): New.
27658         (AARCH64_ISA_F16FML): New ISA flag.
27659         (TARGET_F16FML): New feature flag for fp16fml.
27660         (doc/invoke.texi): Document new fp16fml option.
27662 2018-01-10  Michael Collison  <michael.collison@arm.com>
27664         * config/aarch64/aarch64-builtins.c:
27665         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27666         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27667         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27668         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27669         (AARCH64_ISA_SHA3): New ISA flag.
27670         (TARGET_SHA3): New feature flag for sha3.
27671         * config/aarch64/iterators.md (sha512_op): New int attribute.
27672         (CRYPTO_SHA512): New int iterator.
27673         (UNSPEC_SHA512H): New unspec.
27674         (UNSPEC_SHA512H2): Ditto.
27675         (UNSPEC_SHA512SU0): Ditto.
27676         (UNSPEC_SHA512SU1): Ditto.
27677         * config/aarch64/aarch64-simd-builtins.def
27678         (aarch64_crypto_sha512hqv2di): New builtin.
27679         (aarch64_crypto_sha512h2qv2di): Ditto.
27680         (aarch64_crypto_sha512su0qv2di): Ditto.
27681         (aarch64_crypto_sha512su1qv2di): Ditto.
27682         (aarch64_eor3qv8hi): Ditto.
27683         (aarch64_rax1qv2di): Ditto.
27684         (aarch64_xarqv2di): Ditto.
27685         (aarch64_bcaxqv8hi): Ditto.
27686         * config/aarch64/aarch64-simd.md:
27687         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27688         (aarch64_crypto_sha512su0qv2di): Ditto.
27689         (aarch64_crypto_sha512su1qv2di): Ditto.
27690         (aarch64_eor3qv8hi): Ditto.
27691         (aarch64_rax1qv2di): Ditto.
27692         (aarch64_xarqv2di): Ditto.
27693         (aarch64_bcaxqv8hi): Ditto.
27694         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27695         (vsha512h2q_u64): Ditto.
27696         (vsha512su0q_u64): Ditto.
27697         (vsha512su1q_u64): Ditto.
27698         (veor3q_u16): Ditto.
27699         (vrax1q_u64): Ditto.
27700         (vxarq_u64): Ditto.
27701         (vbcaxq_u16): Ditto.
27702         * config/arm/types.md (crypto_sha512): New type attribute.
27703         (crypto_sha3): Ditto.
27704         (doc/invoke.texi): Document new sha3 option.
27706 2018-01-10  Michael Collison  <michael.collison@arm.com>
27708         * config/aarch64/aarch64-builtins.c:
27709         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27710         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27711         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27712         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27713         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27714         (AARCH64_ISA_SM4): New ISA flag.
27715         (TARGET_SM4): New feature flag for sm4.
27716         * config/aarch64/aarch64-simd-builtins.def
27717         (aarch64_sm3ss1qv4si): Ditto.
27718         (aarch64_sm3tt1aq4si): Ditto.
27719         (aarch64_sm3tt1bq4si): Ditto.
27720         (aarch64_sm3tt2aq4si): Ditto.
27721         (aarch64_sm3tt2bq4si): Ditto.
27722         (aarch64_sm3partw1qv4si): Ditto.
27723         (aarch64_sm3partw2qv4si): Ditto.
27724         (aarch64_sm4eqv4si): Ditto.
27725         (aarch64_sm4ekeyqv4si): Ditto.
27726         * config/aarch64/aarch64-simd.md:
27727         (aarch64_sm3ss1qv4si): Ditto.
27728         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27729         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27730         (aarch64_sm4eqv4si): Ditto.
27731         (aarch64_sm4ekeyqv4si): Ditto.
27732         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27733         (sm3part_op): Ditto.
27734         (CRYPTO_SM3TT): Ditto.
27735         (CRYPTO_SM3PART): Ditto.
27736         (UNSPEC_SM3SS1): New unspec.
27737         (UNSPEC_SM3TT1A): Ditto.
27738         (UNSPEC_SM3TT1B): Ditto.
27739         (UNSPEC_SM3TT2A): Ditto.
27740         (UNSPEC_SM3TT2B): Ditto.
27741         (UNSPEC_SM3PARTW1): Ditto.
27742         (UNSPEC_SM3PARTW2): Ditto.
27743         (UNSPEC_SM4E): Ditto.
27744         (UNSPEC_SM4EKEY): Ditto.
27745         * config/aarch64/constraints.md (Ui2): New constraint.
27746         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27747         * config/arm/types.md (crypto_sm3): New type attribute.
27748         (crypto_sm4): Ditto.
27749         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27750         (vsm3tt1aq_u32): Ditto.
27751         (vsm3tt1bq_u32): Ditto.
27752         (vsm3tt2aq_u32): Ditto.
27753         (vsm3tt2bq_u32): Ditto.
27754         (vsm3partw1q_u32): Ditto.
27755         (vsm3partw2q_u32): Ditto.
27756         (vsm4eq_u32): Ditto.
27757         (vsm4ekeyq_u32): Ditto.
27758         (doc/invoke.texi): Document new sm4 option.
27760 2018-01-10  Michael Collison  <michael.collison@arm.com>
27762         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27763         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27764         (AARCH64_FL_FOR_ARCH8_4): New.
27765         (AARCH64_FL_V8_4): New flag.
27766         (doc/invoke.texi): Document new armv8.4-a option.
27768 2018-01-10  Michael Collison  <michael.collison@arm.com>
27770         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27771         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27772         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27773         * config/aarch64/aarch64-option-extension.def: Add
27774         AARCH64_OPT_EXTENSION of 'sha2'.
27775         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27776         (crypto): Disable sha2 and aes if crypto disabled.
27777         (crypto): Enable aes and sha2 if enabled.
27778         (simd): Disable sha2 and aes if simd disabled.
27779         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27780         New flags.
27781         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27782         (TARGET_SHA2): New feature flag for sha2.
27783         (TARGET_AES): New feature flag for aes.
27784         * config/aarch64/aarch64-simd.md:
27785         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27786         conditional on TARGET_AES.
27787         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27788         (aarch64_crypto_sha1hsi): Make pattern conditional
27789         on TARGET_SHA2.
27790         (aarch64_crypto_sha1hv4si): Ditto.
27791         (aarch64_be_crypto_sha1hv4si): Ditto.
27792         (aarch64_crypto_sha1su1v4si): Ditto.
27793         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27794         (aarch64_crypto_sha1su0v4si): Ditto.
27795         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27796         (aarch64_crypto_sha256su0v4si): Ditto.
27797         (aarch64_crypto_sha256su1v4si): Ditto.
27798         (doc/invoke.texi): Document new aes and sha2 options.
27800 2018-01-10  Martin Sebor  <msebor@redhat.com>
27802         PR tree-optimization/83781
27803         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27804         as string arrays.
27806 2018-01-11  Martin Sebor  <msebor@gmail.com>
27807             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27809         PR tree-optimization/83501
27810         PR tree-optimization/81703
27812         * tree-ssa-strlen.c (get_string_cst): Rename...
27813         (get_string_len): ...to this.  Handle global constants.
27814         (handle_char_store): Adjust.
27816 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
27817             Jim Wilson  <jimw@sifive.com>
27819         * config/riscv/riscv-protos.h (riscv_output_return): New.
27820         * config/riscv/riscv.c (struct machine_function): New naked_p field.
27821         (riscv_attribute_table, riscv_output_return),
27822         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27823         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27824         (riscv_compute_frame_info): Only compute frame->mask if not a naked
27825         function.
27826         (riscv_expand_prologue): Add early return for naked function.
27827         (riscv_expand_epilogue): Likewise.
27828         (riscv_function_ok_for_sibcall): Return false for naked function.
27829         (riscv_set_current_function): New.
27830         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27831         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27832         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27833         * doc/extend.texi (RISC-V Function Attributes): New.
27835 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
27837         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27838         check for 128-bit long double before checking TCmode.
27839         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27840         128-bit long doubles before checking TFmode or TCmode.
27841         (FLOAT128_IBM_P): Likewise.
27843 2018-01-10  Martin Sebor  <msebor@redhat.com>
27845         PR tree-optimization/83671
27846         * builtins.c (c_strlen): Unconditionally return zero for the empty
27847         string.
27848         Use -Warray-bounds for warnings.
27849         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27850         for non-constant array indices with COMPONENT_REF, arrays of
27851         arrays, and pointers to arrays.
27852         (gimple_fold_builtin_strlen): Determine and set length range for
27853         non-constant character arrays.
27855 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
27857         PR middle-end/81897
27858         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27859         empty blocks.
27861 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
27863         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27865 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
27867         PR target/83399
27868         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27869         VECTOR_MEM_ALTIVEC_OR_VSX_P.
27870         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27871         indexed_or_indirect_operand predicate.
27872         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27873         (*vsx_le_perm_load_v8hi): Likewise.
27874         (*vsx_le_perm_load_v16qi): Likewise.
27875         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27876         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27877         (*vsx_le_perm_store_v8hi): Likewise.
27878         (*vsx_le_perm_store_v16qi): Likewise.
27879         (eight unnamed splitters): Likewise.
27881 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
27883         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27884         * config/rs6000/emmintrin.h: Likewise.
27885         * config/rs6000/mmintrin.h: Likewise.
27886         * config/rs6000/xmmintrin.h: Likewise.
27888 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
27890         PR c++/43486
27891         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27892         "public_flag".
27893         * tree.c (tree_nop_conversion): Return true for location wrapper
27894         nodes.
27895         (maybe_wrap_with_location): New function.
27896         (selftest::check_strip_nops): New function.
27897         (selftest::test_location_wrappers): New function.
27898         (selftest::tree_c_tests): Call it.
27899         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27900         (maybe_wrap_with_location): New decl.
27901         (EXPR_LOCATION_WRAPPER_P): New macro.
27902         (location_wrapper_p): New inline function.
27903         (tree_strip_any_location_wrapper): New inline function.
27905 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
27907         PR target/83735
27908         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27909         stack_realign_offset for the largest alignment of stack slot
27910         actually used.
27911         (ix86_find_max_used_stack_alignment): New function.
27912         (ix86_finalize_stack_frame_flags): Use it.  Set
27913         max_used_stack_alignment if we don't realign stack.
27914         * config/i386/i386.h (machine_function): Add
27915         max_used_stack_alignment.
27917 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
27919         * config/arm/arm.opt (-mbranch-cost): New option.
27920         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27921         account.
27923 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
27925         PR target/83629
27926         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27927         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27929 2018-01-10  Richard Biener  <rguenther@suse.de>
27931         PR debug/83765
27932         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
27933         early out so it also covers the case where we have a non-NULL
27934         origin.
27936 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
27938         PR tree-optimization/83753
27939         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
27940         for non-strided grouped accesses if the number of elements is 1.
27942 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
27944         PR target/81616
27945         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
27946         * i386.h (TARGET_USE_GATHER): Define.
27947         * x86-tune.def (X86_TUNE_USE_GATHER): New.
27949 2018-01-10  Martin Liska  <mliska@suse.cz>
27951         PR bootstrap/82831
27952         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
27953         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
27954         partitioning.
27955         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
27956         CLEANUP_NO_PARTITIONING is not set.
27958 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
27960         * doc/rtl.texi: Remove documentation of (const ...) wrappers
27961         for vectors, as a partial revert of r254296.
27962         * rtl.h (const_vec_p): Delete.
27963         (const_vec_duplicate_p): Don't test for vector CONSTs.
27964         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
27965         * expmed.c (make_tree): Likewise.
27967         Revert:
27968         * common.md (E, F): Use CONSTANT_P instead of checking for
27969         CONST_VECTOR.
27970         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
27971         checking for CONST_VECTOR.
27973 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
27975         PR middle-end/83575
27976         * predict.c (force_edge_cold): Handle in more sane way edges
27977         with no prediction.
27979 2018-01-09  Carl Love  <cel@us.ibm.com>
27981         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
27982         V4SI, V4SF types.
27983         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
27984         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
27985         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
27986         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
27987         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
27988         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
27989         * config/rs6000/rs6000-protos.h: Add extern defition for
27990         rs6000_generate_float2_double_code.
27991         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
27992         function.
27993         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
27994         (float2_v2df): Add define_expand.
27996 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
27998         PR target/83628
27999         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
28000         op_mode in the force_to_mode call.
28002 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
28004         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
28005         instead of checking each element individually.
28006         (aarch64_evpc_uzp): Likewise.
28007         (aarch64_evpc_zip): Likewise.
28008         (aarch64_evpc_ext): Likewise.
28009         (aarch64_evpc_rev): Likewise.
28010         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
28011         instead of checking each element individually.  Return true without
28012         generating rtl if
28013         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
28014         whether all selected elements come from the same input, instead of
28015         checking each element individually.  Remove calls to gen_rtx_REG,
28016         start_sequence and end_sequence and instead assert that no rtl is
28017         generated.
28019 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
28021         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
28022         order of HIGH and CONST checks.
28024 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
28026         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
28027         if the destination isn't an SSA_NAME.
28029 2018-01-09  Richard Biener  <rguenther@suse.de>
28031         PR tree-optimization/83668
28032         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
28033         move prologue...
28034         (canonicalize_loop_form): ... here, renamed from ...
28035         (canonicalize_loop_closed_ssa_form): ... this and amended to
28036         swap successor edges for loop exit blocks to make us use
28037         the RPO order we need for initial schedule generation.
28039 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
28041         PR tree-optimization/64811
28042         * match.pd: When optimizing comparisons with Inf, avoid
28043         introducing or losing exceptions from comparisons with NaN.
28045 2018-01-09  Martin Liska  <mliska@suse.cz>
28047         PR sanitizer/82517
28048         * asan.c (shadow_mem_size): Add gcc_assert.
28050 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
28052         Don't save registers in main().
28054         PR target/83738
28055         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
28056         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
28057         * config/avr/avr.c (avr_set_current_function): Don't error if
28058         naked, OS_task or OS_main are specified at the same time.
28059         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
28060         OS_main.
28061         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
28062         attribute.
28063         * common/config/avr/avr-common.c (avr_option_optimization_table):
28064         Switch on -mmain-is-OS_task for optimizing compilations.
28066 2018-01-09  Richard Biener  <rguenther@suse.de>
28068         PR tree-optimization/83572
28069         * graphite.c: Include cfganal.h.
28070         (graphite_transform_loops): Connect infinite loops to exit
28071         and remove fake edges at the end.
28073 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
28075         * ipa-inline.c (edge_badness): Revert accidental checkin.
28077 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
28079         PR ipa/80763
28080         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
28081         symbols; not inline clones.
28083 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
28085         PR target/83507
28086         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
28087         hard registers.  Formatting fixes.
28089         PR preprocessor/83722
28090         * gcc.c (try_generate_repro): Pass
28091         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
28092         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
28093         do_report_bug.
28095 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
28096             Kito Cheng  <kito.cheng@gmail.com>
28098         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
28099         (riscv_leaf_function_p): Delete.
28100         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
28102 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28104         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
28105         function.
28106         (do_ifelse): New function.
28107         (do_isel): New function.
28108         (do_sub3): New function.
28109         (do_add3): New function.
28110         (do_load_mask_compare): New function.
28111         (do_overlap_load_compare): New function.
28112         (expand_compare_loop): New function.
28113         (expand_block_compare): Call expand_compare_loop() when appropriate.
28114         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
28115         option description.
28116         (-mblock-compare-inline-loop-limit): New option.
28118 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28120         PR target/83677
28121         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
28122         Reverse order of second and third operands in first alternative.
28123         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
28124         of first and second elements in UNSPEC_VPERMR vector.
28125         (altivec_expand_vec_perm_le): Likewise.
28127 2018-01-08  Jeff Law  <law@redhat.com>
28129         PR rtl-optimizatin/81308
28130         * tree-switch-conversion.c (cfg_altered): New file scoped static.
28131         (process_switch): If group_case_labels makes a change, then set
28132         cfg_altered.
28133         (pass_convert_switch::execute): If a switch is converted, then
28134         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
28136         PR rtl-optimization/81308
28137         * recog.c (split_all_insns): Conditionally cleanup the CFG after
28138         splitting insns.
28140 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
28142         PR target/83663 - Revert r255946
28143         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
28144         generation for cases where splatting a value is not useful.
28145         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
28146         across a vec_duplicate and a paradoxical subreg forming a vector
28147         mode to a vec_concat.
28149 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28151         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
28152         -march=armv8.3-a variants.
28153         * config/arm/t-multilib: Likewise.
28154         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
28156 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28158         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
28159         to generate rtl.
28160         (cceq_ior_compare_complement): Give it a name so I can use it, and
28161         change boolean_or_operator predicate to boolean_operator so it can
28162         be used to generate a crand.
28163         (eqne): New code iterator.
28164         (bd/bd_neg): New code_attrs.
28165         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
28166         a single define_insn.
28167         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
28168         decrement (bdnzt/bdnzf/bdzt/bdzf).
28169         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
28170         with the new names of the branch decrement patterns, and added the
28171         names of the branch decrement conditional patterns.
28173 2018-01-08  Richard Biener  <rguenther@suse.de>
28175         PR tree-optimization/83563
28176         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
28177         cache.
28179 2018-01-08  Richard Biener  <rguenther@suse.de>
28181         PR middle-end/83713
28182         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
28184 2018-01-08  Richard Biener  <rguenther@suse.de>
28186         PR tree-optimization/83685
28187         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
28188         references to abnormals.
28190 2018-01-08  Richard Biener  <rguenther@suse.de>
28192         PR lto/83719
28193         * dwarf2out.c (output_indirect_strings): Handle empty
28194         skeleton_debug_str_hash.
28195         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
28197 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
28199         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
28200         (emit_store_direct): Likewise.
28201         (arc_trampoline_adjust_address): Likewise.
28202         (arc_asm_trampoline_template): New function.
28203         (arc_initialize_trampoline): Use asm_trampoline_template.
28204         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
28205         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
28206         * config/arc/arc.md (flush_icache): Delete pattern.
28208 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
28210         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28211         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28212         munaligned-access.
28214 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
28216         PR target/83681
28217         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28218         by not USED_FOR_TARGET.
28219         (make_pass_resolve_sw_modes): Likewise.
28221 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
28223         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28224         USED_FOR_TARGET.
28226 2018-01-08  Richard Biener  <rguenther@suse.de>
28228         PR middle-end/83580
28229         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28231 2018-01-08  Richard Biener  <rguenther@suse.de>
28233         PR middle-end/83517
28234         * match.pd ((t * 2) / 2) -> t): Add missing :c.
28236 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
28238         PR middle-end/81897
28239         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28240         basic blocks with a small number of successors.
28241         (convert_control_dep_chain_into_preds): Improve handling of
28242         forwarder blocks.
28243         (dump_predicates): Split apart into...
28244         (dump_pred_chain): ...here...
28245         (dump_pred_info): ...and here.
28246         (can_one_predicate_be_invalidated_p): Add debugging printfs.
28247         (can_chain_union_be_invalidated_p): Improve check for invalidation
28248         of paths.
28249         (uninit_uses_cannot_happen): Avoid unnecessary if
28250         convert_control_dep_chain_into_preds yielded nothing.
28252 2018-01-06  Martin Sebor  <msebor@redhat.com>
28254         PR tree-optimization/83640
28255         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28256         subtracting negative offset from size.
28257         (builtin_access::overlap): Adjust offset bounds of the access to fall
28258         within the size of the object if possible.
28260 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
28262         PR rtl-optimization/83699
28263         * expmed.c (extract_bit_field_1): Restrict the vector usage of
28264         extract_bit_field_as_subreg to cases in which the extracted
28265         value is also a vector.
28267         * lra-constraints.c (process_alt_operands): Test for the equivalence
28268         substitutions when detecting a possible reload cycle.
28270 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
28272         PR debug/83480
28273         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28274         by default if flag_selective_schedling{,2}.  Formatting fixes.
28276         PR rtl-optimization/83682
28277         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28278         if it has non-VECTOR_MODE element mode.
28279         (vec_duplicate_p): Likewise.
28281         PR middle-end/83694
28282         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28283         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28285 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
28287         PR target/83604
28288         * config/i386/i386-builtin.def
28289         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28290         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28291         Require also OPTION_MASK_ISA_AVX512F in addition to
28292         OPTION_MASK_ISA_GFNI.
28293         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28294         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28295         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28296         to OPTION_MASK_ISA_GFNI.
28297         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28298         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28299         OPTION_MASK_ISA_AVX512BW.
28300         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28301         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28302         addition to OPTION_MASK_ISA_GFNI.
28303         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28304         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28305         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28306         to OPTION_MASK_ISA_GFNI.
28307         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28308         a requirement for all ISAs rather than any of them with a few
28309         exceptions.
28310         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28311         processing.
28312         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28313         bitmasks to be enabled with 3 exceptions, instead of requiring any
28314         enabled ISA with lots of exceptions.
28315         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28316         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28317         Change avx512bw in isa attribute to avx512f.
28318         * config/i386/sgxintrin.h: Add license boilerplate.
28319         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
28320         to __AVX512F__ and __AVX512VL to __AVX512VL__.
28321         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28322         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28323         defined.
28324         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28325         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28326         temporarily sse2 rather than sse if not enabled already.
28328         PR target/83604
28329         * config/i386/sse.md (VI248_VLBW): Rename to ...
28330         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
28331         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28332         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28333         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28334         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28335         mode iterator instead of VI248_VLBW.
28337 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
28339         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28340         (record_modified): Skip clobbers; add debug output.
28341         (param_change_prob): Use sreal frequencies.
28343 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
28345         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28346         punt for user-aligned variables.
28348 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
28350         * tree-chrec.c (chrec_contains_symbols): Return true for
28351         POLY_INT_CST.
28353 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
28355         PR target/82439
28356         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28357         of (x|y) == x for BICS pattern.
28359 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
28361         PR tree-optimization/83605
28362         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28363         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28364         can throw.
28366 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
28368         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28369         * config/epiphany/rtems.h: New file.
28371 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
28372             Uros Bizjak  <ubizjak@gmail.com>
28374         PR target/83554
28375         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28376         QIreg_operand instead of register_operand predicate.
28377         * config/i386/i386.c (ix86_rop_should_change_byte_p,
28378         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28379         comments instead of -fmitigate[-_]rop.
28381 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28383         PR bootstrap/81926
28384         * cgraphunit.c (symbol_table::compile): Switch to text_section
28385         before calling assembly_start debug hook.
28386         * run-rtl-passes.c (run_rtl_passes): Likewise.
28387         Include output.h.
28389 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28391         * tree-vrp.c (extract_range_from_binary_expr_1): Check
28392         range_int_cst_p rather than !symbolic_range_p before calling
28393         extract_range_from_multiplicative_op_1.
28395 2018-01-04  Jeff Law  <law@redhat.com>
28397         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28398         redundant test in assertion.
28400 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28402         * doc/rtl.texi: Document machine_mode wrapper classes.
28404 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28406         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28407         using tree_to_uhwi.
28409 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28411         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28412         the VEC_PERM_EXPR fold to fail.
28414 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
28416         PR debug/83585
28417         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28418         to switched_sections.
28420 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28422         PR target/83680
28423         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28424         test for d.testing.
28426 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
28428         PR target/83387
28429         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28430         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28432 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
28434         PR debug/83666
28435         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28436         is BLKmode and bitpos not zero or mode change is needed.
28438 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
28440         PR target/83675
28441         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28442         TARGET_VIS2.
28444 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
28446         PR target/83628
28447         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28448         instead of MULT rtx.  Update all corresponding splitters.
28449         (*saddl_se): Ditto.
28450         (*ssub<modesuffix>): Ditto.
28451         (*ssubl_se): Ditto.
28452         (*cmp_sadd_di): Update split patterns.
28453         (*cmp_sadd_si): Ditto.
28454         (*cmp_sadd_sidi): Ditto.
28455         (*cmp_ssub_di): Ditto.
28456         (*cmp_ssub_si): Ditto.
28457         (*cmp_ssub_sidi): Ditto.
28458         * config/alpha/predicates.md (const23_operand): New predicate.
28459         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28460         Look for ASHIFT, not MULT inner operand.
28461         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28463 2018-01-04  Martin Liska  <mliska@suse.cz>
28465         PR gcov-profile/83669
28466         * gcov.c (output_intermediate_file): Add version to intermediate
28467         gcov file.
28468         * doc/gcov.texi: Document new field 'version' in intermediate
28469         file format. Fix location of '-k' option of gcov command.
28471 2018-01-04  Martin Liska  <mliska@suse.cz>
28473         PR ipa/82352
28474         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28476 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
28478         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28480 2018-01-03  Martin Sebor  <msebor@redhat.com>
28482         PR tree-optimization/83655
28483         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28484         checking calls with invalid arguments.
28486 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28488         * tree-vect-stmts.c (vect_get_store_rhs): New function.
28489         (vectorizable_mask_load_store): Delete.
28490         (vectorizable_call): Return false for masked loads and stores.
28491         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
28492         instead of gimple_assign_rhs1.
28493         (vectorizable_load): Handle IFN_MASK_LOAD.
28494         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28496 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28498         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28499         split out from..,
28500         (vectorizable_mask_load_store): ...here.
28501         (vectorizable_load): ...and here.
28503 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28505         * tree-vect-stmts.c (vect_build_all_ones_mask)
28506         (vect_build_zero_merge_argument): New functions, split out from...
28507         (vectorizable_load): ...here.
28509 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28511         * tree-vect-stmts.c (vect_check_store_rhs): New function,
28512         split out from...
28513         (vectorizable_mask_load_store): ...here.
28514         (vectorizable_store): ...and here.
28516 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28518         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28519         split out from...
28520         (vectorizable_mask_load_store): ...here.
28522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28524         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28525         (vect_model_store_cost): Take a vec_load_store_type instead of a
28526         vect_def_type.
28527         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28528         (vect_model_store_cost): Take a vec_load_store_type instead of a
28529         vect_def_type.
28530         (vectorizable_mask_load_store): Update accordingly.
28531         (vectorizable_store): Likewise.
28532         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28534 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28536         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28537         IFN_MASK_LOAD calls here rather than...
28538         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28540 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28541             Alan Hayward  <alan.hayward@arm.com>
28542             David Sherwood  <david.sherwood@arm.com>
28544         * expmed.c (extract_bit_field_1): For vector extracts,
28545         fall back to extract_bit_field_as_subreg if vec_extract
28546         isn't available.
28548 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28549             Alan Hayward  <alan.hayward@arm.com>
28550             David Sherwood  <david.sherwood@arm.com>
28552         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28553         they are variable or constant sized.
28554         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28555         slots for constant-sized data.
28557 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28558             Alan Hayward  <alan.hayward@arm.com>
28559             David Sherwood  <david.sherwood@arm.com>
28561         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28562         handling COND_EXPRs with boolean comparisons, try to find a better
28563         basis for the mask type than the boolean itself.
28565 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28567         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28568         is calculated and how it can be overridden.
28569         * genmodes.c (max_bitsize_mode_any_mode): New variable.
28570         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28571         if defined.
28572         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28573         if nonzero.
28575 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28576             Alan Hayward  <alan.hayward@arm.com>
28577             David Sherwood  <david.sherwood@arm.com>
28579         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28580         Remove the mode argument.
28581         (aarch64_simd_valid_immediate): Remove the mode and inverse
28582         arguments.
28583         * config/aarch64/iterators.md (bitsize): New iterator.
28584         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28585         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28586         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28587         aarch64_simd_valid_immediate.
28588         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28589         (aarch64_reg_or_bic_imm): Likewise.
28590         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28591         with an insn_type enum and msl with a modifier_type enum.
28592         Replace element_width with a scalar_mode.  Change the shift
28593         to unsigned int.  Add constructors for scalar_float_mode and
28594         scalar_int_mode elements.
28595         (aarch64_vect_float_const_representable_p): Delete.
28596         (aarch64_can_const_movi_rtx_p)
28597         (aarch64_simd_scalar_immediate_valid_for_move)
28598         (aarch64_simd_make_constant): Update call to
28599         aarch64_simd_valid_immediate.
28600         (aarch64_advsimd_valid_immediate_hs): New function.
28601         (aarch64_advsimd_valid_immediate): Likewise.
28602         (aarch64_simd_valid_immediate): Remove mode and inverse
28603         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
28604         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28605         and aarch64_float_const_representable_p on the result.
28606         (aarch64_output_simd_mov_immediate): Remove mode argument.
28607         Update call to aarch64_simd_valid_immediate and use of
28608         simd_immediate_info.
28609         (aarch64_output_scalar_simd_mov_immediate): Update call
28610         accordingly.
28612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28613             Alan Hayward  <alan.hayward@arm.com>
28614             David Sherwood  <david.sherwood@arm.com>
28616         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28617         (mode_nunits): Likewise CONST_MODE_NUNITS.
28618         * machmode.def (ADJUST_NUNITS): Document.
28619         * genmodes.c (mode_data::need_nunits_adj): New field.
28620         (blank_mode): Update accordingly.
28621         (adj_nunits): New variable.
28622         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28623         parameter.
28624         (emit_mode_size_inline): Set need_bytesize_adj for all modes
28625         listed in adj_nunits.
28626         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28627         listed in adj_nunits.  Don't emit case statements for such modes.
28628         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28629         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
28630         nothing if adj_nunits is nonnull.
28631         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28632         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28633         (emit_mode_fbit): Update use of print_maybe_const_decl.
28634         (emit_move_size): Likewise.  Treat the array as non-const
28635         if adj_nunits.
28636         (emit_mode_adjustments): Handle adj_nunits.
28638 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28640         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28641         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28642         (VECTOR_MODES): Use it.
28643         (make_vector_modes): Take the prefix as an argument.
28645 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28646             Alan Hayward  <alan.hayward@arm.com>
28647             David Sherwood  <david.sherwood@arm.com>
28649         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28650         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28651         for MODE_VECTOR_BOOL.
28652         * machmode.def (VECTOR_BOOL_MODE): Document.
28653         * genmodes.c (VECTOR_BOOL_MODE): New macro.
28654         (make_vector_bool_mode): New function.
28655         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28656         MODE_VECTOR_BOOL.
28657         * lto-streamer-in.c (lto_input_mode_table): Likewise.
28658         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28659         Likewise.
28660         * stor-layout.c (int_mode_for_mode): Likewise.
28661         * tree.c (build_vector_type_for_mode): Likewise.
28662         * varasm.c (output_constant_pool_2): Likewise.
28663         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28664         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
28665         for MODE_VECTOR_BOOL.
28666         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28667         of mode class checks.
28668         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28669         instead of a list of mode class checks.
28670         (expand_vector_scalar_condition): Likewise.
28671         (type_for_widest_vector_mode): Handle BImode as an inner mode.
28673 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28674             Alan Hayward  <alan.hayward@arm.com>
28675             David Sherwood  <david.sherwood@arm.com>
28677         * machmode.h (mode_size): Change from unsigned short to
28678         poly_uint16_pod.
28679         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28680         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28681         or if measurement_type is not polynomial.
28682         (fixed_size_mode::includes_p): Check for constant-sized modes.
28683         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28684         return a poly_uint16 rather than an unsigned short.
28685         (emit_mode_size): Change the type of mode_size from unsigned short
28686         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
28687         (emit_mode_adjustments): Cope with polynomial vector sizes.
28688         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28689         for GET_MODE_SIZE.
28690         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28691         for GET_MODE_SIZE.
28692         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28693         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28694         * caller-save.c (setup_save_areas): Likewise.
28695         (replace_reg_with_saved_mem): Likewise.
28696         * calls.c (emit_library_call_value_1): Likewise.
28697         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28698         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28699         (gen_lowpart_for_combine): Likewise.
28700         * convert.c (convert_to_integer_1): Likewise.
28701         * cse.c (equiv_constant, cse_insn): Likewise.
28702         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28703         (cselib_subst_to_values): Likewise.
28704         * dce.c (word_dce_process_block): Likewise.
28705         * df-problems.c (df_word_lr_mark_ref): Likewise.
28706         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28707         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28708         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28709         (rtl_for_decl_location): Likewise.
28710         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28711         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28712         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28713         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28714         (expand_expr_real_1): Likewise.
28715         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28716         (pad_below): Likewise.
28717         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28718         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28719         * ira.c (get_subreg_tracking_sizes): Likewise.
28720         * ira-build.c (ira_create_allocno_objects): Likewise.
28721         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28722         (ira_sort_regnos_for_alter_reg): Likewise.
28723         * ira-costs.c (record_operand_costs): Likewise.
28724         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28725         (resolve_simple_move): Likewise.
28726         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28727         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28728         (lra_constraints): Likewise.
28729         (CONST_POOL_OK_P): Reject variable-sized modes.
28730         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28731         (add_pseudo_to_slot, lra_spill): Likewise.
28732         * omp-low.c (omp_clause_aligned_alignment): Likewise.
28733         * optabs-query.c (get_best_extraction_insn): Likewise.
28734         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28735         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28736         (expand_mult_highpart, valid_multiword_target_p): Likewise.
28737         * recog.c (offsettable_address_addr_space_p): Likewise.
28738         * regcprop.c (maybe_mode_change): Likewise.
28739         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28740         * regrename.c (build_def_use): Likewise.
28741         * regstat.c (dump_reg_info): Likewise.
28742         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28743         (find_reloads, find_reloads_subreg_address): Likewise.
28744         * reload1.c (eliminate_regs_1): Likewise.
28745         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28746         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28747         (simplify_binary_operation_1, simplify_subreg): Likewise.
28748         * targhooks.c (default_function_arg_padding): Likewise.
28749         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28750         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28751         (verify_gimple_assign_ternary): Likewise.
28752         * tree-inline.c (estimate_move_cost): Likewise.
28753         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28754         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28755         (get_address_cost_ainc): Likewise.
28756         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28757         (vect_supportable_dr_alignment): Likewise.
28758         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28759         (vectorizable_reduction): Likewise.
28760         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28761         (vectorizable_operation, vectorizable_load): Likewise.
28762         * tree.c (build_same_sized_truth_vector_type): Likewise.
28763         * valtrack.c (cleanup_auto_inc_dec): Likewise.
28764         * var-tracking.c (emit_note_insn_var_location): Likewise.
28765         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28766         (ADDR_VEC_ALIGN): Likewise.
28768 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28769             Alan Hayward  <alan.hayward@arm.com>
28770             David Sherwood  <david.sherwood@arm.com>
28772         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28773         unsigned short.
28774         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28775         or if measurement_type is polynomial.
28776         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28777         * combine.c (make_extraction): Likewise.
28778         * dse.c (find_shift_sequence): Likewise.
28779         * dwarf2out.c (mem_loc_descriptor): Likewise.
28780         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28781         (extract_bit_field, extract_low_bits): Likewise.
28782         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28783         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28784         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28785         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28786         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28787         * reload.c (find_reloads): Likewise.
28788         * reload1.c (alter_reg): Likewise.
28789         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28790         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28791         * tree-if-conv.c (predicate_mem_writes): Likewise.
28792         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28793         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28794         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28795         * valtrack.c (dead_debug_insert_temp): Likewise.
28796         * varasm.c (mergeable_constant_section): Likewise.
28797         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28799 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28800             Alan Hayward  <alan.hayward@arm.com>
28801             David Sherwood  <david.sherwood@arm.com>
28803         * expr.c (expand_assignment): Cope with polynomial mode sizes
28804         when assigning to a CONCAT.
28806 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28807             Alan Hayward  <alan.hayward@arm.com>
28808             David Sherwood  <david.sherwood@arm.com>
28810         * machmode.h (mode_precision): Change from unsigned short to
28811         poly_uint16_pod.
28812         (mode_to_precision): Return a poly_uint16 rather than an unsigned
28813         short.
28814         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28815         or if measurement_type is not polynomial.
28816         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
28817         in which the mode is already known to be a scalar_int_mode.
28818         * genmodes.c (emit_mode_precision): Change the type of mode_precision
28819         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
28820         initializer.
28821         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28822         for GET_MODE_PRECISION.
28823         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28824         for GET_MODE_PRECISION.
28825         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28826         as polynomial.
28827         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28828         (expand_field_assignment, make_extraction): Likewise.
28829         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28830         (get_last_value): Likewise.
28831         * convert.c (convert_to_integer_1): Likewise.
28832         * cse.c (cse_insn): Likewise.
28833         * expr.c (expand_expr_real_1): Likewise.
28834         * lra-constraints.c (simplify_operand_subreg): Likewise.
28835         * optabs-query.c (can_atomic_load_p): Likewise.
28836         * optabs.c (expand_atomic_load): Likewise.
28837         (expand_atomic_store): Likewise.
28838         * ree.c (combine_reaching_defs): Likewise.
28839         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28840         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28841         * tree.h (type_has_mode_precision_p): Likewise.
28842         * ubsan.c (instrument_si_overflow): Likewise.
28844 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28845             Alan Hayward  <alan.hayward@arm.com>
28846             David Sherwood  <david.sherwood@arm.com>
28848         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28849         polynomial numbers of units.
28850         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28851         (valid_vector_subparts_p): New function.
28852         (build_vector_type): Remove temporary shim and take the number
28853         of units as a poly_uint64 rather than an int.
28854         (build_opaque_vector_type): Take the number of units as a
28855         poly_uint64 rather than an int.
28856         * tree.c (build_vector_from_ctor): Handle polynomial
28857         TYPE_VECTOR_SUBPARTS.
28858         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28859         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28860         (build_vector_from_val): If the number of units is variable,
28861         use build_vec_duplicate_cst for constant operands and
28862         VEC_DUPLICATE_EXPR otherwise.
28863         (make_vector_type): Remove temporary is_constant ().
28864         (build_vector_type, build_opaque_vector_type): Take the number of
28865         units as a poly_uint64 rather than an int.
28866         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28867         VECTOR_CST_NELTS.
28868         * cfgexpand.c (expand_debug_expr): Likewise.
28869         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28870         (store_constructor, expand_expr_real_1): Likewise.
28871         (const_scalar_mask_from_tree): Likewise.
28872         * fold-const-call.c (fold_const_reduction): Likewise.
28873         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28874         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28875         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28876         (fold_relational_const): Likewise.
28877         (native_interpret_vector): Likewise.  Change the size from an
28878         int to an unsigned int.
28879         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28880         TYPE_VECTOR_SUBPARTS.
28881         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28882         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28883         duplicating a non-constant operand into a variable-length vector.
28884         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28885         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28886         * ipa-icf.c (sem_variable::equals): Likewise.
28887         * match.pd: Likewise.
28888         * omp-simd-clone.c (simd_clone_subparts): Likewise.
28889         * print-tree.c (print_node): Likewise.
28890         * stor-layout.c (layout_type): Likewise.
28891         * targhooks.c (default_builtin_vectorization_cost): Likewise.
28892         * tree-cfg.c (verify_gimple_comparison): Likewise.
28893         (verify_gimple_assign_binary): Likewise.
28894         (verify_gimple_assign_ternary): Likewise.
28895         (verify_gimple_assign_single): Likewise.
28896         * tree-pretty-print.c (dump_generic_node): Likewise.
28897         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28898         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28899         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28900         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28901         (vect_shift_permute_load_chain): Likewise.
28902         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28903         (expand_vector_condition, optimize_vector_constructor): Likewise.
28904         (lower_vec_perm, get_compute_type): Likewise.
28905         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28906         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28907         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28908         (vect_recog_mask_conversion_pattern): Likewise.
28909         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28910         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28911         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28912         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28913         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28914         (vectorizable_shift, vectorizable_operation, vectorizable_store)
28915         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28916         (supportable_widening_operation): Likewise.
28917         (supportable_narrowing_operation): Likewise.
28918         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28919         Likewise.
28920         * varasm.c (output_constant): Likewise.
28922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28923             Alan Hayward  <alan.hayward@arm.com>
28924             David Sherwood  <david.sherwood@arm.com>
28926         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28927         so that both the length == 3 and length != 3 cases set up their
28928         own permute vectors.  Add comments explaining why we know the
28929         number of elements is constant.
28930         (vect_permute_load_chain): Likewise.
28932 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28933             Alan Hayward  <alan.hayward@arm.com>
28934             David Sherwood  <david.sherwood@arm.com>
28936         * machmode.h (mode_nunits): Change from unsigned char to
28937         poly_uint16_pod.
28938         (ONLY_FIXED_SIZE_MODES): New macro.
28939         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
28940         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
28941         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
28942         New typedefs.
28943         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
28944         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
28945         or if measurement_type is not polynomial.
28946         * genmodes.c (ZERO_COEFFS): New macro.
28947         (emit_mode_nunits_inline): Make mode_nunits_inline return a
28948         poly_uint16.
28949         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
28950         Use ZERO_COEFFS when emitting initializers.
28951         * data-streamer.h (bp_pack_poly_value): New function.
28952         (bp_unpack_poly_value): Likewise.
28953         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28954         for GET_MODE_NUNITS.
28955         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28956         for GET_MODE_NUNITS.
28957         * tree.c (make_vector_type): Remove temporary shim and make
28958         the real function take the number of units as a poly_uint64
28959         rather than an int.
28960         (build_vector_type_for_mode): Handle polynomial nunits.
28961         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
28962         * emit-rtl.c (const_vec_series_p_1): Likewise.
28963         (gen_rtx_CONST_VECTOR): Likewise.
28964         * fold-const.c (test_vec_duplicate_folding): Likewise.
28965         * genrecog.c (validate_pattern): Likewise.
28966         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
28967         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28968         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
28969         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
28970         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
28971         * rtlanal.c (subreg_get_info): Likewise.
28972         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28973         (vect_grouped_load_supported): Likewise.
28974         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
28975         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
28976         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
28977         (simplify_const_unary_operation, simplify_binary_operation_1)
28978         (simplify_const_binary_operation, simplify_ternary_operation)
28979         (test_vector_ops_duplicate, test_vector_ops): Likewise.
28980         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
28981         instead of CONST_VECTOR_NUNITS.
28982         * varasm.c (output_constant_pool_2): Likewise.
28983         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
28984         explicit-encoded elements in the XVEC for variable-length vectors.
28986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28988         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
28990 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28991             Alan Hayward  <alan.hayward@arm.com>
28992             David Sherwood  <david.sherwood@arm.com>
28994         * coretypes.h (fixed_size_mode): Declare.
28995         (fixed_size_mode_pod): New typedef.
28996         * builtins.h (target_builtins::x_apply_args_mode)
28997         (target_builtins::x_apply_result_mode): Change type to
28998         fixed_size_mode_pod.
28999         * builtins.c (apply_args_size, apply_result_size, result_vector)
29000         (expand_builtin_apply_args_1, expand_builtin_apply)
29001         (expand_builtin_return): Update accordingly.
29003 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29005         * cse.c (hash_rtx_cb): Hash only the encoded elements.
29006         * cselib.c (cselib_hash_rtx): Likewise.
29007         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
29008         CONST_VECTOR encoding.
29010 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
29011             Jeff Law  <law@redhat.com>
29013         PR target/83641
29014         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
29015         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
29016         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
29017         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
29019         PR target/83641
29020         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
29021         explicitly probe *sp in a noreturn function if there were any callee
29022         register saves or frame pointer is needed.
29024 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
29026         PR debug/83621
29027         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
29028         BLKmode for ternary, binary or unary expressions.
29030         PR debug/83645
29031         * var-tracking.c (delete_vta_debug_insn): New inline function.
29032         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
29033         insns from get_insns () to NULL instead of each bb separately.
29034         Use delete_vta_debug_insn.  No longer static.
29035         (vt_debug_insns_local, variable_tracking_main_1): Adjust
29036         delete_vta_debug_insns callers.
29037         * rtl.h (delete_vta_debug_insns): Declare.
29038         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
29039         instead of variable_tracking_main.
29041 2018-01-03  Martin Sebor  <msebor@redhat.com>
29043         PR tree-optimization/83603
29044         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
29045         arguments past the endof the argument list in functions declared
29046         without a prototype.
29047         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
29048         Avoid checking when arguments are null.
29050 2018-01-03  Martin Sebor  <msebor@redhat.com>
29052         PR c/83559
29053         * doc/extend.texi (attribute const): Fix a typo.
29054         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
29055         issuing -Wsuggest-attribute for void functions.
29057 2018-01-03  Martin Sebor  <msebor@redhat.com>
29059         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
29060         offset_int::from instead of wide_int::to_shwi.
29061         (maybe_diag_overlap): Remove assertion.
29062         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
29063         * gimple-ssa-sprintf.c (format_directive): Same.
29064         (parse_directive): Same.
29065         (sprintf_dom_walker::compute_format_length): Same.
29066         (try_substitute_return_value): Same.
29068 2018-01-03  Jeff Law  <law@redhat.com>
29070         PR middle-end/83654
29071         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
29072         non-constant residual for zero at runtime and avoid probing in
29073         that case.  Reorganize code for trailing problem to mirror handling
29074         of the residual.
29076 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
29078         PR tree-optimization/83501
29079         * tree-ssa-strlen.c (get_string_cst): New.
29080         (handle_char_store): Call get_string_cst.
29082 2018-01-03  Martin Liska  <mliska@suse.cz>
29084         PR tree-optimization/83593
29085         * tree-ssa-strlen.c: Include tree-cfg.h.
29086         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
29087         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
29088         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
29089         to false.
29090         (strlen_dom_walker::before_dom_children): Call
29091         gimple_purge_dead_eh_edges. Dump tranformation with details
29092         dump flags.
29093         (strlen_dom_walker::before_dom_children): Update call by adding
29094         new argument cleanup_eh.
29095         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
29097 2018-01-03  Martin Liska  <mliska@suse.cz>
29099         PR ipa/83549
29100         * cif-code.def (VARIADIC_THUNK): New enum value.
29101         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
29102         thunks.
29104 2018-01-03  Jan Beulich  <jbeulich@suse.com>
29106         * sse.md (mov<mode>_internal): Tighten condition for when to use
29107         vmovdqu<ssescalarsize> for TI and OI modes.
29109 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
29111         Update copyright years.
29113 2018-01-03  Martin Liska  <mliska@suse.cz>
29115         PR ipa/83594
29116         * ipa-visibility.c (function_and_variable_visibility): Skip
29117         functions with noipa attribure.
29119 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
29121         * gcc.c (process_command): Update copyright notice dates.
29122         * gcov-dump.c (print_version): Ditto.
29123         * gcov.c (print_version): Ditto.
29124         * gcov-tool.c (print_version): Ditto.
29125         * gengtype.c (create_file): Ditto.
29126         * doc/cpp.texi: Bump @copying's copyright year.
29127         * doc/cppinternals.texi: Ditto.
29128         * doc/gcc.texi: Ditto.
29129         * doc/gccint.texi: Ditto.
29130         * doc/gcov.texi: Ditto.
29131         * doc/install.texi: Ditto.
29132         * doc/invoke.texi: Ditto.
29134 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29136         * vector-builder.h (vector_builder::m_full_nelts): Change from
29137         unsigned int to poly_uint64.
29138         (vector_builder::full_nelts): Update prototype accordingly.
29139         (vector_builder::new_vector): Likewise.
29140         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
29141         (vector_builder::operator ==): Likewise.
29142         (vector_builder::finalize): Likewise.
29143         * int-vector-builder.h (int_vector_builder::int_vector_builder):
29144         Take the number of elements as a poly_uint64 rather than an
29145         unsigned int.
29146         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
29147         from unsigned int to poly_uint64.
29148         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
29149         (vec_perm_indices::new_vector): Likewise.
29150         (vec_perm_indices::length): Likewise.
29151         (vec_perm_indices::nelts_per_input): Likewise.
29152         (vec_perm_indices::input_nelts): Likewise.
29153         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
29154         number of elements per input as a poly_uint64 rather than an
29155         unsigned int.  Use the original encoding for variable-length
29156         vectors, rather than clamping each individual element.
29157         For the second and subsequent elements in each pattern,
29158         clamp the step and base before clamping their sum.
29159         (vec_perm_indices::series_p): Handle polynomial element counts.
29160         (vec_perm_indices::all_in_range_p): Likewise.
29161         (vec_perm_indices_to_tree): Likewise.
29162         (vec_perm_indices_to_rtx): Likewise.
29163         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
29164         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
29165         (tree_vector_builder::new_binary_operation): Handle polynomial
29166         element counts.  Return false if we need to know the number
29167         of elements at compile time.
29168         * fold-const.c (fold_vec_perm): Punt if the number of elements
29169         isn't known at compile time.
29171 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29173         * vec-perm-indices.h (vec_perm_builder): Change element type
29174         from HOST_WIDE_INT to poly_int64.
29175         (vec_perm_indices::element_type): Update accordingly.
29176         (vec_perm_indices::clamp): Handle polynomial element_types.
29177         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29178         (vec_perm_indices::all_in_range_p): Likewise.
29179         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
29180         than shwi trees.
29181         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
29182         polynomial vec_perm_indices element types.
29183         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
29184         * fold-const.c (fold_vec_perm): Likewise.
29185         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
29186         * tree-vect-generic.c (lower_vec_perm): Likewise.
29187         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29188         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
29189         element type to HOST_WIDE_INT.
29191 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29192             Alan Hayward  <alan.hayward@arm.com>
29193             David Sherwood  <david.sherwood@arm.com>
29195         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
29196         rather than an int.  Use plus_constant.
29197         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
29198         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
29200 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29201             Alan Hayward  <alan.hayward@arm.com>
29202             David Sherwood  <david.sherwood@arm.com>
29204         * calls.c (emit_call_1, expand_call): Change struct_value_size from
29205         a HOST_WIDE_INT to a poly_int64.
29207 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29208             Alan Hayward  <alan.hayward@arm.com>
29209             David Sherwood  <david.sherwood@arm.com>
29211         * calls.c (load_register_parameters): Cope with polynomial
29212         mode sizes.  Require a constant size for BLKmode parameters
29213         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
29214         forces a parameter to be padded at the lsb end in order to
29215         fill a complete number of words, require the parameter size
29216         to be ordered wrt UNITS_PER_WORD.
29218 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29219             Alan Hayward  <alan.hayward@arm.com>
29220             David Sherwood  <david.sherwood@arm.com>
29222         * reload1.c (spill_stack_slot_width): Change element type
29223         from unsigned int to poly_uint64_pod.
29224         (alter_reg): Treat mode sizes as polynomial.
29226 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29227             Alan Hayward  <alan.hayward@arm.com>
29228             David Sherwood  <david.sherwood@arm.com>
29230         * reload.c (complex_word_subreg_p): New function.
29231         (reload_inner_reg_of_subreg, push_reload): Use it.
29233 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29234             Alan Hayward  <alan.hayward@arm.com>
29235             David Sherwood  <david.sherwood@arm.com>
29237         * lra-constraints.c (process_alt_operands): Reject matched
29238         operands whose sizes aren't ordered.
29239         (match_reload): Refer to this check here.
29241 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29242             Alan Hayward  <alan.hayward@arm.com>
29243             David Sherwood  <david.sherwood@arm.com>
29245         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29246         that the mode size is in the set {1, 2, 4, 8, 16}.
29248 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29249             Alan Hayward  <alan.hayward@arm.com>
29250             David Sherwood  <david.sherwood@arm.com>
29252         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29253         Use plus_constant instead of gen_rtx_PLUS.
29255 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29256             Alan Hayward  <alan.hayward@arm.com>
29257             David Sherwood  <david.sherwood@arm.com>
29259         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29260         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29261         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29262         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29263         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29264         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29265         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29266         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29267         * config/i386/i386.c (ix86_push_rounding): ...this new function.
29268         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29269         a poly_int64.
29270         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29271         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29272         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29273         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29274         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29275         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29276         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29277         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29278         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29279         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29280         function.
29281         * expr.c (emit_move_resolve_push): Treat the input and result
29282         of PUSH_ROUNDING as a poly_int64.
29283         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29284         (emit_push_insn): Likewise.
29285         * lra-eliminations.c (mark_not_eliminable): Likewise.
29286         * recog.c (push_operand): Likewise.
29287         * reload1.c (elimination_effects): Likewise.
29288         * rtlanal.c (nonzero_bits1): Likewise.
29289         * calls.c (store_one_arg): Likewise.  Require the padding to be
29290         known at compile time.
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         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29297         Use plus_constant instead of gen_rtx_PLUS.
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         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29304         rather than an int.
29306 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29307             Alan Hayward  <alan.hayward@arm.com>
29308             David Sherwood  <david.sherwood@arm.com>
29310         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29311         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29312         via stack temporaries.  Treat the mode size as polynomial too.
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         * expr.c (expand_expr_real_2): When handling conversions involving
29319         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29320         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
29321         as a poly_uint64 too.
29323 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29324             Alan Hayward  <alan.hayward@arm.com>
29325             David Sherwood  <david.sherwood@arm.com>
29327         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29329 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29330             Alan Hayward  <alan.hayward@arm.com>
29331             David Sherwood  <david.sherwood@arm.com>
29333         * combine.c (can_change_dest_mode): Handle polynomial
29334         REGMODE_NATURAL_SIZE.
29335         * expmed.c (store_bit_field_1): Likewise.
29336         * expr.c (store_constructor): Likewise.
29337         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29338         and polynomial REGMODE_NATURAL_SIZE.
29339         (gen_lowpart_common): Likewise.
29340         * reginfo.c (record_subregs_of_mode): Likewise.
29341         * rtlanal.c (read_modify_subreg_p): Likewise.
29343 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29344             Alan Hayward  <alan.hayward@arm.com>
29345             David Sherwood  <david.sherwood@arm.com>
29347         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29348         numbers of elements.
29350 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29351             Alan Hayward  <alan.hayward@arm.com>
29352             David Sherwood  <david.sherwood@arm.com>
29354         * match.pd: Cope with polynomial numbers of vector elements.
29356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29357             Alan Hayward  <alan.hayward@arm.com>
29358             David Sherwood  <david.sherwood@arm.com>
29360         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29361         in a POINTER_PLUS_EXPR.
29363 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29364             Alan Hayward  <alan.hayward@arm.com>
29365             David Sherwood  <david.sherwood@arm.com>
29367         * omp-simd-clone.c (simd_clone_subparts): New function.
29368         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29369         (ipa_simd_modify_function_body): Likewise.
29371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29372             Alan Hayward  <alan.hayward@arm.com>
29373             David Sherwood  <david.sherwood@arm.com>
29375         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29376         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29377         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29378         (expand_vector_condition, vector_element): Likewise.
29379         (subparts_gt): New function.
29380         (get_compute_type): Use subparts_gt.
29381         (count_type_subparts): Delete.
29382         (expand_vector_operations_1): Use subparts_gt instead of
29383         count_type_subparts.
29385 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29386             Alan Hayward  <alan.hayward@arm.com>
29387             David Sherwood  <david.sherwood@arm.com>
29389         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29390         (vect_compile_time_alias): ...this new function.  Do the calculation
29391         on poly_ints rather than trees.
29392         (vect_prune_runtime_alias_test_list): Update call accordingly.
29394 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29395             Alan Hayward  <alan.hayward@arm.com>
29396             David Sherwood  <david.sherwood@arm.com>
29398         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29399         numbers of units.
29400         (vect_schedule_slp_instance): Likewise.
29402 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29403             Alan Hayward  <alan.hayward@arm.com>
29404             David Sherwood  <david.sherwood@arm.com>
29406         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29407         constant and extern definitions for variable-length vectors.
29408         (vect_get_constant_vectors): Note that the number of units
29409         is known to be constant.
29411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29412             Alan Hayward  <alan.hayward@arm.com>
29413             David Sherwood  <david.sherwood@arm.com>
29415         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29416         of units as polynomial.  Choose between WIDE and NARROW based
29417         on multiple_p.
29419 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29420             Alan Hayward  <alan.hayward@arm.com>
29421             David Sherwood  <david.sherwood@arm.com>
29423         * tree-vect-stmts.c (simd_clone_subparts): New function.
29424         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29426 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29427             Alan Hayward  <alan.hayward@arm.com>
29428             David Sherwood  <david.sherwood@arm.com>
29430         * tree-vect-stmts.c (vectorizable_call): Treat the number of
29431         vectors as polynomial.  Use build_index_vector for
29432         IFN_GOMP_SIMD_LANE.
29434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29435             Alan Hayward  <alan.hayward@arm.com>
29436             David Sherwood  <david.sherwood@arm.com>
29438         * tree-vect-stmts.c (get_load_store_type): Treat the number of
29439         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29440         for variable-length vectors.
29441         (vectorizable_mask_load_store): Treat the number of units as
29442         polynomial, asserting that it is constant if the condition has
29443         already been enforced.
29444         (vectorizable_store, vectorizable_load): Likewise.
29446 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29447             Alan Hayward  <alan.hayward@arm.com>
29448             David Sherwood  <david.sherwood@arm.com>
29450         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29451         of units as polynomial.  Punt if we can't tell at compile time
29452         which vector contains the final result.
29454 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29455             Alan Hayward  <alan.hayward@arm.com>
29456             David Sherwood  <david.sherwood@arm.com>
29458         * tree-vect-loop.c (vectorizable_induction): Treat the number
29459         of units as polynomial.  Punt on SLP inductions.  Use an integer
29460         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
29461         cast of such a series for variable-length floating-point
29462         reductions.
29464 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29465             Alan Hayward  <alan.hayward@arm.com>
29466             David Sherwood  <david.sherwood@arm.com>
29468         * tree.h (build_index_vector): Declare.
29469         * tree.c (build_index_vector): New function.
29470         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29471         of units as polynomial, forcibly converting it to a constant if
29472         vectorizable_reduction has already enforced the condition.
29473         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
29474         to create a {1,2,3,...} vector.
29475         (vectorizable_reduction): Treat the number of units as polynomial.
29476         Choose vectype_in based on the largest scalar element size rather
29477         than the smallest number of units.  Enforce the restrictions
29478         relied on above.
29480 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29481             Alan Hayward  <alan.hayward@arm.com>
29482             David Sherwood  <david.sherwood@arm.com>
29484         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29485         number of units as polynomial.
29487 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29488             Alan Hayward  <alan.hayward@arm.com>
29489             David Sherwood  <david.sherwood@arm.com>
29491         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29492         * target.def (autovectorize_vector_sizes): Return the vector sizes
29493         by pointer, using vector_sizes rather than a bitmask.
29494         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29495         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29496         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29497         Likewise.
29498         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29499         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29500         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29501         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29502         * omp-general.c (omp_max_vf): Likewise.
29503         * omp-low.c (omp_clause_aligned_alignment): Likewise.
29504         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29505         * tree-vect-loop.c (vect_analyze_loop): Likewise.
29506         * tree-vect-slp.c (vect_slp_bb): Likewise.
29507         * doc/tm.texi: Regenerate.
29508         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29509         to a poly_uint64.
29510         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29511         the vector size as a poly_uint64 rather than an unsigned int.
29512         (current_vector_size): Change from an unsigned int to a poly_uint64.
29513         (get_vectype_for_scalar_type): Update accordingly.
29514         * tree.h (build_truth_vector_type): Take the size and number of
29515         units as a poly_uint64 rather than an unsigned int.
29516         (build_vector_type): Add a temporary overload that takes
29517         the number of units as a poly_uint64 rather than an unsigned int.
29518         * tree.c (make_vector_type): Likewise.
29519         (build_truth_vector_type): Take the number of units as a poly_uint64
29520         rather than an unsigned int.
29522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29523             Alan Hayward  <alan.hayward@arm.com>
29524             David Sherwood  <david.sherwood@arm.com>
29526         * target.def (get_mask_mode): Take the number of units and length
29527         as poly_uint64s rather than unsigned ints.
29528         * targhooks.h (default_get_mask_mode): Update accordingly.
29529         * targhooks.c (default_get_mask_mode): Likewise.
29530         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29531         * doc/tm.texi: Regenerate.
29533 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29534             Alan Hayward  <alan.hayward@arm.com>
29535             David Sherwood  <david.sherwood@arm.com>
29537         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29538         * omp-general.c (omp_max_vf): Likewise.
29539         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29540         (expand_omp_simd): Handle polynomial safelen.
29541         * omp-low.c (omplow_simd_context): Add a default constructor.
29542         (omplow_simd_context::max_vf): Change from int to poly_uint64.
29543         (lower_rec_simd_input_clauses): Update accordingly.
29544         (lower_rec_input_clauses): Likewise.
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-vectorizer.h (vect_nunits_for_cost): New function.
29551         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29552         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29553         (vect_analyze_slp_cost): Likewise.
29554         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29555         (vect_model_load_cost): Likewise.
29557 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29558             Alan Hayward  <alan.hayward@arm.com>
29559             David Sherwood  <david.sherwood@arm.com>
29561         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29562         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29563         from an unsigned int * to a poly_uint64_pod *.
29564         (calculate_unrolling_factor): New function.
29565         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
29567 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29568             Alan Hayward  <alan.hayward@arm.com>
29569             David Sherwood  <david.sherwood@arm.com>
29571         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29572         from an unsigned int to a poly_uint64.
29573         (_loop_vec_info::slp_unrolling_factor): Likewise.
29574         (_loop_vec_info::vectorization_factor): Change from an int
29575         to a poly_uint64.
29576         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29577         (vect_get_num_vectors): New function.
29578         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29579         (vect_get_num_copies): Use vect_get_num_vectors.
29580         (vect_analyze_data_ref_dependences): Change max_vf from an int *
29581         to an unsigned int *.
29582         (vect_analyze_data_refs): Change min_vf from an int * to a
29583         poly_uint64 *.
29584         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29585         than an unsigned HOST_WIDE_INT.
29586         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29587         (vect_analyze_data_ref_dependence): Change max_vf from an int *
29588         to an unsigned int *.
29589         (vect_analyze_data_ref_dependences): Likewise.
29590         (vect_compute_data_ref_alignment): Handle polynomial vf.
29591         (vect_enhance_data_refs_alignment): Likewise.
29592         (vect_prune_runtime_alias_test_list): Likewise.
29593         (vect_shift_permute_load_chain): Likewise.
29594         (vect_supportable_dr_alignment): Likewise.
29595         (dependence_distance_ge_vf): Take the vectorization factor as a
29596         poly_uint64 rather than an unsigned HOST_WIDE_INT.
29597         (vect_analyze_data_refs): Change min_vf from an int * to a
29598         poly_uint64 *.
29599         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29600         vfm1 as a poly_uint64 rather than an int.  Make the same change
29601         for the returned bound_scalar.
29602         (vect_gen_vector_loop_niters): Handle polynomial vf.
29603         (vect_do_peeling): Likewise.  Update call to
29604         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29605         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29606         be constant.
29607         * tree-vect-loop.c (vect_determine_vectorization_factor)
29608         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29609         (vect_get_known_peeling_cost): Likewise.
29610         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29611         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29612         (vect_transform_loop): Likewise.  Use the lowest possible VF when
29613         updating the upper bounds of the loop.
29614         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
29615         rather than an int.
29616         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29617         polynomial unroll factors.
29618         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29619         (vect_make_slp_decision): Likewise.
29620         (vect_supported_load_permutation_p): Likewise, and polynomial
29621         vf too.
29622         (vect_analyze_slp_cost): Handle polynomial vf.
29623         (vect_slp_analyze_node_operations): Likewise.
29624         (vect_slp_analyze_bb_1): Likewise.
29625         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29626         than an unsigned HOST_WIDE_INT.
29627         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29628         (vectorizable_load): Handle polynomial vf.
29629         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29630         a poly_uint64.
29631         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
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         * match.pd: Handle bit operations involving three constants
29638         and try to fold one pair.
29640 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29642         * tree-vect-loop-manip.c: Include gimple-fold.h.
29643         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29644         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
29645         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29646         Add a path that uses a step of VF instead of 1, but disable it
29647         for now.
29648         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29649         and niters_no_overflow parameters.  Update calls to
29650         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29651         Create a new SSA name if the latter choses to use a ste other
29652         than zero, and return it via niters_vector_mult_vf_var.
29653         * tree-vect-loop.c (vect_transform_loop): Update calls to
29654         vect_do_peeling, vect_gen_vector_loop_niters and
29655         slpeel_make_loop_iterate_ntimes.
29656         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29657         (vect_gen_vector_loop_niters): Update declarations after above changes.
29659 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
29661         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29662         128-bit round to integer instructions.
29663         (ceil<mode>2): Likewise.
29664         (btrunc<mode>2): Likewise.
29665         (round<mode>2): Likewise.
29667 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29669         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29670         unaligned VSX load/store on P8/P9.
29671         (expand_block_clear): Allow the use of unaligned VSX
29672         load/store on P8/P9.
29674 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29676         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29677         New function.
29678         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29679         swap associated with both a load and a store.
29681 2018-01-02  Andrew Waterman  <andrew@sifive.com>
29683         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29684         * config/riscv/riscv.md (clear_cache): Use it.
29686 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
29688         * web.c: Remove out-of-date comment.
29690 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29692         * expr.c (fixup_args_size_notes): Check that any existing
29693         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29694         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29695         (emit_single_push_insn): ...here.
29697 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29699         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29700         (const_vector_encoded_nelts): New function.
29701         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29702         (const_vector_int_elt, const_vector_elt): Declare.
29703         * emit-rtl.c (const_vector_int_elt_1): New function.
29704         (const_vector_elt): Likewise.
29705         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29706         of CONST_VECTOR_ELT.
29708 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29710         * expr.c: Include rtx-vector-builder.h.
29711         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29712         directly on the tree encoding.
29713         (const_vector_from_tree): Likewise.
29714         * optabs.c: Include rtx-vector-builder.h.
29715         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29716         sequence of "u" values.
29717         * vec-perm-indices.c: Include rtx-vector-builder.h.
29718         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29719         directly on the vec_perm_indices encoding.
29721 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29723         * doc/rtl.texi (const_vector): Describe new encoding scheme.
29724         * Makefile.in (OBJS): Add rtx-vector-builder.o.
29725         * rtx-vector-builder.h: New file.
29726         * rtx-vector-builder.c: Likewise.
29727         * rtl.h (rtx_def::u2): Add a const_vector field.
29728         (CONST_VECTOR_NPATTERNS): New macro.
29729         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29730         (CONST_VECTOR_DUPLICATE_P): Likewise.
29731         (CONST_VECTOR_STEPPED_P): Likewise.
29732         (CONST_VECTOR_ENCODED_ELT): Likewise.
29733         (const_vec_duplicate_p): Check for a duplicated vector encoding.
29734         (unwrap_const_vec_duplicate): Likewise.
29735         (const_vec_series_p): Check for a non-duplicated vector encoding.
29736         Say that the function only returns true for integer vectors.
29737         * emit-rtl.c: Include rtx-vector-builder.h.
29738         (gen_const_vec_duplicate_1): Delete.
29739         (gen_const_vector): Call gen_const_vec_duplicate instead of
29740         gen_const_vec_duplicate_1.
29741         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29742         (gen_const_vec_duplicate): Use rtx_vector_builder.
29743         (gen_const_vec_series): Likewise.
29744         (gen_rtx_CONST_VECTOR): Likewise.
29745         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29746         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29747         Build a new vector rather than modifying a CONST_VECTOR in-place.
29748         (handle_special_swappables): Update call accordingly.
29749         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29750         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29751         Build a new vector rather than modifying a CONST_VECTOR in-place.
29752         (handle_special_swappables): Update call accordingly.
29754 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29756         * simplify-rtx.c (simplify_const_binary_operation): Use
29757         CONST_VECTOR_ELT instead of XVECEXP.
29759 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29761         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29762         the selector elements to be different from the data elements
29763         if the selector is a VECTOR_CST.
29764         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29765         ssizetype for the selector.
29767 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29769         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29770         before testing each element individually.
29771         * tree-vect-generic.c (lower_vec_perm): Likewise.
29773 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29775         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29776         * selftest-run-tests.c (selftest::run_tests): Call it.
29777         * vector-builder.h (vector_builder::operator ==): New function.
29778         (vector_builder::operator !=): Likewise.
29779         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29780         (vec_perm_indices::all_from_input_p): New function.
29781         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29782         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29783         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29784         instead of reading the VECTOR_CST directly.  Detect whether both
29785         vector inputs are the same before constructing the vec_perm_indices,
29786         and update the number of inputs argument accordingly.  Use the
29787         utility functions added above.  Only construct sel2 if we need to.
29789 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29791         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29792         the broadcast of the low byte.
29793         (expand_mult_highpart): Use an explicit encoding for the permutes.
29794         * optabs-query.c (can_mult_highpart_p): Likewise.
29795         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29796         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29797         (vectorizable_bswap): Likewise.
29798         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29799         explicit encoding for the power-of-2 permutes.
29800         (vect_permute_store_chain): Likewise.
29801         (vect_grouped_load_supported): Likewise.
29802         (vect_permute_load_chain): Likewise.
29804 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29806         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29807         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29808         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29809         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29810         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29811         (vect_gen_perm_mask_any): Likewise.
29813 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29815         * int-vector-builder.h: New file.
29816         * vec-perm-indices.h: Include int-vector-builder.h.
29817         (vec_perm_indices): Redefine as an int_vector_builder.
29818         (auto_vec_perm_indices): Delete.
29819         (vec_perm_builder): Redefine as a stand-alone class.
29820         (vec_perm_indices::vec_perm_indices): New function.
29821         (vec_perm_indices::clamp): Likewise.
29822         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29823         (vec_perm_indices::new_vector): New function.
29824         (vec_perm_indices::new_expanded_vector): Update for new
29825         vec_perm_indices class.
29826         (vec_perm_indices::rotate_inputs): New function.
29827         (vec_perm_indices::all_in_range_p): Operate directly on the
29828         encoded form, without computing elided elements.
29829         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29830         encoding.  Update for new vec_perm_indices class.
29831         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29832         the given vec_perm_builder.
29833         (expand_vec_perm_var): Update vec_perm_builder constructor.
29834         (expand_mult_highpart): Use vec_perm_builder instead of
29835         auto_vec_perm_indices.
29836         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29837         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
29838         or double series encoding as appropriate.
29839         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29840         vec_perm_indices instead of auto_vec_perm_indices.
29841         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29842         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29843         (vect_permute_store_chain): Likewise.
29844         (vect_grouped_load_supported): Likewise.
29845         (vect_permute_load_chain): Likewise.
29846         (vect_shift_permute_load_chain): Likewise.
29847         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29848         (vect_transform_slp_perm_load): Likewise.
29849         (vect_schedule_slp_instance): Likewise.
29850         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29851         (vectorizable_mask_load_store): Likewise.
29852         (vectorizable_bswap): Likewise.
29853         (vectorizable_store): Likewise.
29854         (vectorizable_load): Likewise.
29855         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29856         vec_perm_indices instead of auto_vec_perm_indices.  Use
29857         tree_to_vec_perm_builder to read the vector from a tree.
29858         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29859         vec_perm_builder instead of a vec_perm_indices.
29860         (have_whole_vector_shift): Use vec_perm_builder and
29861         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
29862         truncation to calc_vec_perm_mask_for_shift.
29863         (vect_create_epilog_for_reduction): Likewise.
29864         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29865         from auto_vec_perm_indices to vec_perm_indices.
29866         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29867         instead of changing individual elements.
29868         (aarch64_vectorize_vec_perm_const): Use new_vector to install
29869         the vector in d.perm.
29870         * config/arm/arm.c (expand_vec_perm_d::perm): Change
29871         from auto_vec_perm_indices to vec_perm_indices.
29872         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29873         instead of changing individual elements.
29874         (arm_vectorize_vec_perm_const): Use new_vector to install
29875         the vector in d.perm.
29876         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29877         Update vec_perm_builder constructor.
29878         (rs6000_expand_interleave): Likewise.
29879         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29880         (rs6000_expand_interleave): Likewise.
29882 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29884         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29885         to qimode could truncate the indices.
29886         * optabs.c (expand_vec_perm_var): Likewise.
29888 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
29890         * Makefile.in (OBJS): Add vec-perm-indices.o.
29891         * vec-perm-indices.h: New file.
29892         * vec-perm-indices.c: Likewise.
29893         * target.h (vec_perm_indices): Replace with a forward class
29894         declaration.
29895         (auto_vec_perm_indices): Move to vec-perm-indices.h.
29896         * optabs.h: Include vec-perm-indices.h.
29897         (expand_vec_perm): Delete.
29898         (selector_fits_mode_p, expand_vec_perm_var): Declare.
29899         (expand_vec_perm_const): Declare.
29900         * target.def (vec_perm_const_ok): Replace with...
29901         (vec_perm_const): ...this new hook.
29902         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29903         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29904         * doc/tm.texi: Regenerate.
29905         * optabs.def (vec_perm_const): Delete.
29906         * doc/md.texi (vec_perm_const): Likewise.
29907         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29908         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29909         expand_vec_perm for constant permutation vectors.  Assert that
29910         the mode of variable permutation vectors is the integer equivalent
29911         of the mode that is being permuted.
29912         * optabs-query.h (selector_fits_mode_p): Declare.
29913         * optabs-query.c: Include vec-perm-indices.h.
29914         (selector_fits_mode_p): New function.
29915         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29916         is defined, instead of checking whether the vec_perm_const_optab
29917         exists.  Use targetm.vectorize.vec_perm_const instead of
29918         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
29919         fit in the vector mode before using a variable permute.
29920         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29921         vec_perm_indices instead of an rtx.
29922         (expand_vec_perm): Replace with...
29923         (expand_vec_perm_const): ...this new function.  Take the selector
29924         as a vec_perm_indices rather than an rtx.  Also take the mode of
29925         the selector.  Update call to shift_amt_for_vec_perm_mask.
29926         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29927         Use vec_perm_indices::new_expanded_vector to expand the original
29928         selector into bytes.  Check whether the indices fit in the vector
29929         mode before using a variable permute.
29930         (expand_vec_perm_var): Make global.
29931         (expand_mult_highpart): Use expand_vec_perm_const.
29932         * fold-const.c: Includes vec-perm-indices.h.
29933         * tree-ssa-forwprop.c: Likewise.
29934         * tree-vect-data-refs.c: Likewise.
29935         * tree-vect-generic.c: Likewise.
29936         * tree-vect-loop.c: Likewise.
29937         * tree-vect-slp.c: Likewise.
29938         * tree-vect-stmts.c: Likewise.
29939         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
29940         Delete.
29941         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
29942         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
29943         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
29944         (aarch64_vectorize_vec_perm_const): ...this new function.
29945         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29946         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29947         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
29948         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
29949         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
29950         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29951         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
29952         into...
29953         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
29954         check for NEON modes.
29955         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
29956         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
29957         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
29958         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
29959         into...
29960         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
29961         the old VEC_PERM_CONST conditions.
29962         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
29963         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
29964         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
29965         (ia64_vectorize_vec_perm_const_ok): Merge into...
29966         (ia64_vectorize_vec_perm_const): ...this new function.
29967         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
29968         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
29969         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
29970         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
29971         * config/mips/mips.c (mips_expand_vec_perm_const)
29972         (mips_vectorize_vec_perm_const_ok): Merge into...
29973         (mips_vectorize_vec_perm_const): ...this new function.
29974         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
29975         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
29976         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
29977         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
29978         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
29979         (rs6000_expand_vec_perm_const): Delete.
29980         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
29981         Delete.
29982         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
29983         (altivec_expand_vec_perm_const_le): Take each operand individually.
29984         Operate on constant selectors rather than rtxes.
29985         (altivec_expand_vec_perm_const): Likewise.  Update call to
29986         altivec_expand_vec_perm_const_le.
29987         (rs6000_expand_vec_perm_const): Delete.
29988         (rs6000_vectorize_vec_perm_const_ok): Delete.
29989         (rs6000_vectorize_vec_perm_const): New function.
29990         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
29991         an element count and rtx array.
29992         (rs6000_expand_extract_even): Update call accordingly.
29993         (rs6000_expand_interleave): Likewise.
29994         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
29995         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
29996         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
29997         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
29998         (rs6000_expand_vec_perm_const): Delete.
29999         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30000         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30001         (altivec_expand_vec_perm_const_le): Take each operand individually.
30002         Operate on constant selectors rather than rtxes.
30003         (altivec_expand_vec_perm_const): Likewise.  Update call to
30004         altivec_expand_vec_perm_const_le.
30005         (rs6000_expand_vec_perm_const): Delete.
30006         (rs6000_vectorize_vec_perm_const_ok): Delete.
30007         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
30008         reference to the SPE evmerge intructions.
30009         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30010         an element count and rtx array.
30011         (rs6000_expand_extract_even): Update call accordingly.
30012         (rs6000_expand_interleave): Likewise.
30013         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
30014         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
30015         new function.
30016         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30018 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30020         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
30021         vector mode and that that mode matches the mode of the data
30022         being permuted.
30023         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
30024         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
30025         directly using expand_vec_perm_1 when forcing selectors into
30026         registers.
30027         (expand_vec_perm_var): New function, split out from expand_vec_perm.
30029 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30031         * optabs-query.h (can_vec_perm_p): Delete.
30032         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
30033         * optabs-query.c (can_vec_perm_p): Split into...
30034         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
30035         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
30036         particular selector is valid.
30037         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30038         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30039         (vect_grouped_load_supported): Likewise.
30040         (vect_shift_permute_load_chain): Likewise.
30041         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30042         (vect_transform_slp_perm_load): Likewise.
30043         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30044         (vectorizable_bswap): Likewise.
30045         (vect_gen_perm_mask_checked): Likewise.
30046         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
30047         implementations of variable permutation vectors into account
30048         when deciding which selector to use.
30049         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
30050         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
30051         with a false third argument.
30052         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
30053         to test whether the constant selector is valid and can_vec_perm_var_p
30054         to test whether a variable selector is valid.
30056 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30058         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
30059         * optabs-query.c (can_vec_perm_p): Likewise.
30060         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
30061         instead of vec_perm_indices.
30062         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
30063         (vect_gen_perm_mask_checked): Likewise,
30064         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
30065         (vect_gen_perm_mask_checked): Likewise,
30067 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30069         * optabs-query.h (qimode_for_vec_perm): Declare.
30070         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
30071         (qimode_for_vec_perm): ...this new function.
30072         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
30074 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30076         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
30077         does not have a conditional at the top.
30079 2018-01-02  Richard Biener  <rguenther@suse.de>
30081         * ipa-inline.c (big_speedup_p): Fix expression.
30083 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
30085         PR target/81616
30086         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
30087         for generic 4->6.
30089 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
30091         PR target/81616
30092         Generic tuning.
30093         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
30094         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
30095         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
30096         cond_taken_branch_cost 3->4.
30098 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
30100         PR tree-optimization/83581
30101         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
30102         TODO_cleanup_cfg if any changes have been made.
30104         PR middle-end/83608
30105         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
30106         convert_modes if target mode has the right side, but different mode
30107         class.
30109         PR middle-end/83609
30110         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
30111         last argument when extracting from CONCAT.  If either from_real or
30112         from_imag is NULL, use expansion through memory.  If result is not
30113         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
30114         the parts directly to inner mode, if even that fails, use expansion
30115         through memory.
30117         PR middle-end/83623
30118         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
30119         check for bswap in mode rather than HImode and use that in expand_unop
30120         too.
30122 Copyright (C) 2018 Free Software Foundation, Inc.
30124 Copying and distribution of this file, with or without modification,
30125 are permitted in any medium without royalty provided the copyright
30126 notice and this notice are preserved.