[PR c++/87185] ICE in prune-lambdas
[official-gcc.git] / gcc / ChangeLog
blobe8f30543a9d3056fb84d7a5cf266f9d666b8d351
1 2018-09-05  Richard Biener  <rguenther@suse.de>
3         PR bootstrap/87225
4         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
5         return.
7 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
8             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
10         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
11         * config.gcc (extra_objs): Build it.
12         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
13         Likewise.
14         * config/aarch64/aarch64-passes.def
15         (pass_tag_collision_avoidance): New pass.
16         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
17         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
18         (aarch64_classify_address): Remove static qualifier.
19         (aarch64_address_info, aarch64_address_type): Move to...
20         * config/aarch64/aarch64-protos.h: ... here.
21         (make_pass_tag_collision_avoidance): New function.
22         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
23         New tuning flag.
25 2018-09-05  Martin Liska  <mliska@suse.cz>
27         * doc/gcov.texi: Update documentation of humar
28         readable mode.
29         * gcov.c (format_count): Print one decimal place, it provides
30         more fine number of situations like '1G' vs. '1.4G'.
32 2018-09-05  Martin Liska  <mliska@suse.cz>
34         PR target/87164
35         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
36         * optc-gen.awk: Allow 'Var' for Deprecated options in order
37         to generate a MASK value.
39 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
41         PR debug/86593
42         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
43         if frame pointer isn't used.
44         (compute_frame_pointer_to_fb_displacement): Likewise.
46 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
48         PR target/87198
49         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
50         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
51         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
52         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
53         and OPTION_MASK_ISA_XSAVEC_UNSET.
55 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
57         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
58         XOR operations in NAND case.
60 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
62         * wide-int-range.cc (wide_int_range_convert): New.
63         * wide-int-range.h (wide_int_range_convert): New.
64         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
65         code into wide_int_range_convert.
66         (extract_range_into_wide_ints): Do not munge anti range constants
67         into the entire domain.  Just return the range back.
69 2018-09-04  Martin Liska  <mliska@suse.cz>
71         * genmatch.c (output_line_directive): Add new argument
72         fnargs.
73         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
75 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
77         * doc/invoke.texi (Option Summary): Add whitespace.
79         * doc/invoke.texi (Option Summary): Add -Waligned-new.
81 2018-09-04  Richard Biener  <rguenther@suse.de>
83         PR tree-optimization/87211
84         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
85         backedge value we're supposed to treat as VARYING also number
86         the PHI to VARYING in case it got a different value-number already.
88 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
90         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
91         (extract_range_from_binary_expr_1): Do not call
92         vrp_can_optimize_bit_op.
93         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
94         static.
95         (wide_int_range_get_mask_and_bounds): New.
96         (wide_int_range_optimize_bit_op): New.
97         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
98         (wide_int_range_bit_and): Same.
99         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
100         (wide_int_range_optimize_bit_op): New.
101         (wide_int_range_get_mask_and_bounds): New.
103 2018-09-04  Richard Biener  <rguenther@suse.de>
105         PR tree-optimization/87176
106         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
107         variable.  When value-numbering a virtual PHI node make sure
108         to not value-number to the backedge value.
110 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
112         * doc/extend.texi (Long Long, Hex Floats): Document support for
113         long long and hex floats in more recent versions of ISO C++.
115 2018-09-03  Richard Biener  <rguenther@suse.de>
117         PR tree-optimization/87177
118         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
119         cleanup.
121 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
123         * bb-reorder.c (edge_order): Convert to C-qsort-style
124         tri-state comparator.
125         (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
127 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
129         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
130         tri-state comparator.
131         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
133 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
135         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
136         (mergesort): ... here as maximum count for using netsort.
137         (gcc_qsort): Set nlim to 3 if stable sort is requested.
138         (gcc_stablesort): New.
139         * system.h (gcc_stablesort): Declare.
141 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
143         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
144         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
145         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
147 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
149         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
150         lxsdx and stxsdx alternatives.
151         (*mov<mode>_hardfloat64): Ditto.
152         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
154 2018-09-03  Richard Biener  <rguenther@suse.de>
156         PR tree-optimization/87200
157         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
158         simplify result.
160 2018-09-03  Martin Liska  <mliska@suse.cz>
162         PR tree-optimization/87201
163         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
164         Fix parenthesis in an expression.
166 2018-09-03  Richard Biener  <rguenther@suse.de>
168         PR tree-optimization/87197
169         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
170         visited.  CSE the VN_INFO hashtable lookup.
172         PR tree-optimization/87169
173         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
174         iterating make sure there's no extra backedges from irreducible
175         regions feeding the header.  Mark the destination block
176         executable.
178 2018-09-03  Martin Liska  <mliska@suse.cz>
180         PR driver/83193
181         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
182         * common/common-targhooks.c (default_get_valid_option_values):
183         New function.
184         * common/common-targhooks.h (default_get_valid_option_values):
185         Likewise.
186         * common/config/i386/i386-common.c: Move processor_target_table
187         from i386.c.
188         (ix86_get_valid_option_values): New function.
189         (TARGET_GET_VALID_OPTION_VALUES): New macro.
190         * config/i386/i386.c (struct ptt): Move to i386-common.c.
191         (PTA_*): Move all defined masks into i386-common.c.
192         (ix86_function_specific_restore): Use new processor_cost_table.
193         * config/i386/i386.h (struct ptt): Moved from i386.c.
194         (struct pta): Likewise.
195         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
196         * doc/tm.texi.in: Likewise.
197         * opt-suggestions.c (option_proposer::suggest_option):
198         Pass prefix to build_option_suggestions.
199         (option_proposer::get_completions): Likewise.
200         (option_proposer::build_option_suggestions): Use the new target
201         hook.
202         * opts.c (struct option_help_tuple): New struct.
203         (print_filtered_help): Use the new target hook.
205 2018-09-03  Martin Liska  <mliska@suse.cz>
207         PR middle-end/59521
208         * predict.c (set_even_probabilities): Add likely_edges
209         argument and handle cases where we have precisely one
210         likely edge.
211         (combine_predictions_for_bb): Catch also likely_edges.
212         (tree_predict_by_opcode): Handle gswitch statements.
213         * tree-cfg.h (find_case_label_for_value): New declaration.
214         (find_taken_edge_switch_expr): Likewise.
215         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
216         Find pivot in decision tree based on probabily, not by number of
217         nodes.
219 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
221         * doc/standards.texi (Standards): Update Objective-C reference.
223 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
225         * doc/install.texi (Prerequisites): Update link for MPC.
227 2018-09-01  Michael Matz  <matz@suse.de>
229         PR tree-optimization/87074
230         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
231         PHIs for outer-loop uses.
233 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
235         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
236         * doc/invoke.texi (C Dialect Options): Ditto.
238 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
239         
240         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
242 2018-08-31  Richard Biener  <rguenther@suse.de>
244         PR tree-optimization/87168
245         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
246         (rpo_elim::eliminate_avail): When OP was not visited it must
247         be available.
249 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
251         * tree-vrp.c (copy_value_range): Convert param "from" from
252         "value_range *" to "const value_range *".
253         (range_is_null): Likewise for param "vr".
254         (range_int_cst_p): Likewise.
255         (range_int_cst_singleton_p): Likewise.
256         (symbolic_range_p): Likewise.
257         (value_ranges_intersect_p): Likewise for both params.
258         (value_range_nonnegative_p): Likewise for param "vr".
259         (value_range_constant_singleton): Likewise.
260         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
261         (extract_range_into_wide_ints): Likewise for param "vr".
262         (extract_range_from_multiplicative_op): Likewise for params "vr0"
263         and "vr1".
264         (vrp_can_optimize_bit_op): Likewise.
265         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
266         "vr1_".
267         (extract_range_from_unary_expr): Likewise.
268         (debug_value_range): Likewise for param "vr".
269         (value_range::dump): Add "const" qualifier.
270         (vrp_prop::check_array_ref): Convert local "vr" from
271         "value_range *" to "const value_range *".
272         (vrp_prop::check_mem_ref): Likewise.
273         (vrp_prop::visit_stmt): Likewise for local "old_vr".
274         (vrp_intersect_ranges_1): Likewise for param "vr_1".
275         (vrp_intersect_ranges): Likewise.
276         (simplify_stmt_for_jump_threading): Likewise for local "vr".
277         (vrp_prop::vrp_finalize): Likewise.
278         * tree-vrp.h (value_range::dump): Add "const" qualifier.
279         (vrp_intersect_ranges): Add "const" qualifier to params as above.
280         (extract_range_from_unary_expr): Likewise.
281         (value_range_constant_singleton): Likewise.
282         (symbolic_range_p): Likewise.
283         (copy_value_range): Likewise.
284         (extract_range_from_binary_expr_1): Likewise.
285         (range_int_cst_p): Likewise.
286         (vrp_set_zero_nonzero_bits): Likewise.
287         (range_int_cst_singleton_p): Likewise.
289 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
291         * config/aarch64/arm_neon.h (vabsd_s64): New.
292         (vnegd_s64): Likewise.
294 2018-08-31  Martin Jambor  <mjambor@suse.cz>
296         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
298 2018-08-31  Martin Liska  <mliska@suse.cz>
300         * ipa-icf.c (sem_item::add_type): Use
301         sem_item::m_type_hash_cache.
302         * ipa-icf.h: Move the cache from sem_item_optimizer
303         to sem_item.
305 2018-08-31  Nathan Sidwell  <nathan@acm.org>
307         * doc/extend.texi (Backwards Compatibility): Remove implicit
308         extern C leeway of () being (...).
310 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
312         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
314 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
316         PR target/86684
317         PR target/87149
318         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
320 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
322         PR middle-end/87138
323         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
324         gen_int_mode.  Formatting fixes.
326 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
328         * target.def (custom_function_descriptors): Improve documentation.
329         * doc/tm.texi.in (Trampolines): Expand discussion of function
330         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
331         beginning of the section.
332         * doc/tm.texi: Regenerated.
334 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
336         * cfg.h (class auto_edge_flag): Spell out the template-id of the
337         base class in the initializer list.  This is a workaround for
338         building with older GCC.
339         (class auto_bb_flag): Likewise.
341 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
343         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
344         (altivec_vcmpequ<VI_char>_p): Remove star.
345         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
346         vector load modes.
347         (expand_strncmp_vec_sequence): New function.
348         (emit_final_str_compare_vec): New function.
349         (expand_strn_compare): Add support for vector strncmp.
350         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
351         length specification to bytes.
352         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
353         (vcmpnezb_p): New pattern.
354         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
355         for option -mstring-compare-inline-limit.
357 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
359         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
360         (PTA_SKYLAKE): Add PTA_AES.
361         (PTA_GOLDMONT): Likewise.
363 2018-08-29  Jan Hubicka  <jh@suse.cz>
365         PR lto/86517
366         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
367         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
369 2018-08-29  Jan Hubicka  <jh@suse.cz>
371         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
372         TYPE_STUB_DECL.
373         (hash_tree): Do not visit TYPE_STUB_DECL.
374         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
375         stream TYPE_STUB_DECL.
376         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
377         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
378         after free_lang_data.
379         (type_in_anonymous_namespace_p): Likewise.
381 2018-08-29  Jan Hubicka  <jh@suse.cz>
383         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
384         comment that it has to be even number.
385         (class sreal): Change m_sig type to int32_t.
386         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
387         int64_t for temporary calculations.
388         (sreal_verify_basics): Drop one bit from minimum and maximum.
390 2018-08-30  Richard Biener  <rguenther@suse.de>
392         PR tree-optimization/87147
393         * tree-ssa-sccvn.c (SSA_VISITED): New function.
394         (visit_phi): When the degenerate result is from the backedge and
395         we didn't visit its definition yet drop to VARYING.
396         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
398 2018-08-29  Jan Hubicka  <jh@suse.cz>
400         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
401         DECL_VINDEX.
402         (hash_tree): Likewise.
404 2018-08-29  Jan Hubicka  <jh@suse.cz>
406         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
407         and TYPE_NEXT_REF_TO.
409 2018-08-29  Jan Hubicka  <jh@suse.cz>
411         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
412         comment that it has to be even number.
413         (class sreal): Change m_sig type to int32_t.
414         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
415         int64_t for temporary calculations.
416         (sreal_verify_basics): Drop one bit from minimum and maximum.
418 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
420         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
422 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
424         PR middle-end/86995
425         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
426         if to_add is negative.
428 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
430         PR middle-end/87053
431         * builtins.c (c_strlen): Improve range checks.
433 2018-08-29  Martin Sebor  <msebor@redhat.com>
434             Jeff Law  <law@redhat.com>
436         PR tree-optimization/86714
437         PR tree-optimization/86711
438         * builtins.c (c_strlen): Add arguments to call to string_constant.
439         * expr.c (string_constant): Add argument.  Detect missing nul
440         terminator and outermost declaration it's missing in.
441         * expr.h (string_constant): Add argument.
442         * fold-const.c (read_from_constant_string): Add arguments to call to
443         string_constant.
444         (c_getstr): Likewise.
445         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
446         to string_constant.
447         * tree-ssa-strlen.c (get_stridx): Likewise.
449 2018-08-29  Jan Hubicka  <jh@suse.cz>
451         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
452         Do not stream DECL_VINDEX.
453         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
454         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
455         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
457 2018-08-29  Richard Biener  <rguenther@suse.de>
459         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
460         virtual operands that are not default defs to honor region
461         boundaries.
462         (rpo_vn_valueize): Remove ineffective code here.
464 2018-08-29  Richard Biener  <rguenther@suse.de>
466         PR tree-optimization/87132
467         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
468         when skipping defs reachable over backedges.
470 2018-08-29  Richard Biener  <rguenther@suse.de>
472         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
473         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
474         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
475         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
476         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
477         (vn_reference_lookup_3): Remove use of const_parms.
478         (free_rpo_vn): Do not free const_parms.
479         (do_rpo_vn): Do not call init_const_parms.
480         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
481         SSA_NAME_POINTS_TO_READONLY_MEMORY.
482         (call_may_clobber_ref_p_1): Likewise.
484 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
486         PR other/86726
487         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
488         (-O): Ditto.
489         (-ftree-scev-cprop): Document.
491 2018-08-29  Jan Hubicka  <jh@suse.cz>
493         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
494         parameters.
495         (sreal constructor): Update.
496         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
497         sreal:operator/): Update.
499 2018-08-29  Martin Liska  <mliska@suse.cz>
501         * tree-switch-conversion.c (switch_conversion::expand):
502         Strenghten assumption about gswitch statements.
504 2018-08-29  Richard Biener  <rguenther@suse.de>
506         PR tree-optimization/87117
507         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
508         re-value-number released SSA VDEFs.
510 2018-08-29  Richard Biener  <rguenther@suse.de>
512         PR tree-optimization/87126
513         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
515 2018-08-28  Jim Wilson  <jimw@sifive.com>
517         * config/riscv/pic.md: Rewrite.
518         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
519         invalid address.
520         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
521         (SOFTF, default_load, softload, softstore): New.
523 2018-08-28  Jeff Law  <law@redhat.com>
525         * fold-const.c (fold_binary_loc): Remove recently added assert.
527 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
529         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
530         to OP parmeter of generated function.
532 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
534         PR tree-optimization/87009
535         * match.pd: Add boolean optimizations.
537 2018-08-28  Martin Sebor  <msebor@redhat.com>
539         PR middle-end/86631
540         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
541         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
542         (pass_walloca::gate): Use it.
543         (alloca_call_type): Same.
544         (pass_walloca::execute): Same.
545         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
547 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
549         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
550         GCC_VERSION for usage of "__gcc_dump_printf__" format from
551         >= 3005 to >= 9000.
553 2018-08-28  Richard Biener  <rguenther@suse.de>
555         PR tree-optimization/87124
556         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
557         constants before looking up avail.
559 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
561         PR middle-end/87099
562         * calls.c (maybe_warn_nonstring_arg): Punt early if
563         warn_stringop_overflow is zero.  Don't call get_range_strlen
564         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
565         Swap comparison operands to have constants on rhs.  Only use
566         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
567         increment lenrng[0].
569 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
571         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
572         use of tree_to_shwi.  Remove duplicated test for the size being
573         a whole number of bytes.
575 2018-08-28  Richard Biener  <rguenther@suse.de>
577         PR tree-optimization/87117
578         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
579         Handle removed stmt without LHS (GIMPLE_NOP).
581 2018-08-28  Richard Biener  <rguenther@suse.de>
583         PR tree-optimization/87117
584         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
585         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
587 2018-08-28  Richard Biener  <rguenther@suse.de>
589         PR tree-optimization/87117
590         * tree-ssa-pre.c (compute_avail): Do not make expressions
591         with predicated values available.
592         (get_expr_value_id): Assert we do not run into predicated value
593         expressions.
595 2018-08-28  Richard Biener  <rguenther@suse.de>
597         PR tree-optimization/87117
598         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
599         get virtual operands.
600         (get_expr_operands): Handle STRING_CST like other decls.
602 2018-08-28  Martin Liska  <mliska@suse.cz>
604         * tree.h: Update documentation of fndecl_built_in_p
605         functions.
608 2018-08-27  Jeff Law  <law@redhat.com>
609         PR tree-optimization/87110
610         * tree-ssa-dse.c (compute_trims): Handle non-constant
611         TYPE_SIZE_UNIT.
613 2018-08-27  Martin Sebor  <msebor@redhat.com>
615         PR tree-optimization/86914
616         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
618 2018-08-27  Martin Sebor  <msebor@redhat.com>
620         PR tree-optimization/87112
621         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
622         the type of the bound argument.
624 2018-08-27  Jeff Law  <law@redhat.com>
626         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
627         type does not have a TYPE_SIZE_UNIT.
629 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
631         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
632         with include of backend.h.
634 2018-08-27  Richard Biener  <rguenther@suse.de>
636         PR tree-optimization/86927
637         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
638         use const cond reduction code.
640 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
642         PR tree-optimization/85758
643         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
645 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
647         PR c++/87091
648         * diagnostic-show-locus.c (class layout_range): Update for
649         conversion of show_caret_p to a tri-state.
650         (layout_range::layout_range): Likewise.
651         (make_range): Likewise.
652         (layout::maybe_add_location_range): Likewise.
653         (layout::should_print_annotation_line_p): Don't show annotation
654         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
655         (layout::get_state_at_point): Update for conversion of
656         show_caret_p to a tri-state.  Bail out early for
657         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
658         underlining or source colorization.
659         (gcc_rich_location::add_location_if_nearby): Update for conversion
660         of show_caret_p to a tri-state.
661         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
662         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
663         Likewise.
664         (selftest::test_one_liner_labels): Likewise.
665         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
666         conversion of show_caret_p to a tri-state.
667         * pretty-print.c (text_info::set_location): Likewise.
668         * pretty-print.h (text_info::set_location): Likewise.
669         * substring-locations.c (format_warning_n_va): Likewise.
670         * tree-diagnostic.c (default_tree_printer): Likewise.
671         * tree-pretty-print.c (newline_and_indent): Likewise.
673 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
675         PR c++/87091
676         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
677         line above for line-insertion fix-it hints.
678         (selftest::test_fixit_insert_containing_newline): Update the
679         expected results, and add a test with line-numbering enabled.
681 2018-08-27  Martin Liska  <mliska@suse.cz>
683         PR sanitizer/86962
684         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
685         params with DECL_HAS_VALUE_EXPR_P.
687 2018-08-27  Martin Liska  <mliska@suse.cz>
689         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
690         selected expansion strategy.
692 2018-08-27  Martin Liska  <mliska@suse.cz>
694         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
695         * builtins.c (is_builtin_fn): Likewise.
696         * attribs.c (diag_attr_exclusions): Use new function
697         fndecl_built_in_p and remove check for FUNCTION_DECL if
698         possible.
699         (builtin_mathfn_code): Likewise.
700         (fold_builtin_expect): Likewise.
701         (fold_call_expr): Likewise.
702         (fold_builtin_call_array): Likewise.
703         (fold_call_stmt): Likewise.
704         (set_builtin_user_assembler_name): Likewise.
705         (is_simple_builtin): Likewise.
706         * calls.c (gimple_alloca_call_p): Likewise.
707         (maybe_warn_nonstring_arg): Likewise.
708         * cfgexpand.c (expand_call_stmt): Likewise.
709         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
710         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
711         (cgraph_node::verify_node): Likewise.
712         * cgraphclones.c (build_function_decl_skip_args): Likewise.
713         (cgraph_node::create_clone): Likewise.
714         * config/arm/arm.c (arm_insert_attributes): Likewise.
715         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
716         * dse.c (scan_insn): Likewise.
717         * expr.c (expand_expr_real_1): Likewise.
718         * fold-const.c (operand_equal_p): Likewise.
719         (fold_binary_loc): Likewise.
720         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
721         * gimple-low.c (lower_stmt): Likewise.
722         * gimple-pretty-print.c (dump_gimple_call): Likewise.
723         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
724         * gimple.c (gimple_build_call_from_tree): Likewise.
725         (gimple_call_builtin_p): Likewise.
726         (gimple_call_combined_fn): Likewise.
727         * gimplify.c (gimplify_call_expr): Likewise.
728         (gimple_boolify): Likewise.
729         (gimplify_modify_expr): Likewise.
730         (gimplify_addr_expr): Likewise.
731         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
732         * ipa-cp.c (determine_versionability): Likewise.
733         * ipa-fnsummary.c (compute_fn_summary): Likewise.
734         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
735         * ipa-split.c (visit_bb): Likewise.
736         (split_function): Likewise.
737         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
738         * lto-cgraph.c (input_node): Likewise.
739         * lto-streamer-out.c (write_symbol): Likewise.
740         * omp-low.c (setjmp_or_longjmp_p): Likewise.
741         (lower_omp_1): Likewise.
742         * predict.c (strip_predict_hints): Likewise.
743         * print-tree.c (print_node): Likewise.
744         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
745         * trans-mem.c (is_tm_irrevocable): Likewise.
746         (is_tm_load): Likewise.
747         (is_tm_simple_load): Likewise.
748         (is_tm_store): Likewise.
749         (is_tm_simple_store): Likewise.
750         (is_tm_abort): Likewise.
751         (tm_region_init_1): Likewise.
752         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
753         * tree-cfg.c (verify_gimple_call): Likewise.
754         (move_stmt_r): Likewise.
755         (stmt_can_terminate_bb_p): Likewise.
756         * tree-eh.c (lower_eh_constructs_2): Likewise.
757         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
758         * tree-inline.c (remap_gimple_stmt): Likewise.
759         (copy_bb): Likewise.
760         (estimate_num_insns): Likewise.
761         (fold_marked_statements): Likewise.
762         * tree-sra.c (scan_function): Likewise.
763         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
764         (optimize_stack_restore): Likewise.
765         (pass_fold_builtins::execute): Likewise.
766         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
767         (mark_all_reaching_defs_necessary_1): Likewise.
768         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
769         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
770         (pass_forwprop::execute): Likewise.
771         * tree-ssa-loop-im.c (stmt_cost): Likewise.
772         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
773         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
774         * tree-ssa-strlen.c (get_string_length): Likewise.
775         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
776         (find_func_aliases_for_call): Likewise.
777         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
778         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
779         * tree-tailcall.c (find_tail_calls): Likewise.
780         * tree.c (need_assembler_name_p): Likewise.
781         (free_lang_data_in_decl): Likewise.
782         (get_call_combined_fn): Likewise.
783         * ubsan.c (is_ubsan_builtin_p): Likewise.
784         * varasm.c (incorporeal_function_p): Likewise.
785         * tree.h (DECL_BUILT_IN): Remove and replace with
786         fndecl_built_in_p.
787         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
788         (fndecl_built_in_p): New.
790 2018-08-27  Martin Liska  <mliska@suse.cz>
792         PR tree-optimization/86847
793         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
794         Dump also subtree probability.
795         (switch_decision_tree::do_jump_if_equal): New function.
796         (switch_decision_tree::emit_case_nodes): Handle special
797         situations in balanced tree that can be emitted much simpler.
798         Fix calculation of probabilities that happen in tree expansion.
799         * tree-switch-conversion.h (struct cluster): Add
800         is_single_value_p.
801         (struct simple_cluster): Likewise.
802         (struct case_tree_node): Add new function has_child.
803         (do_jump_if_equal): New.
805 2018-08-27  Martin Liska  <mliska@suse.cz>
807         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
808         Add new argument to bit_test_cluster constructor.
809         (bit_test_cluster::emit): Set bits really number of values
810         handlel by a test.
811         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
812         probability argument.
813         * tree-switch-conversion.h (struct bit_test_cluster):
814         Add m_handles_entire_switch.
816 2018-08-27  Martin Liska  <mliska@suse.cz>
818         PR tree-optimization/86702
819         * tree-switch-conversion.c (jump_table_cluster::emit):
820         Make probabilities even for values in jump table
821         according to number of cases handled.
822         (switch_decision_tree::compute_cases_per_edge): Pass
823         argument to reset_out_edges_aux function.
824         (switch_decision_tree::analyze_switch_statement): Likewise.
825         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
826         Make it static.
828 2018-08-27  Martin Liska  <mliska@suse.cz>
830         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
831         cfun argument explicitly.
832         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
833         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
834         function gimple_switch_default_bb.
835         (convert_switch_statements):
836         (expand_builtins):
837         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
838         * stmt.c (label_to_block_fn): Use label_to_block and pass
839         cfun argument explicitly and use gimple_switch_label_bb.
840         (expand_case): Likewise.
841         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
842         cfun argument explicitly. Likewise.
843         (make_edges_bb): Likewise.
844         (make_cond_expr_edges): Likewise.
845         (get_cases_for_edge): Likewise.
846         (make_gimple_switch_edges): Likewise.
847         (label_to_block_fn): Likewise.
848         (label_to_block): Likewise.
849         (make_goto_expr_edges): Likewise.
850         (make_gimple_asm_edges): Likewise.
851         (main_block_label): Likewise.
852         (group_case_labels_stmt): Likewise.
853         (find_taken_edge_computed_goto): Likewise.
854         (find_taken_edge_switch_expr): Likewise.
855         (gimple_verify_flow_info): Likewise.
856         (gimple_redirect_edge_and_branch): Likewise.
857         (gimple_switch_label_bb): New function.
858         (gimple_switch_default_bb): Likewise.
859         (gimple_switch_edge): Likewise.
860         (gimple_switch_default_edge): Likewise.
861         * tree-cfg.h (label_to_block_fn): Remove and replace ...
862         (label_to_block): ... with this.
863         (gimple_switch_label_bb): New.
864         (gimple_switch_default_bb): Likewise.
865         (gimple_switch_edge): Likewise.
866         (gimple_switch_default_edge): Likewise.
867         * tree-cfgcleanup.c (convert_single_case_switch): Use
868         new gimple functions and pass new argument to label_to_block.
869         (cleanup_control_flow_bb):
870         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
871         cfun argument explicitly.
872         (make_eh_edges): Likewise.
873         (redirect_eh_dispatch_edge): Likewise.
874         (lower_resx): Likewise.
875         (lower_eh_dispatch): Likewise.
876         (maybe_remove_unreachable_handlers): Likewise.
877         (unsplit_eh): Likewise.
878         (cleanup_empty_eh): Likewise.
879         (verify_eh_edges): Likewise.
880         (verify_eh_dispatch_edge): Likewise.
881         * tree-ssa-dom.c (record_edge_info): Likewise.
882         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
883         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
884         (thread_through_normal_block): Likewise.
885         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
886         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
887         * tree-switch-conversion.c (switch_conversion::collect): Use new
888         gimple functions.
889         (switch_conversion::check_final_bb): Likewise.
890         (switch_conversion::gather_default_values): Pass new argument
891         to label_to_block.
892         (switch_conversion::build_constructors): Likewise.
893         (switch_decision_tree::compute_cases_per_edge): Use new
894         gimple_switch_edge function.
895         (switch_decision_tree::analyze_switch_statement): Pass new argument
896         to label_to_block.
897         (switch_decision_tree::try_switch_expansion): Use
898         gimple_switch_default_edge.
899         * tree-vrp.c (find_switch_asserts): Pass new argument
900         to label_to_block.
901         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
902         (vr_values::simplify_switch_using_ranges): Likewise.
904 2018-08-27  Richard Biener  <rguenther@suse.de>
906         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
907         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
909         * tree-ssa-sccvn.h (struct vn_pval): New structure.
910         (struct vn_nary_op_s): Add unwind_to member.  Add
911         predicated_values flag and put result into a union together
912         with a linked list of vn_pval.
913         (struct vn_ssa_aux): Add name member to make maintaining
914         a map of SSA name to vn_ssa_aux possible.  Remove no longer
915         needed info, dfsnum, low, visited, on_sccstack, use_processed
916         and range_info_anti_range_p members.
917         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
918         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
919         New functions.
920         (vn_valueize): New global.
921         (vn_context_bb): Likewise.
922         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
923         VN_INFO_PTR_INFO): Remove.
924         * tree-ssa-sccvn.c: ... (rewrite)
925         (pass_fre::execute): For -O2+ initialize loops and run
926         RPO VN in optimistic mode (iterating).  For -O1 and -Og
927         run RPO VN in non-optimistic mode.
928         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
929         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
930         * doc/invoke.texi (sccvn-max-scc-size): Remove.
931         (rpo-vn-max-loop-depth): Document.
932         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
933         when valuezing the VUSE signals we walked out of the region.
934         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
935         (phi_translate): Set VN context block to use for availability
936         lookup.
937         (compute_avail): Likewise.
938         (pre_valueize): New function.
939         (pass_pre::execute): Adjust to the RPO VN API.
941         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
942         (propagate_constants_for_unrolling): Remove.
943         (tree_unroll_loops_completely): Perform value-numbering
944         on the unrolled bodies loop parent.
946 2018-08-27  Richard Biener  <rguenther@suse.de>
948         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
949         for partial antic compute.
951 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
953         PR rtl-optimization/87065
954         * combine.c (simplify_if_then_else): Formatting fix.
955         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
956         check.
957         (known_cond): Don't return const_true_rtx for vector modes.  Use
958         CONST0_RTX instead of const0_rtx.  Formatting fixes.
960 2018-08-27  Martin Liska  <mliska@suse.cz>
962         PR gcov-profile/87069
963         * gcov.c (process_file): Record files already processed
964         and warn about a file being processed multiple times.
966 2018-08-27  Martin Liska  <mliska@suse.cz>
968         PR driver/83193
969         * config/aarch64/aarch64.c (aarch64_override_options_internal):
970         Set default values for x_aarch64_*_string strings.
971         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
972         prefix.  For -mabi do not print '=ABI' in help and use
973         <option_value> format for -msve-vector-bits and -moverride
974         options.
976 2018-08-26  Jeff Law  <law@redhat.com>
978         * config/mips/frame-header-opt.c: Include "backend.h" rather than
979         "cfg.h"
981 2018-08-26  Marek Polacek  <polacek@redhat.com>
983         PR c++/87029, Implement -Wredundant-move.
984         * doc/invoke.texi: Document -Wredundant-move.
986 2018-08-25  Martin Sebor  <msebor@redhat.com>
988         PR tree-optimization/87059
989         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
990         to the same type as the other.
991         * fold-const.c (fold_binary_loc): Assert expectation.
993 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
995         * config/darwin.c (machopic_legitimize_pic_address): Clean up
996         extraneous parentheses, dead code section and formatting.
998 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
1000         PR c++/87091
1001         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1002         wide enough for jumps in the line-numbering to be visible.
1003         (layout::print_gap_in_line_numbering): New member function.
1004         (layout::calculate_line_spans): When using line numbering, merge
1005         line spans that are only 1 line apart.
1006         (diagnostic_show_locus): When printing line numbers, show gaps in
1007         line numbering directly, rather than printing headers.
1008         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1009         line-numbering with multiple line spans.
1010         (selftest::test_fixit_insert_containing_newline_2): Add test of
1011         line-numbering, in which the spans are close enough to be merged.
1013 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1015         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1016         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
1017         * tree-vrp.c (range_is_nonnull): Remove.
1018         (range_includes_zero_p): Accept value_range instead of min/max.
1019         (extract_range_from_binary_expr_1): Do not early bail on
1020         POINTER_PLUS_EXPR.
1021         Use range_includes_zero_p instead of range_is_nonnull.
1022         (extract_range_from_unary_expr): Use range_includes_zero_p instead
1023         of range_is_nonnull.
1024         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
1025         special case VR_ANTI_RANGE.
1026         (vrp_finalize): Same.
1027         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1028         instead of min/max.
1029         (range_is_nonnull): Remove.
1030         * vr-values.c (vrp_stmt_computes_nonzero): Use
1031         range_includes_zero_p instead of range_is_nonnull.
1032         (extract_range_basic): Pass value_range to range_includes_zero_p
1033         instead of range_is_nonnull.
1035 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
1037         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1038         * emit-rtl.h (rtl_data): Remove return_bnd.
1039         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1040         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1041         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1042         (POINTER_BOUNDS_MODE): Remove definition.
1043         (make_pointer_bounds_mode): Remove.
1044         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1045         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1046         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1047         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1048         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1049         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1050         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1052         * config/i386/i386-modes.def (BND32, BND64): Remove.
1053         * config/i386/i386.c (dbx_register_map): Remove bound registers.
1054         (dbx64_register_map): Ditto.
1055         (svr4_dbx_register_map): Ditto.
1056         (indirect_thunk_bnd_needed): Remove.
1057         (indirect_thunks_bnd_used): Ditto.
1058         (indirect_return_bnd_needed): Ditto.
1059         (indirect_return_via_cx_bnd): Ditto.
1060         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1061         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1062         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
1063         (output_indirect_thunk_function): Remove handling of
1064         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1065         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1066         (ix86_save_reg): Remove handling of crtl->return_bnd.
1067         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1068         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1069         and UNSPEC_BNDLX_ADDR.
1070         (ix86_output_indirect_branch_via_reg): Remove handling of
1071         indirect_thunk_prefix_bnd.
1072         (ix86_output_indirect_branch_via_push): Ditto.
1073         (ix86_output_function_return): Ditto.
1074         (ix86_output_indirect_function_return): Ditto.
1075         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1076         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1077         (CALL_USED_REGISTERS): Ditto.
1078         (REG_ALLOC_ORDER): Update for removal of bound registers.
1079         (HI_REGISTER_NAMES): Ditto.
1080         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1081         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1082         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1083         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1084         (FIRST_PSEUDO_REG): Update.
1085         (BND): Remove mode iterator.
1086         * config/i386/predicates.md (bnd_mem_operator): Remove.
1088 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1090         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1091         vectors.
1093 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1095         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1096         the case in which the permute needs only a single element and
1097         repeats for every vector of the result.  Extend that case to
1098         handle variable-length vectors.
1099         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1101 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
1103         PR debug/79342
1104         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1105         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1107 2018-08-24  Richard Biener  <rguenther@suse.de>
1109         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1110         bb_flags_allocated members.
1111         (auto_flag): New RAII class for allocating flags.
1112         (auto_edge_flag): New RAII class for allocating edge flags.
1113         (auto_bb_flag): New RAII class for allocating bb flags.
1114         * cfgloop.c (verify_loop_structure): Allocate temporary edge
1115         flag dynamically.
1116         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1117         in favor of temporarily allocated BB flag.
1118         * hsa-brig.c: Re-order includes.
1119         * hsa-dump.c: Likewise.
1120         * hsa-regalloc.c: Likewise.
1121         * print-rtl.c: Likewise.
1122         * profile-count.c: Likewise.
1124 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
1126         PR target/86989
1127         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1128         the TOC register.
1130 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1132         PR 87073/bootstrap
1133         * wide-int-range.cc (wide_int_range_div): Do not ignore result
1134         from wide_int_range_multiplicative_op.
1136 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1138         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1139         "permutaion".
1141 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1143         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1144         to 'expanded'.
1146 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
1148         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1149         full GENERIC expression used for replacement.
1151 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
1153         * tree-vrp.c (abs_extent_range): Remove.
1154         (extract_range_into_wide_ints): Pass wide ints by reference.
1155         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1156         Pass wide ints by reference in all calls to
1157         extract_range_into_wide_ints.
1158         * wide-int-range.cc (wide_int_range_div): New.
1159         * wide-int-range.h (wide_int_range_div): New.
1160         (wide_int_range_includes_zero_p): New.
1161         (wide_int_range_zero_p): New.
1163 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
1165         * config/aarch64/aarch64.md (arches): New enum.
1166         (arch): New enum attr.
1167         (arch_enabled): New attr.
1168         (enabled): Now uses arch_enabled only.
1169         (simd, sve, fp16): Removed attribute.
1170         (fp): Attr now defined in terms of 'arch'.
1171         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1172         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1173         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1174         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1175         attributes into 'arch'.
1176         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1177         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1178         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1179         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1180         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1181         'simd' attribute into 'arch'.
1182         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1183         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1184         Convert use of 'fp' attribute to 'arch'.
1185         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1186         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1187         into 'arch'.
1188         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1189         (different modes) Merge 'fp' and 'simd' into 'arch'.
1190         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1191         'simd' into 'arch'.
1193 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
1195         PR rtl-optimization/87026
1196         * expmed.c (canonicalize_comparison): If we can no longer create
1197         pseudoregisters, don't.
1199 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
1201         PR target/86951
1202         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1203         prototype.
1204         * config/arm/arm.c (speculation_barrier_libfunc): New static
1205         variable.
1206         (arm_init_libfuncs): Initialize it.
1207         (arm_emit_speculation_barrier): New function.
1208         * config/arm/arm.md (speculation_barrier): Call
1209         arm_emit_speculation_barrier for architectures that do not have
1210         DSB or ISB.
1211         (speculation_barrier_insn): Only match on Armv7 or later.
1213 2018-08-23  Richard Biener  <rguenther@suse.de>
1215         PR middle-end/87024
1216         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1217         calls.
1219 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1221         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1222         of single-vector TBLs.
1223         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1224         one input is given.
1226 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1228         PR target/85910
1229         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1230         aarch64_evpc_tbl guard.
1232 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1234         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1235         behaviour.
1237 2018-08-22  Martin Sebor  <msebor@redhat.com>
1239         PR middle-end/87052
1240         * tree-pretty-print.c (pretty_print_string): Add argument.
1241         (dump_generic_node): Call to pretty_print_string with string size.
1243 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
1245         PR rtl-optimization/86771
1246         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1247         of two SETs into those two SETs, one to be placed at i2, if that SETs
1248         destination is modified between i2 and i3.
1250 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1252         PR tree-optimization/86725
1253         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1254         function.
1255         (vect_analyze_scalar_cycles_1): Check it.
1257 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1259         PR tree-optimization/86725
1260         * tree-vect-loop.c (vect_is_simple_reduction): When treating
1261         an outer loop phi as a double reduction, make sure that the
1262         single user of the phi result is an inner loop phi.
1264 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1266         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1267         grouped stores with gaps to a strided group.
1269 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1271         * tree-vect-stmts.c (get_group_load_store_type)
1272         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1273         first statement in a group.
1275 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1277         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1278         the sequence used in gcc/gcc.c.
1280 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1282         PR other/704
1283         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1284         building it.
1286 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1288         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1289         Darwin10-specific unwinder-shim.
1290         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1291         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
1292         New to cater for Darwin10 Rosetta.
1294 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1296         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1297         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1299 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1301         PR bootstrap/81033
1302         PR target/81733
1303         PR target/52795
1304         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1305         (dwarf2out_switch_text_section): Generate a local label for the
1306         second function sub-section and apply it as the second FDE start
1307         label.
1308         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1309         second sub-section start.
1311 2018-08-22  Richard Biener  <rguenther@suse.de>
1313         PR tree-optimization/86988
1314         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1316 2018-08-22  Richard Biener  <rguenther@suse.de>
1318         PR tree-optimization/86945
1319         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1321 2018-08-22  Alexandre Oliva <oliva@adacore.com>
1323         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1324         a comment about how uses of r2 for .sdata2 come about.
1326 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
1328         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1330 2018-08-21  Marek Polacek  <polacek@redhat.com>
1332         PR c++/86981, Implement -Wpessimizing-move.
1333         * doc/invoke.texi: Document -Wpessimizing-move.
1335 2018-08-21  Jan Hubicka  <jh@suse.cz>
1337         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1338         * tree.h (is_redundant_typedef): Remove.
1339         * dwarf2out.c (is_redundant_typedef): Turn into static function.
1341 2018-08-21  Jan Hubicka  <jh@suse.cz>
1343         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1344         when possible.
1346 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
1348         * expmed.c (extract_low_bits): Reject invalid subregs early.
1350 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1352         PR middle-end/86121
1353         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1354         behaviour.
1356 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1358         * config/vxworks.h: Guard vxworks_asm_out_constructor and
1359         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1360         * config/vxworks.c: Likewise.
1362 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1364         * config/vxworks.c: Set targetm.have_ctors_dtors
1365         if HAVE_INITFINI_ARRAY_SUPPORT.
1366         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1367         if HAVE_INITFINI_ARRAY_SUPPORT.
1369 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1371         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1372         default search path for VxWorks < 7.
1374 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1376         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1377         (get_format_string): Refer to c_getstr.
1379 2018-08-21  Tom de Vries  <tdevries@suse.de>
1381         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1382         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1383         (debuginfo_early_stop): Declare.
1384         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1385         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1386         (debuginfo_early_stop): New function.
1387         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1388         and debuginfo_early_stop.
1389         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1390         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1391         (general_init): Call debuginfo_early_init.
1392         (finalize): Call debuginfo_fini.
1393         (do_compile): Call debuginfo_init.
1394         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1395         -fdump-early-debug.
1396         (@item -fdump-debug, @item -fdump-earlydebug): Add.
1398 2018-08-21  Tom de Vries  <tdevries@suse.de>
1400         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1401         flag_dump_noaddr and flag_dump_unnumbered.
1403 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
1405         * wide-int-range.cc (wide_int_range_abs): New.
1406         (wide_int_range_order_set): Rename from wide_int_range_min_max.
1407         * wide-int-range.h (wide_int_range_abs): New.
1408         (wide_int_range_min_max): New.
1409         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1410         case to call wide_int_range_abs.
1411         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1412         (extract_range_from_abs_expr): Delete.
1414 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
1416         PR target/87033
1417         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1418         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1419         for indexed loads.
1421 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1422             Jeff Law <law@redhat.com>
1424         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1425         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1427 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
1429         PR other/84889
1430         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1431         (decl_attributes): Likewise.
1432         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1433         instance.
1434         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1435         * diagnostic-core.h (class auto_diagnostic_group): New class.
1436         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1437         (diagnostic_report_diagnostic): Handle the first diagnostics within
1438         a group.
1439         (emit_diagnostic): Add auto_diagnostic_group instance.
1440         (inform): Likewise.
1441         (inform_n): Likewise.
1442         (warning): Likewise.
1443         (warning_at): Likewise.
1444         (warning_n): Likewise.
1445         (pedwarn): Likewise.
1446         (permerror): Likewise.
1447         (error): Likewise.
1448         (error_n): Likewise.
1449         (error_at): Likewise.
1450         (sorry): Likewise.
1451         (fatal_error): Likewise.
1452         (internal_error): Likewise.
1453         (internal_error_no_backtrace): Likewise.
1454         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1455         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1456         * diagnostic.h (struct diagnostic_context): Add fields
1457         "diagnostic_group_nesting_depth",
1458         "diagnostic_group_emission_count", "begin_group_cb",
1459         "end_group_cb".
1460         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1461         Add auto_diagnostic_group instance(s).
1462         (find_explicit_erroneous_behavior): Likewise.
1463         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1464         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1465         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1466         (gimplify_va_arg_expr): Likewise.
1467         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1468         (HSA_SORRY_AT): Likewise.
1469         * ipa-devirt.c (compare_virtual_tables): Likewise.
1470         (warn_odr): Likewise.
1471         * multiple_target.c (expand_target_clones): Likewise.
1472         * opts-common.c (cmdline_handle_error): Likewise.
1473         * reginfo.c (globalize_reg): Likewise.
1474         * substring-locations.c (format_warning_n_va): Likewise.
1475         * tree-inline.c (expand_call_inline): Likewise.
1476         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1477         * tree-ssa-loop-niter.c
1478         (do_warn_aggressive_loop_optimizations): Likewise.
1479         * tree-ssa-uninit.c (warn_uninit): Likewise.
1480         * tree.c (warn_deprecated_use): Likewise.
1482 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
1484         PR target/87014
1485         * config/i386/i386.md (eh_return): Always update EH return
1486         address in word_mode.
1488 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
1490         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1491         TARGET_SPLIT_COMPLEX_ARG is defined.
1493 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1495         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1497 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1499         PR target/86984
1500         * expr.c (expand_assignment): Assert that bitpos is positive.
1501         (store_field): Likewise
1502         (expand_expr_real_1): Make sure that bitpos is positive.
1503         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1504         integer overflow.
1506 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1508         * Makefile.in (CPP_ID_DATA_H): Delete.
1509         (CPP_INTERNAL_H): Don't add it.
1510         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1511         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1513 2018-08-20  Richard Biener  <rguenther@suse.de>
1515         PR tree-optimization/78655
1516         * tree-vrp.c (extract_range_from_binary_expr_1): Make
1517         pointer + offset nonnull if either operand is nonnull work.
1519 2018-08-20  Tom de Vries  <tdevries@suse.de>
1521         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1522         unless the referenced die describes the added property using
1523         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
1524         Otherwise, add a DW_AT_location to the referenced die.
1526 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
1528         PR target/86994
1529         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1530         register_operand when calling ix86_set_reg_reg_cost.
1531         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1532         Set *total to 0 for operands that satisfy x86_64_immediate_operand
1533         predicate and to 1 otherwise.
1535 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
1537         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1538         emit a diagnostic that it is not supported and reset the option.
1539         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1540         supported and consume the option.  (ASM_FINAL_SPEC): New.
1542 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
1544         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1545         a sentence.
1547 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
1549         C-SKY port: Documentation
1551         * doc/extend.texi (C-SKY Function Attributes): New section.
1552         * doc/invoke.texi (Option Summary): Add C-SKY options.
1553         (C-SKY Options): New section.
1554         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1556 2018-08-17  Jojo  <jijie_rong@c-sky.com>
1557             Huibin Wang  <huibin_wang@c-sky.com>
1558             Sandra Loosemore  <sandra@codesourcery.com>
1559             Chung-Lin Tang  <cltang@codesourcery.com>
1561         C-SKY port: Backend implementation
1563         * config/csky/*: New.
1564         * common/config/csky/*: New.
1566 2018-08-17  Jojo  <jijie_rong@c-sky.com>
1567             Huibin Wang  <huibin_wang@c-sky.com>
1568             Sandra Loosemore  <sandra@codesourcery.com>
1569             Chung-Lin Tang  <cltang@codesourcery.com>
1570             Andrew Jenner  <andrew@codesourcery.com>
1572         C-SKY port: Configury
1574         * config.gcc (csky-*-*): New.
1575         * configure.ac: Add csky to targets for dwarf2 debug_line support.
1576         * configure: Regenerated.
1578 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
1580         * dump-context.h: Include "dumpfile.h".
1581         (dump_context::dump_printf_va): Convert final param from va_list
1582         to va_list *.  Convert from ATTRIBUTE_PRINTF to
1583         ATTRIBUTE_GCC_DUMP_PRINTF.
1584         (dump_context::dump_printf_loc_va): Likewise.
1585         * dumpfile.c: Include "stringpool.h".
1586         (make_item_for_dump_printf_va): Delete.
1587         (make_item_for_dump_printf): Delete.
1588         (class dump_pretty_printer): New class.
1589         (dump_pretty_printer::dump_pretty_printer): New ctor.
1590         (dump_pretty_printer::emit_items): New member function.
1591         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1592         function.
1593         (dump_pretty_printer::emit_item): New member function.
1594         (dump_pretty_printer::stash_item): New member function.
1595         (dump_pretty_printer::format_decoder_cb): New member function.
1596         (dump_pretty_printer::decode_format): New member function.
1597         (dump_context::dump_printf_va): Reimplement in terms of
1598         dump_pretty_printer.
1599         (dump_context::dump_printf_loc_va): Convert final param from va_list
1600         to va_list *.
1601         (dump_context::begin_scope): Reimplement call to
1602         make_item_for_dump_printf.
1603         (dump_printf): Update for change to dump_printf_va.
1604         (dump_printf_loc): Likewise.
1605         (selftest::test_capture_of_dump_calls): Convert "stmt" from
1606         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
1607         with %T, %E, and %G.
1608         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1609         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1610         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1611         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1612         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1613         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1614         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1615         within a dump_printf_loc call to "%wu".
1616         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1617         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
1618         missing space after "=".
1619         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1620         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1621         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1622         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1623         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
1624         duplicate "vectorized" from message.
1626 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1628         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1629         polyNxK_t element's TYPE_STRING_FLAG.
1631 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
1633         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1634         (they were unnamed before).  Fix comments.
1636 2018-08-17  Nathan Sidwell  <nathan@acm.org>
1638         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1640 2018-08-17  Richard Biener  <rguenther@suse.de>
1642         PR tree-optimization/86841
1643         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1645 2018-08-17  Martin Liska  <mliska@suse.cz>
1647         * common.opt: Remove Warn, Init and Report for options with
1648         Ignore/Deprecated flag. Warning is done automatically for
1649         Deprecated flags.
1650         * config/i386/i386.opt: Likewise.
1651         * config/ia64/ia64.opt: Likewise.
1652         * config/rs6000/rs6000.opt: Likewise.
1653         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1654         Remove usage of flag_check_pointer_bounds.
1655         * lto-wrapper.c (merge_and_complain): Do not handle
1656         OPT_fcheck_pointer_bounds.
1657         (append_compiler_options): Likewise.
1658         * opt-functions.awk: Do not handle Deprecated.
1659         * optc-gen.awk: Check that Var, Report and Init are not
1660         used for an option with Ignore/Deprecated flag.
1661         * opts-common.c (decode_cmdline_option): Do not report
1662         CL_ERR_DEPRECATED.
1663         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1664         options.
1665         * opts.h (struct cl_option): Remove cl_deprecated flag.
1666         (CL_ERR_DEPRECATED): Remove error enum value.
1668 2018-08-17  Richard Biener  <rguenther@suse.de>
1670         PR middle-end/86505
1671         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1672         across a va-arg-pack using call adjust its return value accordingly.
1674 2018-08-16  Martin Sebor  <msebor@redhat.com>
1676         PR tree-optimization/86853
1677         * gimple-ssa-sprintf.c (struct format_result): Rename member.
1678         (struct fmtresult): Add member and initialize it in ctors.
1679         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
1680         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
1681         (format_directive): Set POSUNDER4K when MAYFAIL is set.
1682         (parse_directive): Handle %C same as %c.
1683         (sprintf_dom_walker::compute_format_length): Adjust.
1684         (is_call_safe): Adjust.
1686 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1688         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
1689         for determining how to count the elements.
1690         * builtins.h (c_strlen): Adjust prototype.
1691         * expr.c (string_constant): Add new parameter mem_size.
1692         Set *mem_size appropriately.
1693         * expr.h (string_constant): Adjust protoype.
1694         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1695         * gimple-fold.h (get_range_strlen): Adjust prototype.
1696         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1697         (format_string): Call get_string_length with eltsize.
1699 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1701         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1702         to emit the span, rather than setting it as the prefix.
1704 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1706         * diagnostic-show-locus.c (layout::start_annotation_line): Add
1707         "margin_char" parameter, defaulting to space.  Use it in place
1708         of pp_space for the initial part of the margin.
1709         (layout::print_leading_fixits): Use '+' when filling the margin
1710         of line-insertion fix-it hints.
1712 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1714         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1715         Delete.
1717 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1719         * config/rs6000/altivec.md: Don't set length attribute to the default
1720         value.
1721         * config/rs6000/darwin.md: Ditto.
1722         * config/rs6000/dfp.md: Ditto.
1723         * config/rs6000/htm.md: Ditto.
1724         * config/rs6000/rs6000.md: Ditto.
1725         * config/rs6000/sync.md: Ditto.
1726         * config/rs6000/vsx.md: Ditto.
1728 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1730         * config/rs6000/altivec.md: Don't set length attribute to the default
1731         value, for branch instructions.
1732         * config/rs6000/darwin.md: Ditto.
1733         * config/rs6000/rs6000.md: Ditto.
1735 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1737         * config/rs6000/rs6000.md (length): Always define as const_int 4.
1738         (unnamed conditional branch define_insn): Set length to 4 or 8
1739         depending on offset.
1740         (<bd>_<mode>): Similar, for alternative 0.
1741         (<bd>tf_<mode>): Ditto.
1743 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1745         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1747 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
1749         * doc/rtl.texi: Replace old RTX class names with new names.
1752 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
1754         * expmed.h (canonicalize_comparison): New declaration.
1755         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1756         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1757         * optabs.c (prepare_cmp_insn): Likewise.
1758         * rtl.h (unsigned_condition_p): New function which checks if a
1759         comparison operator is unsigned.
1761 2018-08-16  Nathan Sidwell  <nathan@acm.org>
1763         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1764         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1766 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1768         PR target/84711
1769         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1770         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1771         (mov<mov>): ..this and enable unconditionally.
1773 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1775         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1777 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
1779         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1780         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1781         "Common" with "Target".
1783 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1785         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1786         * doc/invoke.texi (mmitigate-rop): Remove.
1787         * config/i386/i386.c: Do not include "regrename.h".
1788         (ix86_rop_should_change_byte_p, reg_encoded_number)
1789         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1790         Remove.
1791         (ix86_reorg): Remove call to ix86_mitigate_rop.
1792         * config/i386/i386.md (attr "modrm_class"): Remove.
1793         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1794         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1795         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1797 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
1799         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1800         allow folding of mergeh() and mergel() for the float and double types.
1801         (fold_mergehl_helper): Rework to handle building a permute tree
1802         for float vectors.
1804 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1806         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1807         for TARGET_SSE.
1809 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
1811         * common.opt (fdiagnostics-show-labels): New option.
1812         * diagnostic-show-locus.c (class layout_range): Add field
1813         "m_label".
1814         (class layout): Add field "m_show_labels_p".
1815         (layout_range::layout_range): Add param "label" and use it to
1816         initialize m_label.
1817         (make_range): Pass in NULL for new "label" param of layout_range's
1818         ctor.
1819         (layout::layout): Initialize m_show_labels_p.
1820         (layout::maybe_add_location_range): Pass in loc_range->m_label
1821         when constructing layout_range instances.
1822         (struct line_label): New struct.
1823         (layout::print_any_labels): New member function.
1824         (layout::print_line): Call it if label-printing is enabled.
1825         (selftest::test_one_liner_labels): New test.
1826         (selftest::test_diagnostic_show_locus_one_liner): Call it.
1827         * diagnostic.c (diagnostic_initialize): Initialize
1828         context->show_labels_p.
1829         * diagnostic.h (struct diagnostic_context): Add field
1830         "show_labels_p".
1831         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1832         -fno-diagnostics-show-labels.
1833         * dwarf2out.c (gen_producer_string): Add
1834         OPT_fdiagnostics_show_labels to the ignored options.
1835         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1836         param.
1837         (gcc_rich_location::maybe_add_expr): Likewise.
1838         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1839         label" param, defaulting to NULL.
1840         (gcc_rich_location::add_expr): Add "label" param.
1841         (gcc_rich_location::maybe_add_expr): Likewise.
1842         (class text_range_label): New class.
1843         (class range_label_for_type_mismatch): New class.
1844         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1845         of format_warning_va.
1846         (fmtwarn_n): Likewise for new params of format_warning_n_va.
1847         * lto-wrapper.c (merge_and_complain): Add
1848         OPT_fdiagnostics_show_labels to the "pick one setting" options.
1849         (append_compiler_options): Likewise to the dropped options.
1850         (append_diag_options): Likewise to the passed-on options.
1851         * opts.c (common_handle_option): Handle the new option.
1852         * selftest-diagnostic.c
1853         (test_diagnostic_context::test_diagnostic_context): Enable
1854         show_labels_p.
1855         * substring-locations.c: Include "gcc-rich-location.h".
1856         (format_warning_n_va): Add "fmt_label" and "param_label" params
1857         and use them as appropriate.
1858         (format_warning_va): Add "fmt_label" and "param_label" params,
1859         passing them on to format_warning_n_va.
1860         (format_warning_at_substring): Likewise.
1861         (format_warning_at_substring_n): Likewise.
1862         * substring-locations.h (format_warning_va): Add "fmt_label" and
1863         "param_label" params.
1864         (format_warning_n_va): Likewise.
1865         (format_warning_at_substring): Likewise.
1866         (format_warning_at_substring_n): Likewise.
1867         * toplev.c (general_init): Initialize global_dc->show_labels_p.
1869 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
1871         PR testsuite/86519
1872         * builtins.c (expand_builtin_memcmp): Do not expand the call
1873         when overflow is detected.
1875 2018-08-15  Martin Sebor  <msebor@redhat.com>
1877         PR tree-optimization/71625
1878         * config/aarch64/aarch64-builtins.c
1879         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
1881 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
1883         * config/s390/s390.c (s390_reorg): Remove loop.
1885 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
1887         * config/darwin.c
1888          (darwin_function_switched_text_sections): Delete.
1889         * gcc/config/darwin.h
1890          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
1892 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
1894         PR target/81685
1895         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
1896         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
1897         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
1899 2018-08-15  Martin Liska  <mliska@suse.cz>
1901         PR tree-optimization/86925
1902         * predict.c (expr_expected_value_1): When taking
1903         later predictor, assign also probability.
1904         Use fold_build2_initializer_loc in order to fold
1905         the expression in -frounding-math.
1907 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
1909         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
1910         patterns.
1911         (expand_vec_perm_1): Try the new method.
1913 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
1915         PR target/86547
1916         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
1917         Check whether lra_live_max_point is 0 before dividing.
1919 2018-08-14  Martin Sebor  <msebor@redhat.com>
1921         PR tree-optimization/86650
1922         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
1923         (vrp_prop::check_mem_ref): Same.
1925 2018-08-13  Liu Hao <lh_mouse@126.com>
1927         * pretty-print.c (eat_esc_sequence): Swap the foreground and
1928         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
1929         and clear it thereafter, as it only works for DBCS.
1931 2018-08-13  Liu Hao <lh_mouse@126.com>
1933         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
1934         handle returned by _get_osf_handle().
1936 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
1938         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
1939         for folding vec_perm.
1941 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
1943         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
1944         Add support for gimple-folding of vec_pack() and vec_unpack()
1945         intrinsics.
1947 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
1949         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
1950         vec_xst variants to the list.
1951         (rs6000_gimple_fold_builtin): Add support for folding unaligned
1952         vector loads and stores.
1954 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
1956         * config.gcc (rs6000-ibm-aix4.x): Delete.
1957         (rs6000-ibm-aix5.1): Delete.
1958         (rs6000-ibm-aix5.2): Delete.
1959         (rs6000-ibm-aix5.3): Delete.
1960         * config/rs6000/aix43.h: Delete.
1961         * config/rs6000/aix51.h: Delete.
1962         * config/rs6000/aix52.h: Delete.
1963         * config/rs6000/t-aix43: Delete.
1965 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
1967         * config/s390/s390.c (s390_decompose_constant_pool_ref):
1968         New function.
1969         (s390_decompose_address): Factor out constant pool ref
1970         decomposition.
1972 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1974         * config/nds32/nds32-predicates.c
1975         (nds32_can_use_bclr_p): Change return type as bool.
1976         (nds32_can_use_bset_p): Ditto.
1977         (nds32_can_use_btgl_p): Ditto.
1978         (nds32_can_use_bitci_p): Ditto.
1979         * config/nds32/nds32-protos.h
1980         (nds32_can_use_bclr_p): Change declaration.
1981         (nds32_can_use_bset_p): Ditto.
1982         (nds32_can_use_btgl_p): Ditto.
1983         (nds32_can_use_bitci_p): Ditto.
1985 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1987         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1988         Support -msched-prolog-epilog option.
1989         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1991 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1993         * common/config/nds32/nds32-common.c
1994         (nds32_option_optimization_table): Enalbe -malways-align.
1996 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1998         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1999         extra_headers.
2000         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2001         OPT_misr_secure_ case.
2002         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2003         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2004         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2005         secure attribute.
2006         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2007         (nds32_isr_info): New field security_level.
2008         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2009         * config/nds32/nds32.md (return_internal): Consider critical attribute.
2010         * config/nds32/nds32.opt (misr-secure): New option.
2011         * config/nds32/nds32_init.inc: New file.
2012         * config/nds32/nds32_isr.h: New file.
2014 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
2016         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2017         Update comment for atomic instructions.
2018         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2019         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2020         Remove.
2021         (atomic_loaddi): Revise fence expansion to only emit fence prior to
2022         load for __ATOMIC_SEQ_CST model.
2023         (atomic_loaddi_1): Remove float register target.
2024         (atomic_storedi): Handle CONST_INT values.
2025         (atomic_storedi_1): Remove float register source.  Add special case
2026         for zero value.
2027         (memory_barrier): New expander and insn.
2029 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
2031         PR tree-optimization/86835
2032         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2033         new_stmt after def_gsi, make sure to insert new_square_stmt after
2034         that stmt, not 2 stmts before it.
2036 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
2038         PR target/82418
2039         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2040         instead of SWI48.
2042 2018-08-10  Martin Liska  <mliska@suse.cz>
2044         PR target/83610
2045         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2046         function type.
2047         * builtins.c (expand_builtin_expect_with_probability):
2048         New function.
2049         (expand_builtin_expect_with_probability): New function.
2050         (build_builtin_expect_predicate): Add new argumnet probability
2051         for BUILT_IN_EXPECT_WITH_PROBABILITY.
2052         (fold_builtin_expect):
2053         (fold_builtin_2):
2054         (fold_builtin_3):
2055         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2056         * builtins.h (fold_builtin_expect): Set new argument.
2057         * doc/extend.texi: Document __builtin_expect_with_probability.
2058         * doc/invoke.texi: Likewise.
2059         * gimple-fold.c (gimple_fold_call): Pass new argument.
2060         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2061         also BUILT_IN_EXPECT_WITH_PROBABILITY.
2062         * predict.c (get_predictor_value): New function.
2063         (expr_expected_value): Add new argument probability. Assume
2064         that predictor and probability are always non-null.
2065         (expr_expected_value_1): Likewise.  For __builtin_expect and
2066         __builtin_expect_with_probability set probability.  Handle
2067         combination in binary expressions.
2068         (tree_predict_by_opcode): Simplify code by simply calling
2069         get_predictor_value.
2070         (pass_strip_predict_hints::execute): Add handling of
2071         BUILT_IN_EXPECT_WITH_PROBABILITY.
2072         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2073         new predictor.
2074         * tree.h (DECL_BUILT_IN_P): New function.
2076 2018-08-10  Martin Liska  <mliska@suse.cz>
2078         PR tree-optimization/85799
2079         * passes.def: Add argument for pass_strip_predict_hints.
2080         * predict.c (class pass_strip_predict_hints): Add new argument
2081         early_p.
2082         (strip_predictor_early): New function.
2083         (pass_strip_predict_hints::execute): Call the function to
2084         strip predictors.
2085         (strip_predict_hints): New function.
2086         * predict.def: Fix comment.
2088 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2090         * Makefile.in: Clarify which tm.texi to copy over to assert the
2091         right to grant a GFDL license for all.
2093 2018-08-09  Jeff Law  <law@redhat.com>
2095         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2096         unused variable.
2098 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
2100         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2101         prototype.
2103 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2105         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2106         reductions for variable-length vectors.
2108 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
2110         PR other/84889
2111         * common.opt (fdiagnostics-show-line-numbers): New option.
2112         * diagnostic-show-locus.c (class layout): Add fields
2113         "m_show_line_numbers_p" and "m_linenum_width";
2114         (num_digits): New function.
2115         (test_num_digits): New function.
2116         (layout::layout): Initialize new fields.  Update m_x_offset
2117         logic to handle any left margin.
2118         (layout::print_source_line): Print line number when requested.
2119         (layout::start_annotation_line): New member function.
2120         (layout::print_annotation_line): Call it.
2121         (layout::print_leading_fixits): Likewise.
2122         (layout::print_trailing_fixits): Likewise.  Update calls to
2123         move_to_column for new parameter.
2124         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2125         it to potentially call start_annotation_line.
2126         (layout::show_ruler): Call start_annotation_line.
2127         (selftest::test_line_numbers_multiline_range): New selftest.
2128         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2129         and selftest::test_line_numbers_multiline_range.
2130         * diagnostic.c (diagnostic_initialize): Initialize
2131         show_line_numbers_p.
2132         * diagnostic.h (struct diagnostic_context): Add field
2133         "show_line_numbers_p".
2134         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2135         -fno-diagnostics-show-line-numbers.
2136         * dwarf2out.c (gen_producer_string): Add
2137         OPT_fdiagnostics_show_line_numbers to the ignored options.
2138         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2139         one setting" options.
2140         (append_compiler_options): Likewise to the dropped options.
2141         (append_diag_options): Likewise to the passed-on options.
2142         * opts.c (common_handle_option): Handle the new option.
2143         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2145 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2147         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2148         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
2149         third argument of type "const signed char" to descriptions of
2150         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2151         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2152         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2153         __builtin_bcdsub_ov functions.
2155 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2157         PR tree-optimization/86858
2158         * tree-vect-loop.c (vect_is_simple_reduction): Restore
2159         flow_bb_inside_loop_p calls.
2161 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2163         PR tree-optimization/86871
2164         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2165         instead of gimple_assign_lhs.
2167 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
2169         PR target/86887
2170         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2171         register constraint to operand 0.
2172         (add<mode>3_carryinC): Likewise.
2173         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2175 2018-08-09  Martin Liska  <mliska@suse.cz>
2177         PR c/86895
2178         * common.opt: Remove extra line.
2180 2018-08-09  Martin Liska  <mliska@suse.cz>
2182         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2183         at the end of a line, make first letter capital and end up
2184         a sentence with a dot.
2185         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2186         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2187         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2188         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2189         (PARAM_MAX_ISL_OPERATIONS): Likewise.
2190         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2191         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2192         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2193         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2194         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2195         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2196         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2197         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2198         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2199         (PARAM_TREE_REASSOC_WIDTH): Likewise.
2200         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2201         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2202         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2204 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
2206         PR target/84332
2207         * config/s390/s390.c (s390_option_override_internal): Reduce the
2208         stack-clash-protection-probe-interval param if it would be too big
2209         for z900.
2211 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
2213         PR target/46179
2214         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2215         * config/m68k/m68k.c (handle_move_double): Don't call
2216         m68k_final_prescan_insn.
2217         (m68k_adjust_decorated_operand): Renamed from
2218         m68k_final_prescan_insn, remove first and third operand and
2219         simplify.
2220         (print_operand): Call it.
2221         (print_operand_address): Call it.
2223 2018-08-08  Nathan Sidwell  <nathan@acm.org>
2225         * diagnostic.c (diagnostic_report_current_module): Use
2226         linemap_included_from & linemap_included_from_linemap.
2228 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
2230         * config/aarch64/aarch64-cores.def: Add phecda core.
2231         * config/aarch64/aarch64-tune.md: Regenerate.
2232         * doc/invoke.texi: Add phecda core.
2234 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2236         PR target/85295
2237         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2238         definitions.
2239         * config/s390/s390.md ("movti"): Add more alternatives for
2240         constant to GPR copies.
2242 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2244         * config/s390/s390.c: Fix whitespace damage throughout the file.
2245         * config/s390/s390.h: Likewise.
2246         * config/s390/tpf.h: Likewise.
2248 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2250         * config/s390/s390.c (s390_loadrelative_operand_p):
2251         Remove TARGET_CPU_ZARCH usages.
2252         (s390_rtx_costs): Likewise.
2253         (s390_legitimate_constant_p): Likewise.
2254         (s390_cannot_force_const_mem): Likewise.
2255         (legitimate_reload_constant_p): Likewise.
2256         (s390_preferred_reload_class): Likewise.
2257         (legitimize_pic_address): Likewise.
2258         (legitimize_tls_address): Likewise.
2259         (s390_split_branches): Removed.
2260         (s390_add_execute): Removed.
2261         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2262         (s390_mainpool_start): Likewise.
2263         (s390_mainpool_finish): Likewise.
2264         (s390_mainpool_cancel): Removed.
2265         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2266         (s390_chunkify_cancel): Likewise.
2267         (s390_return_addr_rtx): Likewise.
2268         (s390_register_info): Remove split_branches_pending_p uages.
2269         (s390_optimize_register_info): Likewise.
2270         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2271         split_branches_pending_p usages.
2272         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2273         (s390_load_got): Likewise.
2274         (s390_expand_split_stack_prologue): Likewise.
2275         (output_asm_nops): Likewise.
2276         (s390_function_profiler): Likewise.
2277         (s390_emit_call): Likewise.
2278         (s390_conditional_register_usage): Likewise.
2279         (s390_optimize_prologue): Likewise.
2280         (s390_reorg): Remove TARGET_CPU_ZARCH and
2281         split_branches_pending_p usages.
2282         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2283         usages.
2284         (s390_output_indirect_thunk_function): Likewise.
2285         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2286         (TARGET_CPU_ZARCH_P): Removed.
2287         (struct machine_function): Remove split_branches_pending_p.
2288         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2290 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2292         * common/config/s390/s390-common.c (processor_flags_table):
2293         Remove flags.
2294         * config.gcc: Remove with_arch/with_tune support.
2295         * config/s390/2064.md: Remove cpu attribute comparisons.
2296         * config/s390/driver-native.c (s390_host_detect_local_cpu):
2297         Remove MTN.
2298         * config/s390/linux.h (ASM_SPEC):
2299         Remove -march support.
2300         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2301         Use a table to get an arch level.
2302         * config/s390/s390-opts.h (enum processor_type):
2303         Remove enum values.
2304         * config/s390/s390.c
2305         (processor_table): Remove entries, add arch_level values.
2306         (s390_issue_rate): Remove cases.
2307         (s390_option_override): Adjust
2308         s390_option_override_internal() call.
2309         (s390_option_override_internal): Remove deprecation warning.
2310         (s390_valid_target_attribute_tree): Adjust
2311         s390_option_override_internal() call.
2312         * config/s390/s390.h (struct s390_processor):
2313         Share with s390-c.c, add arch_level field.
2314         * config/s390/s390.md:
2315         Remove occurrences in cpu attribute.
2316         * config/s390/s390.opt: Remove -march/-mtune support.
2317         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2318         * doc/invoke.texi: Remove deprecation warning.
2320 2018-08-08  Luis Machado  <luis.machado@linaro.org>
2322         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2323         global.
2324         (qdf24xx_tunings): Set vector cost structure to
2325         qdf24xx_vector_cost.
2327         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2328         <register_sextend>: Set to 3.
2330 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
2332         PR target/86838
2333         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2334         * config/aarch64/aarch64-simd.md
2335         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2336         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2337         (aarch64_frecpx<mode>): ...this new pattern.
2338         * config/aarch64/aarch64-simd-builtins.def: Remove comment
2339         about aarch64_frecp<FRECP:frecp_suffix><mode>.
2341 2018-08-07  Martin Liska  <mliska@suse.cz>
2343         PR middle-end/83023
2344         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2345         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2346         * predict.def (PRED_MALLOC_NONNULL): New predictor.
2347         * doc/extend.texi: Document that malloc attribute adds
2348         hit to compiler.
2350 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
2352         PR target/86785
2353         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2354         Define to speculation_safe_value_not_needed.
2356 2018-08-06  Jeff Law  <law@redhat.com>
2358         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2359         the vr_values instance to cprop_into_stmt.
2360         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2361         (cprop_operand): Also query EVRP to determine if OP is a constant.
2363 2018-08-06  Nathan Sidwell  <nathan@acm.org>
2365         * diagnostic.c (diagnostic_report_current_module): Reroll
2366         included-at loop.  Translate text.
2368 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
2370         * function-tests.c (selftest::test_expansion_to_rtl): Call
2371         free_after_compilation.
2373 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2375         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2377 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
2379         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2380         loops with memory block operations from getting unrolled.
2382 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
2384         PR target/86807
2385         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2386         Define to speculation_safe_value_not_needed.
2388 2018-08-06  Jeff Law  <law@redhat.com>
2390         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2391         assert.
2393 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2395         PR target/86662
2396         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2397         with all enabled __intN types.
2399         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2401 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2403         * alias.c (record_set): Check for clobber high.
2404         * cfgexpand.c (expand_gimple_stmt): Likewise.
2405         * combine-stack-adj.c (single_set_for_csa): Likewise.
2406         * combine.c (find_single_use_1): Likewise.
2407         (set_nonzero_bits_and_sign_copies): Likewise.
2408         (get_combine_src_dest): Likewise.
2409         (is_parallel_of_n_reg_sets): Likewise.
2410         (try_combine): Likewise.
2411         (record_dead_and_set_regs_1): Likewise.
2412         (reg_dead_at_p_1): Likewise.
2413         (reg_dead_at_p): Likewise.
2414         * dce.c (deletable_insn_p): Likewise.
2415         (mark_nonreg_stores_1): Likewise.
2416         (mark_nonreg_stores_2): Likewise.
2417         * df-scan.c (df_find_hard_reg_defs): Likewise.
2418         (df_uses_record): Likewise.
2419         (df_get_call_refs): Likewise.
2420         * dwarf2out.c (mem_loc_descriptor): Likewise.
2421         * haifa-sched.c (haifa_classify_rtx): Likewise.
2422         * ira-build.c (create_insn_allocnos): Likewise.
2423         * ira-costs.c (scan_one_insn): Likewise.
2424         * ira.c (equiv_init_movable_p): Likewise.
2425         (rtx_moveable_p): Likewise.
2426         (interesting_dest_for_shprep): Likewise.
2427         * jump.c (mark_jump_label_1): Likewise.
2428         * postreload-gcse.c (record_opr_changes): Likewise.
2429         * postreload.c (reload_cse_simplify): Likewise.
2430         (struct reg_use): Add source expr.
2431         (reload_combine): Check for clobber high.
2432         (reload_combine_note_use): Likewise.
2433         (reload_cse_move2add): Likewise.
2434         (move2add_note_store): Likewise.
2435         * print-rtl.c (print_pattern): Likewise.
2436         * recog.c (decode_asm_operands): Likewise.
2437         (store_data_bypass_p): Likewise.
2438         (if_test_bypass_p): Likewise.
2439         * regcprop.c (kill_clobbered_value): Likewise.
2440         (kill_set_value): Likewise.
2441         * reginfo.c (reg_scan_mark_refs): Likewise.
2442         * reload1.c (maybe_fix_stack_asms): Likewise.
2443         (eliminate_regs_1): Likewise.
2444         (elimination_effects): Likewise.
2445         (mark_not_eliminable): Likewise.
2446         (scan_paradoxical_subregs): Likewise.
2447         (forget_old_reloads_1): Likewise.
2448         * reorg.c (find_end_label): Likewise.
2449         (try_merge_delay_insns): Likewise.
2450         (redundant_insn): Likewise.
2451         (own_thread_p): Likewise.
2452         (fill_simple_delay_slots): Likewise.
2453         (fill_slots_from_thread): Likewise.
2454         (dbr_schedule): Likewise.
2455         * resource.c (update_live_status): Likewise.
2456         (mark_referenced_resources): Likewise.
2457         (mark_set_resources): Likewise.
2458         * rtl.c (copy_rtx): Likewise.
2459         * rtlanal.c (reg_referenced_p): Likewise.
2460         (single_set_2): Likewise.
2461         (noop_move_p): Likewise.
2462         (note_stores): Likewise.
2463         * sched-deps.c (sched_analyze_reg): Likewise.
2464         (sched_analyze_insn): Likewise.
2466 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2468         * cse.c (invalidate_reg): New function extracted from...
2469         (invalidate): ...here.
2470         (canonicalize_insn): Check for clobber high.
2471         (invalidate_from_clobbers): invalidate clobber highs.
2472         (invalidate_from_sets_and_clobbers): Likewise.
2473         (count_reg_usage): Check for clobber high.
2474         (insn_live_p): Likewise.
2475         * cselib.c (cselib_expand_value_rtx_1):Likewise.
2476         (cselib_invalidate_regno): Check for clobber in setter.
2477         (cselib_invalidate_rtx): Pass through setter.
2478         (cselib_invalidate_rtx_note_stores):
2479         (cselib_process_insn): Check for clobber high.
2480         * cselib.h (cselib_invalidate_rtx): Add operand.
2482 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2484         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2485         (mark_not_eliminable): Likewise.
2486         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2487         * lra-lives.c (process_bb_lives): Check for clobber high.
2488         * lra.c (new_insn_reg): Remember clobber highs.
2489         (collect_non_operand_hard_regs): Check for clobber high.
2490         (lra_set_insn_recog_data): Likewise.
2491         (add_regs_to_insn_regno_info): Likewise.
2492         (lra_update_insn_regno_info): Likewise.
2494 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2496         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2497         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2499 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2501         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2502         (copy_insn_1): Likewise.
2503         (gen_hard_reg_clobber_high): New gen function.
2504         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2505         * genemit.c (gen_exp): Likewise.
2506         (gen_emit_seq): Pass through info.
2507         (gen_insn): Check for CLOBBER_HIGH.
2508         (gen_expand): Pass through info.
2509         (gen_split): Likewise.
2510         (output_add_clobbers): Likewise.
2511         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2512         (remove_clobbers): Likewise.
2513         * rtl.h (gen_hard_reg_clobber_high): New declaration.
2515 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2517         * doc/rtl.texi (clobber_high): Add.
2518         (parallel): Add in clobber high
2519         * rtl.c (rtl_check_failed_code3): Add function.
2520         * rtl.def (CLOBBER_HIGH): Add expression.
2521         * rtl.h (RTL_CHECKC3): Add macro.
2522         (rtl_check_failed_code3): Add declaration.
2523         (XC3EXP): Add macro.
2525 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
2527         PR target/86386
2528         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2529         cfun->machine->max_used_stack_alignment if needed.
2531 2018-08-04  Martin Sebor  <msebor@redhat.com>
2533         PR tree-optimization/86571
2534         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2535         NaN output to 4.
2537 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
2539         PR target/86799
2540         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2541         Define.
2543 2018-08-03  Jeff Law  <law@redhat.com>
2545         PR target/86795
2546         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2547         Define to speculation_safe_value_not_needed.
2549 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
2551         * doc/gcov.texi (-x): Remove duplicate "to".
2552         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2553         (-Wif-not-aligned): Remove duplicate "is".
2554         (-flto): Remove duplicate "the".
2555         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2556         duplicate "v5.00.b".
2557         (MSP430 Options): Remove duplicate "and" from the description
2558         of "-mgprel-sec=regexp".
2559         (x86 Options): Remove duplicate copies of "vmldLog102" and
2560         vmlsLog104 from description of "-mveclibabi=type".
2562 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
2564         * internal-fn.h (first_commutative_argument): Declare.
2565         * internal-fn.c (first_commutative_argument): New function.
2566         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2567         restrictions for pattern statements.  Use first_commutative_argument
2568         to look for commutative operands in calls to internal functions.
2570 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
2572         * Makefile.in (wide-int-range.o): New.
2573         * tree-vrp.c: Move all the wide_int_* functions to...
2574         * wide-int-range.cc: ...here.
2575         * tree-vrp.h: Move all the wide_int_* prototypes to...
2576         * wide-int-range.h: ...here.
2578 2018-08-03  Tom de Vries  <tdevries@suse.de>
2580         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2581         UI_NONE.
2582         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2583         * except.c (output_function_exception_table): Do early exit if
2584         targetm_common.except_unwind_info (&global_options) == UI_NONE.
2586 2018-08-03  Martin Liska  <mliska@suse.cz>
2588         * predict.c (dump_prediction): Change to 2 digits
2589         in fraction part.
2591 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2593         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2594         neon_dup_q to...
2595         (falkor_am_1_gtov_gtov): ... a new insn reservation.
2597 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
2599         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2600         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2601         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2602         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2603         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2605 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
2607         * diagnostic-show-locus.c (diagnostic_show_locus): Use
2608         pp_take_prefix when saving the existing prefix.
2609         * diagnostic.c (diagnostic_append_note): Likewise.
2610         * langhooks.c (lhd_print_error_function): Likewise.
2611         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2612         param's type.  Free the existing prefix.
2613         (pp_take_prefix): New function.
2614         (pretty_printer::pretty_printer): Drop the prefix parameter.
2615         Rename the length parameter to match the comment.
2616         (pretty_printer::~pretty_printer): Free the prefix.
2617         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2618         parameter.
2619         (struct pretty_printer): Drop the "const" from "prefix" field's
2620         type and clarify memory management.
2621         (pp_set_prefix): Drop the "const" from the 2nd param.
2622         (pp_take_prefix): New decl.
2624 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2626         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2627         for word_mode_ok here instead of passing as argument.
2628         (expand_block_compare): Change select_block_compare_mode() call.
2629         (expand_strncmp_gpr_sequence): New function.
2630         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2632 2018-08-02  Jeff Law  <law@redhat.com>
2634         PR target/86790
2635         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2636         Define to speculation_safe_value_not_needed.
2638         PR target/86784
2639         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2640         Define to speculation_safe_value_not_needed.
2642 2018-08-02  Tom de Vries  <tdevries@suse.de>
2644         PR target/86660
2645         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2646         function.  Return UI_TARGET unconditionally.
2647         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2648         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2650 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2652         * genemit.c (print_overload_test): Fix typo.
2654 2018-08-02  Richard Biener  <rguenther@suse.de>
2656         PR tree-optimization/86816
2657         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2658         which checks for value availability before querying it.
2659         (gvn_uses_equal): Use it.
2660         (same_succ_hash): Likewise.
2661         (gimple_equal_p): Likewise.
2663 2018-08-02  Nick Clifton  <nickc@redhat.com>
2665         PR target/86813
2666         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2667         Define to speculation_safe_value_not_needed.
2669         PR target/86810
2670         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2671         Define to speculation_safe_value_not_needed.
2673         PR target/86810
2674         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2675         Define to speculation_safe_value_not_needed.
2677         PR target/86803
2678         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2679         Define to speculation_safe_value_not_needed.
2681         PR target/86797
2682         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2683         Define to speculation_safe_value_not_needed.
2685         PR target/86791
2686         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2687         Define to speculation_safe_value_not_needed.
2689         PR target/86789
2690         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2691         Define to speculation_safe_value_not_needed.
2693         PR target/86787
2694         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2695         Define to speculation_safe_value_not_needed.
2697         PR target/86782
2698         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2699         speculation_safe_value_not_needed.
2701         PR target/86781
2702         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2703         to speculation_safe_value_not_needed.
2705 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2707         * doc/md.texi: Expand the documentation of instruction names
2708         to mention port-local uses.  Document '@' in pattern names.
2709         * read-md.h (overloaded_instance, overloaded_name): New structs.
2710         (mapping): Declare.
2711         (md_reader::handle_overloaded_name): New member function.
2712         (md_reader::get_overloads): Likewise.
2713         (md_reader::m_first_overload): New member variable.
2714         (md_reader::m_next_overload_ptr): Likewise.
2715         (md_reader::m_overloads_htab): Likewise.
2716         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2717         m_next_overload_ptr and m_overloads_htab.
2718         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2719         (get_mode_token, get_code_token, get_int_token): New functions.
2720         (map_attr_string): Add an optional argument that passes back
2721         the associated iterator.
2722         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2723         (md_reader::handle_overloaded_name, add_overload_instance): New
2724         functions.
2725         (apply_iterators): Handle '@' names.  Report an error if '@'
2726         is used without iterators.
2727         (initialize_iterators): Initialize the new iterator_group fields.
2728         * genopinit.c (handle_overloaded_code_for)
2729         (handle_overloaded_gen): New functions.
2730         (main): Use them to print declarations of maybe_code_for_* and
2731         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2732         * genemit.c (print_overload_arguments, print_overload_test)
2733         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2734         (main): Use it to print definitions of maybe_code_for_* and
2735         maybe_gen_* functions.
2736         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2737         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2738         instead of explicit mode checks.
2739         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2740         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2741         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2742         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2743         (aarch64_expand_compare_and_swap): Likewise
2744         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2745         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2746         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2747         (aarch64_constant_pool_reload_icode): Delete.
2748         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2749         instead of aarch64_constant_pool_reload_icode.  Use
2750         code_for_aarch64_reload_mov instead of explicit mode checks.
2751         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2752         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2753         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2754         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2755         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2756         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2757         (aarch64_atomic_load_op_code): Delete.
2758         (aarch64_emit_atomic_load_op): Likewise.
2759         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2760         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
2761         instead of aarch64_emit_atomic_load_op.
2762         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2763         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2764         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2765         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2766         character before the pattern name.
2767         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2768         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2769         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2770         (aarch64_frecps<mode>): Likewise.
2771         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2772         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2773         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2774         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2775         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2777 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2779         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2780         Allow HFmode constants if TARGET_FP_F16INST.
2782 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
2784         PR target/86014
2785         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2786         No longer check last store for clobber of address register.
2788 2018-08-02  Martin Liska  <mliska@suse.cz>
2790         PR gcov-profile/86817
2791         * gcov.c (process_all_functions): New function.
2792         (main): Call it.
2793         (process_file): Move functions processing to
2794         process_all_functions.
2796 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
2798         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2799         "const" to the "gimple *" and "rtx_insn *" parameters.
2800         * dumpfile.h (dump_user_location_t::dump_user_location_t):
2801         Likewise.
2802         (dump_location_t::dump_location_t): Likewise.
2804 2018-08-01  Martin Sebor  <msebor@redhat.com>
2806         PR tree-optimization/86650
2807         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2808         rather than a "gcall *".  Directly pass the data of interest
2809         to percent_K_format, rather than building a temporary CALL_EXPR
2810         to hold it.
2811         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2812         (gimple_fold_builtin_strncat): Adjust.
2813         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2814         gcall* argument with gimple*.
2815         * gimple-ssa-warn-restrict.c (check_call): Same.
2816         (wrestrict_dom_walker::before_dom_children): Same.
2817         (builtin_access::builtin_access): Same.
2818         (check_bounds_or_overlap): Same
2819         (maybe_diag_overlap): Same.
2820         (maybe_diag_offset_bounds): Same.
2821         * tree-diagnostic.c (default_tree_printer): Move usage of
2822         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2823         to this callsite.
2824         * tree-pretty-print.c (percent_K_format): Add argument.
2825         * tree-pretty-print.h: Add argument.
2826         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2827         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2828         (maybe_diag_stxncpy_trunc): Same.
2829         (handle_builtin_stxncpy): Same.
2830         (handle_builtin_strcat): Same.
2832 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2834         * match.pd: Optimise pointer range checks.
2836 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2838         PR tree-optimization/86758
2839         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2840         to remove pattern statements.
2842 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2844         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2845         result of dfs_enumerate_from when constructing stmt_vec_infos,
2846         instead of additionally calling get_loop_body.
2848 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2850         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2851         parameter.
2852         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2853         When creating an iv, assert that the step is not known to be zero.
2854         (vect_setup_realignment): Update call accordingly.
2855         * tree-vect-stmts.c (vectorizable_store): Likewise.
2856         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
2858 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2860         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2861         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2862         (vectorizable_reduction): Likewise.
2863         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2864         (vect_detect_hybrid_slp_stmts): Likewise.
2865         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2867 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
2869         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2870         (wide_int_set_zero_nonzero_bits): ...this.
2871         (zero_nonzero_bits_from_vr): Rename to...
2872         (vrp_set_zero_nonzero_bits): ...this.
2873         (extract_range_from_multiplicative_op_1): Abstract wide int
2874         code...
2875         (wide_int_range_multiplicative_op): ...here.
2876         (extract_range_from_binary_expr_1): Extract wide int binary
2877         operations into their own functions.
2878         (wide_int_range_lshift): New.
2879         (wide_int_range_can_optimize_bit_op): New.
2880         (wide_int_range_shift_undefined_p): New.
2881         (wide_int_range_bit_xor): New.
2882         (wide_int_range_bit_ior): New.
2883         (wide_int_range_bit_and): New.
2884         (wide_int_range_trunc_mod): New.
2885         (extract_range_into_wide_ints): New.
2886         (vrp_shift_undefined_p): New.
2887         (extract_range_from_multiplicative_op): New.
2888         (vrp_can_optimize_bit_op): New.
2889         * tree-vrp.h (value_range::dump): New.
2890         (wide_int_range_multiplicative_op): New.
2891         (wide_int_range_lshift):New.
2892         (wide_int_range_shift_undefined_p): New.
2893         (wide_int_range_bit_xor): New.
2894         (wide_int_range_bit_ior): New.
2895         (wide_int_range_bit_and): New.
2896         (wide_int_range_trunc_mod): New.
2897         (zero_nonzero_bits_from_bounds): Rename to...
2898         (wide_int_set_zero_nonzero_bits): ...this.
2899         (zero_nonzero_bits_from_vr): Rename to...
2900         (vrp_set_zero_nonzero_bits): ...this.
2901         (range_easy_mask_min_max): Rename to...
2902         (wide_int_range_can_optimize_bit_op): this.
2903         * vr-values.c (simplify_bit_ops_using_ranges): Rename
2904         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2906 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2908         * tree-vectorizer.h (vect_orig_stmt): New function.
2909         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
2910         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
2911         (vect_create_epilog_for_reduction): Likewise.
2912         (vectorizable_live_operation): Likewise.
2913         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2914         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
2915         * tree-vect-stmts.c (vectorizable_call): Likewise.
2916         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2918 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2920         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
2921         argument.
2922         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
2923         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
2924         (vect_transform_loop): Likewise.
2925         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2927 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2929         * tree-vectorizer.h (vect_schedule_slp): Return void.
2930         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2931         (vect_schedule_slp): Likewise.
2933 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2935         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
2936         argument.
2937         (vect_transform_loop): Update calls accordingly.  Schedule SLP
2938         instances before the main loop, if any exist.
2940 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2942         PR tree-optimization/86749
2943         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
2944         If the lhs is used in a COND_EXPR, check that it is being used
2945         as the "then" or "else" value.
2947 2018-08-01  Tom de Vries  <tdevries@suse.de>
2949         PR target/86800
2950         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2951         speculation_safe_value_not_needed.
2953 2018-08-01  Richard Biener  <rguenther@suse.de>
2955         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
2956         as base and offset.
2958 2018-08-01  Martin Liska  <mliska@suse.cz>
2960         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
2961         format how successful transformation is dumped.
2962         (gimple_mod_pow2_value_transform): Likewise.
2963         (gimple_mod_subtract_transform): Likewise.
2964         (gimple_stringops_transform): Likewise.
2966 2018-08-01  Martin Liska  <mliska@suse.cz>
2968         PR value-prof/35543
2969         * value-prof.c (interesting_stringop_to_profile_p):
2970         Simplify the code and add BUILT_IN_MEMMOVE.
2971         (gimple_stringops_transform): Likewise.
2973 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
2975         * config/aarch64/aarch64-simd.md
2976         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2977         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2978         use GPI iterator instead of SI mode.
2980 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
2982         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2983         rs6000_speculation_barrier.
2984         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2985         new barrier pattern name.
2987 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
2989         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2990         (speculation_barrier): New insn.
2992 2018-08-01  Richard Biener  <rguenther@suse.de>
2994         PR bootstrap/86724
2995         * graphite.h: Include isl/id.h and isl/space.h to allow build
2996         with ISL 0.20.
2998 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
3000         PR target/86651
3001         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3002         mode for COFF targets.
3003         * defaults.h (TARGET_COFF): Define.
3004         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3005         TARGET_COFF): Define.
3006         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3007         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3008         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3010 2018-07-31  Alexandre Oliva <oliva@adacore.com>
3012         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3013         * gimple-streamer-out.c (output_bb): Save it.
3014         * lto-streamer-in.c (input_struct_function_base): Restore
3015         instance discriminator if available.  Create map on demand.
3016         * lto-streamer-out.c (output_struct_function_base): Save it if
3017         available.
3018         * final.c (decl_to_instance_map): Document LTO strategy.
3020 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
3021             Olivier Hainque  <hainque@adacore.com>
3023         * debug.h (decl_to_instance_map_t): New type.
3024         (decl_to_instance_map): Declare.
3025         (maybe_create_decl_to_instance_map): New inline function.
3026         * final.c (bb_discriminator, last_bb_discriminator): New statics,
3027         to track basic block discriminators.
3028         (final_start_function_1): Initialize them.
3029         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3030         bb_discriminator.
3031         (decl_to_instance_map): New variable.
3032         (map_decl_to_instance, maybe_set_discriminator): New functions.
3033         (notice_source_line): Set discriminator.
3035 2018-07-31  Ian Lance Taylor  <iant@golang.org>
3037         * targhooks.c (default_have_speculation_safe_value): Add
3038         ATTRIBUTE_UNUSED.
3040 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3042         * dump-context.h: Include "pretty-print.h".
3043         (dump_context::refresh_dumps_are_enabled): New decl.
3044         (dump_context::emit_item): New decl.
3045         (class dump_context): Add fields "m_test_pp" and
3046         "m_test_pp_flags".
3047         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3048         (temp_dump_context::get_dumped_text): New decl.
3049         (class temp_dump_context): Add field "m_pp".
3050         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3051         (dump_context::refresh_dumps_are_enabled): ...and add a test for
3052         m_test_pp.
3053         (set_dump_file): Update for above change.
3054         (set_alt_dump_file): Likewise.
3055         (dump_loc): New overload, taking a pretty_printer *.
3056         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
3057         to any test pretty-printer.
3058         (make_item_for_dump_gimple_stmt): New function, adapted from
3059         optinfo::add_gimple_stmt.
3060         (dump_context::dump_gimple_stmt): Call it, and use the result,
3061         eliminating the direct usage of dump_file and alt_dump_file in
3062         favor of indirectly using them via emit_item.
3063         (make_item_for_dump_gimple_expr): New function, adapted from
3064         optinfo::add_gimple_expr.
3065         (dump_context::dump_gimple_expr): Call it, and use the result,
3066         eliminating the direct usage of dump_file and alt_dump_file in
3067         favor of indirectly using them via emit_item.
3068         (make_item_for_dump_generic_expr): New function, adapted from
3069         optinfo::add_tree.
3070         (dump_context::dump_generic_expr): Call it, and use the result,
3071         eliminating the direct usage of dump_file and alt_dump_file in
3072         favor of indirectly using them via emit_item.
3073         (make_item_for_dump_printf_va): New function, adapted from
3074         optinfo::add_printf_va.
3075         (make_item_for_dump_printf): New function.
3076         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3077         and use the result, eliminating the direct usage of dump_file and
3078         alt_dump_file in favor of indirectly using them via emit_item.
3079         (make_item_for_dump_dec): New function.
3080         (dump_context::dump_dec): Call it, and use the result,
3081         eliminating the direct usage of dump_file and alt_dump_file in
3082         favor of indirectly using them via emit_item.
3083         (make_item_for_dump_symtab_node): New function, adapted from
3084         optinfo::add_symtab_node.
3085         (dump_context::dump_symtab_node): Call it, and use the result,
3086         eliminating the direct usage of dump_file and alt_dump_file in
3087         favor of indirectly using them via emit_item.
3088         (dump_context::begin_scope): Reimplement, avoiding direct usage
3089         of dump_file and alt_dump_file in favor of indirectly using them
3090         via emit_item.
3091         (dump_context::emit_item): New member function.
3092         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3093         Set up test pretty-printer on the underlying context.  Call
3094         refresh_dumps_are_enabled.
3095         (temp_dump_context::~temp_dump_context): Call
3096         refresh_dumps_are_enabled.
3097         (temp_dump_context::get_dumped_text): New member function.
3098         (selftest::verify_dumped_text): New function.
3099         (ASSERT_DUMPED_TEXT_EQ): New macro.
3100         (selftest::test_capture_of_dump_calls): Run all tests twice, with
3101         and then without optinfo enabled.  Add uses of
3102         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
3103         * dumpfile.h: Update comment for the dump_* API.
3104         * optinfo-emit-json.cc
3105         (selftest::test_building_json_from_dump_calls): Update for new
3106         param for temp_dump_context ctor.
3107         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3108         and "m_owned" field.
3109         (optinfo_item::~optinfo_item): Likewise.
3110         (optinfo::add_item): New member function.
3111         (optinfo::emit): Update comment.
3112         (optinfo::add_string): Delete.
3113         (optinfo::add_printf): Delete.
3114         (optinfo::add_printf_va): Delete.
3115         (optinfo::add_gimple_stmt): Delete.
3116         (optinfo::add_gimple_expr): Delete.
3117         (optinfo::add_tree): Delete.
3118         (optinfo::add_symtab_node): Delete.
3119         (optinfo::add_dec): Delete.
3120         * optinfo.h (class dump_context): New forward decl.
3121         (optinfo::add_item): New decl.
3122         (optinfo::add_string): Delete.
3123         (optinfo::add_printf): Delete.
3124         (optinfo::add_printf_va): Delete.
3125         (optinfo::add_gimple_stmt): Delete.
3126         (optinfo::add_gimple_expr): Delete.
3127         (optinfo::add_tree): Delete.
3128         (optinfo::add_symtab_node): Delete.
3129         (optinfo::add_dec): Delete.
3130         (optinfo::add_poly_int): Delete.
3131         (optinfo_item::optinfo_item): Remove "owned" param.
3132         (class optinfo_item): Remove field "m_owned".
3134 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3136         PR middle-end/86705
3137         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3138         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3139         requested variable alignment.
3140         (expand_one_ssa_partition): Likewise.
3141         (expand_one_var): Likewise.
3143 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3145         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3146         to speculation_safe_value_not_needed.
3148 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3150         * targhooks.h (speculation_safe_value_not_needed): New prototype.
3151         * targhooks.c (speculation_safe_value_not_needed): New function.
3152         * target.def (have_speculation_safe_value): Update documentation.
3153         * doc/tm.texi: Regenerated.
3155 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3157         * config/aarch64/iterators.md (ALLI_TI): New iterator.
3158         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3159         expand.
3160         (despeculate_copy<ALLI:mode>_insn): New insn.
3161         (despeculate_copyti_insn): New insn.
3162         (despeculate_simple<ALLI:mode>): New insn
3163         (despeculate_simpleti): New insn.
3164         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3165         function.
3166         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3167         aarch64_speculation_safe_value.
3168         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3170 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3172         * config/aarch64/aarch64-speculation.cc: New file.
3173         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3174         before pass_reorder_blocks.
3175         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3176         prototype.
3177         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3178         X14 and X15 when tracking speculation.
3179         * config/aarch64/aarch64.md (register name constants): Add
3180         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3181         (unspec): Add UNSPEC_SPECULATION_TRACKER.
3182         (speculation_barrier): New insn attribute.
3183         (cmp<mode>): Allow SP in comparisons.
3184         (speculation_tracker): New insn.
3185         (speculation_barrier): Add speculation_barrier attribute.
3186         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3187         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3188         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3190 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3192         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3193         aarch64_track_speculation is true.
3194         (tb<optab><mode>1): Likewise.
3195         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3196         generate CB[N]Z when tracking speculation.
3197         (aarch64_split_compare_and_swap): Likewise.
3198         (aarch64_split_atomic_op): Likewise.
3200 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3202         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3204 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3206         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3207         (speculation_barrier): New insn.
3209 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3211         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3212         * config/arm/arm.md (speculation_barrier): New expand.
3213         (speculation_barrier_insn): New pattern.
3215 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3217         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3218         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3219         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3220         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3221         list.
3222         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3223         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3224         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3225         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3226         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3227         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3228         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3229         * builtins.c (expand_speculation_safe_value): New function.
3230         (expand_builtin): Call it.
3231         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3232         * doc/extend.texi: Document __builtin_speculation_safe_value.
3233         * doc/md.texi: Document "speculation_barrier" pattern.
3234         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3235         TARGET_HAVE_SPECULATION_SAFE_VALUE.
3236         * doc/tm.texi: Regenerated.
3237         * target.def (have_speculation_safe_value, speculation_safe_value): New
3238         hooks.
3239         * targhooks.c (default_have_speculation_safe_value): New function.
3240         (default_speculation_safe_value): New function.
3241         * targhooks.h (default_have_speculation_safe_value): Add prototype.
3242         (default_speculation_safe_value): Add prototype.
3244 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3246         * dump-context.h (dump_context::dump_loc): New decl.
3247         * dumpfile.c (dump_context::dump_loc): New member function.
3248         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3249         and dump_gimple_stmt.
3250         (dump_context::dump_gimple_expr_loc): Likewise, using
3251         dump_gimple_expr.
3252         (dump_context::dump_generic_expr_loc): Likewise, using
3253         dump_generic_expr.
3254         (dump_context::dump_printf_loc_va): Likewise, using
3255         dump_printf_va.
3256         (dump_context::begin_scope): Explicitly using the global function
3257         "dump_loc", rather than the member function.
3259 2018-07-31  Martin Sebor  <msebor@redhat.com>
3261         PR tree-optimization/86741
3262         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3264 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
3266         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3267         depend on whether prefetch instructions will be emitted or not.
3268         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3269         will be emitted or not.
3270         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3271         (TARGET_SETMEM_PFD): New macros.
3273 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3275         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3276         (NULL_STMT_VEC_INFO): Delete.
3277         (stmt_vec_info::operator*): Likewise.
3278         (stmt_vec_info::operator gimple *): Likewise.
3279         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3280         of NULL_STMT_VEC_INFO.
3281         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3282         (vect_reassociating_reduction_p): Likewise.
3283         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3284         (vectorizable_store): Likewise.
3285         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3286         (vec_info::free_stmt_vec_infos): Likewise.
3288 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3290         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3291         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3293 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3295         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3296         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3297         (vec_info::free_stmt_vec_info): New private member functions.
3298         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3299         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3300         * tree-parloops.c (gather_scalar_reductions): Remove calls to
3301         set_stmt_vec_info_vec and free_stmt_vec_infos.
3302         * tree-vect-loop.c (_loop_vec_info): Remove call to
3303         set_stmt_vec_info_vec.
3304         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3305         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3306         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3307         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3308         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
3309         assignments in {vec_info::,}new_stmt_vec_info that are redundant
3310         with the clearing in the xcalloc.
3311         (stmt_vec_info_vec): Delete.
3312         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3313         (vectorize_loops): Likewise.
3314         (vec_info::~vec_info): Remove argument from call to
3315         free_stmt_vec_infos.
3316         (vec_info::add_stmt): Remove vinfo argument from call to
3317         new_stmt_vec_info.
3319 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3321         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3322         rather than a gimple stmt.
3323         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
3324         information for pattern statements when passed the original
3325         statement; instead wait to be passed the pattern statement itself.
3326         Don't call set_vinfo_for_stmt here.
3327         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3328         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3329         stmt_vec_infos here.
3330         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3331         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3332         stmt_vec_infos entry.
3334 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3336         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3337         * tree-vectorizer.c (vec_info::replace_stmt): New function.
3338         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3339         * tree-vect-stmts.c (vectorizable_call): Likewise.
3340         (vectorizable_simd_clone_call): Likewise.
3342 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3344         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3345         * tree-vectorizer.c (vec_info::remove_stmt): New function.
3346         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3347         * tree-vect-loop.c (vect_transform_loop): Likewise.
3348         * tree-vect-slp.c (vect_schedule_slp): Likewise.
3349         * tree-vect-stmts.c (vect_remove_stores): Likewise.
3351 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3353         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3354         (vect_dr_stmt): Delete.
3355         * tree-vectorizer.c (vec_info::lookup_dr): New function.
3356         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3357         of DR_VECT_AUX.
3358         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3359         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3360         (vect_verify_datarefs_alignment, vect_peeling_supportable)
3361         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3362         (vect_analyze_data_refs): Likewise.
3363         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
3364         argument.
3365         (vect_find_same_alignment_drs): Likewise.
3366         (vect_slp_analyze_node_dependences): Update calls accordingly.
3367         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3368         instead of DR_VECT_AUX.
3369         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3370         of a vector data references.  Use vec_info::lookup_dr instead of
3371         DR_VECT_AUX.
3372         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3373         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3374         instead of DR_VECT_AUX.
3376 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3378         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3379         dr_vec_info.
3380         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3381         accordingly.
3382         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3383         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3384         (vect_gen_prolog_loop_niters): Likewise.
3386 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3388         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3389         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3390         (vect_known_alignment_in_bytes, vect_dr_behavior)
3391         (vect_get_scalar_dr_size): Take references as dr_vec_infos
3392         instead of data_references.  Update calls to other routines for
3393         which the same change has been made.
3394         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3395         dr_vec_infos instead of stmt_vec_infos.
3396         (vect_analyze_data_ref_dependence): Update call accordingly.
3397         (vect_slp_analyze_data_ref_dependence)
3398         (vect_record_base_alignments): Use DR_VECT_AUX.
3399         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3400         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3401         (vector_alignment_reachable_p, vect_get_data_access_cost)
3402         (vect_peeling_supportable, vect_analyze_group_access_1)
3403         (vect_analyze_group_access, vect_analyze_data_ref_access)
3404         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3405         (vect_compile_time_alias, vect_small_gap_p)
3406         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3407         (vect_supportable_dr_alignment): Take references as dr_vec_infos
3408         instead of data_references.  Update calls to other routines for
3409         which the same change has been made.
3410         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3411         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3412         (vect_slp_analyze_and_verify_node_alignment)
3413         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3414         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3415         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
3416         above changes.
3417         (_vect_peel_info::dr): Replace with...
3418         (_vect_peel_info::dr_info): ...this new field.
3419         (vect_peeling_hash_get_most_frequent)
3420         (vect_peeling_hash_choose_best_peeling): Update accordingly.
3421         (vect_peeling_hash_get_lowest_cost):
3422         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
3423         routines for which the same change has been made.
3424         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
3425         data_reference.
3426         * tree-vect-loop-manip.c (get_misalign_in_elems)
3427         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
3428         above changes.
3429         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3430         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3431         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3432         (get_group_load_store_type, get_negative_load_store_type)
3433         (vect_get_data_ptr_increment, vectorizable_store)
3434         (vectorizable_load): Likewise.
3435         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3436         Update calls to other routines for which the same change has been made.
3438 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3440         * tree-vectorizer.h (vec_info::move_dr): New member function.
3441         (dataref_aux): Rename to...
3442         (dr_vec_info): ...this and add "dr" and "stmt" fields.
3443         (_stmt_vec_info::dr_aux): Update accordingly.
3444         (_stmt_vec_info::data_ref_info): Delete.
3445         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3446         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3447         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3448         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3449         of data_ref.
3450         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
3451         (STMT_VINFO_DR_INFO): New macro.
3452         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3453         (set_dr_misalignment): Update after rename of dataref_aux.
3454         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
3455         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3456         initialization of STMT_VINFO_DATA_REF.
3457         * tree-vectorizer.c (vec_info::move_dr): New function.
3458         * tree-vect-patterns.c (vect_recog_bool_pattern)
3459         (vect_recog_mask_conversion_pattern)
3460         (vect_recog_gather_scatter_pattern): Use it.
3461         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3462         the "dr" and "stmt" fields of dr_vec_info instead of
3463         STMT_VINFO_DATA_REF.
3465 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3467         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3468         (is_pattern_stmt_p): Use it.
3469         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3470         on pattern statements.
3472 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3474         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3475         original stmt as a stmt_vec_info rather than a gimple stmt.
3476         (vect_pattern_recog_1): Take the statement directly as a
3477         stmt_vec_info, rather than via a gimple_stmt_iterator.
3478         Update call to vect_mark_pattern_stmts.
3479         (vect_pattern_recog): Update calls accordingly.
3481 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3483         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3484         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3485         a vect_def_type for the first argument.
3486         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3487         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
3488         operand if it isn't defined by a vectorized statement.
3489         (vect_build_gather_load_calls): Remove the mask_dt argument and
3490         update calls to vect_get_vec_def_for_stmt_copy.
3491         (vectorizable_bswap): Likewise the dt argument.
3492         (vectorizable_call): Update calls to vectorizable_bswap and
3493         vect_get_vec_def_for_stmt_copy.
3494         (vectorizable_simd_clone_call, vectorizable_assignment)
3495         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3496         (vectorizable_comparison): Update calls to
3497         vect_get_vec_def_for_stmt_copy.
3498         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
3499         vect_is_simple_use.
3500         (vect_get_loop_based_defs): Remove dt argument and update call
3501         to vect_get_vec_def_for_stmt_copy.
3502         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3503         and vect_get_vec_def_for_stmt_copy.
3504         (vectorizable_load): Update calls to vect_build_gather_load_calls
3505         and vect_get_vec_def_for_stmt_copy.
3506         * tree-vect-loop.c (vect_create_epilog_for_reduction)
3507         (vectorizable_reduction, vectorizable_live_operation): Update calls
3508         to vect_get_vec_def_for_stmt_copy.
3510 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3512         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3513         and gimple stmt arguments with a stmt_vec_info.
3514         (vect_record_base_alignments): Update calls accordingly.
3515         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3516         and gimple stmt arguments with a stmt_vec_info.
3517         (vect_build_slp_tree_1): Remove vinfo argument and update call
3518         to vect_record_max_nunits.
3519         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3520         and vect_record_max_nunits.
3522 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3524         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3525         file and take a stmt_vec_info instead of a gimple stmt.
3526         (supportable_widening_operation, vect_finish_replace_stmt)
3527         (vect_finish_stmt_generation, vect_get_store_rhs)
3528         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3529         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3530         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3531         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3532         (vect_create_data_ref_ptr, bump_vector_ptr)
3533         (vect_permute_store_chain, vect_setup_realignment)
3534         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3535         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3536         (vectorizable_reduction, vectorizable_induction)
3537         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3538         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3539         than gimple stmts as arguments.
3540         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3541         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3542         (can_group_stmts_p, vect_check_gather_scatter)
3543         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3544         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3545         (vect_permute_load_chain, vect_shift_permute_load_chain)
3546         (vect_transform_grouped_load)
3547         (vect_record_grouped_load_vectors): Likewise.
3548         * tree-vect-loop.c (vect_fixup_reduc_chain)
3549         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3550         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3551         (vectorizable_reduction, vectorizable_induction)
3552         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3553         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3554         (vect_get_load_store_mask): Likewise.
3555         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3556         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3557         * tree-vect-stmts.c (vect_mark_relevant)
3558         (is_simple_and_all_uses_invariant)
3559         (exist_non_indexing_operands_for_use_p, process_use)
3560         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3561         (vect_get_vec_def_for_operand, vect_get_vec_defs)
3562         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3563         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3564         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3565         (get_negative_load_store_type, get_load_store_type)
3566         (vect_check_load_store_mask, vect_check_store_rhs)
3567         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3568         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3569         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3570         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3571         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3572         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3573         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3574         (supportable_widening_operation): Likewise.
3576 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3578         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3579         a stmt_vec_info instead of a gcall.
3580         (vect_check_gather_scatter): Update call accordingly.
3581         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3582         of a gphi.
3583         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3584         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3585         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3586         instead of a gimple stmt.
3587         (vect_transform_loop): Update calls accordingly.
3588         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3589         stmt_vec_infos instead of gimple stmts.
3590         (vect_analyze_slp_instance): Update use accordingly.
3591         * tree-vect-stmts.c (read_vector_array, write_vector_array)
3592         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3593         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3594         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3595         (vect_gen_widened_results_half, vect_get_loop_based_defs)
3596         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3597         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3598         down to subroutines.
3600 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3602         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3603         of the worklist from a vector of gimple stmts to a vector of
3604         stmt_vec_infos.
3605         * tree-vect-stmts.c (vect_mark_relevant, process_use)
3606         (vect_mark_stmts_to_be_vectorized): Likewise
3608 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3610         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3611         statement before passing it to vect_analyze_stmt.
3612         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3613         the chain of phi vector definitions.  Track the exit phi via its
3614         stmt_vec_info.
3615         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3616         STMT_VINFO_REDUC_DEF.
3617         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3618         stmt_vec_infos to handle the statement chains.
3619         (vect_get_slp_defs): Record the first statement in the node
3620         using a stmt_vec_info.
3621         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3622         statements here and pass their stmt_vec_info down to subroutines.
3623         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3624         down to vect_finish_stmt_generation.
3625         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3626         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3627         stmt_vec_infos to subroutines.
3628         (vect_remove_stores): Use stmt_vec_infos to handle the statement
3629         chains.
3631 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3633         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3634         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3635         (vect_permute_store_chain, vect_setup_realignment)
3636         (vect_permute_load_chain, vect_shift_permute_load_chain)
3637         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3638         stmts internally, and when passing values to other vectorizer routines.
3639         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3640         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3641         (vect_analyze_loop_operations, get_initial_def_for_reduction)
3642         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3643         (vectorizable_reduction, vectorizable_induction)
3644         (vectorizable_live_operation, vect_transform_loop_stmt)
3645         (vect_transform_loop): Likewise.
3646         * tree-vect-patterns.c (vect_reassociating_reduction_p)
3647         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3648         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3649         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3650         (vect_slp_analyze_node_operations_1): Likewise.
3651         * tree-vect-stmts.c (vect_mark_relevant, process_use)
3652         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3653         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3654         (vect_finish_stmt_generation_1, get_group_load_store_type)
3655         (get_load_store_type, vect_build_gather_load_calls)
3656         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3657         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3658         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3659         (vectorizable_store, vectorizable_load, vectorizable_condition)
3660         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3661         (supportable_widening_operation): Likewise.
3662         (vect_get_vector_types_for_stmt): Likewise.
3663         * tree-vectorizer.h (vect_dr_behavior): Likewise.
3665 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3667         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3668         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3669         (vect_permute_store_chain, vect_permute_load_chain)
3670         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3671         repeated stmt_vec_info lookups.
3672         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3673         (vect_update_ivs_after_vectorizer): Likewise.
3674         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3675         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3676         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3677         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3678         (vect_bb_slp_scalar_cost): Likewise.
3679         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3681 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3683         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3684         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3685         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3686         to get gassigns and gcalls, rather than operating on generc gimple
3687         stmts.
3688         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3689         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3690         (vectorizable_load, vect_analyze_stmt): Likewise.
3691         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3693 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3695         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3696         return stmt_vec_infos rather than gimple stmts.  Do not accept
3697         null arguments.
3698         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3699         of a gimple stmt.
3700         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3701         Update use of get_later_stmt.
3702         (vect_get_constant_vectors): Update call accordingly.
3703         (vect_schedule_slp_instance): Likewise
3704         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3705         (vect_slp_analyze_instance_dependence): Likewise.
3706         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3708 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3710         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3711         (stmt_info_for_cost::stmt_info): ...this new field.
3712         (add_stmt_costs): Update accordingly.
3713         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3714         (vect_get_known_peeling_cost): Likewise.
3715         (vect_estimate_min_profitable_iters): Likewise.
3716         * tree-vect-stmts.c (record_stmt_cost): Likewise.
3718 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3720         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3721         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3722         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3723         accordingly.
3724         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3726 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3728         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3729         a gimple stmt to a stmt_vec_info.
3730         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3732 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3734         * tree-vectorizer.h (vec_info::grouped_stores): Change from
3735         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3736         (_loop_vec_info::reduction_chains): Likewise.
3737         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3738         accordingly.
3739         * tree-vect-slp.c (vect_analyze_slp): Likewise.
3741 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3743         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3744         a gimple stmt to a stmt_vec_info.
3745         (_stmt_vec_info::next_element): Likewise.
3746         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3747         (vect_slp_analyze_and_verify_node_alignment)
3748         (vect_analyze_group_access_1, vect_analyze_group_access)
3749         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3750         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3751         (vect_supportable_dr_alignment): Update accordingly.
3752         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3753         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3754         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3755         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3756         * tree-vect-slp.c (vect_build_slp_tree_1)
3757         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3758         (vect_split_slp_store_group, vect_analyze_slp_instance)
3759         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3760         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3761         (get_group_load_store_type, get_load_store_type)
3762         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3763         (vect_transform_stmt, vect_remove_stores): Likewise.
3765 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3767         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3768         than a gimple stmt.
3769         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3770         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3771         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3772         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3773         (vector_alignment_reachable_p, vect_get_data_access_cost)
3774         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3775         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3776         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3777         (vect_analyze_group_access_1, vect_analyze_group_access)
3778         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3779         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3780         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3781         result of vect_dr_stmt and use the stmt_vec_info instead of
3782         the associated gimple stmt.
3783         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3784         (vect_gen_prolog_loop_niters): Likewise.
3785         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3787 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3789         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3790         to a vec<stmt_vec_info>.
3791         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3792         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3793         vec<stmt_vec_info>.
3794         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3795         to a vec<stmt_vec_info>.
3796         (bst_traits::value_type, bst_traits::value_type): Likewise.
3797         (bst_traits::hash): Update accordingly.
3798         (vect_get_and_check_slp_defs): Change the stmts parameter from
3799         a vec<gimple *> to a vec<stmt_vec_info>.
3800         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3801         (vect_build_slp_tree): Likewise.
3802         (vect_build_slp_tree_2): Likewise.  Update uses of
3803         SLP_TREE_SCALAR_STMTS.
3804         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3805         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3806         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3807         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3808         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3809         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3810         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3811         (vect_get_constant_vectors, vect_get_slp_defs)
3812         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3813         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3814         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3815         instead of gimple stmts.
3816         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3817         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3818         (vect_slp_analyze_instance_dependence): Update uses of
3819         SLP_TREE_SCALAR_STMTS.
3820         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3821         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3822         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3823         (get_initial_defs_for_reduction): Likewise.
3824         (vect_create_epilog_for_reduction): Likewise.
3825         (vectorize_fold_left_reduction): Likewise.
3826         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3827         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3828         (can_vectorize_live_stmts): Likewise.
3830 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3832         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3833         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3834         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3835         than gimple stmts.
3836         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3837         of a gimple stmt.
3838         (gather_scalar_reductions): Update after above interface changes.
3839         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3840         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3841         than gimple stmts.
3842         (vect_force_simple_reduction): Likewise.
3843         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3844         LOOP_VINFO_REDUCTIONS.
3845         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3847 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3849         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3850         a gimple stmt to a stmt_vec_info.
3851         * tree-vect-loop.c (vect_active_double_reduction_p)
3852         (vect_force_simple_reduction, vectorizable_reduction): Update
3853         accordingly.
3855 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3857         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3858         vec<gimple *> to a vec<stmt_vec_info>.
3859         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3860         the reduction_phis argument from a vec<gimple *> to a
3861         vec<stmt_vec_info>.
3862         (vectorizable_reduction): Likewise the phis local variable that
3863         is passed to vect_create_epilog_for_reduction.  Update for new type
3864         of SLP_TREE_VEC_STMTS.
3865         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3866         (vectorizable_live_operation): Likewise.
3867         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3868         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3870 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3872         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3873         a gimple stmt to a stmt_vec_info.
3874         (vectorizable_condition, vectorizable_live_operation)
3875         (vectorizable_reduction, vectorizable_induction): Pass back the
3876         vectorized statement as a stmt_vec_info.
3877         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
3878         use of STMT_VINFO_VEC_STMT.
3879         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
3880         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
3881         as stmt_vec_infos rather than gimple stmts.
3882         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
3883         to a stmt_vec_info.
3884         (vectorizable_live_operation): Likewise.
3885         (vectorizable_reduction, vectorizable_induction): Likewise,
3886         updating use of STMT_VINFO_VEC_STMT.
3887         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
3888         of STMT_VINFO_VEC_STMT.
3889         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
3890         (vectorizable_simd_clone_call, vectorizable_conversion)
3891         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3892         (vectorizable_store, vectorizable_load, vectorizable_condition)
3893         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
3894         from a gimple stmt to a stmt_vec_info.
3895         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
3896         pointer to a stmt_vec_info to the vectorizable_* routines.
3898 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3900         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
3901         a gimple stmt to a stmt_vec_info.
3902         (is_pattern_stmt_p): Update accordingly.
3903         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
3904         (vect_record_grouped_load_vectors): Likewise.
3905         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3906         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
3907         (vect_model_reduction_cost): Likewise.
3908         (vect_create_epilog_for_reduction): Likewise.
3909         (vectorizable_reduction, vectorizable_induction): Likewise.
3910         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3911         Return the stmt_vec_info for the pattern statement.
3912         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
3913         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
3914         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3915         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
3916         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3917         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
3918         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
3919         (free_stmt_vec_info, vect_is_simple_use): Likewise.
3921 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3923         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
3924         (vect_finish_stmt_generation): Likewise.
3925         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3926         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
3927         (vect_build_gather_load_calls): Use the return value of the above
3928         functions instead of a separate call to vinfo_for_stmt.  Use narrow
3929         scopes for the input gimple stmt and wider scopes for the associated
3930         stmt_vec_info.  Use vec_info::lookup_def when setting these
3931         stmt_vec_infos from an SSA_NAME definition.
3932         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3933         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3934         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3935         (vectorizable_store, vectorizable_load, vectorizable_condition)
3936         (vectorizable_comparison): Likewise.
3937         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
3938         (vectorizable_reduction): Likewise.
3940 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3942         * tree-vectorizer.h (vect_is_simple_use): Add an optional
3943         stmt_vec_info * parameter before the optional gimple **.
3944         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3945         (process_use, vect_get_vec_def_for_operand_1): Update callers.
3946         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
3947         * tree-vect-loop.c (vectorizable_reduction): Likewise.
3948         (vectorizable_live_operation): Likewise.
3949         * tree-vect-patterns.c (type_conversion_p): Likewise.
3950         (vect_look_through_possible_promotion): Likewise.
3951         (vect_recog_rotate_pattern): Likewise.
3952         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3954 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3956         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
3957         a typedef to a wrapper class.
3958         (NULL_STMT_VEC_INFO): New macro.
3959         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
3960         (stmt_vec_info::operator*): New function.
3961         (stmt_vec_info::operator gimple *): Likewise.
3962         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
3963         (add_stmt_costs): Likewise.
3964         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3965         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3966         (vect_get_known_peeling_cost): Likewise.
3967         (vect_estimate_min_profitable_iters): Likewise.
3968         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3969         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3970         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3971         (vectorizable_store, free_stmt_vec_infos): Likewise.
3972         (new_stmt_vec_info): Change return type of xcalloc to
3973         _stmt_vec_info *.
3975 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3977         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3978         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3979         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3980         a single_imm_use-based sequence.
3981         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3983 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3985         * tree-vectorizer.h (vec_info::lookup_def): Declare.
3986         * tree-vectorizer.c (vec_info::lookup_def): New function.
3987         * tree-vect-patterns.c (vect_get_internal_def): Use it.
3988         (vect_widened_op_tree): Likewise.
3989         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3990         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3991         (vectorizable_reduction): Likewise.
3992         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3993         of a gimple *.
3994         (vect_is_slp_reduction): Update calls accordingly.  Use
3995         vec_info::lookup_def.
3996         (vect_is_simple_reduction): Likewise
3997         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3999 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4001         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4002         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4003         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4004         of vinfo_for_stmt.
4005         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4006         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4007         (vect_update_vf_for_slp, vect_analyze_loop_operations)
4008         (vect_is_slp_reduction, vectorizable_induction)
4009         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4010         * tree-vect-patterns.c (vect_init_pattern_stmt):
4011         (vect_determine_min_output_precision_1, vect_determine_precisions)
4012         (vect_pattern_recog): Likewise.
4013         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4014         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4015         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4016         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4017         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4018         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
4019         info field from a loop to a loop_vec_info.
4021 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4023         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4024         (vec_info::add_stmt): Declare.
4025         * tree-vectorizer.c (vec_info::add_stmt): New function.
4026         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4027         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4028         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4029         (vectorizable_induction): Likewise.
4030         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4031         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4032         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4033         (vectorizable_load): Likewise.
4034         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4035         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4036         (vect_recog_gather_scatter_pattern): Likewise.
4037         (append_pattern_def_seq): Likewise.  Remove a check that is
4038         performed by add_stmt itself.
4040 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4042         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4043         which make_ssa_name was called with new_stmt before new_stmt
4044         had been created.
4046 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4048         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4049         split out from...
4050         (vect_is_slp_reduction): ...here...
4051         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
4052         that are already known to be false.
4054 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4056         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4057         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
4058         STMT_VINFO_NUM_SLP_USES when it's true.
4059         (vect_free_slp_instance): Add a final_p parameter and pass it to
4060         vect_free_slp_tree.
4061         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4062         (vect_analyze_slp_instance): Likewise.
4063         (vect_slp_analyze_operations): Likewise.
4064         (vect_slp_analyze_bb_1): Likewise.
4065         * tree-vectorizer.c (vec_info): Likewise.
4066         * tree-vect-loop.c (vect_transform_loop): Likewise.
4068 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4070         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4071         function is not called for second and subsequent members of
4072         a reduction group.
4074 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4076         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4077         cases for nested loops from here to ...
4078         (vect_create_epilog_for_reduction): ...here.  Only call
4079         vect_is_simple_use for inner-loop reductions.
4081 2018-07-31  Martin Liska  <mliska@suse.cz>
4083         PR gcov-profile/85338
4084         PR gcov-profile/85350
4085         PR gcov-profile/85372
4086         * profile.c (struct location_triplet): New.
4087         (struct location_triplet_hash): Likewise.
4088         (output_location): Do not output a BB that
4089         is already recorded for a line.
4090         (branch_prob): Use streamed_locations.
4092 2018-07-31  Martin Liska  <mliska@suse.cz>
4094         PR gcov-profile/85370
4095         * coverage.c (coverage_begin_function): Do not mark target
4096         clones as artificial functions.
4098 2018-07-31  Martin Liska  <mliska@suse.cz>
4100         PR gcov-profile/83813
4101         PR gcov-profile/84758
4102         PR gcov-profile/85217
4103         PR gcov-profile/85332
4104         * profile.c (branch_prob): Do not record GOTO expressions
4105         for GIMPLE statements which locations are already streamed.
4107 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4109         * gcc.c (handle_spec_function): Accept a soft_matched_part
4110         argument, as do_spec_1.  Pass it down to ...
4111         (eval_spec_function): Accept a soft_matched_part argument,
4112         and pass it down to ...
4113         (do_spec_2): Accept a soft_matched_part argument, and pass
4114         it down to do_spec_1.
4115         (do_spec_1): Pass soft_matched_part to handle_spec_function.
4116         (handle_braces): Update call to handle_spec_function.
4117         (driver::set_up_specs): Update calls to do_spec_2.
4118         (compare_debug_dump_opt_spec_function): Likewise.
4119         (compare_debug_self_opt_spec_function): Likewise.
4121 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4123         * common.opt (nolibc): New option.
4124         * doc/invoke.texi (Link Options): Document it.
4125         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4126         * config/alpha/linux.h: Likewise.
4127         * config/arc/elf.h: Likewise.
4128         * config/arm/uclinux-elf.h: Likewise.
4129         * config/arm/unknown-elf.h: Likewise.
4130         * config/avr/avrlibc.h: Likewise.
4131         * config/bfin/bfin.h: Likewise.
4132         * config/bfin/linux.h: Likewise.
4133         * config/bfin/uclinux.h: Likewise.
4134         * config/darwin.h: Likewise.
4135         * config/darwin10.h: Likewise.
4136         * config/darwin12.h: Likewise.
4137         * config/gnu-user.h: Likewise.
4138         * config/lm32/uclinux-elf.h: Likewise.
4139         * config/pa/pa-hpux11.h: Likewise.
4140         * config/pa/pa64-hpux.h: Likewise.
4141         * config/sparc/sparc.h: Likewise.
4143 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4145         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4146         undefined variables.
4148 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4150         PR target/86640
4151         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4152         instead of GEN_INT.
4154 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4156         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4157         terminated string literal.
4159 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4161         PR rtl-optimization/85160
4162         * combine.c (is_just_move): New function.
4163         (try_combine): Allow combining two instructions into two if neither of
4164         the original instructions was a move.
4166 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
4168         PR target/86673
4169         * doc/extend.texi (Global Register Variables): Discourage use of type
4170         qualifiers.
4171         (Local Register Variables): Likewise.
4173 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
4175         PR tree-optimization/86506
4176         * hwint.h (ceil_log2): Resync with hwint.c implementation.
4178 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
4180         PR target/86547
4181         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4182         hard_regno, make sure no insn between `from` and `to` clobbers it.
4184 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
4185             Tom de Vries  <tdevries@suse.de>
4187         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4188         (PTX_DEFAULT_RUNTIME_DIM): ... this.
4189         (nvptx_goacc_validate_dims): Set default worker and gang dims to
4190         PTX_DEFAULT_RUNTIME_DIM.
4191         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4193 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
4195         * config/pa/pa.c (pa_output_addr_vec): Align address table.
4196         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4197         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4199 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
4201         * config/rs6000/constraints.md (wG constraint): Delete, no longer
4202         used.
4203         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4204         predicate to reflect toc fusion has been deleted.
4205         (toc_fusion_mem_raw): Delete, no longer used.
4206         (toc_fusion_mem_wrapped): Likewise.
4207         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4208         fusion mask bit.
4209         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4210         Delete, no longer used.
4211         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4212         meant to be used for toc fusion.
4213         (rs6000_debug_print_mode): Delete toc fusion debugging.
4214         (rs6000_debug_reg_global): Likewise.
4215         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4216         fusion and secondary reload support that were never used.
4217         (rs6000_option_override_internal): Delete TOC fusion, that was only
4218         partially defined, and it did not work unless you also used the
4219         -mcmodel= switch.
4220         (rs6000_legitimate_address_p): Delete TOC fusion support.
4221         (rs6000_opt_masks): Likewise.
4222         (fusion_wrap_memory_address): Delete function, no longer used.
4223         (fusion_split_address); Delete TOC fusion support.
4224         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4225         longer used with toc fusion being deleted.
4226         (TARGET_TOC_FUSION_FP): Likewise.
4227         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4228         UNSPEC.
4229         (toc fusion spliter): Delete TOC fusion support.
4230         (toc_fusionload_<mode>): Likewise.
4231         (toc_fusionload_di): Likewise.
4232         (fusion_gpr_load_<mode>): Delete generator function, this insn no
4233         longer needs to be named.  Rename predicate to delete TOC fusion.
4234         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4235         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4236         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4237         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4238         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4240 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4242         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4243         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
4244         __int128 in built-in function prototypes.
4245         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4246         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4248 2018-07-27  Martin Sebor  <msebor@redhat.com>
4250         PR tree-optimization/86696
4251         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4252         types, including enums.
4253         (handle_char_store): Be prepared for the above function to fail.
4255 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
4257         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4258         when optimization level is lower than 2 or optimize for size.
4260 2018-07-26  Martin Sebor  <msebor@redhat.com>
4262         PR tree-optimization/86043
4263         PR tree-optimization/86042
4264         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4265         (get_string_cst_length): Rename...
4266         (get_min_string_length): ...to this.  Add argument.
4267         (handle_char_store): Extend to handle multi-character stores by
4268         MEM_REF.
4269         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
4270         * tree.h (initializer_zerop): Add argument.
4272 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
4274         PR middle-end/86660
4275         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4276         declare target to variables if they have always,{to,from,tofrom} map
4277         kinds.
4279 2018-07-26  Martin Liska  <mliska@suse.cz>
4281         PR lto/86548
4282         * lto-wrapper.c: Add linker_output as prefix
4283         for ltrans_output_file.
4285 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
4287         PR rtl-optimization/85805
4288         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4289         value for hard registers if that was written in the same mode.
4291 2018-07-26  Martin Liska  <mliska@suse.cz>
4293         PR gcov-profile/86536
4294         * gcov.c (format_gcov): Use printf format %.*f directly
4295         and do not handle special values.
4297 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4299         * common/config/arc/arc-common.c (arc_option_optimization_table):
4300         Update default optimizations for size.
4302 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4304         * config/arc/arc.md (movsf_insn): Add short instruction selection.
4305         * config/arc/constraints.md (CfZ): New constraint.
4306         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4307         (subsf3_fpu): Likewise.
4308         (cmpsf_fpu): Likewise.
4309         (cmpsf_fpu_uneq): Likewise.
4311 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4313         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4314         accesses as well.
4315         (arc_is_uncached_mem_p): uncached applies to both the variable and
4316         the pointer.
4318 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4320         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4321         register names.
4323 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
4325         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4326         field "m_scopes" from vec to auto_vec.
4328 2018-07-25  Martin Liska  <mliska@suse.cz>
4330         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4331         return type.
4333 2018-07-25  Richard Biener  <rguenther@suse.de>
4335         PR debug/86654
4336         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4337         special wrt context_die late.
4338         (gen_subprogram_die): Re-use DIEs in local scope.
4340 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
4342         PR tree-optimization/86644
4343         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
4345 2018-07-25  Martin Liska  <mliska@suse.cz>
4347         PR middle-end/86645
4348         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4349         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4351 2018-07-25  Martin Liska  <mliska@suse.cz>
4353         PR sanitizer/79635
4354         * params.def: Explain ASan abbreviation and provide
4355         a documentation link.
4357 2018-07-24  Martin Sebor  <msebor@redhat.com>
4359         PR tree-optimization/86622
4360         PR tree-optimization/86532
4361         * builtins.h (string_length): Declare.
4362         * builtins.c (c_strlen): Correct handling of non-constant offsets.
4363         (check_access): Be prepared for non-constant length ranges.
4364         (string_length): Make extern.
4365         * expr.c (string_constant): Only handle the minor non-constant
4366         array index.  Use string_constant to compute the length of
4367         a generic string constant.
4369 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
4371         PR tree-optimization/86618
4372         * tree-vect-stmts.c (vectorizable_call): Don't take the address
4373         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4375 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
4377         PR tree-optimization/86636
4378         * json.cc (json::object::set): Fix comment.  Add assertions.
4379         (json::array::append): Move here from json.h.  Add comment and an
4380         assertion.
4381         (json::string::string): Likewise.
4382         * json.h (json::array::append): Move to json.cc.
4383         (json::string::string): Likewise.
4384         * optinfo-emit-json.cc
4385         (optrecord_json_writer::impl_location_to_json): Assert that we
4386         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4387         wrapper around it.  Expand the location once, rather than three
4388         times.
4389         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4390         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4391         wrappers.
4392         (optrecord_json_writer::optinfo_to_json): Likewise, in four
4393         places.  Fix some overlong lines.
4395 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
4397         * config/aarch64/aarch64-simd.md
4398         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4399         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4400         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4401         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4402         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4403         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4404         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4405         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4406         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4408 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
4410         PR middle-end/86627
4411         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4412         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
4413         and abs_d == d, do the power of two handling if profitable.
4415 2018-07-24  Richard Biener  <rguenther@suse.de>
4417         * match.pd: Add BIT_FIELD_REF canonicalizations.
4419 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4421         PR c/86617
4422         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4424 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4426         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4427         terminated STRING_CST object.
4429 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4431         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4433 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4435         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4436         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4437         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4438         the elements into a register.
4439         (rs6000_split_v4si_init_di_reg): Delete.
4440         (rs6000_split_v4si_init): Delete.
4441         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4442         (vsx_init_v4si): Rewrite as a define_expand.
4444 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4446         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4447         zero_extend argument from memory): New.
4449 2018-07-22  Martin Sebor  <msebor@redhat.com>
4451         PR bootstrap/86621
4452         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4453         diagnosing calls with unknown arguments unless -Walloca-larger-than
4454         is restricted to less than PTRDIFF_MAX bytes.
4456 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
4458         * doc/gcov.texi (Invoking Gcov): Editorial changes.
4460 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4462         * pretty-print.c (text_info::set_location): Remove redundant
4463         "line_table" parameter from call to rich_location::set_range.
4465 2018-07-20  Martin Sebor  <msebor@redhat.com>
4467         PR middle-end/82063
4468         * builtins.c (expand_builtin_alloca): Adjust.
4469         * calls.c (alloc_max_size): Simplify.
4470         * cgraphunit.c (cgraph_node::expand): Adjust.
4471         * common.opt (larger_than_size, warn_frame_larger_than): Remove
4472         variables.
4473         (frame_larger_than_size): Same.
4474         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4475         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4476         Initialize.
4477         * doc/invoke.texi (GCC Command Options): Document option arguments.
4478         Explain byte-size arguments and suffixes.
4479         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4480         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4481         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4482         * doc/options.texi (UInteger): Expand.
4483         (Host_Wide_Int, ByteSize): Document new properties.
4484         * final.c (final_start_function_1): Include sizes in an error message.
4485         * function.c (frame_offset_overflow): Same.
4486         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4487         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4488         Diagnose unbounded alloca calls only for limits of less than
4489         PTRDIFF_MAX.
4490         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
4491         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
4492         for alloca(0).
4493         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
4494         only for limits of less than PTRDIFF_MAX.
4495         * langhooks-def.h (lhd_handle_option): Change function argument
4496         to HOST_WIDE_INT.
4497         * langhooks.c (lhd_handle_option): Same.
4498         * langhooks.h (handle_option): Same.
4499         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4500         ByteSize flags.
4501         (var_type, var_type_struct): Same.
4502         (var_set): Handle ByteSize flag.
4503         * optc-gen.awk: Add comments to output to ease debugging.  Make
4504         use of HOST_WIDE_INT where appropriate.
4505         * opts-gen-save.awk:  Use %lx to format unsigned long.
4506         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4507         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4508         arguments.  Parse bytes-size suffixes.
4509         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4510         (enum_value_to_arg): Same.
4511         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
4512         (handle_option): Adjust.
4513         (generate_option): Change function argument to HOST_WIDE_INT.
4514         (cmdline_handle_error): Adjust.
4515         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4516         (set_option): Change function argument to HOST_WIDE_INT.
4517         (option_enabled): Handle cl_host_wide_int.
4518         (get_option_state): Handle CLVC_SIZE.
4519         (control_warning_option): Same.
4520         * opts.c (common_handle_option): Change function argument to
4521         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
4522         OPT_Wvla_larger_than_.
4523         * opts.h (enum cl_var_type): Add an enumerator.
4524         * stor-layout.c (layout_decl): Print a more meaningful warning.
4525         * toplev.c (output_stack_usage): Adjust.
4527 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
4529         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4530         call to inline_expand_builtin_string_cmp.
4531         (expand_builtin_strcmp): Likewise.
4532         (expand_builtin_strncmp): Likewise.
4533         (inline_string_cmp): Delete the last parameter, change char_type_node
4534         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4535         two operands.
4536         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4537         the inlining expansion on target where the type of the call has same or
4538         narrower precision than unsigned char.
4540 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4542         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4543         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4544         * common.opt (fsave-optimization-record): New option.
4545         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4546         * doc/invoke.texi (-fsave-optimization-record): New option.
4547         * dumpfile.c: Include "optinfo-emit-json.h".
4548         (struct kv_pair): Move to coretypes.h.
4549         (optgroup_options): Make non-static.
4550         (dump_context::end_scope): Call
4551         optimization_records_maybe_pop_dump_scope.
4552         * dumpfile.h (optgroup_options): New decl.
4553         * json.cc: New file.
4554         * json.h: New file.
4555         * optinfo-emit-json.cc: New file.
4556         * optinfo-emit-json.h: New file.
4557         * optinfo.cc: Include "optinfo-emit-json.h".
4558         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4559         (optinfo_enabled_p): Check optimization_records_enabled_p.
4560         (optinfo_wants_inlining_info_p): Likewise.
4561         * optinfo.h: Update comment.
4562         * profile-count.c (profile_quality_as_string): New function.
4563         * profile-count.h (profile_quality_as_string): New decl.
4564         (profile_count::quality): New accessor.
4565         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4566         and optinfo_emit_json_cc_tests.
4567         * selftest.h (selftest::json_cc_tests): New decl.
4568         (selftest::optinfo_emit_json_cc_tests): New decl.
4569         * toplev.c: Include "optinfo-emit-json.h".
4570         (compile_file): Call optimization_records_finish.
4571         (do_compile): Call optimization_records_start.
4572         * tree-ssa-live.c: Include optinfo.h.
4573         (remove_unused_scope_block_p): Retain inlining information if
4574         optinfo_wants_inlining_info_p returns true.
4576 2018-07-20  Richard Biener  <rguenther@suse.de>
4578         PR debug/86585
4579         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4580         to cover -flto-partition=none.
4582 2018-07-20  Martin Liska  <mliska@suse.cz>
4584         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4585         (get_decl_source_range): Remove unused function.
4587 2018-07-20  Richard Biener  <rguenther@suse.de>
4589         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4590         (struct vn_phi_s): Likewise.
4591         (struct vn_reference_s): Likewise.
4592         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4593         for searching the slot of an entry known to be in the hash itself.
4594         (vn_phi_hasher::equal): Likewise.
4595         (vn_reference_hasher::equal): Likewise.
4596         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4597         globals.
4598         (optimistic_info, current_info): Remove, keeping only valid_info.
4599         (vn_reference_lookup_1): Remove fallback lookup.
4600         (vn_reference_lookup_2): Likewise.
4601         (vn_nary_op_lookup_1): Likewise.
4602         (vn_phi_lookup): Likewise.
4603         (vn_nary_build_or_lookup_1): Make sure to not chain the built
4604         hash element.
4605         (vn_reference_insert): Adjust, chain the inserted hash element
4606         at last_inserted_ref.
4607         (vn_reference_insert_pieces): Likewise.
4608         (visit_reference_op_call): Likewise.
4609         (vn_nary_op_insert_into): Chain the inserted hash element at
4610         last_inserted_nary.
4611         (vn_nary_op_insert_pieces): Adjust.
4612         (vn_nary_op_insert): Likewise.
4613         (vn_nary_op_insert_stmt): Likewise.
4614         (vn_phi_insert): Adjust, chain the inserted hash element at
4615         last_inserted_phi.
4616         (process_scc): Remove clearing and copying the optimistic
4617         table.  Instead remove elements inserted during an optimistic
4618         iteration from the single table we maintain.
4619         (init_scc_vn): Adjust.
4620         (free_scc_vn): Likewise.
4621         (sccvn_dom_walker::record_cond): Likewise.
4622         (sccvn_dom_walker::after_dom_children): Likewise.
4624 2018-07-19  Martin Sebor  <msebor@redhat.com>
4626         PR tree-optimization/84047
4627         PR tree-optimization/83776
4628         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4629         (check_array_bounds): Call it.
4631 2018-07-19  Martin Sebor  <msebor@redhat.com>
4633         * align.h (align_flags): Use member initialization.
4635 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
4637         * Makefile.in (OBJS): Add optinfo.o.
4638         * coretypes.h (class symtab_node): New forward decl.
4639         (struct cgraph_node): New forward decl.
4640         (class varpool_node): New forward decl.
4641         * dump-context.h: New file.
4642         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4643         "tree-pass.h".
4644         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4645         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4646         (set_alt_dump_file): Likewise.
4647         (dump_context::~dump_context): New dtor.
4648         (dump_gimple_stmt): Move implementation to...
4649         (dump_context::dump_gimple_stmt): ...this new member function.
4650         Add the stmt to any pending optinfo, creating one if need be.
4651         (dump_gimple_stmt_loc): Move implementation to...
4652         (dump_context::dump_gimple_stmt_loc): ...this new member function.
4653         Start a new optinfo and add the stmt to it.
4654         (dump_gimple_expr): Move implementation to...
4655         (dump_context::dump_gimple_expr): ...this new member function.
4656         Add the stmt to any pending optinfo, creating one if need be.
4657         (dump_gimple_expr_loc): Move implementation to...
4658         (dump_context::dump_gimple_expr_loc): ...this new member function.
4659         Start a new optinfo and add the stmt to it.
4660         (dump_generic_expr): Move implementation to...
4661         (dump_context::dump_generic_expr): ...this new member function.
4662         Add the tree to any pending optinfo, creating one if need be.
4663         (dump_generic_expr_loc): Move implementation to...
4664         (dump_context::dump_generic_expr_loc): ...this new member
4665         function.  Add the tree to any pending optinfo, creating one if
4666         need be.
4667         (dump_printf): Move implementation to...
4668         (dump_context::dump_printf_va): ...this new member function.  Add
4669         the text to any pending optinfo, creating one if need be.
4670         (dump_printf_loc): Move implementation to...
4671         (dump_context::dump_printf_loc_va): ...this new member function.
4672         Start a new optinfo and add the stmt to it.
4673         (dump_dec): Move implementation to...
4674         (dump_context::dump_dec): ...this new member function.  Add the
4675         value to any pending optinfo, creating one if need be.
4676         (dump_context::dump_symtab_node): New member function.
4677         (dump_context::get_scope_depth): New member function.
4678         (dump_context::begin_scope): New member function.
4679         (dump_context::end_scope): New member function.
4680         (dump_context::ensure_pending_optinfo): New member function.
4681         (dump_context::begin_next_optinfo): New member function.
4682         (dump_context::end_any_optinfo): New member function.
4683         (dump_context::s_current): New global.
4684         (dump_context::s_default): New global.
4685         (dump_scope_depth): Delete global.
4686         (dumpfile_ensure_any_optinfo_are_flushed): New function.
4687         (dump_symtab_node): New function.
4688         (get_dump_scope_depth): Reimplement in terms of dump_context.
4689         (dump_begin_scope): Likewise.
4690         (dump_end_scope): Likewise.
4691         (selftest::temp_dump_context::temp_dump_context): New ctor.
4692         (selftest::temp_dump_context::~temp_dump_context): New dtor.
4693         (selftest::verify_item): New function.
4694         (ASSERT_IS_TEXT): New macro.
4695         (ASSERT_IS_TREE): New macro.
4696         (ASSERT_IS_GIMPLE): New macro.
4697         (selftest::test_capture_of_dump_calls): New test.
4698         (selftest::dumpfile_c_tests): Call it.
4699         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4700         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4701         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4702         descriptive comment.
4703         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4704         (dump_node, dump_bb): Move these unrelated decls.
4705         (class dump_manager): Add leading comment.
4706         * optinfo.cc: New file.
4707         * optinfo.h: New file.
4709 2018-07-19  Michael Collison  <michael.collison@arm.com>
4710             Richard Henderson <rth@redhat.com>
4712         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4713         (subti): Handle op1 zero.
4714         (subvti4, usub4ti4): New.
4715         (*sub<GPI>3_compare1_imm): New.
4716         (sub<GPI>3_carryinCV): New.
4717         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4718         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4720 2018-07-19  Michael Collison  <michael.collison@arm.com>
4721             Richard Henderson <rth@redhat.com>
4723         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4724         (addti3): Create simpler code if low part is already known to be 0.
4725         (addvti4, uaddvti4): New.
4726         (*add<GPI>3_compareC_cconly_imm): New.
4727         (*add<GPI>3_compareC_cconly): New.
4728         (*add<GPI>3_compareC_imm): New.
4729         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4730         handle constants within this pattern..
4731         (*add<GPI>3_compareV_cconly_imm): New.
4732         (*add<GPI>3_compareV_cconly): New.
4733         (*add<GPI>3_compareV_imm): New.
4734         (add<GPI>3_compareV): New.
4735         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4736         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4737         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4738         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4739         with 'comparison' operator.
4740         (*add<GPI>3_compareV_cconly_imm): Ditto.
4741         (*add<GPI>3_compareV_cconly): Ditto.
4742         (*add<GPI>3_compareV_imm): Ditto.
4743         (add<GPI>3_compareV): Ditto.
4744         (add<mode>3_carryinC): Ditto.
4745         (*add<mode>3_carryinC_zero): Ditto.
4746         (*add<mode>3_carryinC): Ditto.
4747         (add<mode>3_carryinV): Ditto.
4748         (*add<mode>3_carryinV_zero): Ditto.
4749         (*add<mode>3_carryinV): Ditto.
4751 2018-07-19  Michael Collison  <michael.collison@arm.com>
4752             Richard Henderson <rth@redhat.com>
4754         * config/aarch64/aarch64-modes.def (CC_V): New.
4755         * config/aarch64/aarch64-protos.h
4756         (aarch64_addti_scratch_regs): Declare
4757         (aarch64_subvti_scratch_regs): Declare.
4758         (aarch64_expand_subvti): Declare.
4759         (aarch64_gen_unlikely_cbranch): Declare
4760         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4761         for signed overflow using CC_Vmode.
4762         (aarch64_get_condition_code_1): Handle CC_Vmode.
4763         (aarch64_gen_unlikely_cbranch): New function.
4764         (aarch64_addti_scratch_regs): New function.
4765         (aarch64_subvti_scratch_regs): New function.
4766         (aarch64_expand_subvti): New function.
4768 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4770         * config/aarch64/aarch64-option-extensions.def: New entry for profile
4771         extension.
4772         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4773         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4774         extension.
4776 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4778         PR target/83009
4779         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4780         address check not strict.
4782 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4784         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4785         Umq with Umn.
4786         (store_pair_lanes<mode>): Likewise.
4787         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4788         enum value 'ADDR_QUERY_LDP_STP_N'.
4789         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4790         (aarch64_print_address_internal): Add declaration.
4791         (aarch64_print_ldpstp_address): Remove.
4792         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4793         (aarch64_print_operand): Change printing of 'y'.
4794         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4795         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4796         'true' rather than '1'.
4797         * config/aarch64/constraints.md (Uml): Likewise.
4798         (Uml): Rename to Umn.
4799         (Umq): Remove.
4801 2018-07-19  Richard Biener  <rguenther@suse.de>
4803         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4804         a trailing array.
4805         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4806         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4807         (vn_reference_hasher): Likewise.
4808         (struct vn_tables_s): Remove obstack and alloc-pool members.
4809         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4810         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4811         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4812         (vn_reference_insert_pieces): Likewise.
4813         (alloc_vn_nary_op_noinit): Adjust.
4814         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4815         (vn_phi_eq): Adjust.
4816         (shared_lookup_phiargs): Remove.
4817         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4818         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4819         (visit_reference_op_call): Likewise.
4820         (copy_nary, copy_phi, copy_reference): Remove.
4821         (process_scc): Rewind the obstack when iterating.  Do not
4822         copy the elements to valid_info but just move them from one
4823         hashtable to the other.
4824         (allocate_vn_table): Adjust.
4825         (free_vn_table): Likewise.
4826         (init_scc_vn): Likewise.
4827         (free_scc_vn): Likewise.
4829 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
4831         PR target/86560
4832         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4833         indirect_return as function type attribute.
4834         (ix86_attribute_table): Change indirect_return to function
4835         type attribute.
4836         * doc/extend.texi: Update indirect_return attribute.
4838 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
4840         * wide-int.h (widest2_int): New.
4841         * gimple-fold.c (arith_overflowed_p): Use it.
4842         * tree.h (widest2_int_cst): New.
4843         * tree-vrp.c (wide_int_binop_overflow): Rename from
4844         vrp_int_const_binop.
4845         Rewrite to work on trees.
4846         (extract_range_from_multiplicative_op_1): Abstract code to...
4847         (wide_int_range_min_max): ...here.
4848         (wide_int_range_cross_product): ...and here.
4849         (extract_range_from_binary_expr_1): Abstract overflow code to...
4850         (wide_int_range_mult_wrapping): ...here.
4851         * tree-vrp.h (wide_int_range_cross_product): New.
4852         (wide_int_range_mult_wrapping): New.
4854 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
4855             Julia Koval  <julia.koval@intel.com>
4857         * config/i386/x86-tune-costs.h (skylake_memcpy,
4858         skylake_memset): Replace rep_prefix with unrolling for size 512.
4860 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
4862         PR middle-end/86544
4863         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4864         comparision with EQ_EXPR in last stmt.
4866 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4868         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4869         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4870         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4871         previously known as "PowerPC AltiVec Built-in Functions".  Move
4872         some material to new subsubsections "PowerPC AltiVec Built-in
4873         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4874         ISA 2.07".
4875         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
4876         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
4877         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
4878         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
4880 2018-07-18  Richard Biener  <rguenther@suse.de>
4882         PR tree-optimization/86557
4883         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
4884         EXACT_DIV_EXPR.
4886 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
4888         * config/s390/s390.c (s390_function_profiler): Generate CFI.
4890 2018-07-17  Jeff Law  <law@redhat.com>
4892         * config/arm/arm.c (get_label_padding): Update for recent
4893         changes to label_to_alignment.
4895         PR tree-optimization/86010
4896         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
4898         * config/mips/mips.c (vr4130_align_insns): Update for recent
4899         changes to label_to_alignment.
4901         * config/frv/frv.c (frv_label_align): Update for recent changes
4902         to label_to_alignment.
4904         * config/nios2/nios2.c (nios2_label_align): Update for recent
4905         changes which dropped ALIGN_LABELS_LOG.
4907 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
4909         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
4910         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
4912 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
4914         * config/arc/arc.c (arc_label_align): Use align_labels instead of
4915         deprecated align_labels_log.
4917 2018-07-17  Richard Biener  <rguenther@suse.de>
4919         PR lto/86456
4920         * dwarf2out.c (init_sections_and_labels): Always generate
4921         a debug_line_str_section for early LTO debug.
4922         (dwarf2out_finish): Reset debug_line_str_hash output early.
4923         Bump counter for extra dwarf5 .debug_loc labels to not conflict
4924         with fat LTO part.
4925         (dwarf2out_early_finish): Output debug_line_str.
4927 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
4929         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
4930         index register on z196 or later.
4932 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
4934         * config/s390/s390.c (s390_default_align): Set default function
4935         alignment to 16.
4936         (s390_override_options_after_change): Call s390_default align.
4937         (s390_option_override_internal): Call s390_default_align.
4938         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
4940 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
4942         PR middle-end/86542
4943         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
4944         to _looptemp_ clauses, other than the first two.
4946 2018-07-17  Martin Liska  <mliska@suse.cz>
4948         * opts.c: Do not enable OPT_falign_* for -Os.
4950 2018-07-17  Martin Liska  <mliska@suse.cz>
4952         * align.h (MAX_CODE_ALIGN): New.
4953         (MAX_CODE_ALIGN_VALUE): New.
4954         * common/config/i386/i386-common.c (ix86_handle_option):
4955         (MAX_CODE_ALIGN): Moved to align.h.
4956         * final.c (MAX_CODE_ALIGN): Likewise.
4957         * opts.c (parse_and_check_align_values):
4958         (MAX_CODE_ALIGN): Likewise.
4959         (MAX_CODE_ALIGN_VALUE): Likewise.
4961 2018-07-17  Martin Liska  <mliska@suse.cz>
4963         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
4964         in order to fulfil coding style.
4965         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4966         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4967         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4968         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4969         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4970         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4971         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4972         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4973         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4975 2018-07-17  Martin Liska  <mliska@suse.cz>
4977         * align.h: New file.
4978         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4979         directly.
4980         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4981         align_flags of label_to_alignment.
4982         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4983         align_flags class.
4984         * config/m68k/m68k.c: Do not use removed align_labels_value and
4985         align_loops_value.
4986         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4987         (LOOP_ALIGN): Likewise.
4988         (LABEL_ALIGN): Likewise.
4989         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4990         Remove not used macro.
4991         (rs6000_loop_align): Change return type to align_flags.
4992         (rs6000_loop_align_max_skip): Remove.
4993         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4994         Change return type to align_flags.
4995         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4996         Remove not used macro.
4997         (rs6000_loop_align):  Change return type to align_flags.
4998         (rs6000_loop_align_max_skip): Remove.
4999         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5000         * config/rx/rx-protos.h (rx_align_for_label): Make it
5001         static function.
5002         * config/rx/rx.c (rx_align_for_label): Change return type
5003         to align_flags.
5004         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5005         macro definitions.
5006         into align_flags class.
5007         (LABEL_ALIGN): Likewise.
5008         (LOOP_ALIGN): Likewise.
5009         * config/s390/s390.c (s390_label_align): Use align_flags
5010         class member.
5011         (s390_asm_output_function_label): Likewise.
5012         * config/sh/sh.c (sh_override_options_after_change):
5013         Use align_flags class directly without macros.
5014         (find_barrier): Likewise.
5015         (barrier_align): Likewise.
5016         (sh_loop_align): Likewise.
5017         * config/spu/spu.c (spu_option_override):
5018         Use align_flags_tuple::get_value instead of removed macros.
5019         (spu_sched_init): Likewise.
5020         * config/spu/spu.h (GTY): Likewise.
5021         * config/visium/visium.c (visium_option_override):
5022         Set "8" as default secondary alignment.
5023         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5024         in order to guarantee secondary alignment of 8.
5025         * coretypes.h: Include align.h header file.
5026         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5027         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5028         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5029         * doc/tm.texi.in: Likewise.
5030         * final.c (struct label_alignment): Remove not used structure.
5031         (LABEL_ALIGN): Change type to align_flags.
5032         (LOOP_ALIGN): Likewise.
5033         (JUMP_ALIGN): Likewise.
5034         (default_loop_align_max_skip): Remove.
5035         (default_label_align_max_skip): Likewise.
5036         (default_jump_align_max_skip): Likewise.
5037         (default_label_align_after_barrier_max_skip):
5038         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5039         (LABEL_TO_MAX_SKIP): Remove.
5040         (label_to_alignment): Return align_flags type instead of integer.
5041         (label_to_max_skip): Remove.
5042         (align_fuzz): Use align_flags type.
5043         (compute_alignments): Use align_flags type and use align_flags::max
5044         to combine multiple alignments.
5045         (grow_label_align): Grow vec instead of C array.
5046         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5047         (shorten_branches):  Use align_flags type and use align_flags::max
5048         to combine multiple alignments.
5049         (final_scan_insn_1): Remove usage of secondary alignment that comes
5050         from label alignment, but instead use proper secondary alignment
5051         which is computed in grow_label_align.
5052         * flags.h (struct align_flags_tuple): Move to align.h.
5053         (struct align_flags): Likewise.
5054         (state_align_loops): Rename to align_loops.
5055         (state_align_jumps): Rename to align_jumps.
5056         (state_align_labels): Rename to align_labels.
5057         (state_align_functions): Rename to align_functions.
5058         (align_loops_log): Remove.
5059         (align_jumps_log): Remove.
5060         (align_labels_log): Remove.
5061         (align_functions_log): Remove.
5062         (align_loops_max_skip): Remove.
5063         (align_jumps_max_skip): Remove.
5064         (align_labels_max_skip): Remove.
5065         (align_functions_max_skip): Remove.
5066         (align_loops_value): Remove.
5067         (align_jumps_value): Remove.
5068         (align_labels_value): Remove.
5069         (align_functions_value): Remove.
5070         * output.h (label_to_alignment): Change return type to align_flags.
5071         (label_to_max_skip): Remove.
5072         * target.def: Remove loop_align_max_skip, label_align_max_skip,
5073         jump_align_max_skip macros.
5074         * targhooks.h (default_loop_align_max_skip): Remove.
5075         (default_label_align_max_skip): Likewise.
5076         (default_jump_align_max_skip): Likewise.
5077         (default_label_align_after_barrier_max_skip): Remove.
5078         * toplev.c (read_log_maxskip): Use ::normalize function.
5079         (parse_N_M): Remove not used argument and also call ::normalize.
5080         (parse_alignment_opts): Do not pass unused arguments.
5081         * varasm.c (assemble_start_function): Use directly align_functions
5082         instead of removed macros.
5083         * system.h: Do not poison removed macros.
5085 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5087         PR middle-end/86539
5088         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5089         and cond temporaries don't have reference type if iterator has
5090         pointer type.  For init use &for_pre_body instead of pre_p if
5091         for_pre_body is non-empty.
5093 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5095         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5096         double-double modes to SFmode directly directly.
5097         (trunc<mode>sf2_fprs): Delete.
5099 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5101         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5102         for conversions between IFmode and the decimal floating point modes.
5103         (init_float128_ieee): Use the correct names for conversions between
5104         KFmode and the decimal floating point modes.
5106 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5108         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5109         for the conversions between TDmode and IFmode.
5110         (init_float128_ieee): Use more correct names for the conversions
5111         between TDmode and KFmode.
5113 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
5115         PR tree-optimization/86526
5116         * builtins.c (expand_builtin_memcmp): Formatting fixes.
5117         (inline_expand_builtin_string_cmp): Likewise.
5118         (inline_string_cmp): Likewise.  Use c_readstr instead of
5119         builtin_memcpy_read_str.  Add unit_mode temporary.
5121 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5123         PR middle-end/86528
5124         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5125         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5127 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5129         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5130         Alphabetize prototypes of built-in functions, separating out
5131         built-in functions that are listed in this section but should be
5132         described elsewhere.
5134 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
5136         PR target/86511
5137         * expmed.c (emit_store_flag): Do not emit setcc followed by a
5138         conditional move when trapping comparison was split to a
5139         non-trapping one (and vice versa).
5141 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5143         * config/s390/s390.c (s390_function_profiler): Generate nops
5144         instead of profiler call sequences.
5145         * config/s390/s390.opt: Add the new option.
5147 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5149         * config/s390/s390.c (s390_function_profiler): Generate
5150         __mcount_loc section.
5151         * config/s390/s390.opt: Add the new option.
5153 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5155         * common.opt: Add the new warning.
5156         * config/s390/s390.c (s390_function_profiler): Emit "brasl
5157         %r0,__fentry__" when -mfentry is specified.
5158         (s390_option_override_internal): Disallow -mfentry for 31-bit
5159         CPUs.
5160         * config/s390/s390.opt: Add the new option.
5162 2018-07-16  Richard Biener  <rguenther@suse.de>
5164         PR lto/86523
5165         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5166         for function-local FUNCTION_DECL and RESULT_DECL immediately.
5168 2018-07-16  Martin Liska  <mliska@suse.cz>
5170         PR ipa/86529
5171         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5172         to ::get_create.
5174 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5176         * config/arc/arcHS.md: Update ARCHS scheduling rules.
5178 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5180         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5181         for ARCHS4x.
5182         * config/arc/arc-cpus.def (hs4x): New cpu.
5183         (hs4xd): Likewise.
5184         * config/arc/arc-tables.opt: Regenerate.
5185         * config/arc/arc.c (arc_sched_issue_rate): New function.
5186         (TARGET_SCHED_ISSUE_RATE): Define.
5187         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5188         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5189         fpu_cvt.
5190         (attr tune): Add ARCHS4x tune values.
5191         (attr tune_dspmpy): Define.
5192         (*tst): Correct instruction type.
5193         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5194         * config/arc/arcHS4x.md: New file.
5195         * config/arc/fpu.md: Update instruction type attributes.
5196         * config/arc/t-multilib: Regenerate.
5198 2018-07-16  Tom de Vries  <tdevries@suse.de>
5200         PR debug/86455
5201         * var-tracking.c (vt_initialize): Fix pre_dec handling.
5203 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5205         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5206         early clobber.
5208 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
5210         PR tree-optimization/86514
5211         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5212         conversion to a boolean type from a type with greater precision.
5214 2018-07-16  Tom de Vries  <tdevries@suse.de>
5216         * var-tracking.c (vt_initialize): Print adjusted insn slim if
5217         dump_flags request TDF_SLIM.
5219 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
5221         * fold-const.c (int_const_binop_1): Abstract...
5222         (wide_int_binop): ...wide int code here.
5223         (poly_int_binop): ...poly int code here.
5224         Abstract the rest of int_const_binop_1 into int_const_binop.
5225         * fold-const.h (wide_int_binop): New.
5226         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5227         Remove useless PLUS/MINUS_EXPR case.
5228         (zero_nonzero_bits_from_vr): Move wide int code...
5229         (zero_nonzero_bits_from_bounds): ...here.
5230         (extract_range_from_binary_expr_1): Move mask optimization code...
5231         (range_easy_mask_min_max): ...here.
5232         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5233         (range_easy_mask_min_max): New.
5235 2018-07-15  Jeff Law  <law@redhat.com>
5237         PR target/85993
5238         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5239         block.
5241 2018-07-14  Jim Wilson  <jimw@sifive.com>
5243         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5245 2018-07-14  Paul Koning  <ni1d@arrl.net>
5247         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5249 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
5251         * lto-streamer-out.c (copy_function_or_variable): Dump info about
5252         copying section.
5254 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
5255             Steve Munroe  <munroesj52@gmail.com>
5257         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5258         (_mm_andnot_si128): Likewise.
5259         (_mm_or_si128): Likewise.
5260         (_mm_xor_si128): Likewise.
5262 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
5264         PR middle-end/78809
5265         * builtins.c (expand_builtin_memcmp): Inline the calls first
5266         when result_eq is false.
5267         (expand_builtin_strcmp): Inline the calls first.
5268         (expand_builtin_strncmp): Likewise.
5269         (inline_string_cmp): New routine. Expand a string compare
5270         call by using a sequence of char comparison.
5271         (inline_expand_builtin_string_cmp): New routine. Inline expansion
5272         a call to str(n)cmp/memcmp.
5273         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5274         New option.
5275         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5277 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
5279         * config/arm/driver-arm.c: Include arm-native.h.
5280         (host_detect_local_cpu): Use auto-generated data tables.
5281         (vendors, arm_cpu_table): Delete.  Move part information to ...
5282         * config/arm/arm-cpus.in: ... here.
5283         * config/arm/parsecpu.awk (gen_native): New function.
5284         (vendor, part): New CPU fields.
5285         (END): Add support for building the native CPU detection tables.
5286         * config/arm/t-arm (arm-native.h): Add build rule.
5287         (driver-arm.o): Add dependency on arm-native.h.
5289 2018-07-13  Richard Biener  <rguenther@suse.de>
5291         PR middle-end/85974
5292         * match.pd (addr1 - addr2): Allow either of the operand to
5293         have a conversion.
5295 2018-07-13  Tom de Vries  <tdevries@suse.de>
5297         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5298         in remap_ssa_name.
5300 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
5302         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5303         arrays instead of numbered variables.
5305 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
5307         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5308         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5310 2018-07-13  Richard Biener  <rguenther@suse.de>
5312         PR debug/86452
5313         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5314         instead of get_context_die.
5316 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
5317             Richard Biener  <rguenther@suse.de>
5319         PR middle-end/86489
5320         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5321         that the loop latch destination where phi is defined.
5323 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
5325         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5326         (riscv_expand_epilogue): Add assertion to check interrupt mode.
5327         (riscv_set_current_function): Extract getting interrupt type to new
5328         function.
5329         (riscv_get_interrupt_type): New function.
5330         (riscv_merge_decl_attributes): New function, checking interrupt type is
5331         same.
5332         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5334 2018-07-12  Paul Koning  <ni1d@arrl.net>
5336         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5337         directive.
5339 2018-07-12  Paul Koning  <ni1d@arrl.net>
5341         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5342         zero reference, add doloop_end instead.
5343         * doc/md.texi (decrement_and_branch_until_zero): Remove.
5344         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
5345         detail for doloop_end.
5347 2018-07-12  Martin Sebor  <msebor@redhat.com>
5349         PR c/86453
5350         * attribs.c (decl_attributes): Reject conflicting attributes before
5351         calling attribute handlers.
5353 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5355         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5356          parameter.
5357         (gcc::dump_manager::get_dump_file_name): likewise.
5358         (dump_begin): Likewise.
5359         * dumpfile.h (dump_begin): Update prototype.
5360         (gcc::dump_manager::get_dump_file_name,
5361         gcc::dump_manager::get_dump_file_name): Update prototype.
5363 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5365         * internal-fn.h (vectorizable_internal_fn_p): New function.
5366         * tree-vect-slp.c (compatible_calls_p): Likewise.
5367         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
5368         to internal functions.
5369         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5371 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5373         * fold-const.h (inverse_conditions_p): Declare.
5374         * fold-const.c (inverse_conditions_p): New function.
5375         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
5376         that test the inverse condition of a conditional internal function.
5377         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5378         * internal-fn.c (internal_fn_mask_index): Handle conditional
5379         internal functions.
5380         (vectorized_internal_fn_supported_p): New function.
5381         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5382         (any_pred_load_store): Replace with...
5383         (need_to_predicate): ...this new variable.
5384         (redundant_ssa_names): New variable.
5385         (ifcvt_can_use_mask_load_store): Move initial checks to...
5386         (ifcvt_can_predicate): ...this new function.  Handle tree codes
5387         for which a conditional internal function exists.
5388         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5389         instead of ifcvt_can_use_mask_load_store.  Update after variable
5390         name change.
5391         (predicate_load_or_store): New function, split out from
5392         predicate_mem_writes.
5393         (check_redundant_cond_expr): New function.
5394         (value_available_p): Likewise.
5395         (predicate_rhs_code): Likewise.
5396         (predicate_mem_writes): Rename to...
5397         (predicate_statements): ...this.  Use predicate_load_or_store
5398         and predicate_rhs_code.
5399         (combine_blocks, tree_if_conversion): Update after above name changes.
5400         (ifcvt_local_dce): Handle redundant_ssa_names.
5401         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5402         general conditional functions.
5403         * tree-vect-stmts.c (vectorizable_call): Likewise.
5405 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5406             Alan Hayward  <alan.hayward@arm.com>
5407             David Sherwood  <david.sherwood@arm.com>
5409         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5410         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5411         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5412         plus and minus and convert them into IFN_COND_FMA-based sequences.
5413         (convert_mult_to_fma): Handle conditional plus and minus.
5415 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5417         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5418         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5419         (cond_fnms_optab): New optabs.
5420         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5421         internal functions.
5422         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5423         * internal-fn.h (get_conditional_internal_fn): Declare.
5424         (get_unconditional_internal_fn): Likewise.
5425         * internal-fn.c (cond_ternary_direct): New macro.
5426         (expand_cond_ternary_optab_fn): Likewise.
5427         (direct_cond_ternary_optab_supported_p): Likewise.
5428         (FOR_EACH_COND_FN_PAIR): Likewise.
5429         (get_conditional_internal_fn): New function.
5430         (get_unconditional_internal_fn): Likewise.
5431         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5432         (gimple_match_op::gimple_match_op): Add a new overload for 5
5433         operands.
5434         (gimple_match_op::set_op): Likewise.
5435         (gimple_resimplify5): Declare.
5436         * genmatch.c (decision_tree::gen): Generate simplifications for
5437         5 operands.
5438         * gimple-match-head.c (gimple_simplify): Define an overload for
5439         5 operands.  Handle calls with 5 arguments in the top-level overload.
5440         (convert_conditional_op): Handle conversions from unconditional
5441         internal functions to conditional ones.
5442         (gimple_resimplify5): New function.
5443         (build_call_internal): Pass a fifth operand.
5444         (maybe_push_res_to_seq): Likewise.
5445         (try_conditional_simplification): Try converting conditional
5446         internal functions to unconditional internal functions.
5447         Handle 3-operand unconditional forms.
5448         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5449         Define ternary equivalents of the current rules for binary conditional
5450         internal functions.
5451         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5452         ternary operations.
5453         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5454         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5455         (optab): Handle them.
5456         (SVE_COND_FP_TERNARY): New int iterator.
5457         (sve_fmla_op, sve_fmad_op): New int attributes.
5458         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5459         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5460         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5462 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5464         * target.def (preferred_else_value): New target hook.
5465         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5466         * doc/tm.texi: Regenerate.
5467         * targhooks.h (default_preferred_else_value): Declare.
5468         * targhooks.c (default_preferred_else_value): New function.
5469         * internal-fn.h (conditional_internal_fn_code): Declare.
5470         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5471         (get_conditional_internal_fn): Use it.
5472         (conditional_internal_fn_code): New function.
5473         * gimple-match.h (gimple_match_cond): New struct.
5474         (gimple_match_op): Add a cond member function.
5475         (gimple_match_op::gimple_match_op): Update all forms to take a
5476         gimple_match_cond.
5477         * genmatch.c (expr::gen_transform): Use the same condition as res_op
5478         for the suboperation, but don't specify a particular else_value.
5479         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5480         (visit_nary_op, visit_reference_op_load): Pass
5481         gimple_match_cond::UNCOND to the gimple_match_op constructor.
5482         * gimple-match-head.c: Include tree-eh.h
5483         (convert_conditional_op): New function.
5484         (maybe_resimplify_conditional_op): Likewise.
5485         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5486         (gimple_resimplify2): Likewise.
5487         (gimple_resimplify3): Likewise.
5488         (gimple_resimplify4): Likewise.
5489         (maybe_push_res_to_seq): Return null for conditional operations.
5490         (try_conditional_simplification): New function.
5491         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
5492         constructor.
5493         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5494         IFN_COND_* call.
5495         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5496         function.
5497         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5499 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5501         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5502         DECL_FCONTEXT
5503         (hash_tree): Do not hash DECL_FCONTEXT
5504         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5505         Do not stream DECL_FCONTEXT.
5506         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5507         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5509 2018-07-12  Richard Biener  <rguenther@suse.de>
5511         PR debug/86462
5512         * dwarf2out.c (gen_block_die): Only output blocks when they have
5513         at least one !DECL_IGNORED_P variable.
5515 2018-07-12  Richard Biener  <rguenther@suse.de>
5517         PR target/84829
5518         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5519         Remove -mieee-fp handling.
5521 2018-07-12  Richard Biener  <rguenther@suse.de>
5523         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5524         left-over from last patch.
5526 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
5528         PR tree-optimization/86492
5529         * gimple-ssa-store-merging.c
5530         (imm_store_chain_info::coalesce_immediate_stores): Call
5531         check_no_overlap even for the merge_overlapping case.  Formatting fix.
5533 2018-07-12  Richard Biener  <rguenther@suse.de>
5535         PR middle-end/86479
5536         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5537         move possibly trapping operations into the conditional.
5539 2018-07-12  Richard Biener  <rguenther@suse.de>
5541         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5542         (vn_lookup_simplify_result): Remove recursion limit applied
5543         here.
5544         (vn_nary_build_or_lookup_1): Adjust.
5545         (try_to_simplify): Likewise.
5546         * gimple-match-head.c (gimple_resimplify1): Instead apply one
5547         here.
5548         (gimple_resimplify2): Likewise.
5549         (gimple_resimplify3): Likewise.
5550         (gimple_resimplify4): Likewise.
5552 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
5554         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5555         Use __mmask64 type instead of __mmask8 for __M argument.
5556         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5557         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5558         __U argument.
5559         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5560         __mmask16 for __M argument.
5561         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5562         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5563         to __mmask16 instead of __mmask8.
5564         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5565         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5566         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5567         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5568         instead of __mmask16 for __U argument.
5569         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5570         __mmask16 instead of __mmask8 for __U argument.
5571         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5572         __U argument.
5573         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5574         __mmask16.
5575         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5576         argument.
5577         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5578         __U argument.
5579         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5580         __mmask16.
5581         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5582         of __mmask16.
5583         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5584         __U argument.
5585         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5586         __U argument.
5587         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5588         __U argument.
5589         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5590         __U argument.
5591         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5592         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5593         return type as well as __M argument type and all casts from __mmask8
5594         to __mmask32.
5595         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5596         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5597         return type as well as __M argument type and all casts from __mmask8
5598         to __mmask16.
5599         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5600         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5601         return type as well as __M argument type and all casts from __mmask8
5602         to __mmask32.
5603         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5604         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5605         return type as well as __M argument type and all casts from __mmask8
5606         to __mmask16.
5607         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5608         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5609         __mmask16.
5611 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
5613         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5614         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5615         for __U argument.
5617 2018-07-11  Paul Koning  <ni1d@arrl.net>
5619         * doc/md.texi (define_subst): Document how multiple occurrences of
5620         the same argument in the replacement pattern are handled.
5622 2018-07-11  Paul Koning  <ni1d@arrl.net>
5624         * doc/extend.texi (Common Variable Attributes): Move "mode" into
5625         alphabetical order.
5626         (Common Type Attributes): Add "mode" attribute.
5628 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
5630         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5631         stream DECL_ORIGINAL_TYPE.
5632         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5633         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5634         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5635         Do not walk original type.
5636         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5637         external decls.
5638         (write_ts_decl_non_common_tree_pointers): Do not stream
5639         DECL_ORIGINAL_TYPE
5640         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5641         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5643 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
5645         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5646         thread twice from the same starting edge.
5648 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
5650         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5651         * gimple.c (gimple_call_nonnull_result_p): ...here...
5652         (gimple_call_nonnull_arg): ...and here.
5653         * gimple.h (gimple_call_nonnull_result_p): New.
5654         (gimple_call_nonnull_arg): New.
5656 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
5658         * config/arm/arm-cpus.in: Move information from fpu field of each
5659         cpu definition to the isa field.
5660         * config/arm/parsecpu.awk (fpu): Delete match rule.
5661         (gen_comm_data): Don't add bits from the CPU's FPU entry.
5663 2018-07-11  Richard Biener  <rguenther@suse.de>
5665         PR debug/86457
5666         * dwarf2out.c (init_sections_and_labels): Use
5667         output_asm_line_debug_info consistently.
5668         (dwarf2out_early_finish): Likewise.
5669         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5670         type units.
5672 2018-07-11  Richard Biener  <rguenther@suse.de>
5674         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5675         Rework father_bb setting in a way to avoid propagating constants
5676         multiple times on a loop body.
5678 2018-07-10  Mark Wielaard  <mark@klomp.org>
5680         PR debug/86459
5681         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5683 2018-07-10  Richard Biener  <rguenther@suse.de>
5685         * hash-map.h (hash_map::iterator::operator*): Return
5686         references to key and value.
5688 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
5690         PR c++/86443
5691         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5692         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5693         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5694         (gimplify_omp_for): For composite loops, move outer
5695         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5696         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
5697         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
5698         TREE_LIST for both the original class iterator and the "last" helper
5699         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
5700         loop, remember has_decl_expr from outer composite loops for the
5701         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5703 2018-07-09  Martin Sebor  <msebor@redhat.com>
5705         PR middle-end/77357
5706         PR middle-end/86428
5707         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5708         accessing implicitly initialized array elements.
5709         * expr.c (string_constant): Handle string initializers of
5710         character arrays within aggregates.
5711         * gimple-fold.c (fold_array_ctor_reference): Add argument.
5712         Store element offset.  As a special case, handle zero size.
5713         (fold_nonarray_ctor_reference): Same.
5714         (fold_ctor_reference): Add argument.  Store subobject offset.
5715         * gimple-fold.h (fold_ctor_reference): Add argument.
5717 2018-07-09  Paul Koning  <ni1d@arrl.net>
5719         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5720         (pdp11_insn_cost): New function.
5721         (pdp11_md_asm_adjust): New function.
5722         (TARGET_INVALID_WITHIN_DOLOOP): Define.
5723         (pdp11_rtx_costs): Update to match machine better.
5724         (output_addr_const_pdp11): Correct format mismatch warnings.
5725         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5726         * config/pdp11/pdp11.md: General change to add base_cost and/or
5727         length attributes for use by new pdp11_insn_cost function.
5728         (MIN_BRANCH): Correct definition.
5729         (MIN_SOB): Ditto.
5730         (doloop_end): Use standard pattern name for looping pattern.
5731         (doloop_end_nocc): New.
5732         (movsf): Add another constraint alternative.
5733         (zero_extendqihi2): Add constraint alternatives for not in place
5734         extend.
5735         (zero_extendhisi2): Remove.
5736         (shift patterns): Add CC handling variants.
5737         (bswaphi2): New.
5738         (bswapsi2): New.
5739         (rothi3): New.
5740         (define_peephole2): New peephole to recognize mov that sets CC for
5741         subsequent test.
5743 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5745         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5746         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5747         wi::add.
5749 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
5751         PR c/86420
5752         * real.c (real_nextafter): Return true if result is denormal.
5754 2018-07-09  Martin Liska  <mliska@suse.cz>
5756         * common.opt: Add back wrongly removed attribute.
5758 2018-07-09  Richard Biener  <rguenther@suse.de>
5760         PR debug/86413
5761         * dwarf2out.c (gen_block_die): For an early generated DIE
5762         always output high/low PC attributes.
5764 2018-07-09  Tom de Vries  <tdevries@suse.de>
5766         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5767         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5768         onto VAR_DECL with abstract origin.
5770 2018-07-07  Jim Wilson  <jimw@sifive.com>
5772         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5774 2018-07-07  Tom de Vries  <tdevries@suse.de>
5776         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5778 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
5780         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5781         overflow_type.
5782         (combine_bound): Use wide-int overflow calculation instead of
5783         rolling our own.
5784         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5785         overflow_type.
5786         * fold-const.c (int_const_binop_2): Same.
5787         (extract_muldiv_1): Same.
5788         (fold_div_compare): Same.
5789         (fold_abs_const): Same.
5790         * match.pd: Same.
5791         * poly-int.h (add): Same.
5792         (sub): Same.
5793         (neg): Same.
5794         (mul): Same.
5795         * predict.c (predict_iv_comparison): Same.
5796         * profile-count.c (slow_safe_scale_64bit): Same.
5797         * simplify-rtx.c (simplify_const_binary_operation): Same.
5798         * tree-chrec.c (tree_fold_binomial): Same.
5799         * tree-data-ref.c (split_constant_offset_1): Same.
5800         * tree-if-conv.c (idx_within_array_bound): Same.
5801         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5802         * tree-ssa-phiopt.c (minmax_replacement): Same.
5803         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5804         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5805         * vr-values.c (vr_values::adjust_range_with_scev): Same.
5806         * wide-int.cc (wi::add_large): Same.
5807         (wi::mul_internal): Same.
5808         (wi::sub_large): Same.
5809         (wi::divmod_internal): Same.
5810         * wide-int.h: Change overflow type to overflow_type for neg, add,
5811         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5812         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5813         mul_internal, divmod_internal.
5814         (overflow_type): New enum.
5815         (accumulate_overflow): New.
5817 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
5819         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5820         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5822 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5824         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5825         argument is checked for zero before entering loop, avoid checking again.
5827 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5829         * gimplify.h (generic_expr_could_trap_p): Set as global function.
5830         * gimplify.h (generic_expr_could_trap_p): Likwise.
5831         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5833 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
5835         PR tree-optimization/86401
5836         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5837         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5838         (fold_bit_and_mask): ... here.  New helper function for match.pd.
5839         * fold-const.h (fold_bit_and_mask): Declare.
5840         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5842 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
5844         PR target/86324
5845         * target.def (translate_mode_attribute): New hook.
5846         * targhooks.h (default_translate_mode_attribute): Declare.
5847         * targhooks.c (default_translate_mode_attribute): New function.
5848         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5849         * doc/tm.texi: Regenerate.
5850         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5851         (rs6000_translate_mode_attribute): New function.
5853 2018-07-06  Paul Koning  <ni1d@arrl.net>
5855         * doc/md.texi (define_split): Document DONE and FAIL.
5856         (define_peephole2): Ditto.
5858 2018-07-05  Jeff Law  <law@redhat.com>
5860         PR tree-optimization/86010
5861         * tree-ssa-dse.c (compute_trims): More aggressively trim at
5862         both the head and tail of mem* and str* calls.
5864 2018-07-05  Jim Wilson  <jimw@sifive.com>
5866         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5868 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
5870         * config/aarch64/aarch64-simd.md: correct flags text for
5871         MIN_EXPR replacement.
5873 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
5875         * configure: Regenerated.
5877 2018-07-05  Carl Love  <cel@us.ibm.com>
5879         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
5880         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
5881         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
5882         VSX_BUILTIN_DOUBLEL_V4SF.
5884 2018-07-05  Martin Sebor  <msebor@redhat.com>
5886         PR c++/86400
5887         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
5888         than its domain to compute its the upper bound of a char array.
5890 2018-07-05  Nathan Sidwell  <nathan@acm.org>
5892         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
5893         * doc/cpp.texi: Update comment.
5894         * doc/tm.texi: Rebuilt.
5895         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
5896         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
5897         * doc/extend.texi (Backwards Compatibility): Clarify it is system
5898         headers affected by extern "C".
5899         * system.h: Poison NO_IMPLICIT_EXTERN_C.
5900         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
5901         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
5902         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
5903         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
5904         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
5905         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
5906         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
5907         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
5908         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
5909         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
5910         config/sparc/sp64-elf.h, config/spu/spu.h,
5911         config/stormy16/stormy16.h, config/v850/v850.h,
5912         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
5913         define NO_IMPLICIT_EXTERN_C.
5914         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
5916 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5918         PR target/84711
5919         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5920         instead of GET_MODE_SIZE when comparing Units.
5922 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5924         PR target/84711
5925         * rtlanal.c (set_noop_p): Constrain on mode change,
5926         include hard-reg-set.h
5928 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
5930         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
5932 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
5934         Revert
5935         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
5937         PR sanitizer/84250
5938         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5939         libasan.
5940         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5942 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
5944         PR sanitizer/84250
5945         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
5946         libasan.
5947         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
5949 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
5951         PR middle-end/86380
5952         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
5954 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
5956         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
5957         neg_*_op* variables.
5959 2018-07-04  Martin Liska  <mliska@suse.cz>
5961         * tree-switch-conversion.c: Define
5962         max_ratio_for_speed and max_ratio_for_size constants.
5964 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
5965             Martin Liska  <mliska@suse.cz>
5967         PR middle-end/66240
5968         PR target/45996
5969         PR c/84100
5970         * common.opt: Rename align options with 'str_' prefix.
5971         * common/config/i386/i386-common.c (set_malign_value): New
5972         function.
5973         (ix86_handle_option): Use it to set -falign-* options/
5974         * config/aarch64/aarch64-protos.h (struct tune_params): Change
5975         type from int to string.
5976         * config/aarch64/aarch64.c: Update default values from int
5977         to string.
5978         * config/alpha/alpha.c (alpha_override_options_after_change):
5979         Likewise.
5980         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5981         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5982         max skip conditionally.
5983         * config/i386/freebsd.h (SUBALIGN_LOG): New.
5984         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5985         max skip conditionally.
5986         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5987         max skip conditionally.
5988         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5989         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5990         max skip conditionally.
5991         * config/i386/i386.c (struct ptt): Change type from int to
5992         string.
5993         (ix86_default_align): Set default values.
5994         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5995         max skip conditionally.
5996         * config/i386/iamcu.h (SUBALIGN_LOG): New.
5997         (ASM_OUTPUT_MAX_SKIP_ALIGN):
5998         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5999         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6000         max skip conditionally.
6001         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6002         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6003         * config/i386/x86-64.h (SUBALIGN_LOG): New.
6004         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6005         max skip conditionally.
6006         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6007         * config/ia64/ia64.c (ia64_option_override): Set default values
6008         for alignment options.
6009         * config/m68k/m68k.c: Handle new str_align_* options.
6010         * config/mips/mips.c (mips_set_compression_mode): Change
6011         type of constants.
6012         (mips_option_override): Set default values for options.
6013         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6014         Likewise.
6015         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6016         Likewise.
6017         * config/rx/rx.c (rx_option_override): Likewise.
6018         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6019         (LABEL_ALIGN): Use align_labels_log.
6020         (LOOP_ALIGN): Use align_loops_align.
6021         * config/s390/s390.c (s390_asm_output_function_label): Use new
6022         macros.
6023         * config/sh/sh.c (sh_override_options_after_change):
6024         Change type of constants.
6025         * config/spu/spu.c (spu_sched_init): Likewise.
6026         * config/sparc/sparc.c (sparc_option_override): Set default
6027         values for options.
6028         * config/visium/visium.c (visium_option_override): Likewise.
6029         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6030         emit p2align format with last argument if it's not needed.
6031         * doc/invoke.texi: Document extended format of -falign-*.
6032         * final.c: Use align_labels alignment.
6033         * flags.h (struct target_flag_state): Change type to use
6034         align_flags.
6035         (struct align_flags_tuple): New.
6036         (struct align_flags): Likewise.
6037         (align_loops_log): Redefine macro to use new types.
6038         (align_loops_max_skip): Redefine macro to use new types.
6039         (align_jumps_log): Redefine macro to use new types.
6040         (align_jumps_max_skip): Redefine macro to use new types.
6041         (align_labels_log): Redefine macro to use new types.
6042         (align_labels_max_skip): Redefine macro to use new types.
6043         (align_functions_log): Redefine macro to use new types.
6044         (align_loops): Redefine macro to use new types.
6045         (align_jumps): Redefine macro to use new types.
6046         (align_labels): Redefine macro to use new types.
6047         (align_functions): Redefine macro to use new types.
6048         (align_functions_max_skip): Redefine macro to use new types.
6049         (align_loops_value): New macro.
6050         (align_jumps_value): New macro.
6051         (align_labels_value): New macro.
6052         (align_functions_value): New macro.
6053         * function.c (invoke_set_current_function_hook): Propagate
6054         alignment values from flags to global variables default in
6055         topleev.h.
6056         * ipa-icf.c (sem_function::equals_wpa): Use
6057         cl_optimization_option_eq instead of memcmp.
6058         * lto-streamer.h (cl_optimization_stream_out): Support streaming
6059         of string types.
6060         (cl_optimization_stream_in): Likewise.
6061         * optc-save-gen.awk: Support strings in cl_optimization.
6062         * opth-gen.awk: Likewise.
6063         * opts.c (finish_options): Remove error checking of invalid
6064         value ranges.
6065         (MAX_CODE_ALIGN): Remove.
6066         (MAX_CODE_ALIGN_VALUE): Likewise.
6067         (parse_and_check_align_values): New function.
6068         (check_alignment_argument): Likewise.
6069         (common_handle_option): Use check_alignment_argument.
6070         * opts.h (parse_and_check_align_values): Declare.
6071         * toplev.c (init_alignments): Remove.
6072         (read_log_maxskip): New.
6073         (parse_N_M): Likewise.
6074         (parse_alignment_opts): Likewise.
6075         (backend_init_target): Remove usage of init_alignments.
6076         * toplev.h (parse_alignment_opts): Declare.
6077         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6078         argument.
6079         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6080         * tree.c (cl_option_hasher::equal): New.
6081         * varasm.c: Use new global macros.
6083 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6085         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6086         Use a simpler align directive also if MAXSKIP = ALIGN-1.
6087         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6088         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6089         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6090         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6091         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6092         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6093         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6094         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6095         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6096         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6097         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6099 2018-07-04  Martin Liska  <mliska@suse.cz>
6100             Jonathan Wakely  <jwakely@redhat.com>
6102         * coverage.c: Use correct type.
6103         * doc/invoke.texi: Language correction.
6105 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
6107         PR target/85620
6108         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6109         ENDBRANCH for non-tail call which may return via indirect branch.
6110         * doc/extend.texi: Document indirect_return attribute.
6112 2018-07-03  Martin Sebor  <msebor@redhat.com>
6114         PR tree-optimization/86274
6115         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6116         precondition.
6117         (format_floating): Correct handling of infinities and NaNs.
6119 2018-07-03  Martin Sebor  <msebor@redhat.com>
6121         * print-tree.c (print_real_cst): New function.
6122         (print_node_brief): Call it.
6123         (print_node): Ditto.
6125 2018-07-03  Jeff Law  <law@redhat.com>
6127         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6128         into a single pattern.
6130         * config/h8300/h8300.md (ors code_iterator): New.
6131         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6132         a single pattern and single splitter.
6133         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6134         (iorqi3_1, xorqi3_1): Likewise.
6135         (iorqi3, xorqi3 expanders): Similarly.
6137         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6138         (movmd_internal) into a single pattern using the P mode iterator.
6139         (movmd splitters): Similarly.
6140         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6141         (movsd splitters): Similarly.
6143         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6144         ADDB, ADDW and ADDL into a single ADD attribute which selects the
6145         right table based on the size of the operand.
6146         * config/h8300/h8300.md (length_table): Corresponding changes. All
6147         references to "addb", "addw" and "addl" changed to "add".
6148         (btst patterns): Merge two variants into a single pattern.
6149         (tstqi, tsthi): Likewise.
6150         (addhi3_incdec, addsi3_incdec): Likewise.
6151         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6152         (mulhi3, mulsi3): Likewise.
6153         (udivhi3, udivsi3): Likewise.
6154         (divhi3, divsi3): Likewise.
6155         (andorqi3, andorhi3, andorsi3): Likewise.
6157 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
6159         PR target/85694
6160         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6161         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6163 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6165         PR tree-optimization/85694
6166         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6167         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6168         UNSPEC_URHADD.
6169         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6170         (<u>avg<mode>3_ceil): New patterns.
6172 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
6174         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6175         scan-tree-dump directive.
6176         * gcc.dg/vect/slp-perm-2.c: Likewise.
6177         * gcc.dg/vect/slp-perm-3.c: Likewise.
6178         * gcc.dg/vect/slp-perm-5.c: Likewise.
6179         * gcc.dg/vect/slp-perm-6.c: Likewise.
6180         * gcc.dg/vect/slp-perm-7.c: Likewise.
6181         * gcc.dg/vect/slp-perm-8.c: Likewise.
6183 2018-07-03  Marek Polacek  <polacek@redhat.com>
6185         PR middle-end/86202
6186         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6188 2018-07-03  Richard Biener  <rguenther@suse.de>
6190         PR ipa/86389
6191         * tree-ssa-structalias.c (find_func_clobbers): Properly
6192         handle indirect calls.
6194 2018-07-03  Jeff Law  <law@redhat.com>
6196         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6197         (shifts): New code iterator.
6198         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6199         expander.  Fix HImode handling on H8/SX.
6200         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6201         (subqi3, subhi3, subsi3 expanders): Likewise.
6202         (andqi3, andhi3, andsi3 expanders): Likewise.
6203         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6204         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6205         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6206         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6207         (zero_extendqihi2, zero_extendqisi2): Likewise.
6208         (extendqihi2, extendqisi2): Likewise.
6209         (rotlqi3, rotlhi3, rotlsi3): Likewise.
6210         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6211         (rotlqi3_1, rotlhi3_1): Likewise.
6212         (logicalhi3_sn, logicalsi3_sn): Likewise.
6213         (logicalhi3, logicalsi3): Likewise.
6215 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6217         * tree-vect-patterns.c (vect_recog_rotate_pattern)
6218         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6219         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6220         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6221         type to append_pattern_def_seq instead of creating a stmt_vec_info
6222         directly.
6223         (build_mask_conversion): Likewise.  Remove vinfo argument.
6224         (vect_add_conversion_to_patterm): Likewise, renaming to...
6225         (vect_add_conversion_to_pattern): ...this.
6226         (vect_recog_mask_conversion_pattern): Update call to
6227         build_mask_conversion.  Pass the vector type to
6228         append_pattern_def_seq here too.
6229         (vect_recog_gather_scatter_pattern): Update call to
6230         vect_add_conversion_to_pattern.
6232 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6234         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6235         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6236         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6237         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6238         STMT_VINFO_PATTERN_DEF_SEQ to null here.
6239         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6240         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6241         append_pattern_def_seq instead of new_pattern_def_seq.
6242         (vect_recog_divmod_pattern): Do both of the above.
6243         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6244         is null.
6246 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6248         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6249         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6250         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6251         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6252         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6253         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6254         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6255         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6256         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6257         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6258         parameter with a single stmt_vec_info.
6259         (vect_recog_func_ptr): Likewise.
6260         (vect_recog_gather_scatter_pattern): Likewise, folding in...
6261         (vect_try_gather_scatter_pattern): ...this.
6262         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6263         the stmt_vec_info of the statement to be matched.  Don't clear
6264         STMT_VINFO_RELATED_STMT.
6265         (vect_pattern_recog): Update call accordingly.
6267 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6269         PR tree-optimization/85694
6270         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6271         (uavgM3_ceil): Document new optabs.
6272         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6273         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6274         functions.
6275         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6276         (savg_ceil_optab): New optabs.
6277         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6278         (vect_vect_recog_func_ptrs): Add it.
6279         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6280         constant directly from the associated lhs.
6282 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6284         * tree-vect-patterns.c (vect_split_statement): New function.
6285         (vect_convert_input): Use it to try to split an existing cast.
6287 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6289         * poly-int.h (print_hex): New function.
6290         * dumpfile.h (dump_dec, dump_hex): Declare.
6291         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6292         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6293         min_input_precision, operation_precision and operation_sign.
6294         * tree-vect-patterns.c (vect_get_range_info): New function.
6295         (vect_same_loop_or_bb_p, vect_single_imm_use)
6296         (vect_operation_fits_smaller_type): Delete.
6297         (vect_look_through_possible_promotion): Add an optional
6298         single_use_p parameter.
6299         (vect_recog_over_widening_pattern): Rewrite to use new
6300         stmt_vec_info infomration.  Handle one operation at a time.
6301         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6302         (vect_truncatable_operation_p, vect_set_operation_type)
6303         (vect_set_min_input_precision): New functions.
6304         (vect_determine_min_output_precision_1): Likewise.
6305         (vect_determine_min_output_precision): Likewise.
6306         (vect_determine_precisions_from_range): Likewise.
6307         (vect_determine_precisions_from_users): Likewise.
6308         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6309         (vect_vect_recog_func_ptrs): Put over_widening first.
6310         Add cast_forwprop.
6311         (vect_pattern_recog): Call vect_determine_precisions.
6313 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6315         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6316         statements that have been replaced by further pattern statements.
6317         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6319 2018-07-03  Richard Biener  <rguenther@suse.de>
6321         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6322         always set *dt.  Dump vectype in vectype overload.
6323         * dumpfile.h (dump_gimple_expr): New function.
6324         (dump_gimple_expr_loc): Likewise.
6325         * dumpfile.c (dump_gimple_expr): New function.
6326         (dump_gimple_expr_loc): Likewise.
6328 2018-07-02  Jeff Law  <law@redhat.com>
6330         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6331         the H8/300, H8/300H and H8/S variants into a single pattern.
6332         (movhi_h8300, movqi_h8300hs): Similarly.
6333         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6334         (QHI mode iterator): New.
6336         * config/h8300/h8300.md: Remove trailing whitespace.
6338 2018-07-02  Jim Wilson  <jimw@sifive.com>
6340         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6341         instead of emit_insn for interrupt returns.
6342         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6343         (riscv_sret, riscv_uret): Likewise.
6345 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6347         * pretty-print.c (selftest::test_pp_format): Move save and restore
6348         of quotes to class auto_fix_quotes, and add an instance.
6349         * selftest.c: Include "intl.h".
6350         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6351         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6352         * selftest.h (selftest::auto_fix_quotes): New class.
6354 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
6356         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6357         (aarch64_sve_prepare_conditional_op): Remove.
6358         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6359         Allow aarch64_simd_reg_or_zero as select operand; remove
6360         the aarch64_sve_prepare_conditional_op call.
6361         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6362         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6363         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6364         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6365         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6366         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6367         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6368         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6369         and a splitters to match all of the *_any patterns.
6370         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6372         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6373         (SVE_COND_FP_BINARY_REV): Remove.
6374         (sve_int_op_rev, sve_fp_op_rev): New.
6375         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6376         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6377         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6378         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6379         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6380         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6381         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6382         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6383         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6385         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6386         Remove match_dup 1 from the inner unspec.
6387         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6389         * config/aarch64/aarch64.md (movprfx): New attr.
6390         (length): Default movprfx to 8.
6391         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6392         (*madd<SVE_I>, *msub<SVE_I): Likewise.
6393         (*<su>mul<SVE_I>3_highpart): Likewise.
6394         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6395         (*v<ASHIFT><SVE_I>3): Likewise.
6396         (*<su><MAXMIN><SVE_I>3): Likewise.
6397         (*<su><MAXMIN><SVE_F>3): Likewise.
6398         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6399         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6400         (*div<SVE_F>4): Likewise.
6402 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
6404         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6405         in dump string.
6407 2018-07-02  Richard Biener  <rguenther@suse.de>
6409         PR tree-optimization/86363
6410         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6411         memset argument refers to a non-variable address.
6413 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6415         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6416         {PLUS,MINUS}_EXPR code to...
6417         (adjust_symbolic_bound): ...here,
6418         (combine_bound): ...here,
6419         (set_value_range_with_overflow): ...and here.
6421 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6423         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6424         code...
6425         (extract_range_from_abs_expr): ...here.
6427 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
6429         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6430         -fno-omit-frame-pointer when not optimizing.
6432 2018-07-02  Martin Liska  <mliska@suse.cz>
6434         PR ipa/86279
6435         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6436         (propagate_nothrow): Likewise.
6438 2018-07-02  Martin Liska  <mliska@suse.cz>
6440         PR ipa/86323
6441         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6443 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6445         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6446         function in r262149, changing "loc" param from source_location to
6447         const dump_location_t &.
6448         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6449         declaration, as above.
6451 2018-07-01  Paul Koning  <ni1d@arrl.net>
6453         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6454         -munit-asm, -mgnu-asm, -mdec-asm.
6455         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6456         (pdp11_output_labelref): New.
6457         (pdp11_output_def): New.
6458         (pdp11_output_addr_vec_elt): New.
6459         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
6460         %# and %@ format codes.
6461         (pdp11_option_override): New.
6462         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6463         (pdp11_output_ident): New.
6464         (pdp11_asm_named_section): New.
6465         (pdp11_asm_init_sections): New.
6466         (pdp11_file_start): New.
6467         (pdp11_file_end): New.
6468         (output_ascii): Use .ascii/.asciz for -mdec-asm.
6469         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
6470         %o, like %c but octal.
6471         (pdp11_option_override): New.
6472         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6473         -mdec-asm.
6474         (DATA_SECTION_ASM_OP): Ditto.
6475         (READONLY_DATA_SECTION_ASM_OP): New.
6476         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6477         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6478         (ASM_OUTPUT_LABELREF): Ditto.
6479         (ASM_OUTPUT_DEF): Ditto.
6480         (ASM_OUTPUT_EXTERNAL): New.
6481         (ASM_OUTPUT_SOURCE_FILENAME): New.
6482         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6483         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6484         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
6485         %# and %@ format codes.
6486         * config/pdp11/pdp11.opt (mgnu-asm): New.
6487         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6488         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6489         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6491 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
6493         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6494         dereferencing path[] beyond its length.
6495         (debug_path): New.
6496         (debug_all_paths): New.
6497         (rewire_first_differing_edge): New.
6498         (adjust_paths_after_duplication): New.
6499         (duplicate_thread_path): Call adjust_paths_after_duplication.
6500         Add new argument.
6501         (thread_through_all_blocks): Add new argument to
6502         duplicate_thread_path.
6504 2018-06-30  Jim Wilson  <jimw@sifive.com>
6506         * config/riscv/predicates.md (p2m1_shift_operand): New.
6507         (high_mask_shift_operand): New.
6508         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6509         pattern using p2m1_shift_operand.
6510         (lshsi3_zero_extend_3+2): New combiner pattern using
6511         high_mask_shift_operand.
6513 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6515         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6516         split out from...
6517         (vect_recog_rotate_pattern): ...here.
6518         (vect_convert_input): Try to insert casts of invariants in the
6519         preheader.
6520         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6521         preheader to be empty.
6523 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6525         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6526         vector type.  If given, install it in the new statement's
6527         STMT_VINFO_VECTYPE.
6528         (vect_element_precision): New function.
6529         (vect_unpromoted_value): New struct.
6530         (vect_unpromoted_value::vect_unpromoted_value): New function.
6531         (vect_unpromoted_value::set_op): Likewise.
6532         (vect_look_through_possible_promotion): Likewise.
6533         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6534         (vect_widened_op_tree, vect_convert_input): Likewise.
6535         (vect_convert_inputs, vect_convert_output): Likewise.
6536         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6537         to handle the optional cast of the multiplication result and
6538         vect_widened_op_tree to detect the widened multiplication itself.
6539         Do not require the input and output of promotion casts to have
6540         the same sign, but base the signedness of the operation on the
6541         input rather than the result.  If the pattern includes two
6542         promotions, check that those promotions have the same sign.
6543         Do not restrict the MULT_EXPR handling to a double-width result;
6544         handle quadruple-width results and wider.  Use vect_convert_inputs
6545         to convert the inputs to the common type.
6546         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
6547         to handle the optional cast of the ABS result.  Also allow a sign
6548         change or a sign extension between the ABS and MINUS.
6549         Use vect_widened_op_tree to detect the widened subtraction and use
6550         vect_convert_inputs to convert the inputs to the common type.
6551         (vect_handle_widen_op_by_const): Delete.
6552         (vect_recog_widen_op_pattern): New function.
6553         (vect_recog_widen_mult_pattern): Use it.
6554         (vect_recog_widen_shift_pattern): Likewise.
6555         (vect_recog_widen_sum_pattern): Use
6556         vect_look_through_possible_promotion to handle the promoted
6557         PLUS_EXPR operand.
6559 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6561         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6562         the containing gimple_seq *.
6563         * gimple-iterator.h (gsi_for_stmt): Declare it.
6564         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6565         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6566         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6567         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6568         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6569         checks.
6570         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6571         split out from...
6572         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
6573         statement being replaced is part of an existing pattern
6574         definition sequence, inserting the new pattern statements before
6575         the original one.
6576         (vect_pattern_recog_1): Don't return a bool.  If the statement
6577         is already part of a pattern, instead apply pattern matching
6578         to the pattern definition statements.  Don't clear the
6579         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6580         (vect_pattern_recog): Don't break after the first match;
6581         continue processing the pattern definition statements instead.
6582         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6584 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6586         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6587         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6588         (vect_recog_widen_sum_pattern): Use it.
6590 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6592         * tree-vect-loop.c (vectorizable_reduction): Assert that the
6593         phi is not a pattern statement and has not been replaced by
6594         a pattern statement.
6595         * tree-vect-patterns.c (type_conversion_p): Don't check
6596         STMT_VINFO_IN_PATTERN_P.
6597         (vect_recog_vector_vector_shift_pattern): Likewise.
6598         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6599         the pattern statement rather than the original statement; check
6600         directly for a WIDEN_MULT_EXPR here.
6601         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6602         vect_is_simple_use to return the pattern statement rather
6603         than the original statement; use is_pattern_stmt_p to check
6604         for such a pattern statement.
6605         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6606         to return the pattern statement rather than the original statement;
6607         don't do the same transformation here.
6608         (vect_is_simple_use): If the defining statement has been replaced
6609         by a pattern statement, return the pattern statement instead.
6610         Remove the corresponding (local) transformation from the vectype
6611         overload.
6613 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6615         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6616         end and default to null.
6617         * tree-vect-loop.c (vect_create_epilog_for_reduction)
6618         (vectorizable_reduction): Update calls accordingly, dropping the
6619         gimple ** argument if the passed-back statement isn't needed.
6620         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6621         (vect_recog_rotate_pattern): Likewise.
6622         (vect_recog_mask_conversion_pattern): Likewise.
6623         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6624         (vect_mask_constant_operand_p): Likewise.
6625         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6626         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6627         (get_group_load_store_type, get_load_store_type): Likewise.
6628         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6629         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6630         (vectorizable_conversion, vectorizable_assignment): Likewise.
6631         (vectorizable_shift, vectorizable_operation): Likewise.
6632         (vectorizable_store, vect_is_simple_cond): Likewise.
6633         (vectorizable_condition, vectorizable_comparison): Likewise.
6634         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6635         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6636         and move it to the end.  Cope with null def_stmt_outs.
6638 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6640         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6642 2018-06-29  Jeff Law  <law@redhat.com>
6644         * config/v850/v850.c (v850_legitimate_address_p): Handle large
6645         displacements for TARGET_V850E2V3 and newer.
6646         (TARGET_LRA_P): Remove.  Defaults to LRA now.
6647         * config/v850/v850.md (sign23byte_load): Remove.
6648         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6649         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6651 2018-06-29  Martin Liska  <mliska@suse.cz>
6653         PR lto/85759
6654         * coverage.c (coverage_init): Mangle full path name.
6655         * doc/invoke.texi: Document the change.
6656         * gcov-io.c (mangle_path): New.
6657         * gcov-io.h (mangle_path): Likewise.
6658         * gcov.c (mangle_name): Use mangle_path for path mangling.
6660 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6662         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6663         if starting source register is not even.
6665 2018-06-29  Martin Liska  <mliska@suse.cz>
6667         PR tree-optimization/86263
6668         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6669         Make edge redirection.
6671 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
6673         * dumpfile.c (dump_loc): Add indentation based on scope depth.
6674         (dump_scope_depth): New variable.
6675         (get_dump_scope_depth): New function.
6676         (dump_begin_scope): New function.
6677         (dump_end_scope): New function.
6678         * dumpfile.h (get_dump_scope_depth): New declaration.
6679         (dump_begin_scope): New declaration.
6680         (dump_end_scope): New declaration.
6681         (class auto_dump_scope): New class.
6682         (AUTO_DUMP_SCOPE): New macro.
6683         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6684         AUTO_DUMP_SCOPE.
6686 2018-06-29  Richard Biener  <rguenther@suse.de>
6688         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6689         compute_all_dependences succeeds.
6690         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6691         exceed --param loop-max-datarefs-for-datadeps.
6693 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
6695         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6697 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
6699         PR target/86348
6700         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6701         alternative 0 in preferred_for_speed attribute.
6703 2018-06-28  Paul Koning  <ni1d@arrl.net>
6705         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6706         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6707         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6708         * config/pdp11/pdp11.md: Correct "length" attribute calculation
6709         for shift insn patterns.
6711 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
6713         * cgraph.c (cgraph_node::get_body): Replace assignments to
6714         "dump_file" with calls to set_dump_file.
6715         * dumpfile.c (alt_dump_file): Make static, and group with...
6716         (alt_flags): ...this definition.
6717         (dumps_are_enabled): New variable.
6718         (refresh_dumps_are_enabled): New function.
6719         (set_dump_file): New function.
6720         (set_alt_dump_file): New function.
6721         (gcc::dump_manager::dump_start): Replace assignments to
6722         "dump_file" and "alt_dump_file" with calls to set_dump_file and
6723         set_alt_dump_file.
6724         (gcc::dump_manager::dump_finish): Likewise.
6725         * dumpfile.h (alt_dump_file): Delete decl.
6726         (dumps_are_enabled): New variable decl.
6727         (set_dump_file): New function decl.
6728         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6729         global.
6730         * tree-nested.c (lower_nested_functions): Replace assignments to
6731         "dump_file" with calls to set_dump_file.
6733 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6735         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6736         goto_locus of each outgoing edge of each basic block.
6738 2018-06-28  Richard Biener  <rguenther@suse.de>
6740         * dwarf2out.c (decl_scope_table): Remove.
6741         (push_decl_scope): Likewise.
6742         (pop_decl_scope): Likewise.
6743         (gen_type_die_for_member): Do not call push/pop_decl_scope.
6744         (gen_struct_or_union_type_die): Likewise.
6745         (gen_tagged_type_die): Likewise.
6746         (dwarf2out_init): Do not initialize decl_scope_table.
6747         (dwarf2out_c_finalize): Do not free it.
6749 2018-06-28  Richard Biener  <rguenther@suse.de>
6751         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6752         deciding whether to not re-use a DIE.
6754 2018-06-28  Richard Biener  <rguenther@suse.de>
6756         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6757         DW_AT_abstract_origin attribute.
6759 2018-06-28  Martin Liska  <mliska@suse.cz>
6761         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6762         Use newly introduced constants.
6763         * tree-switch-conversion.h (struct jump_table_cluster):
6764         Define max_ratio_for_size and max_ratio_for_speed.
6766 2018-06-28  Martin Liska  <mliska@suse.cz>
6768         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6769         Add new checking assert to catch invalid state.
6770         (jump_table_cluster::can_be_handled): Handle single case
6771         clusters.
6772         (jump_table_cluster::is_beneficial): Bail out for such case.
6773         (bit_test_cluster::find_bit_tests):
6774         Add new checking assert to catch invalid state.
6775         (bit_test_cluster::can_be_handled): Handle single case
6776         clusters.
6777         (bit_test_cluster::is_beneficial): Bail out for such case.
6778         (switch_decision_tree::analyze_switch_statement):
6779         Fix comment.
6781 2018-06-28  Martin Liska  <mliska@suse.cz>
6783         * common.opt: Introduce -completion option.
6784         * gcc.c (driver_handle_option): Handle it.
6785         (driver::main): Print completions if completion
6786         is set.
6787         * opt-suggestions.c (option_proposer::get_completions):
6788         New function.
6789         (option_proposer::suggest_completion): Likewise.
6790         (option_proposer::find_param_completions): Likewise.
6791         (verify_autocompletions): Likewise.
6792         (test_completion_valid_options): Likewise.
6793         (test_completion_valid_params): Likewise.
6794         (in_completion_p): Likewise.
6795         (empty_completion_p): Likewise.
6796         (test_completion_partial_match): Likewise.
6797         (test_completion_garbage): Likewise.
6798         (opt_proposer_c_tests): Likewise.
6799         * opt-suggestions.h: Declare new functions.
6800         * opts.c (common_handle_option): Handle OPT__completion_.
6801         * selftest-run-tests.c (selftest::run_tests): Add
6802         opt_proposer_c_tests.
6803         * selftest.c (assert_str_startswith): New.
6804         * selftest.h (assert_str_startswith): Likewise.
6805         (opt_proposer_c_tests): New.
6806         (ASSERT_STR_STARTSWITH): Likewise.
6808 2018-06-28  Martin Liska  <mliska@suse.cz>
6810         * Makefile.in: Add opt-suggestions.o.
6811         * gcc-main.c: Include opt-suggestions.h.
6812         * gcc.c (driver::driver): Likewise.
6813         (driver::~driver): Remove m_option_suggestions.
6814         (driver::build_option_suggestions): Moved to option_proposer.
6815         (driver::suggest_option): Likewise.
6816         (driver::handle_unrecognized_options): Use option_proposer.
6817         * gcc.h (class driver): Add new memver m_option_proposer.
6818         * opt-suggestions.c: New file.
6819         * opt-suggestions.h: New file.
6821 2018-06-28  Martin Liska  <mliska@suse.cz>
6823         * vec.h (class auto_string_vec): New (moved from auto_argvec).
6824         (auto_string_vec::~auto_string_vec): Likewise.
6826 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6828         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6829         prevent_decl_creation_for_types fields up and add reset_location field.
6830         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6831         statement if id->reset_location is true.
6832         (copy_edges_for_bb): Do not set goto_locus on the new edges if
6833         id->reset_location is true.
6834         (copy_phis_for_bb): Force input_location on the arguments if
6835         id->reset_location is true.
6836         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6837         is set on the function to be inlined.
6839 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
6841         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6843 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
6845         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6846         registers for Pmode.
6847         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6848         hard registers for the clobbered pseudo.
6850 2018-06-27  Paul Koning  <ni1d@arrl.net>
6852         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6853         mutually exclusive options.
6854         * config/pdp11/constraints.md (h): New constraint.
6855         (O): Update definition to match shift code generation.
6856         (D): New constraint.
6857         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6858         (CCFP): Remove.
6859         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6860         function.
6861         (output_jump): Change arguments.
6862         (pdp11_fixed_cc_regs): New function.
6863         (pdp11_cc_mode): Ditto.
6864         (pdp11_expand_shift): Ditto.
6865         (pdp11_assemble_shift): Ditto.
6866         (pdp11_small_shift): Ditto.
6867         (pdp11_branch_cost): Remove.
6868         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6869         from output.
6870         (pdp11_register_move_cost): Update for CC registers.
6871         (pdp11_rtx_costs): Add case for LSHIFTRT.
6872         (pdp11_output_jump): Add CCNZ mode conditional branches.
6873         (notice_update_cc_on_set): Remove.
6874         (pdp11_cc_mode): New function.
6875         (simple_memory_operand): Correct pre/post decrement case.
6876         (no_side_effect_operand): New function.
6877         (pdp11_regno_reg_class): Add CC_REGS class.
6878         (pdp11_fixed_cc_regs): New function.
6879         (pdp11_small_shift): New function.
6880         (pdp11_expand_shift): New function to expand shift insns.
6881         (pdp11_assemble_shift): New function to output shifts.
6882         (pdp11_branch_cost): Remove.
6883         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
6884         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
6885         (WCHAR_TYPE): Ditto.
6886         (PTRDIFF_TYPE): Ditto.
6887         (ADJUST_INSN_LENGTH): New macro.
6888         (FIXED_REGISTERS): Add CC registers.
6889         (CALL_USED_REGISTERS): Ditto.
6890         (reg_class): Ditto.
6891         (REG_CLASS_NAMES): Ditto.
6892         (REG_CLASS_CONTENTS): Ditto.
6893         (SELECT_CC_MODE): Use new function.
6894         (TARGET_FLAGS_REGNUM): New macro.
6895         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
6896         (cc0_reg_rtx): Remove.
6897         (CC_STATUS_MDEP): Remove.
6898         (CC_STATUS_MDEFP_INIT): Remove.
6899         (CC_IN_FPU): Remove.
6900         (NOTICE_UPDATE_CC): Remove.
6901         (REGISTER_NAMES): Add CC registers.
6902         (BRANCH_COST): Change to constant 1.
6903         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
6904         handling.
6905         * config/pdp11/pdp11.opt (mbcopy): Remove.
6906         (mbcopy-builtin): Remove.
6907         (mbranch-cheap): Remove.
6908         (mbranch-expensive): Remove.
6909         * config/pdp11/predicates.md (expand_shift_operand): Update to
6910         match shift code generation.
6911         (ccnz_operator): New predicate.
6912         * doc/invoke.texi (PDP-11 Options): Remove deleted options
6913         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
6914         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
6915         exclusive options.
6916         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
6917         description of O constraint.
6919 2018-06-27  Jeff Law  <law@redhat.com>
6920             Austin Law  <austinklaw@gmail.com>
6922         * config/v850/v850.md (addsi3_set_flags): New pattern.
6923         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
6924         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
6925         (zero_extendhisi2_v850_set_flags): Likewise.
6926         (zero_extendqisi2_v850_set_flags): Likewise.
6927         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
6928         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
6929         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
6931         * config/v850/v850-protos.h (notice_update_cc): Remove.
6932         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
6933         (v850_print_operand): Handle 'D' and "d".
6934         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
6935         Add handling of arithmetic/logical operations compared against zero.
6936         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
6937         Do not look at v850_compare_op, instead get mode from last argument.
6938         (v850_gen_compare): Remove
6939         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
6940         after reload for prologue insns.
6941         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
6942         patterns.
6943         (construct_save_jarl): Likewise.
6944         (TARGET_FLAGS_REGNUM): Define.
6945         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
6946         (NOTICE_UPDATE_CC): Remove.
6947         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
6948         than cc0.  Conditionalize on reload_completed.
6949         (cmpsi_insn, setfcc_insn): Likewise.
6950         (tst1 splitter): Turn into define_and_split which sets the flags
6951         after reload.
6952         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
6953         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
6954         (cstoresf4, cstoredf4): Clobber the flags.
6955         (cmpsi, cmpsf, cmpdf): Remove expanders.
6956         (setf_insn): Remove pattern.
6957         (addsi3): Turn into define_and_split which clobbers the flags after
6958         reload and a suitable pattern (addsi3_clobber_flags) for use after
6959         reload.
6960         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
6961         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
6962         (ashrsi3, ashrsi3_v850e2): Likewise.
6963         (bins): Clobber the flags.
6964         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6965         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6966         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6967         (call_value_internal_short, call_value_internal_long): Likewise.
6968         (callt_save_interrupt, callt_return_interrupt): Likewise.
6969         (save_interrupt, return_interrupt): Likewise.
6970         (callt_save_all_interrupt, save_all_interrupt): Likewise.
6971         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6972         (restore_all_interrupt, _restore_all_interrupt): Likewise.
6973         (All FP comparisons): Only allow after reload has completed.
6974         (trfsr): Likewise.
6975         (divh, divhu): Tweak output template.
6976         (branch_z_normal, branch_z_invert): Remove
6977         (branch_nz_normal, branch_nz_invert): Likewise.
6978         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6980         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6981         * config/v850/v850.c (notice_update_cc): Remove.
6982         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
6983         (CC_NO_CARRY): Likewise.
6984         (NOTICE_UPDATE_CC): Define to nothing.
6985         * config/v850/v850.md: Remove block comment on cc0 handling
6986         Remove "cc" attribute from all patterns.  Remove cc_status handling
6987         from all patterns.  Minor formatting fixes.
6989 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6991         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6992         (cortex-a76.cortex-a55): Likewise.
6993         * config/aarch64/aarch64-tune.md: Regenerate.
6994         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6995         cortex-a76.cortex-a55.
6997 2018-06-27  Jeff Law  <law@redhat.com>
6999         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7000         (MULTILIB_DIRNAMES): Similarly.
7002 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
7004         * gimple.h (gimple_return_retbnd): Delete.
7005         (gimple_return_set_retbnd): Likewise.
7006         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7007         gimple_return_set_retbnd.
7008         * gimple-pretty-print.c (dump_gimple_return): Remove call to
7009         gimple_return_retbnd and adjust.
7010         * tree-inline.h (struct copy_body_data): Remove retbnd field.
7011         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7012         Explicitly return NULL in a couple more cases.  Move assertion
7013         on debug statements and remove unreachable code.
7014         (reset_debug_binding): Do not test id->retbnd.
7015         (expand_call_inline): Do not set it.
7017 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7019         * configure.ac: Add --disable-gcov option.
7020         * configure: Regenerate.
7021         * Makefile.in: Honour @enable_gcov@.
7022         * doc/install.texi: Document --disable-gcov.
7024 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7026         * config/arm/arm-cpus.in (cortex-a76): New entry.
7027         (cortex-a76.cortex-a55): Likewise.
7028         * config/arm/arm-tables.opt: Regenerate.
7029         * config/arm/arm-tune.md: Likewise.
7030         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7031         * doc/invoke.texi (ARM Options): Document cortex-a76 and
7032         cortex-a76.cortex-a55.
7034 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
7036         PR target/85769
7037         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7039 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7041         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7042         comment.
7043         (EPILOGUE_USES): Likewise.
7045 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
7047         * tree-inline.c (remap_location): New function extracted from...
7048         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
7049         (copy_phis_for_bb): ...here.  Call remap_location.
7050         (copy_cfg_body): Adjust call to copy_edges_for_bb.
7052 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
7054         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7055         unaligned vsx for 16B memset.
7057 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
7059         PR target/86285
7060         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7061         ieee128_float_type_node to long_double_type_node unless
7062         TARGET_LONG_DOUBLE_128 is set.
7064 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
7066         * cfgloop.c (get_loop_location): Convert return type from
7067         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7068         by implicit construction from rtx_insn *, and using
7069         dump_user_location_t::from_function_decl for the fallback case.
7070         * cfgloop.h (get_loop_location): Convert return type from
7071         location_t to dump_user_location_t.
7072         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7073         dump_printf_loc to pass in a dump_location_t rather than a
7074         location_t, via the gimple stmt.
7075         * coverage.c (get_coverage_counts): Update calls to
7076         dump_printf_loc to pass in dump_location_t rather than a
7077         location_t.
7078         * doc/optinfo.texi (Dump types): Convert example of
7079         dump_printf_loc from taking "locus" to taking "insn".  Update
7080         description of the "_loc" calls to cover dump_location_t.
7081         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7082         "selftest.h".
7083         (dump_user_location_t::dump_user_location_t): New constructors,
7084         from gimple *stmt and rtx_insn *.
7085         (dump_user_location_t::from_function_decl): New function.
7086         (dump_loc): Make static.
7087         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7088         const dump_location_t &.
7089         (dump_generic_expr_loc): Delete.
7090         (dump_printf_loc): Convert param "loc" from location_t to
7091         const dump_location_t &.
7092         (selftest::test_impl_location): New function.
7093         (selftest::dumpfile_c_tests): New function.
7094         * dumpfile.h: Include "profile-count.h".
7095         (class dump_user_location_t): New class.
7096         (struct dump_impl_location_t): New struct.
7097         (class dump_location_t): New class.
7098         (dump_printf_loc): Convert 2nd param from source_location to
7099         const dump_location_t &.
7100         (dump_generic_expr_loc): Delete.
7101         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7102         const dump_location_t &.
7103         * gimple-fold.c (fold_gimple_assign): Update call to
7104         dump_printf_loc to pass in a dump_location_t rather than a
7105         location_t, via the gimple stmt.
7106         (gimple_fold_call): Likewise.
7107         * gimple-loop-interchange.cc
7108         (loop_cand::analyze_iloop_reduction_var): Update for change to
7109         check_reduction_path.
7110         (tree_loop_interchange::interchange): Update for change to
7111         find_loop_location.
7112         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7113         change in return-type of find_loop_location.
7114         (graphite_regenerate_ast_isl): Likewise.
7115         * graphite-optimize-isl.c (optimize_isl): Likewise.
7116         * graphite.c (graphite_transform_loops): Likewise.
7117         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7118         pass in a dump_location_t rather than a location_t, via the
7119         gimple stmt.
7120         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7121         * ipa.c (walk_polymorphic_call_targets): Likewise.
7122         * loop-unroll.c (report_unroll): Convert "locus" param from
7123         location_t to dump_location_t.
7124         (decide_unrolling): Update for change to get_loop_location's
7125         return type.
7126         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7127         location_t to dump_user_location_t.
7128         (grid_find_single_omp_among_assignments_1): Updates calls to
7129         dump_printf_loc to pass in a dump_location_t rather than a
7130         location_t, via the gimple stmt.
7131         (grid_parallel_clauses_gridifiable): Convert "tloc" from
7132         location_t to dump_location_t.  Updates calls to dump_printf_loc
7133         to pass in a dump_location_t rather than a location_t, via the
7134         gimple stmt.
7135         (grid_inner_loop_gridifiable_p): Likewise.
7136         (grid_dist_follows_simple_pattern): Likewise.
7137         (grid_gfor_follows_tiling_pattern): Likewise.
7138         (grid_target_follows_gridifiable_pattern): Likewise.
7139         (grid_attempt_target_gridification): Convert initialization
7140         of local "grid" from memset to zero-initialization; FIXME: does
7141         this require C++11?  Update call to dump_printf_loc to pass in a
7142         optinfo_location rather than a location_t, via the gimple stmt.
7143         * profile.c (read_profile_edge_counts): Updates call to
7144         dump_printf_loc to pass in a dump_location_t rather than a
7145         location_t
7146         (compute_branch_probabilities): Likewise.
7147         * selftest-run-tests.c (selftest::run_tests): Call
7148         dumpfile_c_tests.
7149         * selftest.h (dumpfile_c_tests): New decl.
7150         * tree-loop-distribution.c (pass_loop_distribution::execute):
7151         Update for change in return type of find_loop_location.
7152         * tree-parloops.c (parallelize_loops): Likewise.
7153         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7154         "locus" from location_t to dump_user_location_t.
7155         (canonicalize_loop_induction_variables): Likewise.
7156         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7157         for change in return type of find_loop_location.
7158         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7159         to dump_printf_loc to pass in a dump_location_t rather than a
7160         location_t, via the stmt.
7161         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7162         Likewise.
7163         * tree-vect-loop-manip.c (find_loop_location): Convert return
7164         type from source_location to dump_user_location_t.
7165         (vect_do_peeling): Update for above change.
7166         (vect_loop_versioning): Update for change in type of
7167         vect_location.
7168         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7169         from location_t to dump_user_location_t.
7170         (vect_estimate_min_profitable_iters): Update for change in type
7171         of vect_location.
7172         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7173         location_t to dump_location_t.
7174         (vect_slp_bb): Update for change in type of vect_location.
7175         * tree-vectorizer.c (vect_location): Convert from source_location
7176         to dump_user_location_t.
7177         (try_vectorize_loop_1): Update for change in vect_location's type.
7178         (vectorize_loops): Likewise.
7179         (increase_alignment): Likewise.
7180         * tree-vectorizer.h (vect_location): Convert from source_location
7181         to dump_user_location_t.
7182         (find_loop_location): Convert return type from source_location to
7183         dump_user_location_t.
7184         (check_reduction_path): Convert 1st param from location_t to
7185         dump_user_location_t.
7186         * value-prof.c (check_counter): Update call to dump_printf_loc to
7187         pass in a dump_user_location_t rather than a location_t; update
7188         call to error_at for change in type of "locus".
7189         (check_ic_target): Update call to dump_printf_loc to
7190         pass in a dump_user_location_t rather than a location_t, via the
7191         call_stmt.
7193 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
7195         * config/s390/s390.h (enum processor_flags): Do not use
7196         default tune parameter when -march was specified.
7198 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
7200         PR target/86314
7201         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7202         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7203         operands.
7205 2018-06-26  Richard Biener  <rguenther@suse.de>
7207         PR tree-optimization/86287
7208         PR bootstrap/86316
7209         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7210         (vect_analyze_loop): Initialize n_stmts.
7212 2018-06-26  Richard Biener  <rguenther@suse.de>
7214         PR middle-end/86271
7215         * fold-const.c (fold_convertible_p): Pointer extension
7216         isn't valid.
7218 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
7220         PR debug/86064
7221         * dwarf2out.c (loc_list_has_views): Adjust comments.
7222         (dw_loc_list): Split single cross-partition range with
7223         nonzero locview.
7225 2018-06-25  Jeff Law  <law@redhat.com>
7227         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7228         on -mbig-switch by default.
7230         * config/v850/predicates.md (const_float_1_operand): Fix match_code
7231         test.
7232         (const_float_0_operand): Remove unused predicate.
7233         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7234         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7235         (recipsf2): New expander.  Original pattern now called
7236         (recipsf2_insn).
7237         (recipdf2, recipdf2_insn): Similarly.
7238         (rsqrtsf2, rsqrtsf2_insn): Similarly
7239         (rsqrtdf2, rsqrtdf2_insn): Similarly
7241 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
7243         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7244         Simplify logic for FreeBSD (twice).
7246 2018-06-25  Martin Sebor  <msebor@redhat.com>
7248         PR tree-optimization/86204
7249         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7250         a strnlen result if it's less than the length of the string.
7252 2018-06-25  Martin Sebor  <msebor@redhat.com>
7254         PR tree-optimization/85700
7255         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7256         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7257         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7259 2018-06-25  Martin Sebor  <msebor@redhat.com>
7261         * doc/extend.texi (Zero-length arrays): Update and clarify.
7263 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
7265         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7266         added IEEE/IBM long double multilib support on PowerPC little
7267         endian Linux systems.
7268         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7269         (MULTILIB_DEFAULTS): Likewise.
7270         * config/rs6000/rs6000.c (rs6000_option_override_internal):
7271         Likewise.
7272         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7273         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7274         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7276 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
7278         PR middle-end/86311
7279         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7280         (REORDER_45): Likewise.
7282 2018-06-25  Jeff Law  <law@redhat.com>
7284         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7285         dividend to 32 bits.  Adjust length.
7286         (udivmodhi4): Cleanup output template.  Fix length.
7288 2018-06-25  Carl Love  <cel@us.ibm.com>
7290         * config/rs6000/vsx.md: Change word selector to prefered location.
7292 2018-06-25  Richard Biener  <rguenther@suse.de>
7294         PR tree-optimization/86304
7295         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7296         epilogue-if-converted loops as well.
7298 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
7300         * lto-section-out.c (lto_begin_section): Do not print section
7301         name for noaddr and unnumbered dumps.
7303 2018-06-25  Richard Biener  <rguenther@suse.de>
7305         * tree-vectorizer.h (struct vec_info_shared): New structure
7306         with parts split out from struct vec_info and loop_nest from
7307         struct _loop_vec_info.
7308         (struct vec_info): Adjust accordingly.
7309         (struct _loop_vec_info): Likewise.
7310         (LOOP_VINFO_LOOP_NEST): Adjust.
7311         (LOOP_VINFO_DATAREFS): Likewise.
7312         (LOOP_VINFO_DDRS): Likewise.
7313         (struct _bb_vec_info): Likewise.
7314         (BB_VINFO_DATAREFS): Likewise.
7315         (BB_VINFO_DDRS): Likewise.
7316         (struct _stmt_vec_info): Add dr_aux member.
7317         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7318         (DR_MISALIGNMENT_UNINITIALIZED): New.
7319         (set_dr_misalignment): Adjust.
7320         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7321         (vect_analyze_loop): Adjust prototype.
7322         (vect_analyze_loop_form): Likewise.
7323         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7324         Compute dependences lazily.
7325         (vect_record_base_alignments): Use shared datarefs/ddrs.
7326         (vect_verify_datarefs_alignment): Likewise.
7327         (vect_analyze_data_refs_alignment): Likewise.
7328         (vect_analyze_data_ref_accesses): Likewise.
7329         (vect_analyze_data_refs): Likewise.
7330         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7331         constructor parameter for shared part.
7332         (vect_analyze_loop_form): Pass in shared part and adjust.
7333         (vect_analyze_loop_2): Pass in storage for the number of
7334         stmts.  Move loop nest finding to the caller.  Compute
7335         datarefs lazily.
7336         (vect_analyze_loop): Pass in shared part.
7337         (vect_transform_loop): Verify shared datarefs are unchanged.
7338         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7339         constructor parameter for shared part.
7340         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7341         (vect_slp_bb): Verify shared datarefs are unchanged before
7342         transform.
7343         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7344         change.
7345         (new_stmt_vec_info): Initialize DR_AUX misalignment to
7346         DR_MISALIGNMENT_UNINITIALIZED.
7347         * tree-vectorizer.c (vec_info::vec_info): Add constructor
7348         parameter for shared part.
7349         (vec_info::~vec_info): Adjust.
7350         (vec_info_shared::vec_info_shared): New.
7351         (vec_info_shared::~vec_info_shared): Likewise.
7352         (vec_info_shared::save_datarefs): Likewise.
7353         (vec_info_shared::check_datarefs): Likewise.
7354         (try_vectorize_loop_1): Construct shared part live for analyses
7355         of a single loop for multiple vector sizes.
7356         * tree-parloops.c (gather_scalar_reductions): Adjust.
7358 2018-06-25  Richard Biener  <rguenther@suse.de>
7360         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7361         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7362         (vect_analyze_data_refs): Remove similar code from here and
7363         simplify accordingly.
7365 2018-06-25  Richard Biener  <rguenther@suse.de>
7367         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7368         for reverse storage order accesses rather than asserting
7369         they cannot happen here.
7371 2018-06-25  Tom de Vries  <tdevries@suse.de>
7373         PR debug/86257
7374         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7375         Use data16 instead of .byte for insn prefix.
7377 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
7379         PR C++/86082
7380         * parser.c (make_char_string_pack): Pass this literal chars
7381         through cpp_interpret_string.
7382         (cp_parser_userdef_numeric_literal): Check the result of
7383         make_char_string_pack.
7385 2018-06-24  Maya Rashish  <coypu@sdf.org>
7387         * ginclude/stddef.h: Simplify conditions around avoiding
7388         re-definition of __size_t.
7390 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7392         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7393         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7395 2018-06-22  Maya Rashish  <coypu@sdf.org>
7397         * doc/invoke.texi (mno-fancy-math-387): Update for changes
7398         made to OpenBSD and NetBSD through the years.
7400 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7402         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7403         behavior of vec_pack (vector double, vector double) to match
7404         behavior of vec_float2 (vector double, vector double).
7406 2018-06-22  Olivier Hainque  <hainque@adacore.com>
7408         * gimplify.c (gimplify_function_tree): Prevent creation
7409         of a trampoline for the address of the current function
7410         passed to entry/exit instrumentation hooks.
7412 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
7414         PR target/86222
7415         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7416         correctly.
7418 2018-06-22  Martin Liska  <mliska@suse.cz>
7420         PR tree-optimization/86263
7421         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7422         Bail out if is_enabled is false.
7423         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7424         New declaration.
7425         (jump_table_cluster::is_enabled): New function.
7427 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7429         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7430         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7431         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7432         (lto_input_ts_binfo_tree_pointers): Likewise.
7433         * tree-streamer-out.c (streamer_write_tree_bitfields,
7434         write_ts_binfo_tree_pointers): Likewise.
7435         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7437 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7439         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7441 2018-06-22  Martin Liska  <mliska@suse.cz>
7443         * symbol-summary.h (get): Make it pure and inline move
7444         functionality from ::get function.
7445         (get): Remove and inline into ::get and ::get_create.
7446         (get_create): Move code from ::get function.
7448 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7450         PR target/85994
7451         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7452         -x assembler-with-cpp.
7454 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7456         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7457         _FILE_OFFSET_BITS=64 for C++.
7459 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
7461         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7462         conversion insn that shows up when pr85657-3.c is compiled using
7463         IEEE 128-bit long double.
7464         (neg<mode>2_internal): Use the correct mode to check whether the
7465         mode is IBM extended.
7466         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7467         multiply and divide external functions from being created more
7468         than once.
7470 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7472         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7473         functions.
7474         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
7475         the edge can be forwarded.
7476         (cfg_layout_merge_blocks): Likewise.
7478 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7480         * except.c (finish_eh_generation): Commit edge insertions only after
7481         the EH edges have been redirected from post-landing to landing pads.
7483 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7485         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7486         create_tmp_var_for to create the FRAME decl.
7487         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7489 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7491         * tree-inline.c (copy_edges_for_bb): Minor tweak.
7492         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7493         debug statement when resetting its value.
7494         (expand_call_inline): Copy the locus of the call onto the assignment
7495         of the return value, if any.  Use local variable in more cases.
7497 2018-06-21  Martin Liska  <mliska@suse.cz>
7499         * ipa-pure-const.c (propagate_nothrow): Use
7500         funct_state_summaries->get.
7501         (dump_malloc_lattice): Likewise.
7502         (propagate_malloc): Likewise.
7504 2018-06-21  Richard Biener  <rguenther@suse.de>
7506         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7507         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7508         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7509         comment.
7510         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7511         BLOCK_ABSTRACT_ORIGIN unconditionally.
7513 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
7515         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7516         deleting it.
7517         * ipa-reference.c (ipa_reference_c_finalize): Delete
7518         ipa_ref_opt_sum_summaries and set it to NULL.
7520 2018-06-21  Tom de Vries  <tdevries@suse.de>
7522         PR tree-optimization/85859
7523         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7524         test with comment from bb_no_side_effects_p.
7526 2018-06-21  Richard Biener  <rguenther@suse.de>
7528         PR tree-optimization/86232
7529         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7530         max for constant niter.
7532 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7534         * config/aarch64/aarch64-simd.md
7535         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7537 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7539         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7540         Make opernads of the unspec commutative.
7542 2018-06-21  Richard Biener  <rguenther@suse.de>
7544         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7545         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7546         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7547         (vect_analyze_data_ref_dependence): Re-order checks to deal with
7548         NULL DR_STEP.
7549         (vect_record_base_alignments): Do not record base alignment
7550         for gathers or scatters.
7551         (vect_compute_data_ref_alignment): Drop return value that is always
7552         true.  Bail out early for gathers or scatters.
7553         (vect_enhance_data_refs_alignment): Bail out early for gathers
7554         or scatters.
7555         (vect_find_same_alignment_drs): Likewise.
7556         (vect_analyze_data_refs_alignment): Remove dead code.
7557         (vect_slp_analyze_and_verify_node_alignment): Likewise.
7558         (vect_analyze_data_refs): For possible gathers or scatters do
7559         not create an alternate DR, just check their possible validity
7560         and mark them.  Adjust DECL_NONALIASED handling to not rely
7561         on DR_BASE_ADDRESS.
7562         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7563         update inits of gathers or scatters.
7564         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7565         Also copy gather/scatter flag to pattern vinfo.
7567 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7569         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7570         behavior of vec_packsu (vector unsigned long long, vector unsigned
7571         long long) to match behavior of vec_packs with same signature.
7573 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
7574             Thomas Schwinge <thomas@codesourcery.com>
7575             Cesar Philippidis  <cesar@codesourcery.com>
7577         * gimplify.c (gimplify_scan_omp_clauses): Add support for
7578         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7579         (gimplify_adjust_omp_clauses): Likewise.
7580         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7581         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7582         (gimplify_omp_target_update): Update handling of acc update and
7583         enter/exit data.
7584         * omp-low.c (install_var_field): Remove unused parameter
7585         base_pointers_restrict.
7586         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7587         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7588         FINALIZE}
7589         (omp_target_base_pointers_restrict_p): Delete.
7590         (scan_omp_target): Update call to scan_sharing_clauses.
7591         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7592         FINALIZE}.
7593         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7594         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7595         (convert_local_omp_clauses): Likewise.
7596         * tree-pretty-print.c (dump_omp_clause): Likewise.
7597         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
7598         FINALIZE}.
7599         (omp_clause_code_name): Likewise.
7601 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
7603         PR debug/86194
7604         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7605         be narrowed.
7607         PR tree-optimization/86231
7608         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
7609         anti-range don't overwrite *vr0min before using it to compute *vr0max.
7611 2018-06-20  Tom de Vries  <tdevries@suse.de>
7613         PR tree-optimization/86097
7614         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7615         iv type if signedness of iv type is not the same as that of *nit.
7617 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
7619         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
7620         EDGE_EH edges, verify they are all EDGE_EH.
7622 2018-06-20  Maya Rashish  <coypu@sdf.org>
7624         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7626 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7628         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7629         * config/aarch64/aarch64.c (xgene1_tunings): Add
7630         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7631         (aarch64_mode_valid_for_sched_fusion_p):
7632         Allow 16-byte modes.
7633         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7634         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7635         128-bit modes.
7636         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7637         New pattern.
7638         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7639         * config/aarch64/iterators.md (VQ2): New mode iterator.
7641 2018-06-20  Martin Liska  <mliska@suse.cz>
7643         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7644         Change default ratio from 10 to 8.
7646 2018-06-20  Martin Liska  <mliska@suse.cz>
7648         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7649         New.
7650         (bit_test_cluster::find_bit_tests): Likewise.
7651         (switch_decision_tree::analyze_switch_statement): Find clusters.
7652         * tree-switch-conversion.h (struct jump_table_cluster): Document
7653         hierarchy.
7655 2018-06-20  Martin Liska  <mliska@suse.cz>
7657         * tree-switch-conversion.c (switch_conversion::collect):
7658         Record m_uniq property.
7659         (switch_conversion::expand): Bail out for special conditions.
7660         (group_cluster::~group_cluster): New.
7661         (group_cluster::group_cluster): Likewise.
7662         (group_cluster::dump): Likewise.
7663         (jump_table_cluster::emit): New.
7664         (switch_decision_tree::fix_phi_operands_for_edges): New.
7665         (struct case_node): Remove struct.
7666         (jump_table_cluster::can_be_handled): New.
7667         (case_values_threshold): Moved to header.
7668         (reset_out_edges_aux): Likewise.
7669         (jump_table_cluster::is_beneficial): New.
7670         (bit_test_cluster::can_be_handled): Likewise.
7671         (add_case_node): Remove.
7672         (bit_test_cluster::is_beneficial): New.
7673         (case_bit_test::cmp): New.
7674         (bit_test_cluster::emit): New.
7675         (expand_switch_as_decision_tree_p): Remove.
7676         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7677         (fix_phi_operands_for_edge): Likewise.
7678         (switch_decision_tree::analyze_switch_statement): New.
7679         (compute_cases_per_edge): Move ...
7680         (switch_decision_tree::compute_cases_per_edge): ... here.
7681         (try_switch_expansion): Likewise.
7682         (switch_decision_tree::try_switch_expansion): Likewise.
7683         (record_phi_operand_mapping): Likewise.
7684         (switch_decision_tree::record_phi_operand_mapping): Likewise.
7685         (emit_case_decision_tree): Likewise.
7686         (switch_decision_tree::emit): Likewise.
7687         (balance_case_nodes): Likewise.
7688         (switch_decision_tree::balance_case_nodes): Likewise.
7689         (dump_case_nodes): Likewise.
7690         (switch_decision_tree::dump_case_nodes): Likewise.
7691         (emit_jump): Likewise.
7692         (switch_decision_tree::emit_jump): Likewise.
7693         (emit_cmp_and_jump_insns): Likewise.
7694         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7695         (emit_case_nodes): Likewise.
7696         (switch_decision_tree::emit_case_nodes): Likewise.
7697         (conditional_probability): Remove.
7698         * tree-switch-conversion.h (enum cluster_type): New.
7699         (PRINT_CASE): New.
7700         (struct cluster): Likewise.
7701         (cluster::cluster): Likewise.
7702         (struct simple_cluster): Likewise.
7703         (simple_cluster::simple_cluster): Likewise.
7704         (struct group_cluster): Likewise.
7705         (struct jump_table_cluster): Likewise.
7706         (struct bit_test_cluster): Likewise.
7707         (struct min_cluster_item): Likewise.
7708         (struct case_tree_node): Likewise.
7709         (case_tree_node::case_tree_node): Likewise.
7710         (jump_table_cluster::case_values_threshold): Likewise.
7711         (struct case_bit_test): Likewise.
7712         (struct switch_decision_tree): Likewise.
7713         (struct switch_conversion): Likewise.
7714         (switch_decision_tree::reset_out_edges_aux): Likewise.
7716 2018-06-20  Martin Liska  <mliska@suse.cz>
7718         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7719         (hoist_edge_and_branch_if_true): Likewise.
7720         (expand_switch_using_bit_tests_p): Likewise.
7721         (struct case_bit_test): Likewise.
7722         (case_bit_test_cmp): Likewise.
7723         (emit_case_bit_tests): Likewise.
7724         (switch_conversion::switch_conversion): New class.
7725         (struct switch_conv_info): Remove old struct.
7726         (collect_switch_conv_info): More to ...
7727         (switch_conversion::collect): ... this.
7728         (check_range): Likewise.
7729         (switch_conversion::check_range): Likewise.
7730         (check_all_empty_except_final): Likewise.
7731         (switch_conversion::check_all_empty_except_final): Likewise.
7732         (check_final_bb): Likewise.
7733         (switch_conversion::check_final_bb): Likewise.
7734         (create_temp_arrays): Likewise.
7735         (switch_conversion::create_temp_arrays): Likewise.
7736         (free_temp_arrays): Likewise.
7737         (gather_default_values): Likewise.
7738         (switch_conversion::gather_default_values): Likewise.
7739         (build_constructors): Likewise.
7740         (switch_conversion::build_constructors): Likewise.
7741         (constructor_contains_same_values_p): Likewise.
7742         (switch_conversion::contains_same_values_p): Likewise.
7743         (array_value_type): Likewise.
7744         (switch_conversion::array_value_type): Likewise.
7745         (build_one_array): Likewise.
7746         (switch_conversion::build_one_array): Likewise.
7747         (build_arrays): Likewise.
7748         (switch_conversion::build_arrays): Likewise.
7749         (gen_def_assigns): Likewise.
7750         (switch_conversion::gen_def_assigns): Likewise.
7751         (prune_bbs): Likewise.
7752         (switch_conversion::prune_bbs): Likewise.
7753         (fix_phi_nodes): Likewise.
7754         (switch_conversion::fix_phi_nodes): Likewise.
7755         (gen_inbound_check): Likewise.
7756         (switch_conversion::gen_inbound_check): Likewise.
7757         (process_switch): Use the newly created class.
7758         (switch_conversion::expand): New.
7759         (switch_conversion::~switch_conversion): New.
7760         * tree-switch-conversion.h: New file.
7762 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7764         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7765         tree-vect-patterns.c.
7766         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7767         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
7768         (vect_recog_sad_pattern): Likewise.
7769         (vect_recog_widen_sum_pattern): Likewise.
7770         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
7771         (vect_recog_widen_shift_pattern): Remove the type_in argument.
7772         (vect_recog_rotate_pattern): Likewise.
7773         (vect_recog_mult_pattern): Likewise.
7774         (vect_recog_vector_vector_shift_pattern): Likewise.
7775         (vect_recog_divmod_pattern): Likewise.
7776         (vect_recog_mixed_size_cond_pattern): Likewise.
7777         (vect_recog_bool_pattern): Likewise.
7778         (vect_recog_mask_conversion_pattern): Likewise.
7779         (vect_try_gather_scatter_pattern): Likewise.
7780         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
7781         (vect_recog_over_widening_pattern): Likewise.
7782         (vect_recog_gather_scatter_pattern): Likewise.
7783         (vect_recog_func_ptr): Move from tree-vectorizer.h
7784         (vect_vect_recog_func_ptrs): Move further down the file.
7785         (vect_recog_func): Likewise.  Remove the third argument.
7786         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7787         (vect_pattern_recog_1): Expect the pattern function to do any
7788         necessary target tests.  Also expect it to provide a vector type.
7789         Remove the type_in handling.
7791 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7793         * tree-vect-patterns.c (vect_pattern_detected): New function.
7794         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7795         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7796         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7797         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7798         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7799         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7800         (vect_recog_mask_conversion_pattern)
7801         (vect_try_gather_scatter_pattern): Likewise.
7803 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7805         * tree-vect-patterns.c (vect_get_internal_def): New function.
7806         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7807         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7808         (search_type_for_mask_1): Use it.
7810 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7812         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7813         redundant WIDEN_SUM_EXPR handling.
7814         (vect_recog_sad_pattern): Likewise.
7816 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7818         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7819         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7820         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7821         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7822         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7824 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7826         * tree-vect-stmts.c (vectorizable_call): Make sure that we
7827         use the stmt_vec_info of the original bb statement for the
7828         new zero assignment, even if the call is part of a pattern.
7830 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7832         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7833         that the sequence is attached to the original statement rather
7834         than the pattern statement.
7835         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7836         PATTERN_DEF_SEQ from the original statement rather than
7837         the main pattern statement.
7838         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7839         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7840         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7842 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7844         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7845         definition statements before the early exit for statements that aren't
7846         live or relevant.
7847         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7848         split out from...
7849         (vect_transform_loop): ...here.  Process pattern definition
7850         statements without first checking whether the main pattern
7851         statement is live or relevant.
7853 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
7855         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7856         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7858 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
7860         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7861         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7862         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7863         (expand_block_compare): Change select_block_compare_mode call.
7864         (expand_strncmp_align_check): Use new functions, fix comment.
7865         (emit_final_str_compare_gpr): New function.
7866         (expand_strn_compare): Refactor and clean up code.
7867         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7869 2018-06-19  Tony Reix  <tony.reix@atos.com>
7870             Damien Bergamini  <damien.bergamini@atos.com>
7871             David Edelsohn  <dje.gcc@gmail.com>
7873         * collect2.c (static_obj): New variable.
7874         (static_libs): New variable.
7875         (is_in_list): Uncomment declaration.
7876         (main): Track AIX libraries linked statically.
7877         (is_in_list): Uncomment definition.
7878         (scan_prog_file): Don't add AIX shared libraries initializer
7879         to constructor list if linking statically.
7881 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
7883         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
7884         constant.
7885         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
7887 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
7889         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
7890         blocks.
7892 2018-06-19  Martin Liska  <mliska@suse.cz>
7894         * config/i386/i386.c (ix86_can_inline_p): Do not use
7895         ipa_fn_summaries::get_create.
7896         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
7897         get.
7898         (devirtualization_time_bonus): Likewise.
7899         (ipcp_propagate_stage): Likewise.
7900         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7901         (edge_set_predicate): Likewise.
7902         (evaluate_conditions_for_known_args): Likewise.
7903         (evaluate_properties_for_edge): Likewise.
7904         (ipa_call_summary::reset): Tranform to ...
7905         (ipa_call_summary::~ipa_call_summary): ... this.
7906         (ipa_fn_summary::reset): Transform to ...
7907         (ipa_fn_summary::~ipa_fn_summary): ... this.
7908         (ipa_fn_summary_t::remove): Rename to ...
7909         (ipa_fn_summary_t::remove_callees): ... this.
7910         (ipa_fn_summary_t::duplicate): Use placement new
7911         instead of memory copy.
7912         (ipa_call_summary_t::duplicate): Likewise.
7913         (ipa_call_summary_t::remove): Remove.
7914         (dump_ipa_call_summary): Change get_create to get.
7915         (ipa_dump_fn_summary): Dump only when summary exists.
7916         (analyze_function_body): Use symbol_summary::get instead
7917         of get_create.
7918         (compute_fn_summary): Likewise.
7919         (estimate_edge_devirt_benefit): Likewise.
7920         (estimate_edge_size_and_time): Likewise.
7921         (inline_update_callee_summaries): Likewise.
7922         (remap_edge_change_prob): Likewise.
7923         (remap_edge_summaries): Likewise.
7924         (ipa_merge_fn_summary_after_inlining): Likewise.
7925         (write_ipa_call_summary): Likewise.
7926         (ipa_fn_summary_write): Likewise.
7927         (ipa_free_fn_summary): Likewise.
7928         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
7929         (struct ipa_call_summary): Likewise.
7930         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
7931         of get_create.
7932         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
7933         (estimate_size_after_inlining): Likewise.
7934         (estimate_growth): Likewise.
7935         (growth_likely_positive): Likewise.
7936         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7937         (inline_call): Likewise.
7938         * ipa-inline.c (caller_growth_limits): Likewise.
7939         (can_inline_edge_p): Likewise.
7940         (can_inline_edge_by_limits_p): Likewise.
7941         (compute_uninlined_call_time): Likewise.
7942         (compute_inlined_call_time): Likewise.
7943         (want_inline_small_function_p): Likewise.
7944         (edge_badness): Likewise.
7945         (update_caller_keys): Likewise.
7946         (update_callee_keys): Likewise.
7947         (inline_small_functions): Likewise.
7948         (inline_to_all_callers_1): Likewise.
7949         (dump_overall_stats): Likewise.
7950         (early_inline_small_functions): Likewise.
7951         (early_inliner): Likewise.
7952         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7953         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7954         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7955         * ipa-split.c (execute_split_functions): Likewise.
7956         * symbol-summary.h: Likewise.
7957         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7959 2018-06-19  Richard Biener  <rguenther@suse.de>
7961         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
7962         (vectorize_loops): ... here.  Fix dbgcnt handling.
7963         (try_vectorize_loop): Wrap try_vectorize_loop_1.
7965 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
7967         PR target/86197
7968         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7969         ieee128 argument takes up only one (vector) register, not two (floating
7970         point) registers.
7972 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
7974         * gimplify.c (gimplify_init_constructor): Really never clear for an
7975         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7977 2018-06-19  Richard Biener  <rguenther@suse.de>
7979         PR tree-optimization/86179
7980         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7981         after failed recognition.
7983 2018-06-18  Martin Sebor  <msebor@redhat.com>
7985         PR middle-end/85602
7986         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7987         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7988         Handle integer subtraction.
7989         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7990         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7992 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
7994         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7995         param from rtx to rtx_insn *.
7996         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7997         param.
7998         (frv_ifcvt_modify_insn): Likwise.
7999         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8000         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
8001         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8002         as_a <rtx_insn *> cast to local "unprotected_region" once
8003         it's been established that it's not NULL or pc_rtx.
8004         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8005         param "sethi" from rtx to rtx_insn *.
8006         (nds32_group_float_insns): Likewise for param "insn".
8007         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8008         param.
8009         (vax_output_int_subtract): Likewise.
8010         * config/vax/vax.c (vax_output_int_add): Likewise for param
8011         "insn".
8012         (vax_output_int_subtract): Likewise.
8013         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8014         (emit_pattern_after): Likewise for param "after".
8015         (emit_insn_after): Likewise.
8016         (emit_jump_insn_after): Likewise.
8017         (emit_call_insn_after): Likewise.
8018         (emit_debug_insn_after): Likewise.
8019         (emit_pattern_before): Likewise for param "before".
8020         (emit_insn_before): Likewise.
8021         (emit_jump_insn_before): Likewise.
8022         * final.c (get_insn_template): Likewise for param "insn", removing
8023         a cast.
8024         * output.h (get_insn_template): Likewise for 2nd param.
8025         * rtl.h (emit_insn_before): Likewise.
8026         (emit_jump_insn_before): Likewise.
8027         (emit_debug_insn_before_noloc): Likewise.
8028         (emit_insn_after): Likewise.
8029         (emit_jump_insn_after): Likewise.
8030         (emit_call_insn_after): Likewise.
8031         (emit_debug_insn_after): Likewise.
8032         (set_insn_deleted): Likewise for param.
8034 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
8036         PR target/85358
8037         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8038         floating point modes, so that IFmode is numerically greater than
8039         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8040         to declare the ordering.  This prevents IFmode from being
8041         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8042         machine.  Include rs6000-modes.h to share the fractional values
8043         between genmodes* and the rest of the compiler.
8044         (IFmode): Likewise.
8045         (KFmode): Likewise.
8046         (TFmode): Likewise.
8047         * config/rs6000/rs6000-modes.h: New file.
8048         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8049         meaning of rs6000_long_double_size so that 126..128 selects an
8050         appropriate 128-bit floating point type.
8051         (rs6000_option_override_internal): Likewise.
8052         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8053         (TARGET_LONG_DOUBLE_128): Change the meaning of
8054         rs6000_long_double_size so that 126..128 selects an appropriate
8055         128-bit floating point type.
8056         (LONG_DOUBLE_TYPE_SIZE): Update comment.
8057         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8058         source and destination to match the standard usage.
8059         (truncifkf2): Likewise.
8060         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8061         ISA 2.07 to use an explicit clobber, instead of passing in a
8062         temporary.
8063         (copysign<mode>3_soft): Likewise.
8065 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8067         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8068         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8069         (vect_slp_analyze_instance_dependence): Likewise.
8070         (vect_enhance_data_refs_alignment): Likewise.
8071         (vect_analyze_data_refs_alignment): Likewise.
8072         (vect_slp_analyze_and_verify_instance_alignment
8073         (vect_analyze_data_ref_accesses): Likewise.
8074         (vect_prune_runtime_alias_test_list): Likewise.
8075         (vect_analyze_data_refs): Likewise.
8076         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8077         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8078         (vect_analyze_scalar_cycles_1): Likewise.
8079         (vect_get_loop_niters): Likewise.
8080         (vect_analyze_loop_form_1): Likewise.
8081         (vect_update_vf_for_slp): Likewise.
8082         (vect_analyze_loop_operations): Likewise.
8083         (vect_analyze_loop): Likewise.
8084         (vectorizable_induction): Likewise.
8085         (vect_transform_loop): Likewise.
8086         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8087         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8088         (vect_make_slp_decision): Likewise.
8089         (vect_detect_hybrid_slp): Likewise.
8090         (vect_slp_analyze_operations): Likewise.
8091         (vect_slp_bb): Likewise.
8092         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8093         (vectorizable_bswap): Likewise.
8094         (vectorizable_call): Likewise.
8095         (vectorizable_simd_clone_call): Likewise.
8096         (vectorizable_conversion): Likewise.
8097         (vectorizable_assignment): Likewise.
8098         (vectorizable_shift): Likewise.
8099         (vectorizable_operation): Likewise.
8100         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8102 2018-06-18  Martin Sebor  <msebor@redhat.com>
8104         PR tree-optimization/81384
8105         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8106         * builtins.c (expand_builtin_strnlen): New function.
8107         (expand_builtin): Call it.
8108         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8109         * builtins.def (BUILT_IN_STRNLEN): New.
8110         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8111         Warn for bounds in excess of maximum object size.
8112         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8113         single-value ranges.  Handle strnlen.
8114         (handle_builtin_strlen): Handle strnlen.
8115         (strlen_check_and_optimize_stmt): Same.
8116         * doc/extend.texi (Other Builtins): Document strnlen.
8118 2018-06-18  Maya Rashish  <coypu@sdf.org>
8120         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8121         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8122         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8124         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8125         here to ...
8126         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8128 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8130         * tree.c (escaped_string::escape): Replace cast to char * by
8131         const_cast<char *> (unescaped).
8133 2018-06-18  Nick Clifton  <nickc@redhat.com>
8135         PR 84195
8136         * tree.c (escaped_string): New class.  Converts an unescaped
8137         string into its escaped equivalent.
8138         (warn_deprecated_use): Use the new class to convert the
8139         deprecation message, if present.
8140         (test_escaped_strings): New self test.
8141         (test_c_tests): Add test_escaped_strings.
8142         * doc/extend.texi (deprecated): Add a note that the
8143         deprecation message is affected by the -fmessage-length
8144         option, and that control characters will be escaped.
8145         (#pragma GCC error): Document this pragma.
8146         (#pragma GCC warning): Likewise.
8147         * doc/invoke.texi (-fmessage-length): Document this option's
8148         effect on the #warning and #error preprocessor directives and
8149         the deprecated attribute.
8151 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8153         * tree.c (decl_value_expr_lookup): Revert latest change.
8154         (decl_value_expr_insert): Likewise.
8156 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
8158         * gimplify.c (nonlocal_vlas): Delete.
8159         (nonlocal_vla_vars): Likewise.
8160         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8161         referenced VLAs.
8162         (gimplify_body): Do not create and destroy nonlocal_vlas.
8163         * tree-nested.c: Include diagnostic.h.
8164         (use_pointer_in_frame): Tweak.
8165         (lookup_field_for_decl): Add assertion and declare the transformation.
8166         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8167         internal error when the reference is in a wrong context.  Do not
8168         create a debug decl by default.
8169         (note_nonlocal_block_vlas): Delete.
8170         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8171         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
8172         create a debug decl by default.
8173         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8174         call is in a wrong context.
8175         (fixup_vla_decls): New function.
8176         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
8177         debug variables were created.
8178         * tree.c (decl_value_expr_lookup): Add checking assertion.
8179         (decl_value_expr_insert): Likewise.
8181 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8183         PR middle-end/82479
8184         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8185         * tree-scalar-evolution.c (interpret_expr): Likewise.
8186         (expression_expensive_p): Likewise.
8187         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8188         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8189         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8190         (ssa_defined_by_minus_one_stmt_p): New.
8192 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8194         PR middle-end/64946
8195         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8196         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8197         * dojump.c (do_jump): Likewise.
8198         * expr.c (expand_expr_real_2): Check operand type's sign.
8199         * fold-const.c (const_unop): Handle ABSU_EXPR.
8200         (fold_abs_const): Likewise.
8201         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8202         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8203         (strip_sign_op_1): Likesise.
8204         * match.pd: Add new pattern to generate ABSU_EXPR.
8205         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8206         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8207         * tree-eh.c (operation_could_trap_helper_p): Likewise.
8208         * tree-inline.c (estimate_operator_cost): Likewise.
8209         * tree-pretty-print.c (dump_generic_node): Likewise.
8210         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8211         * tree.def (ABSU_EXPR): New.
8213 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
8215         PR middle-end/86095
8216         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8217         documented as preserved for backward compatibility only.
8218         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8220         PR rtl-optimization/86108
8221         * bb-reorder.c (create_forwarder_block): Renamed to ...
8222         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
8223         jump from new landing pad to the second part.
8224         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8225         Adjust callers.
8227 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
8229         PR middle-end/85878
8230         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8231         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8232         Only call store_expr for halves if the mode is the same.
8234         PR middle-end/86123
8235         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8236         Fix up comment formatting.
8238 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8240         * typed-splay-tree.h (typed_splay_tree::remove): New function.
8241         (typed_splay_tree::closure,
8242         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8243         (typed_splay_tree::typed_splay_tree,
8244         typed_splay_tree::operator =): Declared private.
8245         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8246         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8247         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8248         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8249         typed_splay_tree::splay_tree_splay,
8250         typed_splay_tree::splay_tree_foreach_helper,
8251         typed_splay_tree::splay_tree_insert,
8252         typed_splay_tree::splay_tree_remove,
8253         typed_splay_tree::splay_tree_lookup,
8254         typed_splay_tree::splay_tree_predecessor,
8255         typed_splay_tree::splay_tree_successor,
8256         typed_splay_tree::splay_tree_min,
8257         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8258         (typed_splay_tree::root, typed_splay_tree::comp,
8259         typed_splay_tree::delete_key,
8260         typed_splay_tree::delete_value): New data members.
8261         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8262         typed_splay_tree::remove.
8264 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
8266         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8267         -mginv and -mno-ginv to the assembler.
8268         * config/mips/mips.opt (-mcrc): New option.
8269         (-mginv): Likewise.
8270         * doc/invoke.text (-mcrc): Document.
8271         (-mginv): Likewise.
8273 2018-06-15  Nick Clifton  <nickc@redhat.com>
8275         PR 84195
8276         * tree.c (escaped_string): New class.  Converts an unescaped
8277         string into its escaped equivalent.
8278         (warn_deprecated_use): Use the new class to convert the
8279         deprecation message, if present.
8280         (test_escaped_strings): New self test.
8281         (test_c_tests): Add test_escaped_strings.
8282         * doc/extend.texi (deprecated): Add a note that the
8283         deprecation message is affected by the -fmessage-length
8284         option, and that control characters will be escaped.
8285         (#pragma GCC error): Document this pragma.
8286         (#pragma GCC warning): Likewise.
8287         * doc/invoke.texi (-fmessage-length): Document this option's
8288         effect on the #warning and #error preprocessor directives and
8289         the deprecated attribute.
8291 2018-06-15  Richard Biener  <rguenther@suse.de>
8293         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8294         here, also noting vector size used.
8295         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
8296         size used in MSG_OPTIMIZED_LOCATIONS dump.
8297         (pass_slp_vectorize::execute): Adjust.
8299 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
8301         PR target/85968
8302         * config/arc/arc.c (arc_return_address_register): Fix
8303         if-condition.
8305 2018-06-15  Richard Biener  <rguenther@suse.de>
8307         PR middle-end/86159
8308         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8309         leave useless conversion stripping to force_gimple_operand_gsi.
8310         (gimplify_build2): Likewise.
8311         (gimplify_build1): Likewise.
8313 2018-06-15  Richard Biener  <rguenther@suse.de>
8315         PR middle-end/86076
8316         * tree-cfg.c (move_stmt_op): unshare invariant addresses
8317         before adjusting their block.
8319 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8321         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8322         multilibs for *-*-rtems*.
8323         * config/riscv/t-rtems: New file.
8325 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
8327         PR middle-end/86122
8328         * match.pd ((A +- CST1) +- CST2): Punt if last resort
8329         unsigned_type_for returns NULL.
8331         PR target/85945
8332         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8333         subregs of multi-word pseudos unless the float mode has word size.
8335 2018-06-14  Richard Biener  <rguenther@suse.de>
8337         PR middle-end/86139
8338         * tree-vect-generic.c (build_word_mode_vector_type): Remove
8339         duplicate and harmful type_hash_canon.
8340         * tree.c (type_hash_canon): Assert we didn't find ourselves.
8342 2018-06-14  Richard Biener  <rguenther@suse.de>
8344         PR ipa/86124
8345         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8346         NULL cgraph_node.
8348 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8350         * config/rtems.h (STDINT_LONG32): Define.
8352 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
8353             Prachi Godbole  <prachi.godbole@imgtec.com>
8355         * config/mips/mips-cpus.def: Define P6600.
8356         * config/mips/mips-tables.opt: Regenerate.
8357         * config/mips/mips.c (mips_ucbranch_type): New enum.
8358         (mips_rtx_cost_data): Add support for P6600.
8359         (mips_issue_rate): Likewise.
8360         (mips_multipass_dfa_lookahead): Likewise.
8361         (mips_avoid_hazard): Likewise.
8362         (mips_reorg_process_insns): Likewise.
8363         (mips_classify_branch_p6600): New function.
8364         * config/mips/mips.h (TUNE_P6600): New define.
8365         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8366         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8367         * config/mips/mips.md: Include p6600.md.
8368         (processor): Add p6600.
8369         * config/mips/p6600.md: New file.
8370         * doc/invoke.texi: Add p6600 to supported architectures.
8372 2018-06-13  Martin Sebor  <msebor@redhat.com>
8374         PR tree-optimization/86114
8375         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8376         of integer types.
8377         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8379 2018-06-13  Richard Biener  <rguenther@suse.de>
8381         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8382         Properly set vector type of the intermediate stmt.
8383         * tree-vect-stmts.c (vectorizable_operation): The destination
8384         var always has vectype_out type.
8386 2018-06-13  Jeff Law  <law@redhat.com>
8388         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8389         integer 0 for argument to print_rtl_with_bb.
8390         (rl78_reorg): Likewise.
8392 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
8394         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8395         from rtx to rtx_insn *.
8396         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8397         "label".
8398         (add_sched_insns_for_speculation): Likewise for local "target",
8399         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8400         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8401         from rtx_insn ** to rtx_code_label **.
8402         (reorg_emit_nops): Likewise.
8403         (c6x_reorg): Likewise for local "call_labels".
8404         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8405         rtx to rtx_insn *.
8406         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8407         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8408         the loops over LABEL_REFS.
8409         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8410         braf_label.
8411         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8412         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8413         (split_branches): Strengthen local "olabel" from rtx to
8414         rtx_insn *, adding a safe_as_a cast.
8415         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8416         to "rtx_insn *".
8417         (add_insn_after): Likewise for first two params.
8418         (add_insn_before): Likewise.
8419         (remove_insn): Likewise for param.
8420         (emit_pattern_before_noloc): Likewise for second and third params.
8421         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8422         (emit_call_insn_before_noloc): Likewise.
8423         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8424         to "rtx_insn *".
8425         (emit_barrier_before): Likewise.
8426         (emit_label_before): Strengthen "label" param from "rtx" to
8427         "rtx_code_label *".  Strengthen "before" param from "rtx" to
8428         "rtx_insn *".
8429         (emit_insn_after_1): Strengthen "after" param from "rtx" to
8430         "rtx_insn *".
8431         (emit_pattern_after_noloc): Likewise.
8432         (emit_insn_after_noloc): Likewise.
8433         (emit_jump_insn_after_noloc): Likewise.
8434         (emit_call_insn_after_noloc): Likewise.
8435         (emit_debug_insn_after_noloc): Likewise.
8436         (emit_barrier_after): Likewise.
8437         (emit_label_after): Likewise for both params.
8438         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
8439         "loc" param from "int" to "location_t".
8440         (emit_insn_after_setloc): Likewise.
8441         (emit_jump_insn_after_setloc): Likewise.
8442         (emit_call_insn_after_setloc): Likewise.
8443         (emit_debug_insn_after_setloc): Likewise.
8444         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
8445         "loc" param from "int" to "location_t".
8446         (emit_pattern_before): Convert NULL_RTX to NULL.
8447         (emit_insn_before_setloc): Convert "loc" param from "int" to
8448         "location_t".
8449         (emit_jump_insn_before_setloc): Likewise.
8450         (emit_call_insn_before_setloc): Likewise.
8451         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8452         rtx_insn *.  Convert "loc" param from "int" to "location_t".
8453         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8454         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8455         Convert 3rd param from "int" to "location_t".
8456         (emit_barrier_before, emit_barrier_after, next_real_insn):
8457         Strengthen param from rtx to rtx_insn *.
8458         (emit_label_before): Strengthen 1st param from "rtx" to
8459         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
8460         "rtx_insn *".
8461         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8462         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8463         Strengthen 2nd param from "rtx" to "rtx_insn *".
8464         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8465         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8466         Likewise. Convert 3rd param from "int" to "location_t".
8467         (emit_label_after): Strengthen 1st param from "rtx" to
8468         "rtx_code_label *".
8469         (next_real_insn, remove_insn): Strengthen param from "rtx" to
8470         "rtx_insn *".
8471         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8472         from "rtx" to "rtx_insn *".
8474 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
8476         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8477         bodies streamed in with -Q.
8478         * dumpfile.c (dump_files): Add lto-stream-out dump file.
8479         * dumpfile.h (tree_dump_index): Add lto_stream_out.
8480         * gimple-streamer-out.c: Include gimple-pretty-print.h
8481         (output_bb): Dump stmts streamed.
8482         * lto-section-out.c: Include print-tree.h
8483         (lto_begin_section): Dump sections created.
8484         (lto_output_decl_index): Dump decl encoded.
8485         * lto-streamer-out.c: Include print-tree.h
8486         (create_output_block): Dump output block created.
8487         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8488         (output_function): Dump function output.
8489         (output_constructor): Dump constructor streamed.
8490         (write_global_stream): Output indexes encoded.
8491         (produce_asm_for_decls): Dump streams encoded.
8492         * lto-streamer.c (streamer_dump_file): New global var.
8493         * lto-streamer.h (streamer_dump_file): Declare.
8494         * passes.c (ipa_write_summaries): Initialize streamer dump.
8495         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8496         in.
8498 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
8500         PR target/86048
8501         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8502         offsets for register save directives.  Emit a second batch of save
8503         directives, if need be, when the function accesses prior frames.
8505 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8507         * config/arc/fpu.md (fmasf4): Force operand to register.
8508         (fnmasf4): Likewise.
8510 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8512         * config/arc/arc-protos.h (arc_pad_return): Remove.
8513         * config/arc/arc.c (machine_function): Remove force_short_suffix
8514         and size_reason.
8515         (arc_print_operand): Adjust printing of '&'.
8516         (arc_verify_short): Remove conditional printing of short suffix.
8517         (arc_final_prescan_insn): Remove reference to size_reason.
8518         (pad_return): New function.
8519         (arc_reorg): Call pad_return.
8520         (arc_pad_return): Remove.
8521         (arc_init_machine_status): Remove reference to force_short_suffix.
8522         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8523         (attr length): When attribute iscompact is true force to 2
8524         regardless; in the case of maybe check if we want to force the
8525         instruction to have 4 bytes length.
8526         (nopv): Change it to generate 4 byte long nop as well.
8527         (blockage): New pattern.
8528         (simple_return): Remove call to arc_pad_return.
8529         (p_return_i): Likewise.
8531 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8533         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8535 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8537         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8538         ARC cores.
8540 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8542         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8543         for ARC700 and ARCv2.
8545 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
8547         PR target/86076
8548         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8549         operands[2] instead of operands[1].
8552 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
8554         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8555         case, check whether the outer register overlaps an unallocatable
8556         register, not just whether it fits the required class.
8558 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
8560         * poly-int.h (can_div_trunc_p): Add new overload in which all values
8561         are poly_ints.
8562         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8563         (memrefs_conflict_p): Likewise.
8564         (init_alias_analysis): Likewise.
8565         * cfgexpand.c (expand_debug_expr): Likewise.
8566         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8567         * cse.c (fold_rtx): Likewise.
8568         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8569         * expr.c (emit_block_move_hints): Likewise.
8570         (clear_storage_hints, push_block, emit_push_insn): Likewise.
8571         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8572         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8573         (emit_group_store): Likewise.
8574         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
8575         to read the PRE/POST_MODIFY increment.
8576         * calls.c (store_one_arg): Use strip_offset.
8577         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8578         poly_int_rtx_p.
8579         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8580         by a VEC_SELECT.
8581         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8582         (simplify_binary_operation_1): Extend CONST_INT handling to
8583         poly_int_rtx_p.
8584         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8585         than a HOST_WIDE_INT.
8586         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8587         poly_int64.
8588         (adjust_mems, add_stores): Update accodingly.
8589         (vt_canonicalize_addr): Track polynomial offsets.
8590         (emit_note_insn_var_location): Likewise.
8591         (vt_add_function_parameter): Likewise.
8592         (vt_initialize): Likewise.
8594 2018-06-12  Jeff Law  <law@redhat.com>
8596         * config.gcc (alpha*-*-freebsd*): Remove.
8597         * config/alpha/freebsd.h: Remove.
8599 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
8601         PR other/69968
8602         * spellcheck-tree.c (levenshtein_distance): Rename to...
8603         (get_edit_distance): ...this, and update for underlying renaming.
8604         * spellcheck-tree.h (levenshtein_distance): Rename to...
8605         (get_edit_distance): ...this.
8606         * spellcheck.c (levenshtein_distance): Rename to...
8607         (get_edit_distance): ...this.  Convert from Levenshtein distance
8608         to Damerau-Levenshtein distance by supporting transpositions of
8609         adjacent characters.  Rename "v1" to "v_next" and "v0" to
8610         "v_one_ago".
8611         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8612         (selftest::test_edit_distance_unit_test_oneway): ...this, and
8613         update for underlying renaming.
8614         (selftest::levenshtein_distance_unit_test): Rename to...
8615         (selftest::test_get_edit_distance_unit): ...this, and update for
8616         underlying renaming.
8617         (selftest::test_find_closest_string): Add example from PR 69968
8618         where transposition helps
8619         (selftest::test_metric_conditions): Update for renaming.
8620         (selftest::test_metric_conditions): Likewise.
8621         (selftest::spellcheck_c_tests): Likewise.
8622         * spellcheck.h (levenshtein_distance): Rename both overloads to...
8623         (get_edit_distance): ...this.
8624         (best_match::consider): Update for renaming.
8626 2018-06-12  Martin Sebor  <msebor@redhat.com>
8628         PR tree-optimization/85259
8629         * builtins.c (compute_objsize): Handle constant offsets.
8630         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8631         true iff a warning has been issued.
8632         * gimple.h (gimple_nonartificial_location): New function.
8633         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8634         gimple_nonartificial_location and handle -Wno-system-headers.
8635         (handle_builtin_stxncpy): Same.
8637 2018-06-12  Martin Sebor  <msebor@redhat.com>
8639         PR c/85931
8640         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8642 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
8644         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8645         BUILTIN_VEC_XST entries for pointer to double and long long.
8647 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
8649         PR target/85990
8650         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8651         Update comments.
8652         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8653         Likewise.
8655 2018-06-12  Martin Liska  <mliska@suse.cz>
8657         * doc/options.texi: Document IntegerRange.
8659 2018-06-12  Martin Liska  <mliska@suse.cz>
8661         * config/i386/i386.opt: Make MPX-related options as Deprecated.
8662         * opt-functions.awk: Handle Deprecated flag.
8663         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8664         and report error.
8665         (read_cmdline_option): Report warning for a deprecated option.
8666         * opts.h (struct cl_option): Add new field cl_deprecated.
8667         (CL_ERR_DEPRECATED): New.
8669 2018-06-12  Martin Liska  <mliska@suse.cz>
8671         * doc/options.texi: Document Deprecated option flag.
8673 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8675         * config/arc/arc-arch.h (arc_extras): New enum.
8676         (arc_cpu_t):Add field extra.
8677         (arc_cpu_types): Consider the extras.
8678         * config/arc/arc-cpus.def: Add extras info.
8679         * config/arc/arc-opts.h (processor_type): Consider extra field.
8680         * config/arc/arc.c (arc_override_options): Handle extra field.
8682 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8684         * config/arc/arc-arch.h: Update ARC_OPTX macro.
8685         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8686         field.
8687         * config/arc/arc.c (arc_init): Update pic warning.
8688         (irq_range): Update irq range parsing warnings.
8689         (arc_override_options): Update various warning messages.
8690         (arc_handle_aux_attribute): Likewise.
8692 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
8694         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8696 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8698         * doc/sourcebuild.texi: Document usage of line number 0 in verify
8699         compiler messages directives.
8701 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
8703         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8704         * config/mips/mips-tables.opt: Regenerate.
8705         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8706         mips64r6.
8707         * doc/invoke.texi: Document -march=i6500.
8709 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
8711         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8712         (i6400_gpmul): Add cpu_unit.
8713         (i6400_gpdiv): Likewise.
8714         (i6400_msa_add_d): Update reservations.
8715         (i6400_msa_int_add) Likewise.
8716         (i6400_msa_short_logic3) Likewise.
8717         (i6400_msa_short_logic2) Likewise.
8718         (i6400_msa_short_logic) Likewise.
8719         (i6400_msa_move) Likewise.
8720         (i6400_msa_cmp) Likewise.
8721         (i6400_msa_short_float2) Likewise.
8722         (i6400_msa_div_d) Likewise.
8723         (i6400_msa_long_logic1) Likewise.
8724         (i6400_msa_long_logic2) Likewise.
8725         (i6400_msa_mult) Likewise.
8726         (i6400_msa_long_float2) Likewise.
8727         (i6400_msa_long_float4) Likewise.
8728         (i6400_msa_long_float5) Likewise.
8729         (i6400_msa_long_float8) Likewise.
8730         (i6400_fpu_fadd): Include frint type.
8731         (i6400_fpu_store): New define_insn_reservation.
8732         (i6400_fpu_load): Likewise.
8733         (i6400_fpu_move): Likewise.
8734         (i6400_fpu_fcmp): Likewise.
8735         (i6400_fpu_fmadd): Likewise.
8736         (i6400_int_mult): Include imul3nc type and update reservation.
8737         (i6400_int_div): Include idiv3 type and update reservation.
8738         (i6400_int_load): Update to check type not move_type.
8739         (i6400_int_store): Likewise.
8740         (i6400_int_prefetch): Set zero latency.
8742 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
8744         * gcc.c: Document new %@{...} sequence.
8745         (LINK_COMMAND_SPEC): Use it for the -L switches.
8746         (cpp_unique_options): Use it for the -I switches.
8747         (at_file_argbuf): New global variable.
8748         (in_at_file): Likewise.
8749         (alloc_args): Create at_file_argbuf.
8750         (clear_args): Truncate at_file_argbuf.
8751         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8752         (open_at_file): New function.
8753         (close_at_file): Likewise.
8754         (create_at_file): Delete.
8755         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8756         <'o'>: Likewise.
8757         <'@'>: New case.
8758         (validate_switches_from_spec): Deal with %@{...} sequence.
8759         (validate_switches): Likewise.
8760         (driver::finalize): Call clear_args.
8762 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
8764         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8766 2018-06-11  Martin Sebor  <msebor@redhat.com>
8768         * doc/invoke.texi (-Wall): List -Wc++17-compat.
8769         (Wno-class-memaccess): Add @opindex.
8770         (Wno-templates, Wno-multiple-inheritance): Same.
8771         (Wno-virtual-inheritance, Wno-namespaces): Same.
8772         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8773         (Wno-format-overflow, Wno-format-truncation): Same.
8774         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8775         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8776         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8777         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8778         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8779         (Wno-misspelled-isr): Same.
8781 2018-06-11  Martin Sebor  <msebor@redhat.com>
8783         * PR tree-optimization/86083
8784         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8786 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
8788         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8790 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
8792         PR target/85755
8793         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8794         on the correct operand.
8795         (*movdi_internal64): Ditto.
8797 2018-06-11  Martin Liska  <mliska@suse.cz>
8799         PR tree-optimization/86089
8800         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8802 2018-06-11  Julia Koval  <julia.koval@intel.com>
8804         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8805         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8806         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8808 2018-06-11  Olivier Hainque  <hainque@adacore.com>
8810         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8811         for Ada with strict dwarf2.
8813 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
8815         PR target/85755
8816         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8817         addresses.
8819 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
8821         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8823 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
8825         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8826         TARGET_ELF.
8828 2018-06-08  Martin Liska  <mliska@suse.cz>
8830         * tree-cfg.h (debug_function): Fix argument type to match
8831         implementation.
8833 2018-06-08  Martin Liska  <mliska@suse.cz>
8835         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8836         Remove usage of MPX-related (and removed) fields.
8837         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8839 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
8841         * cfg.c (debug): Use TDF_NONE rather than 0.
8842         * cfghooks.c (debug): Likewise.
8843         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8844         (struct dump_option_value_info): Convert to...
8845         (struct kv_pair): ...this template type.
8846         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8847         rather than 0.
8848         (optinfo_verbosity_options): Likewise.
8849         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8850         OPTGROUP_NONE.
8851         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8852         than int for "optgroup_flags" param.
8853         (dump_generic_expr_loc): Use dump_flags_t rather than int for
8854         "dump_kind" param.
8855         (dump_dec): Likewise.
8856         (dump_finish): Use TDF_NONE rather than 0.
8857         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8858         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
8859         than 0.  Update for change to option_ptr.
8860         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8861         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
8862         0.  Update for changes to optinfo_verbosity_options and
8863         optgroup_options.
8864         (opt_info_switch_p): Convert optgroup_flags from int to
8865         optgroup_flags_t.
8866         (dump_basic_block): Use dump_flags_t rather than int
8867         for "dump_kind" param.
8868         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8869         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8870         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8871         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8872         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8873         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8874         TDF_NONE): Convert from macros to...
8875         (enum dump_flag): ...this new enum.
8876         (dump_flags_t): Update to use enum.
8877         (operator|, operator&, operator~, operator|=, operator&=):
8878         Implement for dump_flags_t.
8879         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
8880         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
8881         Convert from macros to...
8882         (enum optgroup_flag): ...this new enum.
8883         (optgroup_flags_t): New typedef.
8884         (operator|, operator|=): Implement for optgroup_flags_t.
8885         (struct dump_file_info): Convert field "alt_flags" to
8886         dump_flags_t.  Convert field "optgroup_flags" to
8887         optgroup_flags_t.
8888         (dump_basic_block): Use dump_flags_t rather than int for param.
8889         (dump_generic_expr_loc): Likewise.
8890         (dump_dec): Likewise.
8891         (dump_register): Convert param "optgroup_flags" to
8892         optgroup_flags_t.
8893         (opt_info_enable_passes): Likewise.
8894         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
8895         than 0.
8896         * gimple-pretty-print.c (debug): Likewise.
8897         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
8898         (merged_store_group::apply_stores): Likewise.
8899         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
8900         * gimple.c (verify_gimple_pp): Likewise.
8901         * graphite-poly.c (print_pbb_body): Likewise.
8902         * passes.c (pass_manager::register_one_dump_file): Convert
8903         local "optgroup_flags" to optgroup_flags_t.
8904         * print-tree.c (print_node): Use TDF_NONE rather than 0.
8905         (debug): Likewise.
8906         (debug_body): Likewise.
8907         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
8908         to optgroup_flags_t.
8909         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
8910         than 0.
8911         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
8912         (convert_mult_to_fma): Likewise.
8913         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
8914         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
8915         * tree-vect-data-refs.c (dump_lower_bound): Convert param
8916         "dump_kind" to dump_flags_t.
8918 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
8920         * config/rs6000/rs6000.c (min, max): Delete.
8922 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
8924         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
8925         -mabi=spe and -mabi=no-spe.
8927 2018-06-08  Martin Liska  <mliska@suse.cz>
8929         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
8930         where we expect an existing summary.
8932 2018-06-08  Martin Liska  <mliska@suse.cz>
8934         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
8935         * ipa-inline.h (estimate_edge_growth): Likewise.
8937 2018-06-08  Martin Liska  <mliska@suse.cz>
8939         * cgraph.c (function_version_hasher::hash): Use
8940         cgraph_node::get_uid ().
8941         (function_version_hasher::equal):
8942         * cgraph.h (cgraph_node::get_uid): New method.
8943         * ipa-inline.c (update_caller_keys): Use
8944         cgraph_node::get_uid ().
8945         (update_callee_keys): Likewise.
8946         * ipa-utils.c (searchc): Likewise.
8947         (ipa_reduced_postorder): Likewise.
8948         * lto-cgraph.c (input_node): Likewise.
8949         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
8950         * symbol-summary.h (symtab_insertion): Likewise.
8951         (symtab_removal): Likewise.
8952         (symtab_duplication): Likewise.
8953         * tree-pretty-print.c (dump_function_header): Likewise.
8954         * tree-sra.c (convert_callers_for_node): Likewise.
8956 2018-06-08  Martin Liska  <mliska@suse.cz>
8958         * cgraph.c (symbol_table::create_edge): Always assign a new
8959         unique number.
8960         (symbol_table::free_edge): Do not recycle numbers.
8961         * cgraph.h (cgraph_edge::get): New method.
8962         * symbol-summary.h (symtab_removal): Use it.
8963         (symtab_duplication): Likewise.
8964         (call_summary::hashable_uid): Remove.
8966 2018-06-08  Martin Liska  <mliska@suse.cz>
8968         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8969         (initialize_growth_caches): Remove.
8970         (free_growth_caches): Likewise.
8971         (do_estimate_edge_time): Use edge_growth_cache.
8972         (do_estimate_edge_size): Likewise.
8973         (do_estimate_edge_hints): Likewise.
8974         * ipa-inline.c (reset_edge_caches): Likewise.
8975         (recursive_inlining): Likewise.
8976         (inline_small_functions): Likewise.
8977         * ipa-inline.h (initialize_growth_caches): Remove.
8978         (estimate_edge_size): Likewise.
8979         (estimate_edge_time): Likewise.
8980         (estimate_edge_hints): Likewise.
8981         (reset_edge_growth_cache): Likewise.
8982         * symbol-summary.h (call_summary::remove): New method.
8984 2018-06-08  Martin Liska  <mliska@suse.cz>
8986         * ipa-cp.c (class edge_clone_summary): New summary.
8987         (grow_edge_clone_vectors): Remove.
8988         (ipcp_edge_duplication_hook): Remove.
8989         (class edge_clone_summary_t): New call_summary class.
8990         (ipcp_edge_removal_hook): Remove.
8991         (edge_clone_summary_t::duplicate): New function.
8992         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8993         (create_specialized_node): Likewise.
8994         (ipcp_driver): Initialize edge_clone_summaries and do not
8995         register hooks.
8997 2018-06-08  Martin Liska  <mliska@suse.cz>
8999         * symbol-summary.h (get): New function.
9000         (call_summary::m_initialize_when_cloning): New class member.
9002 2018-06-08  Martin Liska  <mliska@suse.cz>
9004         * cgraph.c (cgraph_node::remove): Do not recycle uid.
9005         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9006         (symbol_table::allocate_cgraph_symbol): Do not set uid.
9007         * passes.c (uid_hash_t): Record removed_nodes by their uids.
9008         (remove_cgraph_node_from_order): Use the removed_nodes set.
9009         (do_per_function_toporder): Likwise.
9010         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9011         instead of summary_uid.
9012         (symtab_removal): Likewise.
9013         (symtab_duplication): Likewise.
9015 2018-06-08  Martin Liska  <mliska@suse.cz>
9017         * ipa-cp.c (ipcp_store_bits_results): Use
9018         ipcp_transformation_sum.
9019         (ipcp_store_vr_results): Likewise.
9020         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9021         to ...
9022         (ipcp_transformation_initialize): ... this.
9023         (ipa_set_node_agg_value_chain):
9024         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9025         (write_ipcp_transformation_info): Likewise.
9026         (read_ipcp_transformation_info): Likewise.
9027         (ipcp_update_bits): Likewise.
9028         (ipcp_update_vr): Likewise.
9029         (ipcp_transform_function): Likewise.
9030         * ipa-prop.h: Rename ipcp_transformation_summary to
9031         ipcp_transformation.
9032         (class ipcp_transformation_t): New function summary.
9033         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9034         (ipa_get_agg_replacements_for_node): Likewise.
9036 2018-06-08  Martin Liska  <mliska@suse.cz>
9038         * ipa-pure-const.c (struct funct_state_d): Do it class instead
9039         of struct.
9040         (class funct_state_summary_t): New function_summary class.
9041         (has_function_state): Remove.
9042         (get_function_state): Likewise.
9043         (set_function_state): Likewise.
9044         (add_new_function): Likewise.
9045         (funct_state_summary_t::insert): New function.
9046         (duplicate_node_data): Remove.
9047         (remove_node_data): Remove.
9048         (funct_state_summary_t::duplicate): New function.
9049         (register_hooks): Create new funct_state_summaries.
9050         (pure_const_generate_summary): Use it.
9051         (pure_const_write_summary): Likewise.
9052         (pure_const_read_summary): Likewise.
9053         (propagate_pure_const): Likewise.
9054         (propagate_nothrow): Likewise.
9055         (dump_malloc_lattice): Likewise.
9056         (propagate_malloc): Likewise.
9057         (execute): Do not register hooks, just remove summary
9058         instead.
9059         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9060         constructor.
9062 2018-06-08  Martin Liska  <mliska@suse.cz>
9064         * ipa-reference.c (remove_node_data): Remove.
9065         (duplicate_node_data): Likewise.
9066         (class ipa_ref_var_info_summary_t): New class.
9067         (class ipa_ref_opt_summary_t): Likewise.
9068         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9069         (get_reference_optimization_summary): Use
9070         ipa_ref_opt_sum_summaries.
9071         (set_reference_vars_info): Remove.
9072         (set_reference_optimization_summary): Likewise.
9073         (ipa_init): Create summaries.
9074         (init_function_info): Use function summary.
9075         (ipa_ref_opt_summary_t::duplicate): New function.
9076         (ipa_ref_opt_summary_t::remove): New function.
9077         (get_read_write_all_from_node): Fix GNU coding style.
9078         (propagate): Use function summary.
9079         (write_node_summary_p): Fix GNU coding style.
9080         (stream_out_bitmap): Likewise.
9081         (ipa_reference_read_optimization_summary): Use function summary.
9082         (ipa_reference_c_finalize): Do not release hooks.
9084 2018-06-08  Martin Liska  <mliska@suse.cz>
9086         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9087         (analyze_function_body): Extract multiple calls of get_create.
9088         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9089         * ipa-inline.c (recursive_inlining): Use ::get method.
9090         * ipa-inline.h (estimate_edge_growth): Likewise.
9092 2018-06-08  Martin Liska  <mliska@suse.cz>
9094         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9095         HSA_INVALID.
9096         (hsa_function_summary::hsa_function_summary): Use the new enum
9097         value.
9098         (hsa_gpu_implementation_p): Use hsa_summaries::get.
9099         * hsa-gen.c (hsa_get_host_function): Likewise.
9100         (get_brig_function_name): Likewise.
9101         * ipa-hsa.c (process_hsa_functions): Likewise.
9102         (ipa_hsa_write_summary): Likewise.
9103         * symbol-summary.h (symtab_duplication): Use ::get function/
9104         (get): New function.
9106 2018-06-08  Martin Liska  <mliska@suse.cz>
9108         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9109         of get.
9110         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9111         (hsa_register_kernel): Likewise.
9112         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9113         * hsa-gen.c (hsa_get_host_function): Likewise.
9114         (get_brig_function_name): Likewise.
9115         (generate_hsa): Likewise.
9116         (pass_gen_hsail::execute): Likewise.
9117         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9118         (devirtualization_time_bonus): Likewise.
9119         (ipcp_propagate_stage): Likewise.
9120         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9121         (edge_set_predicate): Likewise.
9122         (evaluate_conditions_for_known_args): Likewise.
9123         (evaluate_properties_for_edge): Likewise.
9124         (ipa_fn_summary::reset): Likewise.
9125         (ipa_fn_summary_t::duplicate): Likewise.
9126         (dump_ipa_call_summary): Likewise.
9127         (ipa_dump_fn_summary): Likewise.
9128         (analyze_function_body): Likewise.
9129         (compute_fn_summary): Likewise.
9130         (estimate_edge_devirt_benefit): Likewise.
9131         (estimate_edge_size_and_time): Likewise.
9132         (estimate_calls_size_and_time): Likewise.
9133         (estimate_node_size_and_time): Likewise.
9134         (inline_update_callee_summaries): Likewise.
9135         (remap_edge_change_prob): Likewise.
9136         (remap_edge_summaries): Likewise.
9137         (ipa_merge_fn_summary_after_inlining): Likewise.
9138         (ipa_update_overall_fn_summary): Likewise.
9139         (read_ipa_call_summary): Likewise.
9140         (inline_read_section): Likewise.
9141         (write_ipa_call_summary): Likewise.
9142         (ipa_fn_summary_write): Likewise.
9143         (ipa_free_fn_summary): Likewise.
9144         * ipa-hsa.c (process_hsa_functions): Likewise.
9145         (ipa_hsa_write_summary): Likewise.
9146         (ipa_hsa_read_section): Likewise.
9147         * ipa-icf.c (sem_function::merge): Likewise.
9148         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9149         (do_estimate_edge_time): Likewise.
9150         (estimate_size_after_inlining): Likewise.
9151         (estimate_growth): Likewise.
9152         (growth_likely_positive): Likewise.
9153         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9154         (inline_call): Likewise.
9155         * ipa-inline.c (caller_growth_limits): Likewise.
9156         (can_inline_edge_p): Likewise.
9157         (can_inline_edge_by_limits_p): Likewise.
9158         (compute_uninlined_call_time): Likewise.
9159         (compute_inlined_call_time): Likewise.
9160         (want_inline_small_function_p): Likewise.
9161         (edge_badness): Likewise.
9162         (update_caller_keys): Likewise.
9163         (update_callee_keys): Likewise.
9164         (recursive_inlining): Likewise.
9165         (inline_small_functions): Likewise.
9166         (inline_to_all_callers_1): Likewise.
9167         (dump_overall_stats): Likewise.
9168         (early_inline_small_functions): Likewise.
9169         (early_inliner): Likewise.
9170         * ipa-inline.h (estimate_edge_growth): Likewise.
9171         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9172         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9173         * ipa-prop.h (IPA_NODE_REF): Likewise.
9174         (IPA_EDGE_REF): Likewise.
9175         * ipa-pure-const.c (malloc_candidate_p): Likewise.
9176         (propagate_malloc): Likewise.
9177         * ipa-split.c (execute_split_functions): Likewise.
9178         * symbol-summary.h: Rename get to get_create.
9179         (get): Likewise.
9180         (get_create): Likewise.
9181         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9183 2018-06-08  Martin Liska  <mliska@suse.cz>
9185         * symbol-summary.h (release): Move definition out of class
9186         declaration.
9187         (symtab_removal): Likewise.
9188         (symtab_duplication): Likewise.
9190 2018-06-08  Martin Liska  <mliska@suse.cz>
9192         * symbol-summary.h (function_summary): Move constructor
9193         implementation out of class declaration.
9194         (release): Likewise.
9195         (symtab_insertion): Likewise.
9196         (symtab_removal): Likewise.
9197         (symtab_duplication): Likewise.
9198         (get): Likewise.
9200 2018-06-08  Martin Liska  <mliska@suse.cz>
9202         * Makefile.in: Remove support for MPX (macros, related functions,
9203         fields in cgraph_node, ...).
9204         * builtin-types.def (BT_BND): Likewise.
9205         (BT_FN_BND_CONST_PTR): Likewise.
9206         (BT_FN_CONST_PTR_BND): Likewise.
9207         (BT_FN_VOID_PTR_BND): Likewise.
9208         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9209         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9210         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9211         (expand_builtin_mempcpy_with_bounds): Likewise.
9212         (expand_builtin_memset_with_bounds): Likewise.
9213         (expand_builtin_memset_args): Likewise.
9214         (std_expand_builtin_va_start): Likewise.
9215         (expand_builtin): Likewise.
9216         (expand_builtin_with_bounds): Likewise.
9217         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9218         (DEF_LIB_BUILTIN_CHKP): Likewise.
9219         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9220         (DEF_CHKP_BUILTIN): Likewise.
9221         (BUILT_IN_MEMCPY): Likewise.
9222         (BUILT_IN_MEMMOVE): Likewise.
9223         (BUILT_IN_MEMPCPY): Likewise.
9224         (BUILT_IN_MEMSET): Likewise.
9225         (BUILT_IN_STPCPY): Likewise.
9226         (BUILT_IN_STRCAT): Likewise.
9227         (BUILT_IN_STRCHR): Likewise.
9228         (BUILT_IN_STRCPY): Likewise.
9229         (BUILT_IN_STRLEN): Likewise.
9230         (BUILT_IN_MEMCPY_CHK): Likewise.
9231         (BUILT_IN_MEMMOVE_CHK): Likewise.
9232         (BUILT_IN_MEMPCPY_CHK): Likewise.
9233         (BUILT_IN_MEMSET_CHK): Likewise.
9234         (BUILT_IN_STPCPY_CHK): Likewise.
9235         (BUILT_IN_STRCAT_CHK): Likewise.
9236         (BUILT_IN_STRCPY_CHK): Likewise.
9237         * calls.c (store_bounds): Likewise.
9238         (emit_call_1): Likewise.
9239         (special_function_p): Likewise.
9240         (maybe_warn_nonstring_arg): Likewise.
9241         (initialize_argument_information): Likewise.
9242         (finalize_must_preallocate): Likewise.
9243         (compute_argument_addresses): Likewise.
9244         (expand_call): Likewise.
9245         * cfgexpand.c (expand_call_stmt): Likewise.
9246         (expand_return): Likewise.
9247         (expand_gimple_stmt_1): Likewise.
9248         (pass_expand::execute): Likewise.
9249         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9250         (cgraph_node::remove): Likewise.
9251         (cgraph_node::dump): Likewise.
9252         (cgraph_node::verify_node): Likewise.
9253         * cgraph.h (chkp_function_instrumented_p): Likewise.
9254         (symtab_node::get_alias_target): Likewise.
9255         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9256         (cgraph_local_p): Likewise.
9257         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9258         (cgraph_edge::rebuild_references): Likewise.
9259         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9260         (walk_polymorphic_call_targets): Likewise.
9261         (cgraph_node::expand_thunk): Likewise.
9262         (symbol_table::output_weakrefs): Likewise.
9263         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9264         (ix86_handle_option): Likewise.
9265         * config/i386/constraints.md: Likewise.
9266         * config/i386/i386-builtin-types.def (BND): Likewise.
9267         (VOID): Likewise.
9268         (PVOID): Likewise.
9269         (ULONG): Likewise.
9270         * config/i386/i386-builtin.def (BDESC_END): Likewise.
9271         (BDESC_FIRST): Likewise.
9272         (BDESC): Likewise.
9273         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9274         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9275         * config/i386/i386.c (enum reg_class): Likewise.
9276         (ix86_target_string): Likewise.
9277         (ix86_option_override_internal): Likewise.
9278         (ix86_conditional_register_usage): Likewise.
9279         (ix86_valid_target_attribute_inner_p): Likewise.
9280         (ix86_set_indirect_branch_type): Likewise.
9281         (ix86_set_current_function): Likewise.
9282         (ix86_function_arg_regno_p): Likewise.
9283         (init_cumulative_args): Likewise.
9284         (ix86_function_arg_advance): Likewise.
9285         (ix86_function_arg): Likewise.
9286         (ix86_pass_by_reference): Likewise.
9287         (ix86_function_value_regno_p): Likewise.
9288         (ix86_function_value_1): Likewise.
9289         (ix86_function_value_bounds): Likewise.
9290         (ix86_return_in_memory): Likewise.
9291         (ix86_setup_incoming_vararg_bounds): Likewise.
9292         (ix86_va_start): Likewise.
9293         (indirect_thunk_need_prefix): Likewise.
9294         (print_reg): Likewise.
9295         (ix86_print_operand): Likewise.
9296         (ix86_expand_call): Likewise.
9297         (ix86_output_function_return): Likewise.
9298         (reg_encoded_number): Likewise.
9299         (BDESC_VERIFYS): Likewise.
9300         (ix86_init_mpx_builtins): Likewise.
9301         (ix86_init_builtins): Likewise.
9302         (ix86_emit_cmove): Likewise.
9303         (ix86_emit_move_max): Likewise.
9304         (ix86_expand_builtin): Likewise.
9305         (ix86_builtin_mpx_function): Likewise.
9306         (ix86_get_arg_address_for_bt): Likewise.
9307         (ix86_load_bounds): Likewise.
9308         (ix86_store_bounds): Likewise.
9309         (ix86_load_returned_bounds): Likewise.
9310         (ix86_store_returned_bounds): Likewise.
9311         (ix86_class_likely_spilled_p): Likewise.
9312         (ix86_hard_regno_mode_ok): Likewise.
9313         (x86_order_regs_for_local_alloc): Likewise.
9314         (ix86_mitigate_rop): Likewise.
9315         (ix86_bnd_prefixed_insn_p): Likewise.
9316         (ix86_mpx_bound_mode): Likewise.
9317         (ix86_make_bounds_constant): Likewise.
9318         (ix86_initialize_bounds): Likewise.
9319         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9320         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9321         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9322         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9323         (TARGET_CHKP_BOUND_MODE): Likewise.
9324         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9325         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9326         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9327         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9328         * config/i386/i386.h (TARGET_MPX): Likewise.
9329         (TARGET_MPX_P): Likewise.
9330         (VALID_BND_REG_MODE): Likewise.
9331         (FIRST_BND_REG): Likewise.
9332         (LAST_BND_REG): Likewise.
9333         (enum reg_class): Likewise.
9334         (BND_REG_P): Likewise.
9335         (BND_REGNO_P): Likewise.
9336         (BNDmode): Likewise.
9337         (ADJUST_INSN_LENGTH): Likewise.
9338         * config/i386/i386.md: Likewise.
9339         * config/i386/i386.opt: Likewise.
9340         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9341         (defined): Likewise.
9342         (LINK_MPX): Likewise.
9343         (MPX_SPEC): Likewise.
9344         (LIBMPX_SPEC): Likewise.
9345         (LIBMPXWRAPPERS_SPEC): Likewise.
9346         (CHKP_SPEC): Likewise.
9347         * config/i386/predicates.md: Likewise.
9348         * dbxout.c (dbxout_type): Likewise.
9349         * doc/extend.texi: Likewise.
9350         * doc/invoke.texi: Likewise.
9351         * doc/md.texi: Likewise.
9352         * doc/tm.texi: Likewise.
9353         * doc/tm.texi.in: Likewise.
9354         * dwarf2out.c (is_base_type): Likewise.
9355         (gen_formal_types_die): Likewise.
9356         (gen_subprogram_die): Likewise.
9357         (gen_type_die_with_usage): Likewise.
9358         (gen_decl_die): Likewise.
9359         (dwarf2out_late_global_decl): Likewise.
9360         * expr.c (expand_assignment): Likewise.
9361         (emit_storent_insn): Likewise.
9362         (store_expr_with_bounds): Likewise.
9363         (store_expr): Likewise.
9364         (expand_expr_real_1): Likewise.
9365         * expr.h (store_expr_with_bounds): Likewise.
9366         * function.c (use_register_for_decl): Likewise.
9367         (struct bounds_parm_data): Likewise.
9368         (assign_parms_augmented_arg_list): Likewise.
9369         (assign_parm_find_entry_rtl): Likewise.
9370         (assign_parm_is_stack_parm): Likewise.
9371         (assign_parm_load_bounds): Likewise.
9372         (assign_bounds): Likewise.
9373         (assign_parms): Likewise.
9374         (expand_function_start): Likewise.
9375         * gcc.c (CHKP_SPEC): Likewise.
9376         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9377         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9378         (wrestrict_dom_walker::check_call): Likewise.
9379         * gimple.c (gimple_build_call_from_tree): Likewise.
9380         * gimple.h (enum gf_mask): Likewise.
9381         (gimple_call_with_bounds_p): Likewise.
9382         (gimple_call_set_with_bounds): Likewise.
9383         * gimplify.c (gimplify_init_constructor): Likewise.
9384         * ipa-cp.c (initialize_node_lattices): Likewise.
9385         (propagate_constants_across_call): Likewise.
9386         (find_more_scalar_values_for_callers_subset): Likewise.
9387         * ipa-hsa.c (process_hsa_functions): Likewise.
9388         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9389         * ipa-icf.c (sem_function::merge): Likewise.
9390         * ipa-inline.c (early_inliner): Likewise.
9391         * ipa-pure-const.c (warn_function_noreturn): Likewise.
9392         (warn_function_cold): Likewise.
9393         (propagate_pure_const): Likewise.
9394         * ipa-ref.h (enum GTY): Likewise.
9395         * ipa-split.c (find_retbnd): Likewise.
9396         (consider_split): Likewise.
9397         (split_function): Likewise.
9398         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9399         * ipa.c (walk_polymorphic_call_targets): Likewise.
9400         (symbol_table::remove_unreachable_nodes): Likewise.
9401         (process_references): Likewise.
9402         (cgraph_build_static_cdtor_1): Likewise.
9403         * lto-cgraph.c (lto_output_node): Likewise.
9404         (output_refs): Likewise.
9405         (compute_ltrans_boundary): Likewise.
9406         (input_overwrite_node): Likewise.
9407         (input_node): Likewise.
9408         (input_cgraph_1): Likewise.
9409         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9410         * passes.c (pass_manager::execute_early_local_passes): Likewise.
9411         (class pass_chkp_instrumentation_passes): Likewise.
9412         (make_pass_chkp_instrumentation_passes): Likewise.
9413         * passes.def: Likewise.
9414         * rtl.h (struct GTY): Likewise.
9415         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9416         * stor-layout.c (layout_type): Likewise.
9417         * symtab.c: Likewise.
9418         * target.def: Likewise.
9419         * targhooks.c (default_chkp_bound_type): Likewise.
9420         (default_chkp_bound_mode): Likewise.
9421         (default_builtin_chkp_function): Likewise.
9422         (default_chkp_function_value_bounds): Likewise.
9423         (default_chkp_make_bounds_constant): Likewise.
9424         (default_chkp_initialize_bounds): Likewise.
9425         * targhooks.h (default_chkp_bound_type): Likewise.
9426         (default_chkp_bound_mode): Likewise.
9427         (default_builtin_chkp_function): Likewise.
9428         (default_chkp_function_value_bounds): Likewise.
9429         (default_chkp_make_bounds_constant): Likewise.
9430         (default_chkp_initialize_bounds): Likewise.
9431         * toplev.c (compile_file): Likewise.
9432         (process_options): Likewise.
9433         * tree-core.h (DEF_BUILTIN): Likewise.
9434         (DEF_BUILTIN_CHKP): Likewise.
9435         * tree-inline.c (declare_return_variable): Likewise.
9436         (remap_gimple_stmt): Likewise.
9437         (copy_bb): Likewise.
9438         (initialize_inlined_parameters): Likewise.
9439         (expand_call_inline): Likewise.
9440         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9441         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9442         (make_pass_ipa_chkp_produce_thunks): Likewise.
9443         (make_pass_chkp): Likewise.
9444         (make_pass_chkp_opt): Likewise.
9445         (make_pass_chkp_instrumentation_passes): Likewise.
9446         * tree-pretty-print.c (dump_generic_node): Likewise.
9447         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9448         * tree-ssa-dce.c (propagate_necessity): Likewise.
9449         (eliminate_unnecessary_stmts): Likewise.
9450         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9451         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9452         * tree-ssa-sccvn.h: Likewise.
9453         * tree-ssa-strlen.c (get_string_length): Likewise.
9454         (valid_builtin_call): Likewise.
9455         (adjust_last_stmt): Likewise.
9456         (handle_builtin_strchr): Likewise.
9457         (handle_builtin_strcpy): Likewise.
9458         (handle_builtin_stxncpy): Likewise.
9459         (handle_builtin_memcpy): Likewise.
9460         (handle_builtin_strcat): Likewise.
9461         (strlen_check_and_optimize_stmt): Likewise.
9462         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9463         * tree-streamer-in.c: Likewise.
9464         * tree-streamer.c (record_common_node): Likewise.
9465         * tree.c (tree_code_size): Likewise.
9466         (wide_int_to_tree_1): Likewise.
9467         (type_contains_placeholder_1): Likewise.
9468         (build_common_tree_nodes): Likewise.
9469         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9470         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9471         (POINTER_BOUNDS_P): Likewise.
9472         (BOUNDED_TYPE_P): Likewise.
9473         (BOUNDED_P): Likewise.
9474         (CALL_WITH_BOUNDS_P): Likewise.
9475         (pointer_bounds_type_node): Likewise.
9476         * value-prof.c (gimple_ic): Likewise.
9477         * var-tracking.c (vt_add_function_parameters): Likewise.
9478         * varasm.c (make_decl_rtl): Likewise.
9479         (assemble_start_function): Likewise.
9480         (output_constant): Likewise.
9481         (maybe_assemble_visibility): Likewise.
9482         * varpool.c (ctor_for_folding): Likewise.
9483         * chkp-builtins.def: Remove.
9484         * ipa-chkp.c: Remove.
9485         * ipa-chkp.h: Remove.
9486         * rtl-chkp.c: Remove.
9487         * rtl-chkp.h: Remove.
9488         * tree-chkp-opt.c: Remove.
9489         * tree-chkp.c: Remove.
9490         * tree-chkp.h: Remove.
9492 2018-06-07  Carl Love  <cel@us.ibm.com>
9494         * config/rs6000/vsx.md (vextract_fp_from_shorth,
9495         vextract_fp_from_shortl): Add BE support.
9497 2018-06-07  Paul Koning  <ni1d@arrl.net>
9499         * compare-elim.c (try_merge_compare): Don't merge compare if
9500         address contains a side effect.
9501         (try_eliminate_compare): Likewise.
9503 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
9505         * config.gcc: Support "tremont".
9506         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9507         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9508         PROCESSOR_TREMONT.
9509         * config/i386/i386.c (m_TREMONT): Define.
9510         (processor_target_table): Add "tremont".
9511         (PTA_TREMONT): Define.
9512         (ix86_lea_outperforms): Add TARGET_TREMONT.
9513         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9514         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9515         and M_INTEL_GOLDMONT_PLUS.
9516         (fold_builtin_cpu): Add "tremont".
9517         (ix86_add_stmt_cost): Add TARGET_TREMONT.
9518         (ix86_option_override_internal): Add "tremont".
9519         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9520         (processor_type): Add PROCESSOR_TREMONT.
9521         * config/i386/x86-tune.def: Add m_TREMONT.
9522         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9524 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9526         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9527         symbol defined for msp430i* devices to be lower case.
9529 2018-06-07  Richard Biener  <rguenther@suse.de>
9531         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9532         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
9533         Properly wrap signed arithmetic if overflow wraps.
9535 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
9537         PR tree-optimization/69615
9538         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9539         of a cast from a same precision integral SSA_NAME in a bb dominated
9540         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
9541         cast to utype if rhs2 has already a compatible type.
9543 2018-06-07  Richard Biener  <rguenther@suse.de>
9545         PR tree-optimization/85935
9546         * graphite-scop-detection.c (find_params_in_bb): Analyze
9547         condition operands with respect to the correct loop.  Assert
9548         the analysis doesn't fail.
9550 2018-06-04  Carl Love  <cel@us.ibm.com>
9552         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9553         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
9554         as it is slightly cheaper.
9555         (first_match_or_eos_index_<mode>):
9556         Calculate index using natural element order.
9557         (first_match_index_<mode>):
9558         Calculate index using natural element order.
9559         (first_match_or_eos_index_<mode>):
9560         Calculate index using natural order.
9561         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9562         for BE and LE modes.
9563         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9564         P9V_BUILTIN_VCLZLSBB_V16QI.
9565         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9566         specific.
9568 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9570         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9571         indentation and line wrap for many prototypes.  Add missing
9572         @smallexample directives around block of prototypes for vec_xl and
9573         vec_xst.
9575 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
9577         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9578         track if we pass or return IEEE 128-bit floating point.
9579         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9580         C++ mangling that is compatible with GCC 8.1.
9581         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9582         (init_cumulative_args): Note if we pass or return IEEE 128-bit
9583         floating point types.
9584         (rs6000_function_arg_advance_1): Likewise.
9585         (rs6000_mangle_type): Optionally generate mangled names that match
9586         what GCC 8.1 generated for IEEE 128-bit floating point types.
9587         (rs6000_globalize_decl_name): If we have an external function that
9588         passes or returns IEEE 128-bit types, generate a weak reference
9589         from the mangled name used in GCC 8.1 to the current mangled
9590         name.
9591         (rs6000_init_builtins): Make __ibm128 use the long double type if
9592         long double is IBM extended double.  Make __float128 use the long
9593         double type if long double is IEEE 128-bit.
9595         PR target/85657
9596         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9597         macro for __ibm128 built-in functions.
9598         (PACK_IF): Add __ibm128 pack/unpack functions.
9599         (UNPACK_IF): Likewise.
9600         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9601         enable long double built-in functions if long double is IEEE
9602         128-bit floating point.
9603         (rs6000_invalid_builtin): Update long double built-in function
9604         error message.
9605         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9606         functions, adjust the built-in function to use the long double
9607         built-in function if __ibm128 and long double are the same type.
9608         * doc/extend.texi (PowerPC builtins): Update documention for
9609         __builtin_{,un}pack_longdouble.  Add documentation for
9610         __builtin_{,un}pack_ibm128.
9612 2018-06-06  Jim Wilson  <jimw@sifive.com>
9614         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9615         (struct machine_function): New field interrupt_mode.
9616         (riscv_handle_type_attribute): New function.  Add forward declaration.
9617         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9618         (riscv_expand_epilogue): Check interrupt_mode field.
9619         (riscv_set_current_function): Check interrupt attribute args and
9620         set interrupt_mode field.
9621         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9622         (riscv_sret, riscv_uret): New.
9623         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9624         new arguments to interrupt attribute.
9626 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
9628         PR target/63177
9629         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9630         Don't handle -mcpu=power8 if -mpower9-vector is also used.
9632 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9634         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9635         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9636         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9637         several redundant entries.
9639 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
9641         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9642         type from "rtx" to "rtx_insn *".
9643         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9644         for local "call_insn", removing cast.
9645         (ix86_expand_call): Likewise, introducing a "call_insn" local.
9647 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9649         PR tree-optimization/86066
9650         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9651         for BIT_INSERT_EXPR stores.
9653 2018-06-06  Richard Biener  <rguenther@suse.de>
9655         PR tree-optimization/86062
9656         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9657         component refs ontop
9658         of to be offsetted base.
9660 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9662         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9663         to be static and remove check on interrupt attribute name.
9665 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9667         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9668         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9670 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
9672         PR target/79924
9673         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9674         second argument.
9675         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9676         Remove second argument, change how error is called.
9677         (aarch64_layout_arg): Remove second argument from
9678         aarch64_err_no_fpadvsimd call.
9679         (aarch64_init_cumulative_args): Ditto.
9680         (aarch64_gimplify_va_arg_expr): Ditto.
9681         * config/aarch64/aarch64.md (mov<mode>): Ditto.
9683 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
9685         * config/i386/i386.md (simple_return_indirect_internal): New expander.
9686         (*simple_return_indirect_internal<mode>): Rename from
9687         simple_return_indirect_internal.  Use W mode iterator.
9688         (rstorssp): New expander.
9689         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
9690         (clrssbsy): New expander.
9691         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
9693 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9695         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9696         __typeof__.
9697         (cmse_check_pointed_object): Likewise.
9699 2018-06-05  Martin Liska  <mliska@suse.cz>
9701         PR gcov-profile/47618
9702         * doc/invoke.texi: Document how -fprofile-dir format
9703         is extended.
9705 2018-06-05  Richard Biener  <rguenther@suse.de>
9707         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9708         removal pretend DOM info isn't available so we do not update
9709         it and only remove edges, not dominated blocks.  Actually free
9710         DOM info in case we removed something.  Remove unreachable blocks.
9711         (mfb_keep_latches): Work with either DOM info or marked backedges.
9712         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9713         first.  Mark backedges if DOM info isn't available.
9714         (Re-)compute DOM info after cleanup_control_flow_pre.
9716 2018-06-05  Richard Biener  <rguenther@suse.de>
9718         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9719         (locus_discrim_hasher::hash): Adjust.
9720         (locus_discrim_hasher::equal): Likewise.
9721         (next_discriminator_for_locus): Work on line directly.
9722         (same_line_p): Pass in expanded locus1 as well.
9723         (assign_discriminators): Avoid redundant location expansions.
9725 2018-06-05  Richard Biener  <rguenther@suse.de>
9727         PR tree-optimization/86046
9728         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9729         if required after clearing TREE_ADDRESSABLE.
9731 2018-06-05  Richard Biener  <rguenther@suse.de>
9733         PR tree-optimization/86047
9734         * tree-ssa-loop.c (for_each_index): Glob handling of all
9735         decls and constants and really handle all of them.
9737 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9739         PR target/81497
9740         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9741         qualifier_void_pointer and qualifier_const_void_pointer.
9742         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9743         (arm_init_builtins): Handle the above.
9744         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9745         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9746         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9747         void intrinsics.
9749 2018-06-05  Martin Liska  <mliska@suse.cz>
9751         * auto-profile.c (read_autofdo_file): Do not use
9752         gcov_ctr_summary struct.
9753         (afdo_callsite_hot_enough_for_early_inline): Likewise.
9754         * coverage.c (struct counts_entry): Likewise.
9755         (read_counts_file): Read just single summary entry.
9756         (get_coverage_counts): Use gcov_summary struct.
9757         * coverage.h (get_coverage_counts): Likewise.
9758         * gcov-dump.c (dump_working_sets): Likewise.
9759         (tag_summary): Dump just single summary.
9760         * gcov-io.c (gcov_write_summary): Write just histogram
9761         summary.
9762         (gcov_read_summary): Read just single summary.
9763         (compute_working_sets): Use gcov_summary struct.
9764         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9765         of GCOV_COUNTERS_SUMMABLE.
9766         (GCOV_COUNTERS_SUMMABLE): Remove.
9767         (GCOV_FIRST_VALUE_COUNTER): Replace with
9768         GCOV_COUNTER_V_INTERVAL.
9769         (struct gcov_ctr_summary): Remove.
9770         (struct gcov_summary): Directly use fields of former
9771         gcov_ctr_summary.
9772         (compute_working_sets): Use gcov_summary struct.
9773         * gcov.c (read_count_file): Do not use ctrs fields.
9774         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9775         struct.
9776         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9777         struct.
9778         * profile.c: Likewise.
9779         * profile.h: Likewise.
9781 2018-06-05  Martin Liska  <mliska@suse.cz>
9783         PR gcov-profile/84846
9784         * gcov.c (output_lines): Print working directory only
9785         in intermediate format.
9787 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
9789         * config/s390/s390-builtin-types.def: Add void function type.
9790         * config/s390/s390-builtins.def: Use the function type for the
9791         tbeginc builtin.
9793 2018-06-04  Jim Wilson  <jimw@sifive.com>
9795         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9796         to int.
9797         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9798         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
9799         handle EH_RETURN_DATA_REGNO registers properly.
9800         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9801         (riscv_expand_epilogue): Update comment.  Change argument name and
9802         type.  Update code to use new name and type.  Pass new args to
9803         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
9804         EXCEPTION_RETURN.
9805         * config/riscv/riscv.md (NORMAL_RETURN): New.
9806         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9807         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9808         (eh_return): Call gen_eh_return_internal and emit barrier.
9809         (eh_return_internal): Call riscv_expand_epilogue.
9811 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
9813         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9814         bit_insertion field and declare can_be_merged_into method.
9815         (merged_store_group::can_be_merged_into): New method.
9816         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9817         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
9818         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9820 2018-06-04  Richard Biener  <rguenther@suse.de>
9822         PR tree-optimization/85955
9823         * builtins.c (fold_builtin_sincos): Convert pointers to
9824         destination to appropriate type before dereferencing.
9826 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
9828         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9830 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
9832         * expr.c (expand_expr_real_1): Force the operand into memory if
9833         its TYPE_MODE is BLKmode and if there is no integer mode for
9834         the number of bits being extracted.
9836 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
9838         PR target/85832
9839         PR target/86036
9840         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9841         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9843 2018-06-04  Richard Biener  <rguenther@suse.de>
9845         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9846         (cleanup_tree_cfg_noloop): ... single caller.  Do
9847         start_recording_case_labels later.
9849 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
9851         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9852         to _IMMINTRIN_H_INCLUDED.
9853         * config/i386/pconfigintrin.h: Ditto.
9854         * config/i386/waitpkgintrin.h: Ditto.
9855         * config/i386/immintrin.h: Add includes for sgxintrin.h,
9856         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9857         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9858         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9859         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9860         waitpkgintrin.h and cldemoteintrin.h.
9862 2018-06-04  Richard Biener  <rguenther@suse.de>
9864         PR tree-optimization/86038
9865         * tracer.c (find_best_successor): Check probability for
9866         being initialized, bail out if not.
9868 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
9870         PR target/86003
9871         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9872         of bits to ignore when comparing architectures.
9874 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
9876         PR tree-optimization/69615
9877         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
9878         maximum or minimum of the type, try to merge it also as if
9879         range1 is + [-, x - 1] or + [x + 1, -].
9881         PR c++/86025
9882         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
9884 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
9886         PR tree-optimization/86034
9887         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
9888         the unsigned bitfield type in a bit insertion sequence if it does not
9889         have a larger precision than the bitfield size.
9890         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
9892 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
9894         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
9896 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9898         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
9899         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
9900         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
9901         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
9903 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9905         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
9906         Disable -fdelete-null-pointer-checks for ELF toolchain.
9908 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9909             Kito Cheng  <kito.cheng@gmail.com>
9911         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
9912         (nds32le-*-*, nds32be-*-*): Integrate checking process.
9913         (nds32*-*-*): Add glibc and uclibc conditions.
9914         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
9915         (TARGET_EXCEPT_UNWIND_INFO): Define.
9916         * config/nds32/elf.h: New file.
9917         * config/nds32/linux.h: New file.
9918         * config/nds32/nds32-elf.opt: New file.
9919         * config/nds32/nds32-linux.opt: New file.
9920         * config/nds32/nds32-fp-as-gp.c
9921         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
9922         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
9923         TARGET_LINUX_ABI.
9924         (nds32_asm_file_end): Ditto.
9925         (nds32_print_operand): Ditto.
9926         (nds32_insert_attributes): Ditto.
9927         (nds32_init_libfuncs): New function.
9928         (TARGET_HAVE_TLS): Define.
9929         (TARGET_INIT_LIBFUNCS): Define.
9930         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
9931         spec content.
9932         (TARGET_ELF): Apply different mcmodel setting.
9933         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
9934         been migrated into elf.h and linux.h files.
9935         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
9936         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
9937         (mcmodel): The content has been migrated into nds32-elf.opt and
9938         nds32-linux.opt files.
9939         * config/nds32/t-elf: New file.
9940         * config/nds32/t-linux: New file.
9942 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9943             Shiva Chen  <shiva0217@gmail.com>
9945         * config/nds32/constants.md (unspec_volatile_element): Add
9946         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
9947         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
9948         optimization.
9949         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
9950         (make_pass_nds32_fp_as_gp): Declare.
9951         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
9952         optmization pass.
9953         (nds32_asm_function_end_prologue): Remove unused asm output.
9954         (nds32_asm_function_begin_epilogue): Remove unused asm output.
9955         (nds32_asm_file_start): Output necessary fp_as_gp information.
9956         (nds32_option_override): Adjust register usage.
9957         (nds32_expand_prologue): Consider fp_as_gp situation.
9958         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
9959         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
9960         (epilogue): Ditto.
9961         (return): Ditto.
9962         (simple_return): Ditto.
9963         (omit_fp_begin): Output special directive for fp_as_gp.
9964         (omit_fp_end): Output special directive for fp_as_gp.
9965         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9966         mforbid-fp-as-gp): New options.
9968 2018-06-01  Mark Wielaard  <mark@klomp.org>
9970         * dwarf2out.c (dwarf2out_finish): Remove generation of
9971         DW_AT_loclists_base.
9973 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
9975         * gimple-ssa-store-merging.c: Include gimple-fold.h.
9976         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9977         (struct merged_store_group): Add bit_insertion field.
9978         (dump_char_array): Use standard hexadecimal format.
9979         (merged_store_group::merged_store_group): Set bit_insertion to false.
9980         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
9981         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
9982         also print the mask in the dump file.
9983         (pass_store_merging::gate): Minor tweak.
9984         (imm_store_chain_info::coalesce_immediate): Fix wrong association
9985         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
9986         stores with INTEGER_CST stores.
9987         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9988         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9989         and use it throughout.  Generate bit insertion sequences if need be.
9990         (pass_store_merging::process_store): Remove redundant condition.
9991         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9993 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
9995         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9996         the 128-bit floating point types.  Fix function comment.
9998 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10000         * config/aarch64/aarch64-simd.md
10001         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10002         mnemonics.
10003         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10004         mnemonics.
10006 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10008         PR tree-optimization/85989
10009         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10010         variable.
10011         (backprop::intersect_uses): Check it when deciding whether this
10012         is a backedge reference.
10013         (backprop::process_block): Add each phi to m_visited_phis
10014         after visiting it, then clear it at the end.
10016 2018-06-01  Richard Biener  <rguenther@suse.de>
10018         * tree-vectorizer.h (vect_dr_stmt): New function.
10019         (vect_get_load_cost): Adjust.
10020         (vect_get_store_cost): Likewise.
10021         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10022         Use vect_dr_stmt instead of DR_SMTT.
10023         (vect_record_base_alignments): Likewise.
10024         (vect_calculate_target_alignment): Likewise.
10025         (vect_compute_data_ref_alignment): Likewise and make static.
10026         (vect_update_misalignment_for_peel): Likewise.
10027         (vect_verify_datarefs_alignment): Likewise.
10028         (vector_alignment_reachable_p): Likewise.
10029         (vect_get_data_access_cost): Likewise.  Pass down
10030         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10031         (vect_get_peeling_costs_all_drs): Likewise.
10032         (vect_peeling_hash_get_lowest_cost): Likewise.
10033         (vect_enhance_data_refs_alignment): Likewise.
10034         (vect_find_same_alignment_drs): Likewise.
10035         (vect_analyze_data_refs_alignment): Likewise.
10036         (vect_analyze_group_access_1): Likewise.
10037         (vect_analyze_group_access): Likewise.
10038         (vect_analyze_data_ref_access): Likewise.
10039         (vect_analyze_data_ref_accesses): Likewise.
10040         (vect_vfa_segment_size): Likewise.
10041         (vect_small_gap_p): Likewise.
10042         (vectorizable_with_step_bound_p): Likewise.
10043         (vect_prune_runtime_alias_test_list): Likewise.
10044         (vect_analyze_data_refs): Likewise.
10045         (vect_supportable_dr_alignment): Likewise.
10046         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10047         (vect_gen_prolog_loop_niters): Likewise.
10048         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10049         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10050         modify DR_STMT.
10051         (vect_recog_mask_conversion_pattern): Likewise.
10052         (vect_try_gather_scatter_pattern): Likewise.
10053         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10054         to vect_get_store_cost.
10055         (vect_get_store_cost): Get stmt_info instead of DR.
10056         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10057         (vect_get_load_cost): Get stmt_info instead of DR.
10059 2018-06-01  Richard Biener  <rguenther@suse.de>
10061         PR middle-end/86017
10062         * gimple-fold.c (var_decl_component_p): Also allow offsetted
10063         vars wrapped in MEM_REFs.
10065 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10067         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10068         Fix subreg tests so that we only return a choice between
10069         GENERAL_REGS and FP_REGS if the original classes included both.
10071 2018-06-01  Richard Biener  <rguenther@suse.de>
10073         PR ipa/85960
10074         * tree-ssa-structalias.c (get_function_part_constraint):
10075         Handle NULL fi->decl.
10076         (find_func_aliases_for_call): Properly handle indirect
10077         fi from direct call.
10078         (find_func_clobbers): Likewise.
10079         (ipa_pta_execute): Likewise.
10080         (create_variable_info_for): For functions that are ifunc_resolver
10081         resolve to a varinfo that contains the result of the resolver call.
10082         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10083         aliases.
10085 2018-05-31  Michael Collison  <michael.collison@arm.com>
10087         * config/aarch64/aarch64.md:
10088         (*fix_to_zero_extenddfdi2): New pattern.
10089         * gcc.target/aarch64/fix_extend1.c: New testcase.
10091 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
10093         PR middle-end/78809
10094         PR middle-end/83026
10095         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10096         and BUILT_IN_STRNCMP_EQ.
10097         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10098         BUILT_IN_STRNCMP_EQ.
10099         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10100         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10101         (gimple_fold_builtin): Likewise.
10102         * tree-ssa-strlen.c (compute_string_length): New function.
10103         (determine_min_obsize): New function.
10104         (handle_builtin_string_cmp): New function to handle calls to
10105         string compare functions.
10106         (strlen_optimize_stmt): Add handling to builtin string compare
10107         calls.
10108         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10109         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10110         * tree.c (build_common_builtin_nodes): Add new defines of
10111         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10113 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
10115         PR target/85984
10116         * bb-reorder.c (pass_partition_blocks::gate): Return false for
10117         functions with naked attribute.
10119 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
10121         * config/i386/sse.md (avx_vec_concat<mode>):
10122         Substitute concat_tg_mode mode attribute with xtg_mode.
10123         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10124         (concat_tg_mode): Remove mode attribute.
10126 2018-05-31  Martin Sebor  <msebor@redhat.com>
10128         PR c/82063
10129         * calls.c (alloc_max_size): Correct a logic error/typo.
10130         Treat excessive arguments as infinite.  Warn for invalid arguments.
10131         * doc/invoke.texi (-Walloc-size-larger-than): Update.
10133 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
10135         PR target/85829
10136         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10137         and movx for Haswell.
10139 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
10140             Cesar Philippidis  <cesar@codesourcery.com>
10142         PR middle-end/85879
10143         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10144         when emitting error on private/firstprivate reductions.
10145         * omp-low.c (lower_omp_target): Avoid reference-type processing
10146         on pointers for firstprivate clause.
10148 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10150         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10151         (st1x2): Likewise.
10152         (st1x3): Likewise.
10153         * config/aarch64/aarch64-simd.md
10154         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10155         (aarch64_ld1_x3_<mode>): Likewise
10156         (aarch64_st1x2<VALLDIF:mode>): Likewise
10157         (aarch64_st1_x2_<mode>): Likewise
10158         (aarch64_st1x3<VALLDIF:mode>): Likewise
10159         (aarch64_st1_x3_<mode>): Likewise
10160         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10161         (vld1_s8_x3): Likewise.
10162         (vld1_u16_x3): Likewise.
10163         (vld1_s16_x3): Likewise.
10164         (vld1_u32_x3): Likewise.
10165         (vld1_s32_x3): Likewise.
10166         (vld1_u64_x3): Likewise.
10167         (vld1_s64_x3): Likewise.
10168         (vld1_f16_x3): Likewise.
10169         (vld1_f32_x3): Likewise.
10170         (vld1_f64_x3): Likewise.
10171         (vld1_p8_x3): Likewise.
10172         (vld1_p16_x3): Likewise.
10173         (vld1_p64_x3): Likewise.
10174         (vld1q_u8_x3): Likewise.
10175         (vld1q_s8_x3): Likewise.
10176         (vld1q_u16_x3): Likewise.
10177         (vld1q_s16_x3): Likewise.
10178         (vld1q_u32_x3): Likewise.
10179         (vld1q_s32_x3): Likewise.
10180         (vld1q_u64_x3): Likewise.
10181         (vld1q_s64_x3): Likewise.
10182         (vld1q_f16_x3): Likewise.
10183         (vld1q_f32_x3): Likewise.
10184         (vld1q_f64_x3): Likewise.
10185         (vld1q_p8_x3): Likewise.
10186         (vld1q_p16_x3): Likewise.
10187         (vld1q_p64_x3): Likewise.
10188         (vst1_s64_x2): Likewise.
10189         (vst1_u64_x2): Likewise.
10190         (vst1_f64_x2): Likewise.
10191         (vst1_s8_x2): Likewise.
10192         (vst1_p8_x2): Likewise.
10193         (vst1_s16_x2): Likewise.
10194         (vst1_p16_x2): Likewise.
10195         (vst1_s32_x2): Likewise.
10196         (vst1_u8_x2): Likewise.
10197         (vst1_u16_x2): Likewise.
10198         (vst1_u32_x2): Likewise.
10199         (vst1_f16_x2): Likewise.
10200         (vst1_f32_x2): Likewise.
10201         (vst1_p64_x2): Likewise.
10202         (vst1q_s8_x2): Likewise.
10203         (vst1q_p8_x2): Likewise.
10204         (vst1q_s16_x2): Likewise.
10205         (vst1q_p16_x2): Likewise.
10206         (vst1q_s32_x2): Likewise.
10207         (vst1q_s64_x2): Likewise.
10208         (vst1q_u8_x2): Likewise.
10209         (vst1q_u16_x2): Likewise.
10210         (vst1q_u32_x2): Likewise.
10211         (vst1q_u64_x2): Likewise.
10212         (vst1q_f16_x2): Likewise.
10213         (vst1q_f32_x2): Likewise.
10214         (vst1q_f64_x2): Likewise.
10215         (vst1q_p64_x2): Likewise.
10216         (vst1_s64_x3): Likewise.
10217         (vst1_u64_x3): Likewise.
10218         (vst1_f64_x3): Likewise.
10219         (vst1_s8_x3): Likewise.
10220         (vst1_p8_x3): Likewise.
10221         (vst1_s16_x3): Likewise.
10222         (vst1_p16_x3): Likewise.
10223         (vst1_s32_x3): Likewise.
10224         (vst1_u8_x3): Likewise.
10225         (vst1_u16_x3): Likewise.
10226         (vst1_u32_x3): Likewise.
10227         (vst1_f16_x3): Likewise.
10228         (vst1_f32_x3): Likewise.
10229         (vst1_p64_x3): Likewise.
10230         (vst1q_s8_x3): Likewise.
10231         (vst1q_p8_x3): Likewise.
10232         (vst1q_s16_x3): Likewise.
10233         (vst1q_p16_x3): Likewise.
10234         (vst1q_s32_x3): Likewise.
10235         (vst1q_s64_x3): Likewise.
10236         (vst1q_u8_x3): Likewise.
10237         (vst1q_u16_x3): Likewise.
10238         (vst1q_u32_x3): Likewise.
10239         (vst1q_u64_x3): Likewise.
10240         (vst1q_f16_x3): Likewise.
10241         (vst1q_f32_x3): Likewise.
10242         (vst1q_f64_x3): Likewise.
10243         (vst1q_p64_x3): Likewise.
10245 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10247         * config/msp430/msp430.c (msp430_output_labelref): Prepend
10248         user_label_prefix to name.
10250         * tree-core.h: Update comment about the format of NAME string
10251         passed to handler in attribute_spec.
10253         * config/msp430/msp430.md: Remove erroneous subreg expression from
10254         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10255         zero_extend{q,h}isi2.
10257 2018-05-30  Borislav Petkov  <bp@suse.de>
10259         * doc/extend.texi: Document some architecture specific
10260         constraints and sort entries.
10262 2018-05-30  Martin Sebor  <msebor@redhat.com>
10264         PR middle-end/85369
10265         * builtins.c (expand_builtin_stpcpy_1): New function.
10266         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10267         only if the former succeeds.
10269 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10271         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10272         in saphira.
10274 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10276         * doc/invoke.texi (-flinker-output): Document
10278 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10280         * passes.c (ipa_write_summaries): Only modify statements if body
10281         is in memory.
10282         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10283         incrementally linking.
10284         (ipa_passes): Likewise.
10285         * lto-cgraph.c (lto_output_node): When incrementally linking do not
10286         pass down resolution info.
10287         * common.opt (flag_incremental_link): Update info.
10288         * gcc.c (plugin specs): Turn flinker-output=* to
10289         -plugin-opt=-linker-output-known
10290         * toplev.c (compile_file): Also cut compilation when doing incremental
10291         link.
10292         * flag-types. (enum lto_partition_model): Add
10293         LTO_LINKER_OUTPUT_NOLTOREL.
10294         (invoke.texi): Add -flinker-output docs.
10295         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10296         link same way as WPA; do not stream in dead initializers.
10298         * dwarf2out.c (dwarf2out_die_ref_for_decl,
10299         darf2out_register_external_decl): Support incremental link.
10301 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10303         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10305 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10307         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10308         it down to simple_object_copy_lto_debug_sections.
10309         (run_gcc): Determine incremental LTO link time and configure
10310         lto1 into non-wpa mode, disable renaming of debug sections.
10312 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10314         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10315         descriptions of various incorrectly documented functions.
10317 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10319         Revert:
10320         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10321         address check not strict.
10323 2018-05-30  Richard Biener  <rguenther@suse.de>
10325         PR tree-optimization/85964
10326         * tracer.c (better_p): Drop initialized count check, we only
10327         call the function with initialized counts now.
10328         (find_best_successor): Do find a best edge if one
10329         has uninitialized count.
10330         (find_best_predecessor): Likewise.  Do BB frequency check only
10331         if count is initialized.
10333 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
10335         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10336         (aarch64_ldrstr_offset_compare): New.
10337         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10338         load/store orderings.
10339         (aarch64_gen_adjusted_ldpstp): Likewise.
10341 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
10343         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10344         Check for subset of GENERAL_REGS and FP_REGS.
10345         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10346         r=w alternative.
10348 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
10350         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10351         and wi::to_poly_offset.  Add the current offset and then check
10352         whether the sum fits, rather than using an unchecked addition of
10353         a checked term.  Check for a shwi rather than a uhwi.
10354         * expr.c (get_bit_range): Use tree_to_poly_uint64.
10355         (store_constructor): Use poly_int_tree_p.
10356         (expand_expr_real_1): Likewise.
10357         * function.c (assign_temp): Likewise.
10358         * fold-const.c (const_binop): Use poly_int_tree_p and
10359         wi::to_poly_offset.
10360         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
10361         division.
10362         * ipa-icf-gimple.c (func_checker::compare_operand): Use
10363         to_poly_offset for MEM offsets.
10364         * ipa-icf.c (sem_variable::equals): Likewise.
10365         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10366         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10367         wi::to_poly_offset for BIT_FIELD_REF offsets.
10368         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10369         wi::to_poly_offset.
10370         * var-tracking.c (emit_note_insn_var_location): Use
10371         tree_to_poly_uint64.
10373 2018-05-29  Jim Wilson  <jimw@sifive.com>
10375         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10377 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
10379         PR target/85950
10380         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10381         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10382         sequence.
10383         (sse4_1_round<mode>2): Use nonimmediate_operand
10384         for operand 1 predicate.
10386 2018-05-29  Martin Sebor  <msebor@redhat.com>
10387             Richard Biener  <rguenther@suse.de>
10389         PR testsuite/85888
10390         * calls.c (get_size_range): Call determine_value_range instead
10391         of get_value_range..
10392         * tree-vrp.h (determine_value_range): Declared new function.
10393         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10395 2018-05-29  Richard Biener  <rguenther@suse.de>
10397         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10398         sure to use non-pattern stmts for get_earlier_stmt arguments.
10399         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10400         called on pattern stmts.
10401         (get_later_stmt): Likewise.
10403 2018-05-29  Martin Liska  <mliska@suse.cz>
10405         PR gcov-profile/85759
10406         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10407         env variables.
10409 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
10411         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10412         VEC_UNPACK_*_EXPR.
10413         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10414         VEC_PACK_*_EXPR.
10416         PR target/85918
10417         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10418         VEC_PACK_FLOAT_EXPR): New tree codes.
10419         * tree-pretty-print.c (op_code_prio): Handle
10420         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10421         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10422         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10423         * tree-inline.c (estimate_operator_cost): Likewise.
10424         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10425         * fold-const.c (const_binop): Likewise.
10426         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10427         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10428         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10429         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10430         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10431         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10432         * expr.c (expand_expr_real_2): Likewise.
10433         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10434         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10435         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10436         optabs.
10437         * optabs.c (expand_widen_pattern_expr): For
10438         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10439         sign from result type rather than operand's type.
10440         (expand_binop_directly): For vec_packu_float_optab and
10441         vec_packs_float_optab allow result type to be different from operand's
10442         type.
10443         * optabs-tree.c (optab_for_tree_code): Handle
10444         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10445         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
10446         * tree-vect-generic.c (expand_vector_operations_1):  Handle
10447         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10448         VEC_PACK_FLOAT_EXPR.
10449         * tree-vect-stmts.c (supportable_widening_operation): Handle
10450         FIX_TRUNC_EXPR.
10451         (supportable_narrowing_operation): Handle FLOAT_EXPR.
10452         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10453         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10454         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
10455         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10456         mode attributes.
10457         (vec_pack<floatprefix>_float_<mode>): New expander.
10458         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10459         attributes.
10460         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10461         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10462         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10463         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10464         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10465         Document.
10466         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10467         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10468         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10469         VEC_PACK_FLOAT_EXPR): Document.
10471 2018-05-29  Richard Biener  <rguenther@suse.de>
10473         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10474         member.
10475         (stmt_vec_info_vec): Make pointer.
10476         (init_stmt_vec_info_vec): Remove.
10477         (free_stmt_vec_info_vec): Likewise.
10478         (set_stmt_vec_info_vec): New function.
10479         (free_stmt_vec_infos): Likewise.
10480         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10481         (set_vinfo_for_stmt): Likewise.
10482         (get_earlier_stmt): Likewise.
10483         (get_later_stmt): Likewise.
10484         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10485         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10486         (vec_info::~vec_info): Free stmt_vec_infos.
10487         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10488         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10489         (pass_slp_vectorize::execute): Likewise.
10490         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10491         (free_stmt_vec_info_vec): Likewise.
10492         (set_stmt_vec_info_vec): New function.
10493         (free_stmt_vec_infos): Likewise.
10494         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10495         the global stmt_vec_info_vec.
10496         * tree-parloops.c (gather_scalar_reductions): Use
10497         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10498         vector.
10500 2018-05-29  Richard Biener  <rguenther@suse.de>
10502         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10504 2018-05-29  Martin Liska  <mliska@suse.cz>
10505             David Malcolm  <dmalcolm@redhat.com>
10507         * vec.c (test_reverse): New.
10508         (vec_c_tests): Add new test.
10509         * vec.h (vl_ptr>::reverse): New function.
10511 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
10513         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10515         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10516         and later.
10518 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10520         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10522 2018-05-28  Richard Biener  <rguenther@suse.de>
10524         PR tree-optimization/85933
10525         * tree-vect-data-refs.c (vect_record_base_alignments): Only
10526         look at stmts marked as vectorizable.
10528 2018-05-28  Richard Biener  <rguenther@suse.de>
10530         PR tree-optimization/85934
10531         * tree-vect-generic.c (expand_vector_operations_1): Hoist
10532         vector boolean check before scalar optimization.
10534 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
10536         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10537         for armv5te.
10539 2018-05-28  Mark Wielaard  <mark@klomp.org>
10541         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10542         if it is an expression containing a minus sign.
10544 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
10546         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10548 2018-05-27  Paul Koning  <ni1d@arrl.net>
10550         * config/pdp11/pdp11.md (truncsihi2): Remove.
10552 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
10553             Chung-Ju Wu  <jasonwucj@gmail.com>
10555         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10556         implementation.
10557         (unaligned_store_dw): Ditto.
10558         * config/nds32/nds32-memory-manipulation.c
10559         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10560         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10561         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10562         (emit_setmem_word_loop): Rename to ...
10563         (emit_setmem_doubleword_loop): ... this.
10564         (nds32_gen_dup_4_byte_to_word_value): New function.
10565         (nds32_gen_dup_8_byte_to_double_word_value): New function.
10566         (nds32_expand_setmem_loop): Refine implementation.
10567         (nds32_expand_setmem_loop_v3m): Ditto.
10568         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10569         pattern.
10571 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10573         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10575 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10577         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10578         (nds32_init_machine_status): Initialize machine->attr_naked_p and
10579         machine->attr_no_prologue_p.
10580         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10581         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10582         (nds32_expand_epilogue): Consider attr_naked_p.
10583         (nds32_expand_epilogue_v3pop): Likewise.
10584         (nds32_can_use_return_insn): Likewise.
10585         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10586         attr_no_prologue_p fields.
10587         * config/nds32/nds32.opt (mret-in-naked-func): New option.
10589 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
10591         PR target/85918
10592         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10593         attributes.
10594         * config/i386/sse.md
10595         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10596         Rename to ...
10597         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10598         ... this.
10599         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10600         Rename to ...
10601         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10602         ... this.
10603         (*<floatsuffix>floatv2div2sf2): Rename to ...
10604         (*float<floatunssuffix>v2div2sf2): ... this.
10605         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10606         (float<floatunssuffix>v2div2sf2_mask): ... this.
10607         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10608         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10609         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10610         to ...
10611         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10612         ... this.
10613         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10614         Rename to ...
10615         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10616         ... this.
10617         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10618         Rename to ...
10619         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10620         ... this.
10621         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10622         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10623         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10624         gen_ufix_truncv8dfv8si2.
10625         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10626         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10627         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10628         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10629         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10630         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10631         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10632         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10634 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
10636         PR target/85900
10637         PR target/85345
10638         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10640 2018-05-25  Jim Wilson  <jimw@sifive.com>
10642         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10643         * config/riscv/riscv.c (struct machine_function): Add
10644         interrupt_handler_p and attribute_checked_p fields.
10645         (riscv_attribute_table): Add interrupt.
10646         (riscv_interrupt_type_p): New.
10647         (riscv_save_reg_p): Save extra regs for interrupt handler.
10648         (riscv_use_save_libcall): Return false  for interrupt handler.
10649         (riscv_first_stack_step): Add forward declaration.
10650         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
10651         for interrupt handler with large frame.  Use it for saved reg list.
10652         (riscv_expand_prologue): Move flag_stack_usage_info support to
10653         eliminate duplication.
10654         (riscv_expand_epilogue): Generate mret for interrupt handler.
10655         (riscv_epilogue_uses): New.
10656         (riscv_can_use_return_insn): Return false for interrupt handler.
10657         (riscv_function_ok_for_sibcall): Likewise.
10658         (riscv_set_current_function): Add interrupt handler support.
10659         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10660         * config/riscv/riscv.md (UNSPECV_MRET): New.
10661         (GP_REGNUM): New.
10662         (riscv_frflags, riscv_fsflags): Use tab after opcode.
10663         (riscv_mret): New.
10664         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10666 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
10668         PR tree-optimization/85712
10669         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10670         this candidate has already been replaced in-situ by a copy.
10672 2018-05-25  Jason Merrill  <jason@redhat.com>
10674         PR c++/80485 - inline function non-zero address.
10675         * symtab.c (nonzero_address): Check DECL_COMDAT.
10677 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
10679         PR target/83628
10680         * config/alpha/alpha.md (ashlsi3): New insn pattern.
10681         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
10682         extension of SImode operation.  Use const123_operand predicate.
10683         (*saddsi_1): Remove.
10684         (*saddl_se_1): Ditto.
10685         (*ssubsi_1): Ditto.
10686         (*ssubl_se_1): Ditto.
10687         * config/alpha/predicates.md (const123_operand): New predicate.
10688         * config/alpha/constraints.md (P): Use IN_RANGE.
10690 2018-05-25  Richard Biener  <rguenther@suse.de>
10692         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10693         defaulted to true.
10694         (ref_maybe_used_by_stmt_p): Likewise.
10695         (stmt_may_clobber_ref_p): Likewise.
10696         (stmt_may_clobber_ref_p_1): Likewise.
10697         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10698         and pass it along.
10699         (ref_maybe_used_by_stmt_p): Likewise.
10700         (stmt_may_clobber_ref_p): Likewise.
10701         (stmt_may_clobber_ref_p_1): Likewise.
10702         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10703         the alias oracle to disambiguate DRs with stmts DR analysis
10704         couldn't handle.
10705         (vect_analyze_data_refs): Do not give up on not analyzable
10706         DRs for BB vectorization.  Remove code truncating the dataref
10707         vector.
10709 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
10711         PR target/85832
10712         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10713         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
10714         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10716 2018-05-25  Richard Biener  <rguenther@suse.de>
10718         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10719         function, combining stmt data ref gathering and fatal analysis
10720         parts.
10721         (vect_analyze_data_refs): Remove now redudnant code and simplify.
10722         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10723         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10724         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10725         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10727 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10729         PR tree-optimization/85720
10730         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10731         SCC if all partitions are builtins.
10732         (version_loop_by_alias_check): New parameter.  Generate cancelable
10733         runtime alias check if all partitions are builtins.
10734         (distribute_loop): Update call to above function.
10736 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10738         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10739         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10740         (parm_default_def_partition_arg): Ditto.
10741         (set_parm_default_def_partition): Ditto.
10742         (get_parm_default_def_partitions): Ditto and make it static.
10743         (get_undefined_value_partitions): Ditto and make it static.
10744         (remove_ssa_form): Refactor call to init_var_map here.
10745         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10746         computation for loop region.
10747         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10748         (register_default_def): Delete.
10749         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10750         (parm_default_def_partition_arg): Ditto.
10751         (set_parm_default_def_partition): Ditto.
10752         (get_parm_default_def_partitions): Ditto and make it static.
10753         (get_undefined_value_partitions): Ditto and make it static.
10754         (coalesce_with_default, coalesce_with_default): Update comment.
10755         (create_coalesce_list_for_region): New func factored out from
10756         create_outofssa_var_map.
10757         (populate_coalesce_list_for_outofssa): New func factored out from
10758         create_outofssa_var_map and coalesce_ssa_name.
10759         (create_outofssa_var_map): Delete.
10760         (coalesce_ssa_name): Refactor to support live range computation.
10761         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10762         (get_parm_default_def_partitions): Delete.
10763         (get_undefined_value_partitions): Ditto.
10764         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10765         computation for loop region.
10766         (new_tree_live_info, loe_visit_block): Ditto.
10767         (live_worklist, set_var_live_on_entry): Ditto.
10768         (calculate_live_on_exit, verify_live_on_entry): Ditto.
10769         * tree-ssa-live.h (struct _var_map): New fields.
10770         (init_var_map): Change decl.
10771         (region_contains_p): New.
10773 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10775         * tree-ssa-live.h (live_merge_and_clear): Delete.
10777 2018-05-25  Richard Biener  <rguenther@suse.de>
10779         PR c++/85912
10780         * tree-dump.c (dequeue_and_dump): Remove access to removed
10781         operand 2 of a SWITCH_EXPR.
10783 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10785         * doc/sourcebuild.texi (vect_double_cond_arith): Include
10786         multiplication and division.
10787         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10788         (cond_udiv@var{m}, cond_umod@var{m}): Document.
10789         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10790         (cond_udiv_optab, cond_umod_optab): New optabs.
10791         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10792         (IFN_COND_RDIV): New internal functions.
10793         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10794         TRUNC_MOD_EXPR and RDIV_EXPR.
10795         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10796         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10797         New unspecs.
10798         (SVE_INT_BINARY): Include mult.
10799         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10800         (optab, sve_int_op): Handle mult.
10801         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10802         UNSPEC_COND_DIV.
10803         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10804         for SVE_INT_BINARY_SD.
10806 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10808         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10809         (optab, sve_int_op): Handle div and udiv.
10810         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10811         for SVE_INT_BINARY_SD.
10812         (*<optab><mode>3): New insn for the same.
10814 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10816         * tree-vect-patterns.c: Include predict.h.
10817         (vect_recog_divmod_pattern): Restrict check for division support
10818         to when optimizing for size.
10820 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10822         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10823         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10824         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10825         (gimple_match_op::set_op): Likewise.
10826         (gimple_resimplify4): Declare.
10827         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10828         (expr::gen_transform): Likewise.
10829         (decision_tree::gen): Generate a simplification routine for 4 operands.
10830         * gimple-match-head.c (gimple_simplify): Add an overload for
10831         4 operands.  In the top-level function, handle up to 4 call
10832         arguments and call gimple_resimplify4.
10833         (gimple_resimplify4): New function.
10834         (build_call_internal): Pass a fourth operand.
10835         (maybe_push_to_seq): Likewise.
10836         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10837         Fold VEC_COND_EXPRs of an operation and a default value into
10838         an IFN_COND_* function if possible.
10839         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10840         New unspecs.
10841         (SVE_COND_FP_BINARY): Include them.
10842         (optab, sve_fp_op): Handle them.
10843         (SVE_INT_BINARY_REV): New code iterator.
10844         (SVE_COND_FP_BINARY_REV): New int iterator.
10845         (commutative): New int attribute.
10846         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10847         Declare.
10848         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10849         function.
10850         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10851         (*cond_<optab><mode>): New patterns for reversed operands.
10853 2018-05-25  Richard Biener  <rguenther@suse.de>
10855         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10856         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10857         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10858         (STMT_VINFO_GROUPED_ACCESS): Adjust.
10859         * tree-vect-data-refs.c (everywhere): Adjust users.
10860         * tree-vect-loop.c (everywhere): Likewise.
10861         * tree-vect-slp.c (everywhere): Likewise.
10862         * tree-vect-stmts.c (everywhere): Likewise.
10863         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10865 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10867         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10868         Rename to...
10869         (gcc_cv_as_section_exclude): ... this.
10870         Try Solaris as #exclude syntax.
10871         * configure: Regenerate.
10872         * config.in: Regenerate.
10873         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10874         SECTION_EXCLUDE.
10875         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
10876         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
10878         * varasm.c (default_elf_asm_named_section): Don't check if
10879         HAVE_GAS_SECTION_EXCLUDE is defined.
10881 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10883         * doc/md.texi: Update the documentation of the cond_* optabs
10884         to mention the new final operand.  Fix GET_MODE_NUNITS call.
10885         Describe the scalar case too.
10886         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
10887         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
10888         instead of 2.
10889         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
10890         (get_conditional_internal_fn): Update comment.
10891         * tree-vect-loop.c (vectorizable_reduction): Pass the original
10892         accumulator value as a final argument to conditional functions.
10893         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
10894         a define_expand and add an "else" operand.  Assert for now that
10895         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
10896         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
10897         (*cond_<optab><mode>): New patterns.
10898         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
10899         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10900         (UNSPEC_COND_EOR): Delete.
10901         (optab): Remove associated mappings.
10902         (SVE_INT_BINARY): New code iterator.
10903         (sve_int_op): Remove int attribute and add "minus" to the code
10904         attribute.
10905         (SVE_COND_INT_OP): Delete.
10906         (SVE_COND_FP_OP): Rename to...
10907         (SVE_COND_FP_BINARY): ...this.
10909 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10911         * optabs.c (can_reuse_operands_p): New function.
10912         (maybe_legitimize_operands): Try to reuse the results for
10913         earlier operands.
10915 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
10917         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
10918         Add {q} suffix to insn mnemonic.
10920 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10922         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
10923         (msp430_warn_func_return): New.
10925 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
10927         * fold-const.c (tree_nonzero_bits): New function.
10928         * fold-const.h (tree_nonzero_bits): Likewise.
10929         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
10930         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
10932 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
10934         PR target/85900
10935         PR target/85345
10936         * varasm.c (assemble_alias): Check ifunc_resolver only on
10937         FUNCTION_DECL.
10939 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
10941         PR target/85903
10942         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
10943         when memory input operand is handled.
10945 2018-05-24  Luis Machado  <luis.machado@linaro.org>
10947         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
10948         global.
10949         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
10951 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
10953         * match.pd: Delay FMA folds until after vectorization.
10955 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10957         PR target/83009
10958         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10959         address check not strict.
10961 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
10963         * gimple-match.h (gimple_match_op): New class.
10964         (mprts_hook): Replace parameters with a gimple_match_op *.
10965         (maybe_build_generic_op): Likewise.
10966         (gimple_simplified_result_is_gimple_val): Replace parameters with
10967         a const gimple_match_op *.
10968         (gimple_simplify): Replace code_helper * and tree * parameters with
10969         a gimple_match_op * parameter.
10970         (gimple_resimplify1): Replace code_helper *, tree and tree *
10971         parameters with a gimple_match_op * parameter.
10972         (gimple_resimplify2): Likewise.
10973         (gimple_resimplify3): Likewise.
10974         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10975         parameters with a gimple_match_op * parameter.
10976         * gimple-match-head.c (gimple_simplify): Change prototypes of
10977         auto-generated functions to take a gimple_match_op * instead of
10978         separate code_helper * and tree * parameters.  Make the same
10979         change in the top-level overload and update calls to the
10980         gimple_resimplify routines.  Update calls to the auto-generated
10981         functions and to maybe_push_res_to_seq in the publicly-facing
10982         operation-specific gimple_simplify overloads.
10983         (gimple_match_op::MAX_NUM_OPS): Define.
10984         (gimple_resimplify1): Replace rcode and ops with a single res_op
10985         parameter.  Update call to gimple_simplify.
10986         (gimple_resimplify2): Likewise.
10987         (gimple_resimplify3): Likewise.
10988         (mprts_hook): Replace parameters with a gimple_match_op *.
10989         (maybe_build_generic_op): Likewise.
10990         (build_call_internal): Replace type, nargs and ops with
10991         a gimple_match_op *.
10992         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10993         with a single gimple_match_op *.  Update calls to mprts_hook,
10994         build_call_internal and gimple_simplified_result_is_gimple_val.
10995         Factor out code that is common to the tree_code and combined_fn cases.
10996         * genmatch.c (expr::gen_transform): Replace tem_code and
10997         tem_ops with a gimple_match_op called tem_op.  Update calls
10998         to the gimple_resimplify functions and maybe_push_res_to_seq.
10999         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11000         res_ops.  Update call to the gimple_resimplify functions.
11001         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11002         (decision_tree::gen): Make the functions take a gimple_match_op *
11003         called res_op instead of separate res_code and res_ops parameters.
11004         Update call accordingly.
11005         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11006         and ops with a single res_op parameter.  Update calls to
11007         maybe_build_generic_op and maybe_push_res_to_seq.
11008         (fold_stmt_1): Update calls to gimple_simplify and
11009         replace_stmt_with_simplification.
11010         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11011         and gimple_simplified_result_is_gimple_val.
11012         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11013         gimple_simplify.
11014         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11015         with a gimple_match_op *.
11016         (vn_nary_build_or_lookup): Likewise.  Update call to
11017         vn_nary_build_or_lookup_1.
11018         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11019         gimple_match_op *.  Update calls to the gimple_resimplify routines
11020         and to gimple_simplified_result_is_gimple_val.
11021         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11022         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11023         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11024         (visit_nary_op): Likewise.
11025         (visit_reference_op_load): Likewise.
11027 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11029         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11030         modifier for printing the step amount.
11032 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
11034         PR target/78849
11035         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11036         types.
11038 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
11040         * doc/sourcebuild.texi (Endianness): New subsubsection.
11042 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11044         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11045         <prefetch_dynamic_strides>: New const bool field.
11046         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11047         prefetch_dynamic_strides.
11048         (exynosm1_prefetch_tune): Likewise.
11049         (thunderxt88_prefetch_tune): Likewise.
11050         (thunderx_prefetch_tune): Likewise.
11051         (thunderx2t99_prefetch_tune): Likewise.
11052         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11053         false.
11054         (aarch64_override_options_internal): Update to set
11055         PARAM_PREFETCH_DYNAMIC_STRIDES.
11056         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11057         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11058         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11059         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11060         prefetch-dynamic-strides setting.
11062 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11064         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11065         <minimum_stride>: New const int field.
11066         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11067         minimum_stride field defaulting to -1.
11068         (exynosm1_prefetch_tune): Likewise.
11069         (thunderxt88_prefetch_tune): Likewise.
11070         (thunderx_prefetch_tune): Likewise.
11071         (thunderx2t99_prefetch_tune): Likewise.
11072         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11073         <default_opt_level>: Set to 3.
11074         (aarch64_override_options_internal): Update to set
11075         PARAM_PREFETCH_MINIMUM_STRIDE.
11076         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11077         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11078         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11079         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11080         stride is constant and is below the minimum stride threshold.
11082 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11084         * config/arm/arm-cpus.in (mode26): Delete.
11085         (armv4): Delete mode26 reference.
11086         * config/arm/arm.c (arm_configure_build_target): Delete use of
11087         isa_bit_mode26.
11089 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11091         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11092         New insn pattern.
11093         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11094         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
11095         for non-SSE modes.
11096         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
11097         (floatunsdidf2): Ditto.
11099 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11101         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11102         (fixuns_trunc<mode>si2_avx512f): Ditto.
11103         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11104         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11105         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11107 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11109         PR rtl-optimization/79985
11110         * df-scan.c (df_insn_refs_collect): Remove special case for
11111         global registers and asm statements.
11113 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11115         * extend.texi (Global Register Variables): Rewrite the bullet list.
11116         Note that the register is available for allocation. Note that access
11117         via inline asm must use constraints. Add note about async-signal
11118         handlers. Remove paragraph about automagic register selection.
11120 2018-05-23  Richard Biener  <rguenther@suse.de>
11122         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11123         of fixed offset from memset VN.
11125 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
11127         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11128         first_interp field.
11129         (alloc_cand_and_find_basis): Initialize first_interp field.
11130         (slsr_process_mul): Modify first_interp field.
11131         (slsr_process_add): Likewise.
11132         (slsr_process_cast): Modify first_interp field for each new
11133         interpretation.
11134         (slsr_process_copy): Likewise.
11135         (dump_candidate): Dump first_interp field.
11136         (replace_mult_candidate): Process all interpretations, not just
11137         subsequent ones.
11138         (replace_rhs_if_not_dup): Likewise.
11139         (replace_one_candidate): Likewise.
11141 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
11143         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11144         Add new boolean.
11145         (aarch64_needs_frame_chain): New function.
11146         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11148 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
11150         PR target/84882
11151         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11152         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11153         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11154         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11155         as true for strict-align.
11156         (aarch64_can_inline_p): Perform checks even when callee has no
11157         attributes to check for strict alignment.
11158         * doc/extend.texi (AArch64 Function Attributes): Document
11159         no-strict-align.
11160         * doc/invoke.texi: (AArch64 Options): Likewise.
11162 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
11164         PR tree-optimization/85853
11165         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11166         the handling of the root of the node to...
11167         (vect_slp_analyze_node_operations_1): ...this new function,
11168         and run the whole thing with the child nodes' def types
11169         set according to their SLP node's def type.
11171 2018-05-23  Richard Biener  <rguenther@suse.de>
11173         PR middle-end/85874
11174         * tree-data-ref.c (create_runtime_alias_checks): Defer
11175         and ignore overflow warnings.
11177 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
11179         PR tree-optimization/85822
11180         * tree-vrp.c (is_masked_range_test): Fix handling of negative
11181         constants.
11183 2018-05-23  Richard Biener  <rguenther@suse.de>
11185         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11186         memset constants via native_interpret_expr.
11188 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
11190         PR target/85345
11191         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11192         attribute.
11193         (cgraph_node::create_alias): Likewise.
11194         (cgraph_node::get_availability): Check ifunc_resolver instead
11195         of looking up ifunc attribute.
11196         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11197         * varasm.c (do_assemble_alias): Likewise.
11198         (assemble_alias): Likewise.
11199         (default_binds_local_p_3): Likewise.
11200         * cgraph.h (cgraph_node): Add ifunc_resolver.
11201         (cgraph_node::only_called_directly_or_aliased_p): Return false
11202         for IFUNC resolver.
11203         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11204         attribute.
11205         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11206         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11207         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11208         instead of looking up ifunc attribute.
11210 2018-05-22  Luis Machado  <luis.machado@linaro.org>
11212         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11214 2018-05-22  Martin Sebor  <msebor@redhat.com>
11216         PR middle-end/85359
11217         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11218         only when expasion succeeds.
11219         (expand_builtin_strcmp): Same.
11220         (expand_builtin_strncmp): Same.
11222 2018-05-22  Martin Sebor  <msebor@redhat.com>
11224         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11226 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11227             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11229         * config/aarch64/aarch64-ldpstp.md: Replace uses of
11230         aarch64_mem_pair_operand with memory_operand and delete operand swapping
11231         code.
11232         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11233         Add check for legitimate_address.
11234         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11235         (aarch64_swap_ldrstr_operands): New.
11236         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11237         Define prototype.
11239 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11240             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11242         * config/aarch64/aarch64.md: New patterns to generate stp
11243         and ldp.
11244         (store_pair_sw, store_pair_dw): New patterns to generate stp for
11245         single words and double words.
11246         (load_pair_sw, load_pair_dw): Likewise.
11247         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11248         Delete.
11249         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11250         Delete.
11251         * config/aarch64/aarch64-ldpstp.md: Modify peephole
11252         for different mode ldpstp and add peephole for merged zero stores.
11253         Likewise for loads.
11254         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11255         Add size check.
11256         (aarch64_gen_store_pair): Rename calls to match new patterns.
11257         (aarch64_gen_load_pair): Rename calls to match new patterns.
11258         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11259         (load_pair<DREG:mode><DREG2:mode>): ... This.
11260         (store_pair<mode>): Rename to...
11261         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11262         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11263         New mode iterators.
11264         (V_INT_EQUIV): Handle SImode.
11265         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11266         New predicate.
11268 2018-05-22  Martin Sebor  <msebor@redhat.com>
11270         PR c/85623
11271         * calls.c (maybe_warn_nonstring_arg): Use string length to set
11272         or ajust the presumed bound on an operation to avoid unnecessary
11273         warnings.
11275 2018-05-22  Martin Sebor  <msebor@redhat.com>
11277         PR tree-optimization/85826
11278         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11279         assuming that a DECL necesarily has a constant size.
11281 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
11283         PR middle-end/85862
11284         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11286 2018-05-22  Richard Biener  <rguenther@suse.de>
11288         PR tree-optimization/85834
11289         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11290         non-constant and non-zero memset arguments.
11292 2018-05-22  Martin Liska  <mliska@suse.cz>
11294         PR ipa/85607
11295         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11297 2018-05-22  Richard Biener  <rguenther@suse.de>
11299         PR tree-optimization/85863
11300         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11301         comparisons when vectype is specified.
11302         (vectorizable_condition): Do not specify vectype for
11303         vect_is_simple_cond when SLP vectorizing.
11305 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
11307         PR target/85657
11308         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11309         define __ibm128 as long double.
11310         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11311         as a distinct type when IEEE 128-bit support is enabled.
11312         (init_float128_ieee): Fix up conversions between IFmode and IEEE
11313         128-bit types to use the correct functions.
11314         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11315         convert between 128-bit floating point types that have different
11316         modes but the same representation, instead of using gen_lowpart to
11317         makean alias.
11318         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11319         KFmode.
11320         (IFKF_reg): New attributes to give the register constraints for
11321         IFmode and KFmode.
11322         (extend<mode>tf2_internal): New insns to mark an explicit
11323         conversion between 128-bit floating point types that have a
11324         different mode but share the same representation.
11326 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
11328         PR tree-optimization/85814
11329         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11330         a null return from get_strinfo when unsharing the next
11331         strinfo in the chain.
11333 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11335         PR gcc/84923
11336         * varasm.c (weak_finish): Clean up weak_decls.
11338 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11340         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11341         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11342         UNSPEC_UADALP values.
11343         * config/aarch64/iterators.md (ABAL): New int iterator.
11344         (ABDL2): Likewise.
11345         (ADALP): Likewise.
11346         (sur): Add mappings for the above.
11347         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11348         New define_insn.
11349         (aarch64_<sur>abal<mode>_4): Likewise.
11350         (aarch64_<sur>adalp<mode>_3): Likewise.
11351         (<sur>sadv16qi): New define_expand.
11353 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
11355         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11356         (*movdf_internal): Ditto.
11357         (*rcpsf2_sse): Ditto.
11358         (*rsqrtsf2_sse): Ditto.
11359         (*sqrt<mode>2_sse): Ditto.
11361 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
11363         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11364         eor3q<mode>4.
11365         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11366         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11367         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11368         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11369         vbcaxq_s64): New.
11370         * config/aarch64/arm_neon.h: Likewise.
11371         * config/aarch64/iterators.md (VQ_I): New.
11373 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
11375         * config.gcc: Add arc/t-multilib-linux to tmake_file for
11376         arc*-*-linux*.
11377         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11378         MULTILIB_DIRNAMES
11380 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11382         * config/nds32/constraints.md (S): New constraint.
11383         * config/nds32/nds32.md (call_internal): Use constraint S.
11384         (call_value_internal): Likewise.
11385         (sibcall_internal): Likewise.
11386         (sibcall_value_internal): Likewise.
11388 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11389             Chung-Ju Wu  <jasonwucj@gmail.com>
11391         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11392         into consideration.
11394 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11395             Chung-Ju Wu  <jasonwucj@gmail.com>
11397         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11398         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11399         (nds32_rtx_costs_impl): Simplify.
11400         (nds32_address_cost_impl): Simplify.
11401         (nds32_init_rtx_costs): New function.
11402         (nds32_rtx_costs_speed_prefer): Likewise.
11403         (nds32_rtx_costs_size_prefer): Likewise.
11404         (nds32_address_cost_speed_prefer): Likewise.
11405         (nds32_address_cost_speed_fwprop): Likewise.
11406         (nds32_address_cost_size_prefer): Likewise.
11407         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11408         * config/nds32/nds32.c (nds32_option_override): Use
11409         nds32_init_rtx_costs function.
11411 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11413         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11414         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11415         (TARGET_PIPELINE_N8): Likewise.
11416         (TARGET_PIPELINE_N10): Likewise.
11417         (TARGET_PIPELINE_N13): Likewise.
11418         (TARGET_PIPELINE_GRAYWOLF): Likewise.
11420 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
11422         * config/nds32/nds32-fpu.md: Update copyright year.
11424 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11426         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11428 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11430         * config/nds32/nds32.c
11431         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11432         * config/nds32/nds32.opt (minline-asm-r15): New option.
11434 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11436         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11437         MASK_HW_ABS.
11438         * config/nds32/nds32.md (abssi2): New pattern.
11440 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
11442         * config/i386/i386.md (rex64namesuffix): New mode attribute.
11443         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11444         Merge insn pattern from sse_cvtsi2ss<round_name> and
11445         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11446         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11447         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11448         using SWI48 mode iterator.
11449         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11450         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11451         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11452         pattern from sse_cvttss2si<round_saeonly_name>
11453         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11454         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11455         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11456         using SWI48 mode iterator.
11457         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11458         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11459         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11460         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11461         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11462         using SWI48 mode iterator.
11463         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11464         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11465         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11466         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11467         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11468         SWI48 mode iterator.
11469         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11470         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11471         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11472         pattern from sse_cvttsd2si<round_saeonly_name>
11473         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11475 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11477         * config/nds32/nds32-md-auxiliary.c
11478         (nds32_valid_smw_lwm_base_p): Refine.
11479         (nds32_output_smw_single_word): Refine.
11480         (nds32_output_smw_double_word): New.
11481         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11483 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11485         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11486         (nds32_output_stack_pop): Refine.
11487         (nds32_expand_unaligned_load): Refine.
11488         (nds32_expand_unaligned_store): Refine.
11490 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
11491             Chung-Ju Wu  <jasonwucj@gmail.com>
11493         * config/nds32/constants.md: Add TP_REGNUM constant.
11494         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11495         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11496         UNSPEC_ADD32.
11497         * config/nds32/nds32-doubleword.md: Consider flag_pic.
11498         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11499         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11500         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11501         and PIC code generation.
11502         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11503         code generation.
11504         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11505         optimization.
11506         * config/nds32/nds32.md: Support TLS and PIC.
11507         * config/nds32/nds32.c: Support TLS and PIC.
11508         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11509         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11510         predicate.
11512 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11514         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11515         mode with E_ prefix.
11517 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
11518             Chung-Ju Wu  <jasonwucj@gmail.com>
11520         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11521         * config/nds32/nds32-md-auxiliary.c
11522         (symbolic_reference_mentioned_p): New.
11523         (nds32_legitimize_ict_address): New.
11524         (nds32_expand_ict_move): New.
11525         (nds32_indirect_call_referenced_p): New.
11526         (nds32_symbol_binds_local_p): Delete.
11527         (nds32_long_call_p): Modify.
11528         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11529         * config/nds32/nds32-protos.h
11530         (symbolic_reference_mentioned_p): Declare.
11531         (nds32_legitimize_ict_address): Declare.
11532         (nds32_expand_ict_move): Declare.
11533         (nds32_indirect_call_referenced_p): Declare.
11534         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11535         (nds32_relax_group): Use nds32_ict_const_p as condition.
11536         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11537         (nds32_asm_file_start): Output ict_model directive in asm code.
11538         (nds32_legitimate_address_p): Consider indirect call.
11539         (nds32_print_operand): Consider indirect call.
11540         (nds32_print_operand_address): Consider indirect call.
11541         (nds32_insert_attributes): Handle "indirect_call" attribute.
11542         (TARGET_LEGITIMATE_ADDRESS_P): Define.
11543         (TARGET_LEGITIMATE_CONSTANT_P): Define.
11544         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11545         (TARGET_DELEGITIMIZE_ADDRESS): Define.
11546         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11547         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11548         (TARGET_ICT_MODEL_SMALL): Define.
11549         (TARGET_ICT_MODEL_LARGE): Define.
11550         * config/nds32/nds32.md (movsi): Consider ict model.
11551         (call, call_value): Consider ict model.
11552         (sibcall, sibcall_value): Consider ict model.
11553         * config/nds32/nds32.opt (mict-model): New option.
11554         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11555         model.
11557 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
11558             Monk Chiang  <sh.chiang04@gmail.com>
11559             Jim Wilson <jimw@sifive.com>
11561         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11562         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
11563         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11564         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11565         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
11566         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11567         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11568         compute save_libcall_adjustment properly.
11569         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11570         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11571         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11572         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11573         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11574         (ABI_SPEC): Handle mabi=ilp32e.
11575         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11576         (RVE): Add RVE mask.
11577         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11578         <-march>: Add rv32e as an example.
11580 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
11582         PR c++/82899
11583         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11584         (intra_create_variable_infos): Handle C++ constructors.
11586 2018-05-18  Martin Liska  <mliska@suse.cz>
11588         * passes.def: Remove a redundant pass.
11590 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
11592         PR bootstrap/85838
11593         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11595 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11597         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11598         (ARMv4): Update.
11599         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11600         (ARMv6m): Update.
11601         (armv2, armv2a, armv3, armv3m): Delete architectures.
11602         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11603         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11604         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11605         Delete cpus.
11606         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11607         (*mulsidi3adddi): Likewise.
11608         (mulsidi3): Likewise.
11609         (*mulsidi3_nov6): Likewise.
11610         (umulsidi3): Likewise.
11611         (umulsidi3_nov6): Likewise.
11612         (umaddsidi4): Likewise.
11613         (*umulsidi3adddi): Likewise.
11614         (smulsi3_highpart): Likewise.
11615         (*smulsi3_highpart_nov6): Likewise.
11616         (umulsi3_highpart): Likewise.
11617         (*umulsi3_highpart_nov6): Likewise.
11618         * config/arm/arm.h (arm_arch3m): Delete.
11619         * config/arm/arm.c (arm_arch3m): Delete.
11620         (arm_option_override_internal): Update armv3-related comment.
11621         (arm_configure_build_target): Delete use of isa_bit_mode32.
11622         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11623         (arm_rtx_costs_internal): Delete check of arm_arch3m.
11624         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11625         (mulsa3): Likewise.
11626         (mulusa3): Likewise.
11627         * config/arm/arm-protos.h (arm_arch3m): Delete.
11628         * config/arm/arm-tables.opt: Regenerate.
11629         * config/arm/arm-tune.md: Likewise.
11630         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11631         deleted architectures.
11633 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11635         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11636         (armv5t, armv5te): New features.
11637         (ARMv5, ARMv5e): Delete fgroups.
11638         (ARMv5t, ARMv5te): Adjust for above changes.
11639         (ARMv6m): Likewise.
11640         (armv5, armv5e): Delete arches.
11641         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11642         arm_arch5.
11643         (*call_reg_arm): Likewise.
11644         (*call_value_reg_armv5): Likewise.
11645         (*call_value_reg_arm): Likewise.
11646         (*call_symbol): Likewise.
11647         (*call_value_symbol): Likewise.
11648         (*sibcall_insn): Likewise.
11649         (*sibcall_value_insn): Likewise.
11650         (clzsi2): Likewise.
11651         (prefetch): Likewise.
11652         (define_split and define_peephole2 dependent on arm_arch5):
11653         Likewise.
11654         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11655         arm_arch5e.
11656         (TARGET_ARM_QBIT): Likewise.
11657         (TARGET_DSP_MULTIPLY): Likewise.
11658         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11659         (arm_arch5, arm_arch5e): Delete.
11660         (arm_arch5t, arm_arch5te): Declare.
11661         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11662         (arm_arch5t): Declare.
11663         (arm_option_reconfigure_globals): Update for the above.
11664         (arm_options_perform_arch_sanity_checks): Update comment, replace
11665         use of arm_arch5 with arm_arch5t.
11666         (use_return_insn): Likewise.
11667         (arm_emit_call_insn): Likewise.
11668         (output_return_instruction): Likewise.
11669         (arm_final_prescan_insn): Likewise.
11670         (arm_coproc_builtin_available): Likewise.
11671         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11672         arm_arch5e with arm_arch5t and arm_arch5te.
11673         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11674         (arm_arch5t, arm_arch5te): Declare.
11675         * config/arm/arm-tables.opt: Regenerate.
11676         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11677         * config/arm/t-multilib: Likewise.
11678         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11679         instead of arm_arch5.
11680         (*call_reg_thumb1): Likewise.
11681         (*call_value_reg_thumb1_v5): Likewise.
11682         (*call_value_reg_thumb1): Likewise.
11683         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11684         unreachable path.
11685         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11687 2018-05-18  Martin Liska  <mliska@suse.cz>
11689         PR gcov-profile/84846
11690         * doc/gcov.texi: Document -t option of gcov tool.
11692 2018-05-18  Martin Liska  <mliska@suse.cz>
11694         PR gcov-profile/84846
11695         * gcov.c (print_usage): Add new -t option.
11696         (process_args): Handle the option.
11697         (generate_results): Use stdout as output when requested by
11698         the option.
11700 2018-05-18  Martin Liska  <mliska@suse.cz>
11702         PR gcov-profile/84846
11703         * coverage.c (coverage_init): Write PWD to .gcno file.
11704         * doc/gcov.texi: Document how working directory is printed.
11705         * gcov-dump.c (dump_gcov_file): Print PWD.
11706         * gcov.c (output_intermediate_file): Likewise.
11707         (read_graph_file): Read PWD string.
11708         (output_lines): Print PWD.
11710 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11712         PR middle-end/85817
11713         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11714         for retval and return false if all args to phi are zero.
11716 2018-05-18  Richard Biener  <rguenther@suse.de>
11718         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11719         method.
11720         (evrp_dom_walker::before_dom_children): Call it.
11722 2018-05-18  Richard Biener  <rguenther@suse.de>
11724         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11725         results when processing array refs with variable index.
11727 2018-05-18  Toon Moene  <toon@moene.org>
11729         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11730         directly after that of -floop-interchange. Indicate that both
11731         options are enabled by default when specifying -O3.
11733 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11735         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11736         iterator.  Delete separate integer-mode vec_set<mode> expander.
11737         (aarch64_simd_vec_setv2di): Delete.
11738         (vec_setv2di): Delete.
11739         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11740         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
11741         the "w, r" alternative.
11743 2018-05-18  Martin Liska  <mliska@suse.cz>
11745         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11746         * tree-pass.h (make_pass_lower_switch_O0): New function.
11747         * tree-switch-conversion.c (node_has_low_bound): Remove.
11748         (node_has_high_bound): Likewise.
11749         (node_is_bounded): Likewise.
11750         (class pass_lower_switch): Make it a template type and create
11751         two instances.
11752         (pass_lower_switch::execute): Add template argument.
11753         (make_pass_lower_switch): New function.
11754         (make_pass_lower_switch_O0): New function.
11755         (do_jump_if_equal): Remove.
11756         (emit_case_nodes): Simplify to just handle all 3 cases and leave
11757         all the hard work to tree optimization passes.
11759 2018-05-18  Martin Liska  <mliska@suse.cz>
11761         * dbgcnt.c (limit_low): Renamed from limit.
11762         (limit_high): New variable.
11763         (dbg_cnt_is_enabled): Check for upper limit.
11764         (dbg_cnt): Adjust dumping.
11765         (dbg_cnt_set_limit_by_index): Add new argument for high
11766         value.
11767         (dbg_cnt_set_limit_by_name): Likewise.
11768         (dbg_cnt_process_single_pair): Parse new format.
11769         (dbg_cnt_process_opt): Use strtok.
11770         (dbg_cnt_list_all_counters): Remove 'value' and add
11771         'limit_high'.
11772         * doc/invoke.texi: Document changes.
11774 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
11776         * doc/sourcebuild.texi (scalar_all_fma): Document.
11777         * tree.def (FMA_EXPR): Delete.
11778         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11779         * internal-fn.c (ternary_direct): New macro.
11780         (expand_ternary_optab_fn): Likewise.
11781         (direct_ternary_optab_supported_p): Likewise.
11782         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11783         * builtins.c (fold_builtin_fma): Delete.
11784         (fold_builtin_3): Don't call it.
11785         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11786         * expr.c (expand_expr_real_2): Likewise.
11787         * fold-const.c (operand_equal_p): Likewise.
11788         (fold_ternary_loc): Likewise.
11789         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11790         * gimple.c (DEFTREECODE): Likewise.
11791         * gimplify.c (gimplify_expr): Likewise.
11792         * optabs-tree.c (optab_for_tree_code): Likewise.
11793         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11794         * tree-eh.c (operation_could_trap_p): Likewise.
11795         (stmt_could_throw_1_p): Likewise.
11796         * tree-inline.c (estimate_operator_cost): Likewise.
11797         * tree-pretty-print.c (dump_generic_node): Likewise.
11798         (op_code_prio): Likewise.
11799         * tree-ssa-loop-im.c (stmt_cost): Likewise.
11800         * tree-ssa-operands.c (get_expr_operands): Likewise.
11801         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11802         * fold-const-call.h (fold_fma): Delete.
11803         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11804         CFN_FNMA and CFN_FNMS.
11805         (fold_fma): Delete.
11806         * genmatch.c (combined_fn): New enum.
11807         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11808         (commutative_op): New function.
11809         (commutate): Use it.  Handle more than 2 operands.
11810         (dt_operand::gen_gimple_expr): Use commutative_op.
11811         (parser::parse_expr): Allow :c to be used with non-binary
11812         operators if the commutative operand is known.
11813         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11814         CFN_FMS, CFN_FNMA and CFN_FNMS.
11815         (backprop::process_assign_use): Remove FMA_EXPR handling.
11816         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11817         (gen_hsa_fma): New function.
11818         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11819         IFN_FNMA and IFN_FNMS.
11820         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11821         * gimple-fold.h (follow_all_ssa_edges): Declare.
11822         * gimple-fold.c (follow_all_ssa_edges): New function.
11823         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11824         gimple_build interface and use follow_all_ssa_edges to fold the result.
11825         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11826         instead of checking for optabs directly.
11827         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11828         rather than FMA_EXPRs.
11829         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11830         call to IFN_FMA instead of an FMA_EXPR.
11832 2018-05-17  Jim Wilson  <jimw@sifive.com>
11834         * expr.c (do_tablejump): When converting index to Pmode, if we have a
11835         sign extended promoted subreg, and the range does not have the sign bit
11836         set, then do a sign extend.
11838         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11839         test, check for sign extended subreg and/or constant operands, and
11840         do a sign extend in that case.
11842 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
11844         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11845         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11846         Add untyped.
11847         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11848         Change logics_shift_reg to logics_shift_imm.
11849         (thunderx2t99_fp_loadpair_basic): Delete.
11850         (thunderx2t99_fp_storepair_basic): Delete.
11851         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11852         (thunderx2t99_asimd_polynomial): Delete.
11853         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11854         and neon_fp_mul_d_scalar_q.
11855         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11856         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11857         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11858         (thunderx2t99_asimd_lut): Add missing tbl types.
11859         (thunderx2t99_asimd_ext): Delete.
11860         (thunderx2t99_asimd_load1_1_mult): Delete.
11861         (thunderx2t99_asimd_load1_2_mult): Delete.
11862         (thunderx2t99_asimd_load1_ldp): New.
11863         (thunderx2t99_asimd_load1): New.
11864         (thunderx2t99_asimd_load2): Add missing *load2* types.
11865         (thunderx2t99_asimd_load3): New.
11866         (thunderx2t99_asimd_load4): New.
11867         (thunderx2t99_asimd_store1_1_mult): Delete.
11868         (thunderx2t99_asimd_store1_2_mult): Delete.
11869         (thunderx2t99_asimd_store2_mult): Delete.
11870         (thunderx2t99_asimd_store2_onelane): Delete.
11871         (thunderx2t99_asimd_store_stp): New.
11872         (thunderx2t99_asimd_store1): New.
11873         (thunderx2t99_asimd_store2): New.
11874         (thunderx2t99_asimd_store3): New.
11875         (thunderx2t99_asimd_store4): New.
11877 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
11879         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
11880         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
11882 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
11883             Segher Boessenkool  <segher@kernel.crashing.org>
11885         PR target/85698
11886         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
11887         operand.
11889 2018-05-17  Richard Biener  <rguenther@suse.de>
11891         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
11892         for pruning loop and prune defs feeding only already visited PHIs.
11894 2018-05-17  Richard Biener  <rguenther@suse.de>
11896         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
11898 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
11899             Richard Biener  <rguenther@suse.de>
11901         PR tree-optimization/85793
11902         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
11903         for VMAT_ELEMENTWISE.
11905 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
11907         * internal-fn.h (lookup_internal_fn): Declare
11908         * internal-fn.c (lookup_internal_fn): New function.
11909         * gimple.c (gimple_build_call_from_tree): Handle calls to
11910         internal functions.
11911         * gimple-pretty-print.c (dump_gimple_call): Print "." before
11912         internal function names.
11913         * tree-pretty-print.c (dump_generic_node): Likewise.
11914         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
11916 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
11918         * gimple-fold.h (gimple_build): Make the function forms take
11919         combined_fn rather than built_in_function.
11920         (gimple_simplify): Likewise.
11921         * gimple-match-head.c (gimple_simplify): Likewise.
11922         * gimple-fold.c (gimple_build): Likewise.
11923         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
11924         rather than gimple_build_call_internal.
11925         (get_initial_defs_for_reduction): Likewise.
11926         (vect_create_epilog_for_reduction): Likewise.
11927         (vectorizable_live_operation): Likewise.
11929 2018-05-17  Martin Liska  <mliska@suse.cz>
11931         * gimple-ssa-sprintf.c (format_directive): Do not use
11932         space in between 'G_' and '('.
11934 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
11936         PR target/85323
11937         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
11938         even if the mask is not all ones.
11940         PR target/85323
11941         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
11942         vector.
11943         (ix86_gimple_fold_builtin): Likewise.
11945         PR target/85323
11946         * config/i386/i386.c: Include tree-vector-builder.h.
11947         (ix86_vector_shift_count): New function.
11948         (ix86_fold_builtin): Fold shift builtins by scalar count.
11949         (ix86_gimple_fold_builtin): Likewise.
11951         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
11952         _mm512_setzero): New intrinsics.
11954 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
11955             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11957         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
11958         code generation for cases where splatting a value is not useful.
11959         * simplify-rtx.c (simplify_ternary_operation): Simplify
11960         vec_merge across a vec_duplicate and a paradoxical subreg forming
11961         a vector mode to a vec_concat.
11963 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
11965         * config.gcc: Support "goldmont-plus".
11966         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11967         "goldmont-plus".
11968         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11969         PROCESSOR_GOLDMONT_PLUS.
11970         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11971         (processor_target_table): Add "goldmont-plus".
11972         (PTA_GOLDMONT_PLUS): Define.
11973         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11974         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11975         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11976         (fold_builtin_cpu): Add "goldmont-plus".
11977         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11978         (ix86_option_override_internal): Add "goldmont-plus".
11979         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11980         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11981         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11982         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11984 2018-05-17  Richard Biener  <rguenther@suse.de>
11986         PR tree-optimization/85757
11987         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11988         remove defs that only feed that PHI from further processing.
11990 2018-05-16  Jim Wilson  <jimw@sifive.com>
11992         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11993         asterisk to name.
11994         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11996 2018-05-16  Mark Wielaard  <mark@klomp.org>
11998         * dwarf2out.c (count_index_strings): New function.
11999         (output_indirect_strings): Call count_index_strings and generate
12000         header for dwarf_version >= 5.
12002 2018-05-16  Mark Wielaard  <mark@klomp.org>
12004         * dwarf2out.c (dwarf_FORM): New function.
12005         (set_indirect_string): Use dwarf_FORM.
12006         (reset_indirect_string): Likewise.
12007         (size_of_die): Likewise.
12008         (value_format): Likewise.
12009         (output_die): Likewise.
12010         (add_skeleton_AT_string): Likewise.
12011         (output_macinfo_op): Likewise.
12012         (index_string): Likewise.
12013         (output_index_string_offset): Likewise.
12014         (output_index_string): Likewise.
12015         (count_index_strings): Likewise.
12017 2018-05-16  Carl Love  <cel@us.ibm.com>
12019         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12020         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12022 2018-05-16  Martin Jambor  <mjambor@suse.cz>
12024         * ipa-prop.c (ipa_free_all_edge_args): Remove.
12025         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12027 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
12029         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12030         (fnma<mode>4): Likewise.
12031         (fms<mode>4): Likewise.
12032         (fnms<mode>4): Likewise.
12033         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12034         (aarch64_fnma<mode>4): Likewise.
12035         (aarch64_fms<mode>4): Likewise.
12036         (aarch64_fnms<mode>4): Likewise.
12037         (aarch64_fnmadd<mode>4): Likewise.
12039 2018-05-16  Jason Merrill  <jason@redhat.com>
12041         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
12043 2018-05-16  Richard Biener  <rguenther@suse.de>
12045         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12046         (dump_stmt_cost): Declare.
12047         (add_stmt_cost): Dump cost we add.
12048         (add_stmt_costs): New function.
12049         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12050         No longer exported.
12051         (vect_analyze_stmt): Adjust prototype.
12052         (vectorizable_condition): Likewise.
12053         (vectorizable_live_operation): Likewise.
12054         (vectorizable_reduction): Likewise.
12055         (vectorizable_induction): Likewise.
12056         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12057         cost vector to pass to vectorizable_ and record afterwards.
12058         (vect_model_reduction_cost): Take cost vector argument and adjust.
12059         (vect_model_induction_cost): Likewise.
12060         (vectorizable_reduction): Likewise.
12061         (vectorizable_induction): Likewise.
12062         (vectorizable_live_operation): Likewise.
12063         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12064         SLP_TREE_NUMBER_OF_VEC_STMTS.
12065         (vect_analyze_slp_cost_1): Remove.
12066         (vect_analyze_slp_cost): Likewise.
12067         (vect_slp_analyze_node_operations): Take visited args and
12068         a target cost vector.  Avoid processing already visited stmt sets.
12069         (vect_slp_analyze_operations): Use a local cost vector to gather
12070         costs and register those of non-discarded instances.
12071         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12072         (vect_schedule_slp_instance): Remove copying of
12073         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
12074         zero.
12075         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12076         adding cost.  Record cost entry location.
12077         (vect_prologue_cost_for_slp_op): Function to compute cost of
12078         a constant or invariant generated for SLP vect in the prologue,
12079         split out from vect_analyze_slp_cost_1.
12080         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
12081         (vect_model_promotion_demotion_cost): Likewise.
12082         (vect_model_store_cost): Likewise, make static.
12083         (vect_model_load_cost): Likewise.
12084         (vectorizable_bswap): Add cost vector arg and adjust.
12085         (vectorizable_call): Likewise.
12086         (vectorizable_simd_clone_call): Likewise.
12087         (vectorizable_conversion): Likewise.
12088         (vectorizable_assignment): Likewise.
12089         (vectorizable_shift): Likewise.
12090         (vectorizable_operation): Likewise.
12091         (vectorizable_store): Likewise.
12092         (vectorizable_load): Likewise.
12093         (vectorizable_condition): Likewise.
12094         (vectorizable_comparison): Likewise.
12095         (can_vectorize_live_stmts): Likewise.
12096         (vect_analyze_stmt): Likewise.
12097         (vect_transform_stmt): Adjust calls to vectorizable_*.
12098         * tree-vectorizer.c: Include gimple-pretty-print.h.
12099         (dump_stmt_cost): New function.
12101 2018-05-16  Richard Biener  <rguenther@suse.de>
12103         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12104         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12105         * tree-ssa-dse.c: Include tree-ssa-loop.h.
12106         (check_name): New callback.
12107         (dse_classify_store): Track cycles via a visited bitmap of PHI
12108         defs and simplify handling of in-loop and across loop dead stores
12109         and properly fail for loop-variant refs.  Handle byte-tracking with
12110         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12111         limiting the walk.
12113 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
12115         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12116         (vect_get_mask_type_for_stmt): Likewise.
12117         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12118         split out from...
12119         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
12120         to determine the statement's vector type and the vector type that
12121         should be used for calculating nunits.  Deal with cases in which
12122         the type has to be deferred.
12123         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12124         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12125         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12126         (vect_determine_vf_for_stmt): New functions, split out from...
12127         (vect_determine_vectorization_factor): ...here.
12128         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12129         (vect_get_mask_type_for_stmt): New functions, split out from
12130         vect_determine_vectorization_factor.
12132 2018-05-16  Richard Biener  <rguenther@suse.de>
12134         * tree-cfg.c (verify_gimple_assign_ternary): Properly
12135         verify the [VEC_]COND_EXPR embedded comparison.
12137 2018-05-15  Martin Sebor  <msebor@redhat.com>
12139         PR tree-optimization/85753
12140         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12141         RECORD_TYPE in addition to ARRAY_TYPE.
12143 2018-05-15  Martin Sebor  <msebor@redhat.com>
12145         PR middle-end/85643
12146         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12148 2018-05-15  Richard Biener  <rguenther@suse.de>
12150         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12151         add by_clobber_p one.  Change algorithm to collect all defs
12152         representing uses we need to walk and try reducing them to
12153         a single one before failing.
12154         (dse_dom_walker::dse_optimize_stmt): Adjust.
12156 2018-05-13  Mark Wielaard  <mark@klomp.org>
12158         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12159         (size_of_loc_descr): Likewise.
12160         (output_loc_operands): Likewise.
12161         (output_loc_operands_raw): Likewise.
12162         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12163         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12164         (hash_loc_operands): Likewise.
12165         (compare_loc_operands): Likewise.
12167 2018-05-14  Mark Wielaard  <mark@klomp.org>
12169         * dwarf2out.c (count_index_addrs): New function.
12170         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12172 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12174         PR tree-optimization/83648
12175         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12176         return value as malloc candidate.
12178 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12180         PR ipa/85734
12181         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12182         param as true in call to suggest_attribute.
12184 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
12186         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12187         -mreadonly-in-sdata.
12189 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12191         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12192         New pattern.
12193         (aarch64_crypto_aesd_fused): Likewise.
12195 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
12197         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12198         (movsi_aarch64): Likewise.
12199         (load_pairsi): Likewise.
12200         (load_pairdi): Likewise.
12201         (store_pairsi): Likewise.
12202         (store_pairdi): Likewise.
12203         (load_pairsf): Likewise.
12204         (load_pairdf): Likewise.
12205         (store_pairsf): Likewise.
12206         (store_pairdf): Likewise.
12207         (zero_extend): Likewise.
12208         (trunc): Swap alternatives.
12209         (fcvt_target): Add '?' to prefer w over r.
12211 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
12213         PR target/85756
12214         * config/i386/i386.md: Disallow non-commutative arithmetics in
12215         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12216         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
12217         in the peephole2 before it.
12219 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
12221         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12222         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12223         (ix86_handle_option): Handle -mcldemote.
12224         * config.gcc: New header.
12225         * config/i386/cldemoteintrin.h: New file.
12226         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12227         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12228         -mcldemote.
12229         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12230         OPTION_MASK_ISA_CLDEMOTE.
12231         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12232         (ix86_valid_target_attribute_inner_p): Ditto.
12233         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12234         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12235         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12236         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12237         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12238         (cldemote): New.
12239         * config/i386/i386.opt: Add -mcldemote.
12240         * config/i386/x86intrin.h: New header.
12241         * doc/invoke.texi: Add -mcldemote.
12243 2018-05-14  Richard Biener  <rguenther@suse.de>
12245         * doc/match-and-simplify.texi: Adjust :s documentation.
12247 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
12249         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12250         intended memcpy size.
12251         (REORDER_45): Likewise.
12253 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
12255         * sort.cc: New file.
12256         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12257         * vec.c (qsort_chk): Use gcc_qsort.
12258         * Makefile.in (OBJS-libcommon): Add sort.o.
12259         (build/sort.o): New target.  Use it...
12260         (BUILD_RTL): ... here, and...
12261         (build/gencfn-macros): ... here, and...
12262         (build/genmatch): ... here.
12264 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12265             Chung-Ju Wu  <jasonwucj@gmail.com>
12267         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12268         * config/nds32/nds32-graywolf.md: New file.
12269         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12270         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12271         pipeline.
12272         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12273         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12274         * config/nds32/nds32.md (pipeline_model): Add graywolf.
12275         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12276         * config/nds32/pipelines.md: Include n15 settings.
12278 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12279             Chung-Ju Wu  <jasonwucj@gmail.com>
12281         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12282         * config/nds32/nds32-n13.md: New file.
12283         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12284         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12285         pipeline.
12286         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12287         * config/nds32/nds32.md (pipeline_model): Add n13.
12288         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12289         * config/nds32/pipelines.md: Include n13 settings.
12291 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12292             Chung-Ju Wu  <jasonwucj@gmail.com>
12294         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12295         * config/nds32/nds32-n10.md: New file.
12296         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12297         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12298         pipeline.
12299         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12300         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12301         * config/nds32/nds32.md (pipeline_model): Add n10.
12302         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12303         * config/nds32/pipelines.md: Include n10 settings.
12305 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
12306             Kito Cheng  <kito.cheng@gmail.com>
12307             Chung-Ju Wu  <jasonwucj@gmail.com>
12309         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12310         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12311         Add enum values for DSP extension instructions.
12312         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12313         New constraints.
12314         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12315         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12316         New code iterators.
12317         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12318         * config/nds32/nds32-dspext.md: New file for DSP implementation.
12319         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12320         * config/nds32/nds32-intrinsic.md: Likewise.
12321         * config/nds32/nds32_intrinsic.h: Likewise.
12322         * config/nds32/nds32-md-auxiliary.c: Likewise.
12323         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12324         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12325         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12326         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12327         * config/nds32/nds32-protos.h: New declarations for DSP extension.
12328         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12329         TYPE_DMAC in switch statement.
12330         * config/nds32/nds32.c: New checking and implementation for DSP
12331         extension instructions.
12332         * config/nds32/nds32.h: Likewise.
12333         * config/nds32/nds32.md: Likewise.
12334         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12335         * config/nds32/predicates.md: Implement new predicates for DSP
12336         extension.
12338 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
12340         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12341         Reformat alternatives and attributes so it is easier to identify
12342         which constraints/attributes go with which instruction.
12343         (mov<mode>_hardfloat32, FMOVE64): Likewise.
12344         (mov<mode>_softfloat32, FMOVE64): Likewise.
12345         (mov<mode>_hardfloat64, FMOVE64): Likewise.
12346         (mov<mode>_softfloat64, FMOVE64): Likewise.
12348 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12350         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12351         subsection.
12352         (Basic PowerPC Built-in Functions): The new name of the
12353         subsection previously known as "PowerPC Built-in Functions".
12354         (Basic PowerPC Built-in Functions Available on all Configurations):
12355         New subsubsection.
12356         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12357         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12358         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12359         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12361 2018-05-11  Martin Jambor  <mjambor@suse.cz>
12363         PR ipa/85655
12364         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12365         single const.
12367 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12369         PR target/85733
12370         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12372 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
12374         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12375         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12376         (ix86_handle_option): Handle -mwaitpkg.
12377         * config.gcc: New header.
12378         * config/i386/cpuid.h (bit_WAITPKG): New bit.
12379         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12380         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12381         function type.
12382         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12383         OPTION_MASK_ISA_WAITPKG.
12384         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12385         (ix86_option_override_internal): Add PTA_WAITPKG.
12386         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12387         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12388         IX86_BUILTIN_TPAUSE.
12389         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12390         __builtin_ia32_umwait and __builtin_ia32_tpause.
12391         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12392         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12393         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12394         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12395         UNSPECV_TPAUSE): New.
12396         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12397         * config/i386/i386.opt: Add -mwaitpkg.
12398         * config/i386/waitpkgintrin.h: New file.
12399         * config/i386/x86intrin.h: New header.
12400         * doc/invoke.texi: Add -mwaitpkg.
12402 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12404         PR target/85606
12405         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12406         equivalent.
12407         (cortex-m0): Use armv6s-m isa.
12408         (cortex-m0plus): Likewise.
12409         (cortex-m1): Likewise.
12410         (cortex-m0.small-multiply): Likewise.
12411         (cortex-m0plus.small-multiply): Likewise.
12412         (cortex-m1.small-multiply): Likewise.
12414 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
12415             Jakub Jelinek  <jakub@redhat.com>
12417         PR tree-optimization/85692
12418         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12419         source permute as well.
12421 2018-05-11  Martin Liska  <mliska@suse.cz>
12423         PR sanitizer/85556
12424         * doc/extend.texi: Document LLVM style format for no_sanitize
12425         attribute.
12427 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12429         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12430         mode_supports_vsx_dform_quad to mode_supports_dq_form.
12431         (mode_supports_vsx_dform_quad): Likewise.
12432         (mode_supports_vmx_dform): Move these functions to be next to the
12433         other mode_supports functions.
12434         (mode_supports_dq_form): Likewise.
12435         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12436         mode_supports_dq_form.
12437         (reg_offset_addressing_ok_p): Likewise.
12438         (offsettable_ok_by_alignment): Likewise.
12439         (rs6000_legitimate_offset_address_p): Likewise.
12440         (legitimate_lo_sum_address_p): Likewise.
12441         (rs6000_legitimize_address): Likewise.
12442         (rs6000_legitimize_reload_address): Likewise.
12443         (rs6000_secondary_reload_inner): Likewise.
12444         (rs6000_preferred_reload_class): Likewise.
12445         (rs6000_output_move_128bit): Likewise.
12447 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12449         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12450         Generate SImode target register for null target.
12451         <case IX86_BUILTIN_XGETBV>: Ditto.
12452         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12453         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12455 2018-05-10  Carl Love  <cel@us.ibm.com>
12457         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12458         dcbtt and dcbtstt if operands[2] is 0.
12460 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12462         PR target/85693
12463         * config/i386/sse.md (usadv64qi): New expander.
12465 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
12467         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12468         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12469         -maltivec=be support.
12470         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12471         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12472         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12473         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12474         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12475         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12476         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12477         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12478         altivec_vsumsws): Adjust.
12479         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12480         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12481         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12482         support.
12483         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12484         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12485         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12486         (altivec_lve<VI_char>x): Delete expand.
12487         (*altivec_lve<VI_char>x_internal): Rename to...
12488         (altivec_lve<VI_char>x): ... this.
12489         (altivec_lvxl_<mode>): Delete expand.
12490         (*altivec_lvxl_<mode>_internal): Rename to ...
12491         (altivec_lvxl_<mode>): ... this.
12492         (altivec_stvxl_<mode>): Delete expand.
12493         (*altivec_stvxl_<mode>_internal): Rename to ...
12494         (altivec_stvxl_<mode>): ... this.
12495         (altivec_stve<VI_char>x): Delete expand.
12496         (*altivec_stve<VI_char>x_internal): Rename to ...
12497         (altivec_stve<VI_char>x): ... this.
12498         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12499         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12500         reduc_plus_scal_<mode>): Adjust.
12501         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12502         comment.
12503         (rs6000_cpu_cpp_builtins): Adjust.
12504         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12505         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12506         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12507         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12508         -maltivec=be support.
12509         (rs6000_split_vec_extract_var): Adjust.
12510         (rs6000_split_v4si_init): Adjust.
12511         (swap_selector_for_mode): Delete.
12512         (altivec_expand_lvx_be, altivec_expand_stvx_be,
12513         altivec_expand_stvex_be): Delete.
12514         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12515         -maltivec=be support.
12516         (rs6000_gimple_fold_builtin): Ditto.
12517         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12518         Adjust.
12519         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12520         (TARGET_DIRECT_MOVE_64BIT): Adjust.
12521         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12522         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12523         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12524         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12525         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12526         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12527         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12528         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12529         anonymous split): Adjust.
12530         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12531         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12533 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
12535         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12536         when --with-gxx-include-dir is also specified.
12537         * configure: Regenerate.
12539 2018-05-09  Jim Wilson  <jimw@sifive.com>
12541         PR target/84797
12542         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12543         * config/riscv/t-withmultilib: New.
12544         * config/riscv/withmultilib.h: New.
12545         * doc/install.texi: Document RISC-V --with-multilib-list support.
12547 2018-05-09  Richard Biener  <rguenther@suse.de>
12549         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12550         vector.
12551         (vect_bb_vectorization_profitable_p): Adjust.  Compute
12552         actual scalar cost using the cost vector and the add_stmt_cost
12553         machinery.
12555 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12557         PR rtl-optimization/85645
12558         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12559         in the REG_CFA_REGISTER note for LR, don't leave it empty.
12561 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12563         PR rtl-optimization/85645
12564         * shrink-wrap.c (spread_components): Return a boolean saying if
12565         anything was changed.
12566         (try_shrink_wrapping_separate): Iterate spread_components until
12567         nothing changes anymore.
12569 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12571         PR rtl-optimization/85645
12572         * regrename.c (build_def_use): Also kill the chains that include the
12573         destination of a REG_CFA_REGISTER note.
12575 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12577         PR rtl-optimization/85645
12578         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12579         insn that has a REG_CFA_REGISTER note.
12581 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
12583         * cfgexpand.c (expand_clobber): New function.
12584         (expand_gimple_stmt_1): Use it.
12585         * tree-vect-stmts.c (vect_clobber_variable): New function,
12586         split out from...
12587         (vectorizable_simd_clone_call): ...here.
12588         (vectorizable_store): Emit a clobber either side of an
12589         IFN_STORE_LANES sequence.
12590         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12592 2018-05-09  Tom de Vries  <tom@codesourcery.com>
12594         PR target/85626
12595         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12596         (define_insn "trap_if_false"): Add exit after trap.
12598 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
12600         PR rtl-optimization/85638
12601         * bb-reorder.c: Include common/common-target.h.
12602         (create_forwarder_block): New function extracted from...
12603         (fix_up_crossing_landing_pad): ...here.  Rename into...
12604         (dw2_fix_up_crossing_landing_pad): ...this.
12605         (sjlj_fix_up_crossing_landing_pad): New function.
12606         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12607         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12608         from both partitions and exit the loop after one iteration.
12610 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12612         Revert:
12613         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12614         subsection.
12615         (Basic PowerPC Built-in Functions): The new name of the
12616         subsection previously known as "PowerPC Built-in Functions".
12617         (Basic PowerPC Built-in Functions Available on all Configurations):
12618         New subsubsection.
12619         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12620         subsubsection.
12621         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12622         subsubsection.
12623         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12624         subsubsection.
12625         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12626         subsubsection.
12628 2018-05-08  Jim Wilson  <jimw@sifive.com>
12630         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12631         (LD_EMUL_SUFFIX): New.
12632         (LINK_SPEC): Use it.
12634 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12636         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12637         subsection.
12638         (Basic PowerPC Built-in Functions): The new name of the
12639         subsection previously known as "PowerPC Built-in Functions".
12640         (Basic PowerPC Built-in Functions Available on all Configurations):
12641         New subsubsection.
12642         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12643         subsubsection.
12644         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12645         subsubsection.
12646         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12647         subsubsection.
12648         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12649         subsubsection.
12651 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
12653         PR target/85683
12654         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12655         after cmpelim optimization.
12657 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
12659         * config.gcc: Support "goldmont".
12660         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12661         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12662         PROCESSOR_GOLDMONT.
12663         * config/i386/i386.c (m_GOLDMONT): Define.
12664         (processor_target_table): Add "goldmont".
12665         (PTA_GOLDMONT): Define.
12666         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12667         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12668         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12669         (fold_builtin_cpu): Add "goldmont".
12670         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12671         (ix86_option_override_internal): Add "goldmont".
12672         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12673         (processor_type): Add PROCESSOR_GOLDMONT.
12674         * config/i386/i386.md: Add CPU "glm".
12675         * config/i386/glm.md: New file.
12676         * config/i386/x86-tune.def: Add m_GOLDMONT.
12677         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12679 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
12681         PR target/85572
12682         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12683         E_V4DImode.
12684         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12685         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
12686         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
12688         PR target/85317
12689         * config/i386/i386.c (ix86_fold_builtin): Handle
12690         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12692         PR target/85480
12693         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12694         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12696 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
12698         PR target/85658
12699         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12700         (check_arch): Likewise.
12701         (check_fpu): Return the result rather than printing it.
12702         (end arch): Fix operator precedence.
12703         (end cpu): Likewise.
12704         (END): Print the result from check_fpu.
12706 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12707             Alan Hayward  <alan.hayward@arm.com>
12708             David Sherwood  <david.sherwood@arm.com>
12710         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12711         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12712         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12713         (*fcmuo<mode>_and): New patterns.
12715 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12717         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12718         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12719         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12720         (cmp_op, sve_imm_con): New code attributes.
12721         (SVE_COND_INT_CMP, imm_con): Delete.
12722         (cmp_op): Remove above unspecs from int attribute.
12723         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12724         to...
12725         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
12726         comparison-specific unspecs.
12727         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12728         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12729         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12730         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12731         (*vec_fcm<cmp_op><mode>): Rename to...
12732         (*fcm<cmp_op><mode>): ...this and adjust likewise.
12733         (*vec_fcmuo<mode>): Rename to...
12734         (*fcmuo<mode>): ...this and adjust likewise.
12735         (*pred_fcm<cmp_op><mode>): New pattern.
12736         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12737         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12738         functions.
12739         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12740         and UNORDERED.
12741         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12742         (aarch64_emit_sve_predicated_cond): New function.
12743         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12744         (aarch64_emit_unspec_cond_or): Replace with...
12745         (aarch64_emit_sve_or_conds): ...this new function.  Use
12746         aarch64_emit_sve_ptrue_op for the individual comparisons and
12747         aarch64_emit_binop to OR them together.
12748         (aarch64_emit_inverted_unspec_cond): Replace with...
12749         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
12750         aarch64_emit_sve_ptrue_op for the comparison and
12751         aarch64_emit_unop to invert the result.
12752         (aarch64_expand_sve_vec_cmp_float): Update after the above
12753         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
12755 2018-05-07  Nathan Sidwell  <nathan@acm.org>
12757         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12758         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12759         (Backwards Compatibility): Likewise.
12761 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12763         PR bootstrap/85681
12764         Revert:
12765         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12767         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12768         <prefetch_dynamic_strides>: New const bool field.
12769         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12770         prefetch_dynamic_strides.
12771         (exynosm1_prefetch_tune): Likewise.
12772         (thunderxt88_prefetch_tune): Likewise.
12773         (thunderx_prefetch_tune): Likewise.
12774         (thunderx2t99_prefetch_tune): Likewise.
12775         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12776         to false.
12777         (aarch64_override_options_internal): Update to set
12778         PARAM_PREFETCH_DYNAMIC_STRIDES.
12779         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12780         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12781         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12782         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12783         prefetch-dynamic-strides setting.
12785         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12787         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12788         <minimum_stride>: New const int field.
12789         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12790         minimum_stride field.
12791         (exynosm1_prefetch_tune): Likewise.
12792         (thunderxt88_prefetch_tune): Likewise.
12793         (thunderx_prefetch_tune): Likewise.
12794         (thunderx2t99_prefetch_tune): Likewise.
12795         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12796         (aarch64_override_options_internal): Update to set
12797         PARAM_PREFETCH_MINIMUM_STRIDE.
12798         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12799         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12800         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12801         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12802         stride is constant and is below the minimum stride threshold.
12804 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12806         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12807         to 512.
12809 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12811         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12812         <prefetch_dynamic_strides>: New const bool field.
12813         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12814         prefetch_dynamic_strides.
12815         (exynosm1_prefetch_tune): Likewise.
12816         (thunderxt88_prefetch_tune): Likewise.
12817         (thunderx_prefetch_tune): Likewise.
12818         (thunderx2t99_prefetch_tune): Likewise.
12819         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12820         to false.
12821         (aarch64_override_options_internal): Update to set
12822         PARAM_PREFETCH_DYNAMIC_STRIDES.
12823         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12824         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12825         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12826         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12827         prefetch-dynamic-strides setting.
12829 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12831         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12832         <minimum_stride>: New const int field.
12833         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12834         minimum_stride field.
12835         (exynosm1_prefetch_tune): Likewise.
12836         (thunderxt88_prefetch_tune): Likewise.
12837         (thunderx_prefetch_tune): Likewise.
12838         (thunderx2t99_prefetch_tune): Likewise.
12839         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12840         (aarch64_override_options_internal): Update to set
12841         PARAM_PREFETCH_MINIMUM_STRIDE.
12842         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12843         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12844         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12845         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12846         stride is constant and is below the minimum stride threshold.
12848 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
12850         PR c++/85659
12851         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12852         the type is addressable.  Don't force op into register if it has
12853         BLKmode.
12855 2018-05-05  Roland McGrath  <mcgrathr@google.com>
12857         PR other/77609
12858         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12859         any section for which we don't know a specific type it should have,
12860         regardless of name.  Previously this was done only for the exact
12861         names ".init_array", ".fini_array", and ".preinit_array".
12862         (default_elf_asm_named_section): Add comment about
12863         relationship with default_section_type_flags and SECTION_NOTYPE.
12864         (get_section): Don't consider it a type conflict if one side has
12865         SECTION_NOTYPE and the other doesn't, as long as neither has the
12866         SECTION_BSS et al used in the default_section_type_flags logic.
12868 2018-05-05  Tom de Vries  <tom@codesourcery.com>
12870         PR target/85653
12871         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12872         (workaround_barsyncs): New function.
12873         (nvptx_reorg): Use workaround_barsyncs.
12874         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
12875         (define_expand "nvptx_membar_cta"): New define_expand.
12876         (define_insn "*nvptx_membar_cta"): New insn.
12878 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
12880         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
12881         To improve optimization opportunities.
12882         * builtin-types.def: The new needed builtin types for the above.
12884 2018-05-04  Richard Biener  <rguenther@suse.de>
12886         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
12887         * gimple-ssa-store-merging.c
12888         (imm_store_chain_info::output_merged_store): Remove redundant create,
12889         release split_store vector contents on failure.
12890         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
12891         scalar stmt vector on cache hit.
12893 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
12895         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
12896         Xilinx FP support.
12897         * config.gcc (powerpc-xilinx-eabi*): Remove.
12898         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
12899         support.
12900         (fusion_addis_mem_combo_load): Ditto.
12901         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
12902         FP support.
12903         (rs6000_cpu_cpp_builtins): Ditto.
12904         * config/rs6000/rs6000-linux.c
12905         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
12906         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
12907         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
12908         support.
12909         (rs6000_setup_reg_addr_masks): Ditto.
12910         (rs6000_init_hard_regno_mode_ok): Ditto.
12911         (rs6000_option_override_internal): Ditto.
12912         (legitimate_lo_sum_address_p): Ditto.
12913         (rs6000_legitimize_address): Ditto.
12914         (rs6000_legitimize_reload_address): Ditto.
12915         (rs6000_legitimate_address_p): Ditto.
12916         (abi_v4_pass_in_fpr): Ditto.
12917         (setup_incoming_varargs): Ditto.
12918         (rs6000_gimplify_va_arg): Ditto.
12919         (rs6000_split_multireg_move): Ditto.
12920         (rs6000_savres_strategy): Ditto.
12921         (rs6000_emit_prologue_components): Ditto.
12922         (rs6000_emit_epilogue_components): Ditto.
12923         (rs6000_emit_prologue): Ditto.
12924         (rs6000_emit_epilogue): Ditto.
12925         (rs6000_elf_file_end): Ditto.
12926         (rs6000_function_value): Ditto.
12927         (rs6000_libcall_value): Ditto.
12928         * config/rs6000/rs6000.h: Ditto.
12929         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
12930         (TARGET_MINMAX): ... this.  New.
12931         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
12932         * config/rs6000/rs6000.md: Remove Xilinx FP support.
12933         (*movsi_internal1_single): Delete.
12934         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
12935         mfpu=, mxilinx-fpu): Delete.
12936         * config/rs6000/singlefp.h: Delete.
12937         * config/rs6000/sysv4.h: Remove Xilinx FP support.
12938         * config/rs6000/t-rs6000: Ditto.
12939         * config/rs6000/t-xilinx: Delete.
12940         * config/rs6000/titan.md: Adjust for fp_type removal.
12941         * config/rs6000/vsx.md: Remove Xilinx FP support.
12942         (VStype_simple): Delete.
12943         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
12944         * config/rs6000/xfpu.h: Delete.
12945         * config/rs6000/xfpu.md: Delete.
12946         * config/rs6000/xilinx.h: Delete.
12947         * config/rs6000/xilinx.opt: Delete.
12948         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
12949         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
12951 2018-05-04  Tom de Vries  <tom@codesourcery.com>
12953         PR libgomp/85639
12954         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
12955         if ignore == 0.
12957 2018-05-04  Richard Biener  <rguenther@suse.de>
12959         PR middle-end/85627
12960         * tree-complex.c (update_complex_assignment): We are always in SSA form.
12961         (expand_complex_div_wide): Likewise.
12962         (expand_complex_operations_1): Likewise.
12963         (expand_complex_libcall): Preserve EH info of the original stmt.
12964         (tree_lower_complex): Handle removed blocks.
12965         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12966         on complex multiplication and division libcall builtins.
12968 2018-05-04  Richard Biener  <rguenther@suse.de>
12970         PR middle-end/85574
12971         * fold-const.c (negate_expr_p): Restrict negation of operand
12972         zero of a division to when we know that can happen without
12973         overflow.
12974         (fold_negate_expr_1): Likewise.
12976 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
12978         PR libstdc++/85466
12979         * real.h (real_nextafter): Declare.
12980         * real.c (real_nextafter): New function.
12981         * fold-const-call.c (fold_const_nextafter): New function.
12982         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12983         CASE_CFN_NEXTTOWARD.
12984         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12985         even when arg1_mode is different from arg0_mode.
12987 2018-05-03  Nathan Sidwell  <nathan@acm.org>
12989         * doc/extend.texi (Deprecated Features): Remove
12990         -ffriend-injection.
12991         (Backwards Compatibility): Likewise.
12992         * doc/invoke.texi (C++ Language Options): Likewise.
12993         (C++ Dialect Options): Likewise.
12995 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
12997         PR target/85530
12998         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12999         _mm512_mask_mullox_epi64): New intrinsics.
13001 2018-05-03  Tom de Vries  <tom@codesourcery.com>
13003         PR testsuite/85106
13004         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13005         dump files): Add offload-tree.
13007 2018-05-03  Richard Biener  <rguenther@suse.de>
13009         PR tree-optimization/85615
13010         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13011         to loops not nested in BBs loop father to avoid creating multi-entry
13012         loops.
13014 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13016         PR tree-optimization/70291
13017         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13018         arguments.  Change return type to tree.  Emit libcall as a new
13019         statement rather than replacing existing one when inplace_p is true.
13020         (expand_complex_multiplication_components): New function.
13021         (expand_complex_multiplication): Expand floating-point complex
13022         multiplication using the above.
13023         (expand_complex_division): Rename inner_type parameter to type.
13024         Update expand_complex_libcall call-site.
13025         (expand_complex_operations_1): Update expand_complex_multiplication
13026         and expand_complex_division call-sites.
13028 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13030         PR target/85582
13031         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13032         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13033         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13034         the highest significant bit of the shift count mask is clear.  In
13035         check whether and[sq]i3 is needed verify that all significant bits
13036         of the shift count other than the highest are set.
13038 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13040         PR libgomp/82428
13041         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13042         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13043         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13044         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13045         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13046         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13047         __builtin_goacc_parlevel_size.
13049 2018-05-02  Richard Biener  <rguenther@suse.de>
13051         PR tree-optimization/85597
13052         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13053         do not use split vect_get_vec_defs call but call vect_get_slp_defs
13054         directly.
13056 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13058         PR testsuite/85106
13059         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13060         dump files): Add ltrans-tree.
13062 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13064         PR testsuite/85106
13065         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13066         dump files): Add wpa-ipa.
13068 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
13070         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
13071         powerpc*-*-linux*paired* target.
13072         * config/rs6000/750cl.h: Delete.
13073         * config/rs6000/paired.h: Delete.
13074         * config/rs6000/paired.md: Delete.
13075         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13076         float support.
13077         * config/rs6000/rs6000-builtin.def: Remove paired float support.
13078         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13079         comment.  Remove paired float support.
13080         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13081         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13082         VECTOR_PAIRED.
13083         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13084         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13085         declarations.
13086         * config/rs6000/rs6000.c: Remove paired float support.
13087         (paired_expand_vector_init, paired_expand_vector_move,
13088         paired_emit_vector_compare, paired_emit_vector_cond_expr,
13089         (paired_expand_lv_builtin, paired_expand_stv_builtin,
13090         paired_expand_builtin, paired_expand_predicate_builtin,
13091         paired_init_builtins): Delete.
13092         * config/rs6000/rs6000.h: Remove paired float support.
13093         * config/rs6000/rs6000.md: Remove paired float support.
13094         (move_from_CR_ov_bit): Delete.
13095         * config/rs6000/rs6000.opt (mpaired): Delete.
13096         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13097         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13099 2018-05-02  Richard Biener  <rguenther@suse.de>
13101         PR middle-end/85567
13102         * gimplify.c (gimplify_save_expr): When in SSA form allow
13103         SAVE_EXPRs to compute to SSA vars.
13105 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13107         PR target/85582
13108         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13109         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13110         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13111         clobber operands[2], instead use a new pseudo.  Formatting fixes.
13113 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
13115         PR tree-optimization/85586
13116         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13117         exit early for statements in the same group if the accesses are
13118         not strided.
13120 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13122         PR lto/85451
13123         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13124         error message.
13126 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
13128         PR tree-optimization/85143
13129         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13131 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13133         PR lto/85451
13134         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13135         not found" error message.
13137 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13139         PR other/83786
13140         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13141         * vec.c (test_ordered_remove_if): New function.
13142         (vec_c_tests): Call test_ordered_remove_if.
13143         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13144         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13145         * tree-vect-patterns.c (vect_pattern_recog_1): Use
13146         VEC_ORDERED_REMOVE_IF.
13148 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13150         PR tree-optimization/82665
13151         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13152         pointer subtraction where arguments come from a memchr call.
13154 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
13156         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13157         --push-state --as-needed and --pop-state instead of --as-needed and
13158         --no-as-needed if ld supports it.
13159         * configure: Regenerated.
13161         PR web/85578
13162         * doc/install.texi2html: Replace _002d with - and _002a with * in
13163         generated html files using sed.
13165 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13167         PR c++/85523
13168         * gcc-rich-location.c (blank_line_before_p): New function.
13169         (use_new_line): New function.
13170         (gcc_rich_location::add_fixit_insert_formatted): New function.
13171         * gcc-rich-location.h
13172         (gcc_rich_location::add_fixit_insert_formatted): New function.
13174 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13176         * selftest.c (assert_streq): Rename "expected" and "actual" to
13177         "val1" and "val2".  Extend NULL-handling to cover both inputs
13178         symmetrically, while still requiring both to be non-NULL for a pass.
13179         * selftest.h (assert_streq): Rename "expected" and "actual" to
13180         "val1" and "val2".
13181         (ASSERT_EQ): Likewise.
13182         (ASSERT_EQ_AT): Likewise.
13183         (ASSERT_KNOWN_EQ): Likewise.
13184         (ASSERT_KNOWN_EQ_AT): Likewise.
13185         (ASSERT_NE): Likewise.
13186         (ASSERT_MAYBE_NE): Likewise.
13187         (ASSERT_MAYBE_NE_AT): Likewise.
13188         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
13189         the assertion to pass.
13190         (ASSERT_STREQ_AT): Likewise.
13192 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13194         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13195         interaction with -pie.
13197 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13199         * selftest.h: Fix alphabetization of per-source-file selftest
13200         declarations.
13202 2018-04-30  Jason Merrill  <jason@redhat.com>
13204         PR c++/61982 - dead stores to destroyed objects.
13205         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13206         of clobber.
13208 2018-04-30  Jason Merrill  <jason@redhat.com>
13210         * tree.c (build_clobber): New.
13211         * tree.h: Declare it.
13212         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13214 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13216         * diagnostic-show-locus.c (layout::layout): Update for
13217         location_get_source_line returning a char_span.
13218         (struct char_span): Move to input.h.
13219         (struct correction): Update for fields in char_span becoming
13220         private.
13221         (struct source_line): Update for location_get_source_line
13222         returning a char_span.
13223         (layout::print_line): Likewise.
13224         * edit-context.c (edited_file::print_content): Likewise.
13225         (edited_file::print_diff_hunk): Likewise.
13226         (edited_file::print_run_of_changed_lines): Likewise.
13227         (edited_file::get_num_lines): Likewise.
13228         (edited_line::edited_line): Likewise.
13229         * final.c (asm_show_source): Likewise.
13230         * input.c (location_get_source_line): Convert return type
13231         from const char * to char_span, losing the final "line_len"
13232         param.
13233         (dump_location_info): Update for the above.
13234         (get_substring_ranges_for_loc): Likewise.  Use a char_span
13235         when handling the literal within the line.
13236         (test_reading_source_line): Update for location_get_source_line
13237         returning a char_span.
13238         * input.h (class char_span): Move here from
13239         diagnostic-show-locus.c, converting from a struct to a class.
13240         Make data members private.
13241         (char_span::operator bool): New.
13242         (char_span::length): New.
13243         (char_span::get_buffer): New.
13244         (char_span::operator[]): New.
13245         (char_span::subspan): Make const.
13246         (char_span::xstrdup): New.
13247         (location_get_source_line): Convert return type from const char *
13248         to char_span, losing the final "line_size" param.
13250 2018-04-30  Jan Hubicka  <jh@suse.cz>
13252         * lto-wrapper.c (ltrans_priorities): New static var.
13253         (cmp_priority): New.
13254         (run_gcc): Read priorities and if doing parallel build order
13255         the Makefile by them.
13257 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13259         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13261 2018-04-30  Richard Biener  <rguenther@suse.de>
13263         * tree-cfg.c (verify_address): Remove base argument, add
13264         flag whether to check TREE_ADDRESSABLE and do that.
13265         (verify_expr): Remove.
13266         (verify_types_in_gimple_reference): Add pieces from verify_expr.
13267         (verify_gimple_assign_single): Likewise.
13268         (verify_gimple_switch): Likewise.
13269         (verify_expr_location_1): Dereference tp once.  Add (disabled)
13270         piece from verify_expr.
13271         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13273 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13275         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13277 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13279         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13280         (small_data_pattern): Likewise.
13281         (arc_rewrite_small_data): Likewise.
13282         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13283         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13284         (get_symbol_alignment): New function.
13285         (legitimate_small_data_address_p): Likewise.
13286         (legitimate_scaled_address): Update, call
13287         legitimate_small_data_address_p.
13288         (output_sdata): New static variable.
13289         (arc_print_operand): Update how we handle small data operands.
13290         (arc_print_operand_address): Likewise.
13291         (arc_legitimate_address_p): Update, use
13292         legitimate_small_data_address_p.
13293         (arc_rewrite_small_data_p): Remove.
13294         (arc_rewrite_small_data_1): Likewise.
13295         (arc_rewrite_small_data): Likewise.
13296         (small_data_pattern): Likewise.
13297         (compact_sda_memory_operand): Update to use
13298         legitimate_small_data_address_p and get_symbol_alignment.
13299         (prepare_move_operands): Don't rewite sdata pattern.
13300         (prepare_extend_operands): Remove.
13301         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13302         pattern.
13303         (zero_extendqisi2): Likewise.
13304         (zero_extendhisi2): Likewise.
13305         (extendqihi2): Likewise.
13306         (extendqisi2): Likewise.
13307         (extendhisi2): Likewise.
13308         (addsi3): Likewise.
13309         (subsi3): Likewise.
13310         (andsi3): Likewise.
13311         * config/arc/constraints.md (Usd): Change it to memory constraint.
13313 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13315         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13316         as source of std instructions.
13317         * config/arc/arc.md (movsi_insn): Update pattern predicate to
13318         allow 6-bit constants as source for store instructions.
13319         (movdi_insn): Update instruction pattern to allow 6-bit constants
13320         as source for store instructions.
13322 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13324         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13326 2018-04-30  Nathan Sidwell  <nathan@acm.org>
13327             Sandra Loosemore <sandra@codesourcery.com>
13329         * dumpfile.c (dump_open): Allow '-' for stdout.
13330         * doc/invoke.texi (Developer Options): Document dump filename
13331         determination early.  Document stdin/stdout selection.
13333 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
13335         Microblaze Target: PIC data text relative
13337         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13338         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13339         Add declaration.
13340         * config/microblaze/microblaze.h (microblaze_constant_address_p):
13341         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13342         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13343         New addressing mode for data-text relative position indepenedent code.
13344         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13345         'ADDRESS_SYMBOLIC_TXT_REL'.
13346         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13347         (microblaze_legitimate_pic_operand): Exclude function calls from
13348         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13349         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13350         addresses cases.
13351         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13352         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13353         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13354         for 'address + offset'.
13355         (microblaze_expand_prologue): Add new function prologue call for
13356         'r20' assignation.
13357         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13358         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13359         table in case of TARGET_PIC_DATA_TEXT_REL.
13360         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13361         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13362         Add new macros 'UNSPEC_TEXT',
13363         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13364         + exclude function calls from 'UNSPEC_PLT' in case of data text
13365         relative mode.
13366         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13367         new target hook for generating address diff vector tables in case of
13368         flag_pic.
13369         * doc/tm.texi : Regenerate.
13370         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13371         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13372         of addr diff vector generation.
13373         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13374         target hook definition.
13375         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13376         Add default function for generate_pic_addr_diff_vec -> flag_pic.
13377         * doc/invoke.texi (Add new pic option): Add new microblaze pic
13378         option for data text relative.
13380 2018-04-30  Richard Biener  <rguenther@suse.de>
13382         * tree-chrec.h (evolution_function_is_constant_p): Remove
13383         redundant check.
13384         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13386 2018-04-30  Richard Biener  <rguenther@suse.de>
13388         PR bootstrap/85571
13389         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13391 2018-04-30  Richard Biener  <rguenther@suse.de>
13393         PR tree-optimization/28364
13394         PR tree-optimization/85275
13395         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13396         copying first exit test.
13398 2018-04-28  Mark Wielaard  <mark@klomp.org>
13400         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13401         dwarf_version >= 5.
13402         (dwarf_AT): Handle DW_AT_addr_base.
13403         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13405 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
13407         PR target/84431
13408         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13409         (*ashl<dwi>3_doubleword_mask_1): Ditto.
13410         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13411         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13413 2018-04-28  Richard Biener  <rguenther@suse.de>
13415         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13416         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13417         to reflect use.  Only add interesting stmts.
13419 2018-04-27  Martin Jambor  <mjambor@suse.cz>
13421         PR ipa/85549
13422         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13423         the jump function allows for passing through aggregate values.
13425 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
13427         * input.h (in_system_header_at): Convert from macro to inline
13428         function.
13429         (from_macro_expansion_at): Likewise.
13430         (from_macro_definition_at): Likewise.
13432 2018-04-27  Jeff Law  <law@redhat.com>
13434         * config.gcc: Mark tile* targets as deprecated/obsolete.
13436 2018-04-27  Richard Biener  <rguenther@suse.de>
13438         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13439         fix for ILP32.
13441 2018-04-27  Richard Biener  <rguenther@suse.de>
13443         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13445 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
13447         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13448         with Yd constraint. Set "preferred_for_speed" attribute from
13449         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13450         with Yd constraint.
13451         (*movdi_internal): Ditto.
13452         (movti_interunit splitters): Remove
13453         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13454         (movdi_interunit splitters): Ditto.
13455         * config/i386/constraints.md (Ye): Remove.
13456         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13458 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13460         PR target/85512
13461         * config/aarch64/constraints.md (Usg): Limit to 31.
13462         (Usj): Limit to 63.
13464 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
13466         PR tree-optimization/85529
13467         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13468         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13469         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13470         zero extension or masking of the MSB bit.
13471         (optimize_range_tests): Add FIRST_BB argument, pass it through
13472         to optimize_range_tests_var_bound.
13473         (maybe_optimize_range_tests, reassociate_bb): Adjust
13474         optimize_range_tests callers.
13476 2018-04-26  Richard Biener  <rguenther@suse.de>
13477             Jakub Jelinek  <jakub@redhat.com>
13479         * cgraph.h (symbol_table): Just declare debug method here.
13480         * symtab.c (symbol_table::debug): Define.
13482 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
13484         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13486 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
13488         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13489         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13490         (*movdi_internal): Substitute Yi and Yj constraint with x
13491         and Ym and Yn constraint with y constraint.  Update "isa"
13492         attribute and set "preferred_for_speed" attribute from
13493         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13494         (*movsi_internal): Ditto.
13495         (*movdf_internal): Ditto.
13496         (*movsf_internal): Ditto.
13497         (*zero_extendsidi2): Ditto.
13498         * config/i386/sse.md (vec_set<mode>_0): Ditto.
13499         (sse2_loadld): Ditto.
13500         (*vec_extract<ssevecmodelower>_0): Ditto.
13501         (*vec_extractv4si_0_zext_sse4): Ditto.
13502         (vec_concatv2di): Ditto.
13503         (*vec_dup<mode>): Ditto.
13504         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13505         * config/i386/constraints.md (Yi): Remove.
13506         (Yj): Remove.
13507         (Ym): Remove.
13508         (Yn): Remove.
13510 2018-04-26  Nathan Sidwell  <nathan@acm.org>
13512         * dumpfile.c (dump_open): New.
13513         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13514         (dump_finish): Detect stdio/stderr by value not name.
13516 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
13518         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13520 2018-04-26  Tom de Vries  <tom@codesourcery.com>
13522         PR target/84952
13523         * config/nvptx/nvptx.c (verify_neutering_jumps)
13524         (verify_neutering_labels): New function
13525         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13527 2018-04-26  Tom de Vries  <tom@codesourcery.com>
13529         PR target/84025
13530         * config/nvptx/nvptx.c (needs_neutering_p): New function.
13531         (nvptx_single): Use needs_neutering_p to skip over insns that do not
13532         need neutering.
13534 2018-04-26  Richard Biener <rguenther@suse.de>
13535             Tom de Vries  <tom@codesourcery.com>
13537         PR lto/85422
13538         * lto-streamer-out.c (output_function): Fixup loops if required to match
13539         discovery done in the reader.
13541 2018-04-26  Richard Biener  <rguenther@suse.de>
13543         PR tree-optimization/85116
13544         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13545         have a loop exit from the single latch predecessor.  Remove
13546         case of header with just condition.
13547         (ch_base::copy_headers): Exclude infinite loops from any
13548         processing.
13549         (pass_ch::execute): Record exits.
13551 2018-04-26  Richard Biener  <rguenther@suse.de>
13553         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13554         prologue cost vector and pass it to vect_get_load_cost.
13555         (vect_get_peeling_costs_all_drs): Likewise.
13556         (vect_peeling_hash_get_lowest_cost): Likewise.
13557         (vect_enhance_data_refs_alignment): Likewise.
13559 2018-04-26  Richard Biener  <rguenther@suse.de>
13561         PR middle-end/85450
13562         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13563         checking of integer<->pointer conversions.
13564         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13565         sign-/zero-extending pointer types.
13566         (expand_omp_for_static_chunk): Likewise.
13568 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
13569             Jean Lee  <xiaoyur347@gmail.com>
13571         * config/mips/mips.c (mips_asan_shadow_offset): New function.
13572         (TARGET_ASAN_SHADOW_OFFSET): Define.
13573         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13574         true for -fsanitize=address.
13576 2018-04-25  Mark Wielaard  <mark@klomp.org>
13578         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13579         shorter ones.
13581 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
13583         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13584         than "alu", remove explicit "memory" and "imm_disp" attributes.
13585         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13587         PR middle-end/85414
13588         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13589         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13590         gen_lowpart_no_emit.
13592 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
13594         PR target/85473
13595         * config/i386/i386.c (ix86_expand_builtin): Change memory
13596         operand to XI, extend p0 to Pmode.
13597         * config/i386/i386.md: Change unspec volatile and operand
13598         1 mode to XI, change operand 0 mode to P.
13600 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13602         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13603         GET_MODE_MASK before any checking.
13604         (nds32_can_use_bset_p): Likewise.
13605         (nds32_can_use_btgl_p): Likewise.
13607 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13609         * config/nds32/nds32-doubleword.md: New define_split pattern for
13610         illegal register number.
13612 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13614         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13616 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13618         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13620 2018-04-25  Richard Biener  <rguenther@suse.de>
13622         * lto-streamer.h (LTO_major_version): Bump to 8.
13624 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
13626         * BASE-VER: Set to 9.0.0.
13628 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
13630         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13631         in __abskf2 and __powikf2.
13633 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13635         PR target/85512
13636         * config/aarch64/constraints.md (Usg, Usj): New constraints.
13637         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13638         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13639         Use the above on operand 2.  Reindent.
13640         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13642 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
13644         PR target/85485
13645         * common/config/i386/i386-common.c (ix86_handle_option): Don't
13646         handle OPT_mcet.
13647         * config/i386/i386.opt (mcet): Removed.
13648         * doc/install.texi: Remove -mcet documentation.
13649         * doc/invoke.texi: Likewise.
13651 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
13653         PR target/85485
13654         * doc/install.texi: Remove -mcet from bootstrap-cet.
13656 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13658         PR target/85511
13659         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13660         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13661         if TARGET_64BIT.
13663         PR target/85503
13664         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13665         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13666         containing a CONST_VECTOR.
13668 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
13670         * doc/install.texi: Update newlib dependency for nvptx.
13672 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13674         PR target/85508
13675         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13676         instead of INTVAL when shifting x left.
13678 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
13680         PR tree-optimization/85478
13681         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13682         vect_grouped_store_supported for single element vectors.
13684 2018-04-24  Richard Biener  <rguenther@suse.de>
13686         PR target/85491
13687         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13688         load cost increase to the case of non-constant step.
13690 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13692         PR target/84828
13693         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13694         destination if any_malformed_asm.
13696 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
13698         PR middle-end/85496
13699         * expr.c (store_field): In the bitfield case, if the value comes from
13700         a function call and is returned in registers by means of a PARALLEL,
13701         do not change the mode of the temporary unless BLKmode and VOIDmode.
13703 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
13705         PR rtl-optimization/85423
13706         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13707         dependencies to debug insns when the previous insn is non-debug.
13709 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13711         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13712         enums into a single definition.
13713         (fls): Fix predicates and printing.
13714         (seti): Likewise.
13716 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13718         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13719         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13720         and short u6 immediate.
13721         (check_if_valid_sleep_operand): Remove.
13722         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13724 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13726         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13727         flag_always_save_lp condition.
13728         * config/nds32/nds32.opt (malways-save-lp): New option.
13730 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13732         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13733         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13734         * config/nds32/nds32.h
13735         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13736         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13738 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13740         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13741         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13743 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13744             Chung-Ju Wu  <jasonwucj@gmail.com>
13746         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13747         Declare.
13748         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13749         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13751 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13753         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13755 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13757         * config/nds32/nds32-protos.h (nds32_data_alignment,
13758         nds32_local_alignment): Declare.
13759         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13760         nds32_local_alignment): New functions.
13761         (TARGET_CONSTANT_ALIGNMENT): Define.
13762         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13764 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13766         * config/nds32/nds32.c
13767         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13768         (TARGET_MODES_TIEABLE_P): Likewise.
13770 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13772         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13773         level Ofast and Og.
13775 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
13776             Chung-Ju Wu  <jasonwucj@gmail.com>
13778         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13779         for unaligned access.
13780         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13781         unaligned access.
13782         * config/nds32/nds32-intrinsic.md: Likewise.
13783         * config/nds32/nds32_intrinsic.h: Likewise.
13784         * config/nds32/nds32.h (nds32_builtins): Likewise.
13785         * config/nds32/nds32.opt (munaligned-access): New option.
13786         * config/nds32/nds32.c (nds32_asm_file_start): Display
13787         flag_unaligned_access status.
13789 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13791         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13792         -mno-relax is present.
13793         * config/riscv/linux.h (LINK_SPEC): Ditto.
13795 2018-04-20  Martin Sebor  <msebor@redhat.com>
13797         PR c/85365
13798         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13799         for null pointers.
13800         (gimple_fold_builtin_stxcpy_chk): Same.
13801         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13803 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
13805         PR target/85456
13806         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13807         __powikf2 when long double is IEEE 128-bit.
13809 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13811         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13812         step to make sure stack always aligned.
13814 2018-04-20  Carl Love  <cel@us.ibm.com>
13816         PR target/83402
13817         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13818         size check for arg0.
13820 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13821             Tom de Vries  <tom@codesourcery.com>
13823         PR target/85445
13824         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13825         Emit insns for calls too.
13826         (nvptx_find_par): Always look for worker-level predecessor insn.
13827         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
13828         calls.
13829         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13830         (nvptx_process_pars): Propagate frames for calls.
13832 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
13834         PR target/85469
13835         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13836         Removed.
13837         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13838         (ix86_handle_option): Don't handle OPT_mibt.
13839         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13840         __SHSTK__.
13841         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13842         has_ibt and ibt.
13843         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13844         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13845         (ix86_target_macros): Define __CET__ with flag_cf_protection
13846         for -fcf-protection.
13847         * config/i386/i386.c (isa2_opts): Remove -mibt.
13848         * config/i386/i386.h (TARGET_IBT): Removed.
13849         (TARGET_IBT_P): Likewise.
13850         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13851         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13852         * config/i386/i386.opt (mcet): Update help message.
13853         (mshstk): Likewise.
13854         (mibt): Removed.
13855         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
13856         -mcet as an alias for -mshstk.
13858 2018-04-20  Richard Biener <rguenther@suse.de>
13860         PR middle-end/85475
13861         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13862         complexity by forcing a single use of the multiply operand.
13864 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13866         ipa/85449
13867         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13868         recursion dependency to only apply to non-clones.
13870 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13872         ipa/85447
13873         * ipa-cp.c (create_specialized_node): Check that clones of
13874         self-recursive edges exist during IPA-CP.
13876 2018-04-19  Toon Moene  <toon@moene.org>
13878         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
13879         by -O3.
13881 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
13883         PR tree-optimization/85467
13884         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
13885         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
13886         VECTOR_CST element to type.
13888 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13890         PR target/85397
13891         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
13892         * config/i386/i386.md (builtin_setjmp_setup): Removed.
13893         (builtin_longjmp): Likewise.
13894         (save_stack_nonlocal): New pattern.
13895         (restore_stack_nonlocal): Likewise.
13897 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13899         PR target/85404
13900         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13901         Replace ASM_OUTPUT_LABEL with fprintf.
13903 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
13905         PR target/85417
13906         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
13907         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
13908         * config/i386/i386-c.c (ix86_target_macros_internal): Also
13909         define __IBT__ and __SHSTK__ for -fcf-protection.
13910         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
13911         TARGET_IBT.
13912         (ix86_trampoline_init): Likewise.
13913         (x86_output_mi_thunk): Likewise.
13914         (ix86_notrack_prefixed_insn_p): Likewise.
13915         (ix86_option_override_internal): Don't disallow -fcf-protection.
13916         * config/i386/i386.md (rdssp<mode>): Also enable for
13917         -fcf-protection.
13918         (incssp<mode>): Likewise.
13919         (nop_endbr): Likewise.
13920         * config/i386/i386.opt (mcet): Change help message to built-in
13921         functions only.
13922         (mibt): Likewise.
13923         (mshstk): Likewise.
13924         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
13925         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
13926         enable CET built-in functions.
13928 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
13930         * common/config/i386/i386-common.c
13931         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
13932         OPTION_MASK_ISA_MOVDIRI_UNSET,
13933         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
13934         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
13935         * config.gcc (movdirintrin.h): New header.
13936         * config/i386/cpuid.h (bit_MOVDIRI,
13937         bit_MOVDIR64B): New bits.
13938         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
13939         and -mmvodir64b.
13940         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
13941         (VOID, PVOID, PCVOID)): New function types.
13942         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
13943         __builtin_ia32_directstoreu_u64,
13944         __builtin_ia32_movdir64b): New builtins.
13945         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
13946         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
13947         and -mmovdiri.
13948         (ix86_valid_target_attribute_inner_p): Ditto.
13949         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
13950         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
13951         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
13952         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
13953         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
13954         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
13955         (movdiri<mode>, movdir64b_<mode>): New.
13956         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
13957         * config/i386/immintrin.h: Include movdirintrin.h.
13958         * config/i386/movdirintrin.h: New file.
13959         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
13961 2018-04-19  Richard Biener  <rguenther@suse.de>
13963         PR middle-end/85455
13964         * cfg.c (clear_bb_flags): When loop state says we have
13965         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13967 2018-04-19  Richard Biener  <rguenther@suse.de>
13969         PR tree-optimization/84737
13970         * tree-vect-data-refs.c (vect_copy_ref_info): New function
13971         copying restrict info.
13972         (vect_setup_realignment): Use it.
13973         * tree-vectorizer.h (vect_copy_ref_info): Declare.
13974         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13975         the first DR to all generated stores.
13976         (vectorizable_load): Likewise for loads.
13978 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
13980         PR tree-optimization/85446
13981         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13982         the integral and pointer types to have the same precision.
13984         * doc/install.texi: Document --disable-cet being the default and
13985         --enable-cet=auto.
13987 2018-04-18  Martin Liska  <mliska@suse.cz>
13989         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13990         style.
13992 2018-04-18  Martin Liska  <mliska@suse.cz>
13994         Revert
13995         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
13997         PR ipa/83983
13998         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13999         arguments if they are comparable.
14001 2018-04-18  Martin Liska  <mliska@suse.cz>
14003         Revert
14004         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14006         PR lto/84805
14007         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14008         incomplete types.
14010 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
14012         PR target/85388
14013         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14014         ENDBR after calling __morestack.
14016 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
14018         PR jit/85384
14019         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14020         by using gcc_base_ver to generate a gcc_driver_version, and use
14021         it when generating GCC_DRIVER_NAME.
14022         * configure: Regenerate.
14024 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
14026         PR target/81084
14027         * config.gcc: Obsolete powerpc*-*-*spe*.
14029 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14031         PR debug/84637
14032         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14033         (stabstr_D): Change type of unum from unsigned int to
14034         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
14035         type.
14037 2018-04-17  Jim Wilson  <jimw@sifive.com>
14039         PR 84856
14040         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14041         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14042         Set arg_pointer_offset after using pretend_args_size.
14044 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14046         PR rtl-optimization/85431
14047         * dse.c (record_store): Ignore zero width stores.
14049         PR sanitizer/85230
14050         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
14051         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14052         __builtin_stack_restore rather than after it.
14053         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14054         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14055         argument instead of virtual_dynamic_stack_rtx.
14057 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14059         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14060         New prototype.
14061         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14062         Add note to error message to explain internal mapping of overloaded
14063         built-in function name to non-overloaded built-in function name.
14064         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14065         function.
14067 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14069         PR target/85424
14070         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14071         where the inputs overlap with the output.
14073 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14075         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14076         (=v, v) alternative and explicit "memory" attribute.
14077         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
14078         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14079         attributes.
14080         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14081         "sselog1" type instead of "sselog".
14082         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14083         "sselog".  Remove explicit "memory" attribute.
14084         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14085         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14086         attributes.
14087         (vec_extract_hi_v32hi): Merge all alternatives into one, use
14088         "sselog1" type instead of "sselog".  Remove explicit "memory"
14089         attribute.
14090         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14091         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14092         attribute.
14093         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14094         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14095         attributes.
14096         (vec_extract_hi_v64qi): Merge all alternatives into one, use
14097         "sselog1" type instead of "sselog".  Remove explicit "memory"
14098         attribute.
14099         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14100         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14101         attribute.
14103         PR target/85430
14104         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14106         PR middle-end/85414
14107         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14108         on a SUBREG.
14110 2018-04-17  Martin Jambor  <mjambor@suse.cz>
14112         PR ipa/85421
14113         * ipa-cp.c (create_specialized_node): Call
14114         expand_all_artificial_thunks if necessary.
14116 2018-04-17  Martin Liska  <mliska@suse.cz>
14118         PR lto/85405
14119         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14120         in message, remote space in between '_G' and '('.
14122 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14124         PR target/85281
14125         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14126         avx512f_vmcmp<mode>3<round_saeonly_name>,
14127         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14128         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14129         avx512f_rndscale<mode><round_saeonly_name>,
14130         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14131         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14132         Use %<iptr>2 instead of %2 for -masm=intel.
14133         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14134         avx512f_vcvttss2usi<round_saeonly_name>,
14135         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14136         -masm=intel.
14137         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14138         avx512f_vcvttsd2usi<round_saeonly_name>,
14139         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14140         Use %q1 instead of %1 for -masm=intel.
14141         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14142         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14143         of %3 for -masm=intel.
14144         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14145         -masm=intel.
14146         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14147         -masm=intel.
14148         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14149         -masm=intel.
14150         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14151         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14152         %g1.
14153         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14154         -masm=intel.
14155         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14156         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14157         %g1 and one with %0 and %1.
14158         (avx512er_vmrcp28<mode><round_saeonly_name>,
14159         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14160         %1 for -masm=intel.
14161         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14162         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14163         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14164         of %0 and %{%4%} for -masm=intel.
14165         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14166         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14167         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14168         order of %0 and %{%5%}%{z%} for -masm=intel.
14170 2018-04-17  Jan Hubicka  <jh@suse.cz>
14172         PR lto/85405
14173         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14175 2018-04-17  Martin Liska  <mliska@suse.cz>
14177         PR ipa/85329
14178         * multiple_target.c (create_dispatcher_calls): Set apostrophes
14179         for target_clone error message.  Make default implementation
14180         clone to be a local declaration.
14181         (separate_attrs): Add new argument and check for an empty
14182         string.
14183         (expand_target_clones): Handle it.
14184         (ipa_target_clone): Make redirection just for target_clones
14185         functions.
14187 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
14188             Tom de Vries  <tom@codesourcery.com>
14190         PR middle-end/84955
14191         * omp-expand.c (expand_oacc_for): Add dummy false branch for
14192         tiled basic blocks without omp continue statements.
14194 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
14196         PR target/83660
14197         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14198         vec_extract expression as having side effects to make sure it gets
14199         a cleanup point.
14201 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
14203         PR target/85403
14204         * config/i386/i386.c (get_builtin_code_for_version): Check
14205         error_mark_node.
14207 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
14209         PR target/84331
14210         * config.gcc: Support "skylake".
14211         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14212         PROCESSOR_SKYLAKE.
14213         * config/i386/i386.c (m_SKYLAKE): Define.
14214         (processor_target_table): Add "skylake".
14215         (ix86_option_override_internal): Add "skylake".
14216         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14217         PROCESSOR_CANNONLAKE.
14218         (get_builtin_code_for_version): Fix priority for
14219         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14220         PROCESSOR_SKYLAKE-AVX512.
14221         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14222         (processor_type): Add PROCESSOR_SKYLAKE.
14224 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
14225             Jason Merrill  <jason@redhat.com>
14227         PR c++/85112
14228         * convert.c (convert_to_integer_1): Use direct recursion for
14229         enumeral types and types with a precision less than the number
14230         of bits in their mode.
14232 2018-04-16  Julia Koval  <julia.koval@intel.com>
14234         PR target/84413
14235         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14236         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14238 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
14240         PR target/85293
14241         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14242         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14243         and -mno-direct-move.
14245 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
14247         PR target/83402
14248         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14249         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14250         Ensure negative shifts result in {0}.
14252 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
14254         PR rtl-optimization/79916
14255         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14256         regs (if any) to define how to gnerate SD moves when LRA is in
14257         progress.
14259 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
14261         PR rtl-optimization/85393
14262         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14263         * except.c (expand_dw2_landing_pad_for_region): Make static.
14264         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14265         a label and unconditional jump to old_bb, rather than
14266         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14267         basic block.
14269         PR rtl-optimization/85376
14270         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14271         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14272         instead of a specific value.
14274 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14275             Bin Cheng  <bin.cheng@arm.com>
14277         PR tree-optimization/82965
14278         PR tree-optimization/83991
14279         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14280         by_profile_only parameter.
14281         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14282         information if the loop was predicted to iterate too many times.
14283         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14285 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14287         PR lto/71991
14288         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14289         always inline.
14291 2018-04-13  Martin Liska  <mliska@suse.cz>
14292             Jakub Jelinek  <jakub@redhat.com>
14294         PR middle-end/81657
14295         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14296         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14297         * builtins.c (expand_builtin_memory_copy_args): Use
14298         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14299         handle dest_addr == pc_rtx.
14301 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
14303         PR target/85291
14304         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14305         asked to not generate direct moves.
14306         (fix_trunc<mode>si2_stfiwx): Similar.
14307         (fix_trunc<mode>si2_internal): Similar.
14309 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14311         PR debug/83157
14312         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14313         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14314         lookup if dest in some wider mode is known to be const0_rtx and
14315         if so, record permanent equivalence for it to be ZERO_EXTEND of
14316         the narrower mode destination.
14318 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14320         * lto-streamer-out.c (output_function): Revert 259346.
14321         * omp-expand.c (expand_oacc_for): Likewise.
14323 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
14325         PR rtl-optimization/85354
14326         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14327         * sel-sched.c (sel_global_init): ... here.
14329 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
14331         PR target/85238
14332         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14333         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14334         mode for PE-COFF targets.
14335         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14336         (i386_pe_asm_lto_end): Likewise.
14337         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14338         (TARGET_ASM_LTO_END): Likewise.
14339         * config/i386/winnt.c (saved_debug_info_level): New static variable.
14340         (i386_pe_asm_lto_start): New function.
14341         (i386_pe_asm_lto_end): Likewise.
14343 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14344             Richard Biener  <rguenther@suse.de>
14346         PR middle-end/84955
14347         * lto-streamer-out.c (output_function): Fix CFG loop state before
14348         streaming out.
14349         * omp-expand.c (expand_oacc_for): Handle calls to internal
14350         functions like regular functions.
14352 2018-04-12  Richard Biener  <rguenther@suse.de>
14354         PR lto/85371
14355         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14356         for the early LTO debug to properly generate references to it
14357         during DIE emission.  Do not re-use that for the skeleton for
14358         split-dwarf.
14359         (dwarf2out_early_finish): Likewise.
14361 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14363         PR target/85328
14364         * config/i386/sse.md
14365         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14366         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14367         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14368         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14369         and output is a reg, avoid creating invalid lowpart subreg, but
14370         instead split into a 512-bit move.  Don't split if not AVX512VL,
14371         input is xmm16+ reg and output is a mem.
14372         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14373         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14374         xmm16+ reg and output is a mem.
14376 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14378         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14379         also for flag_dwarf2_cfi_asm.
14381 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14383         PR rtl-optimization/85342
14384         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14385         a bool scalar var inside of the loop instead.  Don't try to update
14386         recog_data.operand after failed apply_change_group.
14388 2018-04-12  Tom de Vries  <tom@codesourcery.com>
14390         PR target/85296
14391         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14392         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
14393         array with flexible array member as array without given dimension.
14394         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14395         argument for undefined param to true.
14397 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
14399         PR target/85321
14400         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14401         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14402         from PowerPC section.
14403         * config/rs6000/sysv4.opt (mcall-): Improve help text.
14404         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14405         help text that is too long.
14406         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14407         help text that is too long.
14408         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14409         help text that is too long.
14411 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
14413         * config/alpha/alpha.md (stack_probe_internal): Rename
14414         from "probe_stack".  Update all callers.
14416 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14418         PR rtl-optimization/84566
14419         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14420         sched_macro_fuse_insns.
14422 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14424         PR target/84301
14425         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14426         (compute_block_dependences): ... from here.
14428 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14430         PR tree-optimization/85331
14431         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14432         from int to HOST_WIDE_INT.
14434 2018-04-11  Martin Jambor  <mjambor@suse.cz>
14436         PR ipa/84149
14437         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14438         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14439         not the same as the source val.
14440         (cgraph_edge_brings_value_p): New parameter.
14441         (gather_edges_for_value): Pass destination value to
14442         cgraph_edge_brings_value_p.
14443         (perhaps_add_new_callers): Likewise.
14444         (get_info_about_necessary_edges): Likewise and exclude values brought
14445         only by self-recursive edges.
14446         (create_specialized_node): Redirect only clones of self-calling edges.
14447         (+self_recursive_pass_through_p): New function.
14448         (find_more_scalar_values_for_callers_subset): Use it.
14449         (find_aggregate_values_for_callers_subset): Likewise.
14450         (known_aggs_to_agg_replacement_list): Removed.
14451         (decide_whether_version_node): Re-calculate known constants for all
14452         remaining context clones.
14454 2018-04-11  Richard Biener  <rguenther@suse.de>
14456         PR lto/85339
14457         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14458         from early DWARF output.
14459         (dwarf2out_early_finish): Output line info unconditionally into
14460         early DWARF and add reference to it.
14462 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14464         PR target/85281
14465         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14466         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14467         other than V2DFmode using iptr mode attribute.
14468         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14470 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14472         PR rtl-optimization/84659
14473         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14475 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14477         PR debug/85302
14478         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14479         SIZEP is NULL.
14480         (output_loc_list): Pass address of a dummy size variable even in the
14481         locview handling loop.
14482         (index_location_lists): Add comment on why skip_loc_list_entry can't
14483         call size_of_locs.
14485 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14487         PR target/85261
14488         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14489         into register.
14491 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
14493         PR target/85321
14494         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14495         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14496         and -mstring-compare-inline-limit.
14498 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14500         PR target/85287
14501         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14502         for stack clash protection in a register whenever we need it to be in
14503         a register.
14505 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14507         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14508         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14510 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14512         PR target/85321
14513         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14514         the help text.
14515         (mlong-double-): Ditto.
14516         * config/rs6000/sysv4.opt (msdata=): Ditto.
14517         (mtls-size=): Ditto.
14519 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14521         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14522         erroneous entries for
14523         "vector int vec_ldl (int, long int *)", and
14524         "vector unsigned int vec_ldl (int, unsigned long int *)".
14525         Add comments and entries for
14526         "vector bool char vec_ldl (int, bool char *)",
14527         "vector bool short vec_ldl (int, bool short *)",
14528         "vector bool int vec_ldl (int, bool int *)",
14529         "vector bool long long vec_ldl (int, bool long long *)",
14530         "vector pixel vec_ldl (int, pixel *)",
14531         "vector long long vec_ldl (int, long long *)",
14532         "vector unsigned long long vec_ldl (int, unsigned long long *)".
14533         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14534         type tree bool_long_long_type_node and correct definition of
14535         bool_V2DI_type_node to make reference to this new type tree.
14536         (rs6000_mangle_type): Replace erroneous reference to
14537         bool_long_type_node with bool_long_long_type_node.
14538         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14539         comments to emphasize sign distinctions for char and int types and
14540         replace RS6000_BTI_bool_long constant with
14541         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
14542         use of RS6000_BTI_pixel.
14543         (bool_long_type_node): Remove this macro definition.
14544         (bool_long_long_type_node): New macro definition
14546 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
14548         PR rtl-optimization/85300
14549         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14550         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14551         simplify_unary_operation fails.
14553 2018-04-10  Martin Liska  <mliska@suse.cz>
14555         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14556         cgraph_edge and ipa_ref.
14558 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
14560         PR target/85177
14561         PR target/85255
14562         * config/i386/sse.md
14563         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14564         computation of the VEC_MERGE selector from mask.
14565         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14566         Fix decoding of the VEC_MERGE selector into mask.
14568 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
14570         PR tree-optimization/85286
14571         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14573 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
14575         * final.c (final_1): Set insn_last_address as well as
14576         insn_current_address.
14578 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14580         PR target/85173
14581         * explow.c (emit_stack_probe): Call validize_mem on memory location
14582         before passing it to gen_probe_stack.  Create address operand and
14583         legitimize it for the probe_stack_address case.
14585 2018-04-09  Jan Hubicka  <jh@suse.cz>
14587         PR lto/85078
14588         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14589         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14590         * tree.c (free_lang_data_in_type): Fix handling of binfos;
14591         walk basetypes.
14592         (free_lang_data): Rebuild type inheritance graph.
14594 2018-04-09  Martin Sebor  <msebor@redhat.com>
14596         * invoke.texi (-finline-small-functions): Mention other optimization
14597         options.
14598         (-findirect-inlining, -fpartial-inlining): Same.
14599         (-finline-functions-called-once): Same.
14600         (-freorder-blocks-and-partition): Same.
14602 2018-04-09  Jan Hubicka  <jh@suse.cz>
14604         PR rtl/84058
14605         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14606         jumps; choose last target that matches the criteria (i.e.
14607         no partition changes for non-crossing jumps).
14608         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14609         support for redirecting crossing jumps to non-crossing.
14611 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
14613         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14614         also for naked functions.
14616 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
14618         * config/arc/arc.md (add_shift): New pattern.
14619         (add_shift2): Likewise.
14620         (sub_shift): Likewise.
14621         (sub_shift_cmp0_noout): Likewise.
14622         (compare_si_ashiftsi): Likewise.
14623         (xbfu_cmp0_noout): New combine pattern.
14624         (xbfu_cmp0"): Likewise.
14625         (movsi_set_cc_insn): Place the predicable variant first.
14626         (commutative_binary_cmp0_noout): Remove clobber.
14627         (commutative_binary_cmp0): New pattern.
14628         (noncommutative_binary_cmp0): Likewise.
14629         (noncommutative_binary_cmp0_noout): Likewise.
14630         (noncommutative_binary_comparison_result_used): Removed.
14631         (rsub_cmp0): New pattern.
14632         (rsub_cmp0_noout): Likewise.
14633         (extzvsi): Changed, keep only meaningful variants.
14634         (SQH, SEZ): New iterators.
14635         (SQH_postfix): New mode attribute.
14636         (SEZ_prefix): New code attribute.
14637         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14638         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14639         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14640         of numerical value.
14641         (noncommutative_operator): Check the availability of barrel
14642         shifter option.
14644 2018-04-09  Richard Biener  <rguenther@suse.de>
14646         PR tree-optimization/85284
14647         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14648         Only use the niter constraining form of simple_iv when the exit
14649         is always executed.
14651 2018-04-09  Tom de Vries  <tom@codesourcery.com>
14653         PR target/84041
14654         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14655         (define_expand "*memory_barrier"): New define_expand.
14656         (define_insn "memory_barrier"): New insn.
14658 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14660         PR rtl-optimization/80463
14661         PR rtl-optimization/83972
14662         PR rtl-optimization/83480
14664         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14665         correct producer for the insn.
14666         (tidy_control_flow): Fixup seqnos in case of debug insns.
14668 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14670         PR rtl-optimization/83913
14672         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14673         different sched-times when merging exprs.
14675 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14677         PR rtl-optimization/83962
14679         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14680         tidy_fallthru_edge and tidy_control_flow.
14682 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14684         PR rtl-optimization/83530
14686         * sel-sched.c (force_next_insn): New global variable.
14687         (remove_insn_for_debug): When force_next_insn is true, also leave only
14688         next insn in the ready list.
14689         (sel_sched_region): When the region wasn't scheduled, make another pass
14690         over it with force_next_insn set to 1.
14692 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14694         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14695         into tm_file.
14696         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14697         for interrupt control.
14698         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14699         functions for interrupt control.
14700         * config/nds32/nds32-intrinsic.md: Likewise.
14701         * config/nds32/nds32_intrinsic.h: Likewise.
14702         * config/nds32/nds32.h (nds32_builtins): Likewise.
14704 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14706         * config/nds32/nds32.c (nds32_init_machine_status,
14707         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14708         strict_aligned_p field.
14709         (nds32_expand_to_rtl_hook): New function.
14710         (TARGET_EXPAND_TO_RTL_HOOK): Define.
14711         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14713 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14714             Chung-Ju Wu  <jasonwucj@gmail.com>
14716         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14717         * config/nds32/nds32-n7.md: New file.
14718         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14719         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14720         pipeline.
14721         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14722         * config/nds32/nds32.md (pipeline_model): Add n7.
14723         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14724         * config/nds32/pipelines.md: Include n7 settings.
14726 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14727             Chung-Ju Wu  <jasonwucj@gmail.com>
14729         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14730         * config/nds32/nds32-e8.md: New file.
14731         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14732         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14733         pipeline.
14734         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14735         * config/nds32/nds32.md (pipeline_model): Add e8.
14736         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14737         * config/nds32/pipelines.md: Include e8 settings.
14739 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14740             Chung-Ju Wu  <jasonwucj@gmail.com>
14742         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14743         * config/nds32/nds32-n8.md: New file.
14744         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14745         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14746         pipeline.
14747         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14748         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14749         * config/nds32/nds32.md (pipeline_model): Add n8.
14750         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14751         * config/nds32/pipelines.md: Include n8 settings.
14753 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14754             Chung-Ju Wu  <jasonwucj@gmail.com>
14756         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14757         * config/nds32/nds32-n9-2r1w.md: New file.
14758         * config/nds32/nds32-n9-3r2w.md: New file.
14759         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14760         nds32_register_ports): New or modify for cpu n9.
14761         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14762         pipeline.
14763         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14764         * config/nds32/nds32-utils.c: New file.
14765         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14766         TARGET_MUL_SLOW): Define.
14767         * config/nds32/nds32.md (pipeline_model): New attribute.
14768         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14769         New options that support cpu n9.
14770         * config/nds32/pipelines.md: Include n9 settings.
14771         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14773 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14775         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14776         information if necessary.
14777         (output_cond_branch_compare_zero): Likewise.
14778         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14779         (nds32_target_alignment): Refine for alignment.
14780         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14781         (FUNCTION_BOUNDARY): Modify.
14782         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14783         align case.
14784         * config/nds32/nds32.opt (malways-align, malign-functions): New.
14786 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14788         * config/nds32/constants.md (unspec_volatile_element): Add values for
14789         TLB operation and data prefetch.
14790         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14791         functions for TLB operation and data prefetch.
14792         * config/nds32/nds32-intrinsic.md: Likewise.
14793         * config/nds32/nds32_intrinsic.h: Likewise.
14794         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14795         (nds32_print_operand): Likewise.
14796         * config/nds32/nds32.h (nds32_builtins): Likewise.
14798 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
14799         Andrew Pinski <pinsika@gcc.gnu.org>
14801         PR middle-end/82976
14802         * match.pd: Use constant_boolean_node of correct type instead of
14803         boolean_true_node or boolean_false_node for simplifying
14804         pointer comparisons to zero.
14806 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14808         PR tree-optimization/80021
14809         * tree.c (verify_type_variant): Make error call in verify_variant_match
14810         translatable and remove final full stop.
14812 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14814         * config/nds32/constants.md (unspec_volatile_element): Add
14815         UNSPEC_VOLATILE_EH_RETURN.
14816         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14817         nds32_output_stack_pop): Support dwarf exception handling process.
14818         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14819         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14820         exception handling process.
14821         (nds32_compute_stack_frame): Likewise.
14822         (nds32_return_addr_rtx): Likewise.
14823         (nds32_initial_elimination_offset): Likewise.
14824         (nds32_expand_prologue): Likewise.
14825         (nds32_expand_epilogue): Likewise.
14826         (nds32_dynamic_chain_address): New function.
14827         * config/nds32/nds32.h (machine_function): Add fields for dwarf
14828         exception handling.
14829         (DYNAMIC_CHAIN_ADDRESS): Define.
14830         (EH_RETURN_DATA_REGNO): Define.
14831         (EH_RETURN_STACKADJ_RTX): Define.
14832         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14833         patterns for dwarf exception handling.
14835 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14837         * config/nds32/nds32.h: Clean up obsolete macros.
14839 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14841         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14842         Add enum values for particular instructions.
14843         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14844         particular intrinsic functions.
14845         * config/nds32/nds32-intrinsic.md: Likewise.
14846         * config/nds32/nds32_intrinsic.h: Likewise.
14847         * config/nds32/nds32.h (nds32_builtins): Likewise.
14848         * config/nds32/nds32.md (type): Add pbsad and pbsada.
14849         (btst, ave): New patterns for particular instructions.
14851 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14853         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14854         Add enum values for atomic load/store and memory sync.
14855         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14856         and memory sync.
14857         * config/nds32/nds32-intrinsic.md: Likewise.
14858         * config/nds32/nds32_intrinsic.h: Likewise.
14859         * config/nds32/nds32.h (nds32_builtins): Likewise.
14861 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14863         PR tree-optimization/85257
14864         * fold-const.c (native_encode_vector): If not all elts could fit
14865         and off is -1, return 0 rather than offset.
14866         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14867         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14868         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
14869         adjust buffer in native_interpret_expr call.
14871 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14873         * config/nds32/constants.md (unspec_volatile_element): Add cache
14874         control enum values.
14875         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
14876         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
14877         * config/nds32/nds32.c (nds32_cctl_names): New.
14878         (nds32_print_operand): Handle cache control register names.
14879         * config/nds32/nds32.h (nds32_builtins): New enum values.
14880         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
14881         macros.
14882         * config/nds32/nds32.md (type): Add mmu.
14883         * config/nds32/pipelines.md (simple_insn): Add mmu.
14885 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14887         * config/nds32/nds32.md (type): Remove call.
14888         * config/nds32/pipelines.md (simple_insn): Likewise.
14890 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14892         * config/nds32/constants.md (unspec_volatile_element): Add
14893         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
14894         UNSPEC_VOLATILE_FMFCFG.
14895         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
14896         description for fmfcfg and fmfcsr.
14897         (bdesc_1arg): Add fmtcsr.
14898         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
14899         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
14900         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
14901         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
14902         unspec_fmfcfg): New patterns.
14903         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
14904         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
14905         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
14906         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
14907         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
14908         __nds32__fmfcfg): Define.
14910 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14912         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
14913         intrinsic register names.
14914         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
14915         intrinsic register enum values and macros.
14917 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14919         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
14920         for load/store addressing form.
14921         (nds32_print_operand_address): Likewise.
14923 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
14925         PR target/85196
14926         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
14927         based on LABEL_REF.  Remove useless assertion.
14928         (pic_address_needs_scratch): Fix formatting.
14929         (sparc_legitimize_pic_address): Minor tweaks.
14930         (sparc_delegitimize_address): Adjust assertion accordingly.
14931         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
14932         into symbolic_operand.
14933         (movsi_high_pic_label_ref): Likewise.
14934         (movsi_lo_sum_pic_label_ref): Likewise.
14935         (movdi_pic_label_ref): Likewise.
14936         (movdi_high_pic_label_ref): Likewise.
14937         (movdi_lo_sum_pic_label_ref): Likewise.
14939 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
14941         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
14942         custom LIB_SPEC setup.
14944 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
14945             Kito Cheng  <kito.cheng@gmail.com>
14947         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
14948         * config/riscv/freebsd.h: New.
14950 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14952         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
14953         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
14954         file.
14956 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
14957             Kito Cheng  <kito.cheng@gmail.com>
14959         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
14960         nds32_output_call, nds32_symbol_binds_local_p): New functions.
14961         * config/nds32/nds32-protos.h (nds32_output_call,
14962         nds32_output_return): Declare.
14963         * config/nds32/nds32.md: Refine all the call and return patterns.
14965 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
14967         PR debug/85252
14968         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14969         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14971         PR rtl-optimization/84872
14972         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14973         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14974         EDGE_CROSSING edge.
14976 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
14978         * expr.c (copy_blkmode_to_reg): Revert 254862.
14979         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14981 2018-04-06  Richard Biener  <rguenther@suse.de>
14983         PR middle-end/85244
14984         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14985         after seeing a component reference with an adjacent field.  Treat
14986         refs to arrays at struct end of external decls similar to
14987         refs to unconstrained commons.
14989 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
14991         PR sanitizer/85213
14992         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14993         look through SAVE_EXPRs with non-side-effects argument.  Adjust
14994         recursive calls.
14995         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14996         save_p here.
14998 2018-04-06  Richard Biener  <rguenther@suse.de>
15000         PR middle-end/85180
15001         * alias.c (find_base_term): New wrapper around find_base_term
15002         unwinding CSELIB_VAL_PTR changes.
15003         (find_base_term): Do not restore CSELIB_VAL_PTR during the
15004         recursion.
15006 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15008         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15009         instructions.
15010         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15011         constant definitions.
15012         ("nop"): lr 0,0 -> nopr r0
15013         ("nop_lr0", "nop_lr1"): New insn definitions.
15015 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15017         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15018         NDS32_V3PUSH_AVAILABLE_P macro.
15020 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
15021             Chung-Ju Wu  <jasonwucj@gmail.com>
15023         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15024         (nds32*-*-*): Add float and fpu_config into supported_defaults.
15025         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15026         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15027         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15028         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15029         * config/nds32/constraints.md: New constraints and checking for hard
15030         float configuration.
15031         * config/nds32/iterators.md: New mode iterator and attribute for hard
15032         float configuration.
15033         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15034         patterns.
15035         * config/nds32/nds32-fpu.md: New file.
15036         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15037         deal with hard float code generation.
15038         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15039         ARCH_V3S.
15040         (abi_type, float_reg_number): New enum type.
15041         * config/nds32/nds32-predicates.c: New predicates for hard float.
15042         * config/nds32/nds32-protos.h: Declare functions for hard float.
15043         * config/nds32/nds32.c: Implementation for hard float configuration.
15044         * config/nds32/nds32.h: Definitions for hard float configuration.
15045         * config/nds32/nds32.md: Include hard float machine description and
15046         modify patterns for hard float configuration.
15047         * config/nds32/nds32.opt: New options for hard float configuration.
15048         * config/nds32/predicates.md: New predicates for hard float
15049         configuration.
15051 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15053         * common/config/nds32/nds32-common.c
15054         (nds32_option_optimization_table): Enable -mreleax-hint by default.
15056 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
15058         PR middle-end/85195
15059         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15060         CONSTRUCTOR_ELT (ctor, ...)->value.
15062 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
15064         PR target/85193
15065         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15067 2018-04-05  Tom de Vries  <tom@codesourcery.com>
15069         PR target/85204
15070         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15071         cond jump.
15073 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15074             Kito Cheng  <kito.cheng@gmail.com>
15076         * config/nds32/constraints.md (U33): Fine-tune checking condition.
15077         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15078         * config/nds32/nds32.h (nds32_16bit_address_type): Add
15079         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15081 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15082             Kito Cheng  <kito.cheng@gmail.com>
15084         * config/nds32/constraints.md (Ufe): New memory constraint.
15085         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15086         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15087         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15088         operands.
15089         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15090         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15092 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15094         * config/nds32/nds32.md: Use optimize_size in the condition for
15095         alu-shift instructions.
15097 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15099         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15101 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15103         * config/nds32/nds32.md (negsi2): Refine pattern.
15105 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15106             Chung-Ju Wu  <jasonwucj@gmail.com>
15108         * config/nds32/iterators.md (shift_rotate): New code iterator.
15109         (shift): New code attribute.
15110         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15111         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15112         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15113         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15114         bit-wise operations.
15115         (andsi3, *andsi3): Ditto.
15116         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15117         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15118         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15119         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15120         nds32_ior_operand, nds32_xor_operand): New predicates.
15122 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15124         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15125         (addsi3, subsi3): ... this.
15127 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15129         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15131 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15133         * config/nds32/nds32.md: Adjust indention.
15135 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15137         * config/nds32/nds32.md (feature): New attribute.
15139 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15141         * config/nds32/nds32.md (subtype): New attribute.
15143 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15145         PR target/85203
15146         * config/arm/arm-builtins.c (arm_expand_builtin): Change
15147         expansion to perform a bitwise AND of the argument followed by a
15148         boolean negation of the result.
15150 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
15152         PR rtl-optimization/84878
15153         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15154         the basic block.  Assert the use reference is not artificial and that
15155         it has an associated insn.
15157 2018-04-04  Michael Matz  <matz@suse.de>
15159         * builtins.c (compute_objsize): Pass correct operand
15160         to array_at_struct_end_p.
15162 2018-04-04  Richard Biener  <rguenther@suse.de>
15164         PR lto/85176
15165         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15166         from contexts for DINFO_LEVEL_TERSE and below.
15168 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15170         * config/nds32/nds32-doubleword.md (move_<mode>): Require
15171         resiter_operand condition.
15172         * config/nds32/nds32.md (*move<mode>): Ditto.
15174 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15175             Monk Chiang  <sh.chiang04@gmail.com>
15177         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15179 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15181         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15183 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15184             Kito Cheng  <kito.cheng@gmail.com>
15186         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15187         nds32_cond_code_str, output_cond_branch,
15188         output_cond_branch_compare_zero, nds32_expand_cbranch,
15189         nds32_expand_cstore, nds32_expand_movcc,
15190         nds32_output_cbranchsi4_equality_zero,
15191         nds32_output_cbranchsi4_equality_reg,
15192         nds32_output_cbranchsi4_equality_reg_or_const_int,
15193         nds32_output_cbranchsi4_greater_less_zero: New functions.
15194         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15195         nds32_expand_cstore, nds32_expand_movcc,
15196         nds32_output_cbranchsi4_equality_zero,
15197         nds32_output_cbranchsi4_equality_reg,
15198         nds32_output_cbranchsi4_equality_reg_or_const_int,
15199         nds32_output_cbranchsi4_greater_less_zero): Declare.
15200         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15201         nds32_rimm11s_operand): New predicates.
15202         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15203         * config/nds32/nds32.md: Rewrite all the branch and conditional move
15204         patterns.
15206 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15208         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15209         * config/nds32/nds32.md: Ditto.
15210         * config/nds32/pipelines.md: Ditto.
15212 2018-04-04  Richard Biener  <rguenther@suse.de>
15214         PR tree-optimization/85168
15215         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15216         propagating abnormals.
15218 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15220         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15222 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15223             Kito Cheng  <kito.cheng@gmail.com>
15225         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15226         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15227         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15228         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15229         * config/nds32/nds32.md (sibcall_internal): New.
15230         (sibcall_register): Remove.
15231         (sibcall_immediate): Remove.
15232         (sibcall_value_internal): New.
15233         (sibcall_value_register): Remove.
15234         (sibcall_value_immediate): Remove.
15235         * config/nds32/predicates.md (nds32_general_register_operand): New.
15236         (nds32_call_address_operand): New.
15238 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15240         PR rtl-optimization/85167
15241         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15242         bb_defs if *split_p, instead preinitialize it to NULL.
15244         PR tree-optimization/85156
15245         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15246         evaluating the argument multiple times.
15248 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
15250         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15251         than vector.
15252         (_mm_cvtpd_ps): Likewise.
15253         (_mm_cvttpd_epi32): Likewise.
15254         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15255         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15256         vector, pixel, and bool following altivec.h include.
15258 2018-04-03  Martin Sebor  <msebor@redhat.com>
15260         * doc/extend.texi (Common Function Attributes): Clarify.
15261         (const attribute): Likewise.
15262         (pure attribute): Likewise.
15264 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15266         PR target/85169
15267         * config/i386/i386.c (ix86_expand_vector_set): Use
15268         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
15270 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
15272         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15273         instructions when changing rounding bits to preserve precision bits
15274         in the x87 control word.
15276 2018-04-03  Martin Liska  <mliska@suse.cz>
15278         PR tree-optimization/82491
15279         * rtl.h (strip_offset_and_add): Replace += suboffset with
15280         poly_uint64 () + suboffset.
15282 2018-03-29  Martin Liska  <mliska@suse.cz>
15283             Martin Jambor  <mjambor@suse.cz>
15285         PR ipa/84947
15286         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15287         param_type is not an integral or pointer type.
15289 2018-04-03  Richard Biener  <rguenther@suse.de>
15291         * sese.h (recompute_all_dominators): Remove.
15293 2018-04-02  Martin Sebor  <msebor@redhat.com>
15295         * doc/invoke.texi (-Wrestrict): Fix typos.
15297 2018-04-02  Jim Wilson  <jimw@sifive.com>
15299         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15300         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15301         (<optab>di3, <optab>si3_extend): Likewise.
15302         (<optab>si3_mask, <optab>si3_mask_1): New.
15303         (<optab>di3_mask, <optab>di3_mask_1): New.
15304         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15305         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15306         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15308 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
15310         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15311         example.
15313 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15315         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15316         (nds32_canonicalize_comparison): New function.
15318 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15319             Kito Cheng  <kito.cheng@gmail.com>
15320             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15322         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15323         * config/nds32/constants.md (unspec_volatile_element): Add
15324         UNSPEC_VOLATILE_RELAX_GROUP.
15325         * config/nds32/nds32-relax-opt.c: New file.
15326         * config/nds32/nds32-predicates.c
15327         (nds32_symbol_load_store_p): New function.
15328         * config/nds32/nds32-protos.h
15329         (nds32_symbol_load_store_p): Declare function.
15330         (make_pass_nds32_relax_opt): Declare new rtl pass function.
15331         * config/nds32/nds32.c
15332         (nds32_register_pass): New function to register pass.
15333         (nds32_register_passes): New function to register passes.
15334         * config/nds32/nds32.md (relax_group): New pattern.
15335         * config/nds32/nds32.opt (mrelax-hint): New option.
15336         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15338 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
15340         * config/nds32/t-nds32: Modify files dependency.
15342 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15344         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15345         (PROFILE_HOOK): Define its implementation.
15347 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15349         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15350         type and 32-bit size.
15352 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
15354         PR middle-end/85090
15355         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15356         (V_128_256): New mode iterator.
15357         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15358         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15359         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15360         of V.
15361         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15362         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15364 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
15366         PR target/83315
15367         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15368         NaN inputs correctly.
15370 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
15372         PR target/80546
15373         * config/rs6000/vsx.md (??r): New mode attribute.
15374         (*vsx_mov<mode>_64bit): Use it.
15375         (*vsx_mov<mode>_32bit): Likewise.
15377 2018-03-30  Martin Sebor  <msebor@redhat.com>
15379         PR tree-optimization/84818
15380         * builtins.c (check_access): Use warning_n.
15382 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15384         PR target/83822
15385         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15386         condition.
15387         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15388         condition.
15390 2018-03-30  Julia Koval  <julia.koval@intel.com>
15392         PR target/84413
15393         * x86-tune.def (movx, partial_reg_dependency): Enable for
15394         m_SKYLAKE_AVX512.
15396 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
15398         PR inline-asm/84985
15399         * lra-constraints.c (process_alt_operands): Move setting
15400         this_alternative_matches below.
15402 2018-03-29  Martin Liska  <mliska@suse.cz>
15404         PR lto/84995.
15405         * doc/invoke.texi: Document how LTO works with debug info.
15406         Describe auto-load support of binutils.  Mention 'x86-64'
15407         as valid option value of -march option.
15409 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
15411         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15413         PR c/85094
15414         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15415         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15416         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15417         checking.
15419 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15421         PR target/84912
15422         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15423         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15424         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15425         for RS6000_BTM_POWERPC64.
15426         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15427         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15428         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15429         definition.
15430         (DIVDE): Use it.
15431         (DIVDEU): Likewise.
15433 2018-03-28  Carl Love  <cel@us.ibm.com>
15435         Revert
15436         2017-09-27  Carl Love  <cel@us.ibm.com>
15438         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15439         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15440         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15441         fctiw instruction.
15443 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15445         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15446         instead of __vector bool.
15447         (_mm_max_pu8): Likewise.
15448         (_mm_min_pi16): Likewise.
15450 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15452         PR target/84912
15453         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15454         (DIVWEUO): Likewise.
15455         (DIVDEO): Likewise.
15456         (DIVDEUO): Likewise.
15457         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15458         DIVWEUO and DIVDEUO.
15459         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15460         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15461         (div_extend): Likewise.
15462         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15463         builtin function.
15464         (__builtin_divweuo): Likewise.
15465         (__builtin_divdeo): Likewise.
15466         (__builtin_divdeuo): Likewise.
15468 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15470         PR target/85095
15471         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15472         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15474         PR tree-optimization/82004
15475         * gimple-match-head.c (optimize_pow_to_exp): New function.
15476         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15477         Don't fold to exp if optimize_pow_to_exp is false.
15479 2018-03-28  Martin Liska  <mliska@suse.cz>
15481         PR other/84819
15482         * calls.c (initialize_argument_information): Fix trailing space.
15483         * common.opt: Fix typo and provide better explanation for
15484         -fsanitize-coverage option.
15485         * config/i386/i386.opt: Fix typo.
15487 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15488             Martin Liska  <mliska@suse.cz>
15490         PR sanitizer/85081
15491         * gimplify.c (asan_poison_variable): Don't do the check for
15492         gimplify_omp_ctxp here.
15493         (gimplify_decl_expr): Do it here.
15494         (gimplify_target_expr): Likewise.
15496 2018-03-28  Martin Liska  <mliska@suse.cz>
15498         PR target/84988
15499         * config/i386/i386.c (ix86_function_arg_advance): Do not call
15500         chkp_type_bounds_count if MPX is not enabled.
15502 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15504         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15506 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
15508         PR target/84914
15509         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15510         function to create the function decl for complex long double
15511         multiply and divide for -mabi=ieeelongdouble.
15512         (init_float128_ieee): Call it.
15514 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
15516         PR target/85044
15517         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15518         -fcf-protection=branch -mibt.
15519         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15521 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15523         PR target/81863
15524         * config/arm/arm.c (arm_valid_symbolic_address): Handle
15525         arm_word_relocations.
15527 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
15529         PR target/85056
15530         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15531         extern array declarations.
15533 2018-03-27  Richard Biener  <rguenther@suse.de>
15535         PR middle-end/84067
15536         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15537         explicit single_use checks.
15539 2018-03-27  Richard Biener  <rguenther@suse.de>
15541         PR tree-optimization/85082
15542         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15543         Valueize the VUSE.
15545 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15547         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15548         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15549         Turn on fasynchronous-unwind-tables and funwind-tables.
15551 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
15553         PR target/85073
15554         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15555         (*bmi_blsr_<mode>_ccz): Ditto.
15557 2018-03-26  Tom de Vries  <tom@codesourcery.com>
15559         PR tree-optimization/85063
15560         * omp-general.c (offloading_function_p): New function.  Factor out
15561         of ...
15562         * omp-offload.c (pass_omp_target_link::gate): ... here.
15563         * omp-general.h (offloading_function_p): Declare.
15564         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15565         with attribute omp declare target for offloading functions.
15567 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
15569         PR tree-optimization/84005
15570         * tree-data-ref.h (get_base_for_alignment): Declare.
15571         * tree-data-ref.c (get_base_for_alignment_1): New function.
15572         (get_base_for_alignment): Likewise.
15573         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15574         get_base_for_alignment to find a suitable base object, instead
15575         of always using drb->base_address.
15577 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
15579         PR inline-asm/85022
15580         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15581         known size by default.
15583 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
15585         PR inline-asm/85030
15586         * lra-constraints.c (process_alt_operands): Don't match BLKmode
15587         and non BLKmode operands.
15589 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15591         PR target/85026
15592         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15593         Clean up attributes.
15595 2018-03-23  Richard Biener  <rguenther@suse.de>
15597         PR debug/85020
15598         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15599         we are going to emit early debug for LTO.
15601 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
15603         PR inline-asm/85034
15604         * function.c (match_asm_constraints_1): Don't optimize if input
15605         doesn't satisfy general_operand predicate for output's mode.
15607         PR inline-asm/85022
15608         * alias.c (write_dependence_p): Don't require for x_canonicalized
15609         non-VOIDmode if x has VOIDmode.
15611         PR sanitizer/85029
15612         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15613         just don't try to optimize it rather than assert it never happens.
15615 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15617         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15618         macro expansions for definition of ST_INTERNAL_<mode> and
15619         LD_INTERNAL_<mode> builtins.
15620         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15621         Remove prototype.
15622         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15623         function.
15624         (altivec_expand_st_builtin): Likewise.
15625         (altivec_expand_builtin): Remove calls to deleted functions.
15626         (rs6000_address_for_altivec): Delete this function.
15627         * config/rs6000/vector.md: Remove expands for
15628         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15630 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
15632         PR target/84826
15633         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15634         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15635         re-computing once computed.
15636         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15637         (arm_init_machine_status): Initialize
15638         machine->static_chain_stack_bytes.
15640 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15642         PR target/84760
15643         * doc/extend.texi: Add four new prototypes for vec_ld.
15644         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15645         definitions for more logical presentation.
15646         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15647         entries for V1TI variants of __builtin_altivec_ld builtin.
15648         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15649         handling of V1TI variant of LVX icode pattern.
15650         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15651         (rs6000_gimple_fold_builtin): Likewise.
15652         (altivec_init_builtins): Add code to define
15653         __builtin_altivec_lvx_v1ti function.
15655 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
15657         PR inline-asm/84941
15658         * function.c (match_asm_constraints_1): Don't do the optimization
15659         if input isn't a REG, SUBREG, MEM or constant.
15661 2018-03-22  Tom de Vries  <tom@codesourcery.com>
15663         PR tree-optimization/84956
15664         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15665         bb_has_abnormal_pred.
15667 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
15669         PR sanitizer/85018
15670         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15671         DECL_INITIAL (decl) to decl at the end.
15672         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15673         adjust the comment.
15675 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
15677         * doc/extend.texi (__builtin_tgmath): Document when complex
15678         integer types are treated as _Complex _Float64.
15680 2018-03-21  Tom de Vries  <tom@codesourcery.com>
15682         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15684 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15686         PR tree-optimization/84960
15687         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15688         if it is ENTRY block, move them into single succ of ENTRY in that case.
15690 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
15692         PR tree-optimization/84811
15693         * poly-int.h (poly_span_traits): Remove the T3 parameter and
15694         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15695         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15696         (known_subrange_p): Update accordingly.  Cast each value involved
15697         in the size comparison, rather than casting the result of the
15698         subtraction.
15700 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15702         PR tree-optimization/84982
15703         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15704         by flipping the least significant bit rather than all bits from
15705         bitpos to bitpos + bitsize - 1.
15707 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15709         * doc/extend.texi (Deprecated Features): Remove mention of
15710         long-deleted deprecations.
15712 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15714         PR jit/84288
15715         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15716         * configure: Regenerate.
15718 2018-03-21  Tom de Vries  <tom@codesourcery.com>
15720         PR tree-optimization/83126
15721         * tree-parloops.c (num_phis): New function.
15722         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15724 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15726         * doc/extend.texi (Deprecated Features): Update deprecated flags,
15727         mention anon-struct/union members and trailing attributes.
15729 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
15731         PR tree-optimization/84969
15732         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15733         builtin memset partitions if they set different rhs values.
15735 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15737         PR rtl-optimization/84989
15738         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15739         VEC_DUPLICATE with scalar result mode.
15741 2018-03-21  Martin Liska  <mliska@suse.cz>
15743         PR ipa/84963
15744         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15745         not intended return statement.
15747 2018-03-21  Martin Liska  <mliska@suse.cz>
15749         PR target/84988
15750         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15751         (chkp_find_bound_slots_1): Limit number of iterations.
15753 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
15755         PR target/84838
15756         * Minor grammar fixes for x86 options.
15758 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15760         PR debug/84875
15761         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15762         holding REG_CFA_RESTORE notes, instead turn them into a USE.
15764 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
15766         PR target/83789
15767         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15768         (altivec_lvx_<mode>_1op): Likewise.
15769         (altivec_stvx_<mode>_2op): Likewise.
15770         (altivec_stvx_<mode>_1op): Likewise.
15771         (altivec_lvx_<VM2:mode>): New define_expand.
15772         (altivec_stvx_<VM2:mode>): Likewise.
15773         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15774         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15775         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15776         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15777         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15778         (rs6000_gen_lvx): Likewise.
15779         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15780         (altivec_expand_stv_builtin): Likewise.
15781         (altivec_expand_builtin): Likewise.
15782         * config/rs6000/vector.md: Likewise.
15784 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15786         PR target/82518
15787         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15788         BYTES_BIG_ENDIAN.
15790 2018-03-20  Richard Biener  <rguenther@suse.de>
15792         PR target/84986
15793         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15794         sign-conversions as zero, fall back to standard scalar_stmt
15795         cost for the rest.
15797 2018-03-20  Martin Liska  <mliska@suse.cz>
15799         PR ipa/84825
15800         * predict.c (rebuild_frequencies): Handle case when we have
15801         PROFILE_ABSENT, but flag_guess_branch_prob is false.
15803 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15805         PR target/84990
15806         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15807         flag_section_anchors.
15808         * varasm.c (use_blocks_for_decl_p): Remove hack for
15809         dw2_force_const_mem.
15811         PR target/84845
15812         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15813         to ...
15814         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
15815         be created, use lowpart_subreg of operands[0] rather than operands[0]
15816         itself.
15817         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15818         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15819         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15820         and n constraint instead of aarch64_shift_imm_di and Usd.
15821         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15822         (*aarch64_<optab>_reg_minus<mode>3): ... this.
15824 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
15826         PR target/82989
15827         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15828         to favor GPR over NEON registers.
15829         (<shift>di3_neon): Likewise.
15831 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15833         PR target/84952
15834         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15835         (nvptx_process_pars): Emit bar.sync asap and alap.
15837 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15839         PR target/84954
15840         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15841         seen_label if seen_label is already set.
15843 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15845         PR target/84945
15846         * config/i386/i386.c (fold_builtin_cpu): For features above 31
15847         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15848         Use 1U instead of 1.  Formatting fixes.
15850         PR c/84953
15851         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15852         instead of TREE_TYPE (s1) for the return value.
15854 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
15856         PR tree-optimization/84946
15857         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15858         bitsize + bitsize in poly_uint64 rather than poly_int64.
15860         PR sanitizer/78651
15861         * dwarf2asm.c: Include fold-const.c.
15862         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15863         of decl rather than decl itself.
15865         PR rtl-optimization/84643
15866         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15868 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
15870         PR sanitizer/78651
15871         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15872         calling assemble_variable.
15874 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
15876         PR target/81647
15877         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
15878         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
15880 2018-03-19  Jim Wilson  <jimw@sifive.com>
15882         PR bootstrap/84856
15883         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
15884         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
15885         (riscv_first_stack_step): Likewise.
15886         (riscv_option_override): Use STACK_BOUNDARY instead of
15887         MIN_STACK_BOUNDARY.
15888         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
15889         MIN_STACK_BOUNDARY.
15890         (BIGGEST_ALIGNMENT): Set to 128.
15891         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
15892         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
15893         STACK_BOUNDARY.
15895 2018-03-19  Richard Biener  <rguenther@suse.de>
15897         PR tree-optimization/84933
15898         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
15899         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
15901 2018-03-19  Richard Biener  <rguenther@suse.de>
15903         PR tree-optimization/84859
15904         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
15905         (cond_if_else_store_replacement): Perform sinking operation on
15906         single-store BBs regardless of MAX_STORES_TO_SINK setting.
15907         Generalize what a BB with a single eligible store is.
15909 2018-03-19  Richard Biener  <rguenther@suse.de>
15911         PR tree-optimization/84929
15912         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
15913         chrec_is_positive against non-chrec arg.
15915 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
15917         PR target/84711
15918         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
15920 2018-03-18  Martin Liska  <mliska@suse.cz>
15922         PR rtl-optimization/84635
15923         * regrename.c (build_def_use): Use matches_mode only when
15924         matches >= 0.
15926 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
15928         PR tree-optimization/84913
15929         * tree-vect-loop.c (vectorizable_reduction): Don't try to
15930         vectorize chains of COND_EXPRs.
15932 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15934         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
15936 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15938         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
15940 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
15942         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
15944 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
15945             Kito Cheng  <kito.cheng@gmail.com>
15947         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
15948         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
15949         (nds32_adjust_reg_alloc_order): New function.
15950         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
15952 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
15954         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
15955         nds32_print_operand, nds32_print_operand_address): Use
15956         HOST_WIDE_INT_PRINT_DEC instead.
15958 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
15960         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
15962 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
15964         PR target/84902
15965         * config/i386/i386.c (initial_ix86_tune_features,
15966         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15967         unsigned long long.
15968         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15969         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15970         rather than 1u << ix86_tune.  Formatting fix.
15971         (ix86_option_override_internal): Change ix86_arch_mask from
15972         unsigned int to unsigned HOST_WIDE_INT, initialize to
15973         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15974         (ix86_function_specific_restore): Likewise.
15976 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
15978         PR target/84899
15979         * postreload.c (reload_combine_recognize_pattern): Perform
15980         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15981         truncate_int_for_mode the result for the destination's mode.
15983         PR c/84909
15984         * hsa-gen.c (mem_type_for_type): Fix comment typo.
15985         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15986         Likewise.
15987         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15988         Likewise.
15990 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
15992         PR target/84876
15993         * lra-assigns.c (lra_split_hard_reg_for): Don't use
15994         regno_allocno_class_array and sorted_pseudos.
15995         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15996         insns where regno is used.
15998 2018-03-16  Martin Liska  <mliska@suse.cz>
16000         PR ipa/84833
16001         * multiple_target.c (create_dispatcher_calls): Redirect
16002         reference in the symbol table.
16004 2018-03-16  Martin Liska  <mliska@suse.cz>
16006         PR ipa/84722
16007         * multiple_target.c (create_dispatcher_calls): Redirect also
16008         an alias.
16010 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16012         PR c++/79937
16013         PR c++/82410
16014         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16015         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16016         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16018 2018-03-16  Julia Koval  <julia.koval@intel.com>
16020         * doc/invoke.texi (Skylake Server): Add CLWB.
16021         Cannonlake): Remove CLWB.
16023 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16025         PR tree-optimization/84841
16026         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16027         1 << 3.
16028         (FLOAT_ONE_CONST_TYPE): Define.
16029         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16030         (sort_by_operand_rank): Put entries with higher constant_type last
16031         rather than first to match comments.
16033 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
16035         * config/nios2/nios2.md (movsi_internal): Fix thinko in
16036         split predicate.
16038 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16040         PR c++/79085
16041         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16042         check and use address of target always.
16044 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
16046         PR target/84574
16047         * config/i386/i386.c (indirect_thunk_needed): Update comments.
16048         (indirect_thunk_bnd_needed): Likewise.
16049         (indirect_thunks_used): Likewise.
16050         (indirect_thunks_bnd_used): Likewise.
16051         (indirect_return_needed): New.
16052         (indirect_return_bnd_needed): Likewise.
16053         (output_indirect_thunk_function): Add a bool argument for
16054         function return.
16055         (output_indirect_thunk_function): Don't generate alias for
16056         function return thunk.
16057         (ix86_code_end): Call output_indirect_thunk_function to generate
16058         function return thunks.
16059         (ix86_output_function_return): Set indirect_return_bnd_needed
16060         and indirect_return_needed instead of indirect_thunk_bnd_needed
16061         and indirect_thunk_needed.
16063 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
16065         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16066         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16067         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16069 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
16070             Paul Hua <paul.hua.gm@gmail.com>
16072         PR c/84852
16073         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16075 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
16077         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16078         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16079         resp. SFmode cases.
16081 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
16083         PR target/84711
16084         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16085         instead of GET_MODE_SIZE when comparing Units.
16087 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16089         PR target/68256
16090         * varasm.c (hash_section): Return an unchangeble hash value
16091         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16092         Return !aarch64_can_use_per_function_literal_pools_p ().
16094 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16096         PR target/84860
16097         * optabs.c (emit_conditional_move): Pass address of cmode's copy
16098         rather than address of cmode as last argument to prepare_cmp_insn.
16100 2018-03-15  Julia Koval  <julia.koval@intel.com>
16102         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16103         F_AVX512VNNI, F_AVX512BITALG): New.
16105 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
16107         PR target/83451
16108         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
16109         insn for floating-point loads and stores.
16111 2018-03-14  Carl Love  <cel@us.ibm.com>
16113         * config/rs6000/rs6000-c.c: Add macro definitions for
16114         ALTIVEC_BUILTIN_VEC_PERMXOR.
16115         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16116         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16117         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16118         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16119         UNSPEC_VPERMXOR.
16120         * config/doc/extend.texi: Add prototypes for vec_permxor.
16122 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
16124         PR c/84852
16125         * diagnostic-show-locus.c (class layout_point): Convert m_line
16126         from int to linenum_type.
16127         (line_span::comparator): Use linenum "compare" function when
16128         comparing line numbers.
16129         (test_line_span): New function.
16130         (layout_range::contains_point): Convert param "row" from int to
16131         linenum_type.
16132         (layout_range::intersects_line_p): Likewise.
16133         (layout::will_show_line_p): Likewise.
16134         (layout::print_source_line): Likewise.
16135         (layout::should_print_annotation_line_p): Likewise.
16136         (layout::print_annotation_line): Likewise.
16137         (layout::print_leading_fixits): Likewise.
16138         (layout::annotation_line_showed_range_p): Likewise.
16139         (struct line_corrections): Likewise for field m_row.
16140         (line_corrections::line_corrections): Likewise for param "row".
16141         (layout::print_trailing_fixits): Likewise.
16142         (layout::get_state_at_point): Likewise.
16143         (layout::get_x_bound_for_row): Likewise.
16144         (layout::print_line): Likewise.
16145         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16146         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16147         * input.c (selftest::test_linenum_comparisons): New function.
16148         (selftest::input_c_tests): Call it.
16149         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16150         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16151         * selftest.h (ASSERT_GT): New macro.
16152         (ASSERT_GT_AT): New macro.
16153         (ASSERT_LT): New macro.
16154         (ASSERT_LT_AT): New macro.
16156 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
16158         PR rtl-optimization/84780
16159         * combine.c (distribute_links): Don't make a link based on pc_rtx.
16161 2018-03-14  Martin Liska  <mliska@suse.cz>
16163         * tree.c (record_node_allocation_statistics): Use
16164         get_stats_node_kind.
16165         (get_stats_node_kind): New function extracted from
16166         record_node_allocation_statistics.
16167         (free_node): Use get_stats_node_kind.
16169 2018-03-14  Richard Biener  <rguenther@suse.de>
16171         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16172         that the value-set of ANTIC_IN doesn't grow.
16174         Revert
16175         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16176         member.
16177         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16178         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16180 2018-03-14  Julia Koval  <julia.koval@intel.com>
16182         * config.gcc (icelake-client, icelake-server): New.
16183         (icelake): Remove.
16184         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16185         (initial_ix86_arch_features): Ditto.
16186         (PTA_SKYLAKE): Add SGX.
16187         (PTA_ICELAKE): Remove.
16188         (PTA_ICELAKE_CLIENT): New.
16189         (PTA_ICELAKE_SERVER): New.
16190         (ix86_option_override_internal): Split up icelake on icelake client and
16191         icelake server.
16192         (get_builtin_code_for_version): Ditto.
16193         (fold_builtin_cpu): Ditto.
16194         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16195         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16196         * config/i386/i386.h (processor_type): Ditto.
16197         * doc/invoke.texi: Ditto.
16199 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
16201         PR sanitizer/83392
16202         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16203         INTEGER_CST offset, add it together with bitpos / 8 and
16204         sign extend based on POINTER_SIZE.
16206         PR target/84844
16207         Revert
16208         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
16210         PR target/78090
16211         * config/i386/constraints.md (Yc): New register constraint.
16212         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16213         Use Yc constraint for alternative 2 of operand 0.  Remove
16214         preferred_for_speed attribute.
16216 2018-03-14  Richard Biener  <rguenther@suse.de>
16218         PR tree-optimization/84830
16219         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16220         with the old one to avoid oscillations.
16222 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
16224         PR target/83712
16225         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16226         pseudos.
16227         (assign_by_spills): Return a flag of reload assignment failure.
16228         Do not process the reload assignment failures.  Do not spill other
16229         reload pseudos if they has the same reg class.  Update n if
16230         necessary.
16231         (lra_assign): Add a return arg.  Set up from the result of
16232         assign_by_spills call.
16233         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16234         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16235         usage_insns if it is not NULL.
16236         (spill_hard_reg_in_range): New function.
16237         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16238         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16239         function prototypes.
16240         (lra_assign): Change prototype.
16241         * lra.c (lra): Add code to deal with fails by splitting hard reg
16242         live ranges.
16244 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
16246         * config/riscv/riscv.opt (mrelax): New option.
16247         * config/riscv/riscv.c (riscv_file_start): Emit ".option
16248         "norelax" when riscv_mrelax is disabled.
16249         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16251 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16253         PR target/84743
16254         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16255         reassociation for int modes.
16257 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16259         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16260         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16261         for big-endian.
16262         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16263         * config/aarch64/aarch64-sve.md
16264         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16265         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16266         (*extend<mode><Vwide>2): Rename to...
16267         (aarch64_sve_extend<mode><Vwide>2): ...this.
16268         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16269         renaming the old pattern to...
16270         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
16271         unsigned packs.
16272         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16273         define_expand, renaming the old pattern to...
16274         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16275         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16276         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16277         account when deciding which SVE instruction the optab should use.
16278         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16280 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16282         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16283         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16284         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16285         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16286         (tlsdesc_small_<mode>): Turn a define_expand and use
16287         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
16288         (tlsdesc_small_advsimd_<mode>): ...this.
16289         (tlsdesc_small_sve_<mode>): New pattern.
16291 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16293         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16294         (UNSPEC_UMUL_HIGHPART): New constants.
16295         (MUL_HIGHPART): New int iteraor.
16296         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16297         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16298         define_expand.
16299         (*<su>mul<mode>3_highpart): New define_insn.
16301 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16303         PR lto/84805
16304         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16305         incomplete types.
16307 2018-03-13  Martin Liska  <mliska@suse.cz>
16309         PR ipa/84658.
16310         * (sem_item_optimizer::sem_item_optimizer): Initialize new
16311         vector.
16312         (sem_item_optimizer::~sem_item_optimizer): Release it.
16313         (sem_item_optimizer::merge_classes): Register variable aliases.
16314         (sem_item_optimizer::fixup_pt_set): New function.
16315         (sem_item_optimizer::fixup_points_to_sets): Likewise.
16316         * ipa-icf.h: Declare new variables and functions.
16318 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
16320         PR middle-end/84834
16321         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16322         integer_pow2p@2 and test integer_pow2p in condition.
16323         (A < 0 ? C : 0): Similarly for @1.
16325         PR middle-end/84831
16326         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16327         characters starting at p contain '\0' character, don't look beyond
16328         that.
16330         PR target/84827
16331         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16332         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16334         PR target/84828
16335         * reg-stack.c (change_stack): Change update_end var from int to
16336         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16337         also call set_block_for_insn on the newly added insns and rescan.
16339         PR target/84786
16340         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16341         on the last operand.
16343         PR c++/84704
16344         * tree.c (stabilize_reference_1): Return save_expr (e) for
16345         STATEMENT_LIST even if it doesn't have side-effects.
16347 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
16349         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16351 2018-03-12  Renlin Li  <renlin.li@arm.com>
16353         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16354         aarch64_output_scalar_simd_mov_immediate.
16356 2018-03-12  Martin Sebor  <msebor@redhat.com>
16358         PR tree-optimization/83456
16359         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16360         for perfectly overlapping calls to memcpy.
16361         (gimple_fold_builtin_memory_chk): Same.
16362         (gimple_fold_builtin_strcpy): Handle no-warning.
16363         (gimple_fold_builtin_stxcpy_chk): Same.
16364         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16366 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16368         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16369         parameter.  Use it for SFmode.
16370         (rs6000_function_arg_advance_1): Adjust.
16371         (rs6000_function_arg): Adjust.
16372         (rs6000_gimplify_va_arg): Pass false for that new parameter.
16374 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16376         PR rtl-optimization/84169
16377         PR rtl-optimization/84780
16378         * combine.c (can_combine_p): Check for a 2-insn combination whether
16379         the destination register is used between the two insns, too.
16381 2018-03-12  Richard Biener  <rguenther@suse.de>
16383         PR tree-optimization/84803
16384         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16385         for refs DR analysis didn't process.
16387 2018-03-12  Richard Biener  <rguenther@suse.de>
16389         PR tree-optimization/84777
16390         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16391         force-vectorize loops ignore whether we are optimizing for size.
16393 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16395         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16396         (TARGET_MD_ASM_ADJUST): Define.
16398 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
16399             Kito Cheng  <kito.cheng@gmail.com>
16400             Chung-Ju Wu  <jasonwucj@gmail.com>
16402         * config/nds32/nds32.c (nds32_compute_stack_frame,
16403         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16404         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16405         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16406         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16407         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16408         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16409         * config/nds32/nds32.md (prologue, epilogue): Use macro
16410         NDS32_V3PUSH_AVAILABLE_P to do checking.
16412 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
16414         PR debug/58150
16415         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16416         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16417         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
16418         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
16419         addition of most attributes on !orig_type_die or the attribute not
16420         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16422 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16423             Chung-Ju Wu  <jasonwucj@gmail.com>
16425         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16426         __NDS32_VH__ macro.
16427         * config/nds32/nds32.opt (mvh): New option.
16429 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16430             Chung-Ju Wu  <jasonwucj@gmail.com>
16432         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16433         function.
16434         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16435         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16436         definition.
16438 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16439             Chung-Ju Wu  <jasonwucj@gmail.com>
16441         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16442         function.
16443         * config/nds32/nds32-multiple.md (strlensi): New pattern.
16444         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16446 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
16447             Kito Cheng  <kito.cheng@gmail.com>
16448             Chung-Ju Wu  <jasonwucj@gmail.com>
16450         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16451         UNSPEC_FFMISM and UNSPEC_FLMISM.
16452         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16453         for ffb, ffmism and flmism.
16454         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16455         (unspec_ffmism): Ditto.
16456         (unspec_flmism): Ditto.
16457         (nds32_expand_builtin_impl): Check if string extension is available.
16458         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16459         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16461 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
16463         Reverting patch:
16464         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16466         PR target/83712
16467         * lra-assigns.c (assign_by_spills): Return a flag of reload
16468         assignment failure.  Do not process the reload assignment
16469         failures.  Do not spill other reload pseudos if they has the same
16470         reg class.
16471         (lra_assign): Add a return arg.  Set up from the result of
16472         assign_by_spills call.
16473         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16474         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16475         usage_insns if it is not NULL.
16476         (spill_hard_reg_in_range): New function.
16477         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16478         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16479         function prototypes.
16480         (lra_assign): Change prototype.
16481         * lra.c (lra): Add code to deal with fails by splitting hard reg
16482         live ranges.
16484 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
16486         PR target/84807
16487         * config/i386/i386.opt: Replace Enforcment with Enforcement.
16489 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
16491         PR debug/84620
16492         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16493         (dw_val_node): Add val_symbolic_view.
16494         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16495         (symview_upper_bound): New.
16496         (new_line_info_table): Initialize symviews_since_reset.
16497         (dwarf2out_source_line): Count symviews_since_reset and set
16498         symview_upper_bound.
16499         (dw_val_equal_p): Handle symview.
16500         (add_AT_symview): New.
16501         (print_dw_val): Handle symview.
16502         (attr_checksum, attr_checksum_ordered): Likewise.
16503         (same_dw_val_p, size_of_die): Likewise.
16504         (value_format, output_die): Likewise.
16505         (add_high_low_attributes): Use add_AT_symview for entry_view.
16506         (dwarf2out_finish): Reset symview_upper_bound, clear
16507         zero_view_p.
16509 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
16511         PR target/83969
16512         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16513         Add strict argument and use it.
16514         (rs6000_split_multireg_move): Update for new strict argument.
16515         (mem_operand_gpr): Disallow all non-offsettable addresses.
16516         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16518 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
16520         PR target/84772
16521         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16522         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16523         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16525         PR c++/84767
16526         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16527         decl, use remap_type if we want to use the type.
16529 2018-03-09  Martin Sebor  <msebor@redhat.com>
16531         PR tree-optimization/84526
16532         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16533         Remove dead code.
16534         (builtin_access::generic_overlap): Be prepared to handle non-array
16535         base objects.
16537 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
16539         PR rtl-optimization/84682
16540         * lra-constraints.c (process_address_1): Check is_address flag
16541         for address constraints.
16542         (process_alt_operands): Likewise.
16543         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16544         preprocess_constraints.
16545         * recog.h (preprocess_constraints): Add oploc parameter.
16546         Adjust callers.
16547         * recog.c (preprocess_constraints): Test address_operand for
16548         CT_ADDRESS constraints.
16550 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16552         PR target/83712
16553         * lra-assigns.c (assign_by_spills): Return a flag of reload
16554         assignment failure.  Do not process the reload assignment
16555         failures.  Do not spill other reload pseudos if they has the same
16556         reg class.
16557         (lra_assign): Add a return arg.  Set up from the result of
16558         assign_by_spills call.
16559         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16560         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16561         usage_insns if it is not NULL.
16562         (spill_hard_reg_in_range): New function.
16563         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16564         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16565         function prototypes.
16566         (lra_assign): Change prototype.
16567         * lra.c (lra): Add code to deal with fails by splitting hard reg
16568         live ranges.
16570 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16572         PR target/83193
16573         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16574         Accept complain bool parameter.  Only emit errors if it is true.
16575         (arm_parse_cpu_option_name): Likewise.
16576         (arm_target_thumb_only): Adjust callers of the above.
16577         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16578         prototype to take a default true bool parameter.
16579         (arm_parse_arch_option_name): Likewise.
16581 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
16582             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
16584         PR jit/64089
16585         PR jit/84288
16586         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16587         * configure: Regenerate.
16588         * configure.ac ("linker --version-script option"): New.
16589         ("linker soname option"): New.
16591 2018-03-09  Richard Biener  <rguenther@suse.de>
16593         PR tree-optimization/84775
16594         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16595         immediate uses of predicate stmts and mark them modified.
16597         Revert
16598         PR tree-optimization/84178
16599         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16600         to caller.
16601         (version_loop_for_if_conversion): Delay update_ssa call.
16602         (tree_if_conversion): Delay update_ssa until after predicate
16603         insertion.
16605 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
16607         PR target/84763
16608         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16609         when the function accesses prior frames.
16611 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
16613         PR debug/84456
16614         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16615         gen_llsym, otherwise call maybe_gen_llsym.
16617         PR inline-asm/84742
16618         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16619         has ',' character inside of it.
16621 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16623         PR target/84748
16624         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16625         as clobbering CC_REGNUM.
16627 2018-03-08  Richard Biener  <rguenther@suse.de>
16629         PR middle-end/84552
16630         * tree-scalar-evolution.c: Include tree-into-ssa.h.
16631         (follow_copies_to_constant): Do not follow SSA names registered
16632         for update.
16634 2018-03-08  Richard Biener  <rguenther@suse.de>
16636         PR tree-optimization/84178
16637         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16638         to caller.
16639         (version_loop_for_if_conversion): Delay update_ssa call.
16640         (tree_if_conversion): Delay update_ssa until after predicate
16641         insertion.
16643 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
16645         PR tree-optimization/84178
16646         * tree-if-conv.c (release_bb_predicate): Remove the
16647         the assertion that the stmts have NULL use_ops.
16648         Discard the statements, asserting that they haven't
16649         yet been added to a BB.
16651 2018-03-08  Richard Biener  <rguenther@suse.de>
16653         PR tree-optimization/84746
16654         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16655         (phi_translate): Pass in destination ANTIC_OUT set.
16656         (phi_translate_1): Likewise.  For a simplified result lookup
16657         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16658         (phi_translate_set): Adjust.
16659         (do_pre_regular_insertion): Likewise.
16660         (do_pre_partial_partial_insertion): Likewise.
16662 2018-03-08  Martin Liska  <mliska@suse.cz>
16664         PR gcov-profile/84735
16665         * doc/gcov.texi: Document usage of profile files.
16666         * gcov-io.h: Document changes in the format.
16668 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
16670         PR debug/84404
16671         PR debug/84408
16672         * dwarf2out.c (struct dw_line_info_table): Update comments for
16673         view == -1.
16674         (FORCE_RESET_NEXT_VIEW): New.
16675         (FORCE_RESETTING_VIEW_P): New.
16676         (RESETTING_VIEW_P): Check for -1 too.
16677         (ZERO_VIEW_P): Likewise.
16678         (new_line_info_table): Force-reset next view.
16679         (dwarf2out_begin_function): Likewise.
16680         (dwarf2out_source_line): Simplify zero_view_p initialization.
16681         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16682         view directly.  Omit view when omitting .loc at line 0.
16684 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
16686         PR tree-optimization/84740
16687         * tree-switch-conversion.c (process_switch): Call build_constructors
16688         only if info.phi_count is non-zero.
16690         PR tree-optimization/84739
16691         * tree-tailcall.c (find_tail_calls): Check call arguments against
16692         DECL_ARGUMENTS (current_function_decl) rather than
16693         DECL_ARGUMENTS (func) when checking for tail recursion.
16695 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16697         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16698         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16699         Volker Reichelt's entry and add entries for people that perform
16700         GCC fuzzy testing and report numerous bugs.
16702 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
16704         PR target/82411
16705         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16706         readonly data in sdata, if that is disabled.
16707         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16708         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16709         -mreadonly-in-sdata option.
16711 2018-03-07  Martin Sebor  <msebor@redhat.com>
16713         PR tree-optimization/84468
16714         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16715         basic block when looking for nul assignment.
16717 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
16719         PR target/84277
16720         * except.h (output_function_exception_table): Adjust prototype.
16721         * except.c (output_function_exception_table): Remove FNNAME parameter
16722         and add SECTION parameter.  Ouput one part of the table at a time.
16723         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16724         the first part of the exception table and emit unwind directives.
16725         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16726         (i386_pe_seh_cold_init): Likewise.
16727         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16728         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16729         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16730         (ix86_output_call_insn): Emit a nop in one more case for SEH.
16731         * config/i386/winnt.c: Include except.h.
16732         (struct seh_frame_state): Add reg_offset, after_prologue and
16733         in_cold_section fields.
16734         (i386_pe_seh_end_prologue): Set seh->after_prologue.
16735         (i386_pe_seh_cold_init): New function.
16736         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16737         to seh->in_cold_section.
16738         (seh_emit_push): Record the offset of the push.
16739         (seh_emit_save): Record the offet of the save.
16740         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16741         Test seh->after_prologue to disregard the epilogue.
16742         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16743         (i386_pe_end_cold_function): New function.
16745 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16747         PR fortran/84565
16748         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16749         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16751         PR c++/84704
16752         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16753         on tmp_var.
16754         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16755         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16757         PR middle-end/84723
16758         * multiple_target.c: Include tree-inline.h and intl.h.
16759         (expand_target_clones): Diagnose and fail if node->definition and
16760         !tree_versionable_function_p (node->decl).
16762 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
16764         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16765         sprint_ul.
16766         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16767         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16768         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16770 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16772         PR target/84710
16773         * combine.c (try_combine): Use reg_or_subregno instead of handling
16774         just paradoxical SUBREGs and REGs.
16776 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
16778         * config/arc/arc.c (arc_finalize_pic): Remove function.
16779         (arc_must_save_register): We use single base PIC register, remove
16780         checks to save/restore the PIC register.
16781         (arc_expand_prologue): Likewise.
16782         * config/arc/arc-protos.h (arc_set_default_type_attributes):
16783         Remove.
16784         (arc_verify_short): Likewise.
16785         (arc_attr_type): Likewise.
16786         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16787         (walk_stores): Likewise.
16788         (arc_address_cost): Make it static.
16789         (arc_verify_short): Likewise.
16790         (branch_dest): Likewise.
16791         (arc_attr_type): Likewise.
16792         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16793         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16794         (arc_final_prescan_insn): Remove inserting the nops due to
16795         hardware hazards.  It is done in reorg step.
16796         (insn_length_variant_t): Remove.
16797         (insn_length_parameters_t): Likewise.
16798         (arc_insn_length_parameters): Likewise.
16799         (arc_get_insn_variants): Likewise.
16800         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16802 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16804         PR inline-asm/84683
16805         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16806         assertion failure.
16808         PR tree-optimization/84687
16809         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16810         on new_node->decl.
16811         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16813 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16815         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16816         Rename to ppc_speculation_barrier.
16817         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16818         __builtin_ppc_speculation_barrier.
16820 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16822         PR target/84700
16823         * combine.c (combine_simplify_rtx): Don't try to simplify if
16824         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16825         are equal to x.
16827 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
16829         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16830         to 32 bytes when compiling for POWER9.
16832 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16834         PR target/84564
16835         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16836         regparm >= 3 with no arg reg available also for calls with
16837         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
16839         PR target/84524
16840         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16841         orig,vex.
16842         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
16844 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
16846         PR target/84264
16847         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16849 2018-03-05  Richard Biener  <rguenther@suse.de>
16851         PR tree-optimization/84486
16852         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16853         When inserting a __builtin_assume_aligned call set the LHS
16854         SSA name alignment info accordingly.
16856 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
16858         PR tree-optimization/84114
16859         * config/aarch64/aarch64.c (aarch64_reassociation_width)
16860         Avoid reassociation of FLOAT_MODE addition.
16862 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
16864         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16865         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16866         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16867         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16868         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16869         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16870         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16871         and -mwbnoinvd.
16872         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16873         __builtin_ia32_wbinvd): New builtins.
16874         (SPECIAL_ARGS2): New.
16875         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
16876         (SPECIAL_ARGS2): New.
16877         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
16878         (ix86_valid_target_attribute_inner_p): Ditto.
16879         (ix86_init_mmx_sse_builtins): Add special_args2.
16880         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
16881         TARGET_WBNOINVD_P): New.
16882         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
16883         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
16884         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
16885         * config/i386/immintrin.h (_wbinvd): New intrinsic.
16886         * config/i386/pconfigintrin.h: New file.
16887         * config/i386/wbnoinvdintrin.h: Ditto.
16888         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
16889         wbnoinvdintrin.h.
16890         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
16892 2018-03-05  Richard Biener  <rguenther@suse.de>
16894         PR tree-optimization/84670
16895         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16896         member.
16897         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16898         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16899         (compute_antic_aux): Only assert the number of values in ANTIC_IN
16900         doesn't grow if all successors (recursively) were visited at least
16901         once.
16903 2018-03-05  Richard Biener  <rguenther@suse.de>
16905         PR tree-optimization/84650
16906         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
16907         if executed in the loop pipeline.
16909 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
16911         * doc/configfiles.texi (Configuration Files): Move info about
16912         conditionalizing $target-protos.h to...
16913         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
16914         differs from $target-protos.h.
16916 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
16917             Chung-Ju Wu  <jasonwucj@gmail.com>
16919         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
16920         * config/nds32/nds32-multiple.md (setmemsi): Define.
16921         * config/nds32/nds32-memory-manipulation.c
16922         (nds32_gen_dup_4_byte_to_word_value): New.
16923         (emit_setmem_word_loop): New.
16924         (emit_setmem_byte_loop): New.
16925         (nds32_expand_setmem_loop): New.
16926         (nds32_expand_setmem_loop_v3m): New.
16927         (nds32_expand_setmem_unroll): New.
16928         (nds32_expand_setmem): New.
16930 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16931             Chung-Ju Wu  <jasonwucj@gmail.com>
16933         * config/nds32/nds32-memory-manipulation.c
16934         (nds32_emit_load_store): New.
16935         (nds32_emit_post_inc_load_store): New.
16936         (nds32_emit_mem_move): New.
16937         (nds32_emit_mem_move_block): New.
16938         (nds32_expand_movmemsi_loop_unknown_size): New.
16939         (nds32_expand_movmemsi_loop_known_size): New.
16940         (nds32_expand_movmemsi_loop): New.
16941         (nds32_expand_movmemsi_unroll): New.
16942         (nds32_expand_movmemqi): Rename ...
16943         (nds32_expand_movmemsi): ... to this.
16944         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
16945         (movmemsi): ... to this.
16946         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
16947         (nds32_expand_movmemsi): ... to this.
16949 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16950             Monk Chiang  <sh.chiang04@gmail.com>
16951             Chung-Ju Wu  <jasonwucj@gmail.com>
16953         * config/nds32/nds32-protos.h
16954         (nds32_expand_load_multiple): New arguments.
16955         (nds32_expand_store_multiple): Ditto.
16956         (nds32_valid_multiple_load_store): Rename ...
16957         (nds32_valid_multiple_load_store_p): ... to this.
16958         * config/nds32/nds32-memory-manipulation.c
16959         (nds32_expand_load_multiple): Refine implementation.
16960         (nds32_expand_store_multiple): Ditto.
16961         * config/nds32/nds32-multiple.md
16962         (load_multiple): Update nds32_expand_load_multiple interface.
16963         (store_multiple): Update nds32_expand_store_multiple interface.
16964         * config/nds32/nds32-predicates.c
16965         (nds32_valid_multiple_load_store): Rename ...
16966         (nds32_valid_multiple_load_store_p): ... to this and refine
16967         implementation.
16968         * config/nds32/predicates.md
16969         (nds32_load_multiple_and_update_address_operation): New predicate.
16970         (nds32_store_multiple_and_update_address_operation): New predicate.
16972 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
16973             Chung-Ju Wu  <jasonwucj@gmail.com>
16975         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16976         (combo): New attribute.
16977         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16979 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16981         * config/nds32/nds32.opt: Change -mcmodel= default value.
16983 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
16984             Monk Chiang  <sh.chiang04@gmail.com>
16985             Chung-Ju Wu  <jasonwucj@gmail.com>
16987         * config/nds32/constants.md (unspec_element): New enum.
16988         * config/nds32/constraints.md (Umw): New constraint.
16989         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16990         * config/nds32/nds32-intrinsic.md: Likewise.
16991         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16992         (nds32_valid_smw_lwm_base_p): New.
16993         (nds32_output_smw_single_word): New.
16994         (nds32_output_lmw_single_word): New.
16995         (nds32_expand_unaligned_load): New.
16996         (nds32_expand_unaligned_store): New.
16997         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16998         (nds32_output_smw_single_word): Declare.
16999         (nds32_output_lmw_single_word): Declare.
17000         (nds32_expand_unaligned_load): Declare.
17001         (nds32_expand_unaligned_store): Declare.
17002         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17003         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17004         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17005         NDS32_BUILTIN_UASTORE_DW.
17006         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17007         predicate.
17009 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
17010             Kito Cheng  <kito.cheng@gmail.com>
17011             Chung-Ju Wu  <jasonwucj@gmail.com>
17013         * config/nds32/nds32-intrinsic.c
17014         (nds32_expand_builtin_null_ftype_reg): Delete.
17015         (nds32_expand_builtin_reg_ftype_imm): Ditto.
17016         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17017         (nds32_read_argument): New.
17018         (nds32_legitimize_target): Ditto.
17019         (nds32_legitimize_argument): Ditto.
17020         (nds32_check_constant_argument): Ditto.
17021         (nds32_expand_unop_builtin): Ditto.
17022         (nds32_expand_unopimm_builtin): Ditto.
17023         (nds32_expand_binop_builtin): Ditto.
17024         (nds32_builtin_decl_impl): Ditto.
17025         (builtin_description): Ditto.
17026         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17027         (nds32_init_builtins_impl): Ditto.
17028         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17029         (nds32_builtin_decl): New.
17030         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17031         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17033 2018-03-02  Jeff Law  <law@redhat.com>
17035         * reorg.c (stop_search_p): Handle DEBUG_INSN.
17036         (redundant_insn, fill_simple_delay_slots): Likewise.
17037         (fill_slots_from_thread): Likewise.
17038         * resource.c (mark_referenced_resources): Likewise.
17039         (mark_set_resources, find_dead_or_set_registers): Likewise.
17041 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17043         * substring-locations.h (format_warning_va): Formatting fix for
17044         ATTRIBUTE_GCC_DIAG.
17045         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17046         argument.
17047         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17048         * substring-locations.c: Include intl.h.
17049         (format_warning_va): Turned into small wrapper around
17050         format_warning_n_va, renamed to ...
17051         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17052         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17053         use ngettext.
17054         (format_warning_at_substring_n): New function.
17055         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17056         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
17057         format_warning_at_substring with just a shorter name instead of
17058         const function pointer.
17059         (fmtwarn_n): New function.
17060         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17061         appropriate, get rid of all the fmtstr temporaries, move conditionals
17062         with G_() wrapped string literals directly into fmtwarn arguments,
17063         cast dir.len to (int), formatting fixes.
17065 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
17067         * doc/invoke.texi: Remove "Cilk Plus" references.
17069 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17070             Richard Biener  <rguenther@suse.de>
17072         PR ipa/84628
17073         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17074         for error or warning attributes if CALL_FROM_THUNK_P is set.
17075         Formatting fixes.
17077 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17079         PR target/56540
17080         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17081         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17083         PR target/56540
17084         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17085         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17087         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17088         instead of -1U in last predictors element's probability member.
17090 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17092         PR ipa/83983
17093         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17094         arguments if they are comparable.
17096 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17098         PR tree-optimization/84634
17099         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17100         masks and masked_loop_p with a single loop_masks, making sure it's
17101         null for bb vectorization.
17103 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17105         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17106         (vect_analyze_data_ref_access): Use loop->safe_len rather than
17107         loop->force_vectorize to check whether there is no alias.
17109 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17111         PR target/84614
17112         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17113         prototypes.
17114         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17115         comments.
17116         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17117         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17118         instead of a loop around prev_real_insn.
17119         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17120         prev_real_insn.
17122         PR inline-asm/84625
17123         * config/i386/i386.c (ix86_print_operand): Use conditional
17124         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17125         zero vector.
17127 2018-03-02  Richard Biener  <rguenther@suse.de>
17129         PR tree-optimization/84427
17130         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17131         (bitmap_set_subtract_values): Rewrite to handle multiple
17132         exprs per value.
17133         (clean): Likewise.
17134         (prune_clobbered_mems): Likewise.
17135         (phi_translate): Take edge instead of pred/phiblock.
17136         (phi_translate_1): Likewise.
17137         (phi_translate_set): Likewise.  Insert all translated
17138         exprs for a value into the set, keeping possibly multiple
17139         expressions per value.
17140         (compute_antic_aux): Adjust for phi_translate changes.
17141         When intersecting union the expressions and prune those
17142         not in the final value set, keeping possibly multiple
17143         expressions per value.  Do not use value-insertion
17144         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17145         all expressions.  Add verification that the value-sets
17146         only shrink during iteration.
17147         (compute_partial_antic_aux): Adjust for the phi_translate changes.
17148         (do_pre_regular_insertion): Likewise.
17149         (do_pre_partial_partial_insertion): Likewise.
17151 2018-03-02  Richard Biener  <rguenther@suse.de>
17153         PR target/82005
17154         * config/darwin.c (saved_debug_info_level): New static global.
17155         (darwin_asm_lto_start): Disable debug info generation for LTO out.
17156         (darwin_asm_lto_end): Restore debug info generation settings.
17158 2018-03-01  Martin Liska  <mliska@suse.cz>
17160         PR sanitizer/82484
17161         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17162         volatile arguments.
17164 2018-03-01  Richard Biener  <rguenther@suse.de>
17166         PR debug/84645
17167         * dwarf2out.c (gen_variable_die): Properly handle late VLA
17168         type annotation with LTO when debug was disabled at compile-time.
17170 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
17172         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17173         XINT with INTVAL.
17174         (mips_final_postscan_insn): Likewise.
17176 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
17178         PR rtl-optimization/84528
17179         * alias.c (init_alias_target): Add commentary.
17180         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17181         a unique base value if the frame pointer is not eliminated
17182         to the stack pointer.
17184 2018-03-01  Tom de Vries  <tom@codesourcery.com>
17186         PR rtl-optimization/83327
17187         * lra-int.h (hard_regs_spilled_into): Declare.
17188         * lra.c (hard_regs_spilled_into): Define.
17189         (init_reg_info): Init hard_regs_spilled_into.
17190         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17191         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17192         (process_bb_lives): Handle hard_regs_spilled_into.
17193         (lra_create_live_ranges_1): Before doing liveness propagation, clear
17194         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17196 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
17198         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17199         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17200         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17201         * config/rs6000/aix72.h: New file.
17203 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
17205         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17206         instead of warning_at with conditional singular and plural messages
17207         where possible.
17209         PR target/52991
17210         * stor-layout.c (update_alignment_for_field): For
17211         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17212         && !DECL_PACKED (field), do the alignment update, just use
17213         only desired_align instead of MAX (type_align, desired_align)
17214         as the alignment.
17215         (place_field): Don't do known_align < desired_align handling
17216         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17217         is non-NULL, instead do it after rli->prev_field handling and
17218         only if not within a bitfield word.  For DECL_PACKED (field)
17219         use type_align of BITS_PER_UNIT.
17221 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
17223         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17224         superfluous parentheses and trailing spaces.
17226 2018-02-28  Richard Biener  <rguenther@suse.de>
17228         PR tree-optimization/84584
17229         * graphite-scop-detection.c (scop_detection::add_scop): Discard
17230         SCoPs with fake exit edge.
17232 2018-02-28  Martin Liska  <mliska@suse.cz>
17234         PR testsuite/84597
17235         * timevar.c (timer::print): Fix format to properly print 100%
17236         values.
17238 2018-02-28  Richard Biener  <rguenther@suse.de>
17240         PR middle-end/84607
17241         * genmatch.c (capture_info::walk_match): Do not mark
17242         captured expressions without operands as expr_p given
17243         they act more like predicates and should be subject to
17244         "lost tail" side-effect preserving.
17246 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
17248         PR rtl-optimization/81611
17249         * auto-inc-dec.c (attempt_change): Move dead note from
17250         mem_insn if it's the next use of regno
17251         (find_address): Take address use of reg holding
17252         non-incremented value.  Add parm to limit search to the named
17253         reg only.
17254         (merge_in_block): Attempt to use a mem insn that is the next
17255         use of the original regno.
17257 2018-02-27  Martin Sebor  <msebor@redhat.com>
17259         PR c++/83871
17260         * doc/invoke.texi (-Wmissing-attributes): New option.
17261         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17263 2018-02-27  Martin Sebor  <msebor@redhat.com>
17265         PR translation/84207
17266         * diagnostic-core.h (warning_n, error_n, inform_n): Change
17267         n argument to unsigned HOST_WIDE_INT.
17268         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17269         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
17270         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17271         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17273 2018-02-27  Richard Biener  <rguenther@suse.de>
17275         PR tree-optimization/84512
17276         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17277         Do not use the estimate returned from record_stmt_cost for
17278         the scalar iteration cost but sum properly using add_stmt_cost.
17280 2018-02-27  Richard Biener  <rguenther@suse.de>
17282         PR tree-optimization/84466
17283         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17284         Adjust last change to less strictly validate use operands.
17286 2018-02-27  Martin Liska  <mliska@suse.cz>
17288         PR gcov-profile/84548
17289         * gcov.c (process_file): Allow partial overlap and consider it
17290         also as group functions.
17291         (output_lines): Properly calculate range of lines for a group.
17293 2018-02-27  Martin Liska  <mliska@suse.cz>
17295         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17296         'ggc' suffixes.  Change first column width.
17297         (timer::print): Fix formatting of the column.
17299 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
17301         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17302         preserve inline entry blocks for the sake of debug inline
17303         entry point markers alone.
17304         (remove_unused_locals): Suggest in comments a better place to
17305         force the preservation of inline entry blocks that are
17306         otherwise unused, but do not preserve them.
17308 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17310         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17312 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17314         PR target/84039
17315         * config/i386/constraints.md (Bs): Replace
17316         ix86_indirect_branch_register with
17317         TARGET_INDIRECT_BRANCH_REGISTER.
17318         (Bw): Likewise.
17319         * config/i386/i386.md (indirect_jump): Likewise.
17320         (tablejump): Likewise.
17321         (*sibcall_memory): Likewise.
17322         (*sibcall_value_memory): Likewise.
17323         Peepholes of indirect call and jump via memory: Likewise.
17324         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17325         (*sibcall_value_GOT_32): Likewise.
17326         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17327         (GOT_memory_operand): Likewise.
17328         (call_insn_operand): Likewise.
17329         (sibcall_insn_operand): Likewise.
17330         (GOT32_symbol_operand): Likewise.
17331         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17333 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17335         PR rtl-optimization/83496
17336         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17337         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
17338         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17339         redundant insn, if any.
17340         (relax_delay_slots): Likewise.
17341         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17343 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
17345         PR tree-optimization/83965
17346         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17347         that grouped statements are part of a reduction chain.  Return
17348         true if the statement is not marked as a reduction itself but
17349         is part of a group.
17350         (vect_recog_dot_prod_pattern): Don't check whether the statement
17351         is part of a group here.
17352         (vect_recog_sad_pattern): Likewise.
17353         (vect_recog_widen_sum_pattern): Likewise.
17355 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17357         PR debug/84545
17358         * final.c (rest_of_clean_state): Also look for calls inside sequences.
17360 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17362         PR target/84530
17363         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17364         the bool argument.
17365         (ix86_output_indirect_function_return): New prototype.
17366         (ix86_split_simple_return_pop_internal): Likewise.
17367         * config/i386/i386.c (indirect_return_via_cx): New.
17368         (indirect_return_via_cx_bnd): Likewise.
17369         (indirect_thunk_name): Handle return va CX_REG.
17370         (output_indirect_thunk_function): Create alias for
17371         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17372         (ix86_output_indirect_jmp): Remove the bool argument.
17373         (ix86_output_indirect_function_return): New function.
17374         (ix86_split_simple_return_pop_internal): Likewise.
17375         * config/i386/i386.md (*indirect_jump): Don't pass false
17376         to ix86_output_indirect_jmp.
17377         (*tablejump_1): Likewise.
17378         (simple_return_pop_internal): Change it to define_insn_and_split.
17379         Call ix86_split_simple_return_pop_internal to split it for
17380         -mfunction-return=.
17381         (simple_return_indirect_internal): Call
17382         ix86_output_indirect_function_return instead of
17383         ix86_output_indirect_jmp.
17385 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
17387         PR bootstrap/84405
17388         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17389         memset and value initialization afterwards.
17391 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
17393         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17395 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17397         PR target/84521
17398         * common/config/aarch64/aarch64-common.c
17399         (aarch_option_optimization_table[]): Switch
17400         off fomit-frame-pointer
17402 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17403             Chung-Ju Wu  <jasonwucj@gmail.com>
17405         * config/nds32/nds32-multiple.md (load_multiple): Disallow
17406         volatile memory.
17407         (store_multiple): Ditto.
17409 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17411         * config.gcc: Add --with-cpu support for nds32 target.
17412         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17413         * config/nds32/nds32.opt: Add -mcpu= option.
17415 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
17417         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17418         isel=yes): Warn for these deprecated options.
17420 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
17422         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17423         ISA_2_5_MASKS_EMBEDDED.
17425 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
17427         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17428         p->max as pointers rather than using iterative_hash_expr.
17430 2018-02-23  Carl Love  <cel@us.ibm.com>
17432         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17433         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17434         BU_P8V_OVERLOAD_2.
17435         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17436         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17437         P8V_BUILTIN_VEC_VUNSIGNED2.
17439 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
17441         PR target/81572
17442         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17443         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17444         LRA_UNKNOWN_ALT.
17445         * lra-constraints.c (curr_insn_transform): Set up
17446         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
17447         LRA_UNKNOWN_ALT.
17448         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17449         * lra-eliminations.c (spill_pseudos): Ditto.
17450         (process_insn_for_elimination): Ditto.
17451         * lra-lives.c (reg_early_clobber_p): Use the new macros.
17452         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17453         LRA_NON_CLOBBERED_ALT.
17455 2018-02-22  Martin Sebor  <msebor@redhat.com>
17457         PR tree-optimization/84480
17458         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17459         to maybe_diag_stxncpy_trunc.  Call it.
17460         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17461         from gimple_fold_builtin_strcpy.  Print inlining stack.
17462         (handle_builtin_stxncpy): Print inlining stack.
17463         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17465 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
17467         PR target/84176
17468         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17469         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17470         and -fcheck-pointer-bounds are used together.
17471         (indirect_thunk_prefix): New enum.
17472         (indirect_thunk_need_prefix): New function.
17473         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
17474         "_nt" instead of "_bnd" for NOTRACK prefix.
17475         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17476         (output_indirect_thunk_function): Likewise.
17477         (): Likewise.
17478         (ix86_code_end): Update output_indirect_thunk_function calls.
17479         (ix86_output_indirect_branch_via_reg): Replace
17480         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17481         (ix86_output_indirect_branch_via_push): Likewise.
17482         (ix86_output_function_return): Likewise.
17483         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17484         incompatible with -fcf-protection=branch and
17485         -fcheck-pointer-bounds.
17487 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17489         PR target/83335
17490         * config/aarch64/aarch64.c (aarch64_print_address_internal):
17491         Change gcc_assert call to output_operand_lossage.
17493 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17495         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17497 2018-02-22  DJ Delorie  <dj@redhat.com>
17498             Sebastian Perta  <sebastian.perta@renesas.com>
17499             Oleg Endo  <olegendo@gcc.gnu.org>
17501         * config/rx/rx.c (rx_rtx_costs): New function.
17502         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17504 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17506         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17508 2018-02-22  Martin Liska  <mliska@suse.cz>
17510         PR driver/83193
17511         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17512         Add "native" as a possible value.
17514 2018-02-22  Martin Liska  <mliska@suse.cz>
17516         PR driver/83193
17517         * config/i386/i386.c (ix86_option_override_internal):
17518         Add "native" as a possible value for -march and -mtune.
17520 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
17522         PR target/84502
17523         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17524         to all type variants.
17526         PR tree-optimization/84503
17527         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17528         width as info->bitpos + info->bitsize - start.
17529         (merged_store_group::merge_overlapping): Simplify width computation.
17530         (check_no_overlap): New function.
17531         (imm_store_chain_info::try_coalesce_bswap): Compute expected
17532         start + width and last_order of the group, fail if check_no_overlap
17533         fails.
17534         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17535         to group if check_no_overlap fails.
17537 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
17539         * config/rs6000/altivec.md: Delete contraint arguments to
17540         define_expand, define_split, and define_peephole2, and in
17541         define_insn_and_split if always unused.
17542         * config/rs6000/darwin.md: Ditto.
17543         * config/rs6000/dfp.md: Ditto.
17544         * config/rs6000/rs6000.md: Ditto.
17545         * config/rs6000/sync.md: Ditto.
17546         * config/rs6000/vector.md: Ditto.
17547         * config/rs6000/vsx.md: Ditto.
17549 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
17551         * config/rs6000/altivec.md: Write output control strings as braced
17552         blocks instead of double-quoted strings.
17553         * config/rs6000/darwin.md: Ditto.
17554         * config/rs6000/rs6000.md: Ditto.
17555         * config/rs6000/vector.md: Ditto.
17556         * config/rs6000/vsx.md: Ditto.
17558 2018-02-21  Jason Merrill  <jason@redhat.com>
17560         PR c++/84314 - ICE with templates and fastcall attribute.
17561         * attribs.c (build_type_attribute_qual_variant): Remove assert.
17563 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
17565         * ipa-cp.c (determine_versionability): Fix comment typos.
17567 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
17569         PR c/84229
17570         * ipa-cp.c (determine_versionability): Do not version functions caling
17571         va_arg_pack.
17573 2018-02-21  Martin Liska  <mliska@suse.cz>
17575         PR driver/83193
17576         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17577         Add "native" as a possible value.
17578         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
17579         the macro when native cpu detection is available.
17581 2018-02-21  Martin Liska  <mliska@suse.cz>
17583         PR driver/83193
17584         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17585         Add "native" as a possible value.
17586         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17587         when native cpu detection is available.
17589 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
17590             Martin Sebor  <msebor@redhat.com>
17592         PR tree-optimization/84478
17593         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17594         false.
17595         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17596         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17597         support which is conservatively correct, for 2 only stay conservative
17598         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
17599         argument to the 2 argument get_range_strlen, adjust 6 arg
17600         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17601         false.
17602         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17603         (gimple_fold_builtin_strlen): Pass true as last argument to
17604         get_range_strlen.
17606 2018-02-20  Martin Sebor  <msebor@redhat.com>
17608         PR middle-end/84095
17609         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17610         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
17611         (builtin_memref::builtin_memref): Factor out parts into
17612         set_base_and_offset and call it.
17614 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
17616         PR middle-end/84406
17617         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17618         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17619         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
17620         search at the associated MODE_INT.
17622 2018-02-20  Jeff Law  <law@redhat.com>
17624         PR middle-end/82123
17625         PR tree-optimization/81592
17626         PR middle-end/79257
17627         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17628         for range data rather than using global data.
17629         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17630         range data rather than using global data.
17631         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17632         pass it to children as needed.
17633         (struct directive::fmtresult): Similarly.
17634         (struct directive::set_width): Similarly.
17635         (struct directive::set_precision): Similarly.
17636         (format_integer, format_directive, parse_directive): Similarly.
17637         (format_none): Accept unnamed vr_values parameter.
17638         (format_percent, format_floating, format_character): Similarly.
17639         (format_string, format_plain): Similarly.
17640         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17641         the EVRP range analyzer for range data rather than using global data.
17642         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17643         gimple-ssa-evrp-analyze.h
17644         (class sprintf_dom_walker): Add after_dom_children member function.
17645         Add evrp_range_analyzer member.
17646         (sprintf_dom_walker::before_dom_children): Call into the EVRP
17647         range analyzer as needed.
17648         (sprintf_dom_walker::after_dom_children): New member function.
17649         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17650         if not optimizing.
17651         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17652         (evrp_range_analyzer::pop_to_marker): Likewise.
17654 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
17656         PR tree-optimization/84419
17657         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17658         with the required type if its current type is compatible but
17659         different.
17661 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
17663         PR middle-end/82004
17664         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17665         after vectorization.
17667 2018-02-20  Martin Liska  <mliska@suse.cz>
17669         PR driver/83193
17670         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17671         possible values if we don't have a hint.
17673 2018-02-20  Martin Liska  <mliska@suse.cz>
17675         PR c/84310
17676         PR target/79747
17677         * final.c (shorten_branches): Build align_tab array with one
17678         more element.
17679         * opts.c (finish_options): Add alignment option limit check.
17680         (MAX_CODE_ALIGN): Likewise.
17681         (MAX_CODE_ALIGN_VALUE): Likewise.
17682         * doc/invoke.texi: Document maximum allowed option value for
17683         all -falign-* options.
17685 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
17687         PR target/84146
17688         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17689         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17690         * var-tracking.c (emit_note_insn_var_location): Remove all references
17691         to NOTE_INSN_CALL_ARG_LOCATION.
17692         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17693         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17694         Use copy_rtx_if_shared.
17695         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17696         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17697         (dwarf2out_var_location): Remove handling of
17698         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17699         on call_insn.
17700         * final.c (final_scan_insn): Remove all references to
17701         NOTE_INSN_CALL_ARG_LOCATION.
17702         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
17703         before dumping final insns.
17704         * except.c (emit_note_eh_region_end): Remove all references to
17705         NOTE_INSN_CALL_ARG_LOCATION.
17706         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17707         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17708         * config/arc/arc.c (hwloop_optimize): Likewise.
17709         * config/arm/arm.c (create_fix_barrier): Likewise.
17710         * config/s390/s390.c (s390_chunkify_start): Likewise.
17711         * config/sh/sh.c (find_barrier): Likewise.
17712         * config/i386/i386.c (rest_of_insert_endbranch,
17713         ix86_seh_fixup_eh_fallthru): Likewise.
17714         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17715         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17716         * config/frv/frv.c (frv_function_prologue): Likewise.
17717         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
17718         reg note.
17719         (note_outside_basic_block_p): Remove all references to
17720         NOTE_INSN_CALL_ARG_LOCATION.
17721         * gengtype.c (adjust_field_rtx_def): Likewise.
17722         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17723         Likewise.
17724         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17725         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17727         PR c++/84444
17728         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17729         is ADDR_EXPR.
17731         PR tree-optimization/84452
17732         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17733         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17734         is NULL.
17736 2018-02-19  Martin Liska  <mliska@suse.cz>
17738         PR sanitizer/82183
17739         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17741 2018-02-19  Martin Liska  <mliska@suse.cz>
17742             Richard Sandiford  <richard.sandiford@linaro.org>
17744         PR tree-optimization/82491
17745         * gimple-fold.c (get_base_constructor): Make earlier bail out
17746         to prevent ubsan.
17748 2018-02-19  Carl Love  <cel@us.ibm.com>
17750         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17751         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17752         BU_P8V_OVERLOAD_1.
17753         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17754         P8V_BUILTIN_VEC_NEG.
17756 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
17758         * config/rl78/rl78.md (movdf): New define expand.
17760 2018-02-19  Martin Liska  <mliska@suse.cz>
17762         PR other/80589
17763         * doc/invoke.texi: Fix typo.
17764         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17766 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
17768         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17769         handle rs6000_single_float and rs6000_double_float specially for
17770         e500 family CPUs.
17772 2018-02-16  Jeff Law  <law@redhat.com>
17774         * config/rx/rx.c (add_pop_cfi_notes): New function.;
17775         (pop_regs): Use it.
17777 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
17779         PR ipa/84425
17780         * ipa-inline.c (inline_small_functions): Fix a typo.
17782 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17784         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17786 2018-02-16  Carl Love  <cel@us.ibm.com>
17788         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17789         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17790         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17791         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17792         expansion to P8V_BUILTIN_VEC_FLOAT2.
17794 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
17796         PR rtl-optimization/70023
17797         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17798         src_regno into account.
17800 2018-02-16  Carl Love  <cel@us.ibm.com>
17802         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17803         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17804         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17805         * config/rs6000/rs6000.c: Remove case statements for
17806         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17807         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17808         and P9V_BUILTIN_VEC_VINSERT4B.
17809         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17810         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17811         * config/rs6000/vsx.md:
17812         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17813         vec_insert4b.
17815 2018-02-16  Carl Love  <cel@us.ibm.com>
17817         * config/rs6000/altivec.h: Add builtin names vec_extract4b
17818         vec_insert4b.
17819         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17820         definitions.
17821         * config/rs6000/rs6000-c.c: Add the definitions for
17822         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17823         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17824         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17825         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
17826         definition for insert4b and define insn *insert3b_internal.
17827         * doc/extend.texi: Add documentation for vec_extract4b.
17829 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17831         * doc/extend.texi (Backwards Compatibility): Mention friend
17832         injection.  Note for-scope is deprecated.
17833         * doc/invoke.texi (-ffriend-injection): Deprecate.
17835 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
17837         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17838         that moved to I2, also allow destinations that are a paradoxical
17839         subreg (instead of a normal reg).
17841 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
17843         PR target/83831
17844         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17845         to QImode.
17847 2018-02-16  Richard Biener  <rguenther@suse.de>
17849         PR tree-optimization/84037
17850         PR tree-optimization/84016
17851         PR target/82862
17852         * config/i386/i386.c (ix86_builtin_vectorization_cost):
17853         Adjust vec_construct for the fact we need additional higher latency
17854         128bit inserts for AVX256 and AVX512 vector builds.
17855         (ix86_add_stmt_cost): Scale vector construction cost for
17856         elementwise loads.
17858 2018-02-16  Richard Biener  <rguenther@suse.de>
17860         PR tree-optimization/84417
17861         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17862         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17863         (non_rewritable_lvalue_p): Likewise, use poly-ints.
17865 2018-02-16  Martin Liska  <mliska@suse.cz>
17867         PR sanitizer/84307
17868         * internal-fn.def (ASAN_CHECK): Set proper flags.
17869         (ASAN_MARK): Likewise.
17871 2018-02-16  Julia Koval  <julia.koval@intel.com>
17873         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17874         from PTA_CANNONLAKE.
17876 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
17878         PR target/84272
17879         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
17880         Use ++iter rather than iter++ for std::list iterators.
17881         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
17882         defer deleting them until all nodes in the forest are processed.  Do
17883         free even leaf nodes.  Change to_process into auto_vec.
17885         PR bootstrap/84405
17886         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
17887         * vec.h (vec_default_construct): Use memset instead of placement new
17888         if BROKEN_VALUE_INITIALIZATION is defined.
17889         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
17890         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
17891         is defined.
17893         PR rtl-optimization/83723
17894         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
17895         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
17896         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
17897         recursive calls.
17898         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
17899         callers.
17900         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
17902 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
17904         PR rtl-optimization/81443
17905         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
17906         from inner REGs to paradoxical SUBREGs.
17908 2018-02-16  Richard Biener  <rguenther@suse.de>
17910         PR tree-optimization/84399
17911         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17912         For operands we can analyze at their definition make sure we can
17913         analyze them at each use as well.
17915 2018-02-16  Richard Biener  <rguenther@suse.de>
17917         PR tree-optimization/84190
17918         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
17919         volatile accesses if the decl isn't volatile.
17921 2018-02-15  Jason Merrill  <jason@redhat.com>
17923         PR c++/84314 - ICE with templates and fastcall attribute.
17924         * attribs.c (build_type_attribute_qual_variant): Don't clobber
17925         TYPE_CANONICAL on an existing type.
17927 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
17929         PR tree-optimization/84383
17930         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
17931         dstoff nor call operand_equal_p if dstbase is NULL.
17933         PR tree-optimization/84334
17934         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
17935         also a CONSTANT_CLASS_P, punt.
17937 2018-02-14  Jim Wilson  <jimw@sifive.com>
17939         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
17940         first SMALL_OPERAND check.  New local min_second_step.  Move assert
17941         to where locals are set.  Add TARGET_RVC support.
17942         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
17944 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
17946         * doc/invoke.texi: Correct -Wformat-overflow code sample.
17948 2018-02-14  Martin Sebor  <msebor@redhat.com>
17950         PR tree-optimization/83698
17951         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
17952         arrays constrain the offset range to their bounds.
17953         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
17954         (builtin_access::overlap): Avoid setting the size of overlap if it's
17955         already been set.
17956         (maybe_diag_overlap): Also consider arrays when deciding what values
17957         of offsets to include in diagnostics.
17959 2018-02-14  Martin Sebor  <msebor@redhat.com>
17961         PR c/84108
17962         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
17963         that correspond to the kind of a declaration.
17965 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
17967         PR target/83984
17968         * config/pa/pa.md: Load address of PIC label using the linkage table
17969         if the label is nonlocal.
17971 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17973         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17974         warning message if user requests -maltivec=be.
17975         * doc/invoke.texi: Document deprecation of -maltivec=be.
17977 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
17979         PR target/84220
17980         * config/rs6000/rs6000-c.c: Update definitions for
17981         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17982         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17984 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17986         PR target/84239
17987         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17988         add _get_ssp intrinsics. Remove argument from
17989         __builtin_ia32_rdssp[d|q].
17990         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17991         * config/i386/i386-builtin.def: Remove argument from
17992         __builtin_ia32_rdssp[d|q].
17993         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17994         ix86_expand_special_args_builtin for _rdssp[d|q].
17995         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17996         Clear register before usage.
17997         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17998         Add documentation for new _get_ssp and _inc_ssp intrinsics.
18000 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
18002         PR tree-optimization/84357
18003         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18004         operand 1 of an ARRAY_REF too.
18006 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
18008         PR target/83831
18009         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18010         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18011         declarations.
18012         (set_of_reg): New struct.
18013         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18014         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18015         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18016         functions.
18017         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18018         Split into bitclr, bitset, bitinvert patterns if appropriate.
18019         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18020         use rx_fuse_in_memory_bitop.
18021         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18022         to named insn, correct maximum insn length.
18024 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
18026         PR target/79242
18027         * machmode.def: Define a complex mode for PARTIAL_INT.
18028         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18029         MODE_PARTIAL_INT.
18030         * doc/rtl.texi: Document CSPImode.
18031         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18032         handling.
18033         (msp430_hard_regno_nregs_with_padding): Likewise.
18035 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
18037         PR target/84279
18038         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18040 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
18042         PR rtl-optimization/84169
18043         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
18044         we generated a parallel as new i3 and we split that to new i2 and i3
18045         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
18046         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
18047         those to i2, not i1.  Partially rewrite this scan code.
18049 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18051         PR c/82210
18052         * stor-layout.c (place_field): For variable length fields, adjust
18053         offset_align afterwards not just based on the field's alignment,
18054         but also on the size.
18056         PR middle-end/84309
18057         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18058         of exps and logs in the use_exp2 case.
18060 2018-02-13  Jeff Law  <law@redhat.com>
18062         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18063         entry for "vector".
18065         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18066         ARGS as unused.
18068 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
18070         PR debug/84342
18071         PR debug/84319
18072         * common.opt (gas-loc-support, gas-locview-support): New.
18073         (ginline-points, ginternal-reset-location-views): New.
18074         * doc/invoke.texi: Document them.  Use @itemx where intended.
18075         (gvariable-location-views): Adjust.
18076         * target.def (reset_location_view): New.
18077         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18078         (TARGET_RESET_LOCATION_VIEW): New.
18079         * doc/tm.texi: Rebuilt.
18080         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18081         (dwarf2out_default_as_locview_support): New.
18082         (output_asm_line_debug_info): Use option variables.
18083         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18084         (output_loc_list): Likewise.
18085         (add_high_low_attributes): Check option variables.
18086         Don't output entry view attribute in strict mode.
18087         (gen_inlined_subroutine_die): Check option variables.
18088         (dwarf2out_inline_entry): Likewise.
18089         (init_sections_and_labels): Likewise.
18090         (dwarf2out_early_finish): Likewise.
18091         (maybe_reset_location_view): New, from...
18092         (dwarf2out_var_location): ... here.  Call it.
18093         * debug.h (dwarf2out_default_as_loc_support): Declare.
18094         (dwarf2out_default_as_locview_support): Declare.
18095         * hooks.c (hook_int_rtx_insn_0): New.
18096         * hooks.h (hook_int_rtx_insn_0): Declare.
18097         * toplev.c (process_options): Take -gas-loc-support and
18098         -gas-locview-support from dwarf2out.  Enable
18099         -gvariable-location-views by default only with locview
18100         assembler support.  Enable -ginternal-reset-location-views by
18101         default only if the target defines the corresponding hook.
18102         Enable -ginline-points by default if location views are
18103         enabled; force it disabled if statement frontiers are
18104         disabled.
18105         * tree-inline.c (expand_call_inline): Check option variables.
18106         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18108 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
18110         PR tree-optimization/84321
18111         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18112         handling.  Also check whether the anti-range contains any values
18113         that satisfy the mask; switch to a VR_RANGE if not.
18115 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
18117         PR sanitizer/84340
18118         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18120 2018-02-13  Martin Jambor  <mjambor@suse.cz>
18122         PR c++/83990
18123         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18124         of call statements, also set location of a load to a temporary.
18126 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
18128         * config/rl78/rl78.c (add_vector_labels): New function.
18129         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18130         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18131         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18132         which checks that no arguments are passed.
18133         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18134         * doc/extend.texi: Documentation for the new attribute.
18136 2018-02-13  Andreas Schwab  <schwab@suse.de>
18138         * config/riscv/linux.h (CPP_SPEC): Define.
18140 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18142         PR target/84335
18143         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18144         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18145         OPTION_MASK_ISA_AES as first argument to def_builtin_const
18146         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18147         instead of OPTION_MASK_ISA_PCLMUL as first argument to
18148         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18149         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18150         temporarily for AES and PCLMUL builtins.
18152         PR tree-optimization/84339
18153         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18154         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18155         Formatting fixes.
18157         PR middle-end/84309
18158         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18159         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18160         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18161         inline function.
18162         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18163         inline function.
18164         * omp-simd-clone.h: New file.
18165         * omp-simd-clone.c: Include omp-simd-clone.h.
18166         (expand_simd_clones): No longer static.
18167         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18168         cgraph.h and omp-simd-clone.h.
18169         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18170         (vect_recog_widen_shift_pattern): Formatting fix.
18171         (vect_pattern_recog_1): Don't check optab for calls.
18173         PR target/84336
18174         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18175         operands[2] into a REG before using gen_lowpart on it.
18177 2018-02-12  Jeff Law  <law@redhat.com>
18179         PR target/83760
18180         * config/sh/sh.c (find_barrier): Consider a sibling call
18181         a barrier as well.
18183         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18184         successfully back substituting a reg.
18186 2018-02-12  Richard Biener  <rguenther@suse.de>
18188         PR tree-optimization/84037
18189         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18190         parameter, move visited init to caller.
18191         (vect_slp_analyze_operations): Separate cost from validity
18192         check, initialize visited once for all instances.
18193         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18194         for all instances.
18195         * tree-vect-stmts.c (vect_model_simple_cost): Make early
18196         out an assert.
18197         (vect_model_promotion_demotion_cost): Likewise.
18198         (vectorizable_bswap): Guard cost modeling with !slp_node
18199         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18200         SLP stmts.
18201         (vectorizable_call): Likewise.
18202         (vectorizable_conversion): Likewise.
18203         (vectorizable_assignment): Likewise.
18204         (vectorizable_shift): Likewise.
18205         (vectorizable_operation): Likewise.
18206         (vectorizable_store): Likewise.
18207         (vectorizable_load): Likewise.
18208         (vectorizable_condition): Likewise.
18209         (vectorizable_comparison): Likewise.
18211 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
18213         PR sanitizer/84307
18214         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18215         (ASAN_MARK): Fix fnspec to account for return value, change pointer
18216         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18218 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18220         PR middle-end/83665
18221         * params.def (inline-min-speedup): Increase from 8 to 15.
18222         (max-inline-insns-auto): Decrease from 40 to 30.
18223         * ipa-split.c (consider_split): Add some buffer for function to
18224         be considered inlining candidate.
18225         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18226         default values.
18228 2018-02-12  Richard Biener  <rguenther@suse.de>
18230         PR tree-optimization/84037
18231         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18232         matched stmts if we cannot swap the non-matched ones.
18234 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18236         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18237         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18238         _mm_maskz_scalef_round_ss): New intrinsics.
18239         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18240         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18241         __builtin_ia32_scalefss_round): Remove.
18242         (__builtin_ia32_scalefsd_mask_round,
18243         __builtin_ia32_scalefss_mask_round): New intrinsics.
18244         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18245         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18246         ((match_operand:VF_128 2 "<round_nimm_predicate>"
18247         "<round_constraint>")): Changed to ...
18248         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18249         "<round_scalar_constraint>")): ... this.
18250         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18251         %0, %1, %2<round_op3>}"): Changed to ...
18252         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18253         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18254         %2<round_scalar_mask_op3>}"): ... this.
18255         * config/i386/subst.md (round_scalar_nimm_predicate): New.
18257 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18259         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18260         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18261         (_mm_maskz_sqrt_round_ss): New intrinsics.
18262         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18263         (__builtin_ia32_sqrtsd_mask_round)
18264         (__builtin_ia32_sqrtss_mask_round): New builtins.
18265         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18266         (__builtin_ia32_sqrtss_round): Remove.
18267         (__builtin_ia32_sqrtsd_mask_round)
18268         (__builtin_ia32_sqrtss_mask_round): New builtins.
18269         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18270         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18271         ((match_operand:VF_128 1 "vector_operand"
18272         "xBm,<round_constraint>")): Changed to ...
18273         ((match_operand:VF_128 1 "vector_operand"
18274         "xBm,<round_scalar_constraint>")): ... this.
18275         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18276         %0, %2, %<iptr>1<round_op3>}): Changed to ...
18277         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18278         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18279         %<iptr>1<round_scalar_mask_op3>}): ... this.
18280         ((set_attr "prefix" "<round_prefix>")): Changed to ...
18281         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18283 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
18285         PR target/84266
18286         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18287         Cast vec_cmpeq result to correct type.
18288         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18289         Cast vec_cmpgt result to correct type.
18291 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
18293         * final.c (final_scan_insn_1): Renamed from...
18294         (final_scan_insn): ... this.  New wrapper, to recover
18295         seen from the outermost call in recursive ones.
18296         * config/sparc/sparc.c (output_return): Drop seen from call.
18297         (output_sibcall): Likewise.
18298         * config/visium/visium.c (output_branch): Likewise.
18300 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
18302         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18303         function label.
18305 2018-02-10  Alan Modra  <amodra@gmail.com>
18307         PR target/84300
18308         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18309         Specify LR as an input.
18311 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
18313         PR sanitizer/83987
18314         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18315         remove_member_access_dummy_vars): New functions.
18316         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18317         lower_omp_1, execute_lower_omp): Use them.
18319         PR rtl-optimization/84308
18320         * shrink-wrap.c (spread_components): Release todo vector.
18322 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
18324         PR rtl-optimization/57193
18325         * ira-color.c (struct allocno_color_data): Add member
18326         conflict_allocno_hard_prefs.
18327         (update_conflict_allocno_hard_prefs): New.
18328         (bucket_allocno_compare_func): Add a preference based on
18329         conflict_allocno_hard_prefs.
18330         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18331         (color_allocnos): Remove a dead code.  Initiate
18332         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
18334 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18336         PR target/84226
18337         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18338         constraint from =wa to wa.  Avoid a subreg on the output operand,
18339         instead use a pseudo and subreg it in a move.
18340         (p9_xxbrd_<mode>): Changed to ...
18341         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18342         (p9_xxbrd_v2df): New expander.
18343         (p9_xxbrw_<mode>): Changed to ...
18344         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18345         (p9_xxbrw_v4sf): New expander.
18347 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18349         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18351 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
18353         PR target/83926
18354         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18355         multiply in 32-bit mode.
18356         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18357         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18358         mode.
18360 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18362         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18363         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18364         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18365         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18367 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
18369         PR lto/84213
18370         * dwarf2out.c (is_trivial_indirect_ref): New function.
18371         (dwarf2out_late_global_decl): Do not generate a location
18372         attribute for variables that have a non-trivial DECL_VALUE_EXPR
18373         and that are not defined in the current unit.
18375 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18377         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18378         instead of a libcall for UNORDERED.
18380 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
18382         PR target/82641
18383         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18384         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18386 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18388         PR target/PR84295
18389         * config/s390/s390.c (s390_set_current_function): Invoke
18390         s390_indirect_branch_settings also if fndecl didn't change.
18392 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18394         * config/rs6000/rs6000.md (blockage): Set length to zero.
18396 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18398         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18400 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18402         PR sanitizer/84285
18403         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18404         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18405         -static-lib*san.
18407         PR debug/84252
18408         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18409         PARALLEL incoming that failed vt_get_decl_and_offset check.
18411         PR middle-end/84237
18412         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18413         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18414         TREE_READONLY bit.
18415         (get_variable_section): For decls in named .bss* sections pass true as
18416         second argument to bss_initializer_p.
18418 2018-02-09  Marek Polacek  <polacek@redhat.com>
18419             Jakub Jelinek  <jakub@redhat.com>
18421         PR c++/83659
18422         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18423         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
18424         Sync some changes from cxx_fold_indirect_ref.
18426 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18428         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18429         markers.
18430         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18431         (BLOCK_INLINE_ENTRY_LABEL): New.
18432         (dwarf2out_var_location): Disregard inline entry markers.
18433         (inline_entry_data): New struct.
18434         (inline_entry_data_hasher): New hashtable type.
18435         (inline_entry_data_hasher::hash): New.
18436         (inline_entry_data_hasher::equal): New.
18437         (inline_entry_data_table): New variable.
18438         (add_high_low_attributes): Add DW_AT_entry_pc and
18439         DW_AT_GNU_entry_view attributes if a pending entry is found
18440         in inline_entry_data_table.  Add old entry_pc attribute only
18441         if debug nonbinding markers are disabled.
18442         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18443         markers are enabled.
18444         (block_within_block_p, dwarf2out_inline_entry): New.
18445         (dwarf2out_finish): Check that no entries remained in
18446         inline_entry_data_table.
18447         * final.c (reemit_insn_block_notes): Handle inline entry notes.
18448         (final_scan_insn, notice_source_line): Likewise.
18449         (rest_of_clean_state): Skip inline entry markers.
18450         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18451         markers.
18452         * gimple.c (gimple_build_debug_inline_entry): New.
18453         * gimple.h (enum gimple_debug_subcode): Add
18454         GIMPLE_DEBUG_INLINE_ENTRY.
18455         (gimple_build_debug_inline_entry): Declare.
18456         (gimple_debug_inline_entry_p): New.
18457         (gimple_debug_nonbind_marker_p): Adjust.
18458         * insn-notes.def (INLINE_ENTRY): New.
18459         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18460         inline entry marker notes.
18461         (print_insn): Likewise.
18462         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18463         (INSN_DEBUG_MARKER_KIND): Likewise.
18464         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18465         * tree-inline.c (expand_call_inline): Build and insert
18466         debug_inline_entry stmt.
18467         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18468         inline entry blocks early, if nonbind markers are enabled.
18469         (dump_scope_block): Dump fragment info.
18470         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18471         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18472         (gimple_build_debug_inline_entry): New.
18473         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18474         Enable/disable inline entry points too.
18475         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18476         (DEBUG_INSN): Describe inline entry markers.
18478         * common.opt (gvariable-location-views): New.
18479         (gvariable-location-views=incompat5): New.
18480         * config.in: Rebuilt.
18481         * configure: Rebuilt.
18482         * configure.ac: Test assembler for view support.
18483         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18484         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18485         * dwarf2out.c (var_loc_view): New typedef.
18486         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18487         (dwarf2out_locviews_in_attribute): New.
18488         (dwarf2out_locviews_in_loclist): New.
18489         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18490         (enum dw_line_info_opcode): Add LI_adv_address.
18491         (struct dw_line_info_table): Add view.
18492         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18493         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18494         (zero_view_p): New variable.
18495         (ZERO_VIEW_P): New macro.
18496         (output_asm_line_debug_info): New.
18497         (struct var_loc_node): Add view.
18498         (add_AT_view_list, AT_loc_list): New.
18499         (add_var_loc_to_decl): Add view param.  Test it against last.
18500         (new_loc_list): Add view params.  Record them.
18501         (AT_loc_list_ptr): Handle loc and view lists.
18502         (view_list_to_loc_list_val_node): New.
18503         (print_dw_val): Handle dw_val_class_view_list.
18504         (size_of_die): Likewise.
18505         (value_format): Likewise.
18506         (loc_list_has_views): New.
18507         (gen_llsym): Set vl_symbol too.
18508         (maybe_gen_llsym, skip_loc_list_entry): New.
18509         (dwarf2out_maybe_output_loclist_view_pair): New.
18510         (output_loc_list): Output view list or entries too.
18511         (output_view_list_offset): New.
18512         (output_die): Handle dw_val_class_view_list.
18513         (output_dwarf_version): New.
18514         (output_compilation_unit_header): Use it.
18515         (output_skeleton_debug_sections): Likewise.
18516         (output_rnglists, output_line_info): Likewise.
18517         (output_pubnames, output_aranges): Update version comments.
18518         (output_one_line_info_table): Output view numbers in asm comments.
18519         (dw_loc_list): Determine current endview, pass it to new_loc_list.
18520         Call maybe_gen_llsym.
18521         (loc_list_from_tree_1): Adjust.
18522         (add_AT_location_description): Create view list attribute if
18523         needed, check it's absent otherwise.
18524         (convert_cfa_to_fb_loc_list): Adjust.
18525         (maybe_emit_file): Call output_asm_line_debug_info for test.
18526         (dwarf2out_var_location): Reset views as needed.  Precompute
18527         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
18528         attribute.  Set view.
18529         (new_line_info_table): Reset next view.
18530         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18531         (dwarf2out_source_line): Likewise.  Output view resets and labels to
18532         the assembler, or select appropriate line info opcodes.
18533         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18534         (optimize_string_length): Catch it.  Adjust.
18535         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
18536         dw_val_class_view_list, and remove it if no longer needed.
18537         (hash_loc_list): Hash view numbers.
18538         (loc_list_hasher::equal): Compare them.
18539         (optimize_location_lists): Check whether a view list symbol is
18540         needed, and whether the locview attribute is present, and
18541         whether they match.  Remove the locview attribute if no longer
18542         needed.
18543         (index_location_lists): Call skip_loc_list_entry for test.
18544         (dwarf2out_finish): Call output_asm_line_debug_info for test.
18545         Use output_dwarf_version.
18546         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18547         (struct dw_val_node): Add val_view_list.
18548         * final.c (SEEN_NEXT_VIEW): New.
18549         (set_next_view_needed): New.
18550         (clear_next_view_needed): New.
18551         (maybe_output_next_view): New.
18552         (final_start_function): Rename to...
18553         (final_start_function_1): ... this.  Take pointer to FIRST,
18554         add SEEN parameter.  Emit param bindings in the initial view.
18555         (final_start_function): Reintroduce SEEN-less interface.
18556         (final): Rename to...
18557         (final_1): ... this.  Take SEEN parameter.  Output final pending
18558         next view at the end.
18559         (final): Reintroduce seen-less interface.
18560         (final_scan_insn): Output pending next view before switching
18561         sections or ending a block.  Mark the next view as needed when
18562         outputting variable locations.  Notify debug backend of section
18563         changes, and of location view changes.
18564         (rest_of_handle_final): Adjust.
18565         * toplev.c (process_options): Autodetect value for debug variable
18566         location views option.  Warn on incompat5 without -gdwarf-5.
18567         * doc/invoke.texi (gvariable-location-views): New.
18568         (gvariable-location-views=incompat5): New.
18569         (gno-variable-location-views): New.
18571 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
18573         PR tree-optimization/84136
18574         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18575         that the result of find_edge is non-NULL.
18577 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
18579         PR target/83008
18580         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18581         storing integer register in SImode.  Fix cost of 256 and 512
18582         byte aligned SSE register store.
18584 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
18586         * config/i386/i386.c (ix86_multiplication_cost): Fix
18587         multiplication cost for TARGET_AVX512DQ.
18589 2018-02-08  Marek Polacek  <polacek@redhat.com>
18591         PR tree-optimization/84238
18592         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18593         get_range_strlen.
18595 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18597         PR tree-optimization/84265
18598         * tree-vect-stmts.c (vectorizable_store): Don't treat
18599         VMAT_CONTIGUOUS accesses as grouped.
18600         (vectorizable_load): Likewise.
18602 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18604         PR tree-optimization/81635
18605         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18606         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18607         (test_round_for_mask): New functions.
18608         (wide_int_cc_tests): Call test_round_for_mask.
18609         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18610         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18611         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18612         range returned by get_range_info.
18614 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18616         PR ipa/81360
18617         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18618         * symtab.c: Include builtins.h
18619         (symtab_node::output_to_lto_symbol_table_p): Move here
18620         from lto-streamer-out.c:output_symbol_p.
18621         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18622         (output_symbol_p): Move all logic to symtab.c
18623         (produce_symtab): Update.
18625 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18627         * config/s390/s390-opts.h (enum indirect_branch): Define.
18628         * config/s390/s390-protos.h (s390_return_addr_from_memory)
18629         (s390_indirect_branch_via_thunk)
18630         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18631         (enum s390_indirect_branch_type): Define.
18632         * config/s390/s390.c (struct s390_frame_layout, struct
18633         machine_function): Remove.
18634         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18635         (indirect_branch_table_label_no, indirect_branch_table_name):
18636         Define variables.
18637         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18638         (enum s390_indirect_branch_option): Define.
18639         (s390_return_addr_from_memory): New function.
18640         (s390_handle_string_attribute): New function.
18641         (s390_attribute_table): Add new attribute handler.
18642         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18643         (s390_indirect_branch_via_thunk): New function.
18644         (s390_indirect_branch_via_inline_thunk): New function.
18645         (s390_function_ok_for_sibcall): When jumping via thunk disallow
18646         sibling call optimization for non z10 compiles.
18647         (s390_emit_call): Force indirect branch target to be a single
18648         register.  Add r1 clobber for non-z10 compiles.
18649         (s390_emit_epilogue): Emit return jump via return_use expander.
18650         (s390_reorg): Handle JUMP_INSNs as execute targets.
18651         (s390_option_override_internal): Perform validity checks for the
18652         new command line options.
18653         (s390_indirect_branch_attrvalue): New function.
18654         (s390_indirect_branch_settings): New function.
18655         (s390_set_current_function): Invoke s390_indirect_branch_settings.
18656         (s390_output_indirect_thunk_function):  New function.
18657         (s390_code_end): Implement target hook.
18658         (s390_case_values_threshold): Implement target hook.
18659         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18660         macros.
18661         * config/s390/s390.h (struct s390_frame_layout)
18662         (struct machine_function): Move here from s390.c.
18663         (TARGET_INDIRECT_BRANCH_NOBP_RET)
18664         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18665         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18666         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18667         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18668         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18669         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18670         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18671         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18672         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18673         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18674         (mnemonic attribute): Add values which aren't recognized
18675         automatically.
18676         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18677         pattern for branch conversion.  Fix mnemonic attribute.
18678         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18679         indirect branch via thunk if requested.
18680         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18681         ("*indirect_jump"): Disable for branch conversion using out of
18682         line thunks.
18683         ("indirect_jump_via_thunk<mode>_z10")
18684         ("indirect_jump_via_thunk<mode>")
18685         ("indirect_jump_via_inlinethunk<mode>_z10")
18686         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18687         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18688         ("casesi_jump_via_inlinethunk<mode>_z10")
18689         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18690         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18691         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18692         ("*indirect2_jump"): Disable for branch conversion.
18693         ("casesi_jump"): Turn into expander and expand patterns for branch
18694         conversion.
18695         ("return_use"): New expander.
18696         ("*return"): Emit return via thunk and rename it to ...
18697         ("*return<mode>"): ... this one.
18698         * config/s390/s390.opt: Add new options and and enum for the
18699         option values.
18701 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18703         * lra-constraints.c (match_reload): Unconditionally use
18704         gen_lowpart_SUBREG, rather than selecting between that
18705         and equivalent gen_rtx_SUBREG code.
18707 2018-02-08  Richard Biener  <rguenther@suse.de>
18709         PR tree-optimization/84233
18710         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18711         changed flag instead of boguously re-using phi_inserted.
18713 2018-02-08  Martin Jambor  <mjambor@suse.cz>
18715         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18716         static local variables.
18718 2018-02-08  Richard Biener  <rguenther@suse.de>
18720         PR tree-optimization/84278
18721         * tree-vect-stmts.c (vectorizable_store): When looking for
18722         smaller vector types to perform grouped strided loads/stores
18723         make sure the mode is supported by the target.
18724         (vectorizable_load): Likewise.
18726 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18728         * config/aarch64/aarch64.c (aarch64_components_for_bb):
18729         Increase LDP/STP opportunities by adding adjacent callee-saves.
18731 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18733         PR rtl-optimization/84068
18734         PR rtl-optimization/83459
18735         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18737 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
18739         PR tree-optimization/84224
18740         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18741         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18742         non-zero arguments.
18744 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
18746         PR target/84113
18747         * config/rs6000/altivec.md (*restore_world): Remove LR use.
18748         * config/rs6000/predicates.md (restore_world_operation): Adjust op
18749         count, remove one USE.
18751 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
18753         * doc/install.texi (Configuration): Document the
18754         --with-long-double-format={ibm,ieee} PowerPC configuration
18755         options.
18757         PR target/84154
18758         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18759         Convert from define_expand to be define_insn_and_split.  Rework
18760         float/double/_Float128 conversions to QI/HI/SImode to work with
18761         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
18762         conversions to QI/HImode types did a store and then a load to
18763         truncate the value.  For conversions to VSX registers, don't split
18764         the insn, instead emit the code directly.  Use the code iterator
18765         any_fix to combine signed and unsigned conversions.
18766         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18767         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18768         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18769         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18770         (fix_<mode>di2_hw): Likewise.
18771         (fixuns_<mode>di2_hw): Likewise.
18772         (fix_<mode>si2_hw): Likewise.
18773         (fixuns_<mode>si2_hw): Likewise.
18774         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18775         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18776         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18777         fix<uns>_trunc<SFDF:mode>si2_p8.
18778         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18779         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18780         (fix<uns>_<mode>_mem): Likewise.
18781         (fctiw<u>z_<mode>_mem): Likewise.
18782         (fix<uns>_<mode>_mem): Likewise.
18783         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18784         the register allocator from doing a direct move to the GPRs to do
18785         a store, and instead use the ISA 3.0 store byte/half-word from
18786         vector register instruction.  For IEEE 128-bit floating point,
18787         also optimize stores of 32-bit ints.
18788         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18790 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
18792         * genextract.c (push_pathstr_operand): New function to support
18793         [a-zA-Z].
18794         (walk_rtx): Call push_pathstr_operand.
18795         (print_path): Support [a-zA-Z].
18797 2018-02-07  Richard Biener  <rguenther@suse.de>
18799         PR tree-optimization/84037
18800         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18801         (cse_and_gimplify_to_preheader): Declare.
18802         (vect_get_place_in_interleaving_chain): Likewise.
18803         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18804         ivexpr_map.
18805         (_loop_vec_info::~_loop_vec_info): Delete it.
18806         (cse_and_gimplify_to_preheader): New function.
18807         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18808         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18809         (vectorizable_load): Likewise.  For grouped stores always base
18810         the IV on the first element.
18811         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18812         condition before gimplifying.
18814 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18816         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18817         *DIV_EXPR and *MOD_EXPR.
18819 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
18821         PR target/84248
18822         * config/i386/i386.c (ix86_option_override_internal): Mask out
18823         the CF_SET bit when checking -fcf-protection.
18825 2018-02-07  Tom de Vries  <tom@codesourcery.com>
18827         PR libgomp/84217
18828         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18829         enough.
18831 2018-02-07  Richard Biener  <rguenther@suse.de>
18833         PR tree-optimization/84204
18834         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18835         this place.
18837         PR tree-optimization/84205
18838         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18839         special-case isl_ast_op_zdiv_r.
18841         PR tree-optimization/84223
18842         * graphite-scop-detection.c (gather_bbs::before_dom_children):
18843         Only add conditions from within the region.
18844         (gather_bbs::after_dom_children): Adjust.
18846 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
18848         PR target/84209
18849         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18850         * config/avr/avr.md: Only post-reload split REG-REG moves if
18851         either register is GENERAL_REG_P.
18853 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18855         PR tree-optimization/84235
18856         * tree-ssa-scopedtables.c
18857         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18858         if the subtraction is performed in floating point type where NaNs are
18859         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18860         build 1.  Formatting fix.
18862 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
18864         PR target/84146
18865         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18866         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18867         and skip it regardless of bb boundaries.  Use CALL_P macro,
18868         don't test INSN_P (insn) together with CALL_P or JUMP_P check
18869         unnecessarily, formatting fix.
18871 2018-02-06  Michael Collison  <michael.collison@arm.com>
18873         * config/arm/thumb2.md:
18874         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
18875         (*thumb_mov_notscc): Ditto.
18877 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
18879         PR target/84154
18880         * config/rs6000/rs6000.md (su code attribute): Use "u" for
18881         unsigned_fix, not "s".
18883 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18885         * configure.ac (gcc_fn_eh_frame_ro): New function.
18886         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
18887         correct .eh_frame permissions.
18888         * configure: Regenerate.
18890 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
18892         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
18893         irrelevant options.
18895 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18897         * config/rs6000/rs6000.c (rs6000_option_override_internal):
18898         Display warning message for -mno-speculate-indirect-jumps.
18900 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
18902         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
18903         Undocumented.
18904         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
18906 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
18908         PR tree-optimization/84225
18909         * tree-eh.c (find_trapping_overflow): Only call
18910         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
18912 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18914         PR target/84145
18915         * config/i386/i386.c: Reimplement the check of possible options
18916         -mibt/-mshstk conbination. Change error messages.
18917         * doc/invoke.texi: Fix a typo: remove extra '='.
18919 2018-02-06  Marek Polacek  <polacek@redhat.com>
18921         PR tree-optimization/84228
18922         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
18924 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
18926         PR target/82641
18927         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
18928         emitted arch directives.
18929         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
18930         __ARM_FEATURE_COPROC before changing architectures.
18932 2018-02-06  Richard Biener  <rguenther@suse.de>
18934         * config/i386/i386.c (print_reg): Fix typo.
18935         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
18937 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
18939         * configure: Regenerate.
18941 2018-02-05  Martin Sebor  <msebor@redhat.com>
18943         PR tree-optimization/83369
18944         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
18945         inlining context.
18947 2018-02-05  Martin Liska  <mliska@suse.cz>
18949         * doc/invoke.texi: Cherry-pick upstream r323995.
18951 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
18953         * ira.c (ira_init_register_move_cost): Adjust comment.
18955 2018-02-05  Martin Liska  <mliska@suse.cz>
18957         PR gcov-profile/84137
18958         * doc/gcov.texi: Fix typo in documentation.
18960 2018-02-05  Martin Liska  <mliska@suse.cz>
18962         PR gcov-profile/83879
18963         * doc/gcov.texi: Document necessity of --dynamic-list-data when
18964         using dlopen functionality.
18966 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
18968         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18969         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18970         _mm_maskz_range_ss, _mm_mask_range_round_ss,
18971         _mm_maskz_range_round_ss): New intrinsics.
18972         (__builtin_ia32_rangesd128_round)
18973         (__builtin_ia32_rangess128_round): Remove.
18974         (__builtin_ia32_rangesd128_mask_round,
18975         __builtin_ia32_rangess128_mask_round): New builtins.
18976         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18977         __builtin_ia32_rangess128_round): Remove.
18978         (__builtin_ia32_rangesd128_mask_round,
18979         __builtin_ia32_rangess128_mask_round): New builtins.
18980         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18981         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18982         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18983         "<round_saeonly_constraint>")): Changed to ...
18984         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18985         "<round_saeonly_scalar_constraint>")): ... this.
18986         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18987         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18988         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18989         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18990         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18992 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
18994         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18995         options.
18996         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18997         Remove all values except native, 8540 and 8548.
18999 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
19001         * config/i386/i386.c (ix86_output_function_return): Pass
19002         INVALID_REGNUM, instead of -1, as invalid register number to
19003         indirect_thunk_name and output_indirect_thunk.
19005 2018-02-02  Julia Koval  <julia.koval@intel.com>
19007         * config.gcc: Add -march=icelake.
19008         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19009         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19010         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19011         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19012         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19013         (processor_target_table): Add icelake.
19014         (ix86_option_override_internal): Handle new PTAs.
19015         (get_builtin_code_for_version): Handle icelake.
19016         (M_INTEL_COREI7_ICELAKE): New.
19017         (fold_builtin_cpu): Handle icelake.
19018         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19019         * doc/invoke.texi: Add -march=icelake.
19021 2018-02-02  Julia Koval  <julia.koval@intel.com>
19023         * config/i386/i386.c (ix86_option_override_internal): Change flags type
19024         to wide_int_bitmask.
19025         * wide-int-bitmask.h: New.
19027 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19029         PR target/84066
19030         * config/i386/i386.md: Replace Pmode with word_mode in
19031         builtin_setjmp_setup and builtin_longjmp to support x32.
19033 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
19035         PR target/56010
19036         PR target/83743
19037         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19038         #include "opts.h".
19039         (rs6000_supported_cpu_names): New static variable.
19040         (linux_cpu_translation_table): Likewise.
19041         (elf_platform) <cpu>: Define new static variable and use it.
19042         Translate kernel AT_PLATFORM name to canonical name if needed.
19043         Error if platform name is unknown.
19045 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
19047         PR target/84089
19048         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19050 2018-02-01  Jeff Law  <law@redhat.com>
19052         PR target/84128
19053         * config/i386/i386.c (release_scratch_register_on_entry): Add new
19054         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
19055         the scratch if RELEASE_VIA_POP is false.
19056         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19057         If we have to save a temporary register, decrement SIZE appropriately.
19058         Pass new arguments to release_scratch_register_on_entry.
19059         (ix86_adjust_stack_and_probe): Likewise.
19060         (ix86_emit_probe_stack_range): Pass new arguments to
19061         release_scratch_register_on_entry.
19063 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
19065         PR rtl-optimization/84157
19066         * combine.c (change_zero_ext): Use REG_P predicate in
19067         front of HARD_REGISTER_P predicate.
19069 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
19071         * config/avr/avr.c (avr_option_override): Move disabling of
19072         -fdelete-null-pointer-checks to...
19073         * common/config/avr/avr-common.c (avr_option_optimization_table):
19074         ...here.
19076 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19078         PR tree-optimization/81635
19079         * tree-data-ref.c (split_constant_offset_1): For types that
19080         wrap on overflow, try to use range info to prove that wrapping
19081         cannot occur.
19083 2018-02-01  Renlin Li  <renlin.li@arm.com>
19085         PR target/83370
19086         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19087         TAILCALL_ADDR_REGS.
19088         (aarch64_register_move_cost): Likewise.
19089         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19090         TAILCALL_ADDR_REGS.
19091         (REG_CLASS_NAMES): Likewise.
19092         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19093         TAILCALL_ADDR_REGS. Remove IP registers.
19094         * config/aarch64/aarch64.md (Ucs): Update register constraint.
19096 2018-02-01  Richard Biener  <rguenther@suse.de>
19098         * domwalk.h (dom_walker::dom_walker): Add additional constructor
19099         for specifying RPO order and allow NULL for that.
19100         * domwalk.c (dom_walker::dom_walker): Likewise.
19101         (dom_walker::walk): Handle NULL RPO order.
19102         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19103         in RPO order.
19104         (rewrite_update_dom_walker): Likewise.
19105         (mark_def_dom_walker): Likewise.
19107 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19109         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19110         (aarch64_maybe_expand_sve_subreg_move): Declare.
19111         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19112         * config/aarch64/predicates.md (aarch64_any_register_operand): New
19113         predicate.
19114         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19115         that are semantically a reverse operation.
19116         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19117         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19118         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19119         functions.
19120         (aarch64_can_change_mode_class): For big-endian, forbid changes
19121         between two SVE modes if they have different element sizes.
19123 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19125         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19126         the TImode handling for big-endian targets.
19128 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19130         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19131         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
19132         not just bytes.
19133         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19134         Remove BSWAP handing for big-endian targets and use the form of
19135         LD1RQ appropariate for the mode.
19137 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19139         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19140         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19141         duplicated element.
19143 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19145         PR tearget/83845
19146         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19147         check for operands that need to go through aarch64_sve_reload_be.
19149 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
19151         PR tree-optimization/81661
19152         PR tree-optimization/84117
19153         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19154         * tree-eh.c: Include gimplify.h.
19155         (find_trapping_overflow, replace_trapping_overflow,
19156         rewrite_to_non_trapping_overflow): New functions.
19157         * tree-vect-loop.c: Include tree-eh.h.
19158         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19159         * tree-data-ref.c: Include tree-eh.h.
19160         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19162 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
19164         PR rtl-optimization/84123
19165         * combine.c (change_zero_ext): Check if hard register satisfies
19166         can_change_dest_mode before calling gen_lowpart_SUBREG.
19168 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
19170         PR target/82444
19171         * ira.c (ira_init_register_move_cost): Remove assert.
19173 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19175         PR rtl-optimization/84071
19176         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19177         * doc/tm.texi: Regenerate.
19179 2018-01-31  Richard Biener  <rguenther@suse.de>
19181         PR tree-optimization/84132
19182         * tree-data-ref.c (analyze_miv_subscript): Properly
19183         check whether evolution_function_is_affine_multivariate_p
19184         before calling gcd_of_steps_may_divide_p.
19186 2018-01-31  Julia Koval  <julia.koval@intel.com>
19188         PR target/83618
19189         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19190         * config/i386/i386.md (rdpid_rex64) New.
19191         (rdpid): Make 32bit only.
19193 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
19195         PR lto/84105
19196         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19197         an IDENTIFIER_NODE for FUNCTION_TYPE's.
19199 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19201         Revert
19202         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19204         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19206 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19208         PR rtl-optimization/84071
19209         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19210         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19212 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19214         * config/arc/arc.c (arc_handle_aux_attribute): New function.
19215         (arc_attribute_table): Add 'aux' attribute.
19216         (arc_in_small_data_p): Consider aux like variables.
19217         (arc_is_aux_reg_p): New function.
19218         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19219         (arc_get_aux_arg): New function.
19220         (prepare_move_operands): Handle aux-register access.
19221         (arc_handle_aux_attribute): New function.
19222         * doc/extend.texi (ARC Variable attributes): Add subsection.
19224 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19226         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19227         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19228         (arc_attribute_table): Add 'uncached' attribute.
19229         (arc_print_operand): Print '.di' flag for uncached memory
19230         accesses.
19231         (arc_in_small_data_p): Do not consider for small data the uncached
19232         types.
19233         (arc_is_uncached_mem_p): New function.
19234         * config/arc/predicates.md (compact_store_memory_operand): Check
19235         for uncached memory accesses.
19236         (nonvol_nonimm_operand): Likewise.
19237         * doc/extend.texi (ARC Type Attribute): New subsection.
19239 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
19241         PR c/84100
19242         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19243         falign-loops=): Add Optimization flag.
19245 2018-01-30  Jeff Law  <law@redhat.com>
19247         PR target/84064
19248         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19249         INT_REGISTERS_SAVED.  Check it prior to calling
19250         get_scratch_register_on_entry.
19251         (ix86_adjust_stack_and_probe): Similarly.
19252         (ix86_emit_probe_stack_range): Similarly.
19253         (ix86_expand_prologue): Corresponding changes.
19255 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19257         PR target/40411
19258         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19259         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19261 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
19263         PR target/84112
19264         * lra-constraints.c (curr_insn_transform): Process AND in the
19265         address.
19267 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
19269         PR rtl-optimization/83986
19270         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19271         dependence against last_pending_memory_flush in addition to
19272         pending_jump_insns.
19274 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
19276         PR tree-optimization/81611
19277         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19278         copies.
19280 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19282         PR target/83758
19283         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19284         a reg rtx.
19286 2018-01-30  Richard Biener  <rguenther@suse.de>
19287             Jakub Jelinek  <jakub@redhat.com>
19289         PR tree-optimization/84111
19290         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19291         inner loops added during recursion, as they don't have up-to-date
19292         SSA form.
19294 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19296         PR ipa/81360
19297         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19298         (can_inline_edge_by_limits_p): ... here.
19299         (can_early_inline_edge_p, check_callers,
19300         update_caller_keys, update_callee_keys, recursive_inlining,
19301         add_new_edges_to_heap, speculation_useful_p,
19302         inline_small_functions,
19303         inline_small_functions, flatten_function,
19304         inline_to_all_callers_1): Update.
19306 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19308         * profile-count.c (profile_count::combine_with_ipa_count): Handle
19309         zeros correctly.
19311 2018-01-30  Richard Biener  <rguenther@suse.de>
19313         PR tree-optimization/83008
19314         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19315         invariant and constant vector uses in stmts when they need
19316         more than one stmt.
19318 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19320         PR bootstrap/84017
19321         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19322         * configure: Regenerate.
19324 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19326         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19327         pattern.
19328         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19329         Use gen_rtx_REG rather than gen_lowpart.
19331 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19333         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19334         rather than 0 when creating partial subregs.
19336 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19338         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19339         of usage.
19341 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
19343         PR target/81550
19344         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19345         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19346         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19347         flags.  This restores the settings used before the 2017-07-24.
19348         Turning off pre increment/decrement/modify allows IVOPTS to
19349         optimize DF/SF loops where the index is an int.
19351 2018-01-29  Richard Biener  <rguenther@suse.de>
19352             Kelvin Nilsen  <kelvin@gcc.gnu.org>
19354         PR bootstrap/80867
19355         * tree-vect-stmts.c (vectorizable_call): Don't call
19356         targetm.vectorize_builtin_md_vectorized_function if callee is
19357         NULL.
19359 2018-01-22  Carl Love  <cel@us.ibm.com>
19361         * doc/extend.tex: Fix typo in second arg in
19362         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19364 2018-01-29  Richard Biener  <rguenther@suse.de>
19366         PR tree-optimization/84086
19367         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19368         (flush_ssaname_freelist): When SSA names were released reset
19369         the SCEV hash table.
19371 2018-01-29  Richard Biener  <rguenther@suse.de>
19373         PR tree-optimization/84057
19374         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19375         removed paths when removing edges.
19377 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
19379         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19380         -mfunction-return=@var{choice}.
19382 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19384         PR diagnostic/84034
19385         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19386         Handle CR like TAB.
19387         (layout::print_source_line): Likewise.
19388         (test_get_line_width_without_trailing_whitespace): Add test cases.
19390 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
19392         PR middle-end/84040
19393         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19394         debug insns.
19396 2018-01-26  Jim Wilson  <jimw@sifive.com>
19398         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19400         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19401         specified.
19403 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19405         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19406         and CMP + SUB-immediate -> SUBS.
19408 2018-01-26  Martin Sebor  <msebor@redhat.com>
19410         PR tree-optimization/83896
19411         * tree-ssa-strlen.c (get_string_len): Rename...
19412         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
19413         Avoid assuming length is constant.
19414         (handle_char_store): Use HOST_WIDE_INT for string length.
19416 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
19418         PR target/81763
19419         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19420         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19422 2018-01-26  Richard Biener  <rguenther@suse.de>
19424         PR rtl-optimization/84003
19425         * dse.c (record_store): Only record redundant stores when
19426         the earlier store aliases at least all accesses the later one does.
19428 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
19430         PR rtl-optimization/83985
19431         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19432         REG_CFA_RESTORE insns.
19433         (delete_unmarked_insns): Don't ignore separate shrink wrapping
19434         REG_CFA_RESTORE insns here.
19436         PR c/83989
19437         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19438         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19440 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19442         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19443         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19444         (arc_init): Likewise.
19445         (arc_override_options): Likewise.
19446         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19447         value.
19448         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19449         support.
19450         * config/arc/arc.h (TARGET_DBNZ): Define.
19451         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19452         properly set the tune attribute.
19453         (dbnz): Use TARGET_DBNZ guard.
19454         * config/arc/arc.opt (mtune): Add core3 option.
19456 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19458         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19459         recognize new pic like addresses.
19460         (arc_delegitimize_address): Clean up.
19462 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19464         * config/arc/arc-arches.def: Option mrf16 valid for all
19465         architectures.
19466         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19467         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19468         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19469         * config/arc/arc-tables.opt: Regenerate.
19470         * config/arc/arc.c (arc_conditional_register_usage): Handle
19471         reduced register file case.
19472         (arc_file_start): Set must have build attributes.
19473         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19474         mrf16 option value.
19475         * config/arc/arc.opt (mrf16): Add new option.
19476         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19477         * config/arc/genmultilib.awk: Handle new mrf16 option.
19478         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19479         * config/arc/t-multilib: Regenerate.
19480         * doc/invoke.texi (ARC Options): Document mrf16 option.
19482 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19484         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19485         * config/arc/arc.c (arc_handle_secure_attribute): New function.
19486         (arc_attribute_table): Add 'secure_call' attribute.
19487         (arc_print_operand): Print secure call operand.
19488         (arc_function_ok_for_sibcall): Don't optimize tail calls when
19489         secure.
19490         (arc_is_secure_call_p): New function.  * config/arc/arc.md
19491         (call_i): Add support for sjli instruction.
19492         (call_value_i): Likewise.
19493         * config/arc/constraints.md (Csc): New constraint.
19495 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19496             John Eric Martin  <John.Martin@emmicro-us.com>
19498         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19499         * config/arc/arc.c (_arc_jli_section): New struct.
19500         (arc_jli_section): New type.
19501         (rc_jli_sections): New static variable.
19502         (arc_handle_jli_attribute): New function.
19503         (arc_attribute_table): Add jli_always and jli_fixed attribute.
19504         (arc_file_end): New function.
19505         (TARGET_ASM_FILE_END): Define.
19506         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19507         (arc_add_jli_section): New function.
19508         (jli_call_scan): Likewise.
19509         (arc_reorg): Call jli_call_scan.
19510         (arc_output_addsi): Remove 'S' from printing asm operand.
19511         (arc_is_jli_call_p): New function.
19512         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19513         operand.
19514         (movhi_insn): Likewise.
19515         (movsi_insn): Likewise.
19516         (movsi_set_cc_insn): Likewise.
19517         (loadqi_update): Likewise.
19518         (load_zeroextendqisi_update): Likewise.
19519         (load_signextendqisi_update): Likewise.
19520         (loadhi_update): Likewise.
19521         (load_zeroextendhisi_update): Likewise.
19522         (load_signextendhisi_update): Likewise.
19523         (loadsi_update): Likewise.
19524         (loadsf_update): Likewise.
19525         (movsicc_insn): Likewise.
19526         (bset_insn): Likewise.
19527         (bxor_insn): Likewise.
19528         (bclr_insn): Likewise.
19529         (bmsk_insn): Likewise.
19530         (bicsi3_insn): Likewise.
19531         (cmpsi_cc_c_insn): Likewise.
19532         (movsi_ne): Likewise.
19533         (movsi_cond_exec): Likewise.
19534         (clrsbsi2): Likewise.
19535         (norm_f): Likewise.
19536         (normw): Likewise.
19537         (swap): Likewise.
19538         (divaw): Likewise.
19539         (flag): Likewise.
19540         (sr): Likewise.
19541         (kflag): Likewise.
19542         (ffs): Likewise.
19543         (ffs_f): Likewise.
19544         (fls): Likewise.
19545         (call_i): Remove 'S' asm letter, add jli instruction.
19546         (call_value_i): Likewise.
19547         * config/arc/arc.op (mjli-always): New option.
19548         * config/arc/constraints.md (Cji): New constraint.
19549         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19550         operand.
19551         (subsf3_fpx): Likewise.
19552         (mulsf3_fpx): Likewise.
19553         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19554         asm operand.
19555         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19556         function attrbutes.
19557         * doc/invoke.texi (ARC): Document mjli-always option.
19559 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
19561         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19562         avoid addition with 0 and use incw and decw where possible.
19564 2018-01-26  Richard Biener  <rguenther@suse.de>
19566         PR tree-optimization/81082
19567         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19568         association if it requires casting to unsigned.
19569         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19570         from fold_plusminus_mult_expr to catch important cases late when
19571         range info is available.
19573 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19575         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19576         * configure.ac (hidden_linkonce): New test.
19577         * configure: Regenerate.
19578         * config.in: Regenerate.
19580 2018-01-26  Julia Koval  <julia.koval@intel.com>
19582         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19583         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19584         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19585         _mm_mask_bitshuffle_epi64_mask): Fix type.
19586         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19587         USI_FTYPE_V4DI_V4DI_USI): Remove.
19588         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19589         __builtin_ia32_vpshufbitqmb256_mask,
19590         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19591         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19592         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19594 2018-01-26  Alan Modra  <amodra@gmail.com>
19596         PR target/84033
19597         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19598         UNSPEC_VBPERMQ.  Sort other unspecs.
19600 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
19602         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19604 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
19606         PR middle-end/83055
19607         * predict.c (drop_profile): Do not push/pop cfun; update also
19608         node->count.
19609         (handle_missing_profiles): Fix logic looking for zero profiles.
19611 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
19613         PR middle-end/83977
19614         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19615         on functions with #pragma omp declare simd or functions with simd
19616         attribute.
19617         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19618         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19619         Remove trailing \n from warning_at calls.
19621 2018-01-25  Tom de Vries  <tom@codesourcery.com>
19623         PR target/84028
19624         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19625         for neutered workers.
19627 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
19629         PR target/68467
19630         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19631         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19633 2018-01-24  Jeff Law  <law@redhat.com>
19635         PR target/83994
19636         * i386.c (get_probe_interval): Move to earlier point.
19637         (ix86_compute_frame_layout): If -fstack-clash-protection and
19638         the frame is larger than the probe interval, then use pushes
19639         to save registers rather than reg->mem moves.
19640         (ix86_expand_prologue): Remove conditional for int_registers_saved
19641         assertion.
19643 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
19645         PR target/84014
19646         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19647         min/max for never referenced object.
19649 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
19651         PR middle-end/83977
19652         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19653         here.
19654         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19655         attributes from DECL_ATTRIBUTES (decl) without affecting
19656         DECL_ATTRIBUTES (current_function_decl).
19657         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19658         functions with non-NULL DECL_ABSTRACT_ORIGIN.
19660 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
19662         PR tree-optimization/83979
19663         * fold-const.c (fold_comparison): Use constant_boolean_node
19664         instead of boolean_{true,false}_node.
19666 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
19668         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19669         with zero counts.
19671 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19673         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19674         Simplify the clause that sets the length attribute.
19675         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19676         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19677         clause that sets the length attribute.
19678         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19680 2018-01-24  Tom de Vries  <tom@codesourcery.com>
19682         PR target/83589
19683         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19684         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19685         Add strict parameter.
19686         (prevent_branch_around_nothing): Insert dummy insn between branch to
19687         label and label with no ptx insn inbetween.
19688         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19690 2018-01-24  Tom de Vries  <tom@codesourcery.com>
19692         PR target/81352
19693         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19694         for neutered threads in warp.
19695         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19697 2018-01-24  Richard Biener  <rguenther@suse.de>
19699         PR tree-optimization/83176
19700         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19701         operands.
19703 2018-01-24  Richard Biener  <rguenther@suse.de>
19705         PR tree-optimization/82819
19706         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19707         code generating pluses that are no-ops in the target precision.
19709 2018-01-24  Richard Biener  <rguenther@suse.de>
19711         PR middle-end/84000
19712         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19714 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19716         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19717         to merge probabilities.
19718         * predict.c (probably_never_executed): Also mark as cold functions
19719         with global 0 profile and guessed local profile.
19720         * profile-count.c (profile_probability::combine_with_count): New
19721         member function.
19722         * profile-count.h (profile_probability::operator*,
19723         profile_probability::operator*=, profile_probability::operator/,
19724         profile_probability::operator/=): Reduce precision to adjusted
19725         and set value to guessed on contradictory divisions.
19726         (profile_probability::combine_with_freq): Remove.
19727         (profile_probability::combine_wiht_count): Declare.
19728         (profile_count::force_nonzero):: Set to adjusted.
19729         (profile_count::probability_in):: Set quality to adjusted.
19730         * tree-ssa-tail-merge.c (replace_block_by): Use
19731         combine_with_count.
19733 2018-01-23  Andrew Waterman  <andrew@sifive.com>
19734             Jim Wilson  <jimw@sifive.com>
19736         * config/riscv/riscv.c (riscv_stack_boundary): New.
19737         (riscv_option_override): Set riscv_stack_boundary.  Handle
19738         riscv_preferred_stack_boundary_arg.
19739         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19740         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19741         (STACK_BOUNDARY): Set to riscv_stack_boundary.
19742         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19743         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19744         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19746 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
19748         PR target/83905
19749         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19750         of struct ix86_frame.
19751         (ix86_expand_epilogue): Likewise.  Add a local variable for
19752         the reg_save_offset field in struct ix86_frame.
19754 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
19756         PR tree-optimization/82604
19757         * tree-loop-distribution.c (enum partition_kind): New enum item
19758         PKIND_PARTIAL_MEMSET.
19759         (partition_builtin_p): Support above new enum item.
19760         (generate_code_for_partition): Ditto.
19761         (compute_access_range): Differentiate cases that equality can be
19762         proven at all loops, the innermost loops or no loops.
19763         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19764         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
19765         (finalize_partitions, distribute_loop): Don't fuse partition of
19766         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19767         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19768         parloop is enabled.
19770 2018-01-23  Martin Liska  <mliska@suse.cz>
19772         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19773         order to ignore the predictor.
19774         (PRED_POLYMORPHIC_CALL): Likewise.
19775         (PRED_RECURSIVE_CALL): Likewise.
19777 2018-01-23  Martin Liska  <mliska@suse.cz>
19779         * tree-profile.c (tree_profiling): Print function header to
19780         aware reader which function we are working on.
19781         * value-prof.c (gimple_find_values_to_profile): Do not print
19782         not interesting value histograms.
19784 2018-01-23  Martin Liska  <mliska@suse.cz>
19786         * profile-count.h (enum profile_quality): Add
19787         profile_uninitialized as the first value. Do not number values
19788         as they are zero based.
19789         (profile_count::verify): Update sanity check.
19790         (profile_probability::verify): Likewise.
19792 2018-01-23  Nathan Sidwell  <nathan@acm.org>
19794         * doc/invoke.texi (ffor-scope): Deprecate.
19796 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19798         PR tree-optimization/83510
19799         * domwalk.c (set_all_edges_as_executable): New function.
19800         (dom_walker::dom_walker): Convert bool param
19801         "skip_unreachable_blocks" to enum reachability.  Move setup of
19802         edge flags to set_all_edges_as_executable and only do it when
19803         reachability is REACHABLE_BLOCKS.
19804         * domwalk.h (enum dom_walker::reachability): New enum.
19805         (dom_walker::dom_walker): Convert bool param
19806         "skip_unreachable_blocks" to enum reachability.
19807         (set_all_edges_as_executable): New decl.
19808         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
19809         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19810         "reachability".
19811         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19812         but converting true to REACHABLE_BLOCKS.
19813         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19814         * tree-vrp.c
19815         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19816         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19817         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19818         REACHABLE_BLOCKS.
19819         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19820         if check_all_array_refs will be called.
19822 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19824         * tree.c (selftest::test_location_wrappers): Add more test
19825         coverage.
19827 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19829         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19830         (selftest::test_bit_in_range): Likewise.
19832 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19834         PR testsuite/83888
19835         * doc/sourcebuild.texi (vect_float): Say that the selector
19836         only describes the situation when -funsafe-math-optimizations is on.
19837         (vect_float_strict): Document.
19839 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19841         PR tree-optimization/83965
19842         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19843         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19844         instead of checking only for a reduction.
19845         (vect_recog_widen_sum_pattern): Likewise.
19847 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19849         * predict.c (probably_never_executed): Only use precise profile info.
19850         (compute_function_frequency): Skip after inlining hack since we now
19851         have quality checking.
19853 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19855         * profile-count.h (profile_probability::very_unlikely,
19856         profile_probability::unlikely, profile_probability::even): Set
19857         precision to guessed.
19859 2018-01-23  Richard Biener  <rguenther@suse.de>
19861         PR tree-optimization/83963
19862         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19863         Properly terminate dominator walk when crossing the exit edge not
19864         when visiting its source block.
19866 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
19868         PR c++/83918
19869         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19870         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19872 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
19874         PR tree-optimization/83957
19875         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
19876         semicolon after for body surrounded by braces.
19878         PR tree-optimization/83081
19879         * profile-count.h (profile_probability::split): New method.
19880         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
19881         Use profile_probability::split.
19882         (do_compare_rtx_and_jump): Fix adjustment of probabilities
19883         when splitting a single conditional jump into 2.
19885 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
19887         PR tree-optimization/69452
19888         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
19889         decl.
19891 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19893         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
19894         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
19895         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
19897 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19899         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
19900         declaration.
19901         * config/rl78/rl78.md (movdi): New define_expand.
19902         * config/rl78/rl78.c (rl78_split_movdi): New function.
19904 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
19906         PR target/83862
19907         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
19908         no longer used.
19909         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
19910         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
19911         128-bit to produce an UNSPEC move to get the double word with the
19912         signbit and then a shift directly to do signbit.
19913         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
19914         implementation with a new version that just does either a direct
19915         move or a regular move.  Move memory interface to separate insns.
19916         Move insns so they are next to the expander.
19917         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
19918         with signbit move.  Split big and little endian case.
19919         (signbit<mode>2_dm_mem_le): Likewise.
19920         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
19921         (signbit<mode>2_dm2): Likewise.
19923 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19925         * config/rl78/rl78.md (anddi3): New define_expand.
19927 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19929         * config/rl78/rl78.md (umindi3): New define_expand.
19931 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19933         * config/rl78/rl78.md (smindi3): New define_expand.
19935 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19937         * config/rl78/rl78.md (smaxdi3): New define_expand.
19939 2018-01-22  Carl Love  <cel@us.ibm.com>
19941         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
19942         LVX_V1TI): Add macro expansion.
19943         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
19944         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
19945         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
19946         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
19947         Change check to determine if the instruction is a byte reversing
19948         entry.  Fix typo in comment.
19949         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
19950         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
19951         Add def_builtin calls for new builtins.
19952         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
19953         Add define_insn expansion.
19955 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19957         * config/rl78/rl78.md (umaxdi3): New define_expand.
19959 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
19961         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
19962         for non-QImode registers.
19964 2018-01-22  Richard Biener  <rguenther@suse.de>
19966         PR tree-optimization/83963
19967         * graphite-scop-detection.c (scop_detection::get_sese): Delay
19968         including the loop exit block.
19969         (scop_detection::merge_sese): Likewise.
19970         (scop_detection::add_scop): Do it here instead.
19972 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19974         * doc/sourcebuild.texi (arm_softfloat): Document.
19976 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
19978         PR gcc/77734
19979         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19980         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19981         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19983 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19984             David Edelsohn  <dje.gcc@gmail.com>
19986         PR target/83946
19987         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19988         Change "crset eq" to "crset 2".
19989         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19990         (*call_indirect_aix<mode>_nospec): Likewise.
19991         (*call_value_indirect_aix<mode>_nospec): Likewise.
19992         (*call_indirect_elfv2<mode>_nospec): Likewise.
19993         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19994         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19995         change assembly output from . to $.
19996         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19997         (indirect_jump<mode>_nospec): Change assembly output from . to $.
19998         (*tablejump<mode>_internal1_nospec): Likewise.
20000 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
20002         PR target/80870
20003         * config/sh/sh_optimize_sett_clrt.cc:
20004         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20006 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
20008         PR tree-optimization/83940
20009         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20010         offset_dt to vect_constant_def rather than vect_unknown_def_type.
20011         (vect_check_load_store_mask): Add a mask_dt_out parameter and
20012         use it to pass back the definition type.
20013         (vect_check_store_rhs): Likewise rhs_dt_out.
20014         (vect_build_gather_load_calls): Add a mask_dt argument and use
20015         it instead of a call to vect_is_simple_use.
20016         (vectorizable_store): Update calls to vect_check_load_store_mask
20017         and vect_check_store_rhs.  Use the dt returned by the latter instead
20018         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
20019         instead of calls to vect_is_simple_use.  Pass the scalar rather
20020         than the vector operand to vect_is_simple_use when handling
20021         second and subsequent copies of an rhs value.
20022         (vectorizable_load): Update calls to vect_check_load_store_mask
20023         and vect_build_gather_load_calls.  Use the cached mask_dt and
20024         gs_info.offset_dt instead of calls to vect_is_simple_use.
20026 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
20028         PR middle-end/83945
20029         * tree-emutls.c: Include gimplify.h.
20030         (lower_emutls_2): New function.
20031         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20032         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20033         it before further processing.
20035         PR target/83930
20036         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20037         UINTVAL (trueop1) instead of INTVAL (op1).
20039 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
20041         PR debug/81570
20042         PR debug/83728
20043         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20044         INCOMING_FRAME_SP_OFFSET if not defined.
20045         (scan_trace): Add ENTRY argument.  If true and
20046         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20047         emit a note to adjust the CFA offset.
20048         (create_cfi_notes): Adjust scan_trace callers.
20049         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20050         INCOMING_FRAME_SP_OFFSET in the CIE.
20051         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20052         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20053         Likewise.
20054         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20055         * doc/tm.texi: Regenerated.
20057 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20059         PR rtl-optimization/83147
20060         * lra-constraints.c (remove_inheritance_pseudos): Use
20061         lra_substitute_pseudo_within_insn.
20063 2018-01-19  Tom de Vries  <tom@codesourcery.com>
20064             Cesar Philippidis  <cesar@codesourcery.com>
20066         PR target/83920
20067         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20069 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
20071         PR target/83790
20072         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20073         spaces for function labels.
20075 2018-01-19  Martin Liska  <mliska@suse.cz>
20077         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20078         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20079         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20080         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20081         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20082         (PRED_CONST_RETURN): Change from 69 to 65.
20083         (PRED_NULL_RETURN): Change from 91 to 71.
20084         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20085         (PRED_LOOP_GUARD): Change from 66 to 73.
20087 2018-01-19  Martin Liska  <mliska@suse.cz>
20089         * predict.c (predict_insn_def): Add new assert.
20090         (struct branch_predictor): Change type to signed integer.
20091         (test_prediction_value_range): Amend test to cover
20092         PROB_UNINITIALIZED.
20093         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20094         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20095         (PRED_LOOP_ITERATIONS_MAX): Likewise.
20096         (PRED_LOOP_IV_COMPARE): Likewise.
20097         * predict.h (PROB_UNINITIALIZED): Define new constant.
20099 2018-01-19  Martin Liska  <mliska@suse.cz>
20101         * predict.c (dump_prediction): Add new format for
20102         analyze_brprob.py script which is enabled with -details
20103         suboption.
20104         * profile-count.h (precise_p): New function.
20106 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20108         PR tree-optimization/83922
20109         * tree-vect-loop.c (vect_verify_full_masking): Return false if
20110         there are no statements that need masking.
20111         (vect_active_double_reduction_p): New function.
20112         (vect_analyze_loop_operations): Use it when handling phis that
20113         are not in the loop header.
20115 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20117         PR tree-optimization/83914
20118         * tree-vect-loop.c (vectorizable_induction): Don't convert
20119         init_expr or apply the peeling adjustment for inductions
20120         that are nested within the vectorized loop.
20122 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20124         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20125         instead of NEG.
20127 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20129         PR sanitizer/81715
20130         PR testsuite/83882
20131         * function.h (gimplify_parameters): Add gimple_seq * argument.
20132         * function.c: Include gimple.h and options.h.
20133         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20134         for the added local temporaries if needed.
20135         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20136         if there are any parameter cleanups, wrap whole body into a
20137         try/finally with the cleanups.
20139 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
20141         PR target/82964
20142         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20143         Use GET_MODE_CLASS for scalar floating point.
20145 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20147         PR ipa/82256
20148         patch by PaX Team
20149         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20150         Fix call of call_cgraph_insertion_hooks.
20152 2018-01-18  Martin Sebor  <msebor@redhat.com>
20154         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20156 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20158         PR ipa/83619
20159         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20160         frequencies.
20162 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
20164         PR other/70268
20165         * common.opt: (-ffile-prefix-map): New option.
20166         * opts.c (common_handle_option): Defer it.
20167         * opts-global.c (handle_common_deferred_options): Handle it.
20168         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20169         * file-prefix-map.h: New file.
20170         (remap_debug_filename, add_debug_prefix_map): ...here.
20171         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20172         * final.c (debug_prefix_map, add_debug_prefix_map
20173         remap_debug_filename): Move to...
20174         * file-prefix-map.c: New file.
20175         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20176         generalize, get rid of alloca(), use strrchr() instead of strchr().
20177         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20178         Implement in terms of add_prefix_map().
20179         (remap_macro_filename, remap_debug_filename): Implement in term of
20180         remap_filename().
20181         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20182         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20183         * dbxout.c: Include file-prefix-map.h.
20184         * varasm.c: Likewise.
20185         * vmsdbgout.c: Likewise.
20186         * xcoffout.c: Likewise.
20187         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20188         * doc/cppopts.texi (-fmacro-prefix-map): Document.
20189         * doc/invoke.texi (-ffile-prefix-map): Document.
20190         (-fdebug-prefix-map): Update description.
20192 2018-01-18  Martin Liska  <mliska@suse.cz>
20194         * config/i386/i386.c (indirect_thunk_name): Document that also
20195         lfence is emitted.
20196         (output_indirect_thunk): Document why both instructions
20197         (pause and lfence) are generated.
20199 2018-01-18  Richard Biener  <rguenther@suse.de>
20201         PR tree-optimization/83887
20202         * graphite-scop-detection.c
20203         (scop_detection::get_nearest_dom_with_single_entry): Remove.
20204         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20205         (scop_detection::merge_sese): Re-implement with a flood-fill
20206         algorithm that properly finds a SESE region if it exists.
20208 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20210         PR c/61240
20211         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20212         pointer_diff optimizations use view_convert instead of convert.
20214 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20216         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20217         Generate different code for -mno-speculate-indirect-jumps.
20218         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20219         (*call_indirect_aix<mode>): Disable for
20220         -mno-speculate-indirect-jumps.
20221         (*call_indirect_aix<mode>_nospec): New define_insn.
20222         (*call_value_indirect_aix<mode>): Disable for
20223         -mno-speculate-indirect-jumps.
20224         (*call_value_indirect_aix<mode>_nospec): New define_insn.
20225         (*sibcall_nonlocal_sysv<mode>): Generate different code for
20226         -mno-speculate-indirect-jumps.
20227         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20229 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
20231         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20232         long double type, set the flags for noting the default long double
20233         type, even if we don't pass or return a long double type.
20235 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
20237         PR ipa/83051
20238         * ipa-inline.c (flatten_function): Do not overwrite final inlining
20239         failure.
20241 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
20243         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20244         support for merge[hl].
20245         (fold_mergehl_helper): New helper function.
20246         (tree-vector-builder.h): New #include for tree_vector_builder usage.
20247         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20248         (altivec_vmrglw_direct): Add xxmrglw insn.
20250 2018-01-17  Andrew Waterman  <andrew@sifive.com>
20252         * config/riscv/riscv.c (riscv_conditional_register_usage): If
20253         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20255 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
20257         PR lto/83121
20258         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20259         call the lto_location_cache before reading the
20260         DECL_SOURCE_LOCATION of the types.
20262 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
20263             Richard Sandiford  <richard.sandiford@linaro.org>
20265         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20266         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20267         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20268         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20269         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20270         Add declaration.
20271         * config/aarch64/constraints.md (aarch64_movti_operand):
20272         Limit immediates.
20273         * config/aarch64/predicates.md (Uti): Add new constraint.
20275 2018-01-17  Carl Love  <cel@us.ibm.com>
20277         * config/rs6000/vsx.md (define_expand xl_len_r,
20278         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20279         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20280         lxvll.
20281         (define_expand, define_insn): Move the shift left from  the
20282         define_insn to the define_expand for lxvl and stxvl instructions.
20283         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20284         and XL_LEN_R definitions to PURE.
20286 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
20288         * config/i386/i386.c (indirect_thunk_name): Declare regno
20289         as unsigned int.  Compare regno with INVALID_REGNUM.
20290         (output_indirect_thunk): Ditto.
20291         (output_indirect_thunk_function): Ditto.
20292         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
20293         in the call to output_indirect_thunk_function.
20295 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
20297         PR middle-end/83884
20298         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20299         rather than the size of inner_type to determine the stack slot size
20300         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20302 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
20304         PR target/83546
20305         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20306         to PTA_SILVERMONT.
20308 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
20310         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20311         endian Linux systems to optionally enable multilibs for selecting
20312         the long double type if the user configured an explicit type.
20313         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20314         have no long double multilibs if not defined.
20315         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20316         warn if the user used -mabi={ieee,ibm}longdouble and we built
20317         multilibs for long double.
20318         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20319         appropriate multilib option.
20320         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20321         multilib options.
20322         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20323         for building long double multilibs.
20324         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20326 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
20328         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20329         copies.
20331         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20332         64 bits.
20333         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20334         128 bits.
20336         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20337         variables.
20339         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20340         return value.
20342 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20344         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20345         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20347 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20349         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20350         different rtl trees depending on TARGET_64BIT.
20351         (rs6000_gen_lvx): Likewise.
20353 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20355         * config/visium/visium.md (nop): Tweak comment.
20356         (hazard_nop): Likewise.
20358 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20360         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20361         -mspeculate-indirect-jumps.
20362         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20363         for -mno-speculate-indirect-jumps.
20364         (*call_indirect_elfv2<mode>_nospec): New define_insn.
20365         (*call_value_indirect_elfv2<mode>): Disable for
20366         -mno-speculate-indirect-jumps.
20367         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20368         (indirect_jump): Emit different RTL for
20369         -mno-speculate-indirect-jumps.
20370         (*indirect_jump<mode>): Disable for
20371         -mno-speculate-indirect-jumps.
20372         (*indirect_jump<mode>_nospec): New define_insn.
20373         (tablejump): Emit different RTL for
20374         -mno-speculate-indirect-jumps.
20375         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20376         (tablejumpsi_nospec): New define_expand.
20377         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20378         (tablejumpdi_nospec): New define_expand.
20379         (*tablejump<mode>_internal1): Disable for
20380         -mno-speculate-indirect-jumps.
20381         (*tablejump<mode>_internal1_nospec): New define_insn.
20382         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20383         option.
20385 2018-01-16  Artyom Skrobov tyomitch@gmail.com
20387         * caller-save.c (insert_save): Drop unnecessary parameter.  All
20388         callers updated.
20390 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20391             Richard Biener  <rguenth@suse.de>
20393         PR libgomp/83590
20394         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20395         return early, inline manually is_gimple_sizepos.  Make sure if we
20396         call gimplify_expr we don't end up with a gimple constant.
20397         * tree.c (variably_modified_type_p): Don't return true for
20398         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
20399         * gimplify.h (is_gimple_sizepos): Remove.
20401 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20403         PR tree-optimization/83857
20404         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20405         vectorizable_live_operation for pure SLP statements.
20406         (vectorizable_live_operation): Handle PHIs.
20408 2018-01-16  Richard Biener  <rguenther@suse.de>
20410         PR tree-optimization/83867
20411         * tree-vect-stmts.c (vect_transform_stmt): Precompute
20412         nested_in_vect_loop_p since the scalar stmt may get invalidated.
20414 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20416         PR c/83844
20417         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20418         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20419         If off is not INTEGER_CST, issue a may not be aligned warning
20420         rather than isn't aligned.  Use isn%'t rather than isn't.
20421         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20422         into MULT_EXPR.
20423         <case MULT_EXPR>: Improve the case when bottom and one of the
20424         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20425         operand, in that case check if the other operand is multiple of
20426         bottom divided by the INTEGER_CST operand.
20428 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20430         PR target/83858
20431         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20432         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20433         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20434         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20435         * config/pa/pa.c (pa_function_arg_advance): Likewise.
20436         (pa_function_arg, pa_arg_partial_bytes): Likewise.
20437         (pa_function_arg_size): New function.
20439 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20441         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20442         in a separate statement.
20444 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20446         PR tree-optimization/83847
20447         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20448         group gathers and scatters.
20450 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20452         PR rtl-optimization/86620
20453         * params.def (max-sched-ready-insns): Bump minimum value to 1.
20455         PR rtl-optimization/83213
20456         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20457         to last if both are JUMP_INSNs.
20459         PR tree-optimization/83843
20460         * gimple-ssa-store-merging.c
20461         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20462         store_immediate_info for bswap/nop orig_stores.
20464 2018-01-15  Andrew Waterman  <andrew@sifive.com>
20466         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20467         !TARGET_MUL.
20468         <UDIV>: Increase cost if !TARGET_DIV.
20470 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
20472         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20473         (define_attr "cr_logical_3op"): New.
20474         (cceq_ior_compare): Adjust.
20475         (cceq_ior_compare_complement): Adjust.
20476         (*cceq_rev_compare): Adjust.
20477         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20478         (is_cracked_insn): Adjust.
20479         (insn_must_be_first_in_group): Adjust.
20480         * config/rs6000/40x.md: Adjust.
20481         * config/rs6000/440.md: Adjust.
20482         * config/rs6000/476.md: Adjust.
20483         * config/rs6000/601.md: Adjust.
20484         * config/rs6000/603.md: Adjust.
20485         * config/rs6000/6xx.md: Adjust.
20486         * config/rs6000/7450.md: Adjust.
20487         * config/rs6000/7xx.md: Adjust.
20488         * config/rs6000/8540.md: Adjust.
20489         * config/rs6000/cell.md: Adjust.
20490         * config/rs6000/e300c2c3.md: Adjust.
20491         * config/rs6000/e500mc.md: Adjust.
20492         * config/rs6000/e500mc64.md: Adjust.
20493         * config/rs6000/e5500.md: Adjust.
20494         * config/rs6000/e6500.md: Adjust.
20495         * config/rs6000/mpc.md: Adjust.
20496         * config/rs6000/power4.md: Adjust.
20497         * config/rs6000/power5.md: Adjust.
20498         * config/rs6000/power6.md: Adjust.
20499         * config/rs6000/power7.md: Adjust.
20500         * config/rs6000/power8.md: Adjust.
20501         * config/rs6000/power9.md: Adjust.
20502         * config/rs6000/rs64.md: Adjust.
20503         * config/rs6000/titan.md: Adjust.
20505 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20507         * config/i386/predicates.md (indirect_branch_operand): Rewrite
20508         ix86_indirect_branch_register logic.
20510 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20512         * config/i386/constraints.md (Bs): Update
20513         ix86_indirect_branch_register check.  Don't check
20514         ix86_indirect_branch_register with GOT_memory_operand.
20515         (Bw): Likewise.
20516         * config/i386/predicates.md (GOT_memory_operand): Don't check
20517         ix86_indirect_branch_register here.
20518         (GOT32_symbol_operand): Likewise.
20520 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20522         * config/i386/predicates.md (constant_call_address_operand):
20523         Rewrite ix86_indirect_branch_register logic.
20524         (sibcall_insn_operand): Likewise.
20526 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20528         * config/i386/constraints.md (Bs): Replace
20529         ix86_indirect_branch_thunk_register with
20530         ix86_indirect_branch_register.
20531         (Bw): Likewise.
20532         * config/i386/i386.md (indirect_jump): Likewise.
20533         (tablejump): Likewise.
20534         (*sibcall_memory): Likewise.
20535         (*sibcall_value_memory): Likewise.
20536         Peepholes of indirect call and jump via memory: Likewise.
20537         * config/i386/i386.opt: Likewise.
20538         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20539         (GOT_memory_operand): Likewise.
20540         (call_insn_operand): Likewise.
20541         (sibcall_insn_operand): Likewise.
20542         (GOT32_symbol_operand): Likewise.
20544 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
20546         PR middle-end/83837
20547         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20548         type rather than type addr's type points to.
20549         (expand_omp_atomic_mutex): Likewise.
20550         (expand_omp_atomic): Likewise.
20552 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20554         PR target/83839
20555         * config/i386/i386.c (output_indirect_thunk_function): Use
20556         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20557         for  __x86_return_thunk.
20559 2018-01-15  Richard Biener  <rguenther@suse.de>
20561         PR middle-end/83850
20562         * expmed.c (extract_bit_field_1): Fix typo.
20564 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20566         PR target/83687
20567         * config/arm/iterators.md (VF): New mode iterator.
20568         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20569         Remove integer-related logic from pattern.
20570         (neon_vabd<mode>_3): Likewise.
20572 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
20574         PR middle-end/82694
20575         * common.opt (fstrict-overflow): No longer an alias.
20576         (fwrapv-pointer): New option.
20577         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20578         also for pointer types based on flag_wrapv_pointer.
20579         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20580         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20581         opts->x_flag_wrapv got set.
20582         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20583         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20584         POINTER_TYPE_OVERFLOW_UNDEFINED.
20585         * match.pd: Likewise in address comparison pattern.
20586         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20588 2018-01-15  Richard Biener  <rguenther@suse.de>
20590         PR lto/83804
20591         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20592         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
20593         Reset type names to their identifier if their TYPE_DECL doesn't
20594         have linkage (and thus is used for ODR and devirt).
20595         (save_debug_info_for_decl): Remove.
20596         (save_debug_info_for_type): Likewise.
20597         (add_tree_to_fld_list): Adjust.
20598         * tree-pretty-print.c (dump_generic_node): Make dumping of
20599         type names more robust.
20601 2018-01-15  Richard Biener  <rguenther@suse.de>
20603         * BASE-VER: Bump to 8.0.1.
20605 2018-01-14  Martin Sebor  <msebor@redhat.com>
20607         PR other/83508
20608         * builtins.c (check_access): Avoid warning when the no-warning bit
20609         is set.
20611 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
20613         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20614         * ira-color (allocno_hard_regs_compare): Likewise.
20616 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
20618         PR target/83013
20619         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20620         Use .pushsection/.popsection.
20622 2018-01-14  Martin Sebor  <msebor@redhat.com>
20624         PR c++/81327
20625         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20627 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
20629         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20630         entry from extra_headers.
20631         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20632         extra_headers, make the list bitwise identical to the i?86-*-* one.
20634 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20636         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20637         -mcmodel=large with -mindirect-branch=thunk,
20638         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20639         -mfunction-return=thunk-extern.
20640         * doc/invoke.texi: Document -mcmodel=large is incompatible with
20641         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20642         -mfunction-return=thunk and -mfunction-return=thunk-extern.
20644 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20646         * config/i386/i386.c (print_reg): Print the name of the full
20647         integer register without '%'.
20648         (ix86_print_operand): Handle 'V'.
20649         * doc/extend.texi: Document 'V' modifier.
20651 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20653         * config/i386/constraints.md (Bs): Disallow memory operand for
20654         -mindirect-branch-register.
20655         (Bw): Likewise.
20656         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20657         (GOT_memory_operand): Likewise.
20658         (call_insn_operand): Likewise.
20659         (sibcall_insn_operand): Likewise.
20660         (GOT32_symbol_operand): Likewise.
20661         * config/i386/i386.md (indirect_jump): Call convert_memory_address
20662         for -mindirect-branch-register.
20663         (tablejump): Likewise.
20664         (*sibcall_memory): Likewise.
20665         (*sibcall_value_memory): Likewise.
20666         Disallow peepholes of indirect call and jump via memory for
20667         -mindirect-branch-register.
20668         (*call_pop): Replace m with Bw.
20669         (*call_value_pop): Likewise.
20670         (*sibcall_pop_memory): Replace m with Bs.
20671         * config/i386/i386.opt (mindirect-branch-register): New option.
20672         * doc/invoke.texi: Document -mindirect-branch-register option.
20674 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20676         * config/i386/i386-protos.h (ix86_output_function_return): New.
20677         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20678         set function_return_type.
20679         (indirect_thunk_name): Add ret_p to indicate thunk for function
20680         return.
20681         (output_indirect_thunk_function): Pass false to
20682         indirect_thunk_name.
20683         (ix86_output_indirect_branch_via_reg): Likewise.
20684         (ix86_output_indirect_branch_via_push): Likewise.
20685         (output_indirect_thunk_function): Create alias for function
20686         return thunk if regno < 0.
20687         (ix86_output_function_return): New function.
20688         (ix86_handle_fndecl_attribute): Handle function_return.
20689         (ix86_attribute_table): Add function_return.
20690         * config/i386/i386.h (machine_function): Add
20691         function_return_type.
20692         * config/i386/i386.md (simple_return_internal): Use
20693         ix86_output_function_return.
20694         (simple_return_internal_long): Likewise.
20695         * config/i386/i386.opt (mfunction-return=): New option.
20696         (indirect_branch): Mention -mfunction-return=.
20697         * doc/extend.texi: Document function_return function attribute.
20698         * doc/invoke.texi: Document -mfunction-return= option.
20700 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20702         * config/i386/i386-opts.h (indirect_branch): New.
20703         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20704         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20705         with local indirect jump when converting indirect call and jump.
20706         (ix86_set_indirect_branch_type): New.
20707         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20708         (indirectlabelno): New.
20709         (indirect_thunk_needed): Likewise.
20710         (indirect_thunk_bnd_needed): Likewise.
20711         (indirect_thunks_used): Likewise.
20712         (indirect_thunks_bnd_used): Likewise.
20713         (INDIRECT_LABEL): Likewise.
20714         (indirect_thunk_name): Likewise.
20715         (output_indirect_thunk): Likewise.
20716         (output_indirect_thunk_function): Likewise.
20717         (ix86_output_indirect_branch_via_reg): Likewise.
20718         (ix86_output_indirect_branch_via_push): Likewise.
20719         (ix86_output_indirect_branch): Likewise.
20720         (ix86_output_indirect_jmp): Likewise.
20721         (ix86_code_end): Call output_indirect_thunk_function if needed.
20722         (ix86_output_call_insn): Call ix86_output_indirect_branch if
20723         needed.
20724         (ix86_handle_fndecl_attribute): Handle indirect_branch.
20725         (ix86_attribute_table): Add indirect_branch.
20726         * config/i386/i386.h (machine_function): Add indirect_branch_type
20727         and has_local_indirect_jump.
20728         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20729         to true.
20730         (tablejump): Likewise.
20731         (*indirect_jump): Use ix86_output_indirect_jmp.
20732         (*tablejump_1): Likewise.
20733         (simple_return_indirect_internal): Likewise.
20734         * config/i386/i386.opt (mindirect-branch=): New option.
20735         (indirect_branch): New.
20736         (keep): Likewise.
20737         (thunk): Likewise.
20738         (thunk-inline): Likewise.
20739         (thunk-extern): Likewise.
20740         * doc/extend.texi: Document indirect_branch function attribute.
20741         * doc/invoke.texi: Document -mindirect-branch= option.
20743 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
20745         PR ipa/83051
20746         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20748 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
20750         * ipa-inline.c (want_inline_small_function_p): Return false if
20751         inlining has already failed with CIF_FINAL_ERROR.
20752         (update_caller_keys): Call want_inline_small_function_p before
20753         can_inline_edge_p.
20754         (update_callee_keys): Likewise.
20756 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20758         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20759         New function.
20760         (rs6000_quadword_masked_address_p): Likewise.
20761         (quad_aligned_load_p): Likewise.
20762         (quad_aligned_store_p): Likewise.
20763         (const_load_sequence_p): Add comment to describe the outer-most loop.
20764         (mimic_memory_attributes_and_flags): New function.
20765         (rs6000_gen_stvx): Likewise.
20766         (replace_swapped_aligned_store): Likewise.
20767         (rs6000_gen_lvx): Likewise.
20768         (replace_swapped_aligned_load): Likewise.
20769         (replace_swapped_load_constant): Capitalize argument name in
20770         comment describing this function.
20771         (rs6000_analyze_swaps): Add a third pass to search for vector loads
20772         and stores that access quad-word aligned addresses and replace
20773         with stvx or lvx instructions when appropriate.
20774         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20775         New function prototype.
20776         (rs6000_quadword_masked_address_p): Likewise.
20777         (rs6000_gen_lvx): Likewise.
20778         (rs6000_gen_stvx): Likewise.
20779         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20780         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20781         when memory address is aligned.
20782         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20783         this split to select lvx instruction when memory address is aligned.
20784         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20785         instruction when memory address is aligned.
20786         (*vsx_le_perm_load_v16qi): Likewise.
20787         (four unnamed splitters): Modify to select the stvx instruction
20788         when memory is aligned.
20790 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
20792         * predict.c (determine_unlikely_bbs): Handle correctly BBs
20793         which appears in the queue multiple times.
20795 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20796             Alan Hayward  <alan.hayward@arm.com>
20797             David Sherwood  <david.sherwood@arm.com>
20799         * tree-vectorizer.h (vec_lower_bound): New structure.
20800         (_loop_vec_info): Add check_nonzero and lower_bounds.
20801         (LOOP_VINFO_CHECK_NONZERO): New macro.
20802         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20803         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20804         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20805         fields.  Make seg_len the distance travelled, not including the
20806         access size.
20807         (dr_direction_indicator): Declare.
20808         (dr_zero_step_indicator): Likewise.
20809         (dr_known_forward_stride_p): Likewise.
20810         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20811         tree-ssanames.h.
20812         (runtime_alias_check_p): Allow runtime alias checks with
20813         variable strides.
20814         (operator ==): Compare access_size and align.
20815         (prune_runtime_alias_test_list): Rework for new distinction between
20816         the access_size and seg_len.
20817         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
20818         segment lengths.
20819         (get_segment_min_max): New function.
20820         (create_intersect_range_checks): Use it.
20821         (dr_step_indicator): New function.
20822         (dr_direction_indicator): Likewise.
20823         (dr_zero_step_indicator): Likewise.
20824         (dr_known_forward_stride_p): Likewise.
20825         * tree-loop-distribution.c (data_ref_segment_size): Return
20826         DR_STEP * (niters - 1).
20827         (compute_alias_check_pairs): Update call to the dr_with_seg_len
20828         constructor.
20829         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20830         (vect_preserves_scalar_order_p): New function, split out from...
20831         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
20832         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20833         (vect_vfa_access_size): New function.
20834         (vect_vfa_align): Likewise.
20835         (vect_compile_time_alias): Take access_size_a and access_b arguments.
20836         (dump_lower_bound): New function.
20837         (vect_check_lower_bound): Likewise.
20838         (vect_small_gap_p): Likewise.
20839         (vectorizable_with_step_bound_p): Likewise.
20840         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20841         depencies if the vectorization factor is 1.  Convert the checks
20842         for nonzero steps into checks on the bounds of DR_STEP.  Try using
20843         a bunds check for variable steps if the minimum required step is
20844         relatively small. Update calls to the dr_with_seg_len
20845         constructor and to vect_compile_time_alias.
20846         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20847         function.
20848         (vect_loop_versioning): Call it.
20849         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20850         when retrying.
20851         (vect_estimate_min_profitable_iters): Account for any bounds checks.
20853 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20854             Alan Hayward  <alan.hayward@arm.com>
20855             David Sherwood  <david.sherwood@arm.com>
20857         * doc/sourcebuild.texi (vect_scatter_store): Document.
20858         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20859         optabs.
20860         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20861         Document.
20862         * genopinit.c (main): Add supports_vec_scatter_store and
20863         supports_vec_scatter_store_cached to target_optabs.
20864         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20865         IFN_MASK_SCATTER_STORE.
20866         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20867         functions.
20868         * internal-fn.h (internal_store_fn_p): Declare.
20869         (internal_fn_stored_value_index): Likewise.
20870         * internal-fn.c (scatter_store_direct): New macro.
20871         (expand_scatter_store_optab_fn): New function.
20872         (direct_scatter_store_optab_supported_p): New macro.
20873         (internal_store_fn_p): New function.
20874         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
20875         IFN_MASK_SCATTER_STORE.
20876         (internal_fn_mask_index): Likewise.
20877         (internal_fn_stored_value_index): New function.
20878         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
20879         for scatter stores.
20880         * optabs-query.h (supports_vec_scatter_store_p): Declare.
20881         * optabs-query.c (supports_vec_scatter_store_p): New function.
20882         * tree-vectorizer.h (vect_get_store_rhs): Declare.
20883         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
20884         true for scatter stores.
20885         (vect_gather_scatter_fn_p): Handle scatter stores too.
20886         (vect_check_gather_scatter): Consider using scatter stores if
20887         supports_vec_scatter_store_p.
20888         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
20889         scatter stores too.
20890         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20891         internal_fn_stored_value_index.
20892         (check_load_store_masking): Handle scatter stores too.
20893         (vect_get_store_rhs): Make public.
20894         (vectorizable_call): Use internal_store_fn_p.
20895         (vectorizable_store): Handle scatter store internal functions.
20896         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
20897         when deciding whether the end of the group has been reached.
20898         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
20899         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
20900         (mask_scatter_store<mode>): New insns.
20902 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20903             Alan Hayward  <alan.hayward@arm.com>
20904             David Sherwood  <david.sherwood@arm.com>
20906         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
20907         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
20908         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
20909         function.
20910         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
20911         Use vect_truncate_gather_scatter_offset if we can't treat the
20912         operation as a normal gather load or scatter store.
20913         (get_group_load_store_type): Take the gather_scatter_info
20914         as argument.  Try using a gather load or scatter store for
20915         single-element groups.
20916         (get_load_store_type): Update calls to get_group_load_store_type
20917         and vect_use_strided_gather_scatters_p.
20919 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20920             Alan Hayward  <alan.hayward@arm.com>
20921             David Sherwood  <david.sherwood@arm.com>
20923         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
20924         optional tree argument.
20925         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
20926         null target hooks.
20927         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
20928         but continue to use the current value as a fallback.
20929         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
20930         to compare the updates.
20931         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
20932         (get_load_store_type): Use it when handling a strided access.
20933         (vect_get_strided_load_store_ops): New function.
20934         (vect_get_data_ptr_increment): Likewise.
20935         (vectorizable_load): Handle strided gather loads.  Always pass
20936         a step to vect_create_data_ref_ptr and bump_vector_ptr.
20938 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20939             Alan Hayward  <alan.hayward@arm.com>
20940             David Sherwood  <david.sherwood@arm.com>
20942         * doc/md.texi (gather_load@var{m}): Document.
20943         (mask_gather_load@var{m}): Likewise.
20944         * genopinit.c (main): Add supports_vec_gather_load and
20945         supports_vec_gather_load_cached to target_optabs.
20946         * optabs-tree.c (init_tree_optimization_optabs): Use
20947         ggc_cleared_alloc to allocate target_optabs.
20948         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
20949         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
20950         functions.
20951         * internal-fn.h (internal_load_fn_p): Declare.
20952         (internal_gather_scatter_fn_p): Likewise.
20953         (internal_fn_mask_index): Likewise.
20954         (internal_gather_scatter_fn_supported_p): Likewise.
20955         * internal-fn.c (gather_load_direct): New macro.
20956         (expand_gather_load_optab_fn): New function.
20957         (direct_gather_load_optab_supported_p): New macro.
20958         (direct_internal_fn_optab): New function.
20959         (internal_load_fn_p): Likewise.
20960         (internal_gather_scatter_fn_p): Likewise.
20961         (internal_fn_mask_index): Likewise.
20962         (internal_gather_scatter_fn_supported_p): Likewise.
20963         * optabs-query.c (supports_at_least_one_mode_p): New function.
20964         (supports_vec_gather_load_p): Likewise.
20965         * optabs-query.h (supports_vec_gather_load_p): Declare.
20966         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20967         and memory_type field.
20968         (NUM_PATTERNS): Bump to 15.
20969         * tree-vect-data-refs.c: Include internal-fn.h.
20970         (vect_gather_scatter_fn_p): New function.
20971         (vect_describe_gather_scatter_call): Likewise.
20972         (vect_check_gather_scatter): Try using internal functions for
20973         gather loads.  Recognize existing calls to a gather load function.
20974         (vect_analyze_data_refs): Consider using gather loads if
20975         supports_vec_gather_load_p.
20976         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20977         (vect_get_gather_scatter_offset_type): Likewise.
20978         (vect_convert_mask_for_vectype): Likewise.
20979         (vect_add_conversion_to_patterm): Likewise.
20980         (vect_try_gather_scatter_pattern): Likewise.
20981         (vect_recog_gather_scatter_pattern): New pattern recognizer.
20982         (vect_vect_recog_func_ptrs): Add it.
20983         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20984         internal_fn_mask_index and internal_gather_scatter_fn_p.
20985         (check_load_store_masking): Take the gather_scatter_info as an
20986         argument and handle gather loads.
20987         (vect_get_gather_scatter_ops): New function.
20988         (vectorizable_call): Check internal_load_fn_p.
20989         (vectorizable_load): Likewise.  Handle gather load internal
20990         functions.
20991         (vectorizable_store): Update call to check_load_store_masking.
20992         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20993         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20994         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20995         (aarch64_gather_scale_operand_d): New predicates.
20996         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20997         (mask_gather_load<mode>): New insns.
20999 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21000             Alan Hayward  <alan.hayward@arm.com>
21001             David Sherwood  <david.sherwood@arm.com>
21003         * optabs.def (fold_left_plus_optab): New optab.
21004         * doc/md.texi (fold_left_plus_@var{m}): Document.
21005         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21006         * internal-fn.c (fold_left_direct): Define.
21007         (expand_fold_left_optab_fn): Likewise.
21008         (direct_fold_left_optab_supported_p): Likewise.
21009         * fold-const-call.c (fold_const_fold_left): New function.
21010         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21011         * tree-parloops.c (valid_reduction_p): New function.
21012         (gather_scalar_reductions): Use it.
21013         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21014         (vect_finish_replace_stmt): Declare.
21015         * tree-vect-loop.c (fold_left_reduction_fn): New function.
21016         (needs_fold_left_reduction_p): New function, split out from...
21017         (vect_is_simple_reduction): ...here.  Accept reductions that
21018         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21019         (vect_force_simple_reduction): Also store the reduction type in
21020         the assignment's STMT_VINFO_REDUC_TYPE.
21021         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21022         (merge_with_identity): New function.
21023         (vect_expand_fold_left): Likewise.
21024         (vectorize_fold_left_reduction): Likewise.
21025         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
21026         scalar phi in place for it.  Check for target support and reject
21027         cases that would reassociate the operation.  Defer the transform
21028         phase to vectorize_fold_left_reduction.
21029         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21030         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21031         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21033 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21035         * tree-if-conv.c (predicate_mem_writes): Remove redundant
21036         call to ifc_temp_var.
21038 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21039             Alan Hayward  <alan.hayward@arm.com>
21040             David Sherwood  <david.sherwood@arm.com>
21042         * target.def (legitimize_address_displacement): Take the original
21043         offset as a poly_int.
21044         * targhooks.h (default_legitimize_address_displacement): Update
21045         accordingly.
21046         * targhooks.c (default_legitimize_address_displacement): Likewise.
21047         * doc/tm.texi: Regenerate.
21048         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21049         as an argument, moving assert of ad->disp == ad->disp_term to...
21050         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
21051         Try calling targetm.legitimize_address_displacement before expanding
21052         the address rather than afterwards, and adjust for the new interface.
21053         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21054         Match the new hook interface.  Handle SVE addresses.
21055         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21056         new hook interface.
21058 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21060         * Makefile.in (OBJS): Add early-remat.o.
21061         * target.def (select_early_remat_modes): New hook.
21062         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21063         * doc/tm.texi: Regenerate.
21064         * targhooks.h (default_select_early_remat_modes): Declare.
21065         * targhooks.c (default_select_early_remat_modes): New function.
21066         * timevar.def (TV_EARLY_REMAT): New timevar.
21067         * passes.def (pass_early_remat): New pass.
21068         * tree-pass.h (make_pass_early_remat): Declare.
21069         * early-remat.c: New file.
21070         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21071         function.
21072         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21074 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21075             Alan Hayward  <alan.hayward@arm.com>
21076             David Sherwood  <david.sherwood@arm.com>
21078         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21079         vfm1 with a bound_epilog parameter.
21080         (vect_do_peeling): Update calls accordingly, and move the prologue
21081         call earlier in the function.  Treat the base bound_epilog as 0 for
21082         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
21083         this base when peeling for gaps.
21084         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21085         with fully-masked loops.
21086         (vect_estimate_min_profitable_iters): Handle the single peeled
21087         iteration in that case.
21089 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21090             Alan Hayward  <alan.hayward@arm.com>
21091             David Sherwood  <david.sherwood@arm.com>
21093         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21094         single-element interleaving even if the size is not a power of 2.
21095         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21096         accesses for single-element interleaving if the group size is
21097         not a power of 2.
21099 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21100             Alan Hayward  <alan.hayward@arm.com>
21101             David Sherwood  <david.sherwood@arm.com>
21103         * doc/md.texi (fold_extract_last_@var{m}): Document.
21104         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21105         * optabs.def (fold_extract_last_optab): New optab.
21106         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21107         * internal-fn.c (fold_extract_direct): New macro.
21108         (expand_fold_extract_optab_fn): Likewise.
21109         (direct_fold_extract_optab_supported_p): Likewise.
21110         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21111         * tree-vect-loop.c (vect_model_reduction_cost): Handle
21112         EXTRACT_LAST_REDUCTION.
21113         (get_initial_def_for_reduction): Do not create an initial vector
21114         for EXTRACT_LAST_REDUCTION reductions.
21115         (vectorizable_reduction): Leave the scalar phi in place for
21116         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
21117         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
21118         epilogue code for EXTRACT_LAST_REDUCTION and defer the
21119         transform phase to vectorizable_condition.
21120         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21121         split out from...
21122         (vect_finish_stmt_generation): ...here.
21123         (vect_finish_replace_stmt): New function.
21124         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21125         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21126         pattern.
21127         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21129 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21130             Alan Hayward  <alan.hayward@arm.com>
21131             David Sherwood  <david.sherwood@arm.com>
21133         * doc/md.texi (extract_last_@var{m}): Document.
21134         * optabs.def (extract_last_optab): New optab.
21135         * internal-fn.def (EXTRACT_LAST): New internal function.
21136         * internal-fn.c (cond_unary_direct): New macro.
21137         (expand_cond_unary_optab_fn): Likewise.
21138         (direct_cond_unary_optab_supported_p): Likewise.
21139         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21140         loops using EXTRACT_LAST.
21141         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21142         (extract_last_<mode>): ...this optab.
21143         (vec_extract<mode><Vel>): Update accordingly.
21145 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21146             Alan Hayward  <alan.hayward@arm.com>
21147             David Sherwood  <david.sherwood@arm.com>
21149         * target.def (empty_mask_is_expensive): New hook.
21150         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21151         * doc/tm.texi: Regenerate.
21152         * targhooks.h (default_empty_mask_is_expensive): Declare.
21153         * targhooks.c (default_empty_mask_is_expensive): New function.
21154         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21155         if the target says that empty masks are expensive.
21156         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21157         New function.
21158         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21160 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21161             Alan Hayward  <alan.hayward@arm.com>
21162             David Sherwood  <david.sherwood@arm.com>
21164         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21165         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21166         (vect_use_loop_mask_for_alignment_p): New function.
21167         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21168         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21169         niters_skip argument.  Make sure that the first niters_skip elements
21170         of the first iteration are inactive.
21171         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21172         Update call to vect_set_loop_masks_directly.
21173         (get_misalign_in_elems): New function, split out from...
21174         (vect_gen_prolog_loop_niters): ...here.
21175         (vect_update_init_of_dr): Take a code argument that specifies whether
21176         the adjustment should be added or subtracted.
21177         (vect_update_init_of_drs): Likewise.
21178         (vect_prepare_for_masked_peels): New function.
21179         (vect_do_peeling): Skip prologue peeling if we're using a mask
21180         instead.  Update call to vect_update_inits_of_drs.
21181         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21182         mask_skip_niters.
21183         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21184         alignment.  Do not include the number of peeled iterations in
21185         the minimum threshold in that case.
21186         (vectorizable_induction): Adjust the start value down by
21187         LOOP_VINFO_MASK_SKIP_NITERS iterations.
21188         (vect_transform_loop): Call vect_prepare_for_masked_peels.
21189         Take the number of skipped iterations into account when calculating
21190         the loop bounds.
21191         * tree-vect-stmts.c (vect_gen_while_not): New function.
21193 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21194             Alan Hayward  <alan.hayward@arm.com>
21195             David Sherwood  <david.sherwood@arm.com>
21197         * doc/sourcebuild.texi (vect_fully_masked): Document.
21198         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21199         default value to 0.
21200         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21201         split out from...
21202         (vect_analyze_loop_2): ...here. Don't check the vectorization
21203         factor against the number of loop iterations if the loop is
21204         fully-masked.
21206 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21207             Alan Hayward  <alan.hayward@arm.com>
21208             David Sherwood  <david.sherwood@arm.com>
21210         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21211         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21212         (dump_groups): Update accordingly.
21213         (iv_use::mem_type): New member variable.
21214         (address_p): New function.
21215         (record_use): Add a mem_type argument and initialize the new
21216         mem_type field.
21217         (record_group_use): Add a mem_type argument.  Use address_p.
21218         Remove obsolete null checks of base_object.  Update call to record_use.
21219         (find_interesting_uses_op): Update call to record_group_use.
21220         (find_interesting_uses_cond): Likewise.
21221         (find_interesting_uses_address): Likewise.
21222         (get_mem_type_for_internal_fn): New function.
21223         (find_address_like_use): Likewise.
21224         (find_interesting_uses_stmt): Try find_address_like_use before
21225         calling find_interesting_uses_op.
21226         (addr_offset_valid_p): Use the iv mem_type field as the type
21227         of the addressed memory.
21228         (add_autoinc_candidates): Likewise.
21229         (get_address_cost): Likewise.
21230         (split_small_address_groups_p): Use address_p.
21231         (split_address_groups): Likewise.
21232         (add_iv_candidate_for_use): Likewise.
21233         (autoinc_possible_for_pair): Likewise.
21234         (rewrite_groups): Likewise.
21235         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21236         (determine_group_iv_cost): Update after split of USE_ADDRESS.
21237         (get_alias_ptr_type_for_ptr_address): New function.
21238         (rewrite_use_address): Rewrite address uses in calls that were
21239         identified by find_address_like_use.
21241 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21242             Alan Hayward  <alan.hayward@arm.com>
21243             David Sherwood  <david.sherwood@arm.com>
21245         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21246         TARGET_MEM_REFs.
21247         * gimple-expr.h (is_gimple_addressable: Likewise.
21248         * gimple-expr.c (is_gimple_address): Likewise.
21249         * internal-fn.c (expand_call_mem_ref): New function.
21250         (expand_mask_load_optab_fn): Use it.
21251         (expand_mask_store_optab_fn): Likewise.
21253 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21254             Alan Hayward  <alan.hayward@arm.com>
21255             David Sherwood  <david.sherwood@arm.com>
21257         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21258         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21259         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21260         (cond_umax@var{mode}): Document.
21261         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21262         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21263         (cond_umin_optab, cond_umax_optab): New optabs.
21264         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21265         (COND_IOR, COND_XOR): New internal functions.
21266         * internal-fn.h (get_conditional_internal_fn): Declare.
21267         * internal-fn.c (cond_binary_direct): New macro.
21268         (expand_cond_binary_optab_fn): Likewise.
21269         (direct_cond_binary_optab_supported_p): Likewise.
21270         (get_conditional_internal_fn): New function.
21271         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21272         Cope with reduction statements that are vectorized as calls rather
21273         than assignments.
21274         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21275         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21276         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21277         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21278         (UNSPEC_COND_EOR): New unspecs.
21279         (optab): Add mappings for them.
21280         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21281         (sve_int_op, sve_fp_op): New int attributes.
21283 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21284             Alan Hayward  <alan.hayward@arm.com>
21285             David Sherwood  <david.sherwood@arm.com>
21287         * optabs.def (while_ult_optab): New optab.
21288         * doc/md.texi (while_ult@var{m}@var{n}): Document.
21289         * internal-fn.def (WHILE_ULT): New internal function.
21290         * internal-fn.h (direct_internal_fn_supported_p): New override
21291         that takes two types as argument.
21292         * internal-fn.c (while_direct): New macro.
21293         (expand_while_optab_fn): New function.
21294         (convert_optab_supported_p): Likewise.
21295         (direct_while_optab_supported_p): New macro.
21296         * wide-int.h (wi::udiv_ceil): New function.
21297         * tree-vectorizer.h (rgroup_masks): New structure.
21298         (vec_loop_masks): New typedef.
21299         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21300         and fully_masked_p.
21301         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21302         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21303         (vect_max_vf): New function.
21304         (slpeel_make_loop_iterate_ntimes): Delete.
21305         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21306         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21307         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21308         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21309         internal-fn.h, stor-layout.h and optabs-query.h.
21310         (vect_set_loop_mask): New function.
21311         (add_preheader_seq): Likewise.
21312         (add_header_seq): Likewise.
21313         (interleave_supported_p): Likewise.
21314         (vect_maybe_permute_loop_masks): Likewise.
21315         (vect_set_loop_masks_directly): Likewise.
21316         (vect_set_loop_condition_masked): Likewise.
21317         (vect_set_loop_condition_unmasked): New function, split out from
21318         slpeel_make_loop_iterate_ntimes.
21319         (slpeel_make_loop_iterate_ntimes): Rename to..
21320         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
21321         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21322         (vect_do_peeling): Update call accordingly.
21323         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21324         loops.
21325         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21326         mask_compare_type, can_fully_mask_p and fully_masked_p.
21327         (release_vec_loop_masks): New function.
21328         (_loop_vec_info): Use it to free the loop masks.
21329         (can_produce_all_loop_masks_p): New function.
21330         (vect_get_max_nscalars_per_iter): Likewise.
21331         (vect_verify_full_masking): Likewise.
21332         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21333         retries, and free the mask rgroups before retrying.  Check loop-wide
21334         reasons for disallowing fully-masked loops.  Make the final decision
21335         about whether use a fully-masked loop or not.
21336         (vect_estimate_min_profitable_iters): Do not assume that peeling
21337         for the number of iterations will be needed for fully-masked loops.
21338         (vectorizable_reduction): Disable fully-masked loops.
21339         (vectorizable_live_operation): Likewise.
21340         (vect_halve_mask_nunits): New function.
21341         (vect_double_mask_nunits): Likewise.
21342         (vect_record_loop_mask): Likewise.
21343         (vect_get_loop_mask): Likewise.
21344         (vect_transform_loop): Handle the case in which the final loop
21345         iteration might handle a partial vector.  Call vect_set_loop_condition
21346         instead of slpeel_make_loop_iterate_ntimes.
21347         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21348         (check_load_store_masking): New function.
21349         (prepare_load_store_mask): Likewise.
21350         (vectorizable_store): Handle fully-masked loops.
21351         (vectorizable_load): Likewise.
21352         (supportable_widening_operation): Use vect_halve_mask_nunits for
21353         booleans.
21354         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21355         (vect_gen_while): New function.
21356         * config/aarch64/aarch64.md (umax<mode>3): New expander.
21357         (aarch64_uqdec<mode>): New insn.
21359 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21360             Alan Hayward  <alan.hayward@arm.com>
21361             David Sherwood  <david.sherwood@arm.com>
21363         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21364         (reduc_xor_scal_optab): New optabs.
21365         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21366         (reduc_xor_scal_@var{m}): Document.
21367         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21368         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21369         internal functions.
21370         * fold-const-call.c (fold_const_call): Handle them.
21371         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21372         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21373         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21374         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21375         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21376         (UNSPEC_XORV): New unspecs.
21377         (optab): Add entries for them.
21378         (BITWISEV): New int iterator.
21379         (bit_reduc_op): New int attributes.
21381 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21382             Alan Hayward  <alan.hayward@arm.com>
21383             David Sherwood  <david.sherwood@arm.com>
21385         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21386         * internal-fn.def (VEC_SHL_INSERT): New internal function.
21387         * optabs.def (vec_shl_insert_optab): New optab.
21388         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21389         (duplicate_and_interleave): Likewise.
21390         * tree-vect-loop.c: Include internal-fn.h.
21391         (neutral_op_for_slp_reduction): New function, split out from
21392         get_initial_defs_for_reduction.
21393         (get_initial_def_for_reduction): Handle option 2 for variable-length
21394         vectors by loading the neutral value into a vector and then shifting
21395         the initial value into element 0.
21396         (get_initial_defs_for_reduction): Replace the code argument with
21397         the neutral value calculated by neutral_op_for_slp_reduction.
21398         Use gimple_build_vector for constant-length vectors.
21399         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21400         but the first group_size elements have a neutral value.
21401         Use duplicate_and_interleave otherwise.
21402         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21403         Update call to get_initial_defs_for_reduction.  Handle SLP
21404         reductions for variable-length vectors by creating one vector
21405         result for each scalar result, with the elements associated
21406         with other scalar results stubbed out with the neutral value.
21407         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21408         Require IFN_VEC_SHL_INSERT for double reductions on
21409         variable-length vectors, or SLP reductions that have
21410         a neutral value.  Require can_duplicate_and_interleave_p
21411         support for variable-length unchained SLP reductions if there
21412         is no neutral value, such as for MIN/MAX reductions.  Also require
21413         the number of vector elements to be a multiple of the number of
21414         SLP statements when doing variable-length unchained SLP reductions.
21415         Update call to vect_create_epilog_for_reduction.
21416         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21417         and remove initial values.
21418         (duplicate_and_interleave): Make public.
21419         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21420         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21422 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21423             Alan Hayward  <alan.hayward@arm.com>
21424             David Sherwood  <david.sherwood@arm.com>
21426         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21427         (can_duplicate_and_interleave_p): New function.
21428         (vect_get_and_check_slp_defs): Take the vector of statements
21429         rather than just the current one.  Remove excess parentheses.
21430         Restriction rejectinon of vect_constant_def and vect_external_def
21431         for variable-length vectors to boolean types, or types for which
21432         can_duplicate_and_interleave_p is false.
21433         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21434         (duplicate_and_interleave): New function.
21435         (vect_get_constant_vectors): Use gimple_build_vector for
21436         constant-length vectors and suitable variable-length constant
21437         vectors.  Use duplicate_and_interleave for other variable-length
21438         vectors.  Don't defer the update when inserting new statements.
21440 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21441             Alan Hayward  <alan.hayward@arm.com>
21442             David Sherwood  <david.sherwood@arm.com>
21444         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21445         min_profitable_iters doesn't go negative.
21447 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21448             Alan Hayward  <alan.hayward@arm.com>
21449             David Sherwood  <david.sherwood@arm.com>
21451         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21452         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21453         * optabs.def (vec_mask_load_lanes_optab): New optab.
21454         (vec_mask_store_lanes_optab): Likewise.
21455         * internal-fn.def (MASK_LOAD_LANES): New internal function.
21456         (MASK_STORE_LANES): Likewise.
21457         * internal-fn.c (mask_load_lanes_direct): New macro.
21458         (mask_store_lanes_direct): Likewise.
21459         (expand_mask_load_optab_fn): Handle masked operations.
21460         (expand_mask_load_lanes_optab_fn): New macro.
21461         (expand_mask_store_optab_fn): Handle masked operations.
21462         (expand_mask_store_lanes_optab_fn): New macro.
21463         (direct_mask_load_lanes_optab_supported_p): Likewise.
21464         (direct_mask_store_lanes_optab_supported_p): Likewise.
21465         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21466         parameter.
21467         (vect_load_lanes_supported): Likewise.
21468         * tree-vect-data-refs.c (strip_conversion): New function.
21469         (can_group_stmts_p): Likewise.
21470         (vect_analyze_data_ref_accesses): Use it instead of checking
21471         for a pair of assignments.
21472         (vect_store_lanes_supported): Take a masked_p parameter.
21473         (vect_load_lanes_supported): Likewise.
21474         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21475         vect_store_lanes_supported and vect_load_lanes_supported.
21476         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21477         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21478         parameter.  Don't allow gaps for masked accesses.
21479         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
21480         and vect_load_lanes_supported.
21481         (get_load_store_type): Take a masked_p parameter and update
21482         call to get_group_load_store_type.
21483         (vectorizable_store): Update call to get_load_store_type.
21484         Handle IFN_MASK_STORE_LANES.
21485         (vectorizable_load): Update call to get_load_store_type.
21486         Handle IFN_MASK_LOAD_LANES.
21488 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21489             Alan Hayward  <alan.hayward@arm.com>
21490             David Sherwood  <david.sherwood@arm.com>
21492         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21493         modes for SVE.
21494         * config/aarch64/aarch64-protos.h
21495         (aarch64_sve_struct_memory_operand_p): Declare.
21496         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21497         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21498         (VPRED, vpred): Handle SVE structure modes.
21499         * config/aarch64/constraints.md (Utx): New constraint.
21500         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21501         (aarch64_sve_struct_nonimmediate_operand): New predicates.
21502         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21503         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21504         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21505         structure modes.  Split into pieces after RA.
21506         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21507         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21508         New patterns.
21509         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21510         SVE structure modes.
21511         (aarch64_classify_address): Likewise.
21512         (sizetochar): Move earlier in file.
21513         (aarch64_print_operand): Handle SVE register lists.
21514         (aarch64_array_mode): New function.
21515         (aarch64_sve_struct_memory_operand_p): Likewise.
21516         (TARGET_ARRAY_MODE): Redefine.
21518 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21519             Alan Hayward  <alan.hayward@arm.com>
21520             David Sherwood  <david.sherwood@arm.com>
21522         * target.def (array_mode): New target hook.
21523         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21524         * doc/tm.texi: Regenerate.
21525         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21526         * hooks.c (hook_optmode_mode_uhwi_none): New function.
21527         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21528         targetm.array_mode.
21529         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
21530         type sizes.
21532 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21533             Alan Hayward  <alan.hayward@arm.com>
21534             David Sherwood  <david.sherwood@arm.com>
21536         * fold-const.c (fold_binary_loc): Check the argument types
21537         rather than the result type when testing for a vector operation.
21539 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21541         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21542         * doc/tm.texi: Regenerate.
21544 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21545             Alan Hayward  <alan.hayward@arm.com>
21546             David Sherwood  <david.sherwood@arm.com>
21548         * doc/invoke.texi (-msve-vector-bits=): Document new option.
21549         (sve): Document new AArch64 extension.
21550         * doc/md.texi (w): Extend the description of the AArch64
21551         constraint to include SVE vectors.
21552         (Upl, Upa): Document new AArch64 predicate constraints.
21553         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21554         enum.
21555         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21556         (msve-vector-bits=): New option.
21557         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21558         SVE when these are disabled.
21559         (sve): New extension.
21560         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21561         modes.  Adjust their number of units based on aarch64_sve_vg.
21562         (MAX_BITSIZE_MODE_ANY_MODE): Define.
21563         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21564         aarch64_addr_query_type.
21565         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21566         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21567         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21568         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21569         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21570         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21571         (aarch64_simd_imm_zero_p): Delete.
21572         (aarch64_check_zero_based_sve_index_immediate): Declare.
21573         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21574         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21575         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21576         (aarch64_sve_float_mul_immediate_p): Likewise.
21577         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21578         rather than an rtx.
21579         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21580         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21581         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21582         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21583         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21584         (aarch64_regmode_natural_size): Likewise.
21585         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21586         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21587         left one place.
21588         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21589         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21590         for VG and the SVE predicate registers.
21591         (V_ALIASES): Add a "z"-prefixed alias.
21592         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21593         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21594         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21595         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21596         (REG_CLASS_NAMES): Add entries for them.
21597         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
21598         and the predicate registers.
21599         (aarch64_sve_vg): Declare.
21600         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21601         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21602         (REGMODE_NATURAL_SIZE): Define.
21603         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21604         SVE macros.
21605         * config/aarch64/aarch64.c: Include cfgrtl.h.
21606         (simd_immediate_info): Add a constructor for series vectors,
21607         and an associated step field.
21608         (aarch64_sve_vg): New variable.
21609         (aarch64_dbx_register_number): Handle VG and the predicate registers.
21610         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21611         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21612         (VEC_ANY_DATA, VEC_STRUCT): New constants.
21613         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21614         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21615         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21616         (aarch64_get_mask_mode): New functions.
21617         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21618         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21619         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
21620         predicate modes and predicate registers.  Explicitly restrict
21621         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
21622         to store a vector mode if it is recognized by
21623         aarch64_classify_vector_mode.
21624         (aarch64_regmode_natural_size): New function.
21625         (aarch64_hard_regno_caller_save_mode): Return the original mode
21626         for predicates.
21627         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21628         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21629         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21630         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21631         functions.
21632         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
21633         does not overlap dest if the function is frame-related.  Handle
21634         SVE constants.
21635         (aarch64_split_add_offset): New function.
21636         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21637         them aarch64_add_offset.
21638         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21639         and update call to aarch64_sub_sp.
21640         (aarch64_add_cfa_expression): New function.
21641         (aarch64_expand_prologue): Pass extra temporary registers to the
21642         functions above.  Handle the case in which we need to emit new
21643         DW_CFA_expressions for registers that were originally saved
21644         relative to the stack pointer, but now have to be expressed
21645         relative to the frame pointer.
21646         (aarch64_output_mi_thunk): Pass extra temporary registers to the
21647         functions above.
21648         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
21649         IP0 and IP1 values for SVE frames.
21650         (aarch64_expand_vec_series): New function.
21651         (aarch64_expand_sve_widened_duplicate): Likewise.
21652         (aarch64_expand_sve_const_vector): Likewise.
21653         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21654         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
21655         into the register, rather than emitting a SET directly.
21656         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21657         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21658         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21659         (offset_9bit_signed_scaled_p): New functions.
21660         (aarch64_replicate_bitmask_imm): New function.
21661         (aarch64_bitmask_imm): Use it.
21662         (aarch64_cannot_force_const_mem): Reject expressions involving
21663         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
21664         (aarch64_classify_index): Handle SVE indices, by requiring
21665         a plain register index with a scale that matches the element size.
21666         (aarch64_classify_address): Handle SVE addresses.  Assert that
21667         the mode of the address is VOIDmode or an integer mode.
21668         Update call to aarch64_classify_symbol.
21669         (aarch64_classify_symbolic_expression): Update call to
21670         aarch64_classify_symbol.
21671         (aarch64_const_vec_all_in_range_p): New function.
21672         (aarch64_print_vector_float_operand): Likewise.
21673         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
21674         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
21675         and the FP immediates 1.0 and 0.5.
21676         (aarch64_print_address_internal): Handle SVE addresses.
21677         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21678         (aarch64_regno_regclass): Handle predicate registers.
21679         (aarch64_secondary_reload): Handle big-endian reloads of SVE
21680         data modes.
21681         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21682         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21683         (aarch64_convert_sve_vector_bits): New function.
21684         (aarch64_override_options): Use it to handle -msve-vector-bits=.
21685         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21686         rather than an rtx.
21687         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21688         Handle SVE vector and predicate modes.  Accept VL-based constants
21689         that need only one temporary register, and VL offsets that require
21690         no temporary registers.
21691         (aarch64_conditional_register_usage): Mark the predicate registers
21692         as fixed if SVE isn't available.
21693         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21694         Return true for SVE vector and predicate modes.
21695         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21696         rather than an unsigned int.  Handle SVE modes.
21697         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
21698         SVE modes.
21699         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21700         if SVE is enabled.
21701         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21702         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21703         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21704         (aarch64_sve_float_mul_immediate_p): New functions.
21705         (aarch64_sve_valid_immediate): New function.
21706         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21707         Explicitly reject structure modes.  Check for INDEX constants.
21708         Handle PTRUE and PFALSE constants.
21709         (aarch64_check_zero_based_sve_index_immediate): New function.
21710         (aarch64_simd_imm_zero_p): Delete.
21711         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21712         vector modes.  Accept constants in the range of CNT[BHWD].
21713         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21714         ask for an Advanced SIMD mode.
21715         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21716         (aarch64_simd_vector_alignment): Handle SVE predicates.
21717         (aarch64_vectorize_preferred_vector_alignment): New function.
21718         (aarch64_simd_vector_alignment_reachable): Use it instead of
21719         the vector size.
21720         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21721         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21722         functions.
21723         (MAX_VECT_LEN): Delete.
21724         (expand_vec_perm_d): Add a vec_flags field.
21725         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21726         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21727         (aarch64_evpc_ext): Don't apply a big-endian lane correction
21728         for SVE modes.
21729         (aarch64_evpc_rev): Rename to...
21730         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
21731         (aarch64_evpc_rev_global): New function.
21732         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21733         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21734         MAX_VECT_LEN.
21735         (aarch64_evpc_sve_tbl): New function.
21736         (aarch64_expand_vec_perm_const_1): Update after rename of
21737         aarch64_evpc_rev.  Handle SVE permutes too, trying
21738         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21739         than aarch64_evpc_tbl.
21740         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21741         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21742         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21743         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21744         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21745         (aarch64_expand_sve_vcond): New functions.
21746         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21747         of aarch64_vector_mode_p.
21748         (aarch64_dwarf_poly_indeterminate_value): New function.
21749         (aarch64_compute_pressure_classes): Likewise.
21750         (aarch64_can_change_mode_class): Likewise.
21751         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21752         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21753         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21754         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21755         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21756         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21757         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21758         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21759         constraints.
21760         (Dn, Dl, Dr): Accept const as well as const_vector.
21761         (Dz): Likewise.  Compare against CONST0_RTX.
21762         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21763         of "vector" where appropriate.
21764         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21765         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21766         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21767         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21768         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21769         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21770         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21771         (v_int_equiv): Extend to SVE modes.
21772         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21773         mode attributes.
21774         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21775         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21776         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21777         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21778         (SVE_COND_FP_CMP): New int iterators.
21779         (perm_hilo): Handle the new unpack unspecs.
21780         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21781         attributes.
21782         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21783         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21784         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21785         (aarch64_equality_operator, aarch64_constant_vector_operand)
21786         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21787         (aarch64_sve_nonimmediate_operand): Likewise.
21788         (aarch64_sve_general_operand): Likewise.
21789         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21790         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21791         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21792         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21793         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21794         (aarch64_sve_float_arith_immediate): Likewise.
21795         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21796         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21797         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21798         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21799         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21800         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21801         (aarch64_sve_float_arith_operand): Likewise.
21802         (aarch64_sve_float_arith_with_sub_operand): Likewise.
21803         (aarch64_sve_float_mul_operand): Likewise.
21804         (aarch64_sve_vec_perm_operand): Likewise.
21805         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21806         (aarch64_mov_operand): Accept const_poly_int and const_vector.
21807         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21808         as well as const_vector.
21809         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21810         in file.  Use CONST0_RTX and CONSTM1_RTX.
21811         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
21812         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21813         Use aarch64_simd_imm_zero.
21814         * config/aarch64/aarch64-sve.md: New file.
21815         * config/aarch64/aarch64.md: Include it.
21816         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21817         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21818         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21819         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21820         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21821         (sve): New attribute.
21822         (enabled): Disable instructions with the sve attribute unless
21823         TARGET_SVE.
21824         (movqi, movhi): Pass CONST_POLY_INT operaneds through
21825         aarch64_expand_mov_immediate.
21826         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21827         CNT[BHSD] immediates.
21828         (movti): Split CONST_POLY_INT moves into two halves.
21829         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21830         Split additions that need a temporary here if the destination
21831         is the stack pointer.
21832         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21833         (*add<mode>3_poly_1): New instruction.
21834         (set_clobber_cc): New expander.
21836 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21838         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21839         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
21840         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21841         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21842         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
21843         Change innermode from fixed_mode_size to machine_mode.
21844         (simplify_subreg): Update call accordingly.  Handle a constant-sized
21845         subreg of a variable-length CONST_VECTOR.
21847 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21848             Alan Hayward  <alan.hayward@arm.com>
21849             David Sherwood  <david.sherwood@arm.com>
21851         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21852         (add_offset_to_base): New function, split out from...
21853         (create_mem_ref): ...here.  When handling a scale other than 1,
21854         check first whether the address is valid without the offset.
21855         Add it into the base if so, leaving the index and scale as-is.
21857 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
21859         PR c++/83778
21860         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21861         fold_for_warn before checking if arg2 is INTEGER_CST.
21863 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
21865         * config/rs6000/predicates.md (load_multiple_operation): Delete.
21866         (store_multiple_operation): Delete.
21867         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21868         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21869         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21870         guarded by TARGET_STRING.
21871         (rs6000_output_load_multiple): Delete.
21872         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21873         OPTION_MASK_STRING / TARGET_STRING handling.
21874         (print_operand) <'N', 'O'>: Add comment that these are unused now.
21875         (const rs6000_opt_masks) <"string">: Change mask to 0.
21876         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
21877         (MASK_STRING): Delete.
21878         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
21879         parts.  Simplify.
21880         (load_multiple): Delete.
21881         (*ldmsi8): Delete.
21882         (*ldmsi7): Delete.
21883         (*ldmsi6): Delete.
21884         (*ldmsi5): Delete.
21885         (*ldmsi4): Delete.
21886         (*ldmsi3): Delete.
21887         (store_multiple): Delete.
21888         (*stmsi8): Delete.
21889         (*stmsi7): Delete.
21890         (*stmsi6): Delete.
21891         (*stmsi5): Delete.
21892         (*stmsi4): Delete.
21893         (*stmsi3): Delete.
21894         (movmemsi_8reg): Delete.
21895         (corresponding unnamed define_insn): Delete.
21896         (movmemsi_6reg): Delete.
21897         (corresponding unnamed define_insn): Delete.
21898         (movmemsi_4reg): Delete.
21899         (corresponding unnamed define_insn): Delete.
21900         (movmemsi_2reg): Delete.
21901         (corresponding unnamed define_insn): Delete.
21902         (movmemsi_1reg): Delete.
21903         (corresponding unnamed define_insn): Delete.
21904         * config/rs6000/rs6000.opt (mno-string): New.
21905         (mstring): Replace by deprecation warning stub.
21906         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
21908 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
21910         * regrename.c (regrename_do_replace): If replacing the same
21911         reg multiple times, try to reuse last created gen_raw_REG.
21913         PR debug/81155
21914         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
21915         main to workaround a bug in GDB.
21917 2018-01-12  Tom de Vries  <tom@codesourcery.com>
21919         PR target/83737
21920         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
21922 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
21924         PR rtl-optimization/80481
21925         * ira-color.c (get_cap_member): New function.
21926         (allocnos_conflict_by_live_ranges_p): Use it.
21927         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
21928         (setup_slot_coalesced_allocno_live_ranges): Ditto.
21930 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
21932         PR target/83628
21933         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
21934         (*saddl_se_1): Ditto.
21935         (*ssubsi_1): Ditto.
21936         (*ssubl_se_1): Ditto.
21938 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21940         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
21941         rather than wi::to_widest for DR_INITs.
21942         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
21943         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
21944         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
21945         INTEGER_CSTs.
21946         (vect_analyze_group_access_1): Note that here.
21948 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21950         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
21951         polynomial type sizes.
21953 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
21955         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
21956         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
21957         (gimple_add_tmp_var): Likewise.
21959 2018-01-12  Martin Liska  <mliska@suse.cz>
21961         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
21962         (gimple_alloc_sizes): Likewise.
21963         (dump_gimple_statistics): Use PRIu64 in printf format.
21964         * gimple.h: Change uint64_t to int.
21966 2018-01-12  Martin Liska  <mliska@suse.cz>
21968         * tree-core.h: Use uint64_t instead of int.
21969         * tree.c (tree_node_counts): Likewise.
21970         (tree_node_sizes): Likewise.
21971         (dump_tree_statistics): Use PRIu64 in printf format.
21973 2018-01-12  Martin Liska  <mliska@suse.cz>
21975         * Makefile.in: As qsort_chk is implemented in vec.c, add
21976         vec.o to linkage of gencfn-macros.
21977         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21978         passing the info to record_node_allocation_statistics.
21979         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21980         and pass the info.
21981         * ggc-common.c (struct ggc_usage): Add operator== and use
21982         it in operator< and compare function.
21983         * mem-stats.h (struct mem_usage): Likewise.
21984         * vec.c (struct vec_usage): Remove operator< and compare
21985         function. Can be simply inherited.
21987 2018-01-12  Martin Jambor  <mjambor@suse.cz>
21989         PR target/81616
21990         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21991         * tree-ssa-math-opts.c: Include domwalk.h.
21992         (convert_mult_to_fma_1): New function.
21993         (fma_transformation_info): New type.
21994         (fma_deferring_state): Likewise.
21995         (cancel_fma_deferring): New function.
21996         (result_of_phi): Likewise.
21997         (last_fma_candidate_feeds_initial_phi): Likewise.
21998         (convert_mult_to_fma): Added deferring logic, split actual
21999         transformation to convert_mult_to_fma_1.
22000         (math_opts_dom_walker): New type.
22001         (math_opts_dom_walker::after_dom_children): New method, body moved
22002         here from pass_optimize_widening_mul::execute, added deferring logic
22003         bits.
22004         (pass_optimize_widening_mul::execute): Moved most of code to
22005         math_opts_dom_walker::after_dom_children.
22006         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22007         * config/i386/i386.c (ix86_option_override_internal): Added
22008         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22010 2018-01-12  Richard Biener  <rguenther@suse.de>
22012         PR debug/83157
22013         * dwarf2out.c (gen_variable_die): Do not reset old_die for
22014         inline instance vars.
22016 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
22018         PR target/81819
22019         * config/rx/rx.c (rx_is_restricted_memory_address):
22020         Handle SUBREG case.
22022 2018-01-12  Richard Biener  <rguenther@suse.de>
22024         PR tree-optimization/80846
22025         * target.def (split_reduction): New target hook.
22026         * targhooks.c (default_split_reduction): New function.
22027         * targhooks.h (default_split_reduction): Declare.
22028         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22029         target requests first reduce vectors by combining low and high
22030         parts.
22031         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22032         (get_vectype_for_scalar_type_and_size): Export.
22033         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22034         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22035         * doc/tm.texi: Regenerate.
22036         * config/i386/i386.c (ix86_split_reduction): Implement
22037         TARGET_VECTORIZE_SPLIT_REDUCTION.
22039 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22041         PR target/83368
22042         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22043         in PIC mode except for TARGET_VXWORKS_RTP.
22044         * config/sparc/sparc.c: Include cfgrtl.h.
22045         (TARGET_INIT_PIC_REG): Define.
22046         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22047         (sparc_pic_register_p): New predicate.
22048         (sparc_legitimate_address_p): Use it.
22049         (sparc_legitimize_pic_address): Likewise.
22050         (sparc_delegitimize_address): Likewise.
22051         (sparc_mode_dependent_address_p): Likewise.
22052         (gen_load_pcrel_sym): Remove 4th parameter.
22053         (load_got_register): Adjust call to above.  Remove obsolete stuff.
22054         (sparc_expand_prologue): Do not call load_got_register here.
22055         (sparc_flat_expand_prologue): Likewise.
22056         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22057         (sparc_use_pseudo_pic_reg): New function.
22058         (sparc_init_pic_reg): Likewise.
22059         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22060         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22062 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
22064         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22065         Add item for branch_cost.
22067 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22069         PR rtl-optimization/83565
22070         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22071         not extend the result to a larger mode for rotate operations.
22072         (num_sign_bit_copies1): Likewise.
22074 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22076         PR target/40411
22077         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22078         -symbolic.
22079         Use values-Xc.o for -pedantic.
22080         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22082 2018-01-12  Martin Liska  <mliska@suse.cz>
22084         PR ipa/83054
22085         * ipa-devirt.c (final_warning_record::grow_type_warnings):
22086         New function.
22087         (possible_polymorphic_call_targets): Use it.
22088         (ipa_devirt): Likewise.
22090 2018-01-12  Martin Liska  <mliska@suse.cz>
22092         * profile-count.h (enum profile_quality): Use 0 as invalid
22093         enum value of profile_quality.
22095 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
22097         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22098         -mext-string options.
22100 2018-01-12  Richard Biener  <rguenther@suse.de>
22102         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22103         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22104         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22105         Likewise.
22106         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22108 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22110         * configure.ac (--with-long-double-format): Add support for the
22111         configuration option to change the default long double format on
22112         PowerPC systems.
22113         * config.gcc (powerpc*-linux*-*): Likewise.
22114         * configure: Regenerate.
22115         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22116         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22117         used without modification.
22119 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22121         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22122         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22123         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22124         MISC_BUILTIN_SPEC_BARRIER.
22125         (rs6000_init_builtins): Likewise.
22126         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22127         enum value.
22128         (speculation_barrier): New define_insn.
22129         * doc/extend.texi: Document __builtin_speculation_barrier.
22131 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22133         PR target/83203
22134         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22135         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22136         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22137         iterators.
22138         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
22139         integral modes instead of "ss" and "sd".
22140         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22141         vectors with 32-bit and 64-bit elements.
22142         (vecdupssescalarmodesuffix): New mode attribute.
22143         (vec_dup<mode>): Use it.
22145 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
22147         PR target/83330
22148         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22149         frame if argument is passed on stack.
22151 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22153         PR target/82682
22154         * ree.c (combine_reaching_defs): Optimize also
22155         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22156         reg2=any_extend(exp); reg1=reg2;, formatting fix.
22158 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22160         PR middle-end/83189
22161         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22163 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22165         PR middle-end/83718
22166         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22167         after they are computed.
22169 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
22171         PR tree-optimization/83695
22172         * gimple-loop-linterchange.cc
22173         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22174         reset cached scev information after interchange.
22175         (pass_linterchange::execute): Remove call to scev_reset_htab.
22177 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22179         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22180         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22181         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22182         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22183         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22184         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22185         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22186         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22187         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22188         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22189         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22190         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22191         (V_lane_reg): Likewise.
22192         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22193         New define_expand.
22194         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22195         (vfmal_lane_low<mode>_intrinsic,
22196         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22197         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22198         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22199         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22200         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22201         vfmsl_lane_high<mode>_intrinsic): New define_insns.
22203 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22205         * config/arm/arm-cpus.in (fp16fml): New feature.
22206         (ALL_SIMD): Add fp16fml.
22207         (armv8.2-a): Add fp16fml as an option.
22208         (armv8.3-a): Likewise.
22209         (armv8.4-a): Add fp16fml as part of fp16.
22210         * config/arm/arm.h (TARGET_FP16FML): Define.
22211         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22212         when appropriate.
22213         * config/arm/arm-modes.def (V2HF): Define.
22214         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22215         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22216         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22217         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22218         vfmsl_low, vfmsl_high): New set of builtins.
22219         * config/arm/iterators.md (PLUSMINUS): New code iterator.
22220         (vfml_op): New code attribute.
22221         (VFMLHALVES): New int iterator.
22222         (VFML, VFMLSEL): New mode attributes.
22223         (V_reg): Define mapping for V2HF.
22224         (V_hi, V_lo): New mode attributes.
22225         (VF_constraint): Likewise.
22226         (vfml_half, vfml_half_selector): New int attributes.
22227         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22228         define_expand.
22229         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22230         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22231         New define_insn.
22232         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22233         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22234         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22235         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
22236         documentation.
22237         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22238         Document new effective target and option set.
22240 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22242         * config/arm/arm-cpus.in (armv8_4): New feature.
22243         (ARMv8_4a): New fgroup.
22244         (armv8.4-a): New arch.
22245         * config/arm/arm-tables.opt: Regenerate.
22246         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22247         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22248         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22249         Add matching rules for -march=armv8.4-a and extensions.
22250         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22252 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
22254         PR target/81821
22255         * config/rx/rx.md (BW): New mode attribute.
22256         (sync_lock_test_and_setsi): Add mode suffix to insn output.
22258 2018-01-11  Richard Biener  <rguenther@suse.de>
22260         PR tree-optimization/83435
22261         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22262         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22263         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22265 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22266             Alan Hayward  <alan.hayward@arm.com>
22267             David Sherwood  <david.sherwood@arm.com>
22269         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22270         field.
22271         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
22272         (aarch64_print_address_internal): Use it to check for a zero offset.
22274 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22275             Alan Hayward  <alan.hayward@arm.com>
22276             David Sherwood  <david.sherwood@arm.com>
22278         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22279         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22280         Return a poly_int64 rather than a HOST_WIDE_INT.
22281         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22282         rather than a HOST_WIDE_INT.
22283         * config/aarch64/aarch64.h (aarch64_frame): Protect with
22284         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
22285         hard_fp_offset, frame_size, initial_adjust, callee_offset and
22286         final_offset from HOST_WIDE_INT to poly_int64.
22287         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22288         to_constant when getting the number of units in an Advanced SIMD
22289         mode.
22290         (aarch64_builtin_vectorized_function): Check for a constant number
22291         of units.
22292         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22293         GET_MODE_SIZE.
22294         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22295         attribute instead of GET_MODE_NUNITS.
22296         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22297         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22298         GET_MODE_SIZE for fixed-size registers.
22299         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22300         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22301         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22302         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22303         (aarch64_print_operand, aarch64_print_address_internal)
22304         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22305         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22306         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22307         Handle polynomial GET_MODE_SIZE.
22308         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
22309         wider than SImode without modification.
22310         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22311         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22312         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22313         passing and returning SVE modes.
22314         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22315         rather than GEN_INT.
22316         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22317         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22318         (aarch64_allocate_and_probe_stack_space): Likewise.
22319         (aarch64_layout_frame): Cope with polynomial offsets.
22320         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22321         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
22322         polynomial offsets.
22323         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22324         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22325         poly_int64 rather than a HOST_WIDE_INT.
22326         (aarch64_get_separate_components, aarch64_process_components)
22327         (aarch64_expand_prologue, aarch64_expand_epilogue)
22328         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22329         (aarch64_anchor_offset): New function, split out from...
22330         (aarch64_legitimize_address): ...here.
22331         (aarch64_builtin_vectorization_cost): Handle polynomial
22332         TYPE_VECTOR_SUBPARTS.
22333         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22334         GET_MODE_NUNITS.
22335         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22336         number of elements from the PARALLEL rather than the mode.
22337         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22338         rather than GET_MODE_BITSIZE.
22339         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22340         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22341         (aarch64_expand_vec_perm_const_1): Handle polynomial
22342         d->perm.length () and d->perm elements.
22343         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
22344         Apply to_constant to d->perm elements.
22345         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22346         polynomial CONST_VECTOR_NUNITS.
22347         (aarch64_move_pointer): Take amount as a poly_int64 rather
22348         than an int.
22349         (aarch64_progress_pointer): Avoid temporary variable.
22350         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22351         the mode attribute instead of GET_MODE.
22353 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22354             Alan Hayward  <alan.hayward@arm.com>
22355             David Sherwood  <david.sherwood@arm.com>
22357         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22358         x exists before using it.
22359         (aarch64_add_constant_internal): Rename to...
22360         (aarch64_add_offset_1): ...this.  Replace regnum with separate
22361         src and dest rtxes.  Handle the case in which they're different,
22362         including when the offset is zero.  Replace scratchreg with an rtx.
22363         Use 2 additions if there is no spare register into which we can
22364         move a 16-bit constant.
22365         (aarch64_add_constant): Delete.
22366         (aarch64_add_offset): Replace reg with separate src and dest
22367         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
22368         Use aarch64_add_offset_1.
22369         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22370         an rtx rather than an int.  Take the delta as a poly_int64
22371         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
22372         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22373         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22374         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22375         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22376         and aarch64_add_sp.
22377         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22378         aarch64_add_constant.
22380 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22382         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22383         Use scalar_float_mode.
22385 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22387         * config/aarch64/aarch64-simd.md
22388         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22389         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22390         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22391         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22392         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22393         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22394         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22395         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22396         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22397         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22399 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22401         PR target/83514
22402         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22403         targ_options->x_arm_arch_string is non NULL.
22405 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
22407         * config/aarch64/aarch64.h
22408         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
22410 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
22412         PR target/82096
22413         * expmed.c (emit_store_flag_force): Swap if const op0
22414         and change VOIDmode to mode of op0.
22416 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22418         PR rtl-optimization/83761
22419         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22420         than bytes to mode_for_size.
22422 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22424         PR middle-end/83189
22425         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22426         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22427         profile.
22429 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22431         PR middle-end/83575
22432         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22433         when in layout mode.
22434         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22435         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22436         partition fixup.
22438 2018-01-10  Michael Collison  <michael.collison@arm.com>
22440         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22441         * config/aarch64/aarch64-option-extension.def: Add
22442         AARCH64_OPT_EXTENSION of 'fp16fml'.
22443         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22444         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22445         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22446         * config/aarch64/constraints.md (Ui7): New constraint.
22447         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22448         (VFMLA_SEL_W): Ditto.
22449         (f16quad): Ditto.
22450         (f16mac1): Ditto.
22451         (VFMLA16_LOW): New int iterator.
22452         (VFMLA16_HIGH): Ditto.
22453         (UNSPEC_FMLAL): New unspec.
22454         (UNSPEC_FMLSL): Ditto.
22455         (UNSPEC_FMLAL2): Ditto.
22456         (UNSPEC_FMLSL2): Ditto.
22457         (f16mac): New code attribute.
22458         * config/aarch64/aarch64-simd-builtins.def
22459         (aarch64_fmlal_lowv2sf): Ditto.
22460         (aarch64_fmlsl_lowv2sf): Ditto.
22461         (aarch64_fmlalq_lowv4sf): Ditto.
22462         (aarch64_fmlslq_lowv4sf): Ditto.
22463         (aarch64_fmlal_highv2sf): Ditto.
22464         (aarch64_fmlsl_highv2sf): Ditto.
22465         (aarch64_fmlalq_highv4sf): Ditto.
22466         (aarch64_fmlslq_highv4sf): Ditto.
22467         (aarch64_fmlal_lane_lowv2sf): Ditto.
22468         (aarch64_fmlsl_lane_lowv2sf): Ditto.
22469         (aarch64_fmlal_laneq_lowv2sf): Ditto.
22470         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22471         (aarch64_fmlalq_lane_lowv4sf): Ditto.
22472         (aarch64_fmlsl_lane_lowv4sf): Ditto.
22473         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22474         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22475         (aarch64_fmlal_lane_highv2sf): Ditto.
22476         (aarch64_fmlsl_lane_highv2sf): Ditto.
22477         (aarch64_fmlal_laneq_highv2sf): Ditto.
22478         (aarch64_fmlsl_laneq_highv2sf): Ditto.
22479         (aarch64_fmlalq_lane_highv4sf): Ditto.
22480         (aarch64_fmlsl_lane_highv4sf): Ditto.
22481         (aarch64_fmlalq_laneq_highv4sf): Ditto.
22482         (aarch64_fmlsl_laneq_highv4sf): Ditto.
22483         * config/aarch64/aarch64-simd.md:
22484         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22485         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22486         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22487         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22488         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22489         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22490         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22491         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22492         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22493         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22494         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22495         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22496         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22497         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22498         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22499         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22500         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22501         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22502         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22503         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22504         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22505         (vfmlsl_low_u32): Ditto.
22506         (vfmlalq_low_u32): Ditto.
22507         (vfmlslq_low_u32): Ditto.
22508         (vfmlal_high_u32): Ditto.
22509         (vfmlsl_high_u32): Ditto.
22510         (vfmlalq_high_u32): Ditto.
22511         (vfmlslq_high_u32): Ditto.
22512         (vfmlal_lane_low_u32): Ditto.
22513         (vfmlsl_lane_low_u32): Ditto.
22514         (vfmlal_laneq_low_u32): Ditto.
22515         (vfmlsl_laneq_low_u32): Ditto.
22516         (vfmlalq_lane_low_u32): Ditto.
22517         (vfmlslq_lane_low_u32): Ditto.
22518         (vfmlalq_laneq_low_u32): Ditto.
22519         (vfmlslq_laneq_low_u32): Ditto.
22520         (vfmlal_lane_high_u32): Ditto.
22521         (vfmlsl_lane_high_u32): Ditto.
22522         (vfmlal_laneq_high_u32): Ditto.
22523         (vfmlsl_laneq_high_u32): Ditto.
22524         (vfmlalq_lane_high_u32): Ditto.
22525         (vfmlslq_lane_high_u32): Ditto.
22526         (vfmlalq_laneq_high_u32): Ditto.
22527         (vfmlslq_laneq_high_u32): Ditto.
22528         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22529         (AARCH64_FL_FOR_ARCH8_4): New.
22530         (AARCH64_ISA_F16FML): New ISA flag.
22531         (TARGET_F16FML): New feature flag for fp16fml.
22532         (doc/invoke.texi): Document new fp16fml option.
22534 2018-01-10  Michael Collison  <michael.collison@arm.com>
22536         * config/aarch64/aarch64-builtins.c:
22537         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22538         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22539         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22540         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22541         (AARCH64_ISA_SHA3): New ISA flag.
22542         (TARGET_SHA3): New feature flag for sha3.
22543         * config/aarch64/iterators.md (sha512_op): New int attribute.
22544         (CRYPTO_SHA512): New int iterator.
22545         (UNSPEC_SHA512H): New unspec.
22546         (UNSPEC_SHA512H2): Ditto.
22547         (UNSPEC_SHA512SU0): Ditto.
22548         (UNSPEC_SHA512SU1): Ditto.
22549         * config/aarch64/aarch64-simd-builtins.def
22550         (aarch64_crypto_sha512hqv2di): New builtin.
22551         (aarch64_crypto_sha512h2qv2di): Ditto.
22552         (aarch64_crypto_sha512su0qv2di): Ditto.
22553         (aarch64_crypto_sha512su1qv2di): Ditto.
22554         (aarch64_eor3qv8hi): Ditto.
22555         (aarch64_rax1qv2di): Ditto.
22556         (aarch64_xarqv2di): Ditto.
22557         (aarch64_bcaxqv8hi): Ditto.
22558         * config/aarch64/aarch64-simd.md:
22559         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22560         (aarch64_crypto_sha512su0qv2di): Ditto.
22561         (aarch64_crypto_sha512su1qv2di): Ditto.
22562         (aarch64_eor3qv8hi): Ditto.
22563         (aarch64_rax1qv2di): Ditto.
22564         (aarch64_xarqv2di): Ditto.
22565         (aarch64_bcaxqv8hi): Ditto.
22566         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22567         (vsha512h2q_u64): Ditto.
22568         (vsha512su0q_u64): Ditto.
22569         (vsha512su1q_u64): Ditto.
22570         (veor3q_u16): Ditto.
22571         (vrax1q_u64): Ditto.
22572         (vxarq_u64): Ditto.
22573         (vbcaxq_u16): Ditto.
22574         * config/arm/types.md (crypto_sha512): New type attribute.
22575         (crypto_sha3): Ditto.
22576         (doc/invoke.texi): Document new sha3 option.
22578 2018-01-10  Michael Collison  <michael.collison@arm.com>
22580         * config/aarch64/aarch64-builtins.c:
22581         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22582         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22583         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22584         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22585         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22586         (AARCH64_ISA_SM4): New ISA flag.
22587         (TARGET_SM4): New feature flag for sm4.
22588         * config/aarch64/aarch64-simd-builtins.def
22589         (aarch64_sm3ss1qv4si): Ditto.
22590         (aarch64_sm3tt1aq4si): Ditto.
22591         (aarch64_sm3tt1bq4si): Ditto.
22592         (aarch64_sm3tt2aq4si): Ditto.
22593         (aarch64_sm3tt2bq4si): Ditto.
22594         (aarch64_sm3partw1qv4si): Ditto.
22595         (aarch64_sm3partw2qv4si): Ditto.
22596         (aarch64_sm4eqv4si): Ditto.
22597         (aarch64_sm4ekeyqv4si): Ditto.
22598         * config/aarch64/aarch64-simd.md:
22599         (aarch64_sm3ss1qv4si): Ditto.
22600         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22601         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22602         (aarch64_sm4eqv4si): Ditto.
22603         (aarch64_sm4ekeyqv4si): Ditto.
22604         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22605         (sm3part_op): Ditto.
22606         (CRYPTO_SM3TT): Ditto.
22607         (CRYPTO_SM3PART): Ditto.
22608         (UNSPEC_SM3SS1): New unspec.
22609         (UNSPEC_SM3TT1A): Ditto.
22610         (UNSPEC_SM3TT1B): Ditto.
22611         (UNSPEC_SM3TT2A): Ditto.
22612         (UNSPEC_SM3TT2B): Ditto.
22613         (UNSPEC_SM3PARTW1): Ditto.
22614         (UNSPEC_SM3PARTW2): Ditto.
22615         (UNSPEC_SM4E): Ditto.
22616         (UNSPEC_SM4EKEY): Ditto.
22617         * config/aarch64/constraints.md (Ui2): New constraint.
22618         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22619         * config/arm/types.md (crypto_sm3): New type attribute.
22620         (crypto_sm4): Ditto.
22621         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22622         (vsm3tt1aq_u32): Ditto.
22623         (vsm3tt1bq_u32): Ditto.
22624         (vsm3tt2aq_u32): Ditto.
22625         (vsm3tt2bq_u32): Ditto.
22626         (vsm3partw1q_u32): Ditto.
22627         (vsm3partw2q_u32): Ditto.
22628         (vsm4eq_u32): Ditto.
22629         (vsm4ekeyq_u32): Ditto.
22630         (doc/invoke.texi): Document new sm4 option.
22632 2018-01-10  Michael Collison  <michael.collison@arm.com>
22634         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22635         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22636         (AARCH64_FL_FOR_ARCH8_4): New.
22637         (AARCH64_FL_V8_4): New flag.
22638         (doc/invoke.texi): Document new armv8.4-a option.
22640 2018-01-10  Michael Collison  <michael.collison@arm.com>
22642         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22643         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22644         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22645         * config/aarch64/aarch64-option-extension.def: Add
22646         AARCH64_OPT_EXTENSION of 'sha2'.
22647         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22648         (crypto): Disable sha2 and aes if crypto disabled.
22649         (crypto): Enable aes and sha2 if enabled.
22650         (simd): Disable sha2 and aes if simd disabled.
22651         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22652         New flags.
22653         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22654         (TARGET_SHA2): New feature flag for sha2.
22655         (TARGET_AES): New feature flag for aes.
22656         * config/aarch64/aarch64-simd.md:
22657         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22658         conditional on TARGET_AES.
22659         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22660         (aarch64_crypto_sha1hsi): Make pattern conditional
22661         on TARGET_SHA2.
22662         (aarch64_crypto_sha1hv4si): Ditto.
22663         (aarch64_be_crypto_sha1hv4si): Ditto.
22664         (aarch64_crypto_sha1su1v4si): Ditto.
22665         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22666         (aarch64_crypto_sha1su0v4si): Ditto.
22667         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22668         (aarch64_crypto_sha256su0v4si): Ditto.
22669         (aarch64_crypto_sha256su1v4si): Ditto.
22670         (doc/invoke.texi): Document new aes and sha2 options.
22672 2018-01-10  Martin Sebor  <msebor@redhat.com>
22674         PR tree-optimization/83781
22675         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22676         as string arrays.
22678 2018-01-11  Martin Sebor  <msebor@gmail.com>
22679             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22681         PR tree-optimization/83501
22682         PR tree-optimization/81703
22684         * tree-ssa-strlen.c (get_string_cst): Rename...
22685         (get_string_len): ...to this.  Handle global constants.
22686         (handle_char_store): Adjust.
22688 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
22689             Jim Wilson  <jimw@sifive.com>
22691         * config/riscv/riscv-protos.h (riscv_output_return): New.
22692         * config/riscv/riscv.c (struct machine_function): New naked_p field.
22693         (riscv_attribute_table, riscv_output_return),
22694         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22695         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22696         (riscv_compute_frame_info): Only compute frame->mask if not a naked
22697         function.
22698         (riscv_expand_prologue): Add early return for naked function.
22699         (riscv_expand_epilogue): Likewise.
22700         (riscv_function_ok_for_sibcall): Return false for naked function.
22701         (riscv_set_current_function): New.
22702         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22703         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22704         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22705         * doc/extend.texi (RISC-V Function Attributes): New.
22707 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
22709         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22710         check for 128-bit long double before checking TCmode.
22711         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22712         128-bit long doubles before checking TFmode or TCmode.
22713         (FLOAT128_IBM_P): Likewise.
22715 2018-01-10  Martin Sebor  <msebor@redhat.com>
22717         PR tree-optimization/83671
22718         * builtins.c (c_strlen): Unconditionally return zero for the empty
22719         string.
22720         Use -Warray-bounds for warnings.
22721         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22722         for non-constant array indices with COMPONENT_REF, arrays of
22723         arrays, and pointers to arrays.
22724         (gimple_fold_builtin_strlen): Determine and set length range for
22725         non-constant character arrays.
22727 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
22729         PR middle-end/81897
22730         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22731         empty blocks.
22733 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
22735         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22737 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22739         PR target/83399
22740         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22741         VECTOR_MEM_ALTIVEC_OR_VSX_P.
22742         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22743         indexed_or_indirect_operand predicate.
22744         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22745         (*vsx_le_perm_load_v8hi): Likewise.
22746         (*vsx_le_perm_load_v16qi): Likewise.
22747         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22748         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22749         (*vsx_le_perm_store_v8hi): Likewise.
22750         (*vsx_le_perm_store_v16qi): Likewise.
22751         (eight unnamed splitters): Likewise.
22753 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22755         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22756         * config/rs6000/emmintrin.h: Likewise.
22757         * config/rs6000/mmintrin.h: Likewise.
22758         * config/rs6000/xmmintrin.h: Likewise.
22760 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
22762         PR c++/43486
22763         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22764         "public_flag".
22765         * tree.c (tree_nop_conversion): Return true for location wrapper
22766         nodes.
22767         (maybe_wrap_with_location): New function.
22768         (selftest::check_strip_nops): New function.
22769         (selftest::test_location_wrappers): New function.
22770         (selftest::tree_c_tests): Call it.
22771         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22772         (maybe_wrap_with_location): New decl.
22773         (EXPR_LOCATION_WRAPPER_P): New macro.
22774         (location_wrapper_p): New inline function.
22775         (tree_strip_any_location_wrapper): New inline function.
22777 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
22779         PR target/83735
22780         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22781         stack_realign_offset for the largest alignment of stack slot
22782         actually used.
22783         (ix86_find_max_used_stack_alignment): New function.
22784         (ix86_finalize_stack_frame_flags): Use it.  Set
22785         max_used_stack_alignment if we don't realign stack.
22786         * config/i386/i386.h (machine_function): Add
22787         max_used_stack_alignment.
22789 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
22791         * config/arm/arm.opt (-mbranch-cost): New option.
22792         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22793         account.
22795 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
22797         PR target/83629
22798         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22799         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22801 2018-01-10  Richard Biener  <rguenther@suse.de>
22803         PR debug/83765
22804         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22805         early out so it also covers the case where we have a non-NULL
22806         origin.
22808 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22810         PR tree-optimization/83753
22811         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22812         for non-strided grouped accesses if the number of elements is 1.
22814 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22816         PR target/81616
22817         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22818         * i386.h (TARGET_USE_GATHER): Define.
22819         * x86-tune.def (X86_TUNE_USE_GATHER): New.
22821 2018-01-10  Martin Liska  <mliska@suse.cz>
22823         PR bootstrap/82831
22824         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22825         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22826         partitioning.
22827         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22828         CLEANUP_NO_PARTITIONING is not set.
22830 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22832         * doc/rtl.texi: Remove documentation of (const ...) wrappers
22833         for vectors, as a partial revert of r254296.
22834         * rtl.h (const_vec_p): Delete.
22835         (const_vec_duplicate_p): Don't test for vector CONSTs.
22836         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22837         * expmed.c (make_tree): Likewise.
22839         Revert:
22840         * common.md (E, F): Use CONSTANT_P instead of checking for
22841         CONST_VECTOR.
22842         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22843         checking for CONST_VECTOR.
22845 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22847         PR middle-end/83575
22848         * predict.c (force_edge_cold): Handle in more sane way edges
22849         with no prediction.
22851 2018-01-09  Carl Love  <cel@us.ibm.com>
22853         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22854         V4SI, V4SF types.
22855         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22856         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22857         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22858         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
22859         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22860         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
22861         * config/rs6000/rs6000-protos.h: Add extern defition for
22862         rs6000_generate_float2_double_code.
22863         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22864         function.
22865         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22866         (float2_v2df): Add define_expand.
22868 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
22870         PR target/83628
22871         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22872         op_mode in the force_to_mode call.
22874 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22876         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
22877         instead of checking each element individually.
22878         (aarch64_evpc_uzp): Likewise.
22879         (aarch64_evpc_zip): Likewise.
22880         (aarch64_evpc_ext): Likewise.
22881         (aarch64_evpc_rev): Likewise.
22882         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
22883         instead of checking each element individually.  Return true without
22884         generating rtl if
22885         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
22886         whether all selected elements come from the same input, instead of
22887         checking each element individually.  Remove calls to gen_rtx_REG,
22888         start_sequence and end_sequence and instead assert that no rtl is
22889         generated.
22891 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22893         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
22894         order of HIGH and CONST checks.
22896 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
22898         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
22899         if the destination isn't an SSA_NAME.
22901 2018-01-09  Richard Biener  <rguenther@suse.de>
22903         PR tree-optimization/83668
22904         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
22905         move prologue...
22906         (canonicalize_loop_form): ... here, renamed from ...
22907         (canonicalize_loop_closed_ssa_form): ... this and amended to
22908         swap successor edges for loop exit blocks to make us use
22909         the RPO order we need for initial schedule generation.
22911 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
22913         PR tree-optimization/64811
22914         * match.pd: When optimizing comparisons with Inf, avoid
22915         introducing or losing exceptions from comparisons with NaN.
22917 2018-01-09  Martin Liska  <mliska@suse.cz>
22919         PR sanitizer/82517
22920         * asan.c (shadow_mem_size): Add gcc_assert.
22922 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
22924         Don't save registers in main().
22926         PR target/83738
22927         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
22928         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
22929         * config/avr/avr.c (avr_set_current_function): Don't error if
22930         naked, OS_task or OS_main are specified at the same time.
22931         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
22932         OS_main.
22933         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
22934         attribute.
22935         * common/config/avr/avr-common.c (avr_option_optimization_table):
22936         Switch on -mmain-is-OS_task for optimizing compilations.
22938 2018-01-09  Richard Biener  <rguenther@suse.de>
22940         PR tree-optimization/83572
22941         * graphite.c: Include cfganal.h.
22942         (graphite_transform_loops): Connect infinite loops to exit
22943         and remove fake edges at the end.
22945 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22947         * ipa-inline.c (edge_badness): Revert accidental checkin.
22949 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22951         PR ipa/80763
22952         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
22953         symbols; not inline clones.
22955 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
22957         PR target/83507
22958         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
22959         hard registers.  Formatting fixes.
22961         PR preprocessor/83722
22962         * gcc.c (try_generate_repro): Pass
22963         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
22964         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22965         do_report_bug.
22967 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
22968             Kito Cheng  <kito.cheng@gmail.com>
22970         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22971         (riscv_leaf_function_p): Delete.
22972         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22974 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22976         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22977         function.
22978         (do_ifelse): New function.
22979         (do_isel): New function.
22980         (do_sub3): New function.
22981         (do_add3): New function.
22982         (do_load_mask_compare): New function.
22983         (do_overlap_load_compare): New function.
22984         (expand_compare_loop): New function.
22985         (expand_block_compare): Call expand_compare_loop() when appropriate.
22986         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22987         option description.
22988         (-mblock-compare-inline-loop-limit): New option.
22990 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22992         PR target/83677
22993         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22994         Reverse order of second and third operands in first alternative.
22995         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22996         of first and second elements in UNSPEC_VPERMR vector.
22997         (altivec_expand_vec_perm_le): Likewise.
22999 2018-01-08  Jeff Law  <law@redhat.com>
23001         PR rtl-optimizatin/81308
23002         * tree-switch-conversion.c (cfg_altered): New file scoped static.
23003         (process_switch): If group_case_labels makes a change, then set
23004         cfg_altered.
23005         (pass_convert_switch::execute): If a switch is converted, then
23006         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
23008         PR rtl-optimization/81308
23009         * recog.c (split_all_insns): Conditionally cleanup the CFG after
23010         splitting insns.
23012 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
23014         PR target/83663 - Revert r255946
23015         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23016         generation for cases where splatting a value is not useful.
23017         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23018         across a vec_duplicate and a paradoxical subreg forming a vector
23019         mode to a vec_concat.
23021 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23023         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23024         -march=armv8.3-a variants.
23025         * config/arm/t-multilib: Likewise.
23026         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
23028 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23030         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23031         to generate rtl.
23032         (cceq_ior_compare_complement): Give it a name so I can use it, and
23033         change boolean_or_operator predicate to boolean_operator so it can
23034         be used to generate a crand.
23035         (eqne): New code iterator.
23036         (bd/bd_neg): New code_attrs.
23037         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23038         a single define_insn.
23039         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23040         decrement (bdnzt/bdnzf/bdzt/bdzf).
23041         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23042         with the new names of the branch decrement patterns, and added the
23043         names of the branch decrement conditional patterns.
23045 2018-01-08  Richard Biener  <rguenther@suse.de>
23047         PR tree-optimization/83563
23048         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23049         cache.
23051 2018-01-08  Richard Biener  <rguenther@suse.de>
23053         PR middle-end/83713
23054         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23056 2018-01-08  Richard Biener  <rguenther@suse.de>
23058         PR tree-optimization/83685
23059         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23060         references to abnormals.
23062 2018-01-08  Richard Biener  <rguenther@suse.de>
23064         PR lto/83719
23065         * dwarf2out.c (output_indirect_strings): Handle empty
23066         skeleton_debug_str_hash.
23067         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23069 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23071         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23072         (emit_store_direct): Likewise.
23073         (arc_trampoline_adjust_address): Likewise.
23074         (arc_asm_trampoline_template): New function.
23075         (arc_initialize_trampoline): Use asm_trampoline_template.
23076         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23077         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23078         * config/arc/arc.md (flush_icache): Delete pattern.
23080 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23082         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23083         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23084         munaligned-access.
23086 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23088         PR target/83681
23089         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23090         by not USED_FOR_TARGET.
23091         (make_pass_resolve_sw_modes): Likewise.
23093 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23095         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23096         USED_FOR_TARGET.
23098 2018-01-08  Richard Biener  <rguenther@suse.de>
23100         PR middle-end/83580
23101         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23103 2018-01-08  Richard Biener  <rguenther@suse.de>
23105         PR middle-end/83517
23106         * match.pd ((t * 2) / 2) -> t): Add missing :c.
23108 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
23110         PR middle-end/81897
23111         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23112         basic blocks with a small number of successors.
23113         (convert_control_dep_chain_into_preds): Improve handling of
23114         forwarder blocks.
23115         (dump_predicates): Split apart into...
23116         (dump_pred_chain): ...here...
23117         (dump_pred_info): ...and here.
23118         (can_one_predicate_be_invalidated_p): Add debugging printfs.
23119         (can_chain_union_be_invalidated_p): Improve check for invalidation
23120         of paths.
23121         (uninit_uses_cannot_happen): Avoid unnecessary if
23122         convert_control_dep_chain_into_preds yielded nothing.
23124 2018-01-06  Martin Sebor  <msebor@redhat.com>
23126         PR tree-optimization/83640
23127         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23128         subtracting negative offset from size.
23129         (builtin_access::overlap): Adjust offset bounds of the access to fall
23130         within the size of the object if possible.
23132 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
23134         PR rtl-optimization/83699
23135         * expmed.c (extract_bit_field_1): Restrict the vector usage of
23136         extract_bit_field_as_subreg to cases in which the extracted
23137         value is also a vector.
23139         * lra-constraints.c (process_alt_operands): Test for the equivalence
23140         substitutions when detecting a possible reload cycle.
23142 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
23144         PR debug/83480
23145         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23146         by default if flag_selective_schedling{,2}.  Formatting fixes.
23148         PR rtl-optimization/83682
23149         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23150         if it has non-VECTOR_MODE element mode.
23151         (vec_duplicate_p): Likewise.
23153         PR middle-end/83694
23154         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23155         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23157 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23159         PR target/83604
23160         * config/i386/i386-builtin.def
23161         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23162         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23163         Require also OPTION_MASK_ISA_AVX512F in addition to
23164         OPTION_MASK_ISA_GFNI.
23165         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23166         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23167         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23168         to OPTION_MASK_ISA_GFNI.
23169         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23170         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23171         OPTION_MASK_ISA_AVX512BW.
23172         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23173         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23174         addition to OPTION_MASK_ISA_GFNI.
23175         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23176         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23177         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23178         to OPTION_MASK_ISA_GFNI.
23179         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23180         a requirement for all ISAs rather than any of them with a few
23181         exceptions.
23182         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23183         processing.
23184         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23185         bitmasks to be enabled with 3 exceptions, instead of requiring any
23186         enabled ISA with lots of exceptions.
23187         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23188         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23189         Change avx512bw in isa attribute to avx512f.
23190         * config/i386/sgxintrin.h: Add license boilerplate.
23191         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
23192         to __AVX512F__ and __AVX512VL to __AVX512VL__.
23193         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23194         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23195         defined.
23196         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23197         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23198         temporarily sse2 rather than sse if not enabled already.
23200         PR target/83604
23201         * config/i386/sse.md (VI248_VLBW): Rename to ...
23202         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
23203         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23204         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23205         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23206         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23207         mode iterator instead of VI248_VLBW.
23209 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
23211         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23212         (record_modified): Skip clobbers; add debug output.
23213         (param_change_prob): Use sreal frequencies.
23215 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23217         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23218         punt for user-aligned variables.
23220 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23222         * tree-chrec.c (chrec_contains_symbols): Return true for
23223         POLY_INT_CST.
23225 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
23227         PR target/82439
23228         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23229         of (x|y) == x for BICS pattern.
23231 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23233         PR tree-optimization/83605
23234         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23235         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23236         can throw.
23238 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23240         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23241         * config/epiphany/rtems.h: New file.
23243 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23244             Uros Bizjak  <ubizjak@gmail.com>
23246         PR target/83554
23247         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23248         QIreg_operand instead of register_operand predicate.
23249         * config/i386/i386.c (ix86_rop_should_change_byte_p,
23250         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23251         comments instead of -fmitigate[-_]rop.
23253 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23255         PR bootstrap/81926
23256         * cgraphunit.c (symbol_table::compile): Switch to text_section
23257         before calling assembly_start debug hook.
23258         * run-rtl-passes.c (run_rtl_passes): Likewise.
23259         Include output.h.
23261 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23263         * tree-vrp.c (extract_range_from_binary_expr_1): Check
23264         range_int_cst_p rather than !symbolic_range_p before calling
23265         extract_range_from_multiplicative_op_1.
23267 2018-01-04  Jeff Law  <law@redhat.com>
23269         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23270         redundant test in assertion.
23272 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23274         * doc/rtl.texi: Document machine_mode wrapper classes.
23276 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23278         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23279         using tree_to_uhwi.
23281 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23283         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23284         the VEC_PERM_EXPR fold to fail.
23286 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23288         PR debug/83585
23289         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23290         to switched_sections.
23292 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23294         PR target/83680
23295         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23296         test for d.testing.
23298 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
23300         PR target/83387
23301         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23302         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23304 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23306         PR debug/83666
23307         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23308         is BLKmode and bitpos not zero or mode change is needed.
23310 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23312         PR target/83675
23313         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23314         TARGET_VIS2.
23316 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
23318         PR target/83628
23319         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23320         instead of MULT rtx.  Update all corresponding splitters.
23321         (*saddl_se): Ditto.
23322         (*ssub<modesuffix>): Ditto.
23323         (*ssubl_se): Ditto.
23324         (*cmp_sadd_di): Update split patterns.
23325         (*cmp_sadd_si): Ditto.
23326         (*cmp_sadd_sidi): Ditto.
23327         (*cmp_ssub_di): Ditto.
23328         (*cmp_ssub_si): Ditto.
23329         (*cmp_ssub_sidi): Ditto.
23330         * config/alpha/predicates.md (const23_operand): New predicate.
23331         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23332         Look for ASHIFT, not MULT inner operand.
23333         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23335 2018-01-04  Martin Liska  <mliska@suse.cz>
23337         PR gcov-profile/83669
23338         * gcov.c (output_intermediate_file): Add version to intermediate
23339         gcov file.
23340         * doc/gcov.texi: Document new field 'version' in intermediate
23341         file format. Fix location of '-k' option of gcov command.
23343 2018-01-04  Martin Liska  <mliska@suse.cz>
23345         PR ipa/82352
23346         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23348 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23350         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23352 2018-01-03  Martin Sebor  <msebor@redhat.com>
23354         PR tree-optimization/83655
23355         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23356         checking calls with invalid arguments.
23358 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23360         * tree-vect-stmts.c (vect_get_store_rhs): New function.
23361         (vectorizable_mask_load_store): Delete.
23362         (vectorizable_call): Return false for masked loads and stores.
23363         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
23364         instead of gimple_assign_rhs1.
23365         (vectorizable_load): Handle IFN_MASK_LOAD.
23366         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23368 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23370         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23371         split out from..,
23372         (vectorizable_mask_load_store): ...here.
23373         (vectorizable_load): ...and here.
23375 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23377         * tree-vect-stmts.c (vect_build_all_ones_mask)
23378         (vect_build_zero_merge_argument): New functions, split out from...
23379         (vectorizable_load): ...here.
23381 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23383         * tree-vect-stmts.c (vect_check_store_rhs): New function,
23384         split out from...
23385         (vectorizable_mask_load_store): ...here.
23386         (vectorizable_store): ...and here.
23388 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23390         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23391         split out from...
23392         (vectorizable_mask_load_store): ...here.
23394 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23396         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23397         (vect_model_store_cost): Take a vec_load_store_type instead of a
23398         vect_def_type.
23399         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23400         (vect_model_store_cost): Take a vec_load_store_type instead of a
23401         vect_def_type.
23402         (vectorizable_mask_load_store): Update accordingly.
23403         (vectorizable_store): Likewise.
23404         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23406 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23408         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23409         IFN_MASK_LOAD calls here rather than...
23410         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23413             Alan Hayward  <alan.hayward@arm.com>
23414             David Sherwood  <david.sherwood@arm.com>
23416         * expmed.c (extract_bit_field_1): For vector extracts,
23417         fall back to extract_bit_field_as_subreg if vec_extract
23418         isn't available.
23420 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23421             Alan Hayward  <alan.hayward@arm.com>
23422             David Sherwood  <david.sherwood@arm.com>
23424         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23425         they are variable or constant sized.
23426         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23427         slots for constant-sized data.
23429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23430             Alan Hayward  <alan.hayward@arm.com>
23431             David Sherwood  <david.sherwood@arm.com>
23433         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23434         handling COND_EXPRs with boolean comparisons, try to find a better
23435         basis for the mask type than the boolean itself.
23437 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23439         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23440         is calculated and how it can be overridden.
23441         * genmodes.c (max_bitsize_mode_any_mode): New variable.
23442         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23443         if defined.
23444         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23445         if nonzero.
23447 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23448             Alan Hayward  <alan.hayward@arm.com>
23449             David Sherwood  <david.sherwood@arm.com>
23451         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23452         Remove the mode argument.
23453         (aarch64_simd_valid_immediate): Remove the mode and inverse
23454         arguments.
23455         * config/aarch64/iterators.md (bitsize): New iterator.
23456         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23457         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23458         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23459         aarch64_simd_valid_immediate.
23460         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23461         (aarch64_reg_or_bic_imm): Likewise.
23462         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23463         with an insn_type enum and msl with a modifier_type enum.
23464         Replace element_width with a scalar_mode.  Change the shift
23465         to unsigned int.  Add constructors for scalar_float_mode and
23466         scalar_int_mode elements.
23467         (aarch64_vect_float_const_representable_p): Delete.
23468         (aarch64_can_const_movi_rtx_p)
23469         (aarch64_simd_scalar_immediate_valid_for_move)
23470         (aarch64_simd_make_constant): Update call to
23471         aarch64_simd_valid_immediate.
23472         (aarch64_advsimd_valid_immediate_hs): New function.
23473         (aarch64_advsimd_valid_immediate): Likewise.
23474         (aarch64_simd_valid_immediate): Remove mode and inverse
23475         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
23476         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23477         and aarch64_float_const_representable_p on the result.
23478         (aarch64_output_simd_mov_immediate): Remove mode argument.
23479         Update call to aarch64_simd_valid_immediate and use of
23480         simd_immediate_info.
23481         (aarch64_output_scalar_simd_mov_immediate): Update call
23482         accordingly.
23484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23485             Alan Hayward  <alan.hayward@arm.com>
23486             David Sherwood  <david.sherwood@arm.com>
23488         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23489         (mode_nunits): Likewise CONST_MODE_NUNITS.
23490         * machmode.def (ADJUST_NUNITS): Document.
23491         * genmodes.c (mode_data::need_nunits_adj): New field.
23492         (blank_mode): Update accordingly.
23493         (adj_nunits): New variable.
23494         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23495         parameter.
23496         (emit_mode_size_inline): Set need_bytesize_adj for all modes
23497         listed in adj_nunits.
23498         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23499         listed in adj_nunits.  Don't emit case statements for such modes.
23500         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23501         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
23502         nothing if adj_nunits is nonnull.
23503         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23504         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23505         (emit_mode_fbit): Update use of print_maybe_const_decl.
23506         (emit_move_size): Likewise.  Treat the array as non-const
23507         if adj_nunits.
23508         (emit_mode_adjustments): Handle adj_nunits.
23510 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23512         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23513         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23514         (VECTOR_MODES): Use it.
23515         (make_vector_modes): Take the prefix as an argument.
23517 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23518             Alan Hayward  <alan.hayward@arm.com>
23519             David Sherwood  <david.sherwood@arm.com>
23521         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23522         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23523         for MODE_VECTOR_BOOL.
23524         * machmode.def (VECTOR_BOOL_MODE): Document.
23525         * genmodes.c (VECTOR_BOOL_MODE): New macro.
23526         (make_vector_bool_mode): New function.
23527         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23528         MODE_VECTOR_BOOL.
23529         * lto-streamer-in.c (lto_input_mode_table): Likewise.
23530         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23531         Likewise.
23532         * stor-layout.c (int_mode_for_mode): Likewise.
23533         * tree.c (build_vector_type_for_mode): Likewise.
23534         * varasm.c (output_constant_pool_2): Likewise.
23535         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23536         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
23537         for MODE_VECTOR_BOOL.
23538         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23539         of mode class checks.
23540         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23541         instead of a list of mode class checks.
23542         (expand_vector_scalar_condition): Likewise.
23543         (type_for_widest_vector_mode): Handle BImode as an inner mode.
23545 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23546             Alan Hayward  <alan.hayward@arm.com>
23547             David Sherwood  <david.sherwood@arm.com>
23549         * machmode.h (mode_size): Change from unsigned short to
23550         poly_uint16_pod.
23551         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23552         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23553         or if measurement_type is not polynomial.
23554         (fixed_size_mode::includes_p): Check for constant-sized modes.
23555         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23556         return a poly_uint16 rather than an unsigned short.
23557         (emit_mode_size): Change the type of mode_size from unsigned short
23558         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
23559         (emit_mode_adjustments): Cope with polynomial vector sizes.
23560         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23561         for GET_MODE_SIZE.
23562         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23563         for GET_MODE_SIZE.
23564         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23565         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23566         * caller-save.c (setup_save_areas): Likewise.
23567         (replace_reg_with_saved_mem): Likewise.
23568         * calls.c (emit_library_call_value_1): Likewise.
23569         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23570         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23571         (gen_lowpart_for_combine): Likewise.
23572         * convert.c (convert_to_integer_1): Likewise.
23573         * cse.c (equiv_constant, cse_insn): Likewise.
23574         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23575         (cselib_subst_to_values): Likewise.
23576         * dce.c (word_dce_process_block): Likewise.
23577         * df-problems.c (df_word_lr_mark_ref): Likewise.
23578         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23579         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23580         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23581         (rtl_for_decl_location): Likewise.
23582         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23583         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23584         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23585         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23586         (expand_expr_real_1): Likewise.
23587         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23588         (pad_below): Likewise.
23589         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23590         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23591         * ira.c (get_subreg_tracking_sizes): Likewise.
23592         * ira-build.c (ira_create_allocno_objects): Likewise.
23593         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23594         (ira_sort_regnos_for_alter_reg): Likewise.
23595         * ira-costs.c (record_operand_costs): Likewise.
23596         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23597         (resolve_simple_move): Likewise.
23598         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23599         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23600         (lra_constraints): Likewise.
23601         (CONST_POOL_OK_P): Reject variable-sized modes.
23602         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23603         (add_pseudo_to_slot, lra_spill): Likewise.
23604         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23605         * optabs-query.c (get_best_extraction_insn): Likewise.
23606         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23607         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23608         (expand_mult_highpart, valid_multiword_target_p): Likewise.
23609         * recog.c (offsettable_address_addr_space_p): Likewise.
23610         * regcprop.c (maybe_mode_change): Likewise.
23611         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23612         * regrename.c (build_def_use): Likewise.
23613         * regstat.c (dump_reg_info): Likewise.
23614         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23615         (find_reloads, find_reloads_subreg_address): Likewise.
23616         * reload1.c (eliminate_regs_1): Likewise.
23617         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23618         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23619         (simplify_binary_operation_1, simplify_subreg): Likewise.
23620         * targhooks.c (default_function_arg_padding): Likewise.
23621         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23622         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23623         (verify_gimple_assign_ternary): Likewise.
23624         * tree-inline.c (estimate_move_cost): Likewise.
23625         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23626         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23627         (get_address_cost_ainc): Likewise.
23628         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23629         (vect_supportable_dr_alignment): Likewise.
23630         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23631         (vectorizable_reduction): Likewise.
23632         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23633         (vectorizable_operation, vectorizable_load): Likewise.
23634         * tree.c (build_same_sized_truth_vector_type): Likewise.
23635         * valtrack.c (cleanup_auto_inc_dec): Likewise.
23636         * var-tracking.c (emit_note_insn_var_location): Likewise.
23637         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23638         (ADDR_VEC_ALIGN): Likewise.
23640 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23641             Alan Hayward  <alan.hayward@arm.com>
23642             David Sherwood  <david.sherwood@arm.com>
23644         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23645         unsigned short.
23646         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23647         or if measurement_type is polynomial.
23648         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23649         * combine.c (make_extraction): Likewise.
23650         * dse.c (find_shift_sequence): Likewise.
23651         * dwarf2out.c (mem_loc_descriptor): Likewise.
23652         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23653         (extract_bit_field, extract_low_bits): Likewise.
23654         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23655         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23656         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23657         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23658         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23659         * reload.c (find_reloads): Likewise.
23660         * reload1.c (alter_reg): Likewise.
23661         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23662         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23663         * tree-if-conv.c (predicate_mem_writes): Likewise.
23664         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23665         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23666         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23667         * valtrack.c (dead_debug_insert_temp): Likewise.
23668         * varasm.c (mergeable_constant_section): Likewise.
23669         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23671 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23672             Alan Hayward  <alan.hayward@arm.com>
23673             David Sherwood  <david.sherwood@arm.com>
23675         * expr.c (expand_assignment): Cope with polynomial mode sizes
23676         when assigning to a CONCAT.
23678 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23679             Alan Hayward  <alan.hayward@arm.com>
23680             David Sherwood  <david.sherwood@arm.com>
23682         * machmode.h (mode_precision): Change from unsigned short to
23683         poly_uint16_pod.
23684         (mode_to_precision): Return a poly_uint16 rather than an unsigned
23685         short.
23686         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23687         or if measurement_type is not polynomial.
23688         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
23689         in which the mode is already known to be a scalar_int_mode.
23690         * genmodes.c (emit_mode_precision): Change the type of mode_precision
23691         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
23692         initializer.
23693         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23694         for GET_MODE_PRECISION.
23695         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23696         for GET_MODE_PRECISION.
23697         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23698         as polynomial.
23699         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23700         (expand_field_assignment, make_extraction): Likewise.
23701         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23702         (get_last_value): Likewise.
23703         * convert.c (convert_to_integer_1): Likewise.
23704         * cse.c (cse_insn): Likewise.
23705         * expr.c (expand_expr_real_1): Likewise.
23706         * lra-constraints.c (simplify_operand_subreg): Likewise.
23707         * optabs-query.c (can_atomic_load_p): Likewise.
23708         * optabs.c (expand_atomic_load): Likewise.
23709         (expand_atomic_store): Likewise.
23710         * ree.c (combine_reaching_defs): Likewise.
23711         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23712         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23713         * tree.h (type_has_mode_precision_p): Likewise.
23714         * ubsan.c (instrument_si_overflow): Likewise.
23716 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23717             Alan Hayward  <alan.hayward@arm.com>
23718             David Sherwood  <david.sherwood@arm.com>
23720         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23721         polynomial numbers of units.
23722         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23723         (valid_vector_subparts_p): New function.
23724         (build_vector_type): Remove temporary shim and take the number
23725         of units as a poly_uint64 rather than an int.
23726         (build_opaque_vector_type): Take the number of units as a
23727         poly_uint64 rather than an int.
23728         * tree.c (build_vector_from_ctor): Handle polynomial
23729         TYPE_VECTOR_SUBPARTS.
23730         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23731         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23732         (build_vector_from_val): If the number of units is variable,
23733         use build_vec_duplicate_cst for constant operands and
23734         VEC_DUPLICATE_EXPR otherwise.
23735         (make_vector_type): Remove temporary is_constant ().
23736         (build_vector_type, build_opaque_vector_type): Take the number of
23737         units as a poly_uint64 rather than an int.
23738         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23739         VECTOR_CST_NELTS.
23740         * cfgexpand.c (expand_debug_expr): Likewise.
23741         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23742         (store_constructor, expand_expr_real_1): Likewise.
23743         (const_scalar_mask_from_tree): Likewise.
23744         * fold-const-call.c (fold_const_reduction): Likewise.
23745         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23746         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23747         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23748         (fold_relational_const): Likewise.
23749         (native_interpret_vector): Likewise.  Change the size from an
23750         int to an unsigned int.
23751         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23752         TYPE_VECTOR_SUBPARTS.
23753         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23754         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23755         duplicating a non-constant operand into a variable-length vector.
23756         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23757         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23758         * ipa-icf.c (sem_variable::equals): Likewise.
23759         * match.pd: Likewise.
23760         * omp-simd-clone.c (simd_clone_subparts): Likewise.
23761         * print-tree.c (print_node): Likewise.
23762         * stor-layout.c (layout_type): Likewise.
23763         * targhooks.c (default_builtin_vectorization_cost): Likewise.
23764         * tree-cfg.c (verify_gimple_comparison): Likewise.
23765         (verify_gimple_assign_binary): Likewise.
23766         (verify_gimple_assign_ternary): Likewise.
23767         (verify_gimple_assign_single): Likewise.
23768         * tree-pretty-print.c (dump_generic_node): Likewise.
23769         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23770         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23771         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23772         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23773         (vect_shift_permute_load_chain): Likewise.
23774         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23775         (expand_vector_condition, optimize_vector_constructor): Likewise.
23776         (lower_vec_perm, get_compute_type): Likewise.
23777         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23778         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23779         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23780         (vect_recog_mask_conversion_pattern): Likewise.
23781         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23782         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23783         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23784         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23785         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23786         (vectorizable_shift, vectorizable_operation, vectorizable_store)
23787         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23788         (supportable_widening_operation): Likewise.
23789         (supportable_narrowing_operation): Likewise.
23790         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23791         Likewise.
23792         * varasm.c (output_constant): Likewise.
23794 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23795             Alan Hayward  <alan.hayward@arm.com>
23796             David Sherwood  <david.sherwood@arm.com>
23798         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23799         so that both the length == 3 and length != 3 cases set up their
23800         own permute vectors.  Add comments explaining why we know the
23801         number of elements is constant.
23802         (vect_permute_load_chain): Likewise.
23804 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23805             Alan Hayward  <alan.hayward@arm.com>
23806             David Sherwood  <david.sherwood@arm.com>
23808         * machmode.h (mode_nunits): Change from unsigned char to
23809         poly_uint16_pod.
23810         (ONLY_FIXED_SIZE_MODES): New macro.
23811         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23812         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23813         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23814         New typedefs.
23815         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23816         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23817         or if measurement_type is not polynomial.
23818         * genmodes.c (ZERO_COEFFS): New macro.
23819         (emit_mode_nunits_inline): Make mode_nunits_inline return a
23820         poly_uint16.
23821         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23822         Use ZERO_COEFFS when emitting initializers.
23823         * data-streamer.h (bp_pack_poly_value): New function.
23824         (bp_unpack_poly_value): Likewise.
23825         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23826         for GET_MODE_NUNITS.
23827         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23828         for GET_MODE_NUNITS.
23829         * tree.c (make_vector_type): Remove temporary shim and make
23830         the real function take the number of units as a poly_uint64
23831         rather than an int.
23832         (build_vector_type_for_mode): Handle polynomial nunits.
23833         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23834         * emit-rtl.c (const_vec_series_p_1): Likewise.
23835         (gen_rtx_CONST_VECTOR): Likewise.
23836         * fold-const.c (test_vec_duplicate_folding): Likewise.
23837         * genrecog.c (validate_pattern): Likewise.
23838         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23839         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23840         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23841         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23842         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23843         * rtlanal.c (subreg_get_info): Likewise.
23844         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23845         (vect_grouped_load_supported): Likewise.
23846         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23847         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23848         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23849         (simplify_const_unary_operation, simplify_binary_operation_1)
23850         (simplify_const_binary_operation, simplify_ternary_operation)
23851         (test_vector_ops_duplicate, test_vector_ops): Likewise.
23852         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23853         instead of CONST_VECTOR_NUNITS.
23854         * varasm.c (output_constant_pool_2): Likewise.
23855         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23856         explicit-encoded elements in the XVEC for variable-length vectors.
23858 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23860         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23862 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23863             Alan Hayward  <alan.hayward@arm.com>
23864             David Sherwood  <david.sherwood@arm.com>
23866         * coretypes.h (fixed_size_mode): Declare.
23867         (fixed_size_mode_pod): New typedef.
23868         * builtins.h (target_builtins::x_apply_args_mode)
23869         (target_builtins::x_apply_result_mode): Change type to
23870         fixed_size_mode_pod.
23871         * builtins.c (apply_args_size, apply_result_size, result_vector)
23872         (expand_builtin_apply_args_1, expand_builtin_apply)
23873         (expand_builtin_return): Update accordingly.
23875 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23877         * cse.c (hash_rtx_cb): Hash only the encoded elements.
23878         * cselib.c (cselib_hash_rtx): Likewise.
23879         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
23880         CONST_VECTOR encoding.
23882 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23883             Jeff Law  <law@redhat.com>
23885         PR target/83641
23886         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
23887         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
23888         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
23889         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
23891         PR target/83641
23892         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
23893         explicitly probe *sp in a noreturn function if there were any callee
23894         register saves or frame pointer is needed.
23896 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23898         PR debug/83621
23899         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
23900         BLKmode for ternary, binary or unary expressions.
23902         PR debug/83645
23903         * var-tracking.c (delete_vta_debug_insn): New inline function.
23904         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
23905         insns from get_insns () to NULL instead of each bb separately.
23906         Use delete_vta_debug_insn.  No longer static.
23907         (vt_debug_insns_local, variable_tracking_main_1): Adjust
23908         delete_vta_debug_insns callers.
23909         * rtl.h (delete_vta_debug_insns): Declare.
23910         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
23911         instead of variable_tracking_main.
23913 2018-01-03  Martin Sebor  <msebor@redhat.com>
23915         PR tree-optimization/83603
23916         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
23917         arguments past the endof the argument list in functions declared
23918         without a prototype.
23919         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
23920         Avoid checking when arguments are null.
23922 2018-01-03  Martin Sebor  <msebor@redhat.com>
23924         PR c/83559
23925         * doc/extend.texi (attribute const): Fix a typo.
23926         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
23927         issuing -Wsuggest-attribute for void functions.
23929 2018-01-03  Martin Sebor  <msebor@redhat.com>
23931         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
23932         offset_int::from instead of wide_int::to_shwi.
23933         (maybe_diag_overlap): Remove assertion.
23934         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
23935         * gimple-ssa-sprintf.c (format_directive): Same.
23936         (parse_directive): Same.
23937         (sprintf_dom_walker::compute_format_length): Same.
23938         (try_substitute_return_value): Same.
23940 2018-01-03  Jeff Law  <law@redhat.com>
23942         PR middle-end/83654
23943         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
23944         non-constant residual for zero at runtime and avoid probing in
23945         that case.  Reorganize code for trailing problem to mirror handling
23946         of the residual.
23948 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23950         PR tree-optimization/83501
23951         * tree-ssa-strlen.c (get_string_cst): New.
23952         (handle_char_store): Call get_string_cst.
23954 2018-01-03  Martin Liska  <mliska@suse.cz>
23956         PR tree-optimization/83593
23957         * tree-ssa-strlen.c: Include tree-cfg.h.
23958         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
23959         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
23960         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
23961         to false.
23962         (strlen_dom_walker::before_dom_children): Call
23963         gimple_purge_dead_eh_edges. Dump tranformation with details
23964         dump flags.
23965         (strlen_dom_walker::before_dom_children): Update call by adding
23966         new argument cleanup_eh.
23967         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23969 2018-01-03  Martin Liska  <mliska@suse.cz>
23971         PR ipa/83549
23972         * cif-code.def (VARIADIC_THUNK): New enum value.
23973         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23974         thunks.
23976 2018-01-03  Jan Beulich  <jbeulich@suse.com>
23978         * sse.md (mov<mode>_internal): Tighten condition for when to use
23979         vmovdqu<ssescalarsize> for TI and OI modes.
23981 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23983         Update copyright years.
23985 2018-01-03  Martin Liska  <mliska@suse.cz>
23987         PR ipa/83594
23988         * ipa-visibility.c (function_and_variable_visibility): Skip
23989         functions with noipa attribure.
23991 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
23993         * gcc.c (process_command): Update copyright notice dates.
23994         * gcov-dump.c (print_version): Ditto.
23995         * gcov.c (print_version): Ditto.
23996         * gcov-tool.c (print_version): Ditto.
23997         * gengtype.c (create_file): Ditto.
23998         * doc/cpp.texi: Bump @copying's copyright year.
23999         * doc/cppinternals.texi: Ditto.
24000         * doc/gcc.texi: Ditto.
24001         * doc/gccint.texi: Ditto.
24002         * doc/gcov.texi: Ditto.
24003         * doc/install.texi: Ditto.
24004         * doc/invoke.texi: Ditto.
24006 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24008         * vector-builder.h (vector_builder::m_full_nelts): Change from
24009         unsigned int to poly_uint64.
24010         (vector_builder::full_nelts): Update prototype accordingly.
24011         (vector_builder::new_vector): Likewise.
24012         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24013         (vector_builder::operator ==): Likewise.
24014         (vector_builder::finalize): Likewise.
24015         * int-vector-builder.h (int_vector_builder::int_vector_builder):
24016         Take the number of elements as a poly_uint64 rather than an
24017         unsigned int.
24018         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24019         from unsigned int to poly_uint64.
24020         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24021         (vec_perm_indices::new_vector): Likewise.
24022         (vec_perm_indices::length): Likewise.
24023         (vec_perm_indices::nelts_per_input): Likewise.
24024         (vec_perm_indices::input_nelts): Likewise.
24025         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24026         number of elements per input as a poly_uint64 rather than an
24027         unsigned int.  Use the original encoding for variable-length
24028         vectors, rather than clamping each individual element.
24029         For the second and subsequent elements in each pattern,
24030         clamp the step and base before clamping their sum.
24031         (vec_perm_indices::series_p): Handle polynomial element counts.
24032         (vec_perm_indices::all_in_range_p): Likewise.
24033         (vec_perm_indices_to_tree): Likewise.
24034         (vec_perm_indices_to_rtx): Likewise.
24035         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24036         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24037         (tree_vector_builder::new_binary_operation): Handle polynomial
24038         element counts.  Return false if we need to know the number
24039         of elements at compile time.
24040         * fold-const.c (fold_vec_perm): Punt if the number of elements
24041         isn't known at compile time.
24043 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24045         * vec-perm-indices.h (vec_perm_builder): Change element type
24046         from HOST_WIDE_INT to poly_int64.
24047         (vec_perm_indices::element_type): Update accordingly.
24048         (vec_perm_indices::clamp): Handle polynomial element_types.
24049         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24050         (vec_perm_indices::all_in_range_p): Likewise.
24051         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24052         than shwi trees.
24053         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24054         polynomial vec_perm_indices element types.
24055         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24056         * fold-const.c (fold_vec_perm): Likewise.
24057         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24058         * tree-vect-generic.c (lower_vec_perm): Likewise.
24059         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24060         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24061         element type to HOST_WIDE_INT.
24063 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24064             Alan Hayward  <alan.hayward@arm.com>
24065             David Sherwood  <david.sherwood@arm.com>
24067         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24068         rather than an int.  Use plus_constant.
24069         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24070         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24072 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24073             Alan Hayward  <alan.hayward@arm.com>
24074             David Sherwood  <david.sherwood@arm.com>
24076         * calls.c (emit_call_1, expand_call): Change struct_value_size from
24077         a HOST_WIDE_INT to a poly_int64.
24079 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24080             Alan Hayward  <alan.hayward@arm.com>
24081             David Sherwood  <david.sherwood@arm.com>
24083         * calls.c (load_register_parameters): Cope with polynomial
24084         mode sizes.  Require a constant size for BLKmode parameters
24085         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
24086         forces a parameter to be padded at the lsb end in order to
24087         fill a complete number of words, require the parameter size
24088         to be ordered wrt UNITS_PER_WORD.
24090 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24091             Alan Hayward  <alan.hayward@arm.com>
24092             David Sherwood  <david.sherwood@arm.com>
24094         * reload1.c (spill_stack_slot_width): Change element type
24095         from unsigned int to poly_uint64_pod.
24096         (alter_reg): Treat mode sizes as polynomial.
24098 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24099             Alan Hayward  <alan.hayward@arm.com>
24100             David Sherwood  <david.sherwood@arm.com>
24102         * reload.c (complex_word_subreg_p): New function.
24103         (reload_inner_reg_of_subreg, push_reload): Use it.
24105 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24106             Alan Hayward  <alan.hayward@arm.com>
24107             David Sherwood  <david.sherwood@arm.com>
24109         * lra-constraints.c (process_alt_operands): Reject matched
24110         operands whose sizes aren't ordered.
24111         (match_reload): Refer to this check here.
24113 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24114             Alan Hayward  <alan.hayward@arm.com>
24115             David Sherwood  <david.sherwood@arm.com>
24117         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24118         that the mode size is in the set {1, 2, 4, 8, 16}.
24120 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24121             Alan Hayward  <alan.hayward@arm.com>
24122             David Sherwood  <david.sherwood@arm.com>
24124         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24125         Use plus_constant instead of gen_rtx_PLUS.
24127 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24128             Alan Hayward  <alan.hayward@arm.com>
24129             David Sherwood  <david.sherwood@arm.com>
24131         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24132         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24133         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24134         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24135         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24136         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24137         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24138         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24139         * config/i386/i386.c (ix86_push_rounding): ...this new function.
24140         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24141         a poly_int64.
24142         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24143         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24144         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24145         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24146         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24147         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24148         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24149         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24150         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24151         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24152         function.
24153         * expr.c (emit_move_resolve_push): Treat the input and result
24154         of PUSH_ROUNDING as a poly_int64.
24155         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24156         (emit_push_insn): Likewise.
24157         * lra-eliminations.c (mark_not_eliminable): Likewise.
24158         * recog.c (push_operand): Likewise.
24159         * reload1.c (elimination_effects): Likewise.
24160         * rtlanal.c (nonzero_bits1): Likewise.
24161         * calls.c (store_one_arg): Likewise.  Require the padding to be
24162         known at compile time.
24164 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24165             Alan Hayward  <alan.hayward@arm.com>
24166             David Sherwood  <david.sherwood@arm.com>
24168         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24169         Use plus_constant instead of gen_rtx_PLUS.
24171 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24172             Alan Hayward  <alan.hayward@arm.com>
24173             David Sherwood  <david.sherwood@arm.com>
24175         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24176         rather than an int.
24178 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24179             Alan Hayward  <alan.hayward@arm.com>
24180             David Sherwood  <david.sherwood@arm.com>
24182         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24183         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24184         via stack temporaries.  Treat the mode size as polynomial too.
24186 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24187             Alan Hayward  <alan.hayward@arm.com>
24188             David Sherwood  <david.sherwood@arm.com>
24190         * expr.c (expand_expr_real_2): When handling conversions involving
24191         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24192         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
24193         as a poly_uint64 too.
24195 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24196             Alan Hayward  <alan.hayward@arm.com>
24197             David Sherwood  <david.sherwood@arm.com>
24199         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24201 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24202             Alan Hayward  <alan.hayward@arm.com>
24203             David Sherwood  <david.sherwood@arm.com>
24205         * combine.c (can_change_dest_mode): Handle polynomial
24206         REGMODE_NATURAL_SIZE.
24207         * expmed.c (store_bit_field_1): Likewise.
24208         * expr.c (store_constructor): Likewise.
24209         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24210         and polynomial REGMODE_NATURAL_SIZE.
24211         (gen_lowpart_common): Likewise.
24212         * reginfo.c (record_subregs_of_mode): Likewise.
24213         * rtlanal.c (read_modify_subreg_p): Likewise.
24215 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24216             Alan Hayward  <alan.hayward@arm.com>
24217             David Sherwood  <david.sherwood@arm.com>
24219         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24220         numbers of elements.
24222 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24223             Alan Hayward  <alan.hayward@arm.com>
24224             David Sherwood  <david.sherwood@arm.com>
24226         * match.pd: Cope with polynomial numbers of vector elements.
24228 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24229             Alan Hayward  <alan.hayward@arm.com>
24230             David Sherwood  <david.sherwood@arm.com>
24232         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24233         in a POINTER_PLUS_EXPR.
24235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24236             Alan Hayward  <alan.hayward@arm.com>
24237             David Sherwood  <david.sherwood@arm.com>
24239         * omp-simd-clone.c (simd_clone_subparts): New function.
24240         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24241         (ipa_simd_modify_function_body): Likewise.
24243 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24244             Alan Hayward  <alan.hayward@arm.com>
24245             David Sherwood  <david.sherwood@arm.com>
24247         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24248         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24249         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24250         (expand_vector_condition, vector_element): Likewise.
24251         (subparts_gt): New function.
24252         (get_compute_type): Use subparts_gt.
24253         (count_type_subparts): Delete.
24254         (expand_vector_operations_1): Use subparts_gt instead of
24255         count_type_subparts.
24257 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24258             Alan Hayward  <alan.hayward@arm.com>
24259             David Sherwood  <david.sherwood@arm.com>
24261         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24262         (vect_compile_time_alias): ...this new function.  Do the calculation
24263         on poly_ints rather than trees.
24264         (vect_prune_runtime_alias_test_list): Update call accordingly.
24266 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24267             Alan Hayward  <alan.hayward@arm.com>
24268             David Sherwood  <david.sherwood@arm.com>
24270         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24271         numbers of units.
24272         (vect_schedule_slp_instance): Likewise.
24274 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24275             Alan Hayward  <alan.hayward@arm.com>
24276             David Sherwood  <david.sherwood@arm.com>
24278         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24279         constant and extern definitions for variable-length vectors.
24280         (vect_get_constant_vectors): Note that the number of units
24281         is known to be constant.
24283 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24284             Alan Hayward  <alan.hayward@arm.com>
24285             David Sherwood  <david.sherwood@arm.com>
24287         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24288         of units as polynomial.  Choose between WIDE and NARROW based
24289         on multiple_p.
24291 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24292             Alan Hayward  <alan.hayward@arm.com>
24293             David Sherwood  <david.sherwood@arm.com>
24295         * tree-vect-stmts.c (simd_clone_subparts): New function.
24296         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24299             Alan Hayward  <alan.hayward@arm.com>
24300             David Sherwood  <david.sherwood@arm.com>
24302         * tree-vect-stmts.c (vectorizable_call): Treat the number of
24303         vectors as polynomial.  Use build_index_vector for
24304         IFN_GOMP_SIMD_LANE.
24306 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24307             Alan Hayward  <alan.hayward@arm.com>
24308             David Sherwood  <david.sherwood@arm.com>
24310         * tree-vect-stmts.c (get_load_store_type): Treat the number of
24311         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24312         for variable-length vectors.
24313         (vectorizable_mask_load_store): Treat the number of units as
24314         polynomial, asserting that it is constant if the condition has
24315         already been enforced.
24316         (vectorizable_store, vectorizable_load): Likewise.
24318 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24319             Alan Hayward  <alan.hayward@arm.com>
24320             David Sherwood  <david.sherwood@arm.com>
24322         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24323         of units as polynomial.  Punt if we can't tell at compile time
24324         which vector contains the final result.
24326 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24327             Alan Hayward  <alan.hayward@arm.com>
24328             David Sherwood  <david.sherwood@arm.com>
24330         * tree-vect-loop.c (vectorizable_induction): Treat the number
24331         of units as polynomial.  Punt on SLP inductions.  Use an integer
24332         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
24333         cast of such a series for variable-length floating-point
24334         reductions.
24336 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24337             Alan Hayward  <alan.hayward@arm.com>
24338             David Sherwood  <david.sherwood@arm.com>
24340         * tree.h (build_index_vector): Declare.
24341         * tree.c (build_index_vector): New function.
24342         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24343         of units as polynomial, forcibly converting it to a constant if
24344         vectorizable_reduction has already enforced the condition.
24345         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
24346         to create a {1,2,3,...} vector.
24347         (vectorizable_reduction): Treat the number of units as polynomial.
24348         Choose vectype_in based on the largest scalar element size rather
24349         than the smallest number of units.  Enforce the restrictions
24350         relied on above.
24352 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24353             Alan Hayward  <alan.hayward@arm.com>
24354             David Sherwood  <david.sherwood@arm.com>
24356         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24357         number of units as polynomial.
24359 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24360             Alan Hayward  <alan.hayward@arm.com>
24361             David Sherwood  <david.sherwood@arm.com>
24363         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24364         * target.def (autovectorize_vector_sizes): Return the vector sizes
24365         by pointer, using vector_sizes rather than a bitmask.
24366         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24367         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24368         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24369         Likewise.
24370         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24371         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24372         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24373         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24374         * omp-general.c (omp_max_vf): Likewise.
24375         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24376         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24377         * tree-vect-loop.c (vect_analyze_loop): Likewise.
24378         * tree-vect-slp.c (vect_slp_bb): Likewise.
24379         * doc/tm.texi: Regenerate.
24380         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24381         to a poly_uint64.
24382         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24383         the vector size as a poly_uint64 rather than an unsigned int.
24384         (current_vector_size): Change from an unsigned int to a poly_uint64.
24385         (get_vectype_for_scalar_type): Update accordingly.
24386         * tree.h (build_truth_vector_type): Take the size and number of
24387         units as a poly_uint64 rather than an unsigned int.
24388         (build_vector_type): Add a temporary overload that takes
24389         the number of units as a poly_uint64 rather than an unsigned int.
24390         * tree.c (make_vector_type): Likewise.
24391         (build_truth_vector_type): Take the number of units as a poly_uint64
24392         rather than an unsigned int.
24394 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24395             Alan Hayward  <alan.hayward@arm.com>
24396             David Sherwood  <david.sherwood@arm.com>
24398         * target.def (get_mask_mode): Take the number of units and length
24399         as poly_uint64s rather than unsigned ints.
24400         * targhooks.h (default_get_mask_mode): Update accordingly.
24401         * targhooks.c (default_get_mask_mode): Likewise.
24402         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24403         * doc/tm.texi: Regenerate.
24405 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24406             Alan Hayward  <alan.hayward@arm.com>
24407             David Sherwood  <david.sherwood@arm.com>
24409         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24410         * omp-general.c (omp_max_vf): Likewise.
24411         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24412         (expand_omp_simd): Handle polynomial safelen.
24413         * omp-low.c (omplow_simd_context): Add a default constructor.
24414         (omplow_simd_context::max_vf): Change from int to poly_uint64.
24415         (lower_rec_simd_input_clauses): Update accordingly.
24416         (lower_rec_input_clauses): Likewise.
24418 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24419             Alan Hayward  <alan.hayward@arm.com>
24420             David Sherwood  <david.sherwood@arm.com>
24422         * tree-vectorizer.h (vect_nunits_for_cost): New function.
24423         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24424         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24425         (vect_analyze_slp_cost): Likewise.
24426         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24427         (vect_model_load_cost): Likewise.
24429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24430             Alan Hayward  <alan.hayward@arm.com>
24431             David Sherwood  <david.sherwood@arm.com>
24433         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24434         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24435         from an unsigned int * to a poly_uint64_pod *.
24436         (calculate_unrolling_factor): New function.
24437         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
24439 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24440             Alan Hayward  <alan.hayward@arm.com>
24441             David Sherwood  <david.sherwood@arm.com>
24443         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24444         from an unsigned int to a poly_uint64.
24445         (_loop_vec_info::slp_unrolling_factor): Likewise.
24446         (_loop_vec_info::vectorization_factor): Change from an int
24447         to a poly_uint64.
24448         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24449         (vect_get_num_vectors): New function.
24450         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24451         (vect_get_num_copies): Use vect_get_num_vectors.
24452         (vect_analyze_data_ref_dependences): Change max_vf from an int *
24453         to an unsigned int *.
24454         (vect_analyze_data_refs): Change min_vf from an int * to a
24455         poly_uint64 *.
24456         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24457         than an unsigned HOST_WIDE_INT.
24458         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24459         (vect_analyze_data_ref_dependence): Change max_vf from an int *
24460         to an unsigned int *.
24461         (vect_analyze_data_ref_dependences): Likewise.
24462         (vect_compute_data_ref_alignment): Handle polynomial vf.
24463         (vect_enhance_data_refs_alignment): Likewise.
24464         (vect_prune_runtime_alias_test_list): Likewise.
24465         (vect_shift_permute_load_chain): Likewise.
24466         (vect_supportable_dr_alignment): Likewise.
24467         (dependence_distance_ge_vf): Take the vectorization factor as a
24468         poly_uint64 rather than an unsigned HOST_WIDE_INT.
24469         (vect_analyze_data_refs): Change min_vf from an int * to a
24470         poly_uint64 *.
24471         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24472         vfm1 as a poly_uint64 rather than an int.  Make the same change
24473         for the returned bound_scalar.
24474         (vect_gen_vector_loop_niters): Handle polynomial vf.
24475         (vect_do_peeling): Likewise.  Update call to
24476         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24477         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24478         be constant.
24479         * tree-vect-loop.c (vect_determine_vectorization_factor)
24480         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24481         (vect_get_known_peeling_cost): Likewise.
24482         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24483         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24484         (vect_transform_loop): Likewise.  Use the lowest possible VF when
24485         updating the upper bounds of the loop.
24486         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
24487         rather than an int.
24488         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24489         polynomial unroll factors.
24490         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24491         (vect_make_slp_decision): Likewise.
24492         (vect_supported_load_permutation_p): Likewise, and polynomial
24493         vf too.
24494         (vect_analyze_slp_cost): Handle polynomial vf.
24495         (vect_slp_analyze_node_operations): Likewise.
24496         (vect_slp_analyze_bb_1): Likewise.
24497         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24498         than an unsigned HOST_WIDE_INT.
24499         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24500         (vectorizable_load): Handle polynomial vf.
24501         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24502         a poly_uint64.
24503         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24505 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24506             Alan Hayward  <alan.hayward@arm.com>
24507             David Sherwood  <david.sherwood@arm.com>
24509         * match.pd: Handle bit operations involving three constants
24510         and try to fold one pair.
24512 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24514         * tree-vect-loop-manip.c: Include gimple-fold.h.
24515         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24516         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
24517         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24518         Add a path that uses a step of VF instead of 1, but disable it
24519         for now.
24520         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24521         and niters_no_overflow parameters.  Update calls to
24522         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24523         Create a new SSA name if the latter choses to use a ste other
24524         than zero, and return it via niters_vector_mult_vf_var.
24525         * tree-vect-loop.c (vect_transform_loop): Update calls to
24526         vect_do_peeling, vect_gen_vector_loop_niters and
24527         slpeel_make_loop_iterate_ntimes.
24528         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24529         (vect_gen_vector_loop_niters): Update declarations after above changes.
24531 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
24533         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24534         128-bit round to integer instructions.
24535         (ceil<mode>2): Likewise.
24536         (btrunc<mode>2): Likewise.
24537         (round<mode>2): Likewise.
24539 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24541         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24542         unaligned VSX load/store on P8/P9.
24543         (expand_block_clear): Allow the use of unaligned VSX
24544         load/store on P8/P9.
24546 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24548         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24549         New function.
24550         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24551         swap associated with both a load and a store.
24553 2018-01-02  Andrew Waterman  <andrew@sifive.com>
24555         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24556         * config/riscv/riscv.md (clear_cache): Use it.
24558 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
24560         * web.c: Remove out-of-date comment.
24562 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24564         * expr.c (fixup_args_size_notes): Check that any existing
24565         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24566         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24567         (emit_single_push_insn): ...here.
24569 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24571         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24572         (const_vector_encoded_nelts): New function.
24573         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24574         (const_vector_int_elt, const_vector_elt): Declare.
24575         * emit-rtl.c (const_vector_int_elt_1): New function.
24576         (const_vector_elt): Likewise.
24577         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24578         of CONST_VECTOR_ELT.
24580 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24582         * expr.c: Include rtx-vector-builder.h.
24583         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24584         directly on the tree encoding.
24585         (const_vector_from_tree): Likewise.
24586         * optabs.c: Include rtx-vector-builder.h.
24587         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24588         sequence of "u" values.
24589         * vec-perm-indices.c: Include rtx-vector-builder.h.
24590         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24591         directly on the vec_perm_indices encoding.
24593 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24595         * doc/rtl.texi (const_vector): Describe new encoding scheme.
24596         * Makefile.in (OBJS): Add rtx-vector-builder.o.
24597         * rtx-vector-builder.h: New file.
24598         * rtx-vector-builder.c: Likewise.
24599         * rtl.h (rtx_def::u2): Add a const_vector field.
24600         (CONST_VECTOR_NPATTERNS): New macro.
24601         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24602         (CONST_VECTOR_DUPLICATE_P): Likewise.
24603         (CONST_VECTOR_STEPPED_P): Likewise.
24604         (CONST_VECTOR_ENCODED_ELT): Likewise.
24605         (const_vec_duplicate_p): Check for a duplicated vector encoding.
24606         (unwrap_const_vec_duplicate): Likewise.
24607         (const_vec_series_p): Check for a non-duplicated vector encoding.
24608         Say that the function only returns true for integer vectors.
24609         * emit-rtl.c: Include rtx-vector-builder.h.
24610         (gen_const_vec_duplicate_1): Delete.
24611         (gen_const_vector): Call gen_const_vec_duplicate instead of
24612         gen_const_vec_duplicate_1.
24613         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24614         (gen_const_vec_duplicate): Use rtx_vector_builder.
24615         (gen_const_vec_series): Likewise.
24616         (gen_rtx_CONST_VECTOR): Likewise.
24617         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24618         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24619         Build a new vector rather than modifying a CONST_VECTOR in-place.
24620         (handle_special_swappables): Update call accordingly.
24621         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24622         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24623         Build a new vector rather than modifying a CONST_VECTOR in-place.
24624         (handle_special_swappables): Update call accordingly.
24626 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24628         * simplify-rtx.c (simplify_const_binary_operation): Use
24629         CONST_VECTOR_ELT instead of XVECEXP.
24631 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24633         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24634         the selector elements to be different from the data elements
24635         if the selector is a VECTOR_CST.
24636         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24637         ssizetype for the selector.
24639 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24641         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24642         before testing each element individually.
24643         * tree-vect-generic.c (lower_vec_perm): Likewise.
24645 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24647         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24648         * selftest-run-tests.c (selftest::run_tests): Call it.
24649         * vector-builder.h (vector_builder::operator ==): New function.
24650         (vector_builder::operator !=): Likewise.
24651         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24652         (vec_perm_indices::all_from_input_p): New function.
24653         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24654         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24655         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24656         instead of reading the VECTOR_CST directly.  Detect whether both
24657         vector inputs are the same before constructing the vec_perm_indices,
24658         and update the number of inputs argument accordingly.  Use the
24659         utility functions added above.  Only construct sel2 if we need to.
24661 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24663         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24664         the broadcast of the low byte.
24665         (expand_mult_highpart): Use an explicit encoding for the permutes.
24666         * optabs-query.c (can_mult_highpart_p): Likewise.
24667         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24668         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24669         (vectorizable_bswap): Likewise.
24670         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24671         explicit encoding for the power-of-2 permutes.
24672         (vect_permute_store_chain): Likewise.
24673         (vect_grouped_load_supported): Likewise.
24674         (vect_permute_load_chain): Likewise.
24676 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24678         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24679         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24680         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24681         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24682         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24683         (vect_gen_perm_mask_any): Likewise.
24685 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24687         * int-vector-builder.h: New file.
24688         * vec-perm-indices.h: Include int-vector-builder.h.
24689         (vec_perm_indices): Redefine as an int_vector_builder.
24690         (auto_vec_perm_indices): Delete.
24691         (vec_perm_builder): Redefine as a stand-alone class.
24692         (vec_perm_indices::vec_perm_indices): New function.
24693         (vec_perm_indices::clamp): Likewise.
24694         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24695         (vec_perm_indices::new_vector): New function.
24696         (vec_perm_indices::new_expanded_vector): Update for new
24697         vec_perm_indices class.
24698         (vec_perm_indices::rotate_inputs): New function.
24699         (vec_perm_indices::all_in_range_p): Operate directly on the
24700         encoded form, without computing elided elements.
24701         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24702         encoding.  Update for new vec_perm_indices class.
24703         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24704         the given vec_perm_builder.
24705         (expand_vec_perm_var): Update vec_perm_builder constructor.
24706         (expand_mult_highpart): Use vec_perm_builder instead of
24707         auto_vec_perm_indices.
24708         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24709         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
24710         or double series encoding as appropriate.
24711         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24712         vec_perm_indices instead of auto_vec_perm_indices.
24713         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24714         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24715         (vect_permute_store_chain): Likewise.
24716         (vect_grouped_load_supported): Likewise.
24717         (vect_permute_load_chain): Likewise.
24718         (vect_shift_permute_load_chain): Likewise.
24719         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24720         (vect_transform_slp_perm_load): Likewise.
24721         (vect_schedule_slp_instance): Likewise.
24722         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24723         (vectorizable_mask_load_store): Likewise.
24724         (vectorizable_bswap): Likewise.
24725         (vectorizable_store): Likewise.
24726         (vectorizable_load): Likewise.
24727         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24728         vec_perm_indices instead of auto_vec_perm_indices.  Use
24729         tree_to_vec_perm_builder to read the vector from a tree.
24730         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24731         vec_perm_builder instead of a vec_perm_indices.
24732         (have_whole_vector_shift): Use vec_perm_builder and
24733         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
24734         truncation to calc_vec_perm_mask_for_shift.
24735         (vect_create_epilog_for_reduction): Likewise.
24736         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24737         from auto_vec_perm_indices to vec_perm_indices.
24738         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24739         instead of changing individual elements.
24740         (aarch64_vectorize_vec_perm_const): Use new_vector to install
24741         the vector in d.perm.
24742         * config/arm/arm.c (expand_vec_perm_d::perm): Change
24743         from auto_vec_perm_indices to vec_perm_indices.
24744         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24745         instead of changing individual elements.
24746         (arm_vectorize_vec_perm_const): Use new_vector to install
24747         the vector in d.perm.
24748         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24749         Update vec_perm_builder constructor.
24750         (rs6000_expand_interleave): Likewise.
24751         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24752         (rs6000_expand_interleave): Likewise.
24754 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24756         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24757         to qimode could truncate the indices.
24758         * optabs.c (expand_vec_perm_var): Likewise.
24760 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24762         * Makefile.in (OBJS): Add vec-perm-indices.o.
24763         * vec-perm-indices.h: New file.
24764         * vec-perm-indices.c: Likewise.
24765         * target.h (vec_perm_indices): Replace with a forward class
24766         declaration.
24767         (auto_vec_perm_indices): Move to vec-perm-indices.h.
24768         * optabs.h: Include vec-perm-indices.h.
24769         (expand_vec_perm): Delete.
24770         (selector_fits_mode_p, expand_vec_perm_var): Declare.
24771         (expand_vec_perm_const): Declare.
24772         * target.def (vec_perm_const_ok): Replace with...
24773         (vec_perm_const): ...this new hook.
24774         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24775         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24776         * doc/tm.texi: Regenerate.
24777         * optabs.def (vec_perm_const): Delete.
24778         * doc/md.texi (vec_perm_const): Likewise.
24779         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24780         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24781         expand_vec_perm for constant permutation vectors.  Assert that
24782         the mode of variable permutation vectors is the integer equivalent
24783         of the mode that is being permuted.
24784         * optabs-query.h (selector_fits_mode_p): Declare.
24785         * optabs-query.c: Include vec-perm-indices.h.
24786         (selector_fits_mode_p): New function.
24787         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24788         is defined, instead of checking whether the vec_perm_const_optab
24789         exists.  Use targetm.vectorize.vec_perm_const instead of
24790         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
24791         fit in the vector mode before using a variable permute.
24792         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24793         vec_perm_indices instead of an rtx.
24794         (expand_vec_perm): Replace with...
24795         (expand_vec_perm_const): ...this new function.  Take the selector
24796         as a vec_perm_indices rather than an rtx.  Also take the mode of
24797         the selector.  Update call to shift_amt_for_vec_perm_mask.
24798         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24799         Use vec_perm_indices::new_expanded_vector to expand the original
24800         selector into bytes.  Check whether the indices fit in the vector
24801         mode before using a variable permute.
24802         (expand_vec_perm_var): Make global.
24803         (expand_mult_highpart): Use expand_vec_perm_const.
24804         * fold-const.c: Includes vec-perm-indices.h.
24805         * tree-ssa-forwprop.c: Likewise.
24806         * tree-vect-data-refs.c: Likewise.
24807         * tree-vect-generic.c: Likewise.
24808         * tree-vect-loop.c: Likewise.
24809         * tree-vect-slp.c: Likewise.
24810         * tree-vect-stmts.c: Likewise.
24811         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24812         Delete.
24813         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24814         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24815         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24816         (aarch64_vectorize_vec_perm_const): ...this new function.
24817         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24818         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24819         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24820         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24821         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24822         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24823         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24824         into...
24825         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
24826         check for NEON modes.
24827         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24828         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24829         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24830         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24831         into...
24832         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
24833         the old VEC_PERM_CONST conditions.
24834         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24835         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24836         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24837         (ia64_vectorize_vec_perm_const_ok): Merge into...
24838         (ia64_vectorize_vec_perm_const): ...this new function.
24839         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24840         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24841         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24842         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24843         * config/mips/mips.c (mips_expand_vec_perm_const)
24844         (mips_vectorize_vec_perm_const_ok): Merge into...
24845         (mips_vectorize_vec_perm_const): ...this new function.
24846         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24847         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24848         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24849         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24850         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24851         (rs6000_expand_vec_perm_const): Delete.
24852         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24853         Delete.
24854         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24855         (altivec_expand_vec_perm_const_le): Take each operand individually.
24856         Operate on constant selectors rather than rtxes.
24857         (altivec_expand_vec_perm_const): Likewise.  Update call to
24858         altivec_expand_vec_perm_const_le.
24859         (rs6000_expand_vec_perm_const): Delete.
24860         (rs6000_vectorize_vec_perm_const_ok): Delete.
24861         (rs6000_vectorize_vec_perm_const): New function.
24862         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24863         an element count and rtx array.
24864         (rs6000_expand_extract_even): Update call accordingly.
24865         (rs6000_expand_interleave): Likewise.
24866         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24867         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24868         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24869         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24870         (rs6000_expand_vec_perm_const): Delete.
24871         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24872         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24873         (altivec_expand_vec_perm_const_le): Take each operand individually.
24874         Operate on constant selectors rather than rtxes.
24875         (altivec_expand_vec_perm_const): Likewise.  Update call to
24876         altivec_expand_vec_perm_const_le.
24877         (rs6000_expand_vec_perm_const): Delete.
24878         (rs6000_vectorize_vec_perm_const_ok): Delete.
24879         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
24880         reference to the SPE evmerge intructions.
24881         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24882         an element count and rtx array.
24883         (rs6000_expand_extract_even): Update call accordingly.
24884         (rs6000_expand_interleave): Likewise.
24885         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
24886         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
24887         new function.
24888         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24890 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24892         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
24893         vector mode and that that mode matches the mode of the data
24894         being permuted.
24895         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
24896         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
24897         directly using expand_vec_perm_1 when forcing selectors into
24898         registers.
24899         (expand_vec_perm_var): New function, split out from expand_vec_perm.
24901 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24903         * optabs-query.h (can_vec_perm_p): Delete.
24904         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
24905         * optabs-query.c (can_vec_perm_p): Split into...
24906         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
24907         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
24908         particular selector is valid.
24909         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24910         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24911         (vect_grouped_load_supported): Likewise.
24912         (vect_shift_permute_load_chain): Likewise.
24913         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24914         (vect_transform_slp_perm_load): Likewise.
24915         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24916         (vectorizable_bswap): Likewise.
24917         (vect_gen_perm_mask_checked): Likewise.
24918         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
24919         implementations of variable permutation vectors into account
24920         when deciding which selector to use.
24921         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
24922         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
24923         with a false third argument.
24924         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
24925         to test whether the constant selector is valid and can_vec_perm_var_p
24926         to test whether a variable selector is valid.
24928 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24930         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
24931         * optabs-query.c (can_vec_perm_p): Likewise.
24932         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
24933         instead of vec_perm_indices.
24934         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
24935         (vect_gen_perm_mask_checked): Likewise,
24936         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
24937         (vect_gen_perm_mask_checked): Likewise,
24939 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24941         * optabs-query.h (qimode_for_vec_perm): Declare.
24942         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
24943         (qimode_for_vec_perm): ...this new function.
24944         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
24946 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24948         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
24949         does not have a conditional at the top.
24951 2018-01-02  Richard Biener  <rguenther@suse.de>
24953         * ipa-inline.c (big_speedup_p): Fix expression.
24955 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
24957         PR target/81616
24958         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
24959         for generic 4->6.
24961 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
24963         PR target/81616
24964         Generic tuning.
24965         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24966         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24967         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24968         cond_taken_branch_cost 3->4.
24970 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
24972         PR tree-optimization/83581
24973         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24974         TODO_cleanup_cfg if any changes have been made.
24976         PR middle-end/83608
24977         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24978         convert_modes if target mode has the right side, but different mode
24979         class.
24981         PR middle-end/83609
24982         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24983         last argument when extracting from CONCAT.  If either from_real or
24984         from_imag is NULL, use expansion through memory.  If result is not
24985         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24986         the parts directly to inner mode, if even that fails, use expansion
24987         through memory.
24989         PR middle-end/83623
24990         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24991         check for bswap in mode rather than HImode and use that in expand_unop
24992         too.
24994 Copyright (C) 2018 Free Software Foundation, Inc.
24996 Copying and distribution of this file, with or without modification,
24997 are permitted in any medium without royalty provided the copyright
24998 notice and this notice are preserved.