* varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
[official-gcc.git] / gcc / ChangeLog
blobf8fedba6171098ba420234f8c0a7b9e29013126d
1 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
4         the init value.
6 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
8         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
9         early gimple folding of vec_splat().
10         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
11         * gimple-fold.h: Add an extern define for tree_vec_extract().
13 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
15         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
16         wrappers around TREE_TYPE comparisons.
18 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
20         PR target/80080
21         * config/s390/predicates.md: Add nonsym_memory_operand.
22         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
23         contains a SYMBOL_REF, load it into an intermediate pseudo.
24         (s390_emit_compare_and_swap): Legitimize operand.
25         * config/s390/s390.md: Use the new nonsym_memory_operand
26         with UNSPECV_CAS patterns.
28 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
30         PR target/80080
31         * config/s390/s390-passes.def: New file.
32         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
33         declaration.
34         (make_pass_s390_early_mach): Add declaration.
35         * config/s390/s390.c (make_pass_s390_early_mach):
36         (s390_option_override): Remove dynamic registration.
37         * config/s390/t-s390: Add s390-passes.def.
39 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
41         * config/s390/s390.c (s390_decompose_constant_pool_ref):
42         Remove UNSPEC_LTREL_BASE check.
43         (annotate_constant_pool_refs): Likewise.
44         (find_constant_pool_ref): Likewise.
45         (find_ltrel_base): Removed.
46         (replace_ltrel_base): Removed.
47         (s390_mainpool_finish): Remove replace_ltrel_base call.
48         (s390_chunkify_start): Remove pending LTREL_BASE logic.
49         (s390_chunkify_finish): Remove replace_ltrel_base call.
50         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
52 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
54         PR target/86779
55         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
56         to speculation_safe_value_not_needed.
58 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
59             Bernd Schmidt  <bernds_cb1@t-online.de>
61         * config/nvptx/nvptx-opts.h: New file.
62         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
63         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
64         (ASM_SPEC): Define.
65         (TARGET_SM35): New macro.
66         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
67         correct predicate.
68         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
69         values.
70         (misa=): New option.
71         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
73 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
75         * config/i386/i386.md (truncdfsf2): Remove expander.
76         (truncdfsf2_with_temp): Ditto.
77         (truncxf<mode>2): Ditto.
78         (*truncdfsf_fast_mixed): Remove insn pattern.
79         (*truncdfsf_fast_i387): Ditto.
80         (*truncdfsf_mixed): Ditto.
81         (*truncdfsf_i387): Ditto.
82         (*truncdfsf2_i387_1): Ditto.
83         (*truncxfsf2_mixed): Ditto.
84         (*truncxfdf2_mixed): Ditto.
85         (*truncxf<mode>2_i387_noop): Ditto. Update callers
86         to call gen_truncxf<mode>2 instead.
87         (*truncxf<mode>2_i387): Remove.
88         (reg->reg splitters): Remove splitter pattern.
89         (reg->mem splitters): Ditto.
91         (truncdfsf2): New insn pattern.
92         (truncxf<mode>2): Ditto.
94 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
96         * tree-ssa-math-opts.c (is_mult_by): New function.
97         (is_square_of): Use the above.
98         (optimize_recip_sqrt): New function.
99         (pass_cse_reciprocals::execute): Use the above.
101 2018-09-05  Richard Biener  <rguenther@suse.de>
103         PR bootstrap/87134
104         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
105         to zero-init the emplaced vec.
107 2018-09-05  Martin Liska  <mliska@suse.cz>
109         PR tree-optimization/87205
110         * tree-switch-conversion.c (pass_lower_switch::execute):
111         Group cases for switch statements.
113 2018-09-05  Richard Biener  <rguenther@suse.de>
115         PR tree-optimization/87217
116         * tree-ssa-sccvn.c (vuse_valueize): New.
117         (vn_reference_lookup_pieces): Use it.
118         (vn_reference_lookup): Likewise.
120 2018-09-05  Nathan Sidwell  <nathan@acm.org>
122         PR c++/87137
123         * stor-layout.c (place_field): Scan forwards to check last
124         bitfield when ms_bitfield_placement is in effect.
126 2018-09-05  Richard Biener  <rguenther@suse.de>
128         PR bootstrap/87225
129         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
130         return.
132 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
133             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
135         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
136         * config.gcc (extra_objs): Build it.
137         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
138         Likewise.
139         * config/aarch64/aarch64-passes.def
140         (pass_tag_collision_avoidance): New pass.
141         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
142         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
143         (aarch64_classify_address): Remove static qualifier.
144         (aarch64_address_info, aarch64_address_type): Move to...
145         * config/aarch64/aarch64-protos.h: ... here.
146         (make_pass_tag_collision_avoidance): New function.
147         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
148         New tuning flag.
150 2018-09-05  Martin Liska  <mliska@suse.cz>
152         * doc/gcov.texi: Update documentation of humar
153         readable mode.
154         * gcov.c (format_count): Print one decimal place, it provides
155         more fine number of situations like '1G' vs. '1.4G'.
157 2018-09-05  Martin Liska  <mliska@suse.cz>
159         PR target/87164
160         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
161         * optc-gen.awk: Allow 'Var' for Deprecated options in order
162         to generate a MASK value.
164 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
166         PR debug/86593
167         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
168         if frame pointer isn't used.
169         (compute_frame_pointer_to_fb_displacement): Likewise.
171 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
173         PR target/87198
174         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
175         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
176         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
177         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
178         and OPTION_MASK_ISA_XSAVEC_UNSET.
180 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
182         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
183         XOR operations in NAND case.
185 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
187         * wide-int-range.cc (wide_int_range_convert): New.
188         * wide-int-range.h (wide_int_range_convert): New.
189         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
190         code into wide_int_range_convert.
191         (extract_range_into_wide_ints): Do not munge anti range constants
192         into the entire domain.  Just return the range back.
194 2018-09-04  Martin Liska  <mliska@suse.cz>
196         * genmatch.c (output_line_directive): Add new argument
197         fnargs.
198         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
200 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
202         * doc/invoke.texi (Option Summary): Add whitespace.
204         * doc/invoke.texi (Option Summary): Add -Waligned-new.
206 2018-09-04  Richard Biener  <rguenther@suse.de>
208         PR tree-optimization/87211
209         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
210         backedge value we're supposed to treat as VARYING also number
211         the PHI to VARYING in case it got a different value-number already.
213 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
215         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
216         (extract_range_from_binary_expr_1): Do not call
217         vrp_can_optimize_bit_op.
218         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
219         static.
220         (wide_int_range_get_mask_and_bounds): New.
221         (wide_int_range_optimize_bit_op): New.
222         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
223         (wide_int_range_bit_and): Same.
224         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
225         (wide_int_range_optimize_bit_op): New.
226         (wide_int_range_get_mask_and_bounds): New.
228 2018-09-04  Richard Biener  <rguenther@suse.de>
230         PR tree-optimization/87176
231         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
232         variable.  When value-numbering a virtual PHI node make sure
233         to not value-number to the backedge value.
235 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
237         * doc/extend.texi (Long Long, Hex Floats): Document support for
238         long long and hex floats in more recent versions of ISO C++.
240 2018-09-03  Richard Biener  <rguenther@suse.de>
242         PR tree-optimization/87177
243         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
244         cleanup.
246 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
248         * bb-reorder.c (edge_order): Convert to C-qsort-style
249         tri-state comparator.
250         (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
252 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
254         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
255         tri-state comparator.
256         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
258 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
260         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
261         (mergesort): ... here as maximum count for using netsort.
262         (gcc_qsort): Set nlim to 3 if stable sort is requested.
263         (gcc_stablesort): New.
264         * system.h (gcc_stablesort): Declare.
266 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
268         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
269         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
270         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
272 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
274         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
275         lxsdx and stxsdx alternatives.
276         (*mov<mode>_hardfloat64): Ditto.
277         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
279 2018-09-03  Richard Biener  <rguenther@suse.de>
281         PR tree-optimization/87200
282         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
283         simplify result.
285 2018-09-03  Martin Liska  <mliska@suse.cz>
287         PR tree-optimization/87201
288         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
289         Fix parenthesis in an expression.
291 2018-09-03  Richard Biener  <rguenther@suse.de>
293         PR tree-optimization/87197
294         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
295         visited.  CSE the VN_INFO hashtable lookup.
297         PR tree-optimization/87169
298         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
299         iterating make sure there's no extra backedges from irreducible
300         regions feeding the header.  Mark the destination block
301         executable.
303 2018-09-03  Martin Liska  <mliska@suse.cz>
305         PR driver/83193
306         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
307         * common/common-targhooks.c (default_get_valid_option_values):
308         New function.
309         * common/common-targhooks.h (default_get_valid_option_values):
310         Likewise.
311         * common/config/i386/i386-common.c: Move processor_target_table
312         from i386.c.
313         (ix86_get_valid_option_values): New function.
314         (TARGET_GET_VALID_OPTION_VALUES): New macro.
315         * config/i386/i386.c (struct ptt): Move to i386-common.c.
316         (PTA_*): Move all defined masks into i386-common.c.
317         (ix86_function_specific_restore): Use new processor_cost_table.
318         * config/i386/i386.h (struct ptt): Moved from i386.c.
319         (struct pta): Likewise.
320         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
321         * doc/tm.texi.in: Likewise.
322         * opt-suggestions.c (option_proposer::suggest_option):
323         Pass prefix to build_option_suggestions.
324         (option_proposer::get_completions): Likewise.
325         (option_proposer::build_option_suggestions): Use the new target
326         hook.
327         * opts.c (struct option_help_tuple): New struct.
328         (print_filtered_help): Use the new target hook.
330 2018-09-03  Martin Liska  <mliska@suse.cz>
332         PR middle-end/59521
333         * predict.c (set_even_probabilities): Add likely_edges
334         argument and handle cases where we have precisely one
335         likely edge.
336         (combine_predictions_for_bb): Catch also likely_edges.
337         (tree_predict_by_opcode): Handle gswitch statements.
338         * tree-cfg.h (find_case_label_for_value): New declaration.
339         (find_taken_edge_switch_expr): Likewise.
340         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
341         Find pivot in decision tree based on probabily, not by number of
342         nodes.
344 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
346         * doc/standards.texi (Standards): Update Objective-C reference.
348 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
350         * doc/install.texi (Prerequisites): Update link for MPC.
352 2018-09-01  Michael Matz  <matz@suse.de>
354         PR tree-optimization/87074
355         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
356         PHIs for outer-loop uses.
358 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
360         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
361         * doc/invoke.texi (C Dialect Options): Ditto.
363 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
365         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
367 2018-08-31  Richard Biener  <rguenther@suse.de>
369         PR tree-optimization/87168
370         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
371         (rpo_elim::eliminate_avail): When OP was not visited it must
372         be available.
374 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
376         * tree-vrp.c (copy_value_range): Convert param "from" from
377         "value_range *" to "const value_range *".
378         (range_is_null): Likewise for param "vr".
379         (range_int_cst_p): Likewise.
380         (range_int_cst_singleton_p): Likewise.
381         (symbolic_range_p): Likewise.
382         (value_ranges_intersect_p): Likewise for both params.
383         (value_range_nonnegative_p): Likewise for param "vr".
384         (value_range_constant_singleton): Likewise.
385         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
386         (extract_range_into_wide_ints): Likewise for param "vr".
387         (extract_range_from_multiplicative_op): Likewise for params "vr0"
388         and "vr1".
389         (vrp_can_optimize_bit_op): Likewise.
390         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
391         "vr1_".
392         (extract_range_from_unary_expr): Likewise.
393         (debug_value_range): Likewise for param "vr".
394         (value_range::dump): Add "const" qualifier.
395         (vrp_prop::check_array_ref): Convert local "vr" from
396         "value_range *" to "const value_range *".
397         (vrp_prop::check_mem_ref): Likewise.
398         (vrp_prop::visit_stmt): Likewise for local "old_vr".
399         (vrp_intersect_ranges_1): Likewise for param "vr_1".
400         (vrp_intersect_ranges): Likewise.
401         (simplify_stmt_for_jump_threading): Likewise for local "vr".
402         (vrp_prop::vrp_finalize): Likewise.
403         * tree-vrp.h (value_range::dump): Add "const" qualifier.
404         (vrp_intersect_ranges): Add "const" qualifier to params as above.
405         (extract_range_from_unary_expr): Likewise.
406         (value_range_constant_singleton): Likewise.
407         (symbolic_range_p): Likewise.
408         (copy_value_range): Likewise.
409         (extract_range_from_binary_expr_1): Likewise.
410         (range_int_cst_p): Likewise.
411         (vrp_set_zero_nonzero_bits): Likewise.
412         (range_int_cst_singleton_p): Likewise.
414 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
416         * config/aarch64/arm_neon.h (vabsd_s64): New.
417         (vnegd_s64): Likewise.
419 2018-08-31  Martin Jambor  <mjambor@suse.cz>
421         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
423 2018-08-31  Martin Liska  <mliska@suse.cz>
425         * ipa-icf.c (sem_item::add_type): Use
426         sem_item::m_type_hash_cache.
427         * ipa-icf.h: Move the cache from sem_item_optimizer
428         to sem_item.
430 2018-08-31  Nathan Sidwell  <nathan@acm.org>
432         * doc/extend.texi (Backwards Compatibility): Remove implicit
433         extern C leeway of () being (...).
435 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
437         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
439 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
441         PR target/86684
442         PR target/87149
443         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
445 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
447         PR middle-end/87138
448         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
449         gen_int_mode.  Formatting fixes.
451 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
453         * target.def (custom_function_descriptors): Improve documentation.
454         * doc/tm.texi.in (Trampolines): Expand discussion of function
455         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
456         beginning of the section.
457         * doc/tm.texi: Regenerated.
459 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
461         * cfg.h (class auto_edge_flag): Spell out the template-id of the
462         base class in the initializer list.  This is a workaround for
463         building with older GCC.
464         (class auto_bb_flag): Likewise.
466 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
468         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
469         (altivec_vcmpequ<VI_char>_p): Remove star.
470         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
471         vector load modes.
472         (expand_strncmp_vec_sequence): New function.
473         (emit_final_str_compare_vec): New function.
474         (expand_strn_compare): Add support for vector strncmp.
475         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
476         length specification to bytes.
477         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
478         (vcmpnezb_p): New pattern.
479         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
480         for option -mstring-compare-inline-limit.
482 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
484         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
485         (PTA_SKYLAKE): Add PTA_AES.
486         (PTA_GOLDMONT): Likewise.
488 2018-08-29  Jan Hubicka  <jh@suse.cz>
490         PR lto/86517
491         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
492         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
494 2018-08-29  Jan Hubicka  <jh@suse.cz>
496         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
497         TYPE_STUB_DECL.
498         (hash_tree): Do not visit TYPE_STUB_DECL.
499         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
500         stream TYPE_STUB_DECL.
501         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
502         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
503         after free_lang_data.
504         (type_in_anonymous_namespace_p): Likewise.
506 2018-08-29  Jan Hubicka  <jh@suse.cz>
508         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
509         comment that it has to be even number.
510         (class sreal): Change m_sig type to int32_t.
511         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
512         int64_t for temporary calculations.
513         (sreal_verify_basics): Drop one bit from minimum and maximum.
515 2018-08-30  Richard Biener  <rguenther@suse.de>
517         PR tree-optimization/87147
518         * tree-ssa-sccvn.c (SSA_VISITED): New function.
519         (visit_phi): When the degenerate result is from the backedge and
520         we didn't visit its definition yet drop to VARYING.
521         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
523 2018-08-29  Jan Hubicka  <jh@suse.cz>
525         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
526         DECL_VINDEX.
527         (hash_tree): Likewise.
529 2018-08-29  Jan Hubicka  <jh@suse.cz>
531         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
532         and TYPE_NEXT_REF_TO.
534 2018-08-29  Jan Hubicka  <jh@suse.cz>
536         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
537         comment that it has to be even number.
538         (class sreal): Change m_sig type to int32_t.
539         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
540         int64_t for temporary calculations.
541         (sreal_verify_basics): Drop one bit from minimum and maximum.
543 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
545         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
547 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
549         PR middle-end/86995
550         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
551         if to_add is negative.
553 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
555         PR middle-end/87053
556         * builtins.c (c_strlen): Improve range checks.
558 2018-08-29  Martin Sebor  <msebor@redhat.com>
559             Jeff Law  <law@redhat.com>
561         PR tree-optimization/86714
562         PR tree-optimization/86711
563         * builtins.c (c_strlen): Add arguments to call to string_constant.
564         * expr.c (string_constant): Add argument.  Detect missing nul
565         terminator and outermost declaration it's missing in.
566         * expr.h (string_constant): Add argument.
567         * fold-const.c (read_from_constant_string): Add arguments to call to
568         string_constant.
569         (c_getstr): Likewise.
570         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
571         to string_constant.
572         * tree-ssa-strlen.c (get_stridx): Likewise.
574 2018-08-29  Jan Hubicka  <jh@suse.cz>
576         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
577         Do not stream DECL_VINDEX.
578         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
579         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
580         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
582 2018-08-29  Richard Biener  <rguenther@suse.de>
584         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
585         virtual operands that are not default defs to honor region
586         boundaries.
587         (rpo_vn_valueize): Remove ineffective code here.
589 2018-08-29  Richard Biener  <rguenther@suse.de>
591         PR tree-optimization/87132
592         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
593         when skipping defs reachable over backedges.
595 2018-08-29  Richard Biener  <rguenther@suse.de>
597         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
598         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
599         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
600         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
601         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
602         (vn_reference_lookup_3): Remove use of const_parms.
603         (free_rpo_vn): Do not free const_parms.
604         (do_rpo_vn): Do not call init_const_parms.
605         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
606         SSA_NAME_POINTS_TO_READONLY_MEMORY.
607         (call_may_clobber_ref_p_1): Likewise.
609 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
611         PR other/86726
612         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
613         (-O): Ditto.
614         (-ftree-scev-cprop): Document.
616 2018-08-29  Jan Hubicka  <jh@suse.cz>
618         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
619         parameters.
620         (sreal constructor): Update.
621         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
622         sreal:operator/): Update.
624 2018-08-29  Martin Liska  <mliska@suse.cz>
626         * tree-switch-conversion.c (switch_conversion::expand):
627         Strenghten assumption about gswitch statements.
629 2018-08-29  Richard Biener  <rguenther@suse.de>
631         PR tree-optimization/87117
632         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
633         re-value-number released SSA VDEFs.
635 2018-08-29  Richard Biener  <rguenther@suse.de>
637         PR tree-optimization/87126
638         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
640 2018-08-28  Jim Wilson  <jimw@sifive.com>
642         * config/riscv/pic.md: Rewrite.
643         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
644         invalid address.
645         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
646         (SOFTF, default_load, softload, softstore): New.
648 2018-08-28  Jeff Law  <law@redhat.com>
650         * fold-const.c (fold_binary_loc): Remove recently added assert.
652 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
654         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
655         to OP parmeter of generated function.
657 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
659         PR tree-optimization/87009
660         * match.pd: Add boolean optimizations.
662 2018-08-28  Martin Sebor  <msebor@redhat.com>
664         PR middle-end/86631
665         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
666         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
667         (pass_walloca::gate): Use it.
668         (alloca_call_type): Same.
669         (pass_walloca::execute): Same.
670         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
672 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
674         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
675         GCC_VERSION for usage of "__gcc_dump_printf__" format from
676         >= 3005 to >= 9000.
678 2018-08-28  Richard Biener  <rguenther@suse.de>
680         PR tree-optimization/87124
681         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
682         constants before looking up avail.
684 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
686         PR middle-end/87099
687         * calls.c (maybe_warn_nonstring_arg): Punt early if
688         warn_stringop_overflow is zero.  Don't call get_range_strlen
689         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
690         Swap comparison operands to have constants on rhs.  Only use
691         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
692         increment lenrng[0].
694 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
696         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
697         use of tree_to_shwi.  Remove duplicated test for the size being
698         a whole number of bytes.
700 2018-08-28  Richard Biener  <rguenther@suse.de>
702         PR tree-optimization/87117
703         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
704         Handle removed stmt without LHS (GIMPLE_NOP).
706 2018-08-28  Richard Biener  <rguenther@suse.de>
708         PR tree-optimization/87117
709         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
710         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
712 2018-08-28  Richard Biener  <rguenther@suse.de>
714         PR tree-optimization/87117
715         * tree-ssa-pre.c (compute_avail): Do not make expressions
716         with predicated values available.
717         (get_expr_value_id): Assert we do not run into predicated value
718         expressions.
720 2018-08-28  Richard Biener  <rguenther@suse.de>
722         PR tree-optimization/87117
723         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
724         get virtual operands.
725         (get_expr_operands): Handle STRING_CST like other decls.
727 2018-08-28  Martin Liska  <mliska@suse.cz>
729         * tree.h: Update documentation of fndecl_built_in_p
730         functions.
733 2018-08-27  Jeff Law  <law@redhat.com>
734         PR tree-optimization/87110
735         * tree-ssa-dse.c (compute_trims): Handle non-constant
736         TYPE_SIZE_UNIT.
738 2018-08-27  Martin Sebor  <msebor@redhat.com>
740         PR tree-optimization/86914
741         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
743 2018-08-27  Martin Sebor  <msebor@redhat.com>
745         PR tree-optimization/87112
746         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
747         the type of the bound argument.
749 2018-08-27  Jeff Law  <law@redhat.com>
751         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
752         type does not have a TYPE_SIZE_UNIT.
754 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
756         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
757         with include of backend.h.
759 2018-08-27  Richard Biener  <rguenther@suse.de>
761         PR tree-optimization/86927
762         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
763         use const cond reduction code.
765 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
767         PR tree-optimization/85758
768         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
770 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
772         PR c++/87091
773         * diagnostic-show-locus.c (class layout_range): Update for
774         conversion of show_caret_p to a tri-state.
775         (layout_range::layout_range): Likewise.
776         (make_range): Likewise.
777         (layout::maybe_add_location_range): Likewise.
778         (layout::should_print_annotation_line_p): Don't show annotation
779         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
780         (layout::get_state_at_point): Update for conversion of
781         show_caret_p to a tri-state.  Bail out early for
782         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
783         underlining or source colorization.
784         (gcc_rich_location::add_location_if_nearby): Update for conversion
785         of show_caret_p to a tri-state.
786         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
787         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
788         Likewise.
789         (selftest::test_one_liner_labels): Likewise.
790         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
791         conversion of show_caret_p to a tri-state.
792         * pretty-print.c (text_info::set_location): Likewise.
793         * pretty-print.h (text_info::set_location): Likewise.
794         * substring-locations.c (format_warning_n_va): Likewise.
795         * tree-diagnostic.c (default_tree_printer): Likewise.
796         * tree-pretty-print.c (newline_and_indent): Likewise.
798 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
800         PR c++/87091
801         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
802         line above for line-insertion fix-it hints.
803         (selftest::test_fixit_insert_containing_newline): Update the
804         expected results, and add a test with line-numbering enabled.
806 2018-08-27  Martin Liska  <mliska@suse.cz>
808         PR sanitizer/86962
809         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
810         params with DECL_HAS_VALUE_EXPR_P.
812 2018-08-27  Martin Liska  <mliska@suse.cz>
814         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
815         selected expansion strategy.
817 2018-08-27  Martin Liska  <mliska@suse.cz>
819         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
820         * builtins.c (is_builtin_fn): Likewise.
821         * attribs.c (diag_attr_exclusions): Use new function
822         fndecl_built_in_p and remove check for FUNCTION_DECL if
823         possible.
824         (builtin_mathfn_code): Likewise.
825         (fold_builtin_expect): Likewise.
826         (fold_call_expr): Likewise.
827         (fold_builtin_call_array): Likewise.
828         (fold_call_stmt): Likewise.
829         (set_builtin_user_assembler_name): Likewise.
830         (is_simple_builtin): Likewise.
831         * calls.c (gimple_alloca_call_p): Likewise.
832         (maybe_warn_nonstring_arg): Likewise.
833         * cfgexpand.c (expand_call_stmt): Likewise.
834         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
835         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
836         (cgraph_node::verify_node): Likewise.
837         * cgraphclones.c (build_function_decl_skip_args): Likewise.
838         (cgraph_node::create_clone): Likewise.
839         * config/arm/arm.c (arm_insert_attributes): Likewise.
840         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
841         * dse.c (scan_insn): Likewise.
842         * expr.c (expand_expr_real_1): Likewise.
843         * fold-const.c (operand_equal_p): Likewise.
844         (fold_binary_loc): Likewise.
845         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
846         * gimple-low.c (lower_stmt): Likewise.
847         * gimple-pretty-print.c (dump_gimple_call): Likewise.
848         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
849         * gimple.c (gimple_build_call_from_tree): Likewise.
850         (gimple_call_builtin_p): Likewise.
851         (gimple_call_combined_fn): Likewise.
852         * gimplify.c (gimplify_call_expr): Likewise.
853         (gimple_boolify): Likewise.
854         (gimplify_modify_expr): Likewise.
855         (gimplify_addr_expr): Likewise.
856         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
857         * ipa-cp.c (determine_versionability): Likewise.
858         * ipa-fnsummary.c (compute_fn_summary): Likewise.
859         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
860         * ipa-split.c (visit_bb): Likewise.
861         (split_function): Likewise.
862         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
863         * lto-cgraph.c (input_node): Likewise.
864         * lto-streamer-out.c (write_symbol): Likewise.
865         * omp-low.c (setjmp_or_longjmp_p): Likewise.
866         (lower_omp_1): Likewise.
867         * predict.c (strip_predict_hints): Likewise.
868         * print-tree.c (print_node): Likewise.
869         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
870         * trans-mem.c (is_tm_irrevocable): Likewise.
871         (is_tm_load): Likewise.
872         (is_tm_simple_load): Likewise.
873         (is_tm_store): Likewise.
874         (is_tm_simple_store): Likewise.
875         (is_tm_abort): Likewise.
876         (tm_region_init_1): Likewise.
877         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
878         * tree-cfg.c (verify_gimple_call): Likewise.
879         (move_stmt_r): Likewise.
880         (stmt_can_terminate_bb_p): Likewise.
881         * tree-eh.c (lower_eh_constructs_2): Likewise.
882         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
883         * tree-inline.c (remap_gimple_stmt): Likewise.
884         (copy_bb): Likewise.
885         (estimate_num_insns): Likewise.
886         (fold_marked_statements): Likewise.
887         * tree-sra.c (scan_function): Likewise.
888         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
889         (optimize_stack_restore): Likewise.
890         (pass_fold_builtins::execute): Likewise.
891         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
892         (mark_all_reaching_defs_necessary_1): Likewise.
893         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
894         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
895         (pass_forwprop::execute): Likewise.
896         * tree-ssa-loop-im.c (stmt_cost): Likewise.
897         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
898         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
899         * tree-ssa-strlen.c (get_string_length): Likewise.
900         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
901         (find_func_aliases_for_call): Likewise.
902         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
903         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
904         * tree-tailcall.c (find_tail_calls): Likewise.
905         * tree.c (need_assembler_name_p): Likewise.
906         (free_lang_data_in_decl): Likewise.
907         (get_call_combined_fn): Likewise.
908         * ubsan.c (is_ubsan_builtin_p): Likewise.
909         * varasm.c (incorporeal_function_p): Likewise.
910         * tree.h (DECL_BUILT_IN): Remove and replace with
911         fndecl_built_in_p.
912         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
913         (fndecl_built_in_p): New.
915 2018-08-27  Martin Liska  <mliska@suse.cz>
917         PR tree-optimization/86847
918         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
919         Dump also subtree probability.
920         (switch_decision_tree::do_jump_if_equal): New function.
921         (switch_decision_tree::emit_case_nodes): Handle special
922         situations in balanced tree that can be emitted much simpler.
923         Fix calculation of probabilities that happen in tree expansion.
924         * tree-switch-conversion.h (struct cluster): Add
925         is_single_value_p.
926         (struct simple_cluster): Likewise.
927         (struct case_tree_node): Add new function has_child.
928         (do_jump_if_equal): New.
930 2018-08-27  Martin Liska  <mliska@suse.cz>
932         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
933         Add new argument to bit_test_cluster constructor.
934         (bit_test_cluster::emit): Set bits really number of values
935         handlel by a test.
936         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
937         probability argument.
938         * tree-switch-conversion.h (struct bit_test_cluster):
939         Add m_handles_entire_switch.
941 2018-08-27  Martin Liska  <mliska@suse.cz>
943         PR tree-optimization/86702
944         * tree-switch-conversion.c (jump_table_cluster::emit):
945         Make probabilities even for values in jump table
946         according to number of cases handled.
947         (switch_decision_tree::compute_cases_per_edge): Pass
948         argument to reset_out_edges_aux function.
949         (switch_decision_tree::analyze_switch_statement): Likewise.
950         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
951         Make it static.
953 2018-08-27  Martin Liska  <mliska@suse.cz>
955         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
956         cfun argument explicitly.
957         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
958         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
959         function gimple_switch_default_bb.
960         (convert_switch_statements):
961         (expand_builtins):
962         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
963         * stmt.c (label_to_block_fn): Use label_to_block and pass
964         cfun argument explicitly and use gimple_switch_label_bb.
965         (expand_case): Likewise.
966         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
967         cfun argument explicitly. Likewise.
968         (make_edges_bb): Likewise.
969         (make_cond_expr_edges): Likewise.
970         (get_cases_for_edge): Likewise.
971         (make_gimple_switch_edges): Likewise.
972         (label_to_block_fn): Likewise.
973         (label_to_block): Likewise.
974         (make_goto_expr_edges): Likewise.
975         (make_gimple_asm_edges): Likewise.
976         (main_block_label): Likewise.
977         (group_case_labels_stmt): Likewise.
978         (find_taken_edge_computed_goto): Likewise.
979         (find_taken_edge_switch_expr): Likewise.
980         (gimple_verify_flow_info): Likewise.
981         (gimple_redirect_edge_and_branch): Likewise.
982         (gimple_switch_label_bb): New function.
983         (gimple_switch_default_bb): Likewise.
984         (gimple_switch_edge): Likewise.
985         (gimple_switch_default_edge): Likewise.
986         * tree-cfg.h (label_to_block_fn): Remove and replace ...
987         (label_to_block): ... with this.
988         (gimple_switch_label_bb): New.
989         (gimple_switch_default_bb): Likewise.
990         (gimple_switch_edge): Likewise.
991         (gimple_switch_default_edge): Likewise.
992         * tree-cfgcleanup.c (convert_single_case_switch): Use
993         new gimple functions and pass new argument to label_to_block.
994         (cleanup_control_flow_bb):
995         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
996         cfun argument explicitly.
997         (make_eh_edges): Likewise.
998         (redirect_eh_dispatch_edge): Likewise.
999         (lower_resx): Likewise.
1000         (lower_eh_dispatch): Likewise.
1001         (maybe_remove_unreachable_handlers): Likewise.
1002         (unsplit_eh): Likewise.
1003         (cleanup_empty_eh): Likewise.
1004         (verify_eh_edges): Likewise.
1005         (verify_eh_dispatch_edge): Likewise.
1006         * tree-ssa-dom.c (record_edge_info): Likewise.
1007         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1008         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1009         (thread_through_normal_block): Likewise.
1010         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1011         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1012         * tree-switch-conversion.c (switch_conversion::collect): Use new
1013         gimple functions.
1014         (switch_conversion::check_final_bb): Likewise.
1015         (switch_conversion::gather_default_values): Pass new argument
1016         to label_to_block.
1017         (switch_conversion::build_constructors): Likewise.
1018         (switch_decision_tree::compute_cases_per_edge): Use new
1019         gimple_switch_edge function.
1020         (switch_decision_tree::analyze_switch_statement): Pass new argument
1021         to label_to_block.
1022         (switch_decision_tree::try_switch_expansion): Use
1023         gimple_switch_default_edge.
1024         * tree-vrp.c (find_switch_asserts): Pass new argument
1025         to label_to_block.
1026         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1027         (vr_values::simplify_switch_using_ranges): Likewise.
1029 2018-08-27  Richard Biener  <rguenther@suse.de>
1031         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1032         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1034         * tree-ssa-sccvn.h (struct vn_pval): New structure.
1035         (struct vn_nary_op_s): Add unwind_to member.  Add
1036         predicated_values flag and put result into a union together
1037         with a linked list of vn_pval.
1038         (struct vn_ssa_aux): Add name member to make maintaining
1039         a map of SSA name to vn_ssa_aux possible.  Remove no longer
1040         needed info, dfsnum, low, visited, on_sccstack, use_processed
1041         and range_info_anti_range_p members.
1042         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1043         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1044         New functions.
1045         (vn_valueize): New global.
1046         (vn_context_bb): Likewise.
1047         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1048         VN_INFO_PTR_INFO): Remove.
1049         * tree-ssa-sccvn.c: ... (rewrite)
1050         (pass_fre::execute): For -O2+ initialize loops and run
1051         RPO VN in optimistic mode (iterating).  For -O1 and -Og
1052         run RPO VN in non-optimistic mode.
1053         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1054         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1055         * doc/invoke.texi (sccvn-max-scc-size): Remove.
1056         (rpo-vn-max-loop-depth): Document.
1057         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1058         when valuezing the VUSE signals we walked out of the region.
1059         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1060         (phi_translate): Set VN context block to use for availability
1061         lookup.
1062         (compute_avail): Likewise.
1063         (pre_valueize): New function.
1064         (pass_pre::execute): Adjust to the RPO VN API.
1066         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1067         (propagate_constants_for_unrolling): Remove.
1068         (tree_unroll_loops_completely): Perform value-numbering
1069         on the unrolled bodies loop parent.
1071 2018-08-27  Richard Biener  <rguenther@suse.de>
1073         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1074         for partial antic compute.
1076 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
1078         PR rtl-optimization/87065
1079         * combine.c (simplify_if_then_else): Formatting fix.
1080         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1081         check.
1082         (known_cond): Don't return const_true_rtx for vector modes.  Use
1083         CONST0_RTX instead of const0_rtx.  Formatting fixes.
1085 2018-08-27  Martin Liska  <mliska@suse.cz>
1087         PR gcov-profile/87069
1088         * gcov.c (process_file): Record files already processed
1089         and warn about a file being processed multiple times.
1091 2018-08-27  Martin Liska  <mliska@suse.cz>
1093         PR driver/83193
1094         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1095         Set default values for x_aarch64_*_string strings.
1096         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1097         prefix.  For -mabi do not print '=ABI' in help and use
1098         <option_value> format for -msve-vector-bits and -moverride
1099         options.
1101 2018-08-26  Jeff Law  <law@redhat.com>
1103         * config/mips/frame-header-opt.c: Include "backend.h" rather than
1104         "cfg.h"
1106 2018-08-26  Marek Polacek  <polacek@redhat.com>
1108         PR c++/87029, Implement -Wredundant-move.
1109         * doc/invoke.texi: Document -Wredundant-move.
1111 2018-08-25  Martin Sebor  <msebor@redhat.com>
1113         PR tree-optimization/87059
1114         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1115         to the same type as the other.
1116         * fold-const.c (fold_binary_loc): Assert expectation.
1118 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
1120         * config/darwin.c (machopic_legitimize_pic_address): Clean up
1121         extraneous parentheses, dead code section and formatting.
1123 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
1125         PR c++/87091
1126         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1127         wide enough for jumps in the line-numbering to be visible.
1128         (layout::print_gap_in_line_numbering): New member function.
1129         (layout::calculate_line_spans): When using line numbering, merge
1130         line spans that are only 1 line apart.
1131         (diagnostic_show_locus): When printing line numbers, show gaps in
1132         line numbering directly, rather than printing headers.
1133         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1134         line-numbering with multiple line spans.
1135         (selftest::test_fixit_insert_containing_newline_2): Add test of
1136         line-numbering, in which the spans are close enough to be merged.
1138 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1140         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1141         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
1142         * tree-vrp.c (range_is_nonnull): Remove.
1143         (range_includes_zero_p): Accept value_range instead of min/max.
1144         (extract_range_from_binary_expr_1): Do not early bail on
1145         POINTER_PLUS_EXPR.
1146         Use range_includes_zero_p instead of range_is_nonnull.
1147         (extract_range_from_unary_expr): Use range_includes_zero_p instead
1148         of range_is_nonnull.
1149         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
1150         special case VR_ANTI_RANGE.
1151         (vrp_finalize): Same.
1152         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1153         instead of min/max.
1154         (range_is_nonnull): Remove.
1155         * vr-values.c (vrp_stmt_computes_nonzero): Use
1156         range_includes_zero_p instead of range_is_nonnull.
1157         (extract_range_basic): Pass value_range to range_includes_zero_p
1158         instead of range_is_nonnull.
1160 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
1162         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1163         * emit-rtl.h (rtl_data): Remove return_bnd.
1164         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1165         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1166         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1167         (POINTER_BOUNDS_MODE): Remove definition.
1168         (make_pointer_bounds_mode): Remove.
1169         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1170         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1171         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1172         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1173         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1174         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1175         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1177         * config/i386/i386-modes.def (BND32, BND64): Remove.
1178         * config/i386/i386.c (dbx_register_map): Remove bound registers.
1179         (dbx64_register_map): Ditto.
1180         (svr4_dbx_register_map): Ditto.
1181         (indirect_thunk_bnd_needed): Remove.
1182         (indirect_thunks_bnd_used): Ditto.
1183         (indirect_return_bnd_needed): Ditto.
1184         (indirect_return_via_cx_bnd): Ditto.
1185         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1186         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1187         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
1188         (output_indirect_thunk_function): Remove handling of
1189         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1190         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1191         (ix86_save_reg): Remove handling of crtl->return_bnd.
1192         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1193         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1194         and UNSPEC_BNDLX_ADDR.
1195         (ix86_output_indirect_branch_via_reg): Remove handling of
1196         indirect_thunk_prefix_bnd.
1197         (ix86_output_indirect_branch_via_push): Ditto.
1198         (ix86_output_function_return): Ditto.
1199         (ix86_output_indirect_function_return): Ditto.
1200         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1201         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1202         (CALL_USED_REGISTERS): Ditto.
1203         (REG_ALLOC_ORDER): Update for removal of bound registers.
1204         (HI_REGISTER_NAMES): Ditto.
1205         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1206         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1207         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1208         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1209         (FIRST_PSEUDO_REG): Update.
1210         (BND): Remove mode iterator.
1211         * config/i386/predicates.md (bnd_mem_operator): Remove.
1213 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1215         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1216         vectors.
1218 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1220         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1221         the case in which the permute needs only a single element and
1222         repeats for every vector of the result.  Extend that case to
1223         handle variable-length vectors.
1224         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1226 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
1228         PR debug/79342
1229         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1230         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1232 2018-08-24  Richard Biener  <rguenther@suse.de>
1234         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1235         bb_flags_allocated members.
1236         (auto_flag): New RAII class for allocating flags.
1237         (auto_edge_flag): New RAII class for allocating edge flags.
1238         (auto_bb_flag): New RAII class for allocating bb flags.
1239         * cfgloop.c (verify_loop_structure): Allocate temporary edge
1240         flag dynamically.
1241         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1242         in favor of temporarily allocated BB flag.
1243         * hsa-brig.c: Re-order includes.
1244         * hsa-dump.c: Likewise.
1245         * hsa-regalloc.c: Likewise.
1246         * print-rtl.c: Likewise.
1247         * profile-count.c: Likewise.
1249 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
1251         PR target/86989
1252         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1253         the TOC register.
1255 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1257         PR 87073/bootstrap
1258         * wide-int-range.cc (wide_int_range_div): Do not ignore result
1259         from wide_int_range_multiplicative_op.
1261 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1263         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1264         "permutaion".
1266 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1268         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1269         to 'expanded'.
1271 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
1273         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1274         full GENERIC expression used for replacement.
1276 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
1278         * tree-vrp.c (abs_extent_range): Remove.
1279         (extract_range_into_wide_ints): Pass wide ints by reference.
1280         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1281         Pass wide ints by reference in all calls to
1282         extract_range_into_wide_ints.
1283         * wide-int-range.cc (wide_int_range_div): New.
1284         * wide-int-range.h (wide_int_range_div): New.
1285         (wide_int_range_includes_zero_p): New.
1286         (wide_int_range_zero_p): New.
1288 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
1290         * config/aarch64/aarch64.md (arches): New enum.
1291         (arch): New enum attr.
1292         (arch_enabled): New attr.
1293         (enabled): Now uses arch_enabled only.
1294         (simd, sve, fp16): Removed attribute.
1295         (fp): Attr now defined in terms of 'arch'.
1296         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1297         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1298         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1299         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1300         attributes into 'arch'.
1301         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1302         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1303         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1304         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1305         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1306         'simd' attribute into 'arch'.
1307         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1308         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1309         Convert use of 'fp' attribute to 'arch'.
1310         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1311         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1312         into 'arch'.
1313         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1314         (different modes) Merge 'fp' and 'simd' into 'arch'.
1315         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1316         'simd' into 'arch'.
1318 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
1320         PR rtl-optimization/87026
1321         * expmed.c (canonicalize_comparison): If we can no longer create
1322         pseudoregisters, don't.
1324 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
1326         PR target/86951
1327         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1328         prototype.
1329         * config/arm/arm.c (speculation_barrier_libfunc): New static
1330         variable.
1331         (arm_init_libfuncs): Initialize it.
1332         (arm_emit_speculation_barrier): New function.
1333         * config/arm/arm.md (speculation_barrier): Call
1334         arm_emit_speculation_barrier for architectures that do not have
1335         DSB or ISB.
1336         (speculation_barrier_insn): Only match on Armv7 or later.
1338 2018-08-23  Richard Biener  <rguenther@suse.de>
1340         PR middle-end/87024
1341         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1342         calls.
1344 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1346         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1347         of single-vector TBLs.
1348         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1349         one input is given.
1351 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1353         PR target/85910
1354         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1355         aarch64_evpc_tbl guard.
1357 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1359         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1360         behaviour.
1362 2018-08-22  Martin Sebor  <msebor@redhat.com>
1364         PR middle-end/87052
1365         * tree-pretty-print.c (pretty_print_string): Add argument.
1366         (dump_generic_node): Call to pretty_print_string with string size.
1368 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
1370         PR rtl-optimization/86771
1371         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1372         of two SETs into those two SETs, one to be placed at i2, if that SETs
1373         destination is modified between i2 and i3.
1375 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1377         PR tree-optimization/86725
1378         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1379         function.
1380         (vect_analyze_scalar_cycles_1): Check it.
1382 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1384         PR tree-optimization/86725
1385         * tree-vect-loop.c (vect_is_simple_reduction): When treating
1386         an outer loop phi as a double reduction, make sure that the
1387         single user of the phi result is an inner loop phi.
1389 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1391         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1392         grouped stores with gaps to a strided group.
1394 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1396         * tree-vect-stmts.c (get_group_load_store_type)
1397         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1398         first statement in a group.
1400 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1402         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1403         the sequence used in gcc/gcc.c.
1405 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1407         PR other/704
1408         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1409         building it.
1411 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1413         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1414         Darwin10-specific unwinder-shim.
1415         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1416         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
1417         New to cater for Darwin10 Rosetta.
1419 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1421         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1422         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1424 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1426         PR bootstrap/81033
1427         PR target/81733
1428         PR target/52795
1429         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1430         (dwarf2out_switch_text_section): Generate a local label for the
1431         second function sub-section and apply it as the second FDE start
1432         label.
1433         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1434         second sub-section start.
1436 2018-08-22  Richard Biener  <rguenther@suse.de>
1438         PR tree-optimization/86988
1439         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1441 2018-08-22  Richard Biener  <rguenther@suse.de>
1443         PR tree-optimization/86945
1444         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1446 2018-08-22  Alexandre Oliva <oliva@adacore.com>
1448         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1449         a comment about how uses of r2 for .sdata2 come about.
1451 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
1453         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1455 2018-08-21  Marek Polacek  <polacek@redhat.com>
1457         PR c++/86981, Implement -Wpessimizing-move.
1458         * doc/invoke.texi: Document -Wpessimizing-move.
1460 2018-08-21  Jan Hubicka  <jh@suse.cz>
1462         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1463         * tree.h (is_redundant_typedef): Remove.
1464         * dwarf2out.c (is_redundant_typedef): Turn into static function.
1466 2018-08-21  Jan Hubicka  <jh@suse.cz>
1468         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1469         when possible.
1471 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
1473         * expmed.c (extract_low_bits): Reject invalid subregs early.
1475 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1477         PR middle-end/86121
1478         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1479         behaviour.
1481 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1483         * config/vxworks.h: Guard vxworks_asm_out_constructor and
1484         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1485         * config/vxworks.c: Likewise.
1487 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1489         * config/vxworks.c: Set targetm.have_ctors_dtors
1490         if HAVE_INITFINI_ARRAY_SUPPORT.
1491         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1492         if HAVE_INITFINI_ARRAY_SUPPORT.
1494 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1496         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1497         default search path for VxWorks < 7.
1499 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1501         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1502         (get_format_string): Refer to c_getstr.
1504 2018-08-21  Tom de Vries  <tdevries@suse.de>
1506         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1507         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1508         (debuginfo_early_stop): Declare.
1509         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1510         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1511         (debuginfo_early_stop): New function.
1512         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1513         and debuginfo_early_stop.
1514         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1515         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1516         (general_init): Call debuginfo_early_init.
1517         (finalize): Call debuginfo_fini.
1518         (do_compile): Call debuginfo_init.
1519         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1520         -fdump-early-debug.
1521         (@item -fdump-debug, @item -fdump-earlydebug): Add.
1523 2018-08-21  Tom de Vries  <tdevries@suse.de>
1525         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1526         flag_dump_noaddr and flag_dump_unnumbered.
1528 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
1530         * wide-int-range.cc (wide_int_range_abs): New.
1531         (wide_int_range_order_set): Rename from wide_int_range_min_max.
1532         * wide-int-range.h (wide_int_range_abs): New.
1533         (wide_int_range_min_max): New.
1534         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1535         case to call wide_int_range_abs.
1536         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1537         (extract_range_from_abs_expr): Delete.
1539 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
1541         PR target/87033
1542         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1543         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1544         for indexed loads.
1546 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1547             Jeff Law <law@redhat.com>
1549         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1550         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1552 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
1554         PR other/84889
1555         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1556         (decl_attributes): Likewise.
1557         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1558         instance.
1559         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1560         * diagnostic-core.h (class auto_diagnostic_group): New class.
1561         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1562         (diagnostic_report_diagnostic): Handle the first diagnostics within
1563         a group.
1564         (emit_diagnostic): Add auto_diagnostic_group instance.
1565         (inform): Likewise.
1566         (inform_n): Likewise.
1567         (warning): Likewise.
1568         (warning_at): Likewise.
1569         (warning_n): Likewise.
1570         (pedwarn): Likewise.
1571         (permerror): Likewise.
1572         (error): Likewise.
1573         (error_n): Likewise.
1574         (error_at): Likewise.
1575         (sorry): Likewise.
1576         (fatal_error): Likewise.
1577         (internal_error): Likewise.
1578         (internal_error_no_backtrace): Likewise.
1579         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1580         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1581         * diagnostic.h (struct diagnostic_context): Add fields
1582         "diagnostic_group_nesting_depth",
1583         "diagnostic_group_emission_count", "begin_group_cb",
1584         "end_group_cb".
1585         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1586         Add auto_diagnostic_group instance(s).
1587         (find_explicit_erroneous_behavior): Likewise.
1588         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1589         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1590         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1591         (gimplify_va_arg_expr): Likewise.
1592         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1593         (HSA_SORRY_AT): Likewise.
1594         * ipa-devirt.c (compare_virtual_tables): Likewise.
1595         (warn_odr): Likewise.
1596         * multiple_target.c (expand_target_clones): Likewise.
1597         * opts-common.c (cmdline_handle_error): Likewise.
1598         * reginfo.c (globalize_reg): Likewise.
1599         * substring-locations.c (format_warning_n_va): Likewise.
1600         * tree-inline.c (expand_call_inline): Likewise.
1601         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1602         * tree-ssa-loop-niter.c
1603         (do_warn_aggressive_loop_optimizations): Likewise.
1604         * tree-ssa-uninit.c (warn_uninit): Likewise.
1605         * tree.c (warn_deprecated_use): Likewise.
1607 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
1609         PR target/87014
1610         * config/i386/i386.md (eh_return): Always update EH return
1611         address in word_mode.
1613 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
1615         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1616         TARGET_SPLIT_COMPLEX_ARG is defined.
1618 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1620         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1622 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1624         PR target/86984
1625         * expr.c (expand_assignment): Assert that bitpos is positive.
1626         (store_field): Likewise
1627         (expand_expr_real_1): Make sure that bitpos is positive.
1628         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1629         integer overflow.
1631 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1633         * Makefile.in (CPP_ID_DATA_H): Delete.
1634         (CPP_INTERNAL_H): Don't add it.
1635         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1636         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1638 2018-08-20  Richard Biener  <rguenther@suse.de>
1640         PR tree-optimization/78655
1641         * tree-vrp.c (extract_range_from_binary_expr_1): Make
1642         pointer + offset nonnull if either operand is nonnull work.
1644 2018-08-20  Tom de Vries  <tdevries@suse.de>
1646         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
1647         unless the referenced die describes the added property using
1648         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
1649         Otherwise, add a DW_AT_location to the referenced die.
1651 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
1653         PR target/86994
1654         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
1655         register_operand when calling ix86_set_reg_reg_cost.
1656         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
1657         Set *total to 0 for operands that satisfy x86_64_immediate_operand
1658         predicate and to 1 otherwise.
1660 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
1662         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
1663         emit a diagnostic that it is not supported and reset the option.
1664         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
1665         supported and consume the option.  (ASM_FINAL_SPEC): New.
1667 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
1669         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
1670         a sentence.
1672 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
1674         C-SKY port: Documentation
1676         * doc/extend.texi (C-SKY Function Attributes): New section.
1677         * doc/invoke.texi (Option Summary): Add C-SKY options.
1678         (C-SKY Options): New section.
1679         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
1681 2018-08-17  Jojo  <jijie_rong@c-sky.com>
1682             Huibin Wang  <huibin_wang@c-sky.com>
1683             Sandra Loosemore  <sandra@codesourcery.com>
1684             Chung-Lin Tang  <cltang@codesourcery.com>
1686         C-SKY port: Backend implementation
1688         * config/csky/*: New.
1689         * common/config/csky/*: New.
1691 2018-08-17  Jojo  <jijie_rong@c-sky.com>
1692             Huibin Wang  <huibin_wang@c-sky.com>
1693             Sandra Loosemore  <sandra@codesourcery.com>
1694             Chung-Lin Tang  <cltang@codesourcery.com>
1695             Andrew Jenner  <andrew@codesourcery.com>
1697         C-SKY port: Configury
1699         * config.gcc (csky-*-*): New.
1700         * configure.ac: Add csky to targets for dwarf2 debug_line support.
1701         * configure: Regenerated.
1703 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
1705         * dump-context.h: Include "dumpfile.h".
1706         (dump_context::dump_printf_va): Convert final param from va_list
1707         to va_list *.  Convert from ATTRIBUTE_PRINTF to
1708         ATTRIBUTE_GCC_DUMP_PRINTF.
1709         (dump_context::dump_printf_loc_va): Likewise.
1710         * dumpfile.c: Include "stringpool.h".
1711         (make_item_for_dump_printf_va): Delete.
1712         (make_item_for_dump_printf): Delete.
1713         (class dump_pretty_printer): New class.
1714         (dump_pretty_printer::dump_pretty_printer): New ctor.
1715         (dump_pretty_printer::emit_items): New member function.
1716         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
1717         function.
1718         (dump_pretty_printer::emit_item): New member function.
1719         (dump_pretty_printer::stash_item): New member function.
1720         (dump_pretty_printer::format_decoder_cb): New member function.
1721         (dump_pretty_printer::decode_format): New member function.
1722         (dump_context::dump_printf_va): Reimplement in terms of
1723         dump_pretty_printer.
1724         (dump_context::dump_printf_loc_va): Convert final param from va_list
1725         to va_list *.
1726         (dump_context::begin_scope): Reimplement call to
1727         make_item_for_dump_printf.
1728         (dump_printf): Update for change to dump_printf_va.
1729         (dump_printf_loc): Likewise.
1730         (selftest::test_capture_of_dump_calls): Convert "stmt" from
1731         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
1732         with %T, %E, and %G.
1733         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
1734         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
1735         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
1736         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
1737         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
1738         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
1739         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
1740         within a dump_printf_loc call to "%wu".
1741         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
1742         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
1743         missing space after "=".
1744         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
1745         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
1746         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
1747         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
1748         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
1749         duplicate "vectorized" from message.
1751 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
1753         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
1754         polyNxK_t element's TYPE_STRING_FLAG.
1756 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
1758         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
1759         (they were unnamed before).  Fix comments.
1761 2018-08-17  Nathan Sidwell  <nathan@acm.org>
1763         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
1765 2018-08-17  Richard Biener  <rguenther@suse.de>
1767         PR tree-optimization/86841
1768         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
1770 2018-08-17  Martin Liska  <mliska@suse.cz>
1772         * common.opt: Remove Warn, Init and Report for options with
1773         Ignore/Deprecated flag. Warning is done automatically for
1774         Deprecated flags.
1775         * config/i386/i386.opt: Likewise.
1776         * config/ia64/ia64.opt: Likewise.
1777         * config/rs6000/rs6000.opt: Likewise.
1778         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
1779         Remove usage of flag_check_pointer_bounds.
1780         * lto-wrapper.c (merge_and_complain): Do not handle
1781         OPT_fcheck_pointer_bounds.
1782         (append_compiler_options): Likewise.
1783         * opt-functions.awk: Do not handle Deprecated.
1784         * optc-gen.awk: Check that Var, Report and Init are not
1785         used for an option with Ignore/Deprecated flag.
1786         * opts-common.c (decode_cmdline_option): Do not report
1787         CL_ERR_DEPRECATED.
1788         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
1789         options.
1790         * opts.h (struct cl_option): Remove cl_deprecated flag.
1791         (CL_ERR_DEPRECATED): Remove error enum value.
1793 2018-08-17  Richard Biener  <rguenther@suse.de>
1795         PR middle-end/86505
1796         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
1797         across a va-arg-pack using call adjust its return value accordingly.
1799 2018-08-16  Martin Sebor  <msebor@redhat.com>
1801         PR tree-optimization/86853
1802         * gimple-ssa-sprintf.c (struct format_result): Rename member.
1803         (struct fmtresult): Add member and initialize it in ctors.
1804         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
1805         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
1806         (format_directive): Set POSUNDER4K when MAYFAIL is set.
1807         (parse_directive): Handle %C same as %c.
1808         (sprintf_dom_walker::compute_format_length): Adjust.
1809         (is_call_safe): Adjust.
1811 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1813         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
1814         for determining how to count the elements.
1815         * builtins.h (c_strlen): Adjust prototype.
1816         * expr.c (string_constant): Add new parameter mem_size.
1817         Set *mem_size appropriately.
1818         * expr.h (string_constant): Adjust protoype.
1819         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
1820         * gimple-fold.h (get_range_strlen): Adjust prototype.
1821         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
1822         (format_string): Call get_string_length with eltsize.
1824 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1826         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
1827         to emit the span, rather than setting it as the prefix.
1829 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
1831         * diagnostic-show-locus.c (layout::start_annotation_line): Add
1832         "margin_char" parameter, defaulting to space.  Use it in place
1833         of pp_space for the initial part of the margin.
1834         (layout::print_leading_fixits): Use '+' when filling the margin
1835         of line-insertion fix-it hints.
1837 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1839         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
1840         Delete.
1842 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1844         * config/rs6000/altivec.md: Don't set length attribute to the default
1845         value.
1846         * config/rs6000/darwin.md: Ditto.
1847         * config/rs6000/dfp.md: Ditto.
1848         * config/rs6000/htm.md: Ditto.
1849         * config/rs6000/rs6000.md: Ditto.
1850         * config/rs6000/sync.md: Ditto.
1851         * config/rs6000/vsx.md: Ditto.
1853 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1855         * config/rs6000/altivec.md: Don't set length attribute to the default
1856         value, for branch instructions.
1857         * config/rs6000/darwin.md: Ditto.
1858         * config/rs6000/rs6000.md: Ditto.
1860 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
1862         * config/rs6000/rs6000.md (length): Always define as const_int 4.
1863         (unnamed conditional branch define_insn): Set length to 4 or 8
1864         depending on offset.
1865         (<bd>_<mode>): Similar, for alternative 0.
1866         (<bd>tf_<mode>): Ditto.
1868 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1870         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
1872 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
1874         * doc/rtl.texi: Replace old RTX class names with new names.
1877 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
1879         * expmed.h (canonicalize_comparison): New declaration.
1880         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
1881         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
1882         * optabs.c (prepare_cmp_insn): Likewise.
1883         * rtl.h (unsigned_condition_p): New function which checks if a
1884         comparison operator is unsigned.
1886 2018-08-16  Nathan Sidwell  <nathan@acm.org>
1888         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
1889         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
1891 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1893         PR target/84711
1894         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
1895         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
1896         (mov<mov>): ..this and enable unconditionally.
1898 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
1900         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
1902 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
1904         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
1905         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
1906         "Common" with "Target".
1908 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1910         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
1911         * doc/invoke.texi (mmitigate-rop): Remove.
1912         * config/i386/i386.c: Do not include "regrename.h".
1913         (ix86_rop_should_change_byte_p, reg_encoded_number)
1914         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
1915         Remove.
1916         (ix86_reorg): Remove call to ix86_mitigate_rop.
1917         * config/i386/i386.md (attr "modrm_class"): Remove.
1918         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
1919         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
1920         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
1922 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
1924         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
1925         allow folding of mergeh() and mergel() for the float and double types.
1926         (fold_mergehl_helper): Rework to handle building a permute tree
1927         for float vectors.
1929 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
1931         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
1932         for TARGET_SSE.
1934 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
1936         * common.opt (fdiagnostics-show-labels): New option.
1937         * diagnostic-show-locus.c (class layout_range): Add field
1938         "m_label".
1939         (class layout): Add field "m_show_labels_p".
1940         (layout_range::layout_range): Add param "label" and use it to
1941         initialize m_label.
1942         (make_range): Pass in NULL for new "label" param of layout_range's
1943         ctor.
1944         (layout::layout): Initialize m_show_labels_p.
1945         (layout::maybe_add_location_range): Pass in loc_range->m_label
1946         when constructing layout_range instances.
1947         (struct line_label): New struct.
1948         (layout::print_any_labels): New member function.
1949         (layout::print_line): Call it if label-printing is enabled.
1950         (selftest::test_one_liner_labels): New test.
1951         (selftest::test_diagnostic_show_locus_one_liner): Call it.
1952         * diagnostic.c (diagnostic_initialize): Initialize
1953         context->show_labels_p.
1954         * diagnostic.h (struct diagnostic_context): Add field
1955         "show_labels_p".
1956         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1957         -fno-diagnostics-show-labels.
1958         * dwarf2out.c (gen_producer_string): Add
1959         OPT_fdiagnostics_show_labels to the ignored options.
1960         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
1961         param.
1962         (gcc_rich_location::maybe_add_expr): Likewise.
1963         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
1964         label" param, defaulting to NULL.
1965         (gcc_rich_location::add_expr): Add "label" param.
1966         (gcc_rich_location::maybe_add_expr): Likewise.
1967         (class text_range_label): New class.
1968         (class range_label_for_type_mismatch): New class.
1969         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
1970         of format_warning_va.
1971         (fmtwarn_n): Likewise for new params of format_warning_n_va.
1972         * lto-wrapper.c (merge_and_complain): Add
1973         OPT_fdiagnostics_show_labels to the "pick one setting" options.
1974         (append_compiler_options): Likewise to the dropped options.
1975         (append_diag_options): Likewise to the passed-on options.
1976         * opts.c (common_handle_option): Handle the new option.
1977         * selftest-diagnostic.c
1978         (test_diagnostic_context::test_diagnostic_context): Enable
1979         show_labels_p.
1980         * substring-locations.c: Include "gcc-rich-location.h".
1981         (format_warning_n_va): Add "fmt_label" and "param_label" params
1982         and use them as appropriate.
1983         (format_warning_va): Add "fmt_label" and "param_label" params,
1984         passing them on to format_warning_n_va.
1985         (format_warning_at_substring): Likewise.
1986         (format_warning_at_substring_n): Likewise.
1987         * substring-locations.h (format_warning_va): Add "fmt_label" and
1988         "param_label" params.
1989         (format_warning_n_va): Likewise.
1990         (format_warning_at_substring): Likewise.
1991         (format_warning_at_substring_n): Likewise.
1992         * toplev.c (general_init): Initialize global_dc->show_labels_p.
1994 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
1996         PR testsuite/86519
1997         * builtins.c (expand_builtin_memcmp): Do not expand the call
1998         when overflow is detected.
2000 2018-08-15  Martin Sebor  <msebor@redhat.com>
2002         PR tree-optimization/71625
2003         * config/aarch64/aarch64-builtins.c
2004         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2006 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
2008         * config/s390/s390.c (s390_reorg): Remove loop.
2010 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2012         * config/darwin.c
2013          (darwin_function_switched_text_sections): Delete.
2014         * gcc/config/darwin.h
2015          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2017 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2019         PR target/81685
2020         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2021         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
2022         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2024 2018-08-15  Martin Liska  <mliska@suse.cz>
2026         PR tree-optimization/86925
2027         * predict.c (expr_expected_value_1): When taking
2028         later predictor, assign also probability.
2029         Use fold_build2_initializer_loc in order to fold
2030         the expression in -frounding-math.
2032 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
2034         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2035         patterns.
2036         (expand_vec_perm_1): Try the new method.
2038 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2040         PR target/86547
2041         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2042         Check whether lra_live_max_point is 0 before dividing.
2044 2018-08-14  Martin Sebor  <msebor@redhat.com>
2046         PR tree-optimization/86650
2047         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2048         (vrp_prop::check_mem_ref): Same.
2050 2018-08-13  Liu Hao <lh_mouse@126.com>
2052         * pretty-print.c (eat_esc_sequence): Swap the foreground and
2053         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2054         and clear it thereafter, as it only works for DBCS.
2056 2018-08-13  Liu Hao <lh_mouse@126.com>
2058         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2059         handle returned by _get_osf_handle().
2061 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2063         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2064         for folding vec_perm.
2066 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2068         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2069         Add support for gimple-folding of vec_pack() and vec_unpack()
2070         intrinsics.
2072 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
2074         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2075         vec_xst variants to the list.
2076         (rs6000_gimple_fold_builtin): Add support for folding unaligned
2077         vector loads and stores.
2079 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
2081         * config.gcc (rs6000-ibm-aix4.x): Delete.
2082         (rs6000-ibm-aix5.1): Delete.
2083         (rs6000-ibm-aix5.2): Delete.
2084         (rs6000-ibm-aix5.3): Delete.
2085         * config/rs6000/aix43.h: Delete.
2086         * config/rs6000/aix51.h: Delete.
2087         * config/rs6000/aix52.h: Delete.
2088         * config/rs6000/t-aix43: Delete.
2090 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
2092         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2093         New function.
2094         (s390_decompose_address): Factor out constant pool ref
2095         decomposition.
2097 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2099         * config/nds32/nds32-predicates.c
2100         (nds32_can_use_bclr_p): Change return type as bool.
2101         (nds32_can_use_bset_p): Ditto.
2102         (nds32_can_use_btgl_p): Ditto.
2103         (nds32_can_use_bitci_p): Ditto.
2104         * config/nds32/nds32-protos.h
2105         (nds32_can_use_bclr_p): Change declaration.
2106         (nds32_can_use_bset_p): Ditto.
2107         (nds32_can_use_btgl_p): Ditto.
2108         (nds32_can_use_bitci_p): Ditto.
2110 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2112         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2113         Support -msched-prolog-epilog option.
2114         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2116 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2118         * common/config/nds32/nds32-common.c
2119         (nds32_option_optimization_table): Enalbe -malways-align.
2121 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2123         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2124         extra_headers.
2125         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2126         OPT_misr_secure_ case.
2127         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2128         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2129         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2130         secure attribute.
2131         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2132         (nds32_isr_info): New field security_level.
2133         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2134         * config/nds32/nds32.md (return_internal): Consider critical attribute.
2135         * config/nds32/nds32.opt (misr-secure): New option.
2136         * config/nds32/nds32_init.inc: New file.
2137         * config/nds32/nds32_isr.h: New file.
2139 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
2141         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2142         Update comment for atomic instructions.
2143         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2144         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2145         Remove.
2146         (atomic_loaddi): Revise fence expansion to only emit fence prior to
2147         load for __ATOMIC_SEQ_CST model.
2148         (atomic_loaddi_1): Remove float register target.
2149         (atomic_storedi): Handle CONST_INT values.
2150         (atomic_storedi_1): Remove float register source.  Add special case
2151         for zero value.
2152         (memory_barrier): New expander and insn.
2154 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
2156         PR tree-optimization/86835
2157         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2158         new_stmt after def_gsi, make sure to insert new_square_stmt after
2159         that stmt, not 2 stmts before it.
2161 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
2163         PR target/82418
2164         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2165         instead of SWI48.
2167 2018-08-10  Martin Liska  <mliska@suse.cz>
2169         PR target/83610
2170         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2171         function type.
2172         * builtins.c (expand_builtin_expect_with_probability):
2173         New function.
2174         (expand_builtin_expect_with_probability): New function.
2175         (build_builtin_expect_predicate): Add new argumnet probability
2176         for BUILT_IN_EXPECT_WITH_PROBABILITY.
2177         (fold_builtin_expect):
2178         (fold_builtin_2):
2179         (fold_builtin_3):
2180         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2181         * builtins.h (fold_builtin_expect): Set new argument.
2182         * doc/extend.texi: Document __builtin_expect_with_probability.
2183         * doc/invoke.texi: Likewise.
2184         * gimple-fold.c (gimple_fold_call): Pass new argument.
2185         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2186         also BUILT_IN_EXPECT_WITH_PROBABILITY.
2187         * predict.c (get_predictor_value): New function.
2188         (expr_expected_value): Add new argument probability. Assume
2189         that predictor and probability are always non-null.
2190         (expr_expected_value_1): Likewise.  For __builtin_expect and
2191         __builtin_expect_with_probability set probability.  Handle
2192         combination in binary expressions.
2193         (tree_predict_by_opcode): Simplify code by simply calling
2194         get_predictor_value.
2195         (pass_strip_predict_hints::execute): Add handling of
2196         BUILT_IN_EXPECT_WITH_PROBABILITY.
2197         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2198         new predictor.
2199         * tree.h (DECL_BUILT_IN_P): New function.
2201 2018-08-10  Martin Liska  <mliska@suse.cz>
2203         PR tree-optimization/85799
2204         * passes.def: Add argument for pass_strip_predict_hints.
2205         * predict.c (class pass_strip_predict_hints): Add new argument
2206         early_p.
2207         (strip_predictor_early): New function.
2208         (pass_strip_predict_hints::execute): Call the function to
2209         strip predictors.
2210         (strip_predict_hints): New function.
2211         * predict.def: Fix comment.
2213 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2215         * Makefile.in: Clarify which tm.texi to copy over to assert the
2216         right to grant a GFDL license for all.
2218 2018-08-09  Jeff Law  <law@redhat.com>
2220         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2221         unused variable.
2223 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
2225         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2226         prototype.
2228 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2230         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2231         reductions for variable-length vectors.
2233 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
2235         PR other/84889
2236         * common.opt (fdiagnostics-show-line-numbers): New option.
2237         * diagnostic-show-locus.c (class layout): Add fields
2238         "m_show_line_numbers_p" and "m_linenum_width";
2239         (num_digits): New function.
2240         (test_num_digits): New function.
2241         (layout::layout): Initialize new fields.  Update m_x_offset
2242         logic to handle any left margin.
2243         (layout::print_source_line): Print line number when requested.
2244         (layout::start_annotation_line): New member function.
2245         (layout::print_annotation_line): Call it.
2246         (layout::print_leading_fixits): Likewise.
2247         (layout::print_trailing_fixits): Likewise.  Update calls to
2248         move_to_column for new parameter.
2249         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2250         it to potentially call start_annotation_line.
2251         (layout::show_ruler): Call start_annotation_line.
2252         (selftest::test_line_numbers_multiline_range): New selftest.
2253         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2254         and selftest::test_line_numbers_multiline_range.
2255         * diagnostic.c (diagnostic_initialize): Initialize
2256         show_line_numbers_p.
2257         * diagnostic.h (struct diagnostic_context): Add field
2258         "show_line_numbers_p".
2259         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2260         -fno-diagnostics-show-line-numbers.
2261         * dwarf2out.c (gen_producer_string): Add
2262         OPT_fdiagnostics_show_line_numbers to the ignored options.
2263         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2264         one setting" options.
2265         (append_compiler_options): Likewise to the dropped options.
2266         (append_diag_options): Likewise to the passed-on options.
2267         * opts.c (common_handle_option): Handle the new option.
2268         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2270 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2272         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2273         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
2274         third argument of type "const signed char" to descriptions of
2275         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2276         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2277         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2278         __builtin_bcdsub_ov functions.
2280 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2282         PR tree-optimization/86858
2283         * tree-vect-loop.c (vect_is_simple_reduction): Restore
2284         flow_bb_inside_loop_p calls.
2286 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2288         PR tree-optimization/86871
2289         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2290         instead of gimple_assign_lhs.
2292 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
2294         PR target/86887
2295         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2296         register constraint to operand 0.
2297         (add<mode>3_carryinC): Likewise.
2298         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2300 2018-08-09  Martin Liska  <mliska@suse.cz>
2302         PR c/86895
2303         * common.opt: Remove extra line.
2305 2018-08-09  Martin Liska  <mliska@suse.cz>
2307         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2308         at the end of a line, make first letter capital and end up
2309         a sentence with a dot.
2310         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2311         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2312         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2313         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2314         (PARAM_MAX_ISL_OPERATIONS): Likewise.
2315         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2316         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2317         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2318         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2319         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2320         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2321         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2322         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2323         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2324         (PARAM_TREE_REASSOC_WIDTH): Likewise.
2325         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2326         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2327         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2329 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
2331         PR target/84332
2332         * config/s390/s390.c (s390_option_override_internal): Reduce the
2333         stack-clash-protection-probe-interval param if it would be too big
2334         for z900.
2336 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
2338         PR target/46179
2339         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2340         * config/m68k/m68k.c (handle_move_double): Don't call
2341         m68k_final_prescan_insn.
2342         (m68k_adjust_decorated_operand): Renamed from
2343         m68k_final_prescan_insn, remove first and third operand and
2344         simplify.
2345         (print_operand): Call it.
2346         (print_operand_address): Call it.
2348 2018-08-08  Nathan Sidwell  <nathan@acm.org>
2350         * diagnostic.c (diagnostic_report_current_module): Use
2351         linemap_included_from & linemap_included_from_linemap.
2353 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
2355         * config/aarch64/aarch64-cores.def: Add phecda core.
2356         * config/aarch64/aarch64-tune.md: Regenerate.
2357         * doc/invoke.texi: Add phecda core.
2359 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2361         PR target/85295
2362         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2363         definitions.
2364         * config/s390/s390.md ("movti"): Add more alternatives for
2365         constant to GPR copies.
2367 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2369         * config/s390/s390.c: Fix whitespace damage throughout the file.
2370         * config/s390/s390.h: Likewise.
2371         * config/s390/tpf.h: Likewise.
2373 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2375         * config/s390/s390.c (s390_loadrelative_operand_p):
2376         Remove TARGET_CPU_ZARCH usages.
2377         (s390_rtx_costs): Likewise.
2378         (s390_legitimate_constant_p): Likewise.
2379         (s390_cannot_force_const_mem): Likewise.
2380         (legitimate_reload_constant_p): Likewise.
2381         (s390_preferred_reload_class): Likewise.
2382         (legitimize_pic_address): Likewise.
2383         (legitimize_tls_address): Likewise.
2384         (s390_split_branches): Removed.
2385         (s390_add_execute): Removed.
2386         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2387         (s390_mainpool_start): Likewise.
2388         (s390_mainpool_finish): Likewise.
2389         (s390_mainpool_cancel): Removed.
2390         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2391         (s390_chunkify_cancel): Likewise.
2392         (s390_return_addr_rtx): Likewise.
2393         (s390_register_info): Remove split_branches_pending_p uages.
2394         (s390_optimize_register_info): Likewise.
2395         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2396         split_branches_pending_p usages.
2397         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2398         (s390_load_got): Likewise.
2399         (s390_expand_split_stack_prologue): Likewise.
2400         (output_asm_nops): Likewise.
2401         (s390_function_profiler): Likewise.
2402         (s390_emit_call): Likewise.
2403         (s390_conditional_register_usage): Likewise.
2404         (s390_optimize_prologue): Likewise.
2405         (s390_reorg): Remove TARGET_CPU_ZARCH and
2406         split_branches_pending_p usages.
2407         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2408         usages.
2409         (s390_output_indirect_thunk_function): Likewise.
2410         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2411         (TARGET_CPU_ZARCH_P): Removed.
2412         (struct machine_function): Remove split_branches_pending_p.
2413         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2415 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2417         * common/config/s390/s390-common.c (processor_flags_table):
2418         Remove flags.
2419         * config.gcc: Remove with_arch/with_tune support.
2420         * config/s390/2064.md: Remove cpu attribute comparisons.
2421         * config/s390/driver-native.c (s390_host_detect_local_cpu):
2422         Remove MTN.
2423         * config/s390/linux.h (ASM_SPEC):
2424         Remove -march support.
2425         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2426         Use a table to get an arch level.
2427         * config/s390/s390-opts.h (enum processor_type):
2428         Remove enum values.
2429         * config/s390/s390.c
2430         (processor_table): Remove entries, add arch_level values.
2431         (s390_issue_rate): Remove cases.
2432         (s390_option_override): Adjust
2433         s390_option_override_internal() call.
2434         (s390_option_override_internal): Remove deprecation warning.
2435         (s390_valid_target_attribute_tree): Adjust
2436         s390_option_override_internal() call.
2437         * config/s390/s390.h (struct s390_processor):
2438         Share with s390-c.c, add arch_level field.
2439         * config/s390/s390.md:
2440         Remove occurrences in cpu attribute.
2441         * config/s390/s390.opt: Remove -march/-mtune support.
2442         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2443         * doc/invoke.texi: Remove deprecation warning.
2445 2018-08-08  Luis Machado  <luis.machado@linaro.org>
2447         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2448         global.
2449         (qdf24xx_tunings): Set vector cost structure to
2450         qdf24xx_vector_cost.
2452         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2453         <register_sextend>: Set to 3.
2455 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
2457         PR target/86838
2458         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2459         * config/aarch64/aarch64-simd.md
2460         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2461         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2462         (aarch64_frecpx<mode>): ...this new pattern.
2463         * config/aarch64/aarch64-simd-builtins.def: Remove comment
2464         about aarch64_frecp<FRECP:frecp_suffix><mode>.
2466 2018-08-07  Martin Liska  <mliska@suse.cz>
2468         PR middle-end/83023
2469         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2470         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2471         * predict.def (PRED_MALLOC_NONNULL): New predictor.
2472         * doc/extend.texi: Document that malloc attribute adds
2473         hit to compiler.
2475 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
2477         PR target/86785
2478         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2479         Define to speculation_safe_value_not_needed.
2481 2018-08-06  Jeff Law  <law@redhat.com>
2483         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2484         the vr_values instance to cprop_into_stmt.
2485         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2486         (cprop_operand): Also query EVRP to determine if OP is a constant.
2488 2018-08-06  Nathan Sidwell  <nathan@acm.org>
2490         * diagnostic.c (diagnostic_report_current_module): Reroll
2491         included-at loop.  Translate text.
2493 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
2495         * function-tests.c (selftest::test_expansion_to_rtl): Call
2496         free_after_compilation.
2498 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2500         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2502 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
2504         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2505         loops with memory block operations from getting unrolled.
2507 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
2509         PR target/86807
2510         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2511         Define to speculation_safe_value_not_needed.
2513 2018-08-06  Jeff Law  <law@redhat.com>
2515         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2516         assert.
2518 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2520         PR target/86662
2521         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2522         with all enabled __intN types.
2524         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2526 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2528         * alias.c (record_set): Check for clobber high.
2529         * cfgexpand.c (expand_gimple_stmt): Likewise.
2530         * combine-stack-adj.c (single_set_for_csa): Likewise.
2531         * combine.c (find_single_use_1): Likewise.
2532         (set_nonzero_bits_and_sign_copies): Likewise.
2533         (get_combine_src_dest): Likewise.
2534         (is_parallel_of_n_reg_sets): Likewise.
2535         (try_combine): Likewise.
2536         (record_dead_and_set_regs_1): Likewise.
2537         (reg_dead_at_p_1): Likewise.
2538         (reg_dead_at_p): Likewise.
2539         * dce.c (deletable_insn_p): Likewise.
2540         (mark_nonreg_stores_1): Likewise.
2541         (mark_nonreg_stores_2): Likewise.
2542         * df-scan.c (df_find_hard_reg_defs): Likewise.
2543         (df_uses_record): Likewise.
2544         (df_get_call_refs): Likewise.
2545         * dwarf2out.c (mem_loc_descriptor): Likewise.
2546         * haifa-sched.c (haifa_classify_rtx): Likewise.
2547         * ira-build.c (create_insn_allocnos): Likewise.
2548         * ira-costs.c (scan_one_insn): Likewise.
2549         * ira.c (equiv_init_movable_p): Likewise.
2550         (rtx_moveable_p): Likewise.
2551         (interesting_dest_for_shprep): Likewise.
2552         * jump.c (mark_jump_label_1): Likewise.
2553         * postreload-gcse.c (record_opr_changes): Likewise.
2554         * postreload.c (reload_cse_simplify): Likewise.
2555         (struct reg_use): Add source expr.
2556         (reload_combine): Check for clobber high.
2557         (reload_combine_note_use): Likewise.
2558         (reload_cse_move2add): Likewise.
2559         (move2add_note_store): Likewise.
2560         * print-rtl.c (print_pattern): Likewise.
2561         * recog.c (decode_asm_operands): Likewise.
2562         (store_data_bypass_p): Likewise.
2563         (if_test_bypass_p): Likewise.
2564         * regcprop.c (kill_clobbered_value): Likewise.
2565         (kill_set_value): Likewise.
2566         * reginfo.c (reg_scan_mark_refs): Likewise.
2567         * reload1.c (maybe_fix_stack_asms): Likewise.
2568         (eliminate_regs_1): Likewise.
2569         (elimination_effects): Likewise.
2570         (mark_not_eliminable): Likewise.
2571         (scan_paradoxical_subregs): Likewise.
2572         (forget_old_reloads_1): Likewise.
2573         * reorg.c (find_end_label): Likewise.
2574         (try_merge_delay_insns): Likewise.
2575         (redundant_insn): Likewise.
2576         (own_thread_p): Likewise.
2577         (fill_simple_delay_slots): Likewise.
2578         (fill_slots_from_thread): Likewise.
2579         (dbr_schedule): Likewise.
2580         * resource.c (update_live_status): Likewise.
2581         (mark_referenced_resources): Likewise.
2582         (mark_set_resources): Likewise.
2583         * rtl.c (copy_rtx): Likewise.
2584         * rtlanal.c (reg_referenced_p): Likewise.
2585         (single_set_2): Likewise.
2586         (noop_move_p): Likewise.
2587         (note_stores): Likewise.
2588         * sched-deps.c (sched_analyze_reg): Likewise.
2589         (sched_analyze_insn): Likewise.
2591 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2593         * cse.c (invalidate_reg): New function extracted from...
2594         (invalidate): ...here.
2595         (canonicalize_insn): Check for clobber high.
2596         (invalidate_from_clobbers): invalidate clobber highs.
2597         (invalidate_from_sets_and_clobbers): Likewise.
2598         (count_reg_usage): Check for clobber high.
2599         (insn_live_p): Likewise.
2600         * cselib.c (cselib_expand_value_rtx_1):Likewise.
2601         (cselib_invalidate_regno): Check for clobber in setter.
2602         (cselib_invalidate_rtx): Pass through setter.
2603         (cselib_invalidate_rtx_note_stores):
2604         (cselib_process_insn): Check for clobber high.
2605         * cselib.h (cselib_invalidate_rtx): Add operand.
2607 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2609         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2610         (mark_not_eliminable): Likewise.
2611         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2612         * lra-lives.c (process_bb_lives): Check for clobber high.
2613         * lra.c (new_insn_reg): Remember clobber highs.
2614         (collect_non_operand_hard_regs): Check for clobber high.
2615         (lra_set_insn_recog_data): Likewise.
2616         (add_regs_to_insn_regno_info): Likewise.
2617         (lra_update_insn_regno_info): Likewise.
2619 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2621         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2622         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2624 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2626         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2627         (copy_insn_1): Likewise.
2628         (gen_hard_reg_clobber_high): New gen function.
2629         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2630         * genemit.c (gen_exp): Likewise.
2631         (gen_emit_seq): Pass through info.
2632         (gen_insn): Check for CLOBBER_HIGH.
2633         (gen_expand): Pass through info.
2634         (gen_split): Likewise.
2635         (output_add_clobbers): Likewise.
2636         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2637         (remove_clobbers): Likewise.
2638         * rtl.h (gen_hard_reg_clobber_high): New declaration.
2640 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2642         * doc/rtl.texi (clobber_high): Add.
2643         (parallel): Add in clobber high
2644         * rtl.c (rtl_check_failed_code3): Add function.
2645         * rtl.def (CLOBBER_HIGH): Add expression.
2646         * rtl.h (RTL_CHECKC3): Add macro.
2647         (rtl_check_failed_code3): Add declaration.
2648         (XC3EXP): Add macro.
2650 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
2652         PR target/86386
2653         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
2654         cfun->machine->max_used_stack_alignment if needed.
2656 2018-08-04  Martin Sebor  <msebor@redhat.com>
2658         PR tree-optimization/86571
2659         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
2660         NaN output to 4.
2662 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
2664         PR target/86799
2665         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2666         Define.
2668 2018-08-03  Jeff Law  <law@redhat.com>
2670         PR target/86795
2671         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2672         Define to speculation_safe_value_not_needed.
2674 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
2676         * doc/gcov.texi (-x): Remove duplicate "to".
2677         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
2678         (-Wif-not-aligned): Remove duplicate "is".
2679         (-flto): Remove duplicate "the".
2680         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
2681         duplicate "v5.00.b".
2682         (MSP430 Options): Remove duplicate "and" from the description
2683         of "-mgprel-sec=regexp".
2684         (x86 Options): Remove duplicate copies of "vmldLog102" and
2685         vmlsLog104 from description of "-mveclibabi=type".
2687 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
2689         * internal-fn.h (first_commutative_argument): Declare.
2690         * internal-fn.c (first_commutative_argument): New function.
2691         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
2692         restrictions for pattern statements.  Use first_commutative_argument
2693         to look for commutative operands in calls to internal functions.
2695 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
2697         * Makefile.in (wide-int-range.o): New.
2698         * tree-vrp.c: Move all the wide_int_* functions to...
2699         * wide-int-range.cc: ...here.
2700         * tree-vrp.h: Move all the wide_int_* prototypes to...
2701         * wide-int-range.h: ...here.
2703 2018-08-03  Tom de Vries  <tdevries@suse.de>
2705         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
2706         UI_NONE.
2707         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
2708         * except.c (output_function_exception_table): Do early exit if
2709         targetm_common.except_unwind_info (&global_options) == UI_NONE.
2711 2018-08-03  Martin Liska  <mliska@suse.cz>
2713         * predict.c (dump_prediction): Change to 2 digits
2714         in fraction part.
2716 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
2718         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
2719         neon_dup_q to...
2720         (falkor_am_1_gtov_gtov): ... a new insn reservation.
2722 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
2724         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
2725         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
2726         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
2727         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
2728         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2730 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
2732         * diagnostic-show-locus.c (diagnostic_show_locus): Use
2733         pp_take_prefix when saving the existing prefix.
2734         * diagnostic.c (diagnostic_append_note): Likewise.
2735         * langhooks.c (lhd_print_error_function): Likewise.
2736         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
2737         param's type.  Free the existing prefix.
2738         (pp_take_prefix): New function.
2739         (pretty_printer::pretty_printer): Drop the prefix parameter.
2740         Rename the length parameter to match the comment.
2741         (pretty_printer::~pretty_printer): Free the prefix.
2742         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
2743         parameter.
2744         (struct pretty_printer): Drop the "const" from "prefix" field's
2745         type and clarify memory management.
2746         (pp_set_prefix): Drop the "const" from the 2nd param.
2747         (pp_take_prefix): New decl.
2749 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2751         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
2752         for word_mode_ok here instead of passing as argument.
2753         (expand_block_compare): Change select_block_compare_mode() call.
2754         (expand_strncmp_gpr_sequence): New function.
2755         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2757 2018-08-02  Jeff Law  <law@redhat.com>
2759         PR target/86790
2760         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2761         Define to speculation_safe_value_not_needed.
2763         PR target/86784
2764         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2765         Define to speculation_safe_value_not_needed.
2767 2018-08-02  Tom de Vries  <tdevries@suse.de>
2769         PR target/86660
2770         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
2771         function.  Return UI_TARGET unconditionally.
2772         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
2773         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2775 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2777         * genemit.c (print_overload_test): Fix typo.
2779 2018-08-02  Richard Biener  <rguenther@suse.de>
2781         PR tree-optimization/86816
2782         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
2783         which checks for value availability before querying it.
2784         (gvn_uses_equal): Use it.
2785         (same_succ_hash): Likewise.
2786         (gimple_equal_p): Likewise.
2788 2018-08-02  Nick Clifton  <nickc@redhat.com>
2790         PR target/86813
2791         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2792         Define to speculation_safe_value_not_needed.
2794         PR target/86810
2795         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2796         Define to speculation_safe_value_not_needed.
2798         PR target/86810
2799         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2800         Define to speculation_safe_value_not_needed.
2802         PR target/86803
2803         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2804         Define to speculation_safe_value_not_needed.
2806         PR target/86797
2807         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2808         Define to speculation_safe_value_not_needed.
2810         PR target/86791
2811         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2812         Define to speculation_safe_value_not_needed.
2814         PR target/86789
2815         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2816         Define to speculation_safe_value_not_needed.
2818         PR target/86787
2819         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2820         Define to speculation_safe_value_not_needed.
2822         PR target/86782
2823         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
2824         speculation_safe_value_not_needed.
2826         PR target/86781
2827         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
2828         to speculation_safe_value_not_needed.
2830 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2832         * doc/md.texi: Expand the documentation of instruction names
2833         to mention port-local uses.  Document '@' in pattern names.
2834         * read-md.h (overloaded_instance, overloaded_name): New structs.
2835         (mapping): Declare.
2836         (md_reader::handle_overloaded_name): New member function.
2837         (md_reader::get_overloads): Likewise.
2838         (md_reader::m_first_overload): New member variable.
2839         (md_reader::m_next_overload_ptr): Likewise.
2840         (md_reader::m_overloads_htab): Likewise.
2841         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
2842         m_next_overload_ptr and m_overloads_htab.
2843         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
2844         (get_mode_token, get_code_token, get_int_token): New functions.
2845         (map_attr_string): Add an optional argument that passes back
2846         the associated iterator.
2847         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
2848         (md_reader::handle_overloaded_name, add_overload_instance): New
2849         functions.
2850         (apply_iterators): Handle '@' names.  Report an error if '@'
2851         is used without iterators.
2852         (initialize_iterators): Initialize the new iterator_group fields.
2853         * genopinit.c (handle_overloaded_code_for)
2854         (handle_overloaded_gen): New functions.
2855         (main): Use them to print declarations of maybe_code_for_* and
2856         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
2857         * genemit.c (print_overload_arguments, print_overload_test)
2858         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
2859         (main): Use it to print definitions of maybe_code_for_* and
2860         maybe_gen_* functions.
2861         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
2862         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
2863         instead of explicit mode checks.
2864         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
2865         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
2866         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
2867         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
2868         (aarch64_expand_compare_and_swap): Likewise
2869         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
2870         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
2871         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
2872         (aarch64_constant_pool_reload_icode): Delete.
2873         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
2874         instead of aarch64_constant_pool_reload_icode.  Use
2875         code_for_aarch64_reload_mov instead of explicit mode checks.
2876         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
2877         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
2878         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
2879         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
2880         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
2881         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
2882         (aarch64_atomic_load_op_code): Delete.
2883         (aarch64_emit_atomic_load_op): Likewise.
2884         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
2885         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
2886         instead of aarch64_emit_atomic_load_op.
2887         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
2888         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
2889         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
2890         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
2891         character before the pattern name.
2892         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2893         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
2894         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
2895         (aarch64_frecps<mode>): Likewise.
2896         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
2897         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
2898         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
2899         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
2900         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2902 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
2904         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
2905         Allow HFmode constants if TARGET_FP_F16INST.
2907 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
2909         PR target/86014
2910         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
2911         No longer check last store for clobber of address register.
2913 2018-08-02  Martin Liska  <mliska@suse.cz>
2915         PR gcov-profile/86817
2916         * gcov.c (process_all_functions): New function.
2917         (main): Call it.
2918         (process_file): Move functions processing to
2919         process_all_functions.
2921 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
2923         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
2924         "const" to the "gimple *" and "rtx_insn *" parameters.
2925         * dumpfile.h (dump_user_location_t::dump_user_location_t):
2926         Likewise.
2927         (dump_location_t::dump_location_t): Likewise.
2929 2018-08-01  Martin Sebor  <msebor@redhat.com>
2931         PR tree-optimization/86650
2932         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
2933         rather than a "gcall *".  Directly pass the data of interest
2934         to percent_K_format, rather than building a temporary CALL_EXPR
2935         to hold it.
2936         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
2937         (gimple_fold_builtin_strncat): Adjust.
2938         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
2939         gcall* argument with gimple*.
2940         * gimple-ssa-warn-restrict.c (check_call): Same.
2941         (wrestrict_dom_walker::before_dom_children): Same.
2942         (builtin_access::builtin_access): Same.
2943         (check_bounds_or_overlap): Same
2944         (maybe_diag_overlap): Same.
2945         (maybe_diag_offset_bounds): Same.
2946         * tree-diagnostic.c (default_tree_printer): Move usage of
2947         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
2948         to this callsite.
2949         * tree-pretty-print.c (percent_K_format): Add argument.
2950         * tree-pretty-print.h: Add argument.
2951         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
2952         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
2953         (maybe_diag_stxncpy_trunc): Same.
2954         (handle_builtin_stxncpy): Same.
2955         (handle_builtin_strcat): Same.
2957 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2959         * match.pd: Optimise pointer range checks.
2961 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2963         PR tree-optimization/86758
2964         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
2965         to remove pattern statements.
2967 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2969         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
2970         result of dfs_enumerate_from when constructing stmt_vec_infos,
2971         instead of additionally calling get_loop_body.
2973 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2975         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
2976         parameter.
2977         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
2978         When creating an iv, assert that the step is not known to be zero.
2979         (vect_setup_realignment): Update call accordingly.
2980         * tree-vect-stmts.c (vectorizable_store): Likewise.
2981         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
2983 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
2985         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
2986         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
2987         (vectorizable_reduction): Likewise.
2988         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2989         (vect_detect_hybrid_slp_stmts): Likewise.
2990         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2992 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
2994         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
2995         (wide_int_set_zero_nonzero_bits): ...this.
2996         (zero_nonzero_bits_from_vr): Rename to...
2997         (vrp_set_zero_nonzero_bits): ...this.
2998         (extract_range_from_multiplicative_op_1): Abstract wide int
2999         code...
3000         (wide_int_range_multiplicative_op): ...here.
3001         (extract_range_from_binary_expr_1): Extract wide int binary
3002         operations into their own functions.
3003         (wide_int_range_lshift): New.
3004         (wide_int_range_can_optimize_bit_op): New.
3005         (wide_int_range_shift_undefined_p): New.
3006         (wide_int_range_bit_xor): New.
3007         (wide_int_range_bit_ior): New.
3008         (wide_int_range_bit_and): New.
3009         (wide_int_range_trunc_mod): New.
3010         (extract_range_into_wide_ints): New.
3011         (vrp_shift_undefined_p): New.
3012         (extract_range_from_multiplicative_op): New.
3013         (vrp_can_optimize_bit_op): New.
3014         * tree-vrp.h (value_range::dump): New.
3015         (wide_int_range_multiplicative_op): New.
3016         (wide_int_range_lshift):New.
3017         (wide_int_range_shift_undefined_p): New.
3018         (wide_int_range_bit_xor): New.
3019         (wide_int_range_bit_ior): New.
3020         (wide_int_range_bit_and): New.
3021         (wide_int_range_trunc_mod): New.
3022         (zero_nonzero_bits_from_bounds): Rename to...
3023         (wide_int_set_zero_nonzero_bits): ...this.
3024         (zero_nonzero_bits_from_vr): Rename to...
3025         (vrp_set_zero_nonzero_bits): ...this.
3026         (range_easy_mask_min_max): Rename to...
3027         (wide_int_range_can_optimize_bit_op): this.
3028         * vr-values.c (simplify_bit_ops_using_ranges): Rename
3029         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3031 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3033         * tree-vectorizer.h (vect_orig_stmt): New function.
3034         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3035         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3036         (vect_create_epilog_for_reduction): Likewise.
3037         (vectorizable_live_operation): Likewise.
3038         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3039         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3040         * tree-vect-stmts.c (vectorizable_call): Likewise.
3041         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3043 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3045         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3046         argument.
3047         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3048         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3049         (vect_transform_loop): Likewise.
3050         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3052 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3054         * tree-vectorizer.h (vect_schedule_slp): Return void.
3055         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3056         (vect_schedule_slp): Likewise.
3058 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3060         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3061         argument.
3062         (vect_transform_loop): Update calls accordingly.  Schedule SLP
3063         instances before the main loop, if any exist.
3065 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3067         PR tree-optimization/86749
3068         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3069         If the lhs is used in a COND_EXPR, check that it is being used
3070         as the "then" or "else" value.
3072 2018-08-01  Tom de Vries  <tdevries@suse.de>
3074         PR target/86800
3075         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3076         speculation_safe_value_not_needed.
3078 2018-08-01  Richard Biener  <rguenther@suse.de>
3080         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3081         as base and offset.
3083 2018-08-01  Martin Liska  <mliska@suse.cz>
3085         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3086         format how successful transformation is dumped.
3087         (gimple_mod_pow2_value_transform): Likewise.
3088         (gimple_mod_subtract_transform): Likewise.
3089         (gimple_stringops_transform): Likewise.
3091 2018-08-01  Martin Liska  <mliska@suse.cz>
3093         PR value-prof/35543
3094         * value-prof.c (interesting_stringop_to_profile_p):
3095         Simplify the code and add BUILT_IN_MEMMOVE.
3096         (gimple_stringops_transform): Likewise.
3098 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
3100         * config/aarch64/aarch64-simd.md
3101         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3102         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3103         use GPI iterator instead of SI mode.
3105 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3107         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3108         rs6000_speculation_barrier.
3109         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3110         new barrier pattern name.
3112 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3114         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3115         (speculation_barrier): New insn.
3117 2018-08-01  Richard Biener  <rguenther@suse.de>
3119         PR bootstrap/86724
3120         * graphite.h: Include isl/id.h and isl/space.h to allow build
3121         with ISL 0.20.
3123 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
3125         PR target/86651
3126         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3127         mode for COFF targets.
3128         * defaults.h (TARGET_COFF): Define.
3129         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3130         TARGET_COFF): Define.
3131         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3132         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3133         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3135 2018-07-31  Alexandre Oliva <oliva@adacore.com>
3137         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3138         * gimple-streamer-out.c (output_bb): Save it.
3139         * lto-streamer-in.c (input_struct_function_base): Restore
3140         instance discriminator if available.  Create map on demand.
3141         * lto-streamer-out.c (output_struct_function_base): Save it if
3142         available.
3143         * final.c (decl_to_instance_map): Document LTO strategy.
3145 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
3146             Olivier Hainque  <hainque@adacore.com>
3148         * debug.h (decl_to_instance_map_t): New type.
3149         (decl_to_instance_map): Declare.
3150         (maybe_create_decl_to_instance_map): New inline function.
3151         * final.c (bb_discriminator, last_bb_discriminator): New statics,
3152         to track basic block discriminators.
3153         (final_start_function_1): Initialize them.
3154         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3155         bb_discriminator.
3156         (decl_to_instance_map): New variable.
3157         (map_decl_to_instance, maybe_set_discriminator): New functions.
3158         (notice_source_line): Set discriminator.
3160 2018-07-31  Ian Lance Taylor  <iant@golang.org>
3162         * targhooks.c (default_have_speculation_safe_value): Add
3163         ATTRIBUTE_UNUSED.
3165 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3167         * dump-context.h: Include "pretty-print.h".
3168         (dump_context::refresh_dumps_are_enabled): New decl.
3169         (dump_context::emit_item): New decl.
3170         (class dump_context): Add fields "m_test_pp" and
3171         "m_test_pp_flags".
3172         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3173         (temp_dump_context::get_dumped_text): New decl.
3174         (class temp_dump_context): Add field "m_pp".
3175         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3176         (dump_context::refresh_dumps_are_enabled): ...and add a test for
3177         m_test_pp.
3178         (set_dump_file): Update for above change.
3179         (set_alt_dump_file): Likewise.
3180         (dump_loc): New overload, taking a pretty_printer *.
3181         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
3182         to any test pretty-printer.
3183         (make_item_for_dump_gimple_stmt): New function, adapted from
3184         optinfo::add_gimple_stmt.
3185         (dump_context::dump_gimple_stmt): Call it, and use the result,
3186         eliminating the direct usage of dump_file and alt_dump_file in
3187         favor of indirectly using them via emit_item.
3188         (make_item_for_dump_gimple_expr): New function, adapted from
3189         optinfo::add_gimple_expr.
3190         (dump_context::dump_gimple_expr): Call it, and use the result,
3191         eliminating the direct usage of dump_file and alt_dump_file in
3192         favor of indirectly using them via emit_item.
3193         (make_item_for_dump_generic_expr): New function, adapted from
3194         optinfo::add_tree.
3195         (dump_context::dump_generic_expr): Call it, and use the result,
3196         eliminating the direct usage of dump_file and alt_dump_file in
3197         favor of indirectly using them via emit_item.
3198         (make_item_for_dump_printf_va): New function, adapted from
3199         optinfo::add_printf_va.
3200         (make_item_for_dump_printf): New function.
3201         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3202         and use the result, eliminating the direct usage of dump_file and
3203         alt_dump_file in favor of indirectly using them via emit_item.
3204         (make_item_for_dump_dec): New function.
3205         (dump_context::dump_dec): Call it, and use the result,
3206         eliminating the direct usage of dump_file and alt_dump_file in
3207         favor of indirectly using them via emit_item.
3208         (make_item_for_dump_symtab_node): New function, adapted from
3209         optinfo::add_symtab_node.
3210         (dump_context::dump_symtab_node): Call it, and use the result,
3211         eliminating the direct usage of dump_file and alt_dump_file in
3212         favor of indirectly using them via emit_item.
3213         (dump_context::begin_scope): Reimplement, avoiding direct usage
3214         of dump_file and alt_dump_file in favor of indirectly using them
3215         via emit_item.
3216         (dump_context::emit_item): New member function.
3217         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3218         Set up test pretty-printer on the underlying context.  Call
3219         refresh_dumps_are_enabled.
3220         (temp_dump_context::~temp_dump_context): Call
3221         refresh_dumps_are_enabled.
3222         (temp_dump_context::get_dumped_text): New member function.
3223         (selftest::verify_dumped_text): New function.
3224         (ASSERT_DUMPED_TEXT_EQ): New macro.
3225         (selftest::test_capture_of_dump_calls): Run all tests twice, with
3226         and then without optinfo enabled.  Add uses of
3227         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
3228         * dumpfile.h: Update comment for the dump_* API.
3229         * optinfo-emit-json.cc
3230         (selftest::test_building_json_from_dump_calls): Update for new
3231         param for temp_dump_context ctor.
3232         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3233         and "m_owned" field.
3234         (optinfo_item::~optinfo_item): Likewise.
3235         (optinfo::add_item): New member function.
3236         (optinfo::emit): Update comment.
3237         (optinfo::add_string): Delete.
3238         (optinfo::add_printf): Delete.
3239         (optinfo::add_printf_va): Delete.
3240         (optinfo::add_gimple_stmt): Delete.
3241         (optinfo::add_gimple_expr): Delete.
3242         (optinfo::add_tree): Delete.
3243         (optinfo::add_symtab_node): Delete.
3244         (optinfo::add_dec): Delete.
3245         * optinfo.h (class dump_context): New forward decl.
3246         (optinfo::add_item): New decl.
3247         (optinfo::add_string): Delete.
3248         (optinfo::add_printf): Delete.
3249         (optinfo::add_printf_va): Delete.
3250         (optinfo::add_gimple_stmt): Delete.
3251         (optinfo::add_gimple_expr): Delete.
3252         (optinfo::add_tree): Delete.
3253         (optinfo::add_symtab_node): Delete.
3254         (optinfo::add_dec): Delete.
3255         (optinfo::add_poly_int): Delete.
3256         (optinfo_item::optinfo_item): Remove "owned" param.
3257         (class optinfo_item): Remove field "m_owned".
3259 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3261         PR middle-end/86705
3262         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3263         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3264         requested variable alignment.
3265         (expand_one_ssa_partition): Likewise.
3266         (expand_one_var): Likewise.
3268 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3270         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3271         to speculation_safe_value_not_needed.
3273 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3275         * targhooks.h (speculation_safe_value_not_needed): New prototype.
3276         * targhooks.c (speculation_safe_value_not_needed): New function.
3277         * target.def (have_speculation_safe_value): Update documentation.
3278         * doc/tm.texi: Regenerated.
3280 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3282         * config/aarch64/iterators.md (ALLI_TI): New iterator.
3283         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3284         expand.
3285         (despeculate_copy<ALLI:mode>_insn): New insn.
3286         (despeculate_copyti_insn): New insn.
3287         (despeculate_simple<ALLI:mode>): New insn
3288         (despeculate_simpleti): New insn.
3289         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3290         function.
3291         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3292         aarch64_speculation_safe_value.
3293         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3295 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3297         * config/aarch64/aarch64-speculation.cc: New file.
3298         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3299         before pass_reorder_blocks.
3300         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3301         prototype.
3302         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3303         X14 and X15 when tracking speculation.
3304         * config/aarch64/aarch64.md (register name constants): Add
3305         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3306         (unspec): Add UNSPEC_SPECULATION_TRACKER.
3307         (speculation_barrier): New insn attribute.
3308         (cmp<mode>): Allow SP in comparisons.
3309         (speculation_tracker): New insn.
3310         (speculation_barrier): Add speculation_barrier attribute.
3311         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3312         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3313         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3315 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3317         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3318         aarch64_track_speculation is true.
3319         (tb<optab><mode>1): Likewise.
3320         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3321         generate CB[N]Z when tracking speculation.
3322         (aarch64_split_compare_and_swap): Likewise.
3323         (aarch64_split_atomic_op): Likewise.
3325 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3327         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3329 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3331         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3332         (speculation_barrier): New insn.
3334 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3336         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3337         * config/arm/arm.md (speculation_barrier): New expand.
3338         (speculation_barrier_insn): New pattern.
3340 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3342         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3343         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3344         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3345         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3346         list.
3347         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3348         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3349         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3350         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3351         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3352         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3353         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3354         * builtins.c (expand_speculation_safe_value): New function.
3355         (expand_builtin): Call it.
3356         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3357         * doc/extend.texi: Document __builtin_speculation_safe_value.
3358         * doc/md.texi: Document "speculation_barrier" pattern.
3359         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3360         TARGET_HAVE_SPECULATION_SAFE_VALUE.
3361         * doc/tm.texi: Regenerated.
3362         * target.def (have_speculation_safe_value, speculation_safe_value): New
3363         hooks.
3364         * targhooks.c (default_have_speculation_safe_value): New function.
3365         (default_speculation_safe_value): New function.
3366         * targhooks.h (default_have_speculation_safe_value): Add prototype.
3367         (default_speculation_safe_value): Add prototype.
3369 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3371         * dump-context.h (dump_context::dump_loc): New decl.
3372         * dumpfile.c (dump_context::dump_loc): New member function.
3373         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3374         and dump_gimple_stmt.
3375         (dump_context::dump_gimple_expr_loc): Likewise, using
3376         dump_gimple_expr.
3377         (dump_context::dump_generic_expr_loc): Likewise, using
3378         dump_generic_expr.
3379         (dump_context::dump_printf_loc_va): Likewise, using
3380         dump_printf_va.
3381         (dump_context::begin_scope): Explicitly using the global function
3382         "dump_loc", rather than the member function.
3384 2018-07-31  Martin Sebor  <msebor@redhat.com>
3386         PR tree-optimization/86741
3387         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3389 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
3391         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3392         depend on whether prefetch instructions will be emitted or not.
3393         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3394         will be emitted or not.
3395         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3396         (TARGET_SETMEM_PFD): New macros.
3398 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3400         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3401         (NULL_STMT_VEC_INFO): Delete.
3402         (stmt_vec_info::operator*): Likewise.
3403         (stmt_vec_info::operator gimple *): Likewise.
3404         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3405         of NULL_STMT_VEC_INFO.
3406         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3407         (vect_reassociating_reduction_p): Likewise.
3408         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3409         (vectorizable_store): Likewise.
3410         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3411         (vec_info::free_stmt_vec_infos): Likewise.
3413 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3415         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3416         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3418 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3420         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3421         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3422         (vec_info::free_stmt_vec_info): New private member functions.
3423         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3424         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3425         * tree-parloops.c (gather_scalar_reductions): Remove calls to
3426         set_stmt_vec_info_vec and free_stmt_vec_infos.
3427         * tree-vect-loop.c (_loop_vec_info): Remove call to
3428         set_stmt_vec_info_vec.
3429         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3430         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3431         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3432         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3433         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
3434         assignments in {vec_info::,}new_stmt_vec_info that are redundant
3435         with the clearing in the xcalloc.
3436         (stmt_vec_info_vec): Delete.
3437         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3438         (vectorize_loops): Likewise.
3439         (vec_info::~vec_info): Remove argument from call to
3440         free_stmt_vec_infos.
3441         (vec_info::add_stmt): Remove vinfo argument from call to
3442         new_stmt_vec_info.
3444 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3446         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3447         rather than a gimple stmt.
3448         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
3449         information for pattern statements when passed the original
3450         statement; instead wait to be passed the pattern statement itself.
3451         Don't call set_vinfo_for_stmt here.
3452         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3453         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3454         stmt_vec_infos here.
3455         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3456         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3457         stmt_vec_infos entry.
3459 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3461         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3462         * tree-vectorizer.c (vec_info::replace_stmt): New function.
3463         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3464         * tree-vect-stmts.c (vectorizable_call): Likewise.
3465         (vectorizable_simd_clone_call): Likewise.
3467 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3469         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3470         * tree-vectorizer.c (vec_info::remove_stmt): New function.
3471         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3472         * tree-vect-loop.c (vect_transform_loop): Likewise.
3473         * tree-vect-slp.c (vect_schedule_slp): Likewise.
3474         * tree-vect-stmts.c (vect_remove_stores): Likewise.
3476 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3478         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3479         (vect_dr_stmt): Delete.
3480         * tree-vectorizer.c (vec_info::lookup_dr): New function.
3481         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3482         of DR_VECT_AUX.
3483         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3484         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3485         (vect_verify_datarefs_alignment, vect_peeling_supportable)
3486         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3487         (vect_analyze_data_refs): Likewise.
3488         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
3489         argument.
3490         (vect_find_same_alignment_drs): Likewise.
3491         (vect_slp_analyze_node_dependences): Update calls accordingly.
3492         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3493         instead of DR_VECT_AUX.
3494         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3495         of a vector data references.  Use vec_info::lookup_dr instead of
3496         DR_VECT_AUX.
3497         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3498         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3499         instead of DR_VECT_AUX.
3501 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3503         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3504         dr_vec_info.
3505         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3506         accordingly.
3507         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3508         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3509         (vect_gen_prolog_loop_niters): Likewise.
3511 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3513         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3514         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3515         (vect_known_alignment_in_bytes, vect_dr_behavior)
3516         (vect_get_scalar_dr_size): Take references as dr_vec_infos
3517         instead of data_references.  Update calls to other routines for
3518         which the same change has been made.
3519         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3520         dr_vec_infos instead of stmt_vec_infos.
3521         (vect_analyze_data_ref_dependence): Update call accordingly.
3522         (vect_slp_analyze_data_ref_dependence)
3523         (vect_record_base_alignments): Use DR_VECT_AUX.
3524         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3525         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3526         (vector_alignment_reachable_p, vect_get_data_access_cost)
3527         (vect_peeling_supportable, vect_analyze_group_access_1)
3528         (vect_analyze_group_access, vect_analyze_data_ref_access)
3529         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3530         (vect_compile_time_alias, vect_small_gap_p)
3531         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3532         (vect_supportable_dr_alignment): Take references as dr_vec_infos
3533         instead of data_references.  Update calls to other routines for
3534         which the same change has been made.
3535         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3536         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3537         (vect_slp_analyze_and_verify_node_alignment)
3538         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3539         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3540         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
3541         above changes.
3542         (_vect_peel_info::dr): Replace with...
3543         (_vect_peel_info::dr_info): ...this new field.
3544         (vect_peeling_hash_get_most_frequent)
3545         (vect_peeling_hash_choose_best_peeling): Update accordingly.
3546         (vect_peeling_hash_get_lowest_cost):
3547         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
3548         routines for which the same change has been made.
3549         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
3550         data_reference.
3551         * tree-vect-loop-manip.c (get_misalign_in_elems)
3552         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
3553         above changes.
3554         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3555         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3556         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3557         (get_group_load_store_type, get_negative_load_store_type)
3558         (vect_get_data_ptr_increment, vectorizable_store)
3559         (vectorizable_load): Likewise.
3560         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3561         Update calls to other routines for which the same change has been made.
3563 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3565         * tree-vectorizer.h (vec_info::move_dr): New member function.
3566         (dataref_aux): Rename to...
3567         (dr_vec_info): ...this and add "dr" and "stmt" fields.
3568         (_stmt_vec_info::dr_aux): Update accordingly.
3569         (_stmt_vec_info::data_ref_info): Delete.
3570         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3571         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3572         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3573         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3574         of data_ref.
3575         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
3576         (STMT_VINFO_DR_INFO): New macro.
3577         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3578         (set_dr_misalignment): Update after rename of dataref_aux.
3579         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
3580         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3581         initialization of STMT_VINFO_DATA_REF.
3582         * tree-vectorizer.c (vec_info::move_dr): New function.
3583         * tree-vect-patterns.c (vect_recog_bool_pattern)
3584         (vect_recog_mask_conversion_pattern)
3585         (vect_recog_gather_scatter_pattern): Use it.
3586         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3587         the "dr" and "stmt" fields of dr_vec_info instead of
3588         STMT_VINFO_DATA_REF.
3590 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3592         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3593         (is_pattern_stmt_p): Use it.
3594         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3595         on pattern statements.
3597 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3599         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3600         original stmt as a stmt_vec_info rather than a gimple stmt.
3601         (vect_pattern_recog_1): Take the statement directly as a
3602         stmt_vec_info, rather than via a gimple_stmt_iterator.
3603         Update call to vect_mark_pattern_stmts.
3604         (vect_pattern_recog): Update calls accordingly.
3606 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3608         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3609         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3610         a vect_def_type for the first argument.
3611         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3612         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
3613         operand if it isn't defined by a vectorized statement.
3614         (vect_build_gather_load_calls): Remove the mask_dt argument and
3615         update calls to vect_get_vec_def_for_stmt_copy.
3616         (vectorizable_bswap): Likewise the dt argument.
3617         (vectorizable_call): Update calls to vectorizable_bswap and
3618         vect_get_vec_def_for_stmt_copy.
3619         (vectorizable_simd_clone_call, vectorizable_assignment)
3620         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3621         (vectorizable_comparison): Update calls to
3622         vect_get_vec_def_for_stmt_copy.
3623         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
3624         vect_is_simple_use.
3625         (vect_get_loop_based_defs): Remove dt argument and update call
3626         to vect_get_vec_def_for_stmt_copy.
3627         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3628         and vect_get_vec_def_for_stmt_copy.
3629         (vectorizable_load): Update calls to vect_build_gather_load_calls
3630         and vect_get_vec_def_for_stmt_copy.
3631         * tree-vect-loop.c (vect_create_epilog_for_reduction)
3632         (vectorizable_reduction, vectorizable_live_operation): Update calls
3633         to vect_get_vec_def_for_stmt_copy.
3635 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3637         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3638         and gimple stmt arguments with a stmt_vec_info.
3639         (vect_record_base_alignments): Update calls accordingly.
3640         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3641         and gimple stmt arguments with a stmt_vec_info.
3642         (vect_build_slp_tree_1): Remove vinfo argument and update call
3643         to vect_record_max_nunits.
3644         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3645         and vect_record_max_nunits.
3647 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3649         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
3650         file and take a stmt_vec_info instead of a gimple stmt.
3651         (supportable_widening_operation, vect_finish_replace_stmt)
3652         (vect_finish_stmt_generation, vect_get_store_rhs)
3653         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
3654         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
3655         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
3656         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
3657         (vect_create_data_ref_ptr, bump_vector_ptr)
3658         (vect_permute_store_chain, vect_setup_realignment)
3659         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
3660         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
3661         (vectorizable_reduction, vectorizable_induction)
3662         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
3663         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
3664         than gimple stmts as arguments.
3665         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
3666         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
3667         (can_group_stmts_p, vect_check_gather_scatter)
3668         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3669         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
3670         (vect_permute_load_chain, vect_shift_permute_load_chain)
3671         (vect_transform_grouped_load)
3672         (vect_record_grouped_load_vectors): Likewise.
3673         * tree-vect-loop.c (vect_fixup_reduc_chain)
3674         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
3675         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
3676         (vectorizable_reduction, vectorizable_induction)
3677         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
3678         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
3679         (vect_get_load_store_mask): Likewise.
3680         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
3681         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
3682         * tree-vect-stmts.c (vect_mark_relevant)
3683         (is_simple_and_all_uses_invariant)
3684         (exist_non_indexing_operands_for_use_p, process_use)
3685         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
3686         (vect_get_vec_def_for_operand, vect_get_vec_defs)
3687         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
3688         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
3689         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
3690         (get_negative_load_store_type, get_load_store_type)
3691         (vect_check_load_store_mask, vect_check_store_rhs)
3692         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
3693         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3694         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3695         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3696         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
3697         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
3698         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
3699         (supportable_widening_operation): Likewise.
3701 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3703         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
3704         a stmt_vec_info instead of a gcall.
3705         (vect_check_gather_scatter): Update call accordingly.
3706         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
3707         of a gphi.
3708         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
3709         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
3710         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
3711         instead of a gimple stmt.
3712         (vect_transform_loop): Update calls accordingly.
3713         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
3714         stmt_vec_infos instead of gimple stmts.
3715         (vect_analyze_slp_instance): Update use accordingly.
3716         * tree-vect-stmts.c (read_vector_array, write_vector_array)
3717         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
3718         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
3719         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
3720         (vect_gen_widened_results_half, vect_get_loop_based_defs)
3721         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
3722         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
3723         down to subroutines.
3725 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3727         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
3728         of the worklist from a vector of gimple stmts to a vector of
3729         stmt_vec_infos.
3730         * tree-vect-stmts.c (vect_mark_relevant, process_use)
3731         (vect_mark_stmts_to_be_vectorized): Likewise
3733 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3735         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
3736         statement before passing it to vect_analyze_stmt.
3737         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
3738         the chain of phi vector definitions.  Track the exit phi via its
3739         stmt_vec_info.
3740         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
3741         STMT_VINFO_REDUC_DEF.
3742         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
3743         stmt_vec_infos to handle the statement chains.
3744         (vect_get_slp_defs): Record the first statement in the node
3745         using a stmt_vec_info.
3746         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
3747         statements here and pass their stmt_vec_info down to subroutines.
3748         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
3749         down to vect_finish_stmt_generation.
3750         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
3751         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
3752         stmt_vec_infos to subroutines.
3753         (vect_remove_stores): Use stmt_vec_infos to handle the statement
3754         chains.
3756 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3758         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
3759         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
3760         (vect_permute_store_chain, vect_setup_realignment)
3761         (vect_permute_load_chain, vect_shift_permute_load_chain)
3762         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
3763         stmts internally, and when passing values to other vectorizer routines.
3764         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3765         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
3766         (vect_analyze_loop_operations, get_initial_def_for_reduction)
3767         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
3768         (vectorizable_reduction, vectorizable_induction)
3769         (vectorizable_live_operation, vect_transform_loop_stmt)
3770         (vect_transform_loop): Likewise.
3771         * tree-vect-patterns.c (vect_reassociating_reduction_p)
3772         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
3773         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
3774         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3775         (vect_slp_analyze_node_operations_1): Likewise.
3776         * tree-vect-stmts.c (vect_mark_relevant, process_use)
3777         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
3778         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
3779         (vect_finish_stmt_generation_1, get_group_load_store_type)
3780         (get_load_store_type, vect_build_gather_load_calls)
3781         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
3782         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
3783         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
3784         (vectorizable_store, vectorizable_load, vectorizable_condition)
3785         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
3786         (supportable_widening_operation): Likewise.
3787         (vect_get_vector_types_for_stmt): Likewise.
3788         * tree-vectorizer.h (vect_dr_behavior): Likewise.
3790 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3792         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3793         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
3794         (vect_permute_store_chain, vect_permute_load_chain)
3795         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
3796         repeated stmt_vec_info lookups.
3797         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
3798         (vect_update_ivs_after_vectorizer): Likewise.
3799         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
3800         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3801         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
3802         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3803         (vect_bb_slp_scalar_cost): Likewise.
3804         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
3806 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3808         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
3809         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
3810         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
3811         to get gassigns and gcalls, rather than operating on generc gimple
3812         stmts.
3813         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
3814         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
3815         (vectorizable_load, vect_analyze_stmt): Likewise.
3816         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
3818 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3820         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
3821         return stmt_vec_infos rather than gimple stmts.  Do not accept
3822         null arguments.
3823         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
3824         of a gimple stmt.
3825         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3826         Update use of get_later_stmt.
3827         (vect_get_constant_vectors): Update call accordingly.
3828         (vect_schedule_slp_instance): Likewise
3829         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
3830         (vect_slp_analyze_instance_dependence): Likewise.
3831         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
3833 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3835         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
3836         (stmt_info_for_cost::stmt_info): ...this new field.
3837         (add_stmt_costs): Update accordingly.
3838         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3839         (vect_get_known_peeling_cost): Likewise.
3840         (vect_estimate_min_profitable_iters): Likewise.
3841         * tree-vect-stmts.c (record_stmt_cost): Likewise.
3843 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3845         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
3846         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3847         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3848         accordingly.
3849         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
3851 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3853         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
3854         a gimple stmt to a stmt_vec_info.
3855         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3857 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3859         * tree-vectorizer.h (vec_info::grouped_stores): Change from
3860         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3861         (_loop_vec_info::reduction_chains): Likewise.
3862         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
3863         accordingly.
3864         * tree-vect-slp.c (vect_analyze_slp): Likewise.
3866 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3868         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
3869         a gimple stmt to a stmt_vec_info.
3870         (_stmt_vec_info::next_element): Likewise.
3871         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
3872         (vect_slp_analyze_and_verify_node_alignment)
3873         (vect_analyze_group_access_1, vect_analyze_group_access)
3874         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
3875         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
3876         (vect_supportable_dr_alignment): Update accordingly.
3877         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
3878         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
3879         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
3880         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3881         * tree-vect-slp.c (vect_build_slp_tree_1)
3882         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
3883         (vect_split_slp_store_group, vect_analyze_slp_instance)
3884         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
3885         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
3886         (get_group_load_store_type, get_load_store_type)
3887         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
3888         (vect_transform_stmt, vect_remove_stores): Likewise.
3890 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3892         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
3893         than a gimple stmt.
3894         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
3895         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
3896         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
3897         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
3898         (vector_alignment_reachable_p, vect_get_data_access_cost)
3899         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
3900         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
3901         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3902         (vect_analyze_group_access_1, vect_analyze_group_access)
3903         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
3904         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
3905         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
3906         result of vect_dr_stmt and use the stmt_vec_info instead of
3907         the associated gimple stmt.
3908         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3909         (vect_gen_prolog_loop_niters): Likewise.
3910         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3912 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3914         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
3915         to a vec<stmt_vec_info>.
3916         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
3917         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
3918         vec<stmt_vec_info>.
3919         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
3920         to a vec<stmt_vec_info>.
3921         (bst_traits::value_type, bst_traits::value_type): Likewise.
3922         (bst_traits::hash): Update accordingly.
3923         (vect_get_and_check_slp_defs): Change the stmts parameter from
3924         a vec<gimple *> to a vec<stmt_vec_info>.
3925         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
3926         (vect_build_slp_tree): Likewise.
3927         (vect_build_slp_tree_2): Likewise.  Update uses of
3928         SLP_TREE_SCALAR_STMTS.
3929         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
3930         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
3931         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
3932         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
3933         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
3934         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
3935         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
3936         (vect_get_constant_vectors, vect_get_slp_defs)
3937         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
3938         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
3939         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
3940         instead of gimple stmts.
3941         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
3942         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
3943         (vect_slp_analyze_instance_dependence): Update uses of
3944         SLP_TREE_SCALAR_STMTS.
3945         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3946         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
3947         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
3948         (get_initial_defs_for_reduction): Likewise.
3949         (vect_create_epilog_for_reduction): Likewise.
3950         (vectorize_fold_left_reduction): Likewise.
3951         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
3952         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
3953         (can_vectorize_live_stmts): Likewise.
3955 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3957         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
3958         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
3959         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
3960         than gimple stmts.
3961         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
3962         of a gimple stmt.
3963         (gather_scalar_reductions): Update after above interface changes.
3964         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
3965         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
3966         than gimple stmts.
3967         (vect_force_simple_reduction): Likewise.
3968         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
3969         LOOP_VINFO_REDUCTIONS.
3970         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3972 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3974         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
3975         a gimple stmt to a stmt_vec_info.
3976         * tree-vect-loop.c (vect_active_double_reduction_p)
3977         (vect_force_simple_reduction, vectorizable_reduction): Update
3978         accordingly.
3980 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3982         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
3983         vec<gimple *> to a vec<stmt_vec_info>.
3984         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
3985         the reduction_phis argument from a vec<gimple *> to a
3986         vec<stmt_vec_info>.
3987         (vectorizable_reduction): Likewise the phis local variable that
3988         is passed to vect_create_epilog_for_reduction.  Update for new type
3989         of SLP_TREE_VEC_STMTS.
3990         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
3991         (vectorizable_live_operation): Likewise.
3992         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
3993         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
3995 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3997         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
3998         a gimple stmt to a stmt_vec_info.
3999         (vectorizable_condition, vectorizable_live_operation)
4000         (vectorizable_reduction, vectorizable_induction): Pass back the
4001         vectorized statement as a stmt_vec_info.
4002         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4003         use of STMT_VINFO_VEC_STMT.
4004         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4005         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4006         as stmt_vec_infos rather than gimple stmts.
4007         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4008         to a stmt_vec_info.
4009         (vectorizable_live_operation): Likewise.
4010         (vectorizable_reduction, vectorizable_induction): Likewise,
4011         updating use of STMT_VINFO_VEC_STMT.
4012         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4013         of STMT_VINFO_VEC_STMT.
4014         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4015         (vectorizable_simd_clone_call, vectorizable_conversion)
4016         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4017         (vectorizable_store, vectorizable_load, vectorizable_condition)
4018         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4019         from a gimple stmt to a stmt_vec_info.
4020         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
4021         pointer to a stmt_vec_info to the vectorizable_* routines.
4023 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4025         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4026         a gimple stmt to a stmt_vec_info.
4027         (is_pattern_stmt_p): Update accordingly.
4028         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4029         (vect_record_grouped_load_vectors): Likewise.
4030         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4031         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4032         (vect_model_reduction_cost): Likewise.
4033         (vect_create_epilog_for_reduction): Likewise.
4034         (vectorizable_reduction, vectorizable_induction): Likewise.
4035         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4036         Return the stmt_vec_info for the pattern statement.
4037         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4038         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4039         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4040         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4041         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4042         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4043         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4044         (free_stmt_vec_info, vect_is_simple_use): Likewise.
4046 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4048         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4049         (vect_finish_stmt_generation): Likewise.
4050         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4051         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4052         (vect_build_gather_load_calls): Use the return value of the above
4053         functions instead of a separate call to vinfo_for_stmt.  Use narrow
4054         scopes for the input gimple stmt and wider scopes for the associated
4055         stmt_vec_info.  Use vec_info::lookup_def when setting these
4056         stmt_vec_infos from an SSA_NAME definition.
4057         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4058         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4059         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4060         (vectorizable_store, vectorizable_load, vectorizable_condition)
4061         (vectorizable_comparison): Likewise.
4062         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4063         (vectorizable_reduction): Likewise.
4065 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4067         * tree-vectorizer.h (vect_is_simple_use): Add an optional
4068         stmt_vec_info * parameter before the optional gimple **.
4069         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4070         (process_use, vect_get_vec_def_for_operand_1): Update callers.
4071         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4072         * tree-vect-loop.c (vectorizable_reduction): Likewise.
4073         (vectorizable_live_operation): Likewise.
4074         * tree-vect-patterns.c (type_conversion_p): Likewise.
4075         (vect_look_through_possible_promotion): Likewise.
4076         (vect_recog_rotate_pattern): Likewise.
4077         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4079 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4081         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4082         a typedef to a wrapper class.
4083         (NULL_STMT_VEC_INFO): New macro.
4084         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4085         (stmt_vec_info::operator*): New function.
4086         (stmt_vec_info::operator gimple *): Likewise.
4087         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4088         (add_stmt_costs): Likewise.
4089         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4090         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4091         (vect_get_known_peeling_cost): Likewise.
4092         (vect_estimate_min_profitable_iters): Likewise.
4093         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4094         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4095         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4096         (vectorizable_store, free_stmt_vec_infos): Likewise.
4097         (new_stmt_vec_info): Change return type of xcalloc to
4098         _stmt_vec_info *.
4100 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4102         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4103         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4104         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4105         a single_imm_use-based sequence.
4106         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4108 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4110         * tree-vectorizer.h (vec_info::lookup_def): Declare.
4111         * tree-vectorizer.c (vec_info::lookup_def): New function.
4112         * tree-vect-patterns.c (vect_get_internal_def): Use it.
4113         (vect_widened_op_tree): Likewise.
4114         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4115         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4116         (vectorizable_reduction): Likewise.
4117         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4118         of a gimple *.
4119         (vect_is_slp_reduction): Update calls accordingly.  Use
4120         vec_info::lookup_def.
4121         (vect_is_simple_reduction): Likewise
4122         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4124 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4126         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4127         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4128         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4129         of vinfo_for_stmt.
4130         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4131         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4132         (vect_update_vf_for_slp, vect_analyze_loop_operations)
4133         (vect_is_slp_reduction, vectorizable_induction)
4134         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4135         * tree-vect-patterns.c (vect_init_pattern_stmt):
4136         (vect_determine_min_output_precision_1, vect_determine_precisions)
4137         (vect_pattern_recog): Likewise.
4138         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4139         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4140         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4141         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4142         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4143         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
4144         info field from a loop to a loop_vec_info.
4146 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4148         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4149         (vec_info::add_stmt): Declare.
4150         * tree-vectorizer.c (vec_info::add_stmt): New function.
4151         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4152         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4153         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4154         (vectorizable_induction): Likewise.
4155         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4156         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4157         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4158         (vectorizable_load): Likewise.
4159         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4160         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4161         (vect_recog_gather_scatter_pattern): Likewise.
4162         (append_pattern_def_seq): Likewise.  Remove a check that is
4163         performed by add_stmt itself.
4165 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4167         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4168         which make_ssa_name was called with new_stmt before new_stmt
4169         had been created.
4171 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4173         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4174         split out from...
4175         (vect_is_slp_reduction): ...here...
4176         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
4177         that are already known to be false.
4179 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4181         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4182         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
4183         STMT_VINFO_NUM_SLP_USES when it's true.
4184         (vect_free_slp_instance): Add a final_p parameter and pass it to
4185         vect_free_slp_tree.
4186         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4187         (vect_analyze_slp_instance): Likewise.
4188         (vect_slp_analyze_operations): Likewise.
4189         (vect_slp_analyze_bb_1): Likewise.
4190         * tree-vectorizer.c (vec_info): Likewise.
4191         * tree-vect-loop.c (vect_transform_loop): Likewise.
4193 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4195         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4196         function is not called for second and subsequent members of
4197         a reduction group.
4199 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4201         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4202         cases for nested loops from here to ...
4203         (vect_create_epilog_for_reduction): ...here.  Only call
4204         vect_is_simple_use for inner-loop reductions.
4206 2018-07-31  Martin Liska  <mliska@suse.cz>
4208         PR gcov-profile/85338
4209         PR gcov-profile/85350
4210         PR gcov-profile/85372
4211         * profile.c (struct location_triplet): New.
4212         (struct location_triplet_hash): Likewise.
4213         (output_location): Do not output a BB that
4214         is already recorded for a line.
4215         (branch_prob): Use streamed_locations.
4217 2018-07-31  Martin Liska  <mliska@suse.cz>
4219         PR gcov-profile/85370
4220         * coverage.c (coverage_begin_function): Do not mark target
4221         clones as artificial functions.
4223 2018-07-31  Martin Liska  <mliska@suse.cz>
4225         PR gcov-profile/83813
4226         PR gcov-profile/84758
4227         PR gcov-profile/85217
4228         PR gcov-profile/85332
4229         * profile.c (branch_prob): Do not record GOTO expressions
4230         for GIMPLE statements which locations are already streamed.
4232 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4234         * gcc.c (handle_spec_function): Accept a soft_matched_part
4235         argument, as do_spec_1.  Pass it down to ...
4236         (eval_spec_function): Accept a soft_matched_part argument,
4237         and pass it down to ...
4238         (do_spec_2): Accept a soft_matched_part argument, and pass
4239         it down to do_spec_1.
4240         (do_spec_1): Pass soft_matched_part to handle_spec_function.
4241         (handle_braces): Update call to handle_spec_function.
4242         (driver::set_up_specs): Update calls to do_spec_2.
4243         (compare_debug_dump_opt_spec_function): Likewise.
4244         (compare_debug_self_opt_spec_function): Likewise.
4246 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4248         * common.opt (nolibc): New option.
4249         * doc/invoke.texi (Link Options): Document it.
4250         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4251         * config/alpha/linux.h: Likewise.
4252         * config/arc/elf.h: Likewise.
4253         * config/arm/uclinux-elf.h: Likewise.
4254         * config/arm/unknown-elf.h: Likewise.
4255         * config/avr/avrlibc.h: Likewise.
4256         * config/bfin/bfin.h: Likewise.
4257         * config/bfin/linux.h: Likewise.
4258         * config/bfin/uclinux.h: Likewise.
4259         * config/darwin.h: Likewise.
4260         * config/darwin10.h: Likewise.
4261         * config/darwin12.h: Likewise.
4262         * config/gnu-user.h: Likewise.
4263         * config/lm32/uclinux-elf.h: Likewise.
4264         * config/pa/pa-hpux11.h: Likewise.
4265         * config/pa/pa64-hpux.h: Likewise.
4266         * config/sparc/sparc.h: Likewise.
4268 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4270         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4271         undefined variables.
4273 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4275         PR target/86640
4276         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4277         instead of GEN_INT.
4279 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4281         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4282         terminated string literal.
4284 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4286         PR rtl-optimization/85160
4287         * combine.c (is_just_move): New function.
4288         (try_combine): Allow combining two instructions into two if neither of
4289         the original instructions was a move.
4291 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
4293         PR target/86673
4294         * doc/extend.texi (Global Register Variables): Discourage use of type
4295         qualifiers.
4296         (Local Register Variables): Likewise.
4298 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
4300         PR tree-optimization/86506
4301         * hwint.h (ceil_log2): Resync with hwint.c implementation.
4303 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
4305         PR target/86547
4306         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4307         hard_regno, make sure no insn between `from` and `to` clobbers it.
4309 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
4310             Tom de Vries  <tdevries@suse.de>
4312         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4313         (PTX_DEFAULT_RUNTIME_DIM): ... this.
4314         (nvptx_goacc_validate_dims): Set default worker and gang dims to
4315         PTX_DEFAULT_RUNTIME_DIM.
4316         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4318 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
4320         * config/pa/pa.c (pa_output_addr_vec): Align address table.
4321         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4322         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4324 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
4326         * config/rs6000/constraints.md (wG constraint): Delete, no longer
4327         used.
4328         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4329         predicate to reflect toc fusion has been deleted.
4330         (toc_fusion_mem_raw): Delete, no longer used.
4331         (toc_fusion_mem_wrapped): Likewise.
4332         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4333         fusion mask bit.
4334         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4335         Delete, no longer used.
4336         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4337         meant to be used for toc fusion.
4338         (rs6000_debug_print_mode): Delete toc fusion debugging.
4339         (rs6000_debug_reg_global): Likewise.
4340         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4341         fusion and secondary reload support that were never used.
4342         (rs6000_option_override_internal): Delete TOC fusion, that was only
4343         partially defined, and it did not work unless you also used the
4344         -mcmodel= switch.
4345         (rs6000_legitimate_address_p): Delete TOC fusion support.
4346         (rs6000_opt_masks): Likewise.
4347         (fusion_wrap_memory_address): Delete function, no longer used.
4348         (fusion_split_address); Delete TOC fusion support.
4349         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4350         longer used with toc fusion being deleted.
4351         (TARGET_TOC_FUSION_FP): Likewise.
4352         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4353         UNSPEC.
4354         (toc fusion spliter): Delete TOC fusion support.
4355         (toc_fusionload_<mode>): Likewise.
4356         (toc_fusionload_di): Likewise.
4357         (fusion_gpr_load_<mode>): Delete generator function, this insn no
4358         longer needs to be named.  Rename predicate to delete TOC fusion.
4359         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4360         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4361         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4362         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4363         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4365 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4367         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4368         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
4369         __int128 in built-in function prototypes.
4370         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4371         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4373 2018-07-27  Martin Sebor  <msebor@redhat.com>
4375         PR tree-optimization/86696
4376         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4377         types, including enums.
4378         (handle_char_store): Be prepared for the above function to fail.
4380 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
4382         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4383         when optimization level is lower than 2 or optimize for size.
4385 2018-07-26  Martin Sebor  <msebor@redhat.com>
4387         PR tree-optimization/86043
4388         PR tree-optimization/86042
4389         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4390         (get_string_cst_length): Rename...
4391         (get_min_string_length): ...to this.  Add argument.
4392         (handle_char_store): Extend to handle multi-character stores by
4393         MEM_REF.
4394         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
4395         * tree.h (initializer_zerop): Add argument.
4397 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
4399         PR middle-end/86660
4400         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4401         declare target to variables if they have always,{to,from,tofrom} map
4402         kinds.
4404 2018-07-26  Martin Liska  <mliska@suse.cz>
4406         PR lto/86548
4407         * lto-wrapper.c: Add linker_output as prefix
4408         for ltrans_output_file.
4410 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
4412         PR rtl-optimization/85805
4413         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4414         value for hard registers if that was written in the same mode.
4416 2018-07-26  Martin Liska  <mliska@suse.cz>
4418         PR gcov-profile/86536
4419         * gcov.c (format_gcov): Use printf format %.*f directly
4420         and do not handle special values.
4422 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4424         * common/config/arc/arc-common.c (arc_option_optimization_table):
4425         Update default optimizations for size.
4427 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4429         * config/arc/arc.md (movsf_insn): Add short instruction selection.
4430         * config/arc/constraints.md (CfZ): New constraint.
4431         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4432         (subsf3_fpu): Likewise.
4433         (cmpsf_fpu): Likewise.
4434         (cmpsf_fpu_uneq): Likewise.
4436 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4438         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4439         accesses as well.
4440         (arc_is_uncached_mem_p): uncached applies to both the variable and
4441         the pointer.
4443 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4445         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4446         register names.
4448 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
4450         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4451         field "m_scopes" from vec to auto_vec.
4453 2018-07-25  Martin Liska  <mliska@suse.cz>
4455         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4456         return type.
4458 2018-07-25  Richard Biener  <rguenther@suse.de>
4460         PR debug/86654
4461         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4462         special wrt context_die late.
4463         (gen_subprogram_die): Re-use DIEs in local scope.
4465 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
4467         PR tree-optimization/86644
4468         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
4470 2018-07-25  Martin Liska  <mliska@suse.cz>
4472         PR middle-end/86645
4473         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4474         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4476 2018-07-25  Martin Liska  <mliska@suse.cz>
4478         PR sanitizer/79635
4479         * params.def: Explain ASan abbreviation and provide
4480         a documentation link.
4482 2018-07-24  Martin Sebor  <msebor@redhat.com>
4484         PR tree-optimization/86622
4485         PR tree-optimization/86532
4486         * builtins.h (string_length): Declare.
4487         * builtins.c (c_strlen): Correct handling of non-constant offsets.
4488         (check_access): Be prepared for non-constant length ranges.
4489         (string_length): Make extern.
4490         * expr.c (string_constant): Only handle the minor non-constant
4491         array index.  Use string_constant to compute the length of
4492         a generic string constant.
4494 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
4496         PR tree-optimization/86618
4497         * tree-vect-stmts.c (vectorizable_call): Don't take the address
4498         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4500 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
4502         PR tree-optimization/86636
4503         * json.cc (json::object::set): Fix comment.  Add assertions.
4504         (json::array::append): Move here from json.h.  Add comment and an
4505         assertion.
4506         (json::string::string): Likewise.
4507         * json.h (json::array::append): Move to json.cc.
4508         (json::string::string): Likewise.
4509         * optinfo-emit-json.cc
4510         (optrecord_json_writer::impl_location_to_json): Assert that we
4511         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4512         wrapper around it.  Expand the location once, rather than three
4513         times.
4514         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4515         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4516         wrappers.
4517         (optrecord_json_writer::optinfo_to_json): Likewise, in four
4518         places.  Fix some overlong lines.
4520 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
4522         * config/aarch64/aarch64-simd.md
4523         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4524         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4525         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4526         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4527         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4528         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4529         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4530         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4531         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4533 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
4535         PR middle-end/86627
4536         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4537         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
4538         and abs_d == d, do the power of two handling if profitable.
4540 2018-07-24  Richard Biener  <rguenther@suse.de>
4542         * match.pd: Add BIT_FIELD_REF canonicalizations.
4544 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4546         PR c/86617
4547         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4549 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4551         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4552         terminated STRING_CST object.
4554 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4556         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4558 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4560         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4561         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4562         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4563         the elements into a register.
4564         (rs6000_split_v4si_init_di_reg): Delete.
4565         (rs6000_split_v4si_init): Delete.
4566         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4567         (vsx_init_v4si): Rewrite as a define_expand.
4569 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4571         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4572         zero_extend argument from memory): New.
4574 2018-07-22  Martin Sebor  <msebor@redhat.com>
4576         PR bootstrap/86621
4577         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4578         diagnosing calls with unknown arguments unless -Walloca-larger-than
4579         is restricted to less than PTRDIFF_MAX bytes.
4581 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
4583         * doc/gcov.texi (Invoking Gcov): Editorial changes.
4585 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4587         * pretty-print.c (text_info::set_location): Remove redundant
4588         "line_table" parameter from call to rich_location::set_range.
4590 2018-07-20  Martin Sebor  <msebor@redhat.com>
4592         PR middle-end/82063
4593         * builtins.c (expand_builtin_alloca): Adjust.
4594         * calls.c (alloc_max_size): Simplify.
4595         * cgraphunit.c (cgraph_node::expand): Adjust.
4596         * common.opt (larger_than_size, warn_frame_larger_than): Remove
4597         variables.
4598         (frame_larger_than_size): Same.
4599         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4600         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4601         Initialize.
4602         * doc/invoke.texi (GCC Command Options): Document option arguments.
4603         Explain byte-size arguments and suffixes.
4604         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4605         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4606         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4607         * doc/options.texi (UInteger): Expand.
4608         (Host_Wide_Int, ByteSize): Document new properties.
4609         * final.c (final_start_function_1): Include sizes in an error message.
4610         * function.c (frame_offset_overflow): Same.
4611         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4612         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4613         Diagnose unbounded alloca calls only for limits of less than
4614         PTRDIFF_MAX.
4615         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
4616         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
4617         for alloca(0).
4618         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
4619         only for limits of less than PTRDIFF_MAX.
4620         * langhooks-def.h (lhd_handle_option): Change function argument
4621         to HOST_WIDE_INT.
4622         * langhooks.c (lhd_handle_option): Same.
4623         * langhooks.h (handle_option): Same.
4624         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4625         ByteSize flags.
4626         (var_type, var_type_struct): Same.
4627         (var_set): Handle ByteSize flag.
4628         * optc-gen.awk: Add comments to output to ease debugging.  Make
4629         use of HOST_WIDE_INT where appropriate.
4630         * opts-gen-save.awk:  Use %lx to format unsigned long.
4631         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4632         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4633         arguments.  Parse bytes-size suffixes.
4634         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4635         (enum_value_to_arg): Same.
4636         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
4637         (handle_option): Adjust.
4638         (generate_option): Change function argument to HOST_WIDE_INT.
4639         (cmdline_handle_error): Adjust.
4640         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4641         (set_option): Change function argument to HOST_WIDE_INT.
4642         (option_enabled): Handle cl_host_wide_int.
4643         (get_option_state): Handle CLVC_SIZE.
4644         (control_warning_option): Same.
4645         * opts.c (common_handle_option): Change function argument to
4646         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
4647         OPT_Wvla_larger_than_.
4648         * opts.h (enum cl_var_type): Add an enumerator.
4649         * stor-layout.c (layout_decl): Print a more meaningful warning.
4650         * toplev.c (output_stack_usage): Adjust.
4652 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
4654         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
4655         call to inline_expand_builtin_string_cmp.
4656         (expand_builtin_strcmp): Likewise.
4657         (expand_builtin_strncmp): Likewise.
4658         (inline_string_cmp): Delete the last parameter, change char_type_node
4659         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
4660         two operands.
4661         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
4662         the inlining expansion on target where the type of the call has same or
4663         narrower precision than unsigned char.
4665 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4667         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
4668         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
4669         * common.opt (fsave-optimization-record): New option.
4670         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
4671         * doc/invoke.texi (-fsave-optimization-record): New option.
4672         * dumpfile.c: Include "optinfo-emit-json.h".
4673         (struct kv_pair): Move to coretypes.h.
4674         (optgroup_options): Make non-static.
4675         (dump_context::end_scope): Call
4676         optimization_records_maybe_pop_dump_scope.
4677         * dumpfile.h (optgroup_options): New decl.
4678         * json.cc: New file.
4679         * json.h: New file.
4680         * optinfo-emit-json.cc: New file.
4681         * optinfo-emit-json.h: New file.
4682         * optinfo.cc: Include "optinfo-emit-json.h".
4683         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
4684         (optinfo_enabled_p): Check optimization_records_enabled_p.
4685         (optinfo_wants_inlining_info_p): Likewise.
4686         * optinfo.h: Update comment.
4687         * profile-count.c (profile_quality_as_string): New function.
4688         * profile-count.h (profile_quality_as_string): New decl.
4689         (profile_count::quality): New accessor.
4690         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
4691         and optinfo_emit_json_cc_tests.
4692         * selftest.h (selftest::json_cc_tests): New decl.
4693         (selftest::optinfo_emit_json_cc_tests): New decl.
4694         * toplev.c: Include "optinfo-emit-json.h".
4695         (compile_file): Call optimization_records_finish.
4696         (do_compile): Call optimization_records_start.
4697         * tree-ssa-live.c: Include optinfo.h.
4698         (remove_unused_scope_block_p): Retain inlining information if
4699         optinfo_wants_inlining_info_p returns true.
4701 2018-07-20  Richard Biener  <rguenther@suse.de>
4703         PR debug/86585
4704         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
4705         to cover -flto-partition=none.
4707 2018-07-20  Martin Liska  <mliska@suse.cz>
4709         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
4710         (get_decl_source_range): Remove unused function.
4712 2018-07-20  Richard Biener  <rguenther@suse.de>
4714         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
4715         (struct vn_phi_s): Likewise.
4716         (struct vn_reference_s): Likewise.
4717         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
4718         for searching the slot of an entry known to be in the hash itself.
4719         (vn_phi_hasher::equal): Likewise.
4720         (vn_reference_hasher::equal): Likewise.
4721         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
4722         globals.
4723         (optimistic_info, current_info): Remove, keeping only valid_info.
4724         (vn_reference_lookup_1): Remove fallback lookup.
4725         (vn_reference_lookup_2): Likewise.
4726         (vn_nary_op_lookup_1): Likewise.
4727         (vn_phi_lookup): Likewise.
4728         (vn_nary_build_or_lookup_1): Make sure to not chain the built
4729         hash element.
4730         (vn_reference_insert): Adjust, chain the inserted hash element
4731         at last_inserted_ref.
4732         (vn_reference_insert_pieces): Likewise.
4733         (visit_reference_op_call): Likewise.
4734         (vn_nary_op_insert_into): Chain the inserted hash element at
4735         last_inserted_nary.
4736         (vn_nary_op_insert_pieces): Adjust.
4737         (vn_nary_op_insert): Likewise.
4738         (vn_nary_op_insert_stmt): Likewise.
4739         (vn_phi_insert): Adjust, chain the inserted hash element at
4740         last_inserted_phi.
4741         (process_scc): Remove clearing and copying the optimistic
4742         table.  Instead remove elements inserted during an optimistic
4743         iteration from the single table we maintain.
4744         (init_scc_vn): Adjust.
4745         (free_scc_vn): Likewise.
4746         (sccvn_dom_walker::record_cond): Likewise.
4747         (sccvn_dom_walker::after_dom_children): Likewise.
4749 2018-07-19  Martin Sebor  <msebor@redhat.com>
4751         PR tree-optimization/84047
4752         PR tree-optimization/83776
4753         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
4754         (check_array_bounds): Call it.
4756 2018-07-19  Martin Sebor  <msebor@redhat.com>
4758         * align.h (align_flags): Use member initialization.
4760 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
4762         * Makefile.in (OBJS): Add optinfo.o.
4763         * coretypes.h (class symtab_node): New forward decl.
4764         (struct cgraph_node): New forward decl.
4765         (class varpool_node): New forward decl.
4766         * dump-context.h: New file.
4767         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
4768         "tree-pass.h".
4769         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
4770         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
4771         (set_alt_dump_file): Likewise.
4772         (dump_context::~dump_context): New dtor.
4773         (dump_gimple_stmt): Move implementation to...
4774         (dump_context::dump_gimple_stmt): ...this new member function.
4775         Add the stmt to any pending optinfo, creating one if need be.
4776         (dump_gimple_stmt_loc): Move implementation to...
4777         (dump_context::dump_gimple_stmt_loc): ...this new member function.
4778         Start a new optinfo and add the stmt to it.
4779         (dump_gimple_expr): Move implementation to...
4780         (dump_context::dump_gimple_expr): ...this new member function.
4781         Add the stmt to any pending optinfo, creating one if need be.
4782         (dump_gimple_expr_loc): Move implementation to...
4783         (dump_context::dump_gimple_expr_loc): ...this new member function.
4784         Start a new optinfo and add the stmt to it.
4785         (dump_generic_expr): Move implementation to...
4786         (dump_context::dump_generic_expr): ...this new member function.
4787         Add the tree to any pending optinfo, creating one if need be.
4788         (dump_generic_expr_loc): Move implementation to...
4789         (dump_context::dump_generic_expr_loc): ...this new member
4790         function.  Add the tree to any pending optinfo, creating one if
4791         need be.
4792         (dump_printf): Move implementation to...
4793         (dump_context::dump_printf_va): ...this new member function.  Add
4794         the text to any pending optinfo, creating one if need be.
4795         (dump_printf_loc): Move implementation to...
4796         (dump_context::dump_printf_loc_va): ...this new member function.
4797         Start a new optinfo and add the stmt to it.
4798         (dump_dec): Move implementation to...
4799         (dump_context::dump_dec): ...this new member function.  Add the
4800         value to any pending optinfo, creating one if need be.
4801         (dump_context::dump_symtab_node): New member function.
4802         (dump_context::get_scope_depth): New member function.
4803         (dump_context::begin_scope): New member function.
4804         (dump_context::end_scope): New member function.
4805         (dump_context::ensure_pending_optinfo): New member function.
4806         (dump_context::begin_next_optinfo): New member function.
4807         (dump_context::end_any_optinfo): New member function.
4808         (dump_context::s_current): New global.
4809         (dump_context::s_default): New global.
4810         (dump_scope_depth): Delete global.
4811         (dumpfile_ensure_any_optinfo_are_flushed): New function.
4812         (dump_symtab_node): New function.
4813         (get_dump_scope_depth): Reimplement in terms of dump_context.
4814         (dump_begin_scope): Likewise.
4815         (dump_end_scope): Likewise.
4816         (selftest::temp_dump_context::temp_dump_context): New ctor.
4817         (selftest::temp_dump_context::~temp_dump_context): New dtor.
4818         (selftest::verify_item): New function.
4819         (ASSERT_IS_TEXT): New macro.
4820         (ASSERT_IS_TREE): New macro.
4821         (ASSERT_IS_GIMPLE): New macro.
4822         (selftest::test_capture_of_dump_calls): New test.
4823         (selftest::dumpfile_c_tests): Call it.
4824         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
4825         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
4826         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
4827         descriptive comment.
4828         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
4829         (dump_node, dump_bb): Move these unrelated decls.
4830         (class dump_manager): Add leading comment.
4831         * optinfo.cc: New file.
4832         * optinfo.h: New file.
4834 2018-07-19  Michael Collison  <michael.collison@arm.com>
4835             Richard Henderson <rth@redhat.com>
4837         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
4838         (subti): Handle op1 zero.
4839         (subvti4, usub4ti4): New.
4840         (*sub<GPI>3_compare1_imm): New.
4841         (sub<GPI>3_carryinCV): New.
4842         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
4843         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
4845 2018-07-19  Michael Collison  <michael.collison@arm.com>
4846             Richard Henderson <rth@redhat.com>
4848         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
4849         (addti3): Create simpler code if low part is already known to be 0.
4850         (addvti4, uaddvti4): New.
4851         (*add<GPI>3_compareC_cconly_imm): New.
4852         (*add<GPI>3_compareC_cconly): New.
4853         (*add<GPI>3_compareC_imm): New.
4854         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
4855         handle constants within this pattern..
4856         (*add<GPI>3_compareV_cconly_imm): New.
4857         (*add<GPI>3_compareV_cconly): New.
4858         (*add<GPI>3_compareV_imm): New.
4859         (add<GPI>3_compareV): New.
4860         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
4861         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
4862         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
4863         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
4864         with 'comparison' operator.
4865         (*add<GPI>3_compareV_cconly_imm): Ditto.
4866         (*add<GPI>3_compareV_cconly): Ditto.
4867         (*add<GPI>3_compareV_imm): Ditto.
4868         (add<GPI>3_compareV): Ditto.
4869         (add<mode>3_carryinC): Ditto.
4870         (*add<mode>3_carryinC_zero): Ditto.
4871         (*add<mode>3_carryinC): Ditto.
4872         (add<mode>3_carryinV): Ditto.
4873         (*add<mode>3_carryinV_zero): Ditto.
4874         (*add<mode>3_carryinV): Ditto.
4876 2018-07-19  Michael Collison  <michael.collison@arm.com>
4877             Richard Henderson <rth@redhat.com>
4879         * config/aarch64/aarch64-modes.def (CC_V): New.
4880         * config/aarch64/aarch64-protos.h
4881         (aarch64_addti_scratch_regs): Declare
4882         (aarch64_subvti_scratch_regs): Declare.
4883         (aarch64_expand_subvti): Declare.
4884         (aarch64_gen_unlikely_cbranch): Declare
4885         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
4886         for signed overflow using CC_Vmode.
4887         (aarch64_get_condition_code_1): Handle CC_Vmode.
4888         (aarch64_gen_unlikely_cbranch): New function.
4889         (aarch64_addti_scratch_regs): New function.
4890         (aarch64_subvti_scratch_regs): New function.
4891         (aarch64_expand_subvti): New function.
4893 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4895         * config/aarch64/aarch64-option-extensions.def: New entry for profile
4896         extension.
4897         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
4898         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
4899         extension.
4901 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4903         PR target/83009
4904         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4905         address check not strict.
4907 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4909         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
4910         Umq with Umn.
4911         (store_pair_lanes<mode>): Likewise.
4912         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
4913         enum value 'ADDR_QUERY_LDP_STP_N'.
4914         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
4915         (aarch64_print_address_internal): Add declaration.
4916         (aarch64_print_ldpstp_address): Remove.
4917         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
4918         (aarch64_print_operand): Change printing of 'y'.
4919         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
4920         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
4921         'true' rather than '1'.
4922         * config/aarch64/constraints.md (Uml): Likewise.
4923         (Uml): Rename to Umn.
4924         (Umq): Remove.
4926 2018-07-19  Richard Biener  <rguenther@suse.de>
4928         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
4929         a trailing array.
4930         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
4931         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
4932         (vn_reference_hasher): Likewise.
4933         (struct vn_tables_s): Remove obstack and alloc-pool members.
4934         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
4935         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
4936         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
4937         (vn_reference_insert_pieces): Likewise.
4938         (alloc_vn_nary_op_noinit): Adjust.
4939         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
4940         (vn_phi_eq): Adjust.
4941         (shared_lookup_phiargs): Remove.
4942         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
4943         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
4944         (visit_reference_op_call): Likewise.
4945         (copy_nary, copy_phi, copy_reference): Remove.
4946         (process_scc): Rewind the obstack when iterating.  Do not
4947         copy the elements to valid_info but just move them from one
4948         hashtable to the other.
4949         (allocate_vn_table): Adjust.
4950         (free_vn_table): Likewise.
4951         (init_scc_vn): Likewise.
4952         (free_scc_vn): Likewise.
4954 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
4956         PR target/86560
4957         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
4958         indirect_return as function type attribute.
4959         (ix86_attribute_table): Change indirect_return to function
4960         type attribute.
4961         * doc/extend.texi: Update indirect_return attribute.
4963 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
4965         * wide-int.h (widest2_int): New.
4966         * gimple-fold.c (arith_overflowed_p): Use it.
4967         * tree.h (widest2_int_cst): New.
4968         * tree-vrp.c (wide_int_binop_overflow): Rename from
4969         vrp_int_const_binop.
4970         Rewrite to work on trees.
4971         (extract_range_from_multiplicative_op_1): Abstract code to...
4972         (wide_int_range_min_max): ...here.
4973         (wide_int_range_cross_product): ...and here.
4974         (extract_range_from_binary_expr_1): Abstract overflow code to...
4975         (wide_int_range_mult_wrapping): ...here.
4976         * tree-vrp.h (wide_int_range_cross_product): New.
4977         (wide_int_range_mult_wrapping): New.
4979 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
4980             Julia Koval  <julia.koval@intel.com>
4982         * config/i386/x86-tune-costs.h (skylake_memcpy,
4983         skylake_memset): Replace rep_prefix with unrolling for size 512.
4985 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
4987         PR middle-end/86544
4988         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
4989         comparision with EQ_EXPR in last stmt.
4991 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4993         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
4994         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
4995         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
4996         previously known as "PowerPC AltiVec Built-in Functions".  Move
4997         some material to new subsubsections "PowerPC AltiVec Built-in
4998         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
4999         ISA 2.07".
5000         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5001         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5002         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5003         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5005 2018-07-18  Richard Biener  <rguenther@suse.de>
5007         PR tree-optimization/86557
5008         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5009         EXACT_DIV_EXPR.
5011 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
5013         * config/s390/s390.c (s390_function_profiler): Generate CFI.
5015 2018-07-17  Jeff Law  <law@redhat.com>
5017         * config/arm/arm.c (get_label_padding): Update for recent
5018         changes to label_to_alignment.
5020         PR tree-optimization/86010
5021         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5023         * config/mips/mips.c (vr4130_align_insns): Update for recent
5024         changes to label_to_alignment.
5026         * config/frv/frv.c (frv_label_align): Update for recent changes
5027         to label_to_alignment.
5029         * config/nios2/nios2.c (nios2_label_align): Update for recent
5030         changes which dropped ALIGN_LABELS_LOG.
5032 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
5034         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5035         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5037 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
5039         * config/arc/arc.c (arc_label_align): Use align_labels instead of
5040         deprecated align_labels_log.
5042 2018-07-17  Richard Biener  <rguenther@suse.de>
5044         PR lto/86456
5045         * dwarf2out.c (init_sections_and_labels): Always generate
5046         a debug_line_str_section for early LTO debug.
5047         (dwarf2out_finish): Reset debug_line_str_hash output early.
5048         Bump counter for extra dwarf5 .debug_loc labels to not conflict
5049         with fat LTO part.
5050         (dwarf2out_early_finish): Output debug_line_str.
5052 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5054         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5055         index register on z196 or later.
5057 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5059         * config/s390/s390.c (s390_default_align): Set default function
5060         alignment to 16.
5061         (s390_override_options_after_change): Call s390_default align.
5062         (s390_option_override_internal): Call s390_default_align.
5063         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5065 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5067         PR middle-end/86542
5068         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5069         to _looptemp_ clauses, other than the first two.
5071 2018-07-17  Martin Liska  <mliska@suse.cz>
5073         * opts.c: Do not enable OPT_falign_* for -Os.
5075 2018-07-17  Martin Liska  <mliska@suse.cz>
5077         * align.h (MAX_CODE_ALIGN): New.
5078         (MAX_CODE_ALIGN_VALUE): New.
5079         * common/config/i386/i386-common.c (ix86_handle_option):
5080         (MAX_CODE_ALIGN): Moved to align.h.
5081         * final.c (MAX_CODE_ALIGN): Likewise.
5082         * opts.c (parse_and_check_align_values):
5083         (MAX_CODE_ALIGN): Likewise.
5084         (MAX_CODE_ALIGN_VALUE): Likewise.
5086 2018-07-17  Martin Liska  <mliska@suse.cz>
5088         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5089         in order to fulfil coding style.
5090         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5091         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5092         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5093         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5094         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5095         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5096         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5097         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5098         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5100 2018-07-17  Martin Liska  <mliska@suse.cz>
5102         * align.h: New file.
5103         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5104         directly.
5105         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5106         align_flags of label_to_alignment.
5107         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5108         align_flags class.
5109         * config/m68k/m68k.c: Do not use removed align_labels_value and
5110         align_loops_value.
5111         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5112         (LOOP_ALIGN): Likewise.
5113         (LABEL_ALIGN): Likewise.
5114         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5115         Remove not used macro.
5116         (rs6000_loop_align): Change return type to align_flags.
5117         (rs6000_loop_align_max_skip): Remove.
5118         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5119         Change return type to align_flags.
5120         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5121         Remove not used macro.
5122         (rs6000_loop_align):  Change return type to align_flags.
5123         (rs6000_loop_align_max_skip): Remove.
5124         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5125         * config/rx/rx-protos.h (rx_align_for_label): Make it
5126         static function.
5127         * config/rx/rx.c (rx_align_for_label): Change return type
5128         to align_flags.
5129         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5130         macro definitions.
5131         into align_flags class.
5132         (LABEL_ALIGN): Likewise.
5133         (LOOP_ALIGN): Likewise.
5134         * config/s390/s390.c (s390_label_align): Use align_flags
5135         class member.
5136         (s390_asm_output_function_label): Likewise.
5137         * config/sh/sh.c (sh_override_options_after_change):
5138         Use align_flags class directly without macros.
5139         (find_barrier): Likewise.
5140         (barrier_align): Likewise.
5141         (sh_loop_align): Likewise.
5142         * config/spu/spu.c (spu_option_override):
5143         Use align_flags_tuple::get_value instead of removed macros.
5144         (spu_sched_init): Likewise.
5145         * config/spu/spu.h (GTY): Likewise.
5146         * config/visium/visium.c (visium_option_override):
5147         Set "8" as default secondary alignment.
5148         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5149         in order to guarantee secondary alignment of 8.
5150         * coretypes.h: Include align.h header file.
5151         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5152         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5153         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5154         * doc/tm.texi.in: Likewise.
5155         * final.c (struct label_alignment): Remove not used structure.
5156         (LABEL_ALIGN): Change type to align_flags.
5157         (LOOP_ALIGN): Likewise.
5158         (JUMP_ALIGN): Likewise.
5159         (default_loop_align_max_skip): Remove.
5160         (default_label_align_max_skip): Likewise.
5161         (default_jump_align_max_skip): Likewise.
5162         (default_label_align_after_barrier_max_skip):
5163         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5164         (LABEL_TO_MAX_SKIP): Remove.
5165         (label_to_alignment): Return align_flags type instead of integer.
5166         (label_to_max_skip): Remove.
5167         (align_fuzz): Use align_flags type.
5168         (compute_alignments): Use align_flags type and use align_flags::max
5169         to combine multiple alignments.
5170         (grow_label_align): Grow vec instead of C array.
5171         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5172         (shorten_branches):  Use align_flags type and use align_flags::max
5173         to combine multiple alignments.
5174         (final_scan_insn_1): Remove usage of secondary alignment that comes
5175         from label alignment, but instead use proper secondary alignment
5176         which is computed in grow_label_align.
5177         * flags.h (struct align_flags_tuple): Move to align.h.
5178         (struct align_flags): Likewise.
5179         (state_align_loops): Rename to align_loops.
5180         (state_align_jumps): Rename to align_jumps.
5181         (state_align_labels): Rename to align_labels.
5182         (state_align_functions): Rename to align_functions.
5183         (align_loops_log): Remove.
5184         (align_jumps_log): Remove.
5185         (align_labels_log): Remove.
5186         (align_functions_log): Remove.
5187         (align_loops_max_skip): Remove.
5188         (align_jumps_max_skip): Remove.
5189         (align_labels_max_skip): Remove.
5190         (align_functions_max_skip): Remove.
5191         (align_loops_value): Remove.
5192         (align_jumps_value): Remove.
5193         (align_labels_value): Remove.
5194         (align_functions_value): Remove.
5195         * output.h (label_to_alignment): Change return type to align_flags.
5196         (label_to_max_skip): Remove.
5197         * target.def: Remove loop_align_max_skip, label_align_max_skip,
5198         jump_align_max_skip macros.
5199         * targhooks.h (default_loop_align_max_skip): Remove.
5200         (default_label_align_max_skip): Likewise.
5201         (default_jump_align_max_skip): Likewise.
5202         (default_label_align_after_barrier_max_skip): Remove.
5203         * toplev.c (read_log_maxskip): Use ::normalize function.
5204         (parse_N_M): Remove not used argument and also call ::normalize.
5205         (parse_alignment_opts): Do not pass unused arguments.
5206         * varasm.c (assemble_start_function): Use directly align_functions
5207         instead of removed macros.
5208         * system.h: Do not poison removed macros.
5210 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5212         PR middle-end/86539
5213         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5214         and cond temporaries don't have reference type if iterator has
5215         pointer type.  For init use &for_pre_body instead of pre_p if
5216         for_pre_body is non-empty.
5218 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5220         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5221         double-double modes to SFmode directly directly.
5222         (trunc<mode>sf2_fprs): Delete.
5224 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5226         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5227         for conversions between IFmode and the decimal floating point modes.
5228         (init_float128_ieee): Use the correct names for conversions between
5229         KFmode and the decimal floating point modes.
5231 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5233         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5234         for the conversions between TDmode and IFmode.
5235         (init_float128_ieee): Use more correct names for the conversions
5236         between TDmode and KFmode.
5238 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
5240         PR tree-optimization/86526
5241         * builtins.c (expand_builtin_memcmp): Formatting fixes.
5242         (inline_expand_builtin_string_cmp): Likewise.
5243         (inline_string_cmp): Likewise.  Use c_readstr instead of
5244         builtin_memcpy_read_str.  Add unit_mode temporary.
5246 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5248         PR middle-end/86528
5249         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5250         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5252 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5254         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5255         Alphabetize prototypes of built-in functions, separating out
5256         built-in functions that are listed in this section but should be
5257         described elsewhere.
5259 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
5261         PR target/86511
5262         * expmed.c (emit_store_flag): Do not emit setcc followed by a
5263         conditional move when trapping comparison was split to a
5264         non-trapping one (and vice versa).
5266 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5268         * config/s390/s390.c (s390_function_profiler): Generate nops
5269         instead of profiler call sequences.
5270         * config/s390/s390.opt: Add the new option.
5272 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5274         * config/s390/s390.c (s390_function_profiler): Generate
5275         __mcount_loc section.
5276         * config/s390/s390.opt: Add the new option.
5278 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5280         * common.opt: Add the new warning.
5281         * config/s390/s390.c (s390_function_profiler): Emit "brasl
5282         %r0,__fentry__" when -mfentry is specified.
5283         (s390_option_override_internal): Disallow -mfentry for 31-bit
5284         CPUs.
5285         * config/s390/s390.opt: Add the new option.
5287 2018-07-16  Richard Biener  <rguenther@suse.de>
5289         PR lto/86523
5290         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5291         for function-local FUNCTION_DECL and RESULT_DECL immediately.
5293 2018-07-16  Martin Liska  <mliska@suse.cz>
5295         PR ipa/86529
5296         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5297         to ::get_create.
5299 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5301         * config/arc/arcHS.md: Update ARCHS scheduling rules.
5303 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5305         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5306         for ARCHS4x.
5307         * config/arc/arc-cpus.def (hs4x): New cpu.
5308         (hs4xd): Likewise.
5309         * config/arc/arc-tables.opt: Regenerate.
5310         * config/arc/arc.c (arc_sched_issue_rate): New function.
5311         (TARGET_SCHED_ISSUE_RATE): Define.
5312         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5313         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5314         fpu_cvt.
5315         (attr tune): Add ARCHS4x tune values.
5316         (attr tune_dspmpy): Define.
5317         (*tst): Correct instruction type.
5318         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5319         * config/arc/arcHS4x.md: New file.
5320         * config/arc/fpu.md: Update instruction type attributes.
5321         * config/arc/t-multilib: Regenerate.
5323 2018-07-16  Tom de Vries  <tdevries@suse.de>
5325         PR debug/86455
5326         * var-tracking.c (vt_initialize): Fix pre_dec handling.
5328 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5330         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5331         early clobber.
5333 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
5335         PR tree-optimization/86514
5336         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5337         conversion to a boolean type from a type with greater precision.
5339 2018-07-16  Tom de Vries  <tdevries@suse.de>
5341         * var-tracking.c (vt_initialize): Print adjusted insn slim if
5342         dump_flags request TDF_SLIM.
5344 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
5346         * fold-const.c (int_const_binop_1): Abstract...
5347         (wide_int_binop): ...wide int code here.
5348         (poly_int_binop): ...poly int code here.
5349         Abstract the rest of int_const_binop_1 into int_const_binop.
5350         * fold-const.h (wide_int_binop): New.
5351         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5352         Remove useless PLUS/MINUS_EXPR case.
5353         (zero_nonzero_bits_from_vr): Move wide int code...
5354         (zero_nonzero_bits_from_bounds): ...here.
5355         (extract_range_from_binary_expr_1): Move mask optimization code...
5356         (range_easy_mask_min_max): ...here.
5357         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5358         (range_easy_mask_min_max): New.
5360 2018-07-15  Jeff Law  <law@redhat.com>
5362         PR target/85993
5363         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5364         block.
5366 2018-07-14  Jim Wilson  <jimw@sifive.com>
5368         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5370 2018-07-14  Paul Koning  <ni1d@arrl.net>
5372         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5374 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
5376         * lto-streamer-out.c (copy_function_or_variable): Dump info about
5377         copying section.
5379 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
5380             Steve Munroe  <munroesj52@gmail.com>
5382         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5383         (_mm_andnot_si128): Likewise.
5384         (_mm_or_si128): Likewise.
5385         (_mm_xor_si128): Likewise.
5387 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
5389         PR middle-end/78809
5390         * builtins.c (expand_builtin_memcmp): Inline the calls first
5391         when result_eq is false.
5392         (expand_builtin_strcmp): Inline the calls first.
5393         (expand_builtin_strncmp): Likewise.
5394         (inline_string_cmp): New routine. Expand a string compare
5395         call by using a sequence of char comparison.
5396         (inline_expand_builtin_string_cmp): New routine. Inline expansion
5397         a call to str(n)cmp/memcmp.
5398         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5399         New option.
5400         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5402 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
5404         * config/arm/driver-arm.c: Include arm-native.h.
5405         (host_detect_local_cpu): Use auto-generated data tables.
5406         (vendors, arm_cpu_table): Delete.  Move part information to ...
5407         * config/arm/arm-cpus.in: ... here.
5408         * config/arm/parsecpu.awk (gen_native): New function.
5409         (vendor, part): New CPU fields.
5410         (END): Add support for building the native CPU detection tables.
5411         * config/arm/t-arm (arm-native.h): Add build rule.
5412         (driver-arm.o): Add dependency on arm-native.h.
5414 2018-07-13  Richard Biener  <rguenther@suse.de>
5416         PR middle-end/85974
5417         * match.pd (addr1 - addr2): Allow either of the operand to
5418         have a conversion.
5420 2018-07-13  Tom de Vries  <tdevries@suse.de>
5422         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5423         in remap_ssa_name.
5425 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
5427         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5428         arrays instead of numbered variables.
5430 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
5432         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5433         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5435 2018-07-13  Richard Biener  <rguenther@suse.de>
5437         PR debug/86452
5438         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5439         instead of get_context_die.
5441 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
5442             Richard Biener  <rguenther@suse.de>
5444         PR middle-end/86489
5445         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5446         that the loop latch destination where phi is defined.
5448 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
5450         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5451         (riscv_expand_epilogue): Add assertion to check interrupt mode.
5452         (riscv_set_current_function): Extract getting interrupt type to new
5453         function.
5454         (riscv_get_interrupt_type): New function.
5455         (riscv_merge_decl_attributes): New function, checking interrupt type is
5456         same.
5457         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5459 2018-07-12  Paul Koning  <ni1d@arrl.net>
5461         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5462         directive.
5464 2018-07-12  Paul Koning  <ni1d@arrl.net>
5466         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5467         zero reference, add doloop_end instead.
5468         * doc/md.texi (decrement_and_branch_until_zero): Remove.
5469         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
5470         detail for doloop_end.
5472 2018-07-12  Martin Sebor  <msebor@redhat.com>
5474         PR c/86453
5475         * attribs.c (decl_attributes): Reject conflicting attributes before
5476         calling attribute handlers.
5478 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5480         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5481          parameter.
5482         (gcc::dump_manager::get_dump_file_name): likewise.
5483         (dump_begin): Likewise.
5484         * dumpfile.h (dump_begin): Update prototype.
5485         (gcc::dump_manager::get_dump_file_name,
5486         gcc::dump_manager::get_dump_file_name): Update prototype.
5488 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5490         * internal-fn.h (vectorizable_internal_fn_p): New function.
5491         * tree-vect-slp.c (compatible_calls_p): Likewise.
5492         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
5493         to internal functions.
5494         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5496 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5498         * fold-const.h (inverse_conditions_p): Declare.
5499         * fold-const.c (inverse_conditions_p): New function.
5500         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
5501         that test the inverse condition of a conditional internal function.
5502         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5503         * internal-fn.c (internal_fn_mask_index): Handle conditional
5504         internal functions.
5505         (vectorized_internal_fn_supported_p): New function.
5506         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5507         (any_pred_load_store): Replace with...
5508         (need_to_predicate): ...this new variable.
5509         (redundant_ssa_names): New variable.
5510         (ifcvt_can_use_mask_load_store): Move initial checks to...
5511         (ifcvt_can_predicate): ...this new function.  Handle tree codes
5512         for which a conditional internal function exists.
5513         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5514         instead of ifcvt_can_use_mask_load_store.  Update after variable
5515         name change.
5516         (predicate_load_or_store): New function, split out from
5517         predicate_mem_writes.
5518         (check_redundant_cond_expr): New function.
5519         (value_available_p): Likewise.
5520         (predicate_rhs_code): Likewise.
5521         (predicate_mem_writes): Rename to...
5522         (predicate_statements): ...this.  Use predicate_load_or_store
5523         and predicate_rhs_code.
5524         (combine_blocks, tree_if_conversion): Update after above name changes.
5525         (ifcvt_local_dce): Handle redundant_ssa_names.
5526         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5527         general conditional functions.
5528         * tree-vect-stmts.c (vectorizable_call): Likewise.
5530 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5531             Alan Hayward  <alan.hayward@arm.com>
5532             David Sherwood  <david.sherwood@arm.com>
5534         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5535         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5536         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5537         plus and minus and convert them into IFN_COND_FMA-based sequences.
5538         (convert_mult_to_fma): Handle conditional plus and minus.
5540 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5542         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5543         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5544         (cond_fnms_optab): New optabs.
5545         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5546         internal functions.
5547         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5548         * internal-fn.h (get_conditional_internal_fn): Declare.
5549         (get_unconditional_internal_fn): Likewise.
5550         * internal-fn.c (cond_ternary_direct): New macro.
5551         (expand_cond_ternary_optab_fn): Likewise.
5552         (direct_cond_ternary_optab_supported_p): Likewise.
5553         (FOR_EACH_COND_FN_PAIR): Likewise.
5554         (get_conditional_internal_fn): New function.
5555         (get_unconditional_internal_fn): Likewise.
5556         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5557         (gimple_match_op::gimple_match_op): Add a new overload for 5
5558         operands.
5559         (gimple_match_op::set_op): Likewise.
5560         (gimple_resimplify5): Declare.
5561         * genmatch.c (decision_tree::gen): Generate simplifications for
5562         5 operands.
5563         * gimple-match-head.c (gimple_simplify): Define an overload for
5564         5 operands.  Handle calls with 5 arguments in the top-level overload.
5565         (convert_conditional_op): Handle conversions from unconditional
5566         internal functions to conditional ones.
5567         (gimple_resimplify5): New function.
5568         (build_call_internal): Pass a fifth operand.
5569         (maybe_push_res_to_seq): Likewise.
5570         (try_conditional_simplification): Try converting conditional
5571         internal functions to unconditional internal functions.
5572         Handle 3-operand unconditional forms.
5573         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5574         Define ternary equivalents of the current rules for binary conditional
5575         internal functions.
5576         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5577         ternary operations.
5578         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5579         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5580         (optab): Handle them.
5581         (SVE_COND_FP_TERNARY): New int iterator.
5582         (sve_fmla_op, sve_fmad_op): New int attributes.
5583         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5584         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5585         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5587 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5589         * target.def (preferred_else_value): New target hook.
5590         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5591         * doc/tm.texi: Regenerate.
5592         * targhooks.h (default_preferred_else_value): Declare.
5593         * targhooks.c (default_preferred_else_value): New function.
5594         * internal-fn.h (conditional_internal_fn_code): Declare.
5595         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5596         (get_conditional_internal_fn): Use it.
5597         (conditional_internal_fn_code): New function.
5598         * gimple-match.h (gimple_match_cond): New struct.
5599         (gimple_match_op): Add a cond member function.
5600         (gimple_match_op::gimple_match_op): Update all forms to take a
5601         gimple_match_cond.
5602         * genmatch.c (expr::gen_transform): Use the same condition as res_op
5603         for the suboperation, but don't specify a particular else_value.
5604         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5605         (visit_nary_op, visit_reference_op_load): Pass
5606         gimple_match_cond::UNCOND to the gimple_match_op constructor.
5607         * gimple-match-head.c: Include tree-eh.h
5608         (convert_conditional_op): New function.
5609         (maybe_resimplify_conditional_op): Likewise.
5610         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5611         (gimple_resimplify2): Likewise.
5612         (gimple_resimplify3): Likewise.
5613         (gimple_resimplify4): Likewise.
5614         (maybe_push_res_to_seq): Return null for conditional operations.
5615         (try_conditional_simplification): New function.
5616         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
5617         constructor.
5618         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5619         IFN_COND_* call.
5620         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5621         function.
5622         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5624 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5626         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5627         DECL_FCONTEXT
5628         (hash_tree): Do not hash DECL_FCONTEXT
5629         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5630         Do not stream DECL_FCONTEXT.
5631         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5632         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5634 2018-07-12  Richard Biener  <rguenther@suse.de>
5636         PR debug/86462
5637         * dwarf2out.c (gen_block_die): Only output blocks when they have
5638         at least one !DECL_IGNORED_P variable.
5640 2018-07-12  Richard Biener  <rguenther@suse.de>
5642         PR target/84829
5643         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5644         Remove -mieee-fp handling.
5646 2018-07-12  Richard Biener  <rguenther@suse.de>
5648         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
5649         left-over from last patch.
5651 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
5653         PR tree-optimization/86492
5654         * gimple-ssa-store-merging.c
5655         (imm_store_chain_info::coalesce_immediate_stores): Call
5656         check_no_overlap even for the merge_overlapping case.  Formatting fix.
5658 2018-07-12  Richard Biener  <rguenther@suse.de>
5660         PR middle-end/86479
5661         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
5662         move possibly trapping operations into the conditional.
5664 2018-07-12  Richard Biener  <rguenther@suse.de>
5666         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
5667         (vn_lookup_simplify_result): Remove recursion limit applied
5668         here.
5669         (vn_nary_build_or_lookup_1): Adjust.
5670         (try_to_simplify): Likewise.
5671         * gimple-match-head.c (gimple_resimplify1): Instead apply one
5672         here.
5673         (gimple_resimplify2): Likewise.
5674         (gimple_resimplify3): Likewise.
5675         (gimple_resimplify4): Likewise.
5677 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
5679         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
5680         Use __mmask64 type instead of __mmask8 for __M argument.
5681         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
5682         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
5683         __U argument.
5684         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
5685         __mmask16 for __M argument.
5686         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
5687         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
5688         to __mmask16 instead of __mmask8.
5689         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
5690         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
5691         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
5692         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
5693         instead of __mmask16 for __U argument.
5694         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
5695         __mmask16 instead of __mmask8 for __U argument.
5696         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
5697         __U argument.
5698         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
5699         __mmask16.
5700         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
5701         argument.
5702         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
5703         __U argument.
5704         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
5705         __mmask16.
5706         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
5707         of __mmask16.
5708         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
5709         __U argument.
5710         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
5711         __U argument.
5712         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
5713         __U argument.
5714         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
5715         __U argument.
5716         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
5717         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
5718         return type as well as __M argument type and all casts from __mmask8
5719         to __mmask32.
5720         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
5721         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
5722         return type as well as __M argument type and all casts from __mmask8
5723         to __mmask16.
5724         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
5725         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
5726         return type as well as __M argument type and all casts from __mmask8
5727         to __mmask32.
5728         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
5729         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
5730         return type as well as __M argument type and all casts from __mmask8
5731         to __mmask16.
5732         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
5733         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
5734         __mmask16.
5736 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
5738         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
5739         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
5740         for __U argument.
5742 2018-07-11  Paul Koning  <ni1d@arrl.net>
5744         * doc/md.texi (define_subst): Document how multiple occurrences of
5745         the same argument in the replacement pattern are handled.
5747 2018-07-11  Paul Koning  <ni1d@arrl.net>
5749         * doc/extend.texi (Common Variable Attributes): Move "mode" into
5750         alphabetical order.
5751         (Common Type Attributes): Add "mode" attribute.
5753 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
5755         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
5756         stream DECL_ORIGINAL_TYPE.
5757         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
5758         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
5759         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
5760         Do not walk original type.
5761         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
5762         external decls.
5763         (write_ts_decl_non_common_tree_pointers): Do not stream
5764         DECL_ORIGINAL_TYPE
5765         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
5766         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
5768 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
5770         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
5771         thread twice from the same starting edge.
5773 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
5775         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
5776         * gimple.c (gimple_call_nonnull_result_p): ...here...
5777         (gimple_call_nonnull_arg): ...and here.
5778         * gimple.h (gimple_call_nonnull_result_p): New.
5779         (gimple_call_nonnull_arg): New.
5781 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
5783         * config/arm/arm-cpus.in: Move information from fpu field of each
5784         cpu definition to the isa field.
5785         * config/arm/parsecpu.awk (fpu): Delete match rule.
5786         (gen_comm_data): Don't add bits from the CPU's FPU entry.
5788 2018-07-11  Richard Biener  <rguenther@suse.de>
5790         PR debug/86457
5791         * dwarf2out.c (init_sections_and_labels): Use
5792         output_asm_line_debug_info consistently.
5793         (dwarf2out_early_finish): Likewise.
5794         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
5795         type units.
5797 2018-07-11  Richard Biener  <rguenther@suse.de>
5799         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
5800         Rework father_bb setting in a way to avoid propagating constants
5801         multiple times on a loop body.
5803 2018-07-10  Mark Wielaard  <mark@klomp.org>
5805         PR debug/86459
5806         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
5808 2018-07-10  Richard Biener  <rguenther@suse.de>
5810         * hash-map.h (hash_map::iterator::operator*): Return
5811         references to key and value.
5813 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
5815         PR c++/86443
5816         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
5817         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
5818         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
5819         (gimplify_omp_for): For composite loops, move outer
5820         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
5821         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
5822         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
5823         TREE_LIST for both the original class iterator and the "last" helper
5824         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
5825         loop, remember has_decl_expr from outer composite loops for the
5826         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
5828 2018-07-09  Martin Sebor  <msebor@redhat.com>
5830         PR middle-end/77357
5831         PR middle-end/86428
5832         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
5833         accessing implicitly initialized array elements.
5834         * expr.c (string_constant): Handle string initializers of
5835         character arrays within aggregates.
5836         * gimple-fold.c (fold_array_ctor_reference): Add argument.
5837         Store element offset.  As a special case, handle zero size.
5838         (fold_nonarray_ctor_reference): Same.
5839         (fold_ctor_reference): Add argument.  Store subobject offset.
5840         * gimple-fold.h (fold_ctor_reference): Add argument.
5842 2018-07-09  Paul Koning  <ni1d@arrl.net>
5844         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
5845         (pdp11_insn_cost): New function.
5846         (pdp11_md_asm_adjust): New function.
5847         (TARGET_INVALID_WITHIN_DOLOOP): Define.
5848         (pdp11_rtx_costs): Update to match machine better.
5849         (output_addr_const_pdp11): Correct format mismatch warnings.
5850         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
5851         * config/pdp11/pdp11.md: General change to add base_cost and/or
5852         length attributes for use by new pdp11_insn_cost function.
5853         (MIN_BRANCH): Correct definition.
5854         (MIN_SOB): Ditto.
5855         (doloop_end): Use standard pattern name for looping pattern.
5856         (doloop_end_nocc): New.
5857         (movsf): Add another constraint alternative.
5858         (zero_extendqihi2): Add constraint alternatives for not in place
5859         extend.
5860         (zero_extendhisi2): Remove.
5861         (shift patterns): Add CC handling variants.
5862         (bswaphi2): New.
5863         (bswapsi2): New.
5864         (rothi3): New.
5865         (define_peephole2): New peephole to recognize mov that sets CC for
5866         subsequent test.
5868 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5870         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
5871         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
5872         wi::add.
5874 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
5876         PR c/86420
5877         * real.c (real_nextafter): Return true if result is denormal.
5879 2018-07-09  Martin Liska  <mliska@suse.cz>
5881         * common.opt: Add back wrongly removed attribute.
5883 2018-07-09  Richard Biener  <rguenther@suse.de>
5885         PR debug/86413
5886         * dwarf2out.c (gen_block_die): For an early generated DIE
5887         always output high/low PC attributes.
5889 2018-07-09  Tom de Vries  <tdevries@suse.de>
5891         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
5892         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
5893         onto VAR_DECL with abstract origin.
5895 2018-07-07  Jim Wilson  <jimw@sifive.com>
5897         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
5899 2018-07-07  Tom de Vries  <tdevries@suse.de>
5901         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
5903 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
5905         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
5906         overflow_type.
5907         (combine_bound): Use wide-int overflow calculation instead of
5908         rolling our own.
5909         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
5910         overflow_type.
5911         * fold-const.c (int_const_binop_2): Same.
5912         (extract_muldiv_1): Same.
5913         (fold_div_compare): Same.
5914         (fold_abs_const): Same.
5915         * match.pd: Same.
5916         * poly-int.h (add): Same.
5917         (sub): Same.
5918         (neg): Same.
5919         (mul): Same.
5920         * predict.c (predict_iv_comparison): Same.
5921         * profile-count.c (slow_safe_scale_64bit): Same.
5922         * simplify-rtx.c (simplify_const_binary_operation): Same.
5923         * tree-chrec.c (tree_fold_binomial): Same.
5924         * tree-data-ref.c (split_constant_offset_1): Same.
5925         * tree-if-conv.c (idx_within_array_bound): Same.
5926         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
5927         * tree-ssa-phiopt.c (minmax_replacement): Same.
5928         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
5929         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
5930         * vr-values.c (vr_values::adjust_range_with_scev): Same.
5931         * wide-int.cc (wi::add_large): Same.
5932         (wi::mul_internal): Same.
5933         (wi::sub_large): Same.
5934         (wi::divmod_internal): Same.
5935         * wide-int.h: Change overflow type to overflow_type for neg, add,
5936         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
5937         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
5938         mul_internal, divmod_internal.
5939         (overflow_type): New enum.
5940         (accumulate_overflow): New.
5942 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
5944         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
5945         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
5947 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5949         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
5950         argument is checked for zero before entering loop, avoid checking again.
5952 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
5954         * gimplify.h (generic_expr_could_trap_p): Set as global function.
5955         * gimplify.h (generic_expr_could_trap_p): Likwise.
5956         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
5958 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
5960         PR tree-optimization/86401
5961         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
5962         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
5963         (fold_bit_and_mask): ... here.  New helper function for match.pd.
5964         * fold-const.h (fold_bit_and_mask): Declare.
5965         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
5967 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
5969         PR target/86324
5970         * target.def (translate_mode_attribute): New hook.
5971         * targhooks.h (default_translate_mode_attribute): Declare.
5972         * targhooks.c (default_translate_mode_attribute): New function.
5973         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
5974         * doc/tm.texi: Regenerate.
5975         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
5976         (rs6000_translate_mode_attribute): New function.
5978 2018-07-06  Paul Koning  <ni1d@arrl.net>
5980         * doc/md.texi (define_split): Document DONE and FAIL.
5981         (define_peephole2): Ditto.
5983 2018-07-05  Jeff Law  <law@redhat.com>
5985         PR tree-optimization/86010
5986         * tree-ssa-dse.c (compute_trims): More aggressively trim at
5987         both the head and tail of mem* and str* calls.
5989 2018-07-05  Jim Wilson  <jimw@sifive.com>
5991         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
5993 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
5995         * config/aarch64/aarch64-simd.md: correct flags text for
5996         MIN_EXPR replacement.
5998 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
6000         * configure: Regenerated.
6002 2018-07-05  Carl Love  <cel@us.ibm.com>
6004         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6005         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6006         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6007         VSX_BUILTIN_DOUBLEL_V4SF.
6009 2018-07-05  Martin Sebor  <msebor@redhat.com>
6011         PR c++/86400
6012         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6013         than its domain to compute its the upper bound of a char array.
6015 2018-07-05  Nathan Sidwell  <nathan@acm.org>
6017         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6018         * doc/cpp.texi: Update comment.
6019         * doc/tm.texi: Rebuilt.
6020         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6021         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6022         * doc/extend.texi (Backwards Compatibility): Clarify it is system
6023         headers affected by extern "C".
6024         * system.h: Poison NO_IMPLICIT_EXTERN_C.
6025         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6026         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6027         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6028         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6029         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6030         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6031         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6032         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6033         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6034         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6035         config/sparc/sp64-elf.h, config/spu/spu.h,
6036         config/stormy16/stormy16.h, config/v850/v850.h,
6037         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6038         define NO_IMPLICIT_EXTERN_C.
6039         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6041 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6043         PR target/84711
6044         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6045         instead of GET_MODE_SIZE when comparing Units.
6047 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6049         PR target/84711
6050         * rtlanal.c (set_noop_p): Constrain on mode change,
6051         include hard-reg-set.h
6053 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6055         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6057 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
6059         Revert
6060         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6062         PR sanitizer/84250
6063         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6064         libasan.
6065         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6067 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6069         PR sanitizer/84250
6070         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6071         libasan.
6072         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6074 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
6076         PR middle-end/86380
6077         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6079 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
6081         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6082         neg_*_op* variables.
6084 2018-07-04  Martin Liska  <mliska@suse.cz>
6086         * tree-switch-conversion.c: Define
6087         max_ratio_for_speed and max_ratio_for_size constants.
6089 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6090             Martin Liska  <mliska@suse.cz>
6092         PR middle-end/66240
6093         PR target/45996
6094         PR c/84100
6095         * common.opt: Rename align options with 'str_' prefix.
6096         * common/config/i386/i386-common.c (set_malign_value): New
6097         function.
6098         (ix86_handle_option): Use it to set -falign-* options/
6099         * config/aarch64/aarch64-protos.h (struct tune_params): Change
6100         type from int to string.
6101         * config/aarch64/aarch64.c: Update default values from int
6102         to string.
6103         * config/alpha/alpha.c (alpha_override_options_after_change):
6104         Likewise.
6105         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6106         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6107         max skip conditionally.
6108         * config/i386/freebsd.h (SUBALIGN_LOG): New.
6109         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6110         max skip conditionally.
6111         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6112         max skip conditionally.
6113         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6114         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6115         max skip conditionally.
6116         * config/i386/i386.c (struct ptt): Change type from int to
6117         string.
6118         (ix86_default_align): Set default values.
6119         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6120         max skip conditionally.
6121         * config/i386/iamcu.h (SUBALIGN_LOG): New.
6122         (ASM_OUTPUT_MAX_SKIP_ALIGN):
6123         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6124         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6125         max skip conditionally.
6126         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6127         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6128         * config/i386/x86-64.h (SUBALIGN_LOG): New.
6129         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6130         max skip conditionally.
6131         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6132         * config/ia64/ia64.c (ia64_option_override): Set default values
6133         for alignment options.
6134         * config/m68k/m68k.c: Handle new str_align_* options.
6135         * config/mips/mips.c (mips_set_compression_mode): Change
6136         type of constants.
6137         (mips_option_override): Set default values for options.
6138         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6139         Likewise.
6140         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6141         Likewise.
6142         * config/rx/rx.c (rx_option_override): Likewise.
6143         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6144         (LABEL_ALIGN): Use align_labels_log.
6145         (LOOP_ALIGN): Use align_loops_align.
6146         * config/s390/s390.c (s390_asm_output_function_label): Use new
6147         macros.
6148         * config/sh/sh.c (sh_override_options_after_change):
6149         Change type of constants.
6150         * config/spu/spu.c (spu_sched_init): Likewise.
6151         * config/sparc/sparc.c (sparc_option_override): Set default
6152         values for options.
6153         * config/visium/visium.c (visium_option_override): Likewise.
6154         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6155         emit p2align format with last argument if it's not needed.
6156         * doc/invoke.texi: Document extended format of -falign-*.
6157         * final.c: Use align_labels alignment.
6158         * flags.h (struct target_flag_state): Change type to use
6159         align_flags.
6160         (struct align_flags_tuple): New.
6161         (struct align_flags): Likewise.
6162         (align_loops_log): Redefine macro to use new types.
6163         (align_loops_max_skip): Redefine macro to use new types.
6164         (align_jumps_log): Redefine macro to use new types.
6165         (align_jumps_max_skip): Redefine macro to use new types.
6166         (align_labels_log): Redefine macro to use new types.
6167         (align_labels_max_skip): Redefine macro to use new types.
6168         (align_functions_log): Redefine macro to use new types.
6169         (align_loops): Redefine macro to use new types.
6170         (align_jumps): Redefine macro to use new types.
6171         (align_labels): Redefine macro to use new types.
6172         (align_functions): Redefine macro to use new types.
6173         (align_functions_max_skip): Redefine macro to use new types.
6174         (align_loops_value): New macro.
6175         (align_jumps_value): New macro.
6176         (align_labels_value): New macro.
6177         (align_functions_value): New macro.
6178         * function.c (invoke_set_current_function_hook): Propagate
6179         alignment values from flags to global variables default in
6180         topleev.h.
6181         * ipa-icf.c (sem_function::equals_wpa): Use
6182         cl_optimization_option_eq instead of memcmp.
6183         * lto-streamer.h (cl_optimization_stream_out): Support streaming
6184         of string types.
6185         (cl_optimization_stream_in): Likewise.
6186         * optc-save-gen.awk: Support strings in cl_optimization.
6187         * opth-gen.awk: Likewise.
6188         * opts.c (finish_options): Remove error checking of invalid
6189         value ranges.
6190         (MAX_CODE_ALIGN): Remove.
6191         (MAX_CODE_ALIGN_VALUE): Likewise.
6192         (parse_and_check_align_values): New function.
6193         (check_alignment_argument): Likewise.
6194         (common_handle_option): Use check_alignment_argument.
6195         * opts.h (parse_and_check_align_values): Declare.
6196         * toplev.c (init_alignments): Remove.
6197         (read_log_maxskip): New.
6198         (parse_N_M): Likewise.
6199         (parse_alignment_opts): Likewise.
6200         (backend_init_target): Remove usage of init_alignments.
6201         * toplev.h (parse_alignment_opts): Declare.
6202         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6203         argument.
6204         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6205         * tree.c (cl_option_hasher::equal): New.
6206         * varasm.c: Use new global macros.
6208 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6210         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6211         Use a simpler align directive also if MAXSKIP = ALIGN-1.
6212         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6213         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6214         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6215         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6216         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6217         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6218         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6219         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6220         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6221         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6222         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6224 2018-07-04  Martin Liska  <mliska@suse.cz>
6225             Jonathan Wakely  <jwakely@redhat.com>
6227         * coverage.c: Use correct type.
6228         * doc/invoke.texi: Language correction.
6230 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
6232         PR target/85620
6233         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6234         ENDBRANCH for non-tail call which may return via indirect branch.
6235         * doc/extend.texi: Document indirect_return attribute.
6237 2018-07-03  Martin Sebor  <msebor@redhat.com>
6239         PR tree-optimization/86274
6240         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6241         precondition.
6242         (format_floating): Correct handling of infinities and NaNs.
6244 2018-07-03  Martin Sebor  <msebor@redhat.com>
6246         * print-tree.c (print_real_cst): New function.
6247         (print_node_brief): Call it.
6248         (print_node): Ditto.
6250 2018-07-03  Jeff Law  <law@redhat.com>
6252         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6253         into a single pattern.
6255         * config/h8300/h8300.md (ors code_iterator): New.
6256         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6257         a single pattern and single splitter.
6258         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6259         (iorqi3_1, xorqi3_1): Likewise.
6260         (iorqi3, xorqi3 expanders): Similarly.
6262         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6263         (movmd_internal) into a single pattern using the P mode iterator.
6264         (movmd splitters): Similarly.
6265         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6266         (movsd splitters): Similarly.
6268         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6269         ADDB, ADDW and ADDL into a single ADD attribute which selects the
6270         right table based on the size of the operand.
6271         * config/h8300/h8300.md (length_table): Corresponding changes. All
6272         references to "addb", "addw" and "addl" changed to "add".
6273         (btst patterns): Merge two variants into a single pattern.
6274         (tstqi, tsthi): Likewise.
6275         (addhi3_incdec, addsi3_incdec): Likewise.
6276         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6277         (mulhi3, mulsi3): Likewise.
6278         (udivhi3, udivsi3): Likewise.
6279         (divhi3, divsi3): Likewise.
6280         (andorqi3, andorhi3, andorsi3): Likewise.
6282 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
6284         PR target/85694
6285         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6286         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6288 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6290         PR tree-optimization/85694
6291         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6292         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6293         UNSPEC_URHADD.
6294         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6295         (<u>avg<mode>3_ceil): New patterns.
6297 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
6299         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6300         scan-tree-dump directive.
6301         * gcc.dg/vect/slp-perm-2.c: Likewise.
6302         * gcc.dg/vect/slp-perm-3.c: Likewise.
6303         * gcc.dg/vect/slp-perm-5.c: Likewise.
6304         * gcc.dg/vect/slp-perm-6.c: Likewise.
6305         * gcc.dg/vect/slp-perm-7.c: Likewise.
6306         * gcc.dg/vect/slp-perm-8.c: Likewise.
6308 2018-07-03  Marek Polacek  <polacek@redhat.com>
6310         PR middle-end/86202
6311         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6313 2018-07-03  Richard Biener  <rguenther@suse.de>
6315         PR ipa/86389
6316         * tree-ssa-structalias.c (find_func_clobbers): Properly
6317         handle indirect calls.
6319 2018-07-03  Jeff Law  <law@redhat.com>
6321         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6322         (shifts): New code iterator.
6323         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6324         expander.  Fix HImode handling on H8/SX.
6325         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6326         (subqi3, subhi3, subsi3 expanders): Likewise.
6327         (andqi3, andhi3, andsi3 expanders): Likewise.
6328         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6329         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6330         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6331         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6332         (zero_extendqihi2, zero_extendqisi2): Likewise.
6333         (extendqihi2, extendqisi2): Likewise.
6334         (rotlqi3, rotlhi3, rotlsi3): Likewise.
6335         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6336         (rotlqi3_1, rotlhi3_1): Likewise.
6337         (logicalhi3_sn, logicalsi3_sn): Likewise.
6338         (logicalhi3, logicalsi3): Likewise.
6340 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6342         * tree-vect-patterns.c (vect_recog_rotate_pattern)
6343         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6344         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6345         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6346         type to append_pattern_def_seq instead of creating a stmt_vec_info
6347         directly.
6348         (build_mask_conversion): Likewise.  Remove vinfo argument.
6349         (vect_add_conversion_to_patterm): Likewise, renaming to...
6350         (vect_add_conversion_to_pattern): ...this.
6351         (vect_recog_mask_conversion_pattern): Update call to
6352         build_mask_conversion.  Pass the vector type to
6353         append_pattern_def_seq here too.
6354         (vect_recog_gather_scatter_pattern): Update call to
6355         vect_add_conversion_to_pattern.
6357 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6359         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6360         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6361         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6362         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6363         STMT_VINFO_PATTERN_DEF_SEQ to null here.
6364         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6365         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6366         append_pattern_def_seq instead of new_pattern_def_seq.
6367         (vect_recog_divmod_pattern): Do both of the above.
6368         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6369         is null.
6371 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6373         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6374         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6375         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6376         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6377         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6378         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6379         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6380         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6381         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6382         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6383         parameter with a single stmt_vec_info.
6384         (vect_recog_func_ptr): Likewise.
6385         (vect_recog_gather_scatter_pattern): Likewise, folding in...
6386         (vect_try_gather_scatter_pattern): ...this.
6387         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6388         the stmt_vec_info of the statement to be matched.  Don't clear
6389         STMT_VINFO_RELATED_STMT.
6390         (vect_pattern_recog): Update call accordingly.
6392 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6394         PR tree-optimization/85694
6395         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6396         (uavgM3_ceil): Document new optabs.
6397         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6398         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6399         functions.
6400         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6401         (savg_ceil_optab): New optabs.
6402         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6403         (vect_vect_recog_func_ptrs): Add it.
6404         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6405         constant directly from the associated lhs.
6407 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6409         * tree-vect-patterns.c (vect_split_statement): New function.
6410         (vect_convert_input): Use it to try to split an existing cast.
6412 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6414         * poly-int.h (print_hex): New function.
6415         * dumpfile.h (dump_dec, dump_hex): Declare.
6416         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6417         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6418         min_input_precision, operation_precision and operation_sign.
6419         * tree-vect-patterns.c (vect_get_range_info): New function.
6420         (vect_same_loop_or_bb_p, vect_single_imm_use)
6421         (vect_operation_fits_smaller_type): Delete.
6422         (vect_look_through_possible_promotion): Add an optional
6423         single_use_p parameter.
6424         (vect_recog_over_widening_pattern): Rewrite to use new
6425         stmt_vec_info infomration.  Handle one operation at a time.
6426         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6427         (vect_truncatable_operation_p, vect_set_operation_type)
6428         (vect_set_min_input_precision): New functions.
6429         (vect_determine_min_output_precision_1): Likewise.
6430         (vect_determine_min_output_precision): Likewise.
6431         (vect_determine_precisions_from_range): Likewise.
6432         (vect_determine_precisions_from_users): Likewise.
6433         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6434         (vect_vect_recog_func_ptrs): Put over_widening first.
6435         Add cast_forwprop.
6436         (vect_pattern_recog): Call vect_determine_precisions.
6438 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6440         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6441         statements that have been replaced by further pattern statements.
6442         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6444 2018-07-03  Richard Biener  <rguenther@suse.de>
6446         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6447         always set *dt.  Dump vectype in vectype overload.
6448         * dumpfile.h (dump_gimple_expr): New function.
6449         (dump_gimple_expr_loc): Likewise.
6450         * dumpfile.c (dump_gimple_expr): New function.
6451         (dump_gimple_expr_loc): Likewise.
6453 2018-07-02  Jeff Law  <law@redhat.com>
6455         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6456         the H8/300, H8/300H and H8/S variants into a single pattern.
6457         (movhi_h8300, movqi_h8300hs): Similarly.
6458         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6459         (QHI mode iterator): New.
6461         * config/h8300/h8300.md: Remove trailing whitespace.
6463 2018-07-02  Jim Wilson  <jimw@sifive.com>
6465         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6466         instead of emit_insn for interrupt returns.
6467         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6468         (riscv_sret, riscv_uret): Likewise.
6470 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6472         * pretty-print.c (selftest::test_pp_format): Move save and restore
6473         of quotes to class auto_fix_quotes, and add an instance.
6474         * selftest.c: Include "intl.h".
6475         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6476         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6477         * selftest.h (selftest::auto_fix_quotes): New class.
6479 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
6481         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6482         (aarch64_sve_prepare_conditional_op): Remove.
6483         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6484         Allow aarch64_simd_reg_or_zero as select operand; remove
6485         the aarch64_sve_prepare_conditional_op call.
6486         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6487         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6488         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6489         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6490         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6491         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6492         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6493         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6494         and a splitters to match all of the *_any patterns.
6495         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6497         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6498         (SVE_COND_FP_BINARY_REV): Remove.
6499         (sve_int_op_rev, sve_fp_op_rev): New.
6500         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6501         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6502         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6503         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6504         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6505         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6506         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6507         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6508         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6510         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6511         Remove match_dup 1 from the inner unspec.
6512         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6514         * config/aarch64/aarch64.md (movprfx): New attr.
6515         (length): Default movprfx to 8.
6516         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6517         (*madd<SVE_I>, *msub<SVE_I): Likewise.
6518         (*<su>mul<SVE_I>3_highpart): Likewise.
6519         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6520         (*v<ASHIFT><SVE_I>3): Likewise.
6521         (*<su><MAXMIN><SVE_I>3): Likewise.
6522         (*<su><MAXMIN><SVE_F>3): Likewise.
6523         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6524         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6525         (*div<SVE_F>4): Likewise.
6527 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
6529         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6530         in dump string.
6532 2018-07-02  Richard Biener  <rguenther@suse.de>
6534         PR tree-optimization/86363
6535         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6536         memset argument refers to a non-variable address.
6538 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6540         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6541         {PLUS,MINUS}_EXPR code to...
6542         (adjust_symbolic_bound): ...here,
6543         (combine_bound): ...here,
6544         (set_value_range_with_overflow): ...and here.
6546 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6548         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6549         code...
6550         (extract_range_from_abs_expr): ...here.
6552 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
6554         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6555         -fno-omit-frame-pointer when not optimizing.
6557 2018-07-02  Martin Liska  <mliska@suse.cz>
6559         PR ipa/86279
6560         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6561         (propagate_nothrow): Likewise.
6563 2018-07-02  Martin Liska  <mliska@suse.cz>
6565         PR ipa/86323
6566         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6568 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6570         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6571         function in r262149, changing "loc" param from source_location to
6572         const dump_location_t &.
6573         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6574         declaration, as above.
6576 2018-07-01  Paul Koning  <ni1d@arrl.net>
6578         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6579         -munit-asm, -mgnu-asm, -mdec-asm.
6580         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6581         (pdp11_output_labelref): New.
6582         (pdp11_output_def): New.
6583         (pdp11_output_addr_vec_elt): New.
6584         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
6585         %# and %@ format codes.
6586         (pdp11_option_override): New.
6587         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6588         (pdp11_output_ident): New.
6589         (pdp11_asm_named_section): New.
6590         (pdp11_asm_init_sections): New.
6591         (pdp11_file_start): New.
6592         (pdp11_file_end): New.
6593         (output_ascii): Use .ascii/.asciz for -mdec-asm.
6594         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
6595         %o, like %c but octal.
6596         (pdp11_option_override): New.
6597         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6598         -mdec-asm.
6599         (DATA_SECTION_ASM_OP): Ditto.
6600         (READONLY_DATA_SECTION_ASM_OP): New.
6601         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6602         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6603         (ASM_OUTPUT_LABELREF): Ditto.
6604         (ASM_OUTPUT_DEF): Ditto.
6605         (ASM_OUTPUT_EXTERNAL): New.
6606         (ASM_OUTPUT_SOURCE_FILENAME): New.
6607         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6608         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6609         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
6610         %# and %@ format codes.
6611         * config/pdp11/pdp11.opt (mgnu-asm): New.
6612         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6613         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6614         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6616 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
6618         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6619         dereferencing path[] beyond its length.
6620         (debug_path): New.
6621         (debug_all_paths): New.
6622         (rewire_first_differing_edge): New.
6623         (adjust_paths_after_duplication): New.
6624         (duplicate_thread_path): Call adjust_paths_after_duplication.
6625         Add new argument.
6626         (thread_through_all_blocks): Add new argument to
6627         duplicate_thread_path.
6629 2018-06-30  Jim Wilson  <jimw@sifive.com>
6631         * config/riscv/predicates.md (p2m1_shift_operand): New.
6632         (high_mask_shift_operand): New.
6633         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6634         pattern using p2m1_shift_operand.
6635         (lshsi3_zero_extend_3+2): New combiner pattern using
6636         high_mask_shift_operand.
6638 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6640         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6641         split out from...
6642         (vect_recog_rotate_pattern): ...here.
6643         (vect_convert_input): Try to insert casts of invariants in the
6644         preheader.
6645         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6646         preheader to be empty.
6648 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6650         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
6651         vector type.  If given, install it in the new statement's
6652         STMT_VINFO_VECTYPE.
6653         (vect_element_precision): New function.
6654         (vect_unpromoted_value): New struct.
6655         (vect_unpromoted_value::vect_unpromoted_value): New function.
6656         (vect_unpromoted_value::set_op): Likewise.
6657         (vect_look_through_possible_promotion): Likewise.
6658         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
6659         (vect_widened_op_tree, vect_convert_input): Likewise.
6660         (vect_convert_inputs, vect_convert_output): Likewise.
6661         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
6662         to handle the optional cast of the multiplication result and
6663         vect_widened_op_tree to detect the widened multiplication itself.
6664         Do not require the input and output of promotion casts to have
6665         the same sign, but base the signedness of the operation on the
6666         input rather than the result.  If the pattern includes two
6667         promotions, check that those promotions have the same sign.
6668         Do not restrict the MULT_EXPR handling to a double-width result;
6669         handle quadruple-width results and wider.  Use vect_convert_inputs
6670         to convert the inputs to the common type.
6671         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
6672         to handle the optional cast of the ABS result.  Also allow a sign
6673         change or a sign extension between the ABS and MINUS.
6674         Use vect_widened_op_tree to detect the widened subtraction and use
6675         vect_convert_inputs to convert the inputs to the common type.
6676         (vect_handle_widen_op_by_const): Delete.
6677         (vect_recog_widen_op_pattern): New function.
6678         (vect_recog_widen_mult_pattern): Use it.
6679         (vect_recog_widen_shift_pattern): Likewise.
6680         (vect_recog_widen_sum_pattern): Use
6681         vect_look_through_possible_promotion to handle the promoted
6682         PLUS_EXPR operand.
6684 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6686         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
6687         the containing gimple_seq *.
6688         * gimple-iterator.h (gsi_for_stmt): Declare it.
6689         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
6690         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
6691         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6692         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6693         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
6694         checks.
6695         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
6696         split out from...
6697         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
6698         statement being replaced is part of an existing pattern
6699         definition sequence, inserting the new pattern statements before
6700         the original one.
6701         (vect_pattern_recog_1): Don't return a bool.  If the statement
6702         is already part of a pattern, instead apply pattern matching
6703         to the pattern definition statements.  Don't clear the
6704         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
6705         (vect_pattern_recog): Don't break after the first match;
6706         continue processing the pattern definition statements instead.
6707         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
6709 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6711         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
6712         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6713         (vect_recog_widen_sum_pattern): Use it.
6715 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6717         * tree-vect-loop.c (vectorizable_reduction): Assert that the
6718         phi is not a pattern statement and has not been replaced by
6719         a pattern statement.
6720         * tree-vect-patterns.c (type_conversion_p): Don't check
6721         STMT_VINFO_IN_PATTERN_P.
6722         (vect_recog_vector_vector_shift_pattern): Likewise.
6723         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
6724         the pattern statement rather than the original statement; check
6725         directly for a WIDEN_MULT_EXPR here.
6726         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
6727         vect_is_simple_use to return the pattern statement rather
6728         than the original statement; use is_pattern_stmt_p to check
6729         for such a pattern statement.
6730         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
6731         to return the pattern statement rather than the original statement;
6732         don't do the same transformation here.
6733         (vect_is_simple_use): If the defining statement has been replaced
6734         by a pattern statement, return the pattern statement instead.
6735         Remove the corresponding (local) transformation from the vectype
6736         overload.
6738 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6740         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
6741         end and default to null.
6742         * tree-vect-loop.c (vect_create_epilog_for_reduction)
6743         (vectorizable_reduction): Update calls accordingly, dropping the
6744         gimple ** argument if the passed-back statement isn't needed.
6745         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
6746         (vect_recog_rotate_pattern): Likewise.
6747         (vect_recog_mask_conversion_pattern): Likewise.
6748         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6749         (vect_mask_constant_operand_p): Likewise.
6750         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
6751         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
6752         (get_group_load_store_type, get_load_store_type): Likewise.
6753         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
6754         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
6755         (vectorizable_conversion, vectorizable_assignment): Likewise.
6756         (vectorizable_shift, vectorizable_operation): Likewise.
6757         (vectorizable_store, vect_is_simple_cond): Likewise.
6758         (vectorizable_condition, vectorizable_comparison): Likewise.
6759         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
6760         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
6761         and move it to the end.  Cope with null def_stmt_outs.
6763 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6765         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
6767 2018-06-29  Jeff Law  <law@redhat.com>
6769         * config/v850/v850.c (v850_legitimate_address_p): Handle large
6770         displacements for TARGET_V850E2V3 and newer.
6771         (TARGET_LRA_P): Remove.  Defaults to LRA now.
6772         * config/v850/v850.md (sign23byte_load): Remove.
6773         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
6774         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
6776 2018-06-29  Martin Liska  <mliska@suse.cz>
6778         PR lto/85759
6779         * coverage.c (coverage_init): Mangle full path name.
6780         * doc/invoke.texi: Document the change.
6781         * gcov-io.c (mangle_path): New.
6782         * gcov-io.h (mangle_path): Likewise.
6783         * gcov.c (mangle_name): Use mangle_path for path mangling.
6785 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6787         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
6788         if starting source register is not even.
6790 2018-06-29  Martin Liska  <mliska@suse.cz>
6792         PR tree-optimization/86263
6793         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
6794         Make edge redirection.
6796 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
6798         * dumpfile.c (dump_loc): Add indentation based on scope depth.
6799         (dump_scope_depth): New variable.
6800         (get_dump_scope_depth): New function.
6801         (dump_begin_scope): New function.
6802         (dump_end_scope): New function.
6803         * dumpfile.h (get_dump_scope_depth): New declaration.
6804         (dump_begin_scope): New declaration.
6805         (dump_end_scope): New declaration.
6806         (class auto_dump_scope): New class.
6807         (AUTO_DUMP_SCOPE): New macro.
6808         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
6809         AUTO_DUMP_SCOPE.
6811 2018-06-29  Richard Biener  <rguenther@suse.de>
6813         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
6814         compute_all_dependences succeeds.
6815         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
6816         exceed --param loop-max-datarefs-for-datadeps.
6818 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
6820         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
6822 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
6824         PR target/86348
6825         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
6826         alternative 0 in preferred_for_speed attribute.
6828 2018-06-28  Paul Koning  <ni1d@arrl.net>
6830         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
6831         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
6832         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
6833         * config/pdp11/pdp11.md: Correct "length" attribute calculation
6834         for shift insn patterns.
6836 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
6838         * cgraph.c (cgraph_node::get_body): Replace assignments to
6839         "dump_file" with calls to set_dump_file.
6840         * dumpfile.c (alt_dump_file): Make static, and group with...
6841         (alt_flags): ...this definition.
6842         (dumps_are_enabled): New variable.
6843         (refresh_dumps_are_enabled): New function.
6844         (set_dump_file): New function.
6845         (set_alt_dump_file): New function.
6846         (gcc::dump_manager::dump_start): Replace assignments to
6847         "dump_file" and "alt_dump_file" with calls to set_dump_file and
6848         set_alt_dump_file.
6849         (gcc::dump_manager::dump_finish): Likewise.
6850         * dumpfile.h (alt_dump_file): Delete decl.
6851         (dumps_are_enabled): New variable decl.
6852         (set_dump_file): New function decl.
6853         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
6854         global.
6855         * tree-nested.c (lower_nested_functions): Replace assignments to
6856         "dump_file" with calls to set_dump_file.
6858 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6860         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
6861         goto_locus of each outgoing edge of each basic block.
6863 2018-06-28  Richard Biener  <rguenther@suse.de>
6865         * dwarf2out.c (decl_scope_table): Remove.
6866         (push_decl_scope): Likewise.
6867         (pop_decl_scope): Likewise.
6868         (gen_type_die_for_member): Do not call push/pop_decl_scope.
6869         (gen_struct_or_union_type_die): Likewise.
6870         (gen_tagged_type_die): Likewise.
6871         (dwarf2out_init): Do not initialize decl_scope_table.
6872         (dwarf2out_c_finalize): Do not free it.
6874 2018-06-28  Richard Biener  <rguenther@suse.de>
6876         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
6877         deciding whether to not re-use a DIE.
6879 2018-06-28  Richard Biener  <rguenther@suse.de>
6881         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
6882         DW_AT_abstract_origin attribute.
6884 2018-06-28  Martin Liska  <mliska@suse.cz>
6886         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6887         Use newly introduced constants.
6888         * tree-switch-conversion.h (struct jump_table_cluster):
6889         Define max_ratio_for_size and max_ratio_for_speed.
6891 2018-06-28  Martin Liska  <mliska@suse.cz>
6893         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6894         Add new checking assert to catch invalid state.
6895         (jump_table_cluster::can_be_handled): Handle single case
6896         clusters.
6897         (jump_table_cluster::is_beneficial): Bail out for such case.
6898         (bit_test_cluster::find_bit_tests):
6899         Add new checking assert to catch invalid state.
6900         (bit_test_cluster::can_be_handled): Handle single case
6901         clusters.
6902         (bit_test_cluster::is_beneficial): Bail out for such case.
6903         (switch_decision_tree::analyze_switch_statement):
6904         Fix comment.
6906 2018-06-28  Martin Liska  <mliska@suse.cz>
6908         * common.opt: Introduce -completion option.
6909         * gcc.c (driver_handle_option): Handle it.
6910         (driver::main): Print completions if completion
6911         is set.
6912         * opt-suggestions.c (option_proposer::get_completions):
6913         New function.
6914         (option_proposer::suggest_completion): Likewise.
6915         (option_proposer::find_param_completions): Likewise.
6916         (verify_autocompletions): Likewise.
6917         (test_completion_valid_options): Likewise.
6918         (test_completion_valid_params): Likewise.
6919         (in_completion_p): Likewise.
6920         (empty_completion_p): Likewise.
6921         (test_completion_partial_match): Likewise.
6922         (test_completion_garbage): Likewise.
6923         (opt_proposer_c_tests): Likewise.
6924         * opt-suggestions.h: Declare new functions.
6925         * opts.c (common_handle_option): Handle OPT__completion_.
6926         * selftest-run-tests.c (selftest::run_tests): Add
6927         opt_proposer_c_tests.
6928         * selftest.c (assert_str_startswith): New.
6929         * selftest.h (assert_str_startswith): Likewise.
6930         (opt_proposer_c_tests): New.
6931         (ASSERT_STR_STARTSWITH): Likewise.
6933 2018-06-28  Martin Liska  <mliska@suse.cz>
6935         * Makefile.in: Add opt-suggestions.o.
6936         * gcc-main.c: Include opt-suggestions.h.
6937         * gcc.c (driver::driver): Likewise.
6938         (driver::~driver): Remove m_option_suggestions.
6939         (driver::build_option_suggestions): Moved to option_proposer.
6940         (driver::suggest_option): Likewise.
6941         (driver::handle_unrecognized_options): Use option_proposer.
6942         * gcc.h (class driver): Add new memver m_option_proposer.
6943         * opt-suggestions.c: New file.
6944         * opt-suggestions.h: New file.
6946 2018-06-28  Martin Liska  <mliska@suse.cz>
6948         * vec.h (class auto_string_vec): New (moved from auto_argvec).
6949         (auto_string_vec::~auto_string_vec): Likewise.
6951 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
6953         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
6954         prevent_decl_creation_for_types fields up and add reset_location field.
6955         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
6956         statement if id->reset_location is true.
6957         (copy_edges_for_bb): Do not set goto_locus on the new edges if
6958         id->reset_location is true.
6959         (copy_phis_for_bb): Force input_location on the arguments if
6960         id->reset_location is true.
6961         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
6962         is set on the function to be inlined.
6964 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
6966         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
6968 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
6970         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
6971         registers for Pmode.
6972         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
6973         hard registers for the clobbered pseudo.
6975 2018-06-27  Paul Koning  <ni1d@arrl.net>
6977         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6978         mutually exclusive options.
6979         * config/pdp11/constraints.md (h): New constraint.
6980         (O): Update definition to match shift code generation.
6981         (D): New constraint.
6982         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
6983         (CCFP): Remove.
6984         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
6985         function.
6986         (output_jump): Change arguments.
6987         (pdp11_fixed_cc_regs): New function.
6988         (pdp11_cc_mode): Ditto.
6989         (pdp11_expand_shift): Ditto.
6990         (pdp11_assemble_shift): Ditto.
6991         (pdp11_small_shift): Ditto.
6992         (pdp11_branch_cost): Remove.
6993         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
6994         from output.
6995         (pdp11_register_move_cost): Update for CC registers.
6996         (pdp11_rtx_costs): Add case for LSHIFTRT.
6997         (pdp11_output_jump): Add CCNZ mode conditional branches.
6998         (notice_update_cc_on_set): Remove.
6999         (pdp11_cc_mode): New function.
7000         (simple_memory_operand): Correct pre/post decrement case.
7001         (no_side_effect_operand): New function.
7002         (pdp11_regno_reg_class): Add CC_REGS class.
7003         (pdp11_fixed_cc_regs): New function.
7004         (pdp11_small_shift): New function.
7005         (pdp11_expand_shift): New function to expand shift insns.
7006         (pdp11_assemble_shift): New function to output shifts.
7007         (pdp11_branch_cost): Remove.
7008         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7009         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7010         (WCHAR_TYPE): Ditto.
7011         (PTRDIFF_TYPE): Ditto.
7012         (ADJUST_INSN_LENGTH): New macro.
7013         (FIXED_REGISTERS): Add CC registers.
7014         (CALL_USED_REGISTERS): Ditto.
7015         (reg_class): Ditto.
7016         (REG_CLASS_NAMES): Ditto.
7017         (REG_CLASS_CONTENTS): Ditto.
7018         (SELECT_CC_MODE): Use new function.
7019         (TARGET_FLAGS_REGNUM): New macro.
7020         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7021         (cc0_reg_rtx): Remove.
7022         (CC_STATUS_MDEP): Remove.
7023         (CC_STATUS_MDEFP_INIT): Remove.
7024         (CC_IN_FPU): Remove.
7025         (NOTICE_UPDATE_CC): Remove.
7026         (REGISTER_NAMES): Add CC registers.
7027         (BRANCH_COST): Change to constant 1.
7028         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7029         handling.
7030         * config/pdp11/pdp11.opt (mbcopy): Remove.
7031         (mbcopy-builtin): Remove.
7032         (mbranch-cheap): Remove.
7033         (mbranch-expensive): Remove.
7034         * config/pdp11/predicates.md (expand_shift_operand): Update to
7035         match shift code generation.
7036         (ccnz_operator): New predicate.
7037         * doc/invoke.texi (PDP-11 Options): Remove deleted options
7038         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7039         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
7040         exclusive options.
7041         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
7042         description of O constraint.
7044 2018-06-27  Jeff Law  <law@redhat.com>
7045             Austin Law  <austinklaw@gmail.com>
7047         * config/v850/v850.md (addsi3_set_flags): New pattern.
7048         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7049         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7050         (zero_extendhisi2_v850_set_flags): Likewise.
7051         (zero_extendqisi2_v850_set_flags): Likewise.
7052         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7053         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7054         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7056         * config/v850/v850-protos.h (notice_update_cc): Remove.
7057         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7058         (v850_print_operand): Handle 'D' and "d".
7059         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7060         Add handling of arithmetic/logical operations compared against zero.
7061         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7062         Do not look at v850_compare_op, instead get mode from last argument.
7063         (v850_gen_compare): Remove
7064         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7065         after reload for prologue insns.
7066         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7067         patterns.
7068         (construct_save_jarl): Likewise.
7069         (TARGET_FLAGS_REGNUM): Define.
7070         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7071         (NOTICE_UPDATE_CC): Remove.
7072         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7073         than cc0.  Conditionalize on reload_completed.
7074         (cmpsi_insn, setfcc_insn): Likewise.
7075         (tst1 splitter): Turn into define_and_split which sets the flags
7076         after reload.
7077         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7078         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7079         (cstoresf4, cstoredf4): Clobber the flags.
7080         (cmpsi, cmpsf, cmpdf): Remove expanders.
7081         (setf_insn): Remove pattern.
7082         (addsi3): Turn into define_and_split which clobbers the flags after
7083         reload and a suitable pattern (addsi3_clobber_flags) for use after
7084         reload.
7085         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7086         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7087         (ashrsi3, ashrsi3_v850e2): Likewise.
7088         (bins): Clobber the flags.
7089         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7090         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7091         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7092         (call_value_internal_short, call_value_internal_long): Likewise.
7093         (callt_save_interrupt, callt_return_interrupt): Likewise.
7094         (save_interrupt, return_interrupt): Likewise.
7095         (callt_save_all_interrupt, save_all_interrupt): Likewise.
7096         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7097         (restore_all_interrupt, _restore_all_interrupt): Likewise.
7098         (All FP comparisons): Only allow after reload has completed.
7099         (trfsr): Likewise.
7100         (divh, divhu): Tweak output template.
7101         (branch_z_normal, branch_z_invert): Remove
7102         (branch_nz_normal, branch_nz_invert): Likewise.
7103         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7105         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7106         * config/v850/v850.c (notice_update_cc): Remove.
7107         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
7108         (CC_NO_CARRY): Likewise.
7109         (NOTICE_UPDATE_CC): Define to nothing.
7110         * config/v850/v850.md: Remove block comment on cc0 handling
7111         Remove "cc" attribute from all patterns.  Remove cc_status handling
7112         from all patterns.  Minor formatting fixes.
7114 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7116         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7117         (cortex-a76.cortex-a55): Likewise.
7118         * config/aarch64/aarch64-tune.md: Regenerate.
7119         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7120         cortex-a76.cortex-a55.
7122 2018-06-27  Jeff Law  <law@redhat.com>
7124         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7125         (MULTILIB_DIRNAMES): Similarly.
7127 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
7129         * gimple.h (gimple_return_retbnd): Delete.
7130         (gimple_return_set_retbnd): Likewise.
7131         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7132         gimple_return_set_retbnd.
7133         * gimple-pretty-print.c (dump_gimple_return): Remove call to
7134         gimple_return_retbnd and adjust.
7135         * tree-inline.h (struct copy_body_data): Remove retbnd field.
7136         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7137         Explicitly return NULL in a couple more cases.  Move assertion
7138         on debug statements and remove unreachable code.
7139         (reset_debug_binding): Do not test id->retbnd.
7140         (expand_call_inline): Do not set it.
7142 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7144         * configure.ac: Add --disable-gcov option.
7145         * configure: Regenerate.
7146         * Makefile.in: Honour @enable_gcov@.
7147         * doc/install.texi: Document --disable-gcov.
7149 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7151         * config/arm/arm-cpus.in (cortex-a76): New entry.
7152         (cortex-a76.cortex-a55): Likewise.
7153         * config/arm/arm-tables.opt: Regenerate.
7154         * config/arm/arm-tune.md: Likewise.
7155         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7156         * doc/invoke.texi (ARM Options): Document cortex-a76 and
7157         cortex-a76.cortex-a55.
7159 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
7161         PR target/85769
7162         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7164 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7166         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7167         comment.
7168         (EPILOGUE_USES): Likewise.
7170 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
7172         * tree-inline.c (remap_location): New function extracted from...
7173         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
7174         (copy_phis_for_bb): ...here.  Call remap_location.
7175         (copy_cfg_body): Adjust call to copy_edges_for_bb.
7177 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
7179         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7180         unaligned vsx for 16B memset.
7182 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
7184         PR target/86285
7185         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7186         ieee128_float_type_node to long_double_type_node unless
7187         TARGET_LONG_DOUBLE_128 is set.
7189 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
7191         * cfgloop.c (get_loop_location): Convert return type from
7192         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7193         by implicit construction from rtx_insn *, and using
7194         dump_user_location_t::from_function_decl for the fallback case.
7195         * cfgloop.h (get_loop_location): Convert return type from
7196         location_t to dump_user_location_t.
7197         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7198         dump_printf_loc to pass in a dump_location_t rather than a
7199         location_t, via the gimple stmt.
7200         * coverage.c (get_coverage_counts): Update calls to
7201         dump_printf_loc to pass in dump_location_t rather than a
7202         location_t.
7203         * doc/optinfo.texi (Dump types): Convert example of
7204         dump_printf_loc from taking "locus" to taking "insn".  Update
7205         description of the "_loc" calls to cover dump_location_t.
7206         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7207         "selftest.h".
7208         (dump_user_location_t::dump_user_location_t): New constructors,
7209         from gimple *stmt and rtx_insn *.
7210         (dump_user_location_t::from_function_decl): New function.
7211         (dump_loc): Make static.
7212         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7213         const dump_location_t &.
7214         (dump_generic_expr_loc): Delete.
7215         (dump_printf_loc): Convert param "loc" from location_t to
7216         const dump_location_t &.
7217         (selftest::test_impl_location): New function.
7218         (selftest::dumpfile_c_tests): New function.
7219         * dumpfile.h: Include "profile-count.h".
7220         (class dump_user_location_t): New class.
7221         (struct dump_impl_location_t): New struct.
7222         (class dump_location_t): New class.
7223         (dump_printf_loc): Convert 2nd param from source_location to
7224         const dump_location_t &.
7225         (dump_generic_expr_loc): Delete.
7226         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7227         const dump_location_t &.
7228         * gimple-fold.c (fold_gimple_assign): Update call to
7229         dump_printf_loc to pass in a dump_location_t rather than a
7230         location_t, via the gimple stmt.
7231         (gimple_fold_call): Likewise.
7232         * gimple-loop-interchange.cc
7233         (loop_cand::analyze_iloop_reduction_var): Update for change to
7234         check_reduction_path.
7235         (tree_loop_interchange::interchange): Update for change to
7236         find_loop_location.
7237         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7238         change in return-type of find_loop_location.
7239         (graphite_regenerate_ast_isl): Likewise.
7240         * graphite-optimize-isl.c (optimize_isl): Likewise.
7241         * graphite.c (graphite_transform_loops): Likewise.
7242         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7243         pass in a dump_location_t rather than a location_t, via the
7244         gimple stmt.
7245         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7246         * ipa.c (walk_polymorphic_call_targets): Likewise.
7247         * loop-unroll.c (report_unroll): Convert "locus" param from
7248         location_t to dump_location_t.
7249         (decide_unrolling): Update for change to get_loop_location's
7250         return type.
7251         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7252         location_t to dump_user_location_t.
7253         (grid_find_single_omp_among_assignments_1): Updates calls to
7254         dump_printf_loc to pass in a dump_location_t rather than a
7255         location_t, via the gimple stmt.
7256         (grid_parallel_clauses_gridifiable): Convert "tloc" from
7257         location_t to dump_location_t.  Updates calls to dump_printf_loc
7258         to pass in a dump_location_t rather than a location_t, via the
7259         gimple stmt.
7260         (grid_inner_loop_gridifiable_p): Likewise.
7261         (grid_dist_follows_simple_pattern): Likewise.
7262         (grid_gfor_follows_tiling_pattern): Likewise.
7263         (grid_target_follows_gridifiable_pattern): Likewise.
7264         (grid_attempt_target_gridification): Convert initialization
7265         of local "grid" from memset to zero-initialization; FIXME: does
7266         this require C++11?  Update call to dump_printf_loc to pass in a
7267         optinfo_location rather than a location_t, via the gimple stmt.
7268         * profile.c (read_profile_edge_counts): Updates call to
7269         dump_printf_loc to pass in a dump_location_t rather than a
7270         location_t
7271         (compute_branch_probabilities): Likewise.
7272         * selftest-run-tests.c (selftest::run_tests): Call
7273         dumpfile_c_tests.
7274         * selftest.h (dumpfile_c_tests): New decl.
7275         * tree-loop-distribution.c (pass_loop_distribution::execute):
7276         Update for change in return type of find_loop_location.
7277         * tree-parloops.c (parallelize_loops): Likewise.
7278         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7279         "locus" from location_t to dump_user_location_t.
7280         (canonicalize_loop_induction_variables): Likewise.
7281         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7282         for change in return type of find_loop_location.
7283         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7284         to dump_printf_loc to pass in a dump_location_t rather than a
7285         location_t, via the stmt.
7286         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7287         Likewise.
7288         * tree-vect-loop-manip.c (find_loop_location): Convert return
7289         type from source_location to dump_user_location_t.
7290         (vect_do_peeling): Update for above change.
7291         (vect_loop_versioning): Update for change in type of
7292         vect_location.
7293         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7294         from location_t to dump_user_location_t.
7295         (vect_estimate_min_profitable_iters): Update for change in type
7296         of vect_location.
7297         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7298         location_t to dump_location_t.
7299         (vect_slp_bb): Update for change in type of vect_location.
7300         * tree-vectorizer.c (vect_location): Convert from source_location
7301         to dump_user_location_t.
7302         (try_vectorize_loop_1): Update for change in vect_location's type.
7303         (vectorize_loops): Likewise.
7304         (increase_alignment): Likewise.
7305         * tree-vectorizer.h (vect_location): Convert from source_location
7306         to dump_user_location_t.
7307         (find_loop_location): Convert return type from source_location to
7308         dump_user_location_t.
7309         (check_reduction_path): Convert 1st param from location_t to
7310         dump_user_location_t.
7311         * value-prof.c (check_counter): Update call to dump_printf_loc to
7312         pass in a dump_user_location_t rather than a location_t; update
7313         call to error_at for change in type of "locus".
7314         (check_ic_target): Update call to dump_printf_loc to
7315         pass in a dump_user_location_t rather than a location_t, via the
7316         call_stmt.
7318 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
7320         * config/s390/s390.h (enum processor_flags): Do not use
7321         default tune parameter when -march was specified.
7323 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
7325         PR target/86314
7326         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7327         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7328         operands.
7330 2018-06-26  Richard Biener  <rguenther@suse.de>
7332         PR tree-optimization/86287
7333         PR bootstrap/86316
7334         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7335         (vect_analyze_loop): Initialize n_stmts.
7337 2018-06-26  Richard Biener  <rguenther@suse.de>
7339         PR middle-end/86271
7340         * fold-const.c (fold_convertible_p): Pointer extension
7341         isn't valid.
7343 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
7345         PR debug/86064
7346         * dwarf2out.c (loc_list_has_views): Adjust comments.
7347         (dw_loc_list): Split single cross-partition range with
7348         nonzero locview.
7350 2018-06-25  Jeff Law  <law@redhat.com>
7352         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7353         on -mbig-switch by default.
7355         * config/v850/predicates.md (const_float_1_operand): Fix match_code
7356         test.
7357         (const_float_0_operand): Remove unused predicate.
7358         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7359         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7360         (recipsf2): New expander.  Original pattern now called
7361         (recipsf2_insn).
7362         (recipdf2, recipdf2_insn): Similarly.
7363         (rsqrtsf2, rsqrtsf2_insn): Similarly
7364         (rsqrtdf2, rsqrtdf2_insn): Similarly
7366 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
7368         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7369         Simplify logic for FreeBSD (twice).
7371 2018-06-25  Martin Sebor  <msebor@redhat.com>
7373         PR tree-optimization/86204
7374         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7375         a strnlen result if it's less than the length of the string.
7377 2018-06-25  Martin Sebor  <msebor@redhat.com>
7379         PR tree-optimization/85700
7380         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7381         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7382         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7384 2018-06-25  Martin Sebor  <msebor@redhat.com>
7386         * doc/extend.texi (Zero-length arrays): Update and clarify.
7388 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
7390         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7391         added IEEE/IBM long double multilib support on PowerPC little
7392         endian Linux systems.
7393         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7394         (MULTILIB_DEFAULTS): Likewise.
7395         * config/rs6000/rs6000.c (rs6000_option_override_internal):
7396         Likewise.
7397         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7398         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7399         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7401 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
7403         PR middle-end/86311
7404         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7405         (REORDER_45): Likewise.
7407 2018-06-25  Jeff Law  <law@redhat.com>
7409         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7410         dividend to 32 bits.  Adjust length.
7411         (udivmodhi4): Cleanup output template.  Fix length.
7413 2018-06-25  Carl Love  <cel@us.ibm.com>
7415         * config/rs6000/vsx.md: Change word selector to prefered location.
7417 2018-06-25  Richard Biener  <rguenther@suse.de>
7419         PR tree-optimization/86304
7420         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7421         epilogue-if-converted loops as well.
7423 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
7425         * lto-section-out.c (lto_begin_section): Do not print section
7426         name for noaddr and unnumbered dumps.
7428 2018-06-25  Richard Biener  <rguenther@suse.de>
7430         * tree-vectorizer.h (struct vec_info_shared): New structure
7431         with parts split out from struct vec_info and loop_nest from
7432         struct _loop_vec_info.
7433         (struct vec_info): Adjust accordingly.
7434         (struct _loop_vec_info): Likewise.
7435         (LOOP_VINFO_LOOP_NEST): Adjust.
7436         (LOOP_VINFO_DATAREFS): Likewise.
7437         (LOOP_VINFO_DDRS): Likewise.
7438         (struct _bb_vec_info): Likewise.
7439         (BB_VINFO_DATAREFS): Likewise.
7440         (BB_VINFO_DDRS): Likewise.
7441         (struct _stmt_vec_info): Add dr_aux member.
7442         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7443         (DR_MISALIGNMENT_UNINITIALIZED): New.
7444         (set_dr_misalignment): Adjust.
7445         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7446         (vect_analyze_loop): Adjust prototype.
7447         (vect_analyze_loop_form): Likewise.
7448         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7449         Compute dependences lazily.
7450         (vect_record_base_alignments): Use shared datarefs/ddrs.
7451         (vect_verify_datarefs_alignment): Likewise.
7452         (vect_analyze_data_refs_alignment): Likewise.
7453         (vect_analyze_data_ref_accesses): Likewise.
7454         (vect_analyze_data_refs): Likewise.
7455         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7456         constructor parameter for shared part.
7457         (vect_analyze_loop_form): Pass in shared part and adjust.
7458         (vect_analyze_loop_2): Pass in storage for the number of
7459         stmts.  Move loop nest finding to the caller.  Compute
7460         datarefs lazily.
7461         (vect_analyze_loop): Pass in shared part.
7462         (vect_transform_loop): Verify shared datarefs are unchanged.
7463         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7464         constructor parameter for shared part.
7465         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7466         (vect_slp_bb): Verify shared datarefs are unchanged before
7467         transform.
7468         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7469         change.
7470         (new_stmt_vec_info): Initialize DR_AUX misalignment to
7471         DR_MISALIGNMENT_UNINITIALIZED.
7472         * tree-vectorizer.c (vec_info::vec_info): Add constructor
7473         parameter for shared part.
7474         (vec_info::~vec_info): Adjust.
7475         (vec_info_shared::vec_info_shared): New.
7476         (vec_info_shared::~vec_info_shared): Likewise.
7477         (vec_info_shared::save_datarefs): Likewise.
7478         (vec_info_shared::check_datarefs): Likewise.
7479         (try_vectorize_loop_1): Construct shared part live for analyses
7480         of a single loop for multiple vector sizes.
7481         * tree-parloops.c (gather_scalar_reductions): Adjust.
7483 2018-06-25  Richard Biener  <rguenther@suse.de>
7485         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7486         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7487         (vect_analyze_data_refs): Remove similar code from here and
7488         simplify accordingly.
7490 2018-06-25  Richard Biener  <rguenther@suse.de>
7492         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7493         for reverse storage order accesses rather than asserting
7494         they cannot happen here.
7496 2018-06-25  Tom de Vries  <tdevries@suse.de>
7498         PR debug/86257
7499         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7500         Use data16 instead of .byte for insn prefix.
7502 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
7504         PR C++/86082
7505         * parser.c (make_char_string_pack): Pass this literal chars
7506         through cpp_interpret_string.
7507         (cp_parser_userdef_numeric_literal): Check the result of
7508         make_char_string_pack.
7510 2018-06-24  Maya Rashish  <coypu@sdf.org>
7512         * ginclude/stddef.h: Simplify conditions around avoiding
7513         re-definition of __size_t.
7515 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7517         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7518         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7520 2018-06-22  Maya Rashish  <coypu@sdf.org>
7522         * doc/invoke.texi (mno-fancy-math-387): Update for changes
7523         made to OpenBSD and NetBSD through the years.
7525 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7527         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7528         behavior of vec_pack (vector double, vector double) to match
7529         behavior of vec_float2 (vector double, vector double).
7531 2018-06-22  Olivier Hainque  <hainque@adacore.com>
7533         * gimplify.c (gimplify_function_tree): Prevent creation
7534         of a trampoline for the address of the current function
7535         passed to entry/exit instrumentation hooks.
7537 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
7539         PR target/86222
7540         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7541         correctly.
7543 2018-06-22  Martin Liska  <mliska@suse.cz>
7545         PR tree-optimization/86263
7546         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7547         Bail out if is_enabled is false.
7548         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7549         New declaration.
7550         (jump_table_cluster::is_enabled): New function.
7552 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7554         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7555         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7556         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7557         (lto_input_ts_binfo_tree_pointers): Likewise.
7558         * tree-streamer-out.c (streamer_write_tree_bitfields,
7559         write_ts_binfo_tree_pointers): Likewise.
7560         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7562 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7564         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7566 2018-06-22  Martin Liska  <mliska@suse.cz>
7568         * symbol-summary.h (get): Make it pure and inline move
7569         functionality from ::get function.
7570         (get): Remove and inline into ::get and ::get_create.
7571         (get_create): Move code from ::get function.
7573 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7575         PR target/85994
7576         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7577         -x assembler-with-cpp.
7579 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7581         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7582         _FILE_OFFSET_BITS=64 for C++.
7584 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
7586         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7587         conversion insn that shows up when pr85657-3.c is compiled using
7588         IEEE 128-bit long double.
7589         (neg<mode>2_internal): Use the correct mode to check whether the
7590         mode is IBM extended.
7591         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7592         multiply and divide external functions from being created more
7593         than once.
7595 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7597         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7598         functions.
7599         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
7600         the edge can be forwarded.
7601         (cfg_layout_merge_blocks): Likewise.
7603 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7605         * except.c (finish_eh_generation): Commit edge insertions only after
7606         the EH edges have been redirected from post-landing to landing pads.
7608 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7610         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7611         create_tmp_var_for to create the FRAME decl.
7612         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7614 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7616         * tree-inline.c (copy_edges_for_bb): Minor tweak.
7617         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7618         debug statement when resetting its value.
7619         (expand_call_inline): Copy the locus of the call onto the assignment
7620         of the return value, if any.  Use local variable in more cases.
7622 2018-06-21  Martin Liska  <mliska@suse.cz>
7624         * ipa-pure-const.c (propagate_nothrow): Use
7625         funct_state_summaries->get.
7626         (dump_malloc_lattice): Likewise.
7627         (propagate_malloc): Likewise.
7629 2018-06-21  Richard Biener  <rguenther@suse.de>
7631         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7632         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7633         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7634         comment.
7635         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7636         BLOCK_ABSTRACT_ORIGIN unconditionally.
7638 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
7640         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7641         deleting it.
7642         * ipa-reference.c (ipa_reference_c_finalize): Delete
7643         ipa_ref_opt_sum_summaries and set it to NULL.
7645 2018-06-21  Tom de Vries  <tdevries@suse.de>
7647         PR tree-optimization/85859
7648         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
7649         test with comment from bb_no_side_effects_p.
7651 2018-06-21  Richard Biener  <rguenther@suse.de>
7653         PR tree-optimization/86232
7654         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
7655         max for constant niter.
7657 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7659         * config/aarch64/aarch64-simd.md
7660         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
7662 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7664         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
7665         Make opernads of the unspec commutative.
7667 2018-06-21  Richard Biener  <rguenther@suse.de>
7669         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
7670         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
7671         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
7672         (vect_analyze_data_ref_dependence): Re-order checks to deal with
7673         NULL DR_STEP.
7674         (vect_record_base_alignments): Do not record base alignment
7675         for gathers or scatters.
7676         (vect_compute_data_ref_alignment): Drop return value that is always
7677         true.  Bail out early for gathers or scatters.
7678         (vect_enhance_data_refs_alignment): Bail out early for gathers
7679         or scatters.
7680         (vect_find_same_alignment_drs): Likewise.
7681         (vect_analyze_data_refs_alignment): Remove dead code.
7682         (vect_slp_analyze_and_verify_node_alignment): Likewise.
7683         (vect_analyze_data_refs): For possible gathers or scatters do
7684         not create an alternate DR, just check their possible validity
7685         and mark them.  Adjust DECL_NONALIASED handling to not rely
7686         on DR_BASE_ADDRESS.
7687         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
7688         update inits of gathers or scatters.
7689         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
7690         Also copy gather/scatter flag to pattern vinfo.
7692 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7694         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7695         behavior of vec_packsu (vector unsigned long long, vector unsigned
7696         long long) to match behavior of vec_packs with same signature.
7698 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
7699             Thomas Schwinge <thomas@codesourcery.com>
7700             Cesar Philippidis  <cesar@codesourcery.com>
7702         * gimplify.c (gimplify_scan_omp_clauses): Add support for
7703         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7704         (gimplify_adjust_omp_clauses): Likewise.
7705         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
7706         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
7707         (gimplify_omp_target_update): Update handling of acc update and
7708         enter/exit data.
7709         * omp-low.c (install_var_field): Remove unused parameter
7710         base_pointers_restrict.
7711         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
7712         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
7713         FINALIZE}
7714         (omp_target_base_pointers_restrict_p): Delete.
7715         (scan_omp_target): Update call to scan_sharing_clauses.
7716         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
7717         FINALIZE}.
7718         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
7719         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
7720         (convert_local_omp_clauses): Likewise.
7721         * tree-pretty-print.c (dump_omp_clause): Likewise.
7722         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
7723         FINALIZE}.
7724         (omp_clause_code_name): Likewise.
7726 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
7728         PR debug/86194
7729         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
7730         be narrowed.
7732         PR tree-optimization/86231
7733         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
7734         anti-range don't overwrite *vr0min before using it to compute *vr0max.
7736 2018-06-20  Tom de Vries  <tdevries@suse.de>
7738         PR tree-optimization/86097
7739         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
7740         iv type if signedness of iv type is not the same as that of *nit.
7742 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
7744         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
7745         EDGE_EH edges, verify they are all EDGE_EH.
7747 2018-06-20  Maya Rashish  <coypu@sdf.org>
7749         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
7751 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7753         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
7754         * config/aarch64/aarch64.c (xgene1_tunings): Add
7755         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
7756         (aarch64_mode_valid_for_sched_fusion_p):
7757         Allow 16-byte modes.
7758         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
7759         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
7760         128-bit modes.
7761         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
7762         New pattern.
7763         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
7764         * config/aarch64/iterators.md (VQ2): New mode iterator.
7766 2018-06-20  Martin Liska  <mliska@suse.cz>
7768         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7769         Change default ratio from 10 to 8.
7771 2018-06-20  Martin Liska  <mliska@suse.cz>
7773         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7774         New.
7775         (bit_test_cluster::find_bit_tests): Likewise.
7776         (switch_decision_tree::analyze_switch_statement): Find clusters.
7777         * tree-switch-conversion.h (struct jump_table_cluster): Document
7778         hierarchy.
7780 2018-06-20  Martin Liska  <mliska@suse.cz>
7782         * tree-switch-conversion.c (switch_conversion::collect):
7783         Record m_uniq property.
7784         (switch_conversion::expand): Bail out for special conditions.
7785         (group_cluster::~group_cluster): New.
7786         (group_cluster::group_cluster): Likewise.
7787         (group_cluster::dump): Likewise.
7788         (jump_table_cluster::emit): New.
7789         (switch_decision_tree::fix_phi_operands_for_edges): New.
7790         (struct case_node): Remove struct.
7791         (jump_table_cluster::can_be_handled): New.
7792         (case_values_threshold): Moved to header.
7793         (reset_out_edges_aux): Likewise.
7794         (jump_table_cluster::is_beneficial): New.
7795         (bit_test_cluster::can_be_handled): Likewise.
7796         (add_case_node): Remove.
7797         (bit_test_cluster::is_beneficial): New.
7798         (case_bit_test::cmp): New.
7799         (bit_test_cluster::emit): New.
7800         (expand_switch_as_decision_tree_p): Remove.
7801         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
7802         (fix_phi_operands_for_edge): Likewise.
7803         (switch_decision_tree::analyze_switch_statement): New.
7804         (compute_cases_per_edge): Move ...
7805         (switch_decision_tree::compute_cases_per_edge): ... here.
7806         (try_switch_expansion): Likewise.
7807         (switch_decision_tree::try_switch_expansion): Likewise.
7808         (record_phi_operand_mapping): Likewise.
7809         (switch_decision_tree::record_phi_operand_mapping): Likewise.
7810         (emit_case_decision_tree): Likewise.
7811         (switch_decision_tree::emit): Likewise.
7812         (balance_case_nodes): Likewise.
7813         (switch_decision_tree::balance_case_nodes): Likewise.
7814         (dump_case_nodes): Likewise.
7815         (switch_decision_tree::dump_case_nodes): Likewise.
7816         (emit_jump): Likewise.
7817         (switch_decision_tree::emit_jump): Likewise.
7818         (emit_cmp_and_jump_insns): Likewise.
7819         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
7820         (emit_case_nodes): Likewise.
7821         (switch_decision_tree::emit_case_nodes): Likewise.
7822         (conditional_probability): Remove.
7823         * tree-switch-conversion.h (enum cluster_type): New.
7824         (PRINT_CASE): New.
7825         (struct cluster): Likewise.
7826         (cluster::cluster): Likewise.
7827         (struct simple_cluster): Likewise.
7828         (simple_cluster::simple_cluster): Likewise.
7829         (struct group_cluster): Likewise.
7830         (struct jump_table_cluster): Likewise.
7831         (struct bit_test_cluster): Likewise.
7832         (struct min_cluster_item): Likewise.
7833         (struct case_tree_node): Likewise.
7834         (case_tree_node::case_tree_node): Likewise.
7835         (jump_table_cluster::case_values_threshold): Likewise.
7836         (struct case_bit_test): Likewise.
7837         (struct switch_decision_tree): Likewise.
7838         (struct switch_conversion): Likewise.
7839         (switch_decision_tree::reset_out_edges_aux): Likewise.
7841 2018-06-20  Martin Liska  <mliska@suse.cz>
7843         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
7844         (hoist_edge_and_branch_if_true): Likewise.
7845         (expand_switch_using_bit_tests_p): Likewise.
7846         (struct case_bit_test): Likewise.
7847         (case_bit_test_cmp): Likewise.
7848         (emit_case_bit_tests): Likewise.
7849         (switch_conversion::switch_conversion): New class.
7850         (struct switch_conv_info): Remove old struct.
7851         (collect_switch_conv_info): More to ...
7852         (switch_conversion::collect): ... this.
7853         (check_range): Likewise.
7854         (switch_conversion::check_range): Likewise.
7855         (check_all_empty_except_final): Likewise.
7856         (switch_conversion::check_all_empty_except_final): Likewise.
7857         (check_final_bb): Likewise.
7858         (switch_conversion::check_final_bb): Likewise.
7859         (create_temp_arrays): Likewise.
7860         (switch_conversion::create_temp_arrays): Likewise.
7861         (free_temp_arrays): Likewise.
7862         (gather_default_values): Likewise.
7863         (switch_conversion::gather_default_values): Likewise.
7864         (build_constructors): Likewise.
7865         (switch_conversion::build_constructors): Likewise.
7866         (constructor_contains_same_values_p): Likewise.
7867         (switch_conversion::contains_same_values_p): Likewise.
7868         (array_value_type): Likewise.
7869         (switch_conversion::array_value_type): Likewise.
7870         (build_one_array): Likewise.
7871         (switch_conversion::build_one_array): Likewise.
7872         (build_arrays): Likewise.
7873         (switch_conversion::build_arrays): Likewise.
7874         (gen_def_assigns): Likewise.
7875         (switch_conversion::gen_def_assigns): Likewise.
7876         (prune_bbs): Likewise.
7877         (switch_conversion::prune_bbs): Likewise.
7878         (fix_phi_nodes): Likewise.
7879         (switch_conversion::fix_phi_nodes): Likewise.
7880         (gen_inbound_check): Likewise.
7881         (switch_conversion::gen_inbound_check): Likewise.
7882         (process_switch): Use the newly created class.
7883         (switch_conversion::expand): New.
7884         (switch_conversion::~switch_conversion): New.
7885         * tree-switch-conversion.h: New file.
7887 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7889         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
7890         tree-vect-patterns.c.
7891         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
7892         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
7893         (vect_recog_sad_pattern): Likewise.
7894         (vect_recog_widen_sum_pattern): Likewise.
7895         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
7896         (vect_recog_widen_shift_pattern): Remove the type_in argument.
7897         (vect_recog_rotate_pattern): Likewise.
7898         (vect_recog_mult_pattern): Likewise.
7899         (vect_recog_vector_vector_shift_pattern): Likewise.
7900         (vect_recog_divmod_pattern): Likewise.
7901         (vect_recog_mixed_size_cond_pattern): Likewise.
7902         (vect_recog_bool_pattern): Likewise.
7903         (vect_recog_mask_conversion_pattern): Likewise.
7904         (vect_try_gather_scatter_pattern): Likewise.
7905         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
7906         (vect_recog_over_widening_pattern): Likewise.
7907         (vect_recog_gather_scatter_pattern): Likewise.
7908         (vect_recog_func_ptr): Move from tree-vectorizer.h
7909         (vect_vect_recog_func_ptrs): Move further down the file.
7910         (vect_recog_func): Likewise.  Remove the third argument.
7911         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
7912         (vect_pattern_recog_1): Expect the pattern function to do any
7913         necessary target tests.  Also expect it to provide a vector type.
7914         Remove the type_in handling.
7916 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7918         * tree-vect-patterns.c (vect_pattern_detected): New function.
7919         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
7920         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
7921         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
7922         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
7923         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
7924         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
7925         (vect_recog_mask_conversion_pattern)
7926         (vect_try_gather_scatter_pattern): Likewise.
7928 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7930         * tree-vect-patterns.c (vect_get_internal_def): New function.
7931         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7932         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
7933         (search_type_for_mask_1): Use it.
7935 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7937         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7938         redundant WIDEN_SUM_EXPR handling.
7939         (vect_recog_sad_pattern): Likewise.
7941 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7943         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
7944         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
7945         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
7946         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
7947         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
7949 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7951         * tree-vect-stmts.c (vectorizable_call): Make sure that we
7952         use the stmt_vec_info of the original bb statement for the
7953         new zero assignment, even if the call is part of a pattern.
7955 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7957         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
7958         that the sequence is attached to the original statement rather
7959         than the pattern statement.
7960         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
7961         PATTERN_DEF_SEQ from the original statement rather than
7962         the main pattern statement.
7963         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
7964         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
7965         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
7967 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
7969         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
7970         definition statements before the early exit for statements that aren't
7971         live or relevant.
7972         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
7973         split out from...
7974         (vect_transform_loop): ...here.  Process pattern definition
7975         statements without first checking whether the main pattern
7976         statement is live or relevant.
7978 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
7980         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
7981         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
7983 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
7985         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
7986         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
7987         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
7988         (expand_block_compare): Change select_block_compare_mode call.
7989         (expand_strncmp_align_check): Use new functions, fix comment.
7990         (emit_final_str_compare_gpr): New function.
7991         (expand_strn_compare): Refactor and clean up code.
7992         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
7994 2018-06-19  Tony Reix  <tony.reix@atos.com>
7995             Damien Bergamini  <damien.bergamini@atos.com>
7996             David Edelsohn  <dje.gcc@gmail.com>
7998         * collect2.c (static_obj): New variable.
7999         (static_libs): New variable.
8000         (is_in_list): Uncomment declaration.
8001         (main): Track AIX libraries linked statically.
8002         (is_in_list): Uncomment definition.
8003         (scan_prog_file): Don't add AIX shared libraries initializer
8004         to constructor list if linking statically.
8006 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
8008         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8009         constant.
8010         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8012 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
8014         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8015         blocks.
8017 2018-06-19  Martin Liska  <mliska@suse.cz>
8019         * config/i386/i386.c (ix86_can_inline_p): Do not use
8020         ipa_fn_summaries::get_create.
8021         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8022         get.
8023         (devirtualization_time_bonus): Likewise.
8024         (ipcp_propagate_stage): Likewise.
8025         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8026         (edge_set_predicate): Likewise.
8027         (evaluate_conditions_for_known_args): Likewise.
8028         (evaluate_properties_for_edge): Likewise.
8029         (ipa_call_summary::reset): Tranform to ...
8030         (ipa_call_summary::~ipa_call_summary): ... this.
8031         (ipa_fn_summary::reset): Transform to ...
8032         (ipa_fn_summary::~ipa_fn_summary): ... this.
8033         (ipa_fn_summary_t::remove): Rename to ...
8034         (ipa_fn_summary_t::remove_callees): ... this.
8035         (ipa_fn_summary_t::duplicate): Use placement new
8036         instead of memory copy.
8037         (ipa_call_summary_t::duplicate): Likewise.
8038         (ipa_call_summary_t::remove): Remove.
8039         (dump_ipa_call_summary): Change get_create to get.
8040         (ipa_dump_fn_summary): Dump only when summary exists.
8041         (analyze_function_body): Use symbol_summary::get instead
8042         of get_create.
8043         (compute_fn_summary): Likewise.
8044         (estimate_edge_devirt_benefit): Likewise.
8045         (estimate_edge_size_and_time): Likewise.
8046         (inline_update_callee_summaries): Likewise.
8047         (remap_edge_change_prob): Likewise.
8048         (remap_edge_summaries): Likewise.
8049         (ipa_merge_fn_summary_after_inlining): Likewise.
8050         (write_ipa_call_summary): Likewise.
8051         (ipa_fn_summary_write): Likewise.
8052         (ipa_free_fn_summary): Likewise.
8053         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8054         (struct ipa_call_summary): Likewise.
8055         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8056         of get_create.
8057         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8058         (estimate_size_after_inlining): Likewise.
8059         (estimate_growth): Likewise.
8060         (growth_likely_positive): Likewise.
8061         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8062         (inline_call): Likewise.
8063         * ipa-inline.c (caller_growth_limits): Likewise.
8064         (can_inline_edge_p): Likewise.
8065         (can_inline_edge_by_limits_p): Likewise.
8066         (compute_uninlined_call_time): Likewise.
8067         (compute_inlined_call_time): Likewise.
8068         (want_inline_small_function_p): Likewise.
8069         (edge_badness): Likewise.
8070         (update_caller_keys): Likewise.
8071         (update_callee_keys): Likewise.
8072         (inline_small_functions): Likewise.
8073         (inline_to_all_callers_1): Likewise.
8074         (dump_overall_stats): Likewise.
8075         (early_inline_small_functions): Likewise.
8076         (early_inliner): Likewise.
8077         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8078         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8079         * ipa-pure-const.c (malloc_candidate_p): Likewise.
8080         * ipa-split.c (execute_split_functions): Likewise.
8081         * symbol-summary.h: Likewise.
8082         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8084 2018-06-19  Richard Biener  <rguenther@suse.de>
8086         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8087         (vectorize_loops): ... here.  Fix dbgcnt handling.
8088         (try_vectorize_loop): Wrap try_vectorize_loop_1.
8090 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
8092         PR target/86197
8093         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8094         ieee128 argument takes up only one (vector) register, not two (floating
8095         point) registers.
8097 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8099         * gimplify.c (gimplify_init_constructor): Really never clear for an
8100         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8102 2018-06-19  Richard Biener  <rguenther@suse.de>
8104         PR tree-optimization/86179
8105         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8106         after failed recognition.
8108 2018-06-18  Martin Sebor  <msebor@redhat.com>
8110         PR middle-end/85602
8111         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8112         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8113         Handle integer subtraction.
8114         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8115         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8117 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8119         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8120         param from rtx to rtx_insn *.
8121         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8122         param.
8123         (frv_ifcvt_modify_insn): Likwise.
8124         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8125         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
8126         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8127         as_a <rtx_insn *> cast to local "unprotected_region" once
8128         it's been established that it's not NULL or pc_rtx.
8129         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8130         param "sethi" from rtx to rtx_insn *.
8131         (nds32_group_float_insns): Likewise for param "insn".
8132         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8133         param.
8134         (vax_output_int_subtract): Likewise.
8135         * config/vax/vax.c (vax_output_int_add): Likewise for param
8136         "insn".
8137         (vax_output_int_subtract): Likewise.
8138         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8139         (emit_pattern_after): Likewise for param "after".
8140         (emit_insn_after): Likewise.
8141         (emit_jump_insn_after): Likewise.
8142         (emit_call_insn_after): Likewise.
8143         (emit_debug_insn_after): Likewise.
8144         (emit_pattern_before): Likewise for param "before".
8145         (emit_insn_before): Likewise.
8146         (emit_jump_insn_before): Likewise.
8147         * final.c (get_insn_template): Likewise for param "insn", removing
8148         a cast.
8149         * output.h (get_insn_template): Likewise for 2nd param.
8150         * rtl.h (emit_insn_before): Likewise.
8151         (emit_jump_insn_before): Likewise.
8152         (emit_debug_insn_before_noloc): Likewise.
8153         (emit_insn_after): Likewise.
8154         (emit_jump_insn_after): Likewise.
8155         (emit_call_insn_after): Likewise.
8156         (emit_debug_insn_after): Likewise.
8157         (set_insn_deleted): Likewise for param.
8159 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
8161         PR target/85358
8162         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8163         floating point modes, so that IFmode is numerically greater than
8164         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8165         to declare the ordering.  This prevents IFmode from being
8166         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8167         machine.  Include rs6000-modes.h to share the fractional values
8168         between genmodes* and the rest of the compiler.
8169         (IFmode): Likewise.
8170         (KFmode): Likewise.
8171         (TFmode): Likewise.
8172         * config/rs6000/rs6000-modes.h: New file.
8173         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8174         meaning of rs6000_long_double_size so that 126..128 selects an
8175         appropriate 128-bit floating point type.
8176         (rs6000_option_override_internal): Likewise.
8177         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8178         (TARGET_LONG_DOUBLE_128): Change the meaning of
8179         rs6000_long_double_size so that 126..128 selects an appropriate
8180         128-bit floating point type.
8181         (LONG_DOUBLE_TYPE_SIZE): Update comment.
8182         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8183         source and destination to match the standard usage.
8184         (truncifkf2): Likewise.
8185         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8186         ISA 2.07 to use an explicit clobber, instead of passing in a
8187         temporary.
8188         (copysign<mode>3_soft): Likewise.
8190 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8192         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8193         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8194         (vect_slp_analyze_instance_dependence): Likewise.
8195         (vect_enhance_data_refs_alignment): Likewise.
8196         (vect_analyze_data_refs_alignment): Likewise.
8197         (vect_slp_analyze_and_verify_instance_alignment
8198         (vect_analyze_data_ref_accesses): Likewise.
8199         (vect_prune_runtime_alias_test_list): Likewise.
8200         (vect_analyze_data_refs): Likewise.
8201         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8202         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8203         (vect_analyze_scalar_cycles_1): Likewise.
8204         (vect_get_loop_niters): Likewise.
8205         (vect_analyze_loop_form_1): Likewise.
8206         (vect_update_vf_for_slp): Likewise.
8207         (vect_analyze_loop_operations): Likewise.
8208         (vect_analyze_loop): Likewise.
8209         (vectorizable_induction): Likewise.
8210         (vect_transform_loop): Likewise.
8211         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8212         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8213         (vect_make_slp_decision): Likewise.
8214         (vect_detect_hybrid_slp): Likewise.
8215         (vect_slp_analyze_operations): Likewise.
8216         (vect_slp_bb): Likewise.
8217         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8218         (vectorizable_bswap): Likewise.
8219         (vectorizable_call): Likewise.
8220         (vectorizable_simd_clone_call): Likewise.
8221         (vectorizable_conversion): Likewise.
8222         (vectorizable_assignment): Likewise.
8223         (vectorizable_shift): Likewise.
8224         (vectorizable_operation): Likewise.
8225         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8227 2018-06-18  Martin Sebor  <msebor@redhat.com>
8229         PR tree-optimization/81384
8230         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8231         * builtins.c (expand_builtin_strnlen): New function.
8232         (expand_builtin): Call it.
8233         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8234         * builtins.def (BUILT_IN_STRNLEN): New.
8235         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8236         Warn for bounds in excess of maximum object size.
8237         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8238         single-value ranges.  Handle strnlen.
8239         (handle_builtin_strlen): Handle strnlen.
8240         (strlen_check_and_optimize_stmt): Same.
8241         * doc/extend.texi (Other Builtins): Document strnlen.
8243 2018-06-18  Maya Rashish  <coypu@sdf.org>
8245         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8246         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8247         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8249         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8250         here to ...
8251         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8253 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8255         * tree.c (escaped_string::escape): Replace cast to char * by
8256         const_cast<char *> (unescaped).
8258 2018-06-18  Nick Clifton  <nickc@redhat.com>
8260         PR 84195
8261         * tree.c (escaped_string): New class.  Converts an unescaped
8262         string into its escaped equivalent.
8263         (warn_deprecated_use): Use the new class to convert the
8264         deprecation message, if present.
8265         (test_escaped_strings): New self test.
8266         (test_c_tests): Add test_escaped_strings.
8267         * doc/extend.texi (deprecated): Add a note that the
8268         deprecation message is affected by the -fmessage-length
8269         option, and that control characters will be escaped.
8270         (#pragma GCC error): Document this pragma.
8271         (#pragma GCC warning): Likewise.
8272         * doc/invoke.texi (-fmessage-length): Document this option's
8273         effect on the #warning and #error preprocessor directives and
8274         the deprecated attribute.
8276 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8278         * tree.c (decl_value_expr_lookup): Revert latest change.
8279         (decl_value_expr_insert): Likewise.
8281 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
8283         * gimplify.c (nonlocal_vlas): Delete.
8284         (nonlocal_vla_vars): Likewise.
8285         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8286         referenced VLAs.
8287         (gimplify_body): Do not create and destroy nonlocal_vlas.
8288         * tree-nested.c: Include diagnostic.h.
8289         (use_pointer_in_frame): Tweak.
8290         (lookup_field_for_decl): Add assertion and declare the transformation.
8291         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8292         internal error when the reference is in a wrong context.  Do not
8293         create a debug decl by default.
8294         (note_nonlocal_block_vlas): Delete.
8295         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8296         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
8297         create a debug decl by default.
8298         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8299         call is in a wrong context.
8300         (fixup_vla_decls): New function.
8301         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
8302         debug variables were created.
8303         * tree.c (decl_value_expr_lookup): Add checking assertion.
8304         (decl_value_expr_insert): Likewise.
8306 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8308         PR middle-end/82479
8309         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8310         * tree-scalar-evolution.c (interpret_expr): Likewise.
8311         (expression_expensive_p): Likewise.
8312         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8313         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8314         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8315         (ssa_defined_by_minus_one_stmt_p): New.
8317 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8319         PR middle-end/64946
8320         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8321         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8322         * dojump.c (do_jump): Likewise.
8323         * expr.c (expand_expr_real_2): Check operand type's sign.
8324         * fold-const.c (const_unop): Handle ABSU_EXPR.
8325         (fold_abs_const): Likewise.
8326         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8327         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8328         (strip_sign_op_1): Likesise.
8329         * match.pd: Add new pattern to generate ABSU_EXPR.
8330         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8331         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8332         * tree-eh.c (operation_could_trap_helper_p): Likewise.
8333         * tree-inline.c (estimate_operator_cost): Likewise.
8334         * tree-pretty-print.c (dump_generic_node): Likewise.
8335         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8336         * tree.def (ABSU_EXPR): New.
8338 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
8340         PR middle-end/86095
8341         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8342         documented as preserved for backward compatibility only.
8343         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8345         PR rtl-optimization/86108
8346         * bb-reorder.c (create_forwarder_block): Renamed to ...
8347         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
8348         jump from new landing pad to the second part.
8349         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8350         Adjust callers.
8352 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
8354         PR middle-end/85878
8355         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8356         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8357         Only call store_expr for halves if the mode is the same.
8359         PR middle-end/86123
8360         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8361         Fix up comment formatting.
8363 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8365         * typed-splay-tree.h (typed_splay_tree::remove): New function.
8366         (typed_splay_tree::closure,
8367         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8368         (typed_splay_tree::typed_splay_tree,
8369         typed_splay_tree::operator =): Declared private.
8370         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8371         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8372         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8373         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8374         typed_splay_tree::splay_tree_splay,
8375         typed_splay_tree::splay_tree_foreach_helper,
8376         typed_splay_tree::splay_tree_insert,
8377         typed_splay_tree::splay_tree_remove,
8378         typed_splay_tree::splay_tree_lookup,
8379         typed_splay_tree::splay_tree_predecessor,
8380         typed_splay_tree::splay_tree_successor,
8381         typed_splay_tree::splay_tree_min,
8382         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8383         (typed_splay_tree::root, typed_splay_tree::comp,
8384         typed_splay_tree::delete_key,
8385         typed_splay_tree::delete_value): New data members.
8386         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8387         typed_splay_tree::remove.
8389 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
8391         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8392         -mginv and -mno-ginv to the assembler.
8393         * config/mips/mips.opt (-mcrc): New option.
8394         (-mginv): Likewise.
8395         * doc/invoke.text (-mcrc): Document.
8396         (-mginv): Likewise.
8398 2018-06-15  Nick Clifton  <nickc@redhat.com>
8400         PR 84195
8401         * tree.c (escaped_string): New class.  Converts an unescaped
8402         string into its escaped equivalent.
8403         (warn_deprecated_use): Use the new class to convert the
8404         deprecation message, if present.
8405         (test_escaped_strings): New self test.
8406         (test_c_tests): Add test_escaped_strings.
8407         * doc/extend.texi (deprecated): Add a note that the
8408         deprecation message is affected by the -fmessage-length
8409         option, and that control characters will be escaped.
8410         (#pragma GCC error): Document this pragma.
8411         (#pragma GCC warning): Likewise.
8412         * doc/invoke.texi (-fmessage-length): Document this option's
8413         effect on the #warning and #error preprocessor directives and
8414         the deprecated attribute.
8416 2018-06-15  Richard Biener  <rguenther@suse.de>
8418         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8419         here, also noting vector size used.
8420         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
8421         size used in MSG_OPTIMIZED_LOCATIONS dump.
8422         (pass_slp_vectorize::execute): Adjust.
8424 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
8426         PR target/85968
8427         * config/arc/arc.c (arc_return_address_register): Fix
8428         if-condition.
8430 2018-06-15  Richard Biener  <rguenther@suse.de>
8432         PR middle-end/86159
8433         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8434         leave useless conversion stripping to force_gimple_operand_gsi.
8435         (gimplify_build2): Likewise.
8436         (gimplify_build1): Likewise.
8438 2018-06-15  Richard Biener  <rguenther@suse.de>
8440         PR middle-end/86076
8441         * tree-cfg.c (move_stmt_op): unshare invariant addresses
8442         before adjusting their block.
8444 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8446         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8447         multilibs for *-*-rtems*.
8448         * config/riscv/t-rtems: New file.
8450 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
8452         PR middle-end/86122
8453         * match.pd ((A +- CST1) +- CST2): Punt if last resort
8454         unsigned_type_for returns NULL.
8456         PR target/85945
8457         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8458         subregs of multi-word pseudos unless the float mode has word size.
8460 2018-06-14  Richard Biener  <rguenther@suse.de>
8462         PR middle-end/86139
8463         * tree-vect-generic.c (build_word_mode_vector_type): Remove
8464         duplicate and harmful type_hash_canon.
8465         * tree.c (type_hash_canon): Assert we didn't find ourselves.
8467 2018-06-14  Richard Biener  <rguenther@suse.de>
8469         PR ipa/86124
8470         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8471         NULL cgraph_node.
8473 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8475         * config/rtems.h (STDINT_LONG32): Define.
8477 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
8478             Prachi Godbole  <prachi.godbole@imgtec.com>
8480         * config/mips/mips-cpus.def: Define P6600.
8481         * config/mips/mips-tables.opt: Regenerate.
8482         * config/mips/mips.c (mips_ucbranch_type): New enum.
8483         (mips_rtx_cost_data): Add support for P6600.
8484         (mips_issue_rate): Likewise.
8485         (mips_multipass_dfa_lookahead): Likewise.
8486         (mips_avoid_hazard): Likewise.
8487         (mips_reorg_process_insns): Likewise.
8488         (mips_classify_branch_p6600): New function.
8489         * config/mips/mips.h (TUNE_P6600): New define.
8490         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8491         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8492         * config/mips/mips.md: Include p6600.md.
8493         (processor): Add p6600.
8494         * config/mips/p6600.md: New file.
8495         * doc/invoke.texi: Add p6600 to supported architectures.
8497 2018-06-13  Martin Sebor  <msebor@redhat.com>
8499         PR tree-optimization/86114
8500         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8501         of integer types.
8502         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8504 2018-06-13  Richard Biener  <rguenther@suse.de>
8506         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8507         Properly set vector type of the intermediate stmt.
8508         * tree-vect-stmts.c (vectorizable_operation): The destination
8509         var always has vectype_out type.
8511 2018-06-13  Jeff Law  <law@redhat.com>
8513         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8514         integer 0 for argument to print_rtl_with_bb.
8515         (rl78_reorg): Likewise.
8517 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
8519         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8520         from rtx to rtx_insn *.
8521         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8522         "label".
8523         (add_sched_insns_for_speculation): Likewise for local "target",
8524         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8525         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8526         from rtx_insn ** to rtx_code_label **.
8527         (reorg_emit_nops): Likewise.
8528         (c6x_reorg): Likewise for local "call_labels".
8529         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8530         rtx to rtx_insn *.
8531         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8532         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8533         the loops over LABEL_REFS.
8534         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8535         braf_label.
8536         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8537         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8538         (split_branches): Strengthen local "olabel" from rtx to
8539         rtx_insn *, adding a safe_as_a cast.
8540         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8541         to "rtx_insn *".
8542         (add_insn_after): Likewise for first two params.
8543         (add_insn_before): Likewise.
8544         (remove_insn): Likewise for param.
8545         (emit_pattern_before_noloc): Likewise for second and third params.
8546         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8547         (emit_call_insn_before_noloc): Likewise.
8548         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8549         to "rtx_insn *".
8550         (emit_barrier_before): Likewise.
8551         (emit_label_before): Strengthen "label" param from "rtx" to
8552         "rtx_code_label *".  Strengthen "before" param from "rtx" to
8553         "rtx_insn *".
8554         (emit_insn_after_1): Strengthen "after" param from "rtx" to
8555         "rtx_insn *".
8556         (emit_pattern_after_noloc): Likewise.
8557         (emit_insn_after_noloc): Likewise.
8558         (emit_jump_insn_after_noloc): Likewise.
8559         (emit_call_insn_after_noloc): Likewise.
8560         (emit_debug_insn_after_noloc): Likewise.
8561         (emit_barrier_after): Likewise.
8562         (emit_label_after): Likewise for both params.
8563         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
8564         "loc" param from "int" to "location_t".
8565         (emit_insn_after_setloc): Likewise.
8566         (emit_jump_insn_after_setloc): Likewise.
8567         (emit_call_insn_after_setloc): Likewise.
8568         (emit_debug_insn_after_setloc): Likewise.
8569         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
8570         "loc" param from "int" to "location_t".
8571         (emit_pattern_before): Convert NULL_RTX to NULL.
8572         (emit_insn_before_setloc): Convert "loc" param from "int" to
8573         "location_t".
8574         (emit_jump_insn_before_setloc): Likewise.
8575         (emit_call_insn_before_setloc): Likewise.
8576         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8577         rtx_insn *.  Convert "loc" param from "int" to "location_t".
8578         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8579         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8580         Convert 3rd param from "int" to "location_t".
8581         (emit_barrier_before, emit_barrier_after, next_real_insn):
8582         Strengthen param from rtx to rtx_insn *.
8583         (emit_label_before): Strengthen 1st param from "rtx" to
8584         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
8585         "rtx_insn *".
8586         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8587         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8588         Strengthen 2nd param from "rtx" to "rtx_insn *".
8589         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8590         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8591         Likewise. Convert 3rd param from "int" to "location_t".
8592         (emit_label_after): Strengthen 1st param from "rtx" to
8593         "rtx_code_label *".
8594         (next_real_insn, remove_insn): Strengthen param from "rtx" to
8595         "rtx_insn *".
8596         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8597         from "rtx" to "rtx_insn *".
8599 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
8601         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8602         bodies streamed in with -Q.
8603         * dumpfile.c (dump_files): Add lto-stream-out dump file.
8604         * dumpfile.h (tree_dump_index): Add lto_stream_out.
8605         * gimple-streamer-out.c: Include gimple-pretty-print.h
8606         (output_bb): Dump stmts streamed.
8607         * lto-section-out.c: Include print-tree.h
8608         (lto_begin_section): Dump sections created.
8609         (lto_output_decl_index): Dump decl encoded.
8610         * lto-streamer-out.c: Include print-tree.h
8611         (create_output_block): Dump output block created.
8612         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8613         (output_function): Dump function output.
8614         (output_constructor): Dump constructor streamed.
8615         (write_global_stream): Output indexes encoded.
8616         (produce_asm_for_decls): Dump streams encoded.
8617         * lto-streamer.c (streamer_dump_file): New global var.
8618         * lto-streamer.h (streamer_dump_file): Declare.
8619         * passes.c (ipa_write_summaries): Initialize streamer dump.
8620         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8621         in.
8623 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
8625         PR target/86048
8626         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8627         offsets for register save directives.  Emit a second batch of save
8628         directives, if need be, when the function accesses prior frames.
8630 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8632         * config/arc/fpu.md (fmasf4): Force operand to register.
8633         (fnmasf4): Likewise.
8635 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8637         * config/arc/arc-protos.h (arc_pad_return): Remove.
8638         * config/arc/arc.c (machine_function): Remove force_short_suffix
8639         and size_reason.
8640         (arc_print_operand): Adjust printing of '&'.
8641         (arc_verify_short): Remove conditional printing of short suffix.
8642         (arc_final_prescan_insn): Remove reference to size_reason.
8643         (pad_return): New function.
8644         (arc_reorg): Call pad_return.
8645         (arc_pad_return): Remove.
8646         (arc_init_machine_status): Remove reference to force_short_suffix.
8647         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
8648         (attr length): When attribute iscompact is true force to 2
8649         regardless; in the case of maybe check if we want to force the
8650         instruction to have 4 bytes length.
8651         (nopv): Change it to generate 4 byte long nop as well.
8652         (blockage): New pattern.
8653         (simple_return): Remove call to arc_pad_return.
8654         (p_return_i): Likewise.
8656 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8658         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
8660 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8662         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
8663         ARC cores.
8665 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8667         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
8668         for ARC700 and ARCv2.
8670 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
8672         PR target/86076
8673         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
8674         operands[2] instead of operands[1].
8677 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
8679         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
8680         case, check whether the outer register overlaps an unallocatable
8681         register, not just whether it fits the required class.
8683 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
8685         * poly-int.h (can_div_trunc_p): Add new overload in which all values
8686         are poly_ints.
8687         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
8688         (memrefs_conflict_p): Likewise.
8689         (init_alias_analysis): Likewise.
8690         * cfgexpand.c (expand_debug_expr): Likewise.
8691         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
8692         * cse.c (fold_rtx): Likewise.
8693         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
8694         * expr.c (emit_block_move_hints): Likewise.
8695         (clear_storage_hints, push_block, emit_push_insn): Likewise.
8696         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
8697         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
8698         (emit_group_store): Likewise.
8699         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
8700         to read the PRE/POST_MODIFY increment.
8701         * calls.c (store_one_arg): Use strip_offset.
8702         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
8703         poly_int_rtx_p.
8704         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
8705         by a VEC_SELECT.
8706         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
8707         (simplify_binary_operation_1): Extend CONST_INT handling to
8708         poly_int_rtx_p.
8709         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
8710         than a HOST_WIDE_INT.
8711         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
8712         poly_int64.
8713         (adjust_mems, add_stores): Update accodingly.
8714         (vt_canonicalize_addr): Track polynomial offsets.
8715         (emit_note_insn_var_location): Likewise.
8716         (vt_add_function_parameter): Likewise.
8717         (vt_initialize): Likewise.
8719 2018-06-12  Jeff Law  <law@redhat.com>
8721         * config.gcc (alpha*-*-freebsd*): Remove.
8722         * config/alpha/freebsd.h: Remove.
8724 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
8726         PR other/69968
8727         * spellcheck-tree.c (levenshtein_distance): Rename to...
8728         (get_edit_distance): ...this, and update for underlying renaming.
8729         * spellcheck-tree.h (levenshtein_distance): Rename to...
8730         (get_edit_distance): ...this.
8731         * spellcheck.c (levenshtein_distance): Rename to...
8732         (get_edit_distance): ...this.  Convert from Levenshtein distance
8733         to Damerau-Levenshtein distance by supporting transpositions of
8734         adjacent characters.  Rename "v1" to "v_next" and "v0" to
8735         "v_one_ago".
8736         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
8737         (selftest::test_edit_distance_unit_test_oneway): ...this, and
8738         update for underlying renaming.
8739         (selftest::levenshtein_distance_unit_test): Rename to...
8740         (selftest::test_get_edit_distance_unit): ...this, and update for
8741         underlying renaming.
8742         (selftest::test_find_closest_string): Add example from PR 69968
8743         where transposition helps
8744         (selftest::test_metric_conditions): Update for renaming.
8745         (selftest::test_metric_conditions): Likewise.
8746         (selftest::spellcheck_c_tests): Likewise.
8747         * spellcheck.h (levenshtein_distance): Rename both overloads to...
8748         (get_edit_distance): ...this.
8749         (best_match::consider): Update for renaming.
8751 2018-06-12  Martin Sebor  <msebor@redhat.com>
8753         PR tree-optimization/85259
8754         * builtins.c (compute_objsize): Handle constant offsets.
8755         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
8756         true iff a warning has been issued.
8757         * gimple.h (gimple_nonartificial_location): New function.
8758         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
8759         gimple_nonartificial_location and handle -Wno-system-headers.
8760         (handle_builtin_stxncpy): Same.
8762 2018-06-12  Martin Sebor  <msebor@redhat.com>
8764         PR c/85931
8765         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
8767 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
8769         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
8770         BUILTIN_VEC_XST entries for pointer to double and long long.
8772 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
8774         PR target/85990
8775         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8776         Update comments.
8777         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
8778         Likewise.
8780 2018-06-12  Martin Liska  <mliska@suse.cz>
8782         * doc/options.texi: Document IntegerRange.
8784 2018-06-12  Martin Liska  <mliska@suse.cz>
8786         * config/i386/i386.opt: Make MPX-related options as Deprecated.
8787         * opt-functions.awk: Handle Deprecated flag.
8788         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
8789         and report error.
8790         (read_cmdline_option): Report warning for a deprecated option.
8791         * opts.h (struct cl_option): Add new field cl_deprecated.
8792         (CL_ERR_DEPRECATED): New.
8794 2018-06-12  Martin Liska  <mliska@suse.cz>
8796         * doc/options.texi: Document Deprecated option flag.
8798 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8800         * config/arc/arc-arch.h (arc_extras): New enum.
8801         (arc_cpu_t):Add field extra.
8802         (arc_cpu_types): Consider the extras.
8803         * config/arc/arc-cpus.def: Add extras info.
8804         * config/arc/arc-opts.h (processor_type): Consider extra field.
8805         * config/arc/arc.c (arc_override_options): Handle extra field.
8807 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8809         * config/arc/arc-arch.h: Update ARC_OPTX macro.
8810         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
8811         field.
8812         * config/arc/arc.c (arc_init): Update pic warning.
8813         (irq_range): Update irq range parsing warnings.
8814         (arc_override_options): Update various warning messages.
8815         (arc_handle_aux_attribute): Likewise.
8817 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
8819         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
8821 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8823         * doc/sourcebuild.texi: Document usage of line number 0 in verify
8824         compiler messages directives.
8826 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
8828         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
8829         * config/mips/mips-tables.opt: Regenerate.
8830         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
8831         mips64r6.
8832         * doc/invoke.texi: Document -march=i6500.
8834 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
8836         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
8837         (i6400_gpmul): Add cpu_unit.
8838         (i6400_gpdiv): Likewise.
8839         (i6400_msa_add_d): Update reservations.
8840         (i6400_msa_int_add) Likewise.
8841         (i6400_msa_short_logic3) Likewise.
8842         (i6400_msa_short_logic2) Likewise.
8843         (i6400_msa_short_logic) Likewise.
8844         (i6400_msa_move) Likewise.
8845         (i6400_msa_cmp) Likewise.
8846         (i6400_msa_short_float2) Likewise.
8847         (i6400_msa_div_d) Likewise.
8848         (i6400_msa_long_logic1) Likewise.
8849         (i6400_msa_long_logic2) Likewise.
8850         (i6400_msa_mult) Likewise.
8851         (i6400_msa_long_float2) Likewise.
8852         (i6400_msa_long_float4) Likewise.
8853         (i6400_msa_long_float5) Likewise.
8854         (i6400_msa_long_float8) Likewise.
8855         (i6400_fpu_fadd): Include frint type.
8856         (i6400_fpu_store): New define_insn_reservation.
8857         (i6400_fpu_load): Likewise.
8858         (i6400_fpu_move): Likewise.
8859         (i6400_fpu_fcmp): Likewise.
8860         (i6400_fpu_fmadd): Likewise.
8861         (i6400_int_mult): Include imul3nc type and update reservation.
8862         (i6400_int_div): Include idiv3 type and update reservation.
8863         (i6400_int_load): Update to check type not move_type.
8864         (i6400_int_store): Likewise.
8865         (i6400_int_prefetch): Set zero latency.
8867 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
8869         * gcc.c: Document new %@{...} sequence.
8870         (LINK_COMMAND_SPEC): Use it for the -L switches.
8871         (cpp_unique_options): Use it for the -I switches.
8872         (at_file_argbuf): New global variable.
8873         (in_at_file): Likewise.
8874         (alloc_args): Create at_file_argbuf.
8875         (clear_args): Truncate at_file_argbuf.
8876         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
8877         (open_at_file): New function.
8878         (close_at_file): Likewise.
8879         (create_at_file): Delete.
8880         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
8881         <'o'>: Likewise.
8882         <'@'>: New case.
8883         (validate_switches_from_spec): Deal with %@{...} sequence.
8884         (validate_switches): Likewise.
8885         (driver::finalize): Call clear_args.
8887 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
8889         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
8891 2018-06-11  Martin Sebor  <msebor@redhat.com>
8893         * doc/invoke.texi (-Wall): List -Wc++17-compat.
8894         (Wno-class-memaccess): Add @opindex.
8895         (Wno-templates, Wno-multiple-inheritance): Same.
8896         (Wno-virtual-inheritance, Wno-namespaces): Same.
8897         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
8898         (Wno-format-overflow, Wno-format-truncation): Same.
8899         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
8900         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
8901         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
8902         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
8903         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
8904         (Wno-misspelled-isr): Same.
8906 2018-06-11  Martin Sebor  <msebor@redhat.com>
8908         * PR tree-optimization/86083
8909         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
8911 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
8913         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
8915 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
8917         PR target/85755
8918         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
8919         on the correct operand.
8920         (*movdi_internal64): Ditto.
8922 2018-06-11  Martin Liska  <mliska@suse.cz>
8924         PR tree-optimization/86089
8925         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
8927 2018-06-11  Julia Koval  <julia.koval@intel.com>
8929         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
8930         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
8931         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
8933 2018-06-11  Olivier Hainque  <hainque@adacore.com>
8935         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
8936         for Ada with strict dwarf2.
8938 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
8940         PR target/85755
8941         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
8942         addresses.
8944 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
8946         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
8948 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
8950         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
8951         TARGET_ELF.
8953 2018-06-08  Martin Liska  <mliska@suse.cz>
8955         * tree-cfg.h (debug_function): Fix argument type to match
8956         implementation.
8958 2018-06-08  Martin Liska  <mliska@suse.cz>
8960         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
8961         Remove usage of MPX-related (and removed) fields.
8962         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
8964 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
8966         * cfg.c (debug): Use TDF_NONE rather than 0.
8967         * cfghooks.c (debug): Likewise.
8968         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
8969         (struct dump_option_value_info): Convert to...
8970         (struct kv_pair): ...this template type.
8971         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
8972         rather than 0.
8973         (optinfo_verbosity_options): Likewise.
8974         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
8975         OPTGROUP_NONE.
8976         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
8977         than int for "optgroup_flags" param.
8978         (dump_generic_expr_loc): Use dump_flags_t rather than int for
8979         "dump_kind" param.
8980         (dump_dec): Likewise.
8981         (dump_finish): Use TDF_NONE rather than 0.
8982         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
8983         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
8984         than 0.  Update for change to option_ptr.
8985         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
8986         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
8987         0.  Update for changes to optinfo_verbosity_options and
8988         optgroup_options.
8989         (opt_info_switch_p): Convert optgroup_flags from int to
8990         optgroup_flags_t.
8991         (dump_basic_block): Use dump_flags_t rather than int
8992         for "dump_kind" param.
8993         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
8994         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
8995         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
8996         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
8997         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
8998         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
8999         TDF_NONE): Convert from macros to...
9000         (enum dump_flag): ...this new enum.
9001         (dump_flags_t): Update to use enum.
9002         (operator|, operator&, operator~, operator|=, operator&=):
9003         Implement for dump_flags_t.
9004         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9005         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9006         Convert from macros to...
9007         (enum optgroup_flag): ...this new enum.
9008         (optgroup_flags_t): New typedef.
9009         (operator|, operator|=): Implement for optgroup_flags_t.
9010         (struct dump_file_info): Convert field "alt_flags" to
9011         dump_flags_t.  Convert field "optgroup_flags" to
9012         optgroup_flags_t.
9013         (dump_basic_block): Use dump_flags_t rather than int for param.
9014         (dump_generic_expr_loc): Likewise.
9015         (dump_dec): Likewise.
9016         (dump_register): Convert param "optgroup_flags" to
9017         optgroup_flags_t.
9018         (opt_info_enable_passes): Likewise.
9019         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9020         than 0.
9021         * gimple-pretty-print.c (debug): Likewise.
9022         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9023         (merged_store_group::apply_stores): Likewise.
9024         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9025         * gimple.c (verify_gimple_pp): Likewise.
9026         * graphite-poly.c (print_pbb_body): Likewise.
9027         * passes.c (pass_manager::register_one_dump_file): Convert
9028         local "optgroup_flags" to optgroup_flags_t.
9029         * print-tree.c (print_node): Use TDF_NONE rather than 0.
9030         (debug): Likewise.
9031         (debug_body): Likewise.
9032         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9033         to optgroup_flags_t.
9034         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9035         than 0.
9036         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9037         (convert_mult_to_fma): Likewise.
9038         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9039         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9040         * tree-vect-data-refs.c (dump_lower_bound): Convert param
9041         "dump_kind" to dump_flags_t.
9043 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9045         * config/rs6000/rs6000.c (min, max): Delete.
9047 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9049         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9050         -mabi=spe and -mabi=no-spe.
9052 2018-06-08  Martin Liska  <mliska@suse.cz>
9054         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9055         where we expect an existing summary.
9057 2018-06-08  Martin Liska  <mliska@suse.cz>
9059         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9060         * ipa-inline.h (estimate_edge_growth): Likewise.
9062 2018-06-08  Martin Liska  <mliska@suse.cz>
9064         * cgraph.c (function_version_hasher::hash): Use
9065         cgraph_node::get_uid ().
9066         (function_version_hasher::equal):
9067         * cgraph.h (cgraph_node::get_uid): New method.
9068         * ipa-inline.c (update_caller_keys): Use
9069         cgraph_node::get_uid ().
9070         (update_callee_keys): Likewise.
9071         * ipa-utils.c (searchc): Likewise.
9072         (ipa_reduced_postorder): Likewise.
9073         * lto-cgraph.c (input_node): Likewise.
9074         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9075         * symbol-summary.h (symtab_insertion): Likewise.
9076         (symtab_removal): Likewise.
9077         (symtab_duplication): Likewise.
9078         * tree-pretty-print.c (dump_function_header): Likewise.
9079         * tree-sra.c (convert_callers_for_node): Likewise.
9081 2018-06-08  Martin Liska  <mliska@suse.cz>
9083         * cgraph.c (symbol_table::create_edge): Always assign a new
9084         unique number.
9085         (symbol_table::free_edge): Do not recycle numbers.
9086         * cgraph.h (cgraph_edge::get): New method.
9087         * symbol-summary.h (symtab_removal): Use it.
9088         (symtab_duplication): Likewise.
9089         (call_summary::hashable_uid): Remove.
9091 2018-06-08  Martin Liska  <mliska@suse.cz>
9093         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9094         (initialize_growth_caches): Remove.
9095         (free_growth_caches): Likewise.
9096         (do_estimate_edge_time): Use edge_growth_cache.
9097         (do_estimate_edge_size): Likewise.
9098         (do_estimate_edge_hints): Likewise.
9099         * ipa-inline.c (reset_edge_caches): Likewise.
9100         (recursive_inlining): Likewise.
9101         (inline_small_functions): Likewise.
9102         * ipa-inline.h (initialize_growth_caches): Remove.
9103         (estimate_edge_size): Likewise.
9104         (estimate_edge_time): Likewise.
9105         (estimate_edge_hints): Likewise.
9106         (reset_edge_growth_cache): Likewise.
9107         * symbol-summary.h (call_summary::remove): New method.
9109 2018-06-08  Martin Liska  <mliska@suse.cz>
9111         * ipa-cp.c (class edge_clone_summary): New summary.
9112         (grow_edge_clone_vectors): Remove.
9113         (ipcp_edge_duplication_hook): Remove.
9114         (class edge_clone_summary_t): New call_summary class.
9115         (ipcp_edge_removal_hook): Remove.
9116         (edge_clone_summary_t::duplicate): New function.
9117         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9118         (create_specialized_node): Likewise.
9119         (ipcp_driver): Initialize edge_clone_summaries and do not
9120         register hooks.
9122 2018-06-08  Martin Liska  <mliska@suse.cz>
9124         * symbol-summary.h (get): New function.
9125         (call_summary::m_initialize_when_cloning): New class member.
9127 2018-06-08  Martin Liska  <mliska@suse.cz>
9129         * cgraph.c (cgraph_node::remove): Do not recycle uid.
9130         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9131         (symbol_table::allocate_cgraph_symbol): Do not set uid.
9132         * passes.c (uid_hash_t): Record removed_nodes by their uids.
9133         (remove_cgraph_node_from_order): Use the removed_nodes set.
9134         (do_per_function_toporder): Likwise.
9135         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9136         instead of summary_uid.
9137         (symtab_removal): Likewise.
9138         (symtab_duplication): Likewise.
9140 2018-06-08  Martin Liska  <mliska@suse.cz>
9142         * ipa-cp.c (ipcp_store_bits_results): Use
9143         ipcp_transformation_sum.
9144         (ipcp_store_vr_results): Likewise.
9145         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9146         to ...
9147         (ipcp_transformation_initialize): ... this.
9148         (ipa_set_node_agg_value_chain):
9149         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9150         (write_ipcp_transformation_info): Likewise.
9151         (read_ipcp_transformation_info): Likewise.
9152         (ipcp_update_bits): Likewise.
9153         (ipcp_update_vr): Likewise.
9154         (ipcp_transform_function): Likewise.
9155         * ipa-prop.h: Rename ipcp_transformation_summary to
9156         ipcp_transformation.
9157         (class ipcp_transformation_t): New function summary.
9158         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9159         (ipa_get_agg_replacements_for_node): Likewise.
9161 2018-06-08  Martin Liska  <mliska@suse.cz>
9163         * ipa-pure-const.c (struct funct_state_d): Do it class instead
9164         of struct.
9165         (class funct_state_summary_t): New function_summary class.
9166         (has_function_state): Remove.
9167         (get_function_state): Likewise.
9168         (set_function_state): Likewise.
9169         (add_new_function): Likewise.
9170         (funct_state_summary_t::insert): New function.
9171         (duplicate_node_data): Remove.
9172         (remove_node_data): Remove.
9173         (funct_state_summary_t::duplicate): New function.
9174         (register_hooks): Create new funct_state_summaries.
9175         (pure_const_generate_summary): Use it.
9176         (pure_const_write_summary): Likewise.
9177         (pure_const_read_summary): Likewise.
9178         (propagate_pure_const): Likewise.
9179         (propagate_nothrow): Likewise.
9180         (dump_malloc_lattice): Likewise.
9181         (propagate_malloc): Likewise.
9182         (execute): Do not register hooks, just remove summary
9183         instead.
9184         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9185         constructor.
9187 2018-06-08  Martin Liska  <mliska@suse.cz>
9189         * ipa-reference.c (remove_node_data): Remove.
9190         (duplicate_node_data): Likewise.
9191         (class ipa_ref_var_info_summary_t): New class.
9192         (class ipa_ref_opt_summary_t): Likewise.
9193         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9194         (get_reference_optimization_summary): Use
9195         ipa_ref_opt_sum_summaries.
9196         (set_reference_vars_info): Remove.
9197         (set_reference_optimization_summary): Likewise.
9198         (ipa_init): Create summaries.
9199         (init_function_info): Use function summary.
9200         (ipa_ref_opt_summary_t::duplicate): New function.
9201         (ipa_ref_opt_summary_t::remove): New function.
9202         (get_read_write_all_from_node): Fix GNU coding style.
9203         (propagate): Use function summary.
9204         (write_node_summary_p): Fix GNU coding style.
9205         (stream_out_bitmap): Likewise.
9206         (ipa_reference_read_optimization_summary): Use function summary.
9207         (ipa_reference_c_finalize): Do not release hooks.
9209 2018-06-08  Martin Liska  <mliska@suse.cz>
9211         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9212         (analyze_function_body): Extract multiple calls of get_create.
9213         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9214         * ipa-inline.c (recursive_inlining): Use ::get method.
9215         * ipa-inline.h (estimate_edge_growth): Likewise.
9217 2018-06-08  Martin Liska  <mliska@suse.cz>
9219         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9220         HSA_INVALID.
9221         (hsa_function_summary::hsa_function_summary): Use the new enum
9222         value.
9223         (hsa_gpu_implementation_p): Use hsa_summaries::get.
9224         * hsa-gen.c (hsa_get_host_function): Likewise.
9225         (get_brig_function_name): Likewise.
9226         * ipa-hsa.c (process_hsa_functions): Likewise.
9227         (ipa_hsa_write_summary): Likewise.
9228         * symbol-summary.h (symtab_duplication): Use ::get function/
9229         (get): New function.
9231 2018-06-08  Martin Liska  <mliska@suse.cz>
9233         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9234         of get.
9235         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9236         (hsa_register_kernel): Likewise.
9237         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9238         * hsa-gen.c (hsa_get_host_function): Likewise.
9239         (get_brig_function_name): Likewise.
9240         (generate_hsa): Likewise.
9241         (pass_gen_hsail::execute): Likewise.
9242         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9243         (devirtualization_time_bonus): Likewise.
9244         (ipcp_propagate_stage): Likewise.
9245         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9246         (edge_set_predicate): Likewise.
9247         (evaluate_conditions_for_known_args): Likewise.
9248         (evaluate_properties_for_edge): Likewise.
9249         (ipa_fn_summary::reset): Likewise.
9250         (ipa_fn_summary_t::duplicate): Likewise.
9251         (dump_ipa_call_summary): Likewise.
9252         (ipa_dump_fn_summary): Likewise.
9253         (analyze_function_body): Likewise.
9254         (compute_fn_summary): Likewise.
9255         (estimate_edge_devirt_benefit): Likewise.
9256         (estimate_edge_size_and_time): Likewise.
9257         (estimate_calls_size_and_time): Likewise.
9258         (estimate_node_size_and_time): Likewise.
9259         (inline_update_callee_summaries): Likewise.
9260         (remap_edge_change_prob): Likewise.
9261         (remap_edge_summaries): Likewise.
9262         (ipa_merge_fn_summary_after_inlining): Likewise.
9263         (ipa_update_overall_fn_summary): Likewise.
9264         (read_ipa_call_summary): Likewise.
9265         (inline_read_section): Likewise.
9266         (write_ipa_call_summary): Likewise.
9267         (ipa_fn_summary_write): Likewise.
9268         (ipa_free_fn_summary): Likewise.
9269         * ipa-hsa.c (process_hsa_functions): Likewise.
9270         (ipa_hsa_write_summary): Likewise.
9271         (ipa_hsa_read_section): Likewise.
9272         * ipa-icf.c (sem_function::merge): Likewise.
9273         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9274         (do_estimate_edge_time): Likewise.
9275         (estimate_size_after_inlining): Likewise.
9276         (estimate_growth): Likewise.
9277         (growth_likely_positive): Likewise.
9278         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9279         (inline_call): Likewise.
9280         * ipa-inline.c (caller_growth_limits): Likewise.
9281         (can_inline_edge_p): Likewise.
9282         (can_inline_edge_by_limits_p): Likewise.
9283         (compute_uninlined_call_time): Likewise.
9284         (compute_inlined_call_time): Likewise.
9285         (want_inline_small_function_p): Likewise.
9286         (edge_badness): Likewise.
9287         (update_caller_keys): Likewise.
9288         (update_callee_keys): Likewise.
9289         (recursive_inlining): Likewise.
9290         (inline_small_functions): Likewise.
9291         (inline_to_all_callers_1): Likewise.
9292         (dump_overall_stats): Likewise.
9293         (early_inline_small_functions): Likewise.
9294         (early_inliner): Likewise.
9295         * ipa-inline.h (estimate_edge_growth): Likewise.
9296         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9297         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9298         * ipa-prop.h (IPA_NODE_REF): Likewise.
9299         (IPA_EDGE_REF): Likewise.
9300         * ipa-pure-const.c (malloc_candidate_p): Likewise.
9301         (propagate_malloc): Likewise.
9302         * ipa-split.c (execute_split_functions): Likewise.
9303         * symbol-summary.h: Rename get to get_create.
9304         (get): Likewise.
9305         (get_create): Likewise.
9306         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9308 2018-06-08  Martin Liska  <mliska@suse.cz>
9310         * symbol-summary.h (release): Move definition out of class
9311         declaration.
9312         (symtab_removal): Likewise.
9313         (symtab_duplication): Likewise.
9315 2018-06-08  Martin Liska  <mliska@suse.cz>
9317         * symbol-summary.h (function_summary): Move constructor
9318         implementation out of class declaration.
9319         (release): Likewise.
9320         (symtab_insertion): Likewise.
9321         (symtab_removal): Likewise.
9322         (symtab_duplication): Likewise.
9323         (get): Likewise.
9325 2018-06-08  Martin Liska  <mliska@suse.cz>
9327         * Makefile.in: Remove support for MPX (macros, related functions,
9328         fields in cgraph_node, ...).
9329         * builtin-types.def (BT_BND): Likewise.
9330         (BT_FN_BND_CONST_PTR): Likewise.
9331         (BT_FN_CONST_PTR_BND): Likewise.
9332         (BT_FN_VOID_PTR_BND): Likewise.
9333         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9334         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9335         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9336         (expand_builtin_mempcpy_with_bounds): Likewise.
9337         (expand_builtin_memset_with_bounds): Likewise.
9338         (expand_builtin_memset_args): Likewise.
9339         (std_expand_builtin_va_start): Likewise.
9340         (expand_builtin): Likewise.
9341         (expand_builtin_with_bounds): Likewise.
9342         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9343         (DEF_LIB_BUILTIN_CHKP): Likewise.
9344         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9345         (DEF_CHKP_BUILTIN): Likewise.
9346         (BUILT_IN_MEMCPY): Likewise.
9347         (BUILT_IN_MEMMOVE): Likewise.
9348         (BUILT_IN_MEMPCPY): Likewise.
9349         (BUILT_IN_MEMSET): Likewise.
9350         (BUILT_IN_STPCPY): Likewise.
9351         (BUILT_IN_STRCAT): Likewise.
9352         (BUILT_IN_STRCHR): Likewise.
9353         (BUILT_IN_STRCPY): Likewise.
9354         (BUILT_IN_STRLEN): Likewise.
9355         (BUILT_IN_MEMCPY_CHK): Likewise.
9356         (BUILT_IN_MEMMOVE_CHK): Likewise.
9357         (BUILT_IN_MEMPCPY_CHK): Likewise.
9358         (BUILT_IN_MEMSET_CHK): Likewise.
9359         (BUILT_IN_STPCPY_CHK): Likewise.
9360         (BUILT_IN_STRCAT_CHK): Likewise.
9361         (BUILT_IN_STRCPY_CHK): Likewise.
9362         * calls.c (store_bounds): Likewise.
9363         (emit_call_1): Likewise.
9364         (special_function_p): Likewise.
9365         (maybe_warn_nonstring_arg): Likewise.
9366         (initialize_argument_information): Likewise.
9367         (finalize_must_preallocate): Likewise.
9368         (compute_argument_addresses): Likewise.
9369         (expand_call): Likewise.
9370         * cfgexpand.c (expand_call_stmt): Likewise.
9371         (expand_return): Likewise.
9372         (expand_gimple_stmt_1): Likewise.
9373         (pass_expand::execute): Likewise.
9374         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9375         (cgraph_node::remove): Likewise.
9376         (cgraph_node::dump): Likewise.
9377         (cgraph_node::verify_node): Likewise.
9378         * cgraph.h (chkp_function_instrumented_p): Likewise.
9379         (symtab_node::get_alias_target): Likewise.
9380         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9381         (cgraph_local_p): Likewise.
9382         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9383         (cgraph_edge::rebuild_references): Likewise.
9384         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9385         (walk_polymorphic_call_targets): Likewise.
9386         (cgraph_node::expand_thunk): Likewise.
9387         (symbol_table::output_weakrefs): Likewise.
9388         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9389         (ix86_handle_option): Likewise.
9390         * config/i386/constraints.md: Likewise.
9391         * config/i386/i386-builtin-types.def (BND): Likewise.
9392         (VOID): Likewise.
9393         (PVOID): Likewise.
9394         (ULONG): Likewise.
9395         * config/i386/i386-builtin.def (BDESC_END): Likewise.
9396         (BDESC_FIRST): Likewise.
9397         (BDESC): Likewise.
9398         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9399         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9400         * config/i386/i386.c (enum reg_class): Likewise.
9401         (ix86_target_string): Likewise.
9402         (ix86_option_override_internal): Likewise.
9403         (ix86_conditional_register_usage): Likewise.
9404         (ix86_valid_target_attribute_inner_p): Likewise.
9405         (ix86_set_indirect_branch_type): Likewise.
9406         (ix86_set_current_function): Likewise.
9407         (ix86_function_arg_regno_p): Likewise.
9408         (init_cumulative_args): Likewise.
9409         (ix86_function_arg_advance): Likewise.
9410         (ix86_function_arg): Likewise.
9411         (ix86_pass_by_reference): Likewise.
9412         (ix86_function_value_regno_p): Likewise.
9413         (ix86_function_value_1): Likewise.
9414         (ix86_function_value_bounds): Likewise.
9415         (ix86_return_in_memory): Likewise.
9416         (ix86_setup_incoming_vararg_bounds): Likewise.
9417         (ix86_va_start): Likewise.
9418         (indirect_thunk_need_prefix): Likewise.
9419         (print_reg): Likewise.
9420         (ix86_print_operand): Likewise.
9421         (ix86_expand_call): Likewise.
9422         (ix86_output_function_return): Likewise.
9423         (reg_encoded_number): Likewise.
9424         (BDESC_VERIFYS): Likewise.
9425         (ix86_init_mpx_builtins): Likewise.
9426         (ix86_init_builtins): Likewise.
9427         (ix86_emit_cmove): Likewise.
9428         (ix86_emit_move_max): Likewise.
9429         (ix86_expand_builtin): Likewise.
9430         (ix86_builtin_mpx_function): Likewise.
9431         (ix86_get_arg_address_for_bt): Likewise.
9432         (ix86_load_bounds): Likewise.
9433         (ix86_store_bounds): Likewise.
9434         (ix86_load_returned_bounds): Likewise.
9435         (ix86_store_returned_bounds): Likewise.
9436         (ix86_class_likely_spilled_p): Likewise.
9437         (ix86_hard_regno_mode_ok): Likewise.
9438         (x86_order_regs_for_local_alloc): Likewise.
9439         (ix86_mitigate_rop): Likewise.
9440         (ix86_bnd_prefixed_insn_p): Likewise.
9441         (ix86_mpx_bound_mode): Likewise.
9442         (ix86_make_bounds_constant): Likewise.
9443         (ix86_initialize_bounds): Likewise.
9444         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9445         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9446         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9447         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9448         (TARGET_CHKP_BOUND_MODE): Likewise.
9449         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9450         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9451         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9452         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9453         * config/i386/i386.h (TARGET_MPX): Likewise.
9454         (TARGET_MPX_P): Likewise.
9455         (VALID_BND_REG_MODE): Likewise.
9456         (FIRST_BND_REG): Likewise.
9457         (LAST_BND_REG): Likewise.
9458         (enum reg_class): Likewise.
9459         (BND_REG_P): Likewise.
9460         (BND_REGNO_P): Likewise.
9461         (BNDmode): Likewise.
9462         (ADJUST_INSN_LENGTH): Likewise.
9463         * config/i386/i386.md: Likewise.
9464         * config/i386/i386.opt: Likewise.
9465         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9466         (defined): Likewise.
9467         (LINK_MPX): Likewise.
9468         (MPX_SPEC): Likewise.
9469         (LIBMPX_SPEC): Likewise.
9470         (LIBMPXWRAPPERS_SPEC): Likewise.
9471         (CHKP_SPEC): Likewise.
9472         * config/i386/predicates.md: Likewise.
9473         * dbxout.c (dbxout_type): Likewise.
9474         * doc/extend.texi: Likewise.
9475         * doc/invoke.texi: Likewise.
9476         * doc/md.texi: Likewise.
9477         * doc/tm.texi: Likewise.
9478         * doc/tm.texi.in: Likewise.
9479         * dwarf2out.c (is_base_type): Likewise.
9480         (gen_formal_types_die): Likewise.
9481         (gen_subprogram_die): Likewise.
9482         (gen_type_die_with_usage): Likewise.
9483         (gen_decl_die): Likewise.
9484         (dwarf2out_late_global_decl): Likewise.
9485         * expr.c (expand_assignment): Likewise.
9486         (emit_storent_insn): Likewise.
9487         (store_expr_with_bounds): Likewise.
9488         (store_expr): Likewise.
9489         (expand_expr_real_1): Likewise.
9490         * expr.h (store_expr_with_bounds): Likewise.
9491         * function.c (use_register_for_decl): Likewise.
9492         (struct bounds_parm_data): Likewise.
9493         (assign_parms_augmented_arg_list): Likewise.
9494         (assign_parm_find_entry_rtl): Likewise.
9495         (assign_parm_is_stack_parm): Likewise.
9496         (assign_parm_load_bounds): Likewise.
9497         (assign_bounds): Likewise.
9498         (assign_parms): Likewise.
9499         (expand_function_start): Likewise.
9500         * gcc.c (CHKP_SPEC): Likewise.
9501         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9502         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9503         (wrestrict_dom_walker::check_call): Likewise.
9504         * gimple.c (gimple_build_call_from_tree): Likewise.
9505         * gimple.h (enum gf_mask): Likewise.
9506         (gimple_call_with_bounds_p): Likewise.
9507         (gimple_call_set_with_bounds): Likewise.
9508         * gimplify.c (gimplify_init_constructor): Likewise.
9509         * ipa-cp.c (initialize_node_lattices): Likewise.
9510         (propagate_constants_across_call): Likewise.
9511         (find_more_scalar_values_for_callers_subset): Likewise.
9512         * ipa-hsa.c (process_hsa_functions): Likewise.
9513         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9514         * ipa-icf.c (sem_function::merge): Likewise.
9515         * ipa-inline.c (early_inliner): Likewise.
9516         * ipa-pure-const.c (warn_function_noreturn): Likewise.
9517         (warn_function_cold): Likewise.
9518         (propagate_pure_const): Likewise.
9519         * ipa-ref.h (enum GTY): Likewise.
9520         * ipa-split.c (find_retbnd): Likewise.
9521         (consider_split): Likewise.
9522         (split_function): Likewise.
9523         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9524         * ipa.c (walk_polymorphic_call_targets): Likewise.
9525         (symbol_table::remove_unreachable_nodes): Likewise.
9526         (process_references): Likewise.
9527         (cgraph_build_static_cdtor_1): Likewise.
9528         * lto-cgraph.c (lto_output_node): Likewise.
9529         (output_refs): Likewise.
9530         (compute_ltrans_boundary): Likewise.
9531         (input_overwrite_node): Likewise.
9532         (input_node): Likewise.
9533         (input_cgraph_1): Likewise.
9534         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9535         * passes.c (pass_manager::execute_early_local_passes): Likewise.
9536         (class pass_chkp_instrumentation_passes): Likewise.
9537         (make_pass_chkp_instrumentation_passes): Likewise.
9538         * passes.def: Likewise.
9539         * rtl.h (struct GTY): Likewise.
9540         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9541         * stor-layout.c (layout_type): Likewise.
9542         * symtab.c: Likewise.
9543         * target.def: Likewise.
9544         * targhooks.c (default_chkp_bound_type): Likewise.
9545         (default_chkp_bound_mode): Likewise.
9546         (default_builtin_chkp_function): Likewise.
9547         (default_chkp_function_value_bounds): Likewise.
9548         (default_chkp_make_bounds_constant): Likewise.
9549         (default_chkp_initialize_bounds): Likewise.
9550         * targhooks.h (default_chkp_bound_type): Likewise.
9551         (default_chkp_bound_mode): Likewise.
9552         (default_builtin_chkp_function): Likewise.
9553         (default_chkp_function_value_bounds): Likewise.
9554         (default_chkp_make_bounds_constant): Likewise.
9555         (default_chkp_initialize_bounds): Likewise.
9556         * toplev.c (compile_file): Likewise.
9557         (process_options): Likewise.
9558         * tree-core.h (DEF_BUILTIN): Likewise.
9559         (DEF_BUILTIN_CHKP): Likewise.
9560         * tree-inline.c (declare_return_variable): Likewise.
9561         (remap_gimple_stmt): Likewise.
9562         (copy_bb): Likewise.
9563         (initialize_inlined_parameters): Likewise.
9564         (expand_call_inline): Likewise.
9565         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9566         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9567         (make_pass_ipa_chkp_produce_thunks): Likewise.
9568         (make_pass_chkp): Likewise.
9569         (make_pass_chkp_opt): Likewise.
9570         (make_pass_chkp_instrumentation_passes): Likewise.
9571         * tree-pretty-print.c (dump_generic_node): Likewise.
9572         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9573         * tree-ssa-dce.c (propagate_necessity): Likewise.
9574         (eliminate_unnecessary_stmts): Likewise.
9575         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9576         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9577         * tree-ssa-sccvn.h: Likewise.
9578         * tree-ssa-strlen.c (get_string_length): Likewise.
9579         (valid_builtin_call): Likewise.
9580         (adjust_last_stmt): Likewise.
9581         (handle_builtin_strchr): Likewise.
9582         (handle_builtin_strcpy): Likewise.
9583         (handle_builtin_stxncpy): Likewise.
9584         (handle_builtin_memcpy): Likewise.
9585         (handle_builtin_strcat): Likewise.
9586         (strlen_check_and_optimize_stmt): Likewise.
9587         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9588         * tree-streamer-in.c: Likewise.
9589         * tree-streamer.c (record_common_node): Likewise.
9590         * tree.c (tree_code_size): Likewise.
9591         (wide_int_to_tree_1): Likewise.
9592         (type_contains_placeholder_1): Likewise.
9593         (build_common_tree_nodes): Likewise.
9594         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9595         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9596         (POINTER_BOUNDS_P): Likewise.
9597         (BOUNDED_TYPE_P): Likewise.
9598         (BOUNDED_P): Likewise.
9599         (CALL_WITH_BOUNDS_P): Likewise.
9600         (pointer_bounds_type_node): Likewise.
9601         * value-prof.c (gimple_ic): Likewise.
9602         * var-tracking.c (vt_add_function_parameters): Likewise.
9603         * varasm.c (make_decl_rtl): Likewise.
9604         (assemble_start_function): Likewise.
9605         (output_constant): Likewise.
9606         (maybe_assemble_visibility): Likewise.
9607         * varpool.c (ctor_for_folding): Likewise.
9608         * chkp-builtins.def: Remove.
9609         * ipa-chkp.c: Remove.
9610         * ipa-chkp.h: Remove.
9611         * rtl-chkp.c: Remove.
9612         * rtl-chkp.h: Remove.
9613         * tree-chkp-opt.c: Remove.
9614         * tree-chkp.c: Remove.
9615         * tree-chkp.h: Remove.
9617 2018-06-07  Carl Love  <cel@us.ibm.com>
9619         * config/rs6000/vsx.md (vextract_fp_from_shorth,
9620         vextract_fp_from_shortl): Add BE support.
9622 2018-06-07  Paul Koning  <ni1d@arrl.net>
9624         * compare-elim.c (try_merge_compare): Don't merge compare if
9625         address contains a side effect.
9626         (try_eliminate_compare): Likewise.
9628 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
9630         * config.gcc: Support "tremont".
9631         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9632         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9633         PROCESSOR_TREMONT.
9634         * config/i386/i386.c (m_TREMONT): Define.
9635         (processor_target_table): Add "tremont".
9636         (PTA_TREMONT): Define.
9637         (ix86_lea_outperforms): Add TARGET_TREMONT.
9638         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9639         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9640         and M_INTEL_GOLDMONT_PLUS.
9641         (fold_builtin_cpu): Add "tremont".
9642         (ix86_add_stmt_cost): Add TARGET_TREMONT.
9643         (ix86_option_override_internal): Add "tremont".
9644         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9645         (processor_type): Add PROCESSOR_TREMONT.
9646         * config/i386/x86-tune.def: Add m_TREMONT.
9647         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
9649 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9651         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
9652         symbol defined for msp430i* devices to be lower case.
9654 2018-06-07  Richard Biener  <rguenther@suse.de>
9656         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
9657         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
9658         Properly wrap signed arithmetic if overflow wraps.
9660 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
9662         PR tree-optimization/69615
9663         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
9664         of a cast from a same precision integral SSA_NAME in a bb dominated
9665         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
9666         cast to utype if rhs2 has already a compatible type.
9668 2018-06-07  Richard Biener  <rguenther@suse.de>
9670         PR tree-optimization/85935
9671         * graphite-scop-detection.c (find_params_in_bb): Analyze
9672         condition operands with respect to the correct loop.  Assert
9673         the analysis doesn't fail.
9675 2018-06-04  Carl Love  <cel@us.ibm.com>
9677         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
9678         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
9679         as it is slightly cheaper.
9680         (first_match_or_eos_index_<mode>):
9681         Calculate index using natural element order.
9682         (first_match_index_<mode>):
9683         Calculate index using natural element order.
9684         (first_match_or_eos_index_<mode>):
9685         Calculate index using natural order.
9686         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
9687         for BE and LE modes.
9688         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
9689         P9V_BUILTIN_VCLZLSBB_V16QI.
9690         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
9691         specific.
9693 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9695         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
9696         indentation and line wrap for many prototypes.  Add missing
9697         @smallexample directives around block of prototypes for vec_xl and
9698         vec_xst.
9700 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
9702         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
9703         track if we pass or return IEEE 128-bit floating point.
9704         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
9705         C++ mangling that is compatible with GCC 8.1.
9706         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
9707         (init_cumulative_args): Note if we pass or return IEEE 128-bit
9708         floating point types.
9709         (rs6000_function_arg_advance_1): Likewise.
9710         (rs6000_mangle_type): Optionally generate mangled names that match
9711         what GCC 8.1 generated for IEEE 128-bit floating point types.
9712         (rs6000_globalize_decl_name): If we have an external function that
9713         passes or returns IEEE 128-bit types, generate a weak reference
9714         from the mangled name used in GCC 8.1 to the current mangled
9715         name.
9716         (rs6000_init_builtins): Make __ibm128 use the long double type if
9717         long double is IBM extended double.  Make __float128 use the long
9718         double type if long double is IEEE 128-bit.
9720         PR target/85657
9721         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
9722         macro for __ibm128 built-in functions.
9723         (PACK_IF): Add __ibm128 pack/unpack functions.
9724         (UNPACK_IF): Likewise.
9725         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
9726         enable long double built-in functions if long double is IEEE
9727         128-bit floating point.
9728         (rs6000_invalid_builtin): Update long double built-in function
9729         error message.
9730         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
9731         functions, adjust the built-in function to use the long double
9732         built-in function if __ibm128 and long double are the same type.
9733         * doc/extend.texi (PowerPC builtins): Update documention for
9734         __builtin_{,un}pack_longdouble.  Add documentation for
9735         __builtin_{,un}pack_ibm128.
9737 2018-06-06  Jim Wilson  <jimw@sifive.com>
9739         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
9740         (struct machine_function): New field interrupt_mode.
9741         (riscv_handle_type_attribute): New function.  Add forward declaration.
9742         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
9743         (riscv_expand_epilogue): Check interrupt_mode field.
9744         (riscv_set_current_function): Check interrupt attribute args and
9745         set interrupt_mode field.
9746         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
9747         (riscv_sret, riscv_uret): New.
9748         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
9749         new arguments to interrupt attribute.
9751 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
9753         PR target/63177
9754         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
9755         Don't handle -mcpu=power8 if -mpower9-vector is also used.
9757 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9759         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
9760         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
9761         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9762         several redundant entries.
9764 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
9766         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
9767         type from "rtx" to "rtx_insn *".
9768         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
9769         for local "call_insn", removing cast.
9770         (ix86_expand_call): Likewise, introducing a "call_insn" local.
9772 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
9774         PR tree-optimization/86066
9775         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
9776         for BIT_INSERT_EXPR stores.
9778 2018-06-06  Richard Biener  <rguenther@suse.de>
9780         PR tree-optimization/86062
9781         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9782         component refs ontop
9783         of to be offsetted base.
9785 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9787         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
9788         to be static and remove check on interrupt attribute name.
9790 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9792         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9793         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
9795 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
9797         PR target/79924
9798         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
9799         second argument.
9800         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
9801         Remove second argument, change how error is called.
9802         (aarch64_layout_arg): Remove second argument from
9803         aarch64_err_no_fpadvsimd call.
9804         (aarch64_init_cumulative_args): Ditto.
9805         (aarch64_gimplify_va_arg_expr): Ditto.
9806         * config/aarch64/aarch64.md (mov<mode>): Ditto.
9808 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
9810         * config/i386/i386.md (simple_return_indirect_internal): New expander.
9811         (*simple_return_indirect_internal<mode>): Rename from
9812         simple_return_indirect_internal.  Use W mode iterator.
9813         (rstorssp): New expander.
9814         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
9815         (clrssbsy): New expander.
9816         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
9818 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9820         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
9821         __typeof__.
9822         (cmse_check_pointed_object): Likewise.
9824 2018-06-05  Martin Liska  <mliska@suse.cz>
9826         PR gcov-profile/47618
9827         * doc/invoke.texi: Document how -fprofile-dir format
9828         is extended.
9830 2018-06-05  Richard Biener  <rguenther@suse.de>
9832         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
9833         removal pretend DOM info isn't available so we do not update
9834         it and only remove edges, not dominated blocks.  Actually free
9835         DOM info in case we removed something.  Remove unreachable blocks.
9836         (mfb_keep_latches): Work with either DOM info or marked backedges.
9837         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
9838         first.  Mark backedges if DOM info isn't available.
9839         (Re-)compute DOM info after cleanup_control_flow_pre.
9841 2018-06-05  Richard Biener  <rguenther@suse.de>
9843         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
9844         (locus_discrim_hasher::hash): Adjust.
9845         (locus_discrim_hasher::equal): Likewise.
9846         (next_discriminator_for_locus): Work on line directly.
9847         (same_line_p): Pass in expanded locus1 as well.
9848         (assign_discriminators): Avoid redundant location expansions.
9850 2018-06-05  Richard Biener  <rguenther@suse.de>
9852         PR tree-optimization/86046
9853         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
9854         if required after clearing TREE_ADDRESSABLE.
9856 2018-06-05  Richard Biener  <rguenther@suse.de>
9858         PR tree-optimization/86047
9859         * tree-ssa-loop.c (for_each_index): Glob handling of all
9860         decls and constants and really handle all of them.
9862 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9864         PR target/81497
9865         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
9866         qualifier_void_pointer and qualifier_const_void_pointer.
9867         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
9868         (arm_init_builtins): Handle the above.
9869         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
9870         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
9871         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
9872         void intrinsics.
9874 2018-06-05  Martin Liska  <mliska@suse.cz>
9876         * auto-profile.c (read_autofdo_file): Do not use
9877         gcov_ctr_summary struct.
9878         (afdo_callsite_hot_enough_for_early_inline): Likewise.
9879         * coverage.c (struct counts_entry): Likewise.
9880         (read_counts_file): Read just single summary entry.
9881         (get_coverage_counts): Use gcov_summary struct.
9882         * coverage.h (get_coverage_counts): Likewise.
9883         * gcov-dump.c (dump_working_sets): Likewise.
9884         (tag_summary): Dump just single summary.
9885         * gcov-io.c (gcov_write_summary): Write just histogram
9886         summary.
9887         (gcov_read_summary): Read just single summary.
9888         (compute_working_sets): Use gcov_summary struct.
9889         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
9890         of GCOV_COUNTERS_SUMMABLE.
9891         (GCOV_COUNTERS_SUMMABLE): Remove.
9892         (GCOV_FIRST_VALUE_COUNTER): Replace with
9893         GCOV_COUNTER_V_INTERVAL.
9894         (struct gcov_ctr_summary): Remove.
9895         (struct gcov_summary): Directly use fields of former
9896         gcov_ctr_summary.
9897         (compute_working_sets): Use gcov_summary struct.
9898         * gcov.c (read_count_file): Do not use ctrs fields.
9899         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
9900         struct.
9901         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
9902         struct.
9903         * profile.c: Likewise.
9904         * profile.h: Likewise.
9906 2018-06-05  Martin Liska  <mliska@suse.cz>
9908         PR gcov-profile/84846
9909         * gcov.c (output_lines): Print working directory only
9910         in intermediate format.
9912 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
9914         * config/s390/s390-builtin-types.def: Add void function type.
9915         * config/s390/s390-builtins.def: Use the function type for the
9916         tbeginc builtin.
9918 2018-06-04  Jim Wilson  <jimw@sifive.com>
9920         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
9921         to int.
9922         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
9923         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
9924         handle EH_RETURN_DATA_REGNO registers properly.
9925         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
9926         (riscv_expand_epilogue): Update comment.  Change argument name and
9927         type.  Update code to use new name and type.  Pass new args to
9928         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
9929         EXCEPTION_RETURN.
9930         * config/riscv/riscv.md (NORMAL_RETURN): New.
9931         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
9932         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
9933         (eh_return): Call gen_eh_return_internal and emit barrier.
9934         (eh_return_internal): Call riscv_expand_epilogue.
9936 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
9938         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
9939         bit_insertion field and declare can_be_merged_into method.
9940         (merged_store_group::can_be_merged_into): New method.
9941         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
9942         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
9943         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
9945 2018-06-04  Richard Biener  <rguenther@suse.de>
9947         PR tree-optimization/85955
9948         * builtins.c (fold_builtin_sincos): Convert pointers to
9949         destination to appropriate type before dereferencing.
9951 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
9953         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
9955 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
9957         * expr.c (expand_expr_real_1): Force the operand into memory if
9958         its TYPE_MODE is BLKmode and if there is no integer mode for
9959         the number of bits being extracted.
9961 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
9963         PR target/85832
9964         PR target/86036
9965         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9966         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
9968 2018-06-04  Richard Biener  <rguenther@suse.de>
9970         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
9971         (cleanup_tree_cfg_noloop): ... single caller.  Do
9972         start_recording_case_labels later.
9974 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
9976         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
9977         to _IMMINTRIN_H_INCLUDED.
9978         * config/i386/pconfigintrin.h: Ditto.
9979         * config/i386/waitpkgintrin.h: Ditto.
9980         * config/i386/immintrin.h: Add includes for sgxintrin.h,
9981         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
9982         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
9983         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
9984         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
9985         waitpkgintrin.h and cldemoteintrin.h.
9987 2018-06-04  Richard Biener  <rguenther@suse.de>
9989         PR tree-optimization/86038
9990         * tracer.c (find_best_successor): Check probability for
9991         being initialized, bail out if not.
9993 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
9995         PR target/86003
9996         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
9997         of bits to ignore when comparing architectures.
9999 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10001         PR tree-optimization/69615
10002         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10003         maximum or minimum of the type, try to merge it also as if
10004         range1 is + [-, x - 1] or + [x + 1, -].
10006         PR c++/86025
10007         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10009 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10011         PR tree-optimization/86034
10012         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10013         the unsigned bitfield type in a bit insertion sequence if it does not
10014         have a larger precision than the bitfield size.
10015         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10017 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
10019         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10021 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10023         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10024         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10025         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10026         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10028 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10030         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10031         Disable -fdelete-null-pointer-checks for ELF toolchain.
10033 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10034             Kito Cheng  <kito.cheng@gmail.com>
10036         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10037         (nds32le-*-*, nds32be-*-*): Integrate checking process.
10038         (nds32*-*-*): Add glibc and uclibc conditions.
10039         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10040         (TARGET_EXCEPT_UNWIND_INFO): Define.
10041         * config/nds32/elf.h: New file.
10042         * config/nds32/linux.h: New file.
10043         * config/nds32/nds32-elf.opt: New file.
10044         * config/nds32/nds32-linux.opt: New file.
10045         * config/nds32/nds32-fp-as-gp.c
10046         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10047         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10048         TARGET_LINUX_ABI.
10049         (nds32_asm_file_end): Ditto.
10050         (nds32_print_operand): Ditto.
10051         (nds32_insert_attributes): Ditto.
10052         (nds32_init_libfuncs): New function.
10053         (TARGET_HAVE_TLS): Define.
10054         (TARGET_INIT_LIBFUNCS): Define.
10055         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10056         spec content.
10057         (TARGET_ELF): Apply different mcmodel setting.
10058         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10059         been migrated into elf.h and linux.h files.
10060         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10061         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10062         (mcmodel): The content has been migrated into nds32-elf.opt and
10063         nds32-linux.opt files.
10064         * config/nds32/t-elf: New file.
10065         * config/nds32/t-linux: New file.
10067 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10068             Shiva Chen  <shiva0217@gmail.com>
10070         * config/nds32/constants.md (unspec_volatile_element): Add
10071         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10072         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10073         optimization.
10074         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10075         (make_pass_nds32_fp_as_gp): Declare.
10076         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10077         optmization pass.
10078         (nds32_asm_function_end_prologue): Remove unused asm output.
10079         (nds32_asm_function_begin_epilogue): Remove unused asm output.
10080         (nds32_asm_file_start): Output necessary fp_as_gp information.
10081         (nds32_option_override): Adjust register usage.
10082         (nds32_expand_prologue): Consider fp_as_gp situation.
10083         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10084         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10085         (epilogue): Ditto.
10086         (return): Ditto.
10087         (simple_return): Ditto.
10088         (omit_fp_begin): Output special directive for fp_as_gp.
10089         (omit_fp_end): Output special directive for fp_as_gp.
10090         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10091         mforbid-fp-as-gp): New options.
10093 2018-06-01  Mark Wielaard  <mark@klomp.org>
10095         * dwarf2out.c (dwarf2out_finish): Remove generation of
10096         DW_AT_loclists_base.
10098 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
10100         * gimple-ssa-store-merging.c: Include gimple-fold.h.
10101         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10102         (struct merged_store_group): Add bit_insertion field.
10103         (dump_char_array): Use standard hexadecimal format.
10104         (merged_store_group::merged_store_group): Set bit_insertion to false.
10105         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
10106         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
10107         also print the mask in the dump file.
10108         (pass_store_merging::gate): Minor tweak.
10109         (imm_store_chain_info::coalesce_immediate): Fix wrong association
10110         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
10111         stores with INTEGER_CST stores.
10112         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10113         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10114         and use it throughout.  Generate bit insertion sequences if need be.
10115         (pass_store_merging::process_store): Remove redundant condition.
10116         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10118 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
10120         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10121         the 128-bit floating point types.  Fix function comment.
10123 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10125         * config/aarch64/aarch64-simd.md
10126         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10127         mnemonics.
10128         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10129         mnemonics.
10131 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10133         PR tree-optimization/85989
10134         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10135         variable.
10136         (backprop::intersect_uses): Check it when deciding whether this
10137         is a backedge reference.
10138         (backprop::process_block): Add each phi to m_visited_phis
10139         after visiting it, then clear it at the end.
10141 2018-06-01  Richard Biener  <rguenther@suse.de>
10143         * tree-vectorizer.h (vect_dr_stmt): New function.
10144         (vect_get_load_cost): Adjust.
10145         (vect_get_store_cost): Likewise.
10146         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10147         Use vect_dr_stmt instead of DR_SMTT.
10148         (vect_record_base_alignments): Likewise.
10149         (vect_calculate_target_alignment): Likewise.
10150         (vect_compute_data_ref_alignment): Likewise and make static.
10151         (vect_update_misalignment_for_peel): Likewise.
10152         (vect_verify_datarefs_alignment): Likewise.
10153         (vector_alignment_reachable_p): Likewise.
10154         (vect_get_data_access_cost): Likewise.  Pass down
10155         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10156         (vect_get_peeling_costs_all_drs): Likewise.
10157         (vect_peeling_hash_get_lowest_cost): Likewise.
10158         (vect_enhance_data_refs_alignment): Likewise.
10159         (vect_find_same_alignment_drs): Likewise.
10160         (vect_analyze_data_refs_alignment): Likewise.
10161         (vect_analyze_group_access_1): Likewise.
10162         (vect_analyze_group_access): Likewise.
10163         (vect_analyze_data_ref_access): Likewise.
10164         (vect_analyze_data_ref_accesses): Likewise.
10165         (vect_vfa_segment_size): Likewise.
10166         (vect_small_gap_p): Likewise.
10167         (vectorizable_with_step_bound_p): Likewise.
10168         (vect_prune_runtime_alias_test_list): Likewise.
10169         (vect_analyze_data_refs): Likewise.
10170         (vect_supportable_dr_alignment): Likewise.
10171         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10172         (vect_gen_prolog_loop_niters): Likewise.
10173         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10174         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10175         modify DR_STMT.
10176         (vect_recog_mask_conversion_pattern): Likewise.
10177         (vect_try_gather_scatter_pattern): Likewise.
10178         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10179         to vect_get_store_cost.
10180         (vect_get_store_cost): Get stmt_info instead of DR.
10181         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10182         (vect_get_load_cost): Get stmt_info instead of DR.
10184 2018-06-01  Richard Biener  <rguenther@suse.de>
10186         PR middle-end/86017
10187         * gimple-fold.c (var_decl_component_p): Also allow offsetted
10188         vars wrapped in MEM_REFs.
10190 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10192         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10193         Fix subreg tests so that we only return a choice between
10194         GENERAL_REGS and FP_REGS if the original classes included both.
10196 2018-06-01  Richard Biener  <rguenther@suse.de>
10198         PR ipa/85960
10199         * tree-ssa-structalias.c (get_function_part_constraint):
10200         Handle NULL fi->decl.
10201         (find_func_aliases_for_call): Properly handle indirect
10202         fi from direct call.
10203         (find_func_clobbers): Likewise.
10204         (ipa_pta_execute): Likewise.
10205         (create_variable_info_for): For functions that are ifunc_resolver
10206         resolve to a varinfo that contains the result of the resolver call.
10207         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10208         aliases.
10210 2018-05-31  Michael Collison  <michael.collison@arm.com>
10212         * config/aarch64/aarch64.md:
10213         (*fix_to_zero_extenddfdi2): New pattern.
10214         * gcc.target/aarch64/fix_extend1.c: New testcase.
10216 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
10218         PR middle-end/78809
10219         PR middle-end/83026
10220         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10221         and BUILT_IN_STRNCMP_EQ.
10222         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10223         BUILT_IN_STRNCMP_EQ.
10224         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10225         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10226         (gimple_fold_builtin): Likewise.
10227         * tree-ssa-strlen.c (compute_string_length): New function.
10228         (determine_min_obsize): New function.
10229         (handle_builtin_string_cmp): New function to handle calls to
10230         string compare functions.
10231         (strlen_optimize_stmt): Add handling to builtin string compare
10232         calls.
10233         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10234         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10235         * tree.c (build_common_builtin_nodes): Add new defines of
10236         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10238 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
10240         PR target/85984
10241         * bb-reorder.c (pass_partition_blocks::gate): Return false for
10242         functions with naked attribute.
10244 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
10246         * config/i386/sse.md (avx_vec_concat<mode>):
10247         Substitute concat_tg_mode mode attribute with xtg_mode.
10248         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10249         (concat_tg_mode): Remove mode attribute.
10251 2018-05-31  Martin Sebor  <msebor@redhat.com>
10253         PR c/82063
10254         * calls.c (alloc_max_size): Correct a logic error/typo.
10255         Treat excessive arguments as infinite.  Warn for invalid arguments.
10256         * doc/invoke.texi (-Walloc-size-larger-than): Update.
10258 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
10260         PR target/85829
10261         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10262         and movx for Haswell.
10264 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
10265             Cesar Philippidis  <cesar@codesourcery.com>
10267         PR middle-end/85879
10268         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10269         when emitting error on private/firstprivate reductions.
10270         * omp-low.c (lower_omp_target): Avoid reference-type processing
10271         on pointers for firstprivate clause.
10273 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10275         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10276         (st1x2): Likewise.
10277         (st1x3): Likewise.
10278         * config/aarch64/aarch64-simd.md
10279         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10280         (aarch64_ld1_x3_<mode>): Likewise
10281         (aarch64_st1x2<VALLDIF:mode>): Likewise
10282         (aarch64_st1_x2_<mode>): Likewise
10283         (aarch64_st1x3<VALLDIF:mode>): Likewise
10284         (aarch64_st1_x3_<mode>): Likewise
10285         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10286         (vld1_s8_x3): Likewise.
10287         (vld1_u16_x3): Likewise.
10288         (vld1_s16_x3): Likewise.
10289         (vld1_u32_x3): Likewise.
10290         (vld1_s32_x3): Likewise.
10291         (vld1_u64_x3): Likewise.
10292         (vld1_s64_x3): Likewise.
10293         (vld1_f16_x3): Likewise.
10294         (vld1_f32_x3): Likewise.
10295         (vld1_f64_x3): Likewise.
10296         (vld1_p8_x3): Likewise.
10297         (vld1_p16_x3): Likewise.
10298         (vld1_p64_x3): Likewise.
10299         (vld1q_u8_x3): Likewise.
10300         (vld1q_s8_x3): Likewise.
10301         (vld1q_u16_x3): Likewise.
10302         (vld1q_s16_x3): Likewise.
10303         (vld1q_u32_x3): Likewise.
10304         (vld1q_s32_x3): Likewise.
10305         (vld1q_u64_x3): Likewise.
10306         (vld1q_s64_x3): Likewise.
10307         (vld1q_f16_x3): Likewise.
10308         (vld1q_f32_x3): Likewise.
10309         (vld1q_f64_x3): Likewise.
10310         (vld1q_p8_x3): Likewise.
10311         (vld1q_p16_x3): Likewise.
10312         (vld1q_p64_x3): Likewise.
10313         (vst1_s64_x2): Likewise.
10314         (vst1_u64_x2): Likewise.
10315         (vst1_f64_x2): Likewise.
10316         (vst1_s8_x2): Likewise.
10317         (vst1_p8_x2): Likewise.
10318         (vst1_s16_x2): Likewise.
10319         (vst1_p16_x2): Likewise.
10320         (vst1_s32_x2): Likewise.
10321         (vst1_u8_x2): Likewise.
10322         (vst1_u16_x2): Likewise.
10323         (vst1_u32_x2): Likewise.
10324         (vst1_f16_x2): Likewise.
10325         (vst1_f32_x2): Likewise.
10326         (vst1_p64_x2): Likewise.
10327         (vst1q_s8_x2): Likewise.
10328         (vst1q_p8_x2): Likewise.
10329         (vst1q_s16_x2): Likewise.
10330         (vst1q_p16_x2): Likewise.
10331         (vst1q_s32_x2): Likewise.
10332         (vst1q_s64_x2): Likewise.
10333         (vst1q_u8_x2): Likewise.
10334         (vst1q_u16_x2): Likewise.
10335         (vst1q_u32_x2): Likewise.
10336         (vst1q_u64_x2): Likewise.
10337         (vst1q_f16_x2): Likewise.
10338         (vst1q_f32_x2): Likewise.
10339         (vst1q_f64_x2): Likewise.
10340         (vst1q_p64_x2): Likewise.
10341         (vst1_s64_x3): Likewise.
10342         (vst1_u64_x3): Likewise.
10343         (vst1_f64_x3): Likewise.
10344         (vst1_s8_x3): Likewise.
10345         (vst1_p8_x3): Likewise.
10346         (vst1_s16_x3): Likewise.
10347         (vst1_p16_x3): Likewise.
10348         (vst1_s32_x3): Likewise.
10349         (vst1_u8_x3): Likewise.
10350         (vst1_u16_x3): Likewise.
10351         (vst1_u32_x3): Likewise.
10352         (vst1_f16_x3): Likewise.
10353         (vst1_f32_x3): Likewise.
10354         (vst1_p64_x3): Likewise.
10355         (vst1q_s8_x3): Likewise.
10356         (vst1q_p8_x3): Likewise.
10357         (vst1q_s16_x3): Likewise.
10358         (vst1q_p16_x3): Likewise.
10359         (vst1q_s32_x3): Likewise.
10360         (vst1q_s64_x3): Likewise.
10361         (vst1q_u8_x3): Likewise.
10362         (vst1q_u16_x3): Likewise.
10363         (vst1q_u32_x3): Likewise.
10364         (vst1q_u64_x3): Likewise.
10365         (vst1q_f16_x3): Likewise.
10366         (vst1q_f32_x3): Likewise.
10367         (vst1q_f64_x3): Likewise.
10368         (vst1q_p64_x3): Likewise.
10370 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10372         * config/msp430/msp430.c (msp430_output_labelref): Prepend
10373         user_label_prefix to name.
10375         * tree-core.h: Update comment about the format of NAME string
10376         passed to handler in attribute_spec.
10378         * config/msp430/msp430.md: Remove erroneous subreg expression from
10379         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10380         zero_extend{q,h}isi2.
10382 2018-05-30  Borislav Petkov  <bp@suse.de>
10384         * doc/extend.texi: Document some architecture specific
10385         constraints and sort entries.
10387 2018-05-30  Martin Sebor  <msebor@redhat.com>
10389         PR middle-end/85369
10390         * builtins.c (expand_builtin_stpcpy_1): New function.
10391         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10392         only if the former succeeds.
10394 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10396         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10397         in saphira.
10399 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10401         * doc/invoke.texi (-flinker-output): Document
10403 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10405         * passes.c (ipa_write_summaries): Only modify statements if body
10406         is in memory.
10407         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10408         incrementally linking.
10409         (ipa_passes): Likewise.
10410         * lto-cgraph.c (lto_output_node): When incrementally linking do not
10411         pass down resolution info.
10412         * common.opt (flag_incremental_link): Update info.
10413         * gcc.c (plugin specs): Turn flinker-output=* to
10414         -plugin-opt=-linker-output-known
10415         * toplev.c (compile_file): Also cut compilation when doing incremental
10416         link.
10417         * flag-types. (enum lto_partition_model): Add
10418         LTO_LINKER_OUTPUT_NOLTOREL.
10419         (invoke.texi): Add -flinker-output docs.
10420         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10421         link same way as WPA; do not stream in dead initializers.
10423         * dwarf2out.c (dwarf2out_die_ref_for_decl,
10424         darf2out_register_external_decl): Support incremental link.
10426 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10428         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10430 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10432         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10433         it down to simple_object_copy_lto_debug_sections.
10434         (run_gcc): Determine incremental LTO link time and configure
10435         lto1 into non-wpa mode, disable renaming of debug sections.
10437 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10439         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10440         descriptions of various incorrectly documented functions.
10442 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10444         Revert:
10445         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10446         address check not strict.
10448 2018-05-30  Richard Biener  <rguenther@suse.de>
10450         PR tree-optimization/85964
10451         * tracer.c (better_p): Drop initialized count check, we only
10452         call the function with initialized counts now.
10453         (find_best_successor): Do find a best edge if one
10454         has uninitialized count.
10455         (find_best_predecessor): Likewise.  Do BB frequency check only
10456         if count is initialized.
10458 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
10460         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10461         (aarch64_ldrstr_offset_compare): New.
10462         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10463         load/store orderings.
10464         (aarch64_gen_adjusted_ldpstp): Likewise.
10466 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
10468         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10469         Check for subset of GENERAL_REGS and FP_REGS.
10470         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10471         r=w alternative.
10473 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
10475         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10476         and wi::to_poly_offset.  Add the current offset and then check
10477         whether the sum fits, rather than using an unchecked addition of
10478         a checked term.  Check for a shwi rather than a uhwi.
10479         * expr.c (get_bit_range): Use tree_to_poly_uint64.
10480         (store_constructor): Use poly_int_tree_p.
10481         (expand_expr_real_1): Likewise.
10482         * function.c (assign_temp): Likewise.
10483         * fold-const.c (const_binop): Use poly_int_tree_p and
10484         wi::to_poly_offset.
10485         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
10486         division.
10487         * ipa-icf-gimple.c (func_checker::compare_operand): Use
10488         to_poly_offset for MEM offsets.
10489         * ipa-icf.c (sem_variable::equals): Likewise.
10490         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10491         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10492         wi::to_poly_offset for BIT_FIELD_REF offsets.
10493         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10494         wi::to_poly_offset.
10495         * var-tracking.c (emit_note_insn_var_location): Use
10496         tree_to_poly_uint64.
10498 2018-05-29  Jim Wilson  <jimw@sifive.com>
10500         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10502 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
10504         PR target/85950
10505         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10506         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10507         sequence.
10508         (sse4_1_round<mode>2): Use nonimmediate_operand
10509         for operand 1 predicate.
10511 2018-05-29  Martin Sebor  <msebor@redhat.com>
10512             Richard Biener  <rguenther@suse.de>
10514         PR testsuite/85888
10515         * calls.c (get_size_range): Call determine_value_range instead
10516         of get_value_range..
10517         * tree-vrp.h (determine_value_range): Declared new function.
10518         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10520 2018-05-29  Richard Biener  <rguenther@suse.de>
10522         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10523         sure to use non-pattern stmts for get_earlier_stmt arguments.
10524         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10525         called on pattern stmts.
10526         (get_later_stmt): Likewise.
10528 2018-05-29  Martin Liska  <mliska@suse.cz>
10530         PR gcov-profile/85759
10531         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10532         env variables.
10534 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
10536         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10537         VEC_UNPACK_*_EXPR.
10538         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10539         VEC_PACK_*_EXPR.
10541         PR target/85918
10542         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10543         VEC_PACK_FLOAT_EXPR): New tree codes.
10544         * tree-pretty-print.c (op_code_prio): Handle
10545         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10546         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10547         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10548         * tree-inline.c (estimate_operator_cost): Likewise.
10549         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10550         * fold-const.c (const_binop): Likewise.
10551         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10552         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10553         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10554         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10555         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10556         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10557         * expr.c (expand_expr_real_2): Likewise.
10558         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10559         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10560         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10561         optabs.
10562         * optabs.c (expand_widen_pattern_expr): For
10563         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10564         sign from result type rather than operand's type.
10565         (expand_binop_directly): For vec_packu_float_optab and
10566         vec_packs_float_optab allow result type to be different from operand's
10567         type.
10568         * optabs-tree.c (optab_for_tree_code): Handle
10569         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10570         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
10571         * tree-vect-generic.c (expand_vector_operations_1):  Handle
10572         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10573         VEC_PACK_FLOAT_EXPR.
10574         * tree-vect-stmts.c (supportable_widening_operation): Handle
10575         FIX_TRUNC_EXPR.
10576         (supportable_narrowing_operation): Handle FLOAT_EXPR.
10577         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10578         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10579         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
10580         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10581         mode attributes.
10582         (vec_pack<floatprefix>_float_<mode>): New expander.
10583         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10584         attributes.
10585         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10586         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10587         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10588         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10589         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10590         Document.
10591         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10592         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10593         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10594         VEC_PACK_FLOAT_EXPR): Document.
10596 2018-05-29  Richard Biener  <rguenther@suse.de>
10598         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10599         member.
10600         (stmt_vec_info_vec): Make pointer.
10601         (init_stmt_vec_info_vec): Remove.
10602         (free_stmt_vec_info_vec): Likewise.
10603         (set_stmt_vec_info_vec): New function.
10604         (free_stmt_vec_infos): Likewise.
10605         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10606         (set_vinfo_for_stmt): Likewise.
10607         (get_earlier_stmt): Likewise.
10608         (get_later_stmt): Likewise.
10609         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10610         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10611         (vec_info::~vec_info): Free stmt_vec_infos.
10612         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10613         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10614         (pass_slp_vectorize::execute): Likewise.
10615         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10616         (free_stmt_vec_info_vec): Likewise.
10617         (set_stmt_vec_info_vec): New function.
10618         (free_stmt_vec_infos): Likewise.
10619         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10620         the global stmt_vec_info_vec.
10621         * tree-parloops.c (gather_scalar_reductions): Use
10622         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10623         vector.
10625 2018-05-29  Richard Biener  <rguenther@suse.de>
10627         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10629 2018-05-29  Martin Liska  <mliska@suse.cz>
10630             David Malcolm  <dmalcolm@redhat.com>
10632         * vec.c (test_reverse): New.
10633         (vec_c_tests): Add new test.
10634         * vec.h (vl_ptr>::reverse): New function.
10636 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
10638         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10640         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10641         and later.
10643 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10645         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
10647 2018-05-28  Richard Biener  <rguenther@suse.de>
10649         PR tree-optimization/85933
10650         * tree-vect-data-refs.c (vect_record_base_alignments): Only
10651         look at stmts marked as vectorizable.
10653 2018-05-28  Richard Biener  <rguenther@suse.de>
10655         PR tree-optimization/85934
10656         * tree-vect-generic.c (expand_vector_operations_1): Hoist
10657         vector boolean check before scalar optimization.
10659 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
10661         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
10662         for armv5te.
10664 2018-05-28  Mark Wielaard  <mark@klomp.org>
10666         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
10667         if it is an expression containing a minus sign.
10669 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
10671         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
10673 2018-05-27  Paul Koning  <ni1d@arrl.net>
10675         * config/pdp11/pdp11.md (truncsihi2): Remove.
10677 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
10678             Chung-Ju Wu  <jasonwucj@gmail.com>
10680         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
10681         implementation.
10682         (unaligned_store_dw): Ditto.
10683         * config/nds32/nds32-memory-manipulation.c
10684         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
10685         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
10686         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
10687         (emit_setmem_word_loop): Rename to ...
10688         (emit_setmem_doubleword_loop): ... this.
10689         (nds32_gen_dup_4_byte_to_word_value): New function.
10690         (nds32_gen_dup_8_byte_to_double_word_value): New function.
10691         (nds32_expand_setmem_loop): Refine implementation.
10692         (nds32_expand_setmem_loop_v3m): Ditto.
10693         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
10694         pattern.
10696 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10698         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
10700 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10702         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
10703         (nds32_init_machine_status): Initialize machine->attr_naked_p and
10704         machine->attr_no_prologue_p.
10705         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
10706         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
10707         (nds32_expand_epilogue): Consider attr_naked_p.
10708         (nds32_expand_epilogue_v3pop): Likewise.
10709         (nds32_can_use_return_insn): Likewise.
10710         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
10711         attr_no_prologue_p fields.
10712         * config/nds32/nds32.opt (mret-in-naked-func): New option.
10714 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
10716         PR target/85918
10717         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
10718         attributes.
10719         * config/i386/sse.md
10720         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
10721         Rename to ...
10722         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
10723         ... this.
10724         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
10725         Rename to ...
10726         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
10727         ... this.
10728         (*<floatsuffix>floatv2div2sf2): Rename to ...
10729         (*float<floatunssuffix>v2div2sf2): ... this.
10730         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
10731         (float<floatunssuffix>v2div2sf2_mask): ... this.
10732         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
10733         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
10734         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
10735         to ...
10736         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
10737         ... this.
10738         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10739         Rename to ...
10740         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
10741         ... this.
10742         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10743         Rename to ...
10744         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
10745         ... this.
10746         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
10747         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
10748         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
10749         gen_ufix_truncv8dfv8si2.
10750         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
10751         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
10752         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
10753         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
10754         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
10755         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
10756         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
10757         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
10759 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
10761         PR target/85900
10762         PR target/85345
10763         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
10765 2018-05-25  Jim Wilson  <jimw@sifive.com>
10767         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
10768         * config/riscv/riscv.c (struct machine_function): Add
10769         interrupt_handler_p and attribute_checked_p fields.
10770         (riscv_attribute_table): Add interrupt.
10771         (riscv_interrupt_type_p): New.
10772         (riscv_save_reg_p): Save extra regs for interrupt handler.
10773         (riscv_use_save_libcall): Return false  for interrupt handler.
10774         (riscv_first_stack_step): Add forward declaration.
10775         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
10776         for interrupt handler with large frame.  Use it for saved reg list.
10777         (riscv_expand_prologue): Move flag_stack_usage_info support to
10778         eliminate duplication.
10779         (riscv_expand_epilogue): Generate mret for interrupt handler.
10780         (riscv_epilogue_uses): New.
10781         (riscv_can_use_return_insn): Return false for interrupt handler.
10782         (riscv_function_ok_for_sibcall): Likewise.
10783         (riscv_set_current_function): Add interrupt handler support.
10784         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
10785         * config/riscv/riscv.md (UNSPECV_MRET): New.
10786         (GP_REGNUM): New.
10787         (riscv_frflags, riscv_fsflags): Use tab after opcode.
10788         (riscv_mret): New.
10789         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
10791 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
10793         PR tree-optimization/85712
10794         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
10795         this candidate has already been replaced in-situ by a copy.
10797 2018-05-25  Jason Merrill  <jason@redhat.com>
10799         PR c++/80485 - inline function non-zero address.
10800         * symtab.c (nonzero_address): Check DECL_COMDAT.
10802 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
10804         PR target/83628
10805         * config/alpha/alpha.md (ashlsi3): New insn pattern.
10806         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
10807         extension of SImode operation.  Use const123_operand predicate.
10808         (*saddsi_1): Remove.
10809         (*saddl_se_1): Ditto.
10810         (*ssubsi_1): Ditto.
10811         (*ssubl_se_1): Ditto.
10812         * config/alpha/predicates.md (const123_operand): New predicate.
10813         * config/alpha/constraints.md (P): Use IN_RANGE.
10815 2018-05-25  Richard Biener  <rguenther@suse.de>
10817         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
10818         defaulted to true.
10819         (ref_maybe_used_by_stmt_p): Likewise.
10820         (stmt_may_clobber_ref_p): Likewise.
10821         (stmt_may_clobber_ref_p_1): Likewise.
10822         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
10823         and pass it along.
10824         (ref_maybe_used_by_stmt_p): Likewise.
10825         (stmt_may_clobber_ref_p): Likewise.
10826         (stmt_may_clobber_ref_p_1): Likewise.
10827         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
10828         the alias oracle to disambiguate DRs with stmts DR analysis
10829         couldn't handle.
10830         (vect_analyze_data_refs): Do not give up on not analyzable
10831         DRs for BB vectorization.  Remove code truncating the dataref
10832         vector.
10834 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
10836         PR target/85832
10837         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10838         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
10839         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
10841 2018-05-25  Richard Biener  <rguenther@suse.de>
10843         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
10844         function, combining stmt data ref gathering and fatal analysis
10845         parts.
10846         (vect_analyze_data_refs): Remove now redudnant code and simplify.
10847         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
10848         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
10849         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
10850         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
10852 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10854         PR tree-optimization/85720
10855         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
10856         SCC if all partitions are builtins.
10857         (version_loop_by_alias_check): New parameter.  Generate cancelable
10858         runtime alias check if all partitions are builtins.
10859         (distribute_loop): Update call to above function.
10861 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10863         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
10864         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
10865         (parm_default_def_partition_arg): Ditto.
10866         (set_parm_default_def_partition): Ditto.
10867         (get_parm_default_def_partitions): Ditto and make it static.
10868         (get_undefined_value_partitions): Ditto and make it static.
10869         (remove_ssa_form): Refactor call to init_var_map here.
10870         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
10871         computation for loop region.
10872         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
10873         (register_default_def): Delete.
10874         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
10875         (parm_default_def_partition_arg): Ditto.
10876         (set_parm_default_def_partition): Ditto.
10877         (get_parm_default_def_partitions): Ditto and make it static.
10878         (get_undefined_value_partitions): Ditto and make it static.
10879         (coalesce_with_default, coalesce_with_default): Update comment.
10880         (create_coalesce_list_for_region): New func factored out from
10881         create_outofssa_var_map.
10882         (populate_coalesce_list_for_outofssa): New func factored out from
10883         create_outofssa_var_map and coalesce_ssa_name.
10884         (create_outofssa_var_map): Delete.
10885         (coalesce_ssa_name): Refactor to support live range computation.
10886         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
10887         (get_parm_default_def_partitions): Delete.
10888         (get_undefined_value_partitions): Ditto.
10889         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
10890         computation for loop region.
10891         (new_tree_live_info, loe_visit_block): Ditto.
10892         (live_worklist, set_var_live_on_entry): Ditto.
10893         (calculate_live_on_exit, verify_live_on_entry): Ditto.
10894         * tree-ssa-live.h (struct _var_map): New fields.
10895         (init_var_map): Change decl.
10896         (region_contains_p): New.
10898 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
10900         * tree-ssa-live.h (live_merge_and_clear): Delete.
10902 2018-05-25  Richard Biener  <rguenther@suse.de>
10904         PR c++/85912
10905         * tree-dump.c (dequeue_and_dump): Remove access to removed
10906         operand 2 of a SWITCH_EXPR.
10908 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10910         * doc/sourcebuild.texi (vect_double_cond_arith): Include
10911         multiplication and division.
10912         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
10913         (cond_udiv@var{m}, cond_umod@var{m}): Document.
10914         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
10915         (cond_udiv_optab, cond_umod_optab): New optabs.
10916         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
10917         (IFN_COND_RDIV): New internal functions.
10918         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
10919         TRUNC_MOD_EXPR and RDIV_EXPR.
10920         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
10921         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
10922         New unspecs.
10923         (SVE_INT_BINARY): Include mult.
10924         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
10925         (optab, sve_int_op): Handle mult.
10926         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
10927         UNSPEC_COND_DIV.
10928         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
10929         for SVE_INT_BINARY_SD.
10931 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10933         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
10934         (optab, sve_int_op): Handle div and udiv.
10935         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
10936         for SVE_INT_BINARY_SD.
10937         (*<optab><mode>3): New insn for the same.
10939 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10941         * tree-vect-patterns.c: Include predict.h.
10942         (vect_recog_divmod_pattern): Restrict check for division support
10943         to when optimizing for size.
10945 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
10947         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
10948         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
10949         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
10950         (gimple_match_op::set_op): Likewise.
10951         (gimple_resimplify4): Declare.
10952         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
10953         (expr::gen_transform): Likewise.
10954         (decision_tree::gen): Generate a simplification routine for 4 operands.
10955         * gimple-match-head.c (gimple_simplify): Add an overload for
10956         4 operands.  In the top-level function, handle up to 4 call
10957         arguments and call gimple_resimplify4.
10958         (gimple_resimplify4): New function.
10959         (build_call_internal): Pass a fourth operand.
10960         (maybe_push_to_seq): Likewise.
10961         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
10962         Fold VEC_COND_EXPRs of an operation and a default value into
10963         an IFN_COND_* function if possible.
10964         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
10965         New unspecs.
10966         (SVE_COND_FP_BINARY): Include them.
10967         (optab, sve_fp_op): Handle them.
10968         (SVE_INT_BINARY_REV): New code iterator.
10969         (SVE_COND_FP_BINARY_REV): New int iterator.
10970         (commutative): New int attribute.
10971         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
10972         Declare.
10973         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
10974         function.
10975         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
10976         (*cond_<optab><mode>): New patterns for reversed operands.
10978 2018-05-25  Richard Biener  <rguenther@suse.de>
10980         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
10981         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
10982         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
10983         (STMT_VINFO_GROUPED_ACCESS): Adjust.
10984         * tree-vect-data-refs.c (everywhere): Adjust users.
10985         * tree-vect-loop.c (everywhere): Likewise.
10986         * tree-vect-slp.c (everywhere): Likewise.
10987         * tree-vect-stmts.c (everywhere): Likewise.
10988         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10990 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10992         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
10993         Rename to...
10994         (gcc_cv_as_section_exclude): ... this.
10995         Try Solaris as #exclude syntax.
10996         * configure: Regenerate.
10997         * config.in: Regenerate.
10998         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
10999         SECTION_EXCLUDE.
11000         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11001         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11003         * varasm.c (default_elf_asm_named_section): Don't check if
11004         HAVE_GAS_SECTION_EXCLUDE is defined.
11006 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11008         * doc/md.texi: Update the documentation of the cond_* optabs
11009         to mention the new final operand.  Fix GET_MODE_NUNITS call.
11010         Describe the scalar case too.
11011         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11012         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11013         instead of 2.
11014         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11015         (get_conditional_internal_fn): Update comment.
11016         * tree-vect-loop.c (vectorizable_reduction): Pass the original
11017         accumulator value as a final argument to conditional functions.
11018         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11019         a define_expand and add an "else" operand.  Assert for now that
11020         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
11021         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11022         (*cond_<optab><mode>): New patterns.
11023         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11024         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11025         (UNSPEC_COND_EOR): Delete.
11026         (optab): Remove associated mappings.
11027         (SVE_INT_BINARY): New code iterator.
11028         (sve_int_op): Remove int attribute and add "minus" to the code
11029         attribute.
11030         (SVE_COND_INT_OP): Delete.
11031         (SVE_COND_FP_OP): Rename to...
11032         (SVE_COND_FP_BINARY): ...this.
11034 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11036         * optabs.c (can_reuse_operands_p): New function.
11037         (maybe_legitimize_operands): Try to reuse the results for
11038         earlier operands.
11040 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11042         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11043         Add {q} suffix to insn mnemonic.
11045 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11047         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11048         (msp430_warn_func_return): New.
11050 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
11052         * fold-const.c (tree_nonzero_bits): New function.
11053         * fold-const.h (tree_nonzero_bits): Likewise.
11054         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11055         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11057 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11059         PR target/85900
11060         PR target/85345
11061         * varasm.c (assemble_alias): Check ifunc_resolver only on
11062         FUNCTION_DECL.
11064 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11066         PR target/85903
11067         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11068         when memory input operand is handled.
11070 2018-05-24  Luis Machado  <luis.machado@linaro.org>
11072         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11073         global.
11074         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11076 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11078         * match.pd: Delay FMA folds until after vectorization.
11080 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11082         PR target/83009
11083         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11084         address check not strict.
11086 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11088         * gimple-match.h (gimple_match_op): New class.
11089         (mprts_hook): Replace parameters with a gimple_match_op *.
11090         (maybe_build_generic_op): Likewise.
11091         (gimple_simplified_result_is_gimple_val): Replace parameters with
11092         a const gimple_match_op *.
11093         (gimple_simplify): Replace code_helper * and tree * parameters with
11094         a gimple_match_op * parameter.
11095         (gimple_resimplify1): Replace code_helper *, tree and tree *
11096         parameters with a gimple_match_op * parameter.
11097         (gimple_resimplify2): Likewise.
11098         (gimple_resimplify3): Likewise.
11099         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11100         parameters with a gimple_match_op * parameter.
11101         * gimple-match-head.c (gimple_simplify): Change prototypes of
11102         auto-generated functions to take a gimple_match_op * instead of
11103         separate code_helper * and tree * parameters.  Make the same
11104         change in the top-level overload and update calls to the
11105         gimple_resimplify routines.  Update calls to the auto-generated
11106         functions and to maybe_push_res_to_seq in the publicly-facing
11107         operation-specific gimple_simplify overloads.
11108         (gimple_match_op::MAX_NUM_OPS): Define.
11109         (gimple_resimplify1): Replace rcode and ops with a single res_op
11110         parameter.  Update call to gimple_simplify.
11111         (gimple_resimplify2): Likewise.
11112         (gimple_resimplify3): Likewise.
11113         (mprts_hook): Replace parameters with a gimple_match_op *.
11114         (maybe_build_generic_op): Likewise.
11115         (build_call_internal): Replace type, nargs and ops with
11116         a gimple_match_op *.
11117         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11118         with a single gimple_match_op *.  Update calls to mprts_hook,
11119         build_call_internal and gimple_simplified_result_is_gimple_val.
11120         Factor out code that is common to the tree_code and combined_fn cases.
11121         * genmatch.c (expr::gen_transform): Replace tem_code and
11122         tem_ops with a gimple_match_op called tem_op.  Update calls
11123         to the gimple_resimplify functions and maybe_push_res_to_seq.
11124         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11125         res_ops.  Update call to the gimple_resimplify functions.
11126         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11127         (decision_tree::gen): Make the functions take a gimple_match_op *
11128         called res_op instead of separate res_code and res_ops parameters.
11129         Update call accordingly.
11130         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11131         and ops with a single res_op parameter.  Update calls to
11132         maybe_build_generic_op and maybe_push_res_to_seq.
11133         (fold_stmt_1): Update calls to gimple_simplify and
11134         replace_stmt_with_simplification.
11135         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11136         and gimple_simplified_result_is_gimple_val.
11137         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11138         gimple_simplify.
11139         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11140         with a gimple_match_op *.
11141         (vn_nary_build_or_lookup): Likewise.  Update call to
11142         vn_nary_build_or_lookup_1.
11143         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11144         gimple_match_op *.  Update calls to the gimple_resimplify routines
11145         and to gimple_simplified_result_is_gimple_val.
11146         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11147         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11148         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11149         (visit_nary_op): Likewise.
11150         (visit_reference_op_load): Likewise.
11152 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11154         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11155         modifier for printing the step amount.
11157 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
11159         PR target/78849
11160         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11161         types.
11163 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
11165         * doc/sourcebuild.texi (Endianness): New subsubsection.
11167 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11169         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11170         <prefetch_dynamic_strides>: New const bool field.
11171         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11172         prefetch_dynamic_strides.
11173         (exynosm1_prefetch_tune): Likewise.
11174         (thunderxt88_prefetch_tune): Likewise.
11175         (thunderx_prefetch_tune): Likewise.
11176         (thunderx2t99_prefetch_tune): Likewise.
11177         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11178         false.
11179         (aarch64_override_options_internal): Update to set
11180         PARAM_PREFETCH_DYNAMIC_STRIDES.
11181         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11182         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11183         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11184         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11185         prefetch-dynamic-strides setting.
11187 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11189         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11190         <minimum_stride>: New const int field.
11191         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11192         minimum_stride field defaulting to -1.
11193         (exynosm1_prefetch_tune): Likewise.
11194         (thunderxt88_prefetch_tune): Likewise.
11195         (thunderx_prefetch_tune): Likewise.
11196         (thunderx2t99_prefetch_tune): Likewise.
11197         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11198         <default_opt_level>: Set to 3.
11199         (aarch64_override_options_internal): Update to set
11200         PARAM_PREFETCH_MINIMUM_STRIDE.
11201         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11202         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11203         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11204         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11205         stride is constant and is below the minimum stride threshold.
11207 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11209         * config/arm/arm-cpus.in (mode26): Delete.
11210         (armv4): Delete mode26 reference.
11211         * config/arm/arm.c (arm_configure_build_target): Delete use of
11212         isa_bit_mode26.
11214 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11216         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11217         New insn pattern.
11218         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11219         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
11220         for non-SSE modes.
11221         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
11222         (floatunsdidf2): Ditto.
11224 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11226         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11227         (fixuns_trunc<mode>si2_avx512f): Ditto.
11228         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11229         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11230         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11232 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11234         PR rtl-optimization/79985
11235         * df-scan.c (df_insn_refs_collect): Remove special case for
11236         global registers and asm statements.
11238 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11240         * extend.texi (Global Register Variables): Rewrite the bullet list.
11241         Note that the register is available for allocation. Note that access
11242         via inline asm must use constraints. Add note about async-signal
11243         handlers. Remove paragraph about automagic register selection.
11245 2018-05-23  Richard Biener  <rguenther@suse.de>
11247         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11248         of fixed offset from memset VN.
11250 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
11252         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11253         first_interp field.
11254         (alloc_cand_and_find_basis): Initialize first_interp field.
11255         (slsr_process_mul): Modify first_interp field.
11256         (slsr_process_add): Likewise.
11257         (slsr_process_cast): Modify first_interp field for each new
11258         interpretation.
11259         (slsr_process_copy): Likewise.
11260         (dump_candidate): Dump first_interp field.
11261         (replace_mult_candidate): Process all interpretations, not just
11262         subsequent ones.
11263         (replace_rhs_if_not_dup): Likewise.
11264         (replace_one_candidate): Likewise.
11266 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
11268         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11269         Add new boolean.
11270         (aarch64_needs_frame_chain): New function.
11271         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11273 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
11275         PR target/84882
11276         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11277         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11278         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11279         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11280         as true for strict-align.
11281         (aarch64_can_inline_p): Perform checks even when callee has no
11282         attributes to check for strict alignment.
11283         * doc/extend.texi (AArch64 Function Attributes): Document
11284         no-strict-align.
11285         * doc/invoke.texi: (AArch64 Options): Likewise.
11287 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
11289         PR tree-optimization/85853
11290         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11291         the handling of the root of the node to...
11292         (vect_slp_analyze_node_operations_1): ...this new function,
11293         and run the whole thing with the child nodes' def types
11294         set according to their SLP node's def type.
11296 2018-05-23  Richard Biener  <rguenther@suse.de>
11298         PR middle-end/85874
11299         * tree-data-ref.c (create_runtime_alias_checks): Defer
11300         and ignore overflow warnings.
11302 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
11304         PR tree-optimization/85822
11305         * tree-vrp.c (is_masked_range_test): Fix handling of negative
11306         constants.
11308 2018-05-23  Richard Biener  <rguenther@suse.de>
11310         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11311         memset constants via native_interpret_expr.
11313 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
11315         PR target/85345
11316         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11317         attribute.
11318         (cgraph_node::create_alias): Likewise.
11319         (cgraph_node::get_availability): Check ifunc_resolver instead
11320         of looking up ifunc attribute.
11321         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11322         * varasm.c (do_assemble_alias): Likewise.
11323         (assemble_alias): Likewise.
11324         (default_binds_local_p_3): Likewise.
11325         * cgraph.h (cgraph_node): Add ifunc_resolver.
11326         (cgraph_node::only_called_directly_or_aliased_p): Return false
11327         for IFUNC resolver.
11328         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11329         attribute.
11330         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11331         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11332         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11333         instead of looking up ifunc attribute.
11335 2018-05-22  Luis Machado  <luis.machado@linaro.org>
11337         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11339 2018-05-22  Martin Sebor  <msebor@redhat.com>
11341         PR middle-end/85359
11342         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11343         only when expasion succeeds.
11344         (expand_builtin_strcmp): Same.
11345         (expand_builtin_strncmp): Same.
11347 2018-05-22  Martin Sebor  <msebor@redhat.com>
11349         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11351 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11352             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11354         * config/aarch64/aarch64-ldpstp.md: Replace uses of
11355         aarch64_mem_pair_operand with memory_operand and delete operand swapping
11356         code.
11357         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11358         Add check for legitimate_address.
11359         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11360         (aarch64_swap_ldrstr_operands): New.
11361         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11362         Define prototype.
11364 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11365             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11367         * config/aarch64/aarch64.md: New patterns to generate stp
11368         and ldp.
11369         (store_pair_sw, store_pair_dw): New patterns to generate stp for
11370         single words and double words.
11371         (load_pair_sw, load_pair_dw): Likewise.
11372         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11373         Delete.
11374         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11375         Delete.
11376         * config/aarch64/aarch64-ldpstp.md: Modify peephole
11377         for different mode ldpstp and add peephole for merged zero stores.
11378         Likewise for loads.
11379         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11380         Add size check.
11381         (aarch64_gen_store_pair): Rename calls to match new patterns.
11382         (aarch64_gen_load_pair): Rename calls to match new patterns.
11383         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11384         (load_pair<DREG:mode><DREG2:mode>): ... This.
11385         (store_pair<mode>): Rename to...
11386         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11387         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11388         New mode iterators.
11389         (V_INT_EQUIV): Handle SImode.
11390         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11391         New predicate.
11393 2018-05-22  Martin Sebor  <msebor@redhat.com>
11395         PR c/85623
11396         * calls.c (maybe_warn_nonstring_arg): Use string length to set
11397         or ajust the presumed bound on an operation to avoid unnecessary
11398         warnings.
11400 2018-05-22  Martin Sebor  <msebor@redhat.com>
11402         PR tree-optimization/85826
11403         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11404         assuming that a DECL necesarily has a constant size.
11406 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
11408         PR middle-end/85862
11409         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11411 2018-05-22  Richard Biener  <rguenther@suse.de>
11413         PR tree-optimization/85834
11414         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11415         non-constant and non-zero memset arguments.
11417 2018-05-22  Martin Liska  <mliska@suse.cz>
11419         PR ipa/85607
11420         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11422 2018-05-22  Richard Biener  <rguenther@suse.de>
11424         PR tree-optimization/85863
11425         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11426         comparisons when vectype is specified.
11427         (vectorizable_condition): Do not specify vectype for
11428         vect_is_simple_cond when SLP vectorizing.
11430 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
11432         PR target/85657
11433         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11434         define __ibm128 as long double.
11435         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11436         as a distinct type when IEEE 128-bit support is enabled.
11437         (init_float128_ieee): Fix up conversions between IFmode and IEEE
11438         128-bit types to use the correct functions.
11439         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11440         convert between 128-bit floating point types that have different
11441         modes but the same representation, instead of using gen_lowpart to
11442         makean alias.
11443         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11444         KFmode.
11445         (IFKF_reg): New attributes to give the register constraints for
11446         IFmode and KFmode.
11447         (extend<mode>tf2_internal): New insns to mark an explicit
11448         conversion between 128-bit floating point types that have a
11449         different mode but share the same representation.
11451 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
11453         PR tree-optimization/85814
11454         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11455         a null return from get_strinfo when unsharing the next
11456         strinfo in the chain.
11458 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11460         PR gcc/84923
11461         * varasm.c (weak_finish): Clean up weak_decls.
11463 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11465         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11466         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11467         UNSPEC_UADALP values.
11468         * config/aarch64/iterators.md (ABAL): New int iterator.
11469         (ABDL2): Likewise.
11470         (ADALP): Likewise.
11471         (sur): Add mappings for the above.
11472         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11473         New define_insn.
11474         (aarch64_<sur>abal<mode>_4): Likewise.
11475         (aarch64_<sur>adalp<mode>_3): Likewise.
11476         (<sur>sadv16qi): New define_expand.
11478 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
11480         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11481         (*movdf_internal): Ditto.
11482         (*rcpsf2_sse): Ditto.
11483         (*rsqrtsf2_sse): Ditto.
11484         (*sqrt<mode>2_sse): Ditto.
11486 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
11488         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11489         eor3q<mode>4.
11490         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11491         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11492         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11493         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11494         vbcaxq_s64): New.
11495         * config/aarch64/arm_neon.h: Likewise.
11496         * config/aarch64/iterators.md (VQ_I): New.
11498 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
11500         * config.gcc: Add arc/t-multilib-linux to tmake_file for
11501         arc*-*-linux*.
11502         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11503         MULTILIB_DIRNAMES
11505 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11507         * config/nds32/constraints.md (S): New constraint.
11508         * config/nds32/nds32.md (call_internal): Use constraint S.
11509         (call_value_internal): Likewise.
11510         (sibcall_internal): Likewise.
11511         (sibcall_value_internal): Likewise.
11513 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11514             Chung-Ju Wu  <jasonwucj@gmail.com>
11516         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11517         into consideration.
11519 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11520             Chung-Ju Wu  <jasonwucj@gmail.com>
11522         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11523         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11524         (nds32_rtx_costs_impl): Simplify.
11525         (nds32_address_cost_impl): Simplify.
11526         (nds32_init_rtx_costs): New function.
11527         (nds32_rtx_costs_speed_prefer): Likewise.
11528         (nds32_rtx_costs_size_prefer): Likewise.
11529         (nds32_address_cost_speed_prefer): Likewise.
11530         (nds32_address_cost_speed_fwprop): Likewise.
11531         (nds32_address_cost_size_prefer): Likewise.
11532         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11533         * config/nds32/nds32.c (nds32_option_override): Use
11534         nds32_init_rtx_costs function.
11536 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11538         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11539         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11540         (TARGET_PIPELINE_N8): Likewise.
11541         (TARGET_PIPELINE_N10): Likewise.
11542         (TARGET_PIPELINE_N13): Likewise.
11543         (TARGET_PIPELINE_GRAYWOLF): Likewise.
11545 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
11547         * config/nds32/nds32-fpu.md: Update copyright year.
11549 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11551         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11553 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11555         * config/nds32/nds32.c
11556         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11557         * config/nds32/nds32.opt (minline-asm-r15): New option.
11559 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11561         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11562         MASK_HW_ABS.
11563         * config/nds32/nds32.md (abssi2): New pattern.
11565 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
11567         * config/i386/i386.md (rex64namesuffix): New mode attribute.
11568         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11569         Merge insn pattern from sse_cvtsi2ss<round_name> and
11570         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11571         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11572         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11573         using SWI48 mode iterator.
11574         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11575         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11576         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11577         pattern from sse_cvttss2si<round_saeonly_name>
11578         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11579         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11580         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11581         using SWI48 mode iterator.
11582         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11583         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11584         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11585         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11586         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11587         using SWI48 mode iterator.
11588         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11589         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11590         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11591         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11592         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11593         SWI48 mode iterator.
11594         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11595         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11596         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11597         pattern from sse_cvttsd2si<round_saeonly_name>
11598         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11600 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11602         * config/nds32/nds32-md-auxiliary.c
11603         (nds32_valid_smw_lwm_base_p): Refine.
11604         (nds32_output_smw_single_word): Refine.
11605         (nds32_output_smw_double_word): New.
11606         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11608 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11610         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11611         (nds32_output_stack_pop): Refine.
11612         (nds32_expand_unaligned_load): Refine.
11613         (nds32_expand_unaligned_store): Refine.
11615 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
11616             Chung-Ju Wu  <jasonwucj@gmail.com>
11618         * config/nds32/constants.md: Add TP_REGNUM constant.
11619         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11620         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11621         UNSPEC_ADD32.
11622         * config/nds32/nds32-doubleword.md: Consider flag_pic.
11623         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11624         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11625         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11626         and PIC code generation.
11627         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11628         code generation.
11629         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11630         optimization.
11631         * config/nds32/nds32.md: Support TLS and PIC.
11632         * config/nds32/nds32.c: Support TLS and PIC.
11633         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11634         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11635         predicate.
11637 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11639         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11640         mode with E_ prefix.
11642 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
11643             Chung-Ju Wu  <jasonwucj@gmail.com>
11645         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11646         * config/nds32/nds32-md-auxiliary.c
11647         (symbolic_reference_mentioned_p): New.
11648         (nds32_legitimize_ict_address): New.
11649         (nds32_expand_ict_move): New.
11650         (nds32_indirect_call_referenced_p): New.
11651         (nds32_symbol_binds_local_p): Delete.
11652         (nds32_long_call_p): Modify.
11653         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
11654         * config/nds32/nds32-protos.h
11655         (symbolic_reference_mentioned_p): Declare.
11656         (nds32_legitimize_ict_address): Declare.
11657         (nds32_expand_ict_move): Declare.
11658         (nds32_indirect_call_referenced_p): Declare.
11659         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
11660         (nds32_relax_group): Use nds32_ict_const_p as condition.
11661         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
11662         (nds32_asm_file_start): Output ict_model directive in asm code.
11663         (nds32_legitimate_address_p): Consider indirect call.
11664         (nds32_print_operand): Consider indirect call.
11665         (nds32_print_operand_address): Consider indirect call.
11666         (nds32_insert_attributes): Handle "indirect_call" attribute.
11667         (TARGET_LEGITIMATE_ADDRESS_P): Define.
11668         (TARGET_LEGITIMATE_CONSTANT_P): Define.
11669         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
11670         (TARGET_DELEGITIMIZE_ADDRESS): Define.
11671         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
11672         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
11673         (TARGET_ICT_MODEL_SMALL): Define.
11674         (TARGET_ICT_MODEL_LARGE): Define.
11675         * config/nds32/nds32.md (movsi): Consider ict model.
11676         (call, call_value): Consider ict model.
11677         (sibcall, sibcall_value): Consider ict model.
11678         * config/nds32/nds32.opt (mict-model): New option.
11679         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
11680         model.
11682 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
11683             Monk Chiang  <sh.chiang04@gmail.com>
11684             Jim Wilson <jimw@sifive.com>
11686         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
11687         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
11688         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
11689         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
11690         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
11691         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
11692         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
11693         compute save_libcall_adjustment properly.
11694         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
11695         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
11696         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
11697         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
11698         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
11699         (ABI_SPEC): Handle mabi=ilp32e.
11700         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
11701         (RVE): Add RVE mask.
11702         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
11703         <-march>: Add rv32e as an example.
11705 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
11707         PR c++/82899
11708         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
11709         (intra_create_variable_infos): Handle C++ constructors.
11711 2018-05-18  Martin Liska  <mliska@suse.cz>
11713         * passes.def: Remove a redundant pass.
11715 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
11717         PR bootstrap/85838
11718         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
11720 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11722         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
11723         (ARMv4): Update.
11724         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
11725         (ARMv6m): Update.
11726         (armv2, armv2a, armv3, armv3m): Delete architectures.
11727         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
11728         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
11729         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
11730         Delete cpus.
11731         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
11732         (*mulsidi3adddi): Likewise.
11733         (mulsidi3): Likewise.
11734         (*mulsidi3_nov6): Likewise.
11735         (umulsidi3): Likewise.
11736         (umulsidi3_nov6): Likewise.
11737         (umaddsidi4): Likewise.
11738         (*umulsidi3adddi): Likewise.
11739         (smulsi3_highpart): Likewise.
11740         (*smulsi3_highpart_nov6): Likewise.
11741         (umulsi3_highpart): Likewise.
11742         (*umulsi3_highpart_nov6): Likewise.
11743         * config/arm/arm.h (arm_arch3m): Delete.
11744         * config/arm/arm.c (arm_arch3m): Delete.
11745         (arm_option_override_internal): Update armv3-related comment.
11746         (arm_configure_build_target): Delete use of isa_bit_mode32.
11747         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
11748         (arm_rtx_costs_internal): Delete check of arm_arch3m.
11749         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
11750         (mulsa3): Likewise.
11751         (mulusa3): Likewise.
11752         * config/arm/arm-protos.h (arm_arch3m): Delete.
11753         * config/arm/arm-tables.opt: Regenerate.
11754         * config/arm/arm-tune.md: Likewise.
11755         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
11756         deleted architectures.
11758 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11760         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
11761         (armv5t, armv5te): New features.
11762         (ARMv5, ARMv5e): Delete fgroups.
11763         (ARMv5t, ARMv5te): Adjust for above changes.
11764         (ARMv6m): Likewise.
11765         (armv5, armv5e): Delete arches.
11766         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
11767         arm_arch5.
11768         (*call_reg_arm): Likewise.
11769         (*call_value_reg_armv5): Likewise.
11770         (*call_value_reg_arm): Likewise.
11771         (*call_symbol): Likewise.
11772         (*call_value_symbol): Likewise.
11773         (*sibcall_insn): Likewise.
11774         (*sibcall_value_insn): Likewise.
11775         (clzsi2): Likewise.
11776         (prefetch): Likewise.
11777         (define_split and define_peephole2 dependent on arm_arch5):
11778         Likewise.
11779         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
11780         arm_arch5e.
11781         (TARGET_ARM_QBIT): Likewise.
11782         (TARGET_DSP_MULTIPLY): Likewise.
11783         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
11784         (arm_arch5, arm_arch5e): Delete.
11785         (arm_arch5t, arm_arch5te): Declare.
11786         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
11787         (arm_arch5t): Declare.
11788         (arm_option_reconfigure_globals): Update for the above.
11789         (arm_options_perform_arch_sanity_checks): Update comment, replace
11790         use of arm_arch5 with arm_arch5t.
11791         (use_return_insn): Likewise.
11792         (arm_emit_call_insn): Likewise.
11793         (output_return_instruction): Likewise.
11794         (arm_final_prescan_insn): Likewise.
11795         (arm_coproc_builtin_available): Likewise.
11796         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
11797         arm_arch5e with arm_arch5t and arm_arch5te.
11798         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
11799         (arm_arch5t, arm_arch5te): Declare.
11800         * config/arm/arm-tables.opt: Regenerate.
11801         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
11802         * config/arm/t-multilib: Likewise.
11803         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
11804         instead of arm_arch5.
11805         (*call_reg_thumb1): Likewise.
11806         (*call_value_reg_thumb1_v5): Likewise.
11807         (*call_value_reg_thumb1): Likewise.
11808         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
11809         unreachable path.
11810         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
11812 2018-05-18  Martin Liska  <mliska@suse.cz>
11814         PR gcov-profile/84846
11815         * doc/gcov.texi: Document -t option of gcov tool.
11817 2018-05-18  Martin Liska  <mliska@suse.cz>
11819         PR gcov-profile/84846
11820         * gcov.c (print_usage): Add new -t option.
11821         (process_args): Handle the option.
11822         (generate_results): Use stdout as output when requested by
11823         the option.
11825 2018-05-18  Martin Liska  <mliska@suse.cz>
11827         PR gcov-profile/84846
11828         * coverage.c (coverage_init): Write PWD to .gcno file.
11829         * doc/gcov.texi: Document how working directory is printed.
11830         * gcov-dump.c (dump_gcov_file): Print PWD.
11831         * gcov.c (output_intermediate_file): Likewise.
11832         (read_graph_file): Read PWD string.
11833         (output_lines): Print PWD.
11835 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11837         PR middle-end/85817
11838         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
11839         for retval and return false if all args to phi are zero.
11841 2018-05-18  Richard Biener  <rguenther@suse.de>
11843         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
11844         method.
11845         (evrp_dom_walker::before_dom_children): Call it.
11847 2018-05-18  Richard Biener  <rguenther@suse.de>
11849         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
11850         results when processing array refs with variable index.
11852 2018-05-18  Toon Moene  <toon@moene.org>
11854         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
11855         directly after that of -floop-interchange. Indicate that both
11856         options are enabled by default when specifying -O3.
11858 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11860         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
11861         iterator.  Delete separate integer-mode vec_set<mode> expander.
11862         (aarch64_simd_vec_setv2di): Delete.
11863         (vec_setv2di): Delete.
11864         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
11865         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
11866         the "w, r" alternative.
11868 2018-05-18  Martin Liska  <mliska@suse.cz>
11870         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
11871         * tree-pass.h (make_pass_lower_switch_O0): New function.
11872         * tree-switch-conversion.c (node_has_low_bound): Remove.
11873         (node_has_high_bound): Likewise.
11874         (node_is_bounded): Likewise.
11875         (class pass_lower_switch): Make it a template type and create
11876         two instances.
11877         (pass_lower_switch::execute): Add template argument.
11878         (make_pass_lower_switch): New function.
11879         (make_pass_lower_switch_O0): New function.
11880         (do_jump_if_equal): Remove.
11881         (emit_case_nodes): Simplify to just handle all 3 cases and leave
11882         all the hard work to tree optimization passes.
11884 2018-05-18  Martin Liska  <mliska@suse.cz>
11886         * dbgcnt.c (limit_low): Renamed from limit.
11887         (limit_high): New variable.
11888         (dbg_cnt_is_enabled): Check for upper limit.
11889         (dbg_cnt): Adjust dumping.
11890         (dbg_cnt_set_limit_by_index): Add new argument for high
11891         value.
11892         (dbg_cnt_set_limit_by_name): Likewise.
11893         (dbg_cnt_process_single_pair): Parse new format.
11894         (dbg_cnt_process_opt): Use strtok.
11895         (dbg_cnt_list_all_counters): Remove 'value' and add
11896         'limit_high'.
11897         * doc/invoke.texi: Document changes.
11899 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
11901         * doc/sourcebuild.texi (scalar_all_fma): Document.
11902         * tree.def (FMA_EXPR): Delete.
11903         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
11904         * internal-fn.c (ternary_direct): New macro.
11905         (expand_ternary_optab_fn): Likewise.
11906         (direct_ternary_optab_supported_p): Likewise.
11907         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
11908         * builtins.c (fold_builtin_fma): Delete.
11909         (fold_builtin_3): Don't call it.
11910         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
11911         * expr.c (expand_expr_real_2): Likewise.
11912         * fold-const.c (operand_equal_p): Likewise.
11913         (fold_ternary_loc): Likewise.
11914         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
11915         * gimple.c (DEFTREECODE): Likewise.
11916         * gimplify.c (gimplify_expr): Likewise.
11917         * optabs-tree.c (optab_for_tree_code): Likewise.
11918         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
11919         * tree-eh.c (operation_could_trap_p): Likewise.
11920         (stmt_could_throw_1_p): Likewise.
11921         * tree-inline.c (estimate_operator_cost): Likewise.
11922         * tree-pretty-print.c (dump_generic_node): Likewise.
11923         (op_code_prio): Likewise.
11924         * tree-ssa-loop-im.c (stmt_cost): Likewise.
11925         * tree-ssa-operands.c (get_expr_operands): Likewise.
11926         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
11927         * fold-const-call.h (fold_fma): Delete.
11928         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
11929         CFN_FNMA and CFN_FNMS.
11930         (fold_fma): Delete.
11931         * genmatch.c (combined_fn): New enum.
11932         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
11933         (commutative_op): New function.
11934         (commutate): Use it.  Handle more than 2 operands.
11935         (dt_operand::gen_gimple_expr): Use commutative_op.
11936         (parser::parse_expr): Allow :c to be used with non-binary
11937         operators if the commutative operand is known.
11938         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
11939         CFN_FMS, CFN_FNMA and CFN_FNMS.
11940         (backprop::process_assign_use): Remove FMA_EXPR handling.
11941         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
11942         (gen_hsa_fma): New function.
11943         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
11944         IFN_FNMA and IFN_FNMS.
11945         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
11946         * gimple-fold.h (follow_all_ssa_edges): Declare.
11947         * gimple-fold.c (follow_all_ssa_edges): New function.
11948         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
11949         gimple_build interface and use follow_all_ssa_edges to fold the result.
11950         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
11951         instead of checking for optabs directly.
11952         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
11953         rather than FMA_EXPRs.
11954         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
11955         call to IFN_FMA instead of an FMA_EXPR.
11957 2018-05-17  Jim Wilson  <jimw@sifive.com>
11959         * expr.c (do_tablejump): When converting index to Pmode, if we have a
11960         sign extended promoted subreg, and the range does not have the sign bit
11961         set, then do a sign extend.
11963         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
11964         test, check for sign extended subreg and/or constant operands, and
11965         do a sign extend in that case.
11967 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
11969         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
11970         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
11971         Add untyped.
11972         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
11973         Change logics_shift_reg to logics_shift_imm.
11974         (thunderx2t99_fp_loadpair_basic): Delete.
11975         (thunderx2t99_fp_storepair_basic): Delete.
11976         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
11977         (thunderx2t99_asimd_polynomial): Delete.
11978         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
11979         and neon_fp_mul_d_scalar_q.
11980         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
11981         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
11982         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
11983         (thunderx2t99_asimd_lut): Add missing tbl types.
11984         (thunderx2t99_asimd_ext): Delete.
11985         (thunderx2t99_asimd_load1_1_mult): Delete.
11986         (thunderx2t99_asimd_load1_2_mult): Delete.
11987         (thunderx2t99_asimd_load1_ldp): New.
11988         (thunderx2t99_asimd_load1): New.
11989         (thunderx2t99_asimd_load2): Add missing *load2* types.
11990         (thunderx2t99_asimd_load3): New.
11991         (thunderx2t99_asimd_load4): New.
11992         (thunderx2t99_asimd_store1_1_mult): Delete.
11993         (thunderx2t99_asimd_store1_2_mult): Delete.
11994         (thunderx2t99_asimd_store2_mult): Delete.
11995         (thunderx2t99_asimd_store2_onelane): Delete.
11996         (thunderx2t99_asimd_store_stp): New.
11997         (thunderx2t99_asimd_store1): New.
11998         (thunderx2t99_asimd_store2): New.
11999         (thunderx2t99_asimd_store3): New.
12000         (thunderx2t99_asimd_store4): New.
12002 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
12004         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12005         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
12007 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
12008             Segher Boessenkool  <segher@kernel.crashing.org>
12010         PR target/85698
12011         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12012         operand.
12014 2018-05-17  Richard Biener  <rguenther@suse.de>
12016         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12017         for pruning loop and prune defs feeding only already visited PHIs.
12019 2018-05-17  Richard Biener  <rguenther@suse.de>
12021         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12023 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
12024             Richard Biener  <rguenther@suse.de>
12026         PR tree-optimization/85793
12027         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12028         for VMAT_ELEMENTWISE.
12030 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12032         * internal-fn.h (lookup_internal_fn): Declare
12033         * internal-fn.c (lookup_internal_fn): New function.
12034         * gimple.c (gimple_build_call_from_tree): Handle calls to
12035         internal functions.
12036         * gimple-pretty-print.c (dump_gimple_call): Print "." before
12037         internal function names.
12038         * tree-pretty-print.c (dump_generic_node): Likewise.
12039         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12041 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12043         * gimple-fold.h (gimple_build): Make the function forms take
12044         combined_fn rather than built_in_function.
12045         (gimple_simplify): Likewise.
12046         * gimple-match-head.c (gimple_simplify): Likewise.
12047         * gimple-fold.c (gimple_build): Likewise.
12048         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12049         rather than gimple_build_call_internal.
12050         (get_initial_defs_for_reduction): Likewise.
12051         (vect_create_epilog_for_reduction): Likewise.
12052         (vectorizable_live_operation): Likewise.
12054 2018-05-17  Martin Liska  <mliska@suse.cz>
12056         * gimple-ssa-sprintf.c (format_directive): Do not use
12057         space in between 'G_' and '('.
12059 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
12061         PR target/85323
12062         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12063         even if the mask is not all ones.
12065         PR target/85323
12066         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12067         vector.
12068         (ix86_gimple_fold_builtin): Likewise.
12070         PR target/85323
12071         * config/i386/i386.c: Include tree-vector-builder.h.
12072         (ix86_vector_shift_count): New function.
12073         (ix86_fold_builtin): Fold shift builtins by scalar count.
12074         (ix86_gimple_fold_builtin): Likewise.
12076         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12077         _mm512_setzero): New intrinsics.
12079 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
12080             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12082         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12083         code generation for cases where splatting a value is not useful.
12084         * simplify-rtx.c (simplify_ternary_operation): Simplify
12085         vec_merge across a vec_duplicate and a paradoxical subreg forming
12086         a vector mode to a vec_concat.
12088 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
12090         * config.gcc: Support "goldmont-plus".
12091         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12092         "goldmont-plus".
12093         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12094         PROCESSOR_GOLDMONT_PLUS.
12095         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12096         (processor_target_table): Add "goldmont-plus".
12097         (PTA_GOLDMONT_PLUS): Define.
12098         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12099         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12100         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12101         (fold_builtin_cpu): Add "goldmont-plus".
12102         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12103         (ix86_option_override_internal): Add "goldmont-plus".
12104         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12105         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12106         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12107         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12109 2018-05-17  Richard Biener  <rguenther@suse.de>
12111         PR tree-optimization/85757
12112         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12113         remove defs that only feed that PHI from further processing.
12115 2018-05-16  Jim Wilson  <jimw@sifive.com>
12117         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12118         asterisk to name.
12119         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12121 2018-05-16  Mark Wielaard  <mark@klomp.org>
12123         * dwarf2out.c (count_index_strings): New function.
12124         (output_indirect_strings): Call count_index_strings and generate
12125         header for dwarf_version >= 5.
12127 2018-05-16  Mark Wielaard  <mark@klomp.org>
12129         * dwarf2out.c (dwarf_FORM): New function.
12130         (set_indirect_string): Use dwarf_FORM.
12131         (reset_indirect_string): Likewise.
12132         (size_of_die): Likewise.
12133         (value_format): Likewise.
12134         (output_die): Likewise.
12135         (add_skeleton_AT_string): Likewise.
12136         (output_macinfo_op): Likewise.
12137         (index_string): Likewise.
12138         (output_index_string_offset): Likewise.
12139         (output_index_string): Likewise.
12140         (count_index_strings): Likewise.
12142 2018-05-16  Carl Love  <cel@us.ibm.com>
12144         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12145         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12147 2018-05-16  Martin Jambor  <mjambor@suse.cz>
12149         * ipa-prop.c (ipa_free_all_edge_args): Remove.
12150         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12152 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
12154         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12155         (fnma<mode>4): Likewise.
12156         (fms<mode>4): Likewise.
12157         (fnms<mode>4): Likewise.
12158         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12159         (aarch64_fnma<mode>4): Likewise.
12160         (aarch64_fms<mode>4): Likewise.
12161         (aarch64_fnms<mode>4): Likewise.
12162         (aarch64_fnmadd<mode>4): Likewise.
12164 2018-05-16  Jason Merrill  <jason@redhat.com>
12166         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
12168 2018-05-16  Richard Biener  <rguenther@suse.de>
12170         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12171         (dump_stmt_cost): Declare.
12172         (add_stmt_cost): Dump cost we add.
12173         (add_stmt_costs): New function.
12174         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12175         No longer exported.
12176         (vect_analyze_stmt): Adjust prototype.
12177         (vectorizable_condition): Likewise.
12178         (vectorizable_live_operation): Likewise.
12179         (vectorizable_reduction): Likewise.
12180         (vectorizable_induction): Likewise.
12181         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12182         cost vector to pass to vectorizable_ and record afterwards.
12183         (vect_model_reduction_cost): Take cost vector argument and adjust.
12184         (vect_model_induction_cost): Likewise.
12185         (vectorizable_reduction): Likewise.
12186         (vectorizable_induction): Likewise.
12187         (vectorizable_live_operation): Likewise.
12188         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12189         SLP_TREE_NUMBER_OF_VEC_STMTS.
12190         (vect_analyze_slp_cost_1): Remove.
12191         (vect_analyze_slp_cost): Likewise.
12192         (vect_slp_analyze_node_operations): Take visited args and
12193         a target cost vector.  Avoid processing already visited stmt sets.
12194         (vect_slp_analyze_operations): Use a local cost vector to gather
12195         costs and register those of non-discarded instances.
12196         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12197         (vect_schedule_slp_instance): Remove copying of
12198         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
12199         zero.
12200         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12201         adding cost.  Record cost entry location.
12202         (vect_prologue_cost_for_slp_op): Function to compute cost of
12203         a constant or invariant generated for SLP vect in the prologue,
12204         split out from vect_analyze_slp_cost_1.
12205         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
12206         (vect_model_promotion_demotion_cost): Likewise.
12207         (vect_model_store_cost): Likewise, make static.
12208         (vect_model_load_cost): Likewise.
12209         (vectorizable_bswap): Add cost vector arg and adjust.
12210         (vectorizable_call): Likewise.
12211         (vectorizable_simd_clone_call): Likewise.
12212         (vectorizable_conversion): Likewise.
12213         (vectorizable_assignment): Likewise.
12214         (vectorizable_shift): Likewise.
12215         (vectorizable_operation): Likewise.
12216         (vectorizable_store): Likewise.
12217         (vectorizable_load): Likewise.
12218         (vectorizable_condition): Likewise.
12219         (vectorizable_comparison): Likewise.
12220         (can_vectorize_live_stmts): Likewise.
12221         (vect_analyze_stmt): Likewise.
12222         (vect_transform_stmt): Adjust calls to vectorizable_*.
12223         * tree-vectorizer.c: Include gimple-pretty-print.h.
12224         (dump_stmt_cost): New function.
12226 2018-05-16  Richard Biener  <rguenther@suse.de>
12228         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12229         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12230         * tree-ssa-dse.c: Include tree-ssa-loop.h.
12231         (check_name): New callback.
12232         (dse_classify_store): Track cycles via a visited bitmap of PHI
12233         defs and simplify handling of in-loop and across loop dead stores
12234         and properly fail for loop-variant refs.  Handle byte-tracking with
12235         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12236         limiting the walk.
12238 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
12240         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12241         (vect_get_mask_type_for_stmt): Likewise.
12242         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12243         split out from...
12244         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
12245         to determine the statement's vector type and the vector type that
12246         should be used for calculating nunits.  Deal with cases in which
12247         the type has to be deferred.
12248         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12249         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12250         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12251         (vect_determine_vf_for_stmt): New functions, split out from...
12252         (vect_determine_vectorization_factor): ...here.
12253         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12254         (vect_get_mask_type_for_stmt): New functions, split out from
12255         vect_determine_vectorization_factor.
12257 2018-05-16  Richard Biener  <rguenther@suse.de>
12259         * tree-cfg.c (verify_gimple_assign_ternary): Properly
12260         verify the [VEC_]COND_EXPR embedded comparison.
12262 2018-05-15  Martin Sebor  <msebor@redhat.com>
12264         PR tree-optimization/85753
12265         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12266         RECORD_TYPE in addition to ARRAY_TYPE.
12268 2018-05-15  Martin Sebor  <msebor@redhat.com>
12270         PR middle-end/85643
12271         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12273 2018-05-15  Richard Biener  <rguenther@suse.de>
12275         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12276         add by_clobber_p one.  Change algorithm to collect all defs
12277         representing uses we need to walk and try reducing them to
12278         a single one before failing.
12279         (dse_dom_walker::dse_optimize_stmt): Adjust.
12281 2018-05-13  Mark Wielaard  <mark@klomp.org>
12283         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12284         (size_of_loc_descr): Likewise.
12285         (output_loc_operands): Likewise.
12286         (output_loc_operands_raw): Likewise.
12287         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12288         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12289         (hash_loc_operands): Likewise.
12290         (compare_loc_operands): Likewise.
12292 2018-05-14  Mark Wielaard  <mark@klomp.org>
12294         * dwarf2out.c (count_index_addrs): New function.
12295         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12297 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12299         PR tree-optimization/83648
12300         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12301         return value as malloc candidate.
12303 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12305         PR ipa/85734
12306         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12307         param as true in call to suggest_attribute.
12309 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
12311         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12312         -mreadonly-in-sdata.
12314 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12316         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12317         New pattern.
12318         (aarch64_crypto_aesd_fused): Likewise.
12320 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
12322         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12323         (movsi_aarch64): Likewise.
12324         (load_pairsi): Likewise.
12325         (load_pairdi): Likewise.
12326         (store_pairsi): Likewise.
12327         (store_pairdi): Likewise.
12328         (load_pairsf): Likewise.
12329         (load_pairdf): Likewise.
12330         (store_pairsf): Likewise.
12331         (store_pairdf): Likewise.
12332         (zero_extend): Likewise.
12333         (trunc): Swap alternatives.
12334         (fcvt_target): Add '?' to prefer w over r.
12336 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
12338         PR target/85756
12339         * config/i386/i386.md: Disallow non-commutative arithmetics in
12340         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12341         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
12342         in the peephole2 before it.
12344 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
12346         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12347         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12348         (ix86_handle_option): Handle -mcldemote.
12349         * config.gcc: New header.
12350         * config/i386/cldemoteintrin.h: New file.
12351         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12352         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12353         -mcldemote.
12354         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12355         OPTION_MASK_ISA_CLDEMOTE.
12356         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12357         (ix86_valid_target_attribute_inner_p): Ditto.
12358         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12359         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12360         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12361         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12362         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12363         (cldemote): New.
12364         * config/i386/i386.opt: Add -mcldemote.
12365         * config/i386/x86intrin.h: New header.
12366         * doc/invoke.texi: Add -mcldemote.
12368 2018-05-14  Richard Biener  <rguenther@suse.de>
12370         * doc/match-and-simplify.texi: Adjust :s documentation.
12372 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
12374         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12375         intended memcpy size.
12376         (REORDER_45): Likewise.
12378 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
12380         * sort.cc: New file.
12381         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12382         * vec.c (qsort_chk): Use gcc_qsort.
12383         * Makefile.in (OBJS-libcommon): Add sort.o.
12384         (build/sort.o): New target.  Use it...
12385         (BUILD_RTL): ... here, and...
12386         (build/gencfn-macros): ... here, and...
12387         (build/genmatch): ... here.
12389 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12390             Chung-Ju Wu  <jasonwucj@gmail.com>
12392         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12393         * config/nds32/nds32-graywolf.md: New file.
12394         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12395         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12396         pipeline.
12397         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12398         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12399         * config/nds32/nds32.md (pipeline_model): Add graywolf.
12400         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12401         * config/nds32/pipelines.md: Include n15 settings.
12403 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12404             Chung-Ju Wu  <jasonwucj@gmail.com>
12406         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12407         * config/nds32/nds32-n13.md: New file.
12408         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12409         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12410         pipeline.
12411         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12412         * config/nds32/nds32.md (pipeline_model): Add n13.
12413         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12414         * config/nds32/pipelines.md: Include n13 settings.
12416 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12417             Chung-Ju Wu  <jasonwucj@gmail.com>
12419         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12420         * config/nds32/nds32-n10.md: New file.
12421         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12422         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12423         pipeline.
12424         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12425         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12426         * config/nds32/nds32.md (pipeline_model): Add n10.
12427         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12428         * config/nds32/pipelines.md: Include n10 settings.
12430 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
12431             Kito Cheng  <kito.cheng@gmail.com>
12432             Chung-Ju Wu  <jasonwucj@gmail.com>
12434         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12435         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12436         Add enum values for DSP extension instructions.
12437         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12438         New constraints.
12439         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12440         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12441         New code iterators.
12442         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12443         * config/nds32/nds32-dspext.md: New file for DSP implementation.
12444         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12445         * config/nds32/nds32-intrinsic.md: Likewise.
12446         * config/nds32/nds32_intrinsic.h: Likewise.
12447         * config/nds32/nds32-md-auxiliary.c: Likewise.
12448         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12449         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12450         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12451         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12452         * config/nds32/nds32-protos.h: New declarations for DSP extension.
12453         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12454         TYPE_DMAC in switch statement.
12455         * config/nds32/nds32.c: New checking and implementation for DSP
12456         extension instructions.
12457         * config/nds32/nds32.h: Likewise.
12458         * config/nds32/nds32.md: Likewise.
12459         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12460         * config/nds32/predicates.md: Implement new predicates for DSP
12461         extension.
12463 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
12465         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12466         Reformat alternatives and attributes so it is easier to identify
12467         which constraints/attributes go with which instruction.
12468         (mov<mode>_hardfloat32, FMOVE64): Likewise.
12469         (mov<mode>_softfloat32, FMOVE64): Likewise.
12470         (mov<mode>_hardfloat64, FMOVE64): Likewise.
12471         (mov<mode>_softfloat64, FMOVE64): Likewise.
12473 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12475         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12476         subsection.
12477         (Basic PowerPC Built-in Functions): The new name of the
12478         subsection previously known as "PowerPC Built-in Functions".
12479         (Basic PowerPC Built-in Functions Available on all Configurations):
12480         New subsubsection.
12481         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12482         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12483         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12484         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12486 2018-05-11  Martin Jambor  <mjambor@suse.cz>
12488         PR ipa/85655
12489         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12490         single const.
12492 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12494         PR target/85733
12495         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12497 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
12499         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12500         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12501         (ix86_handle_option): Handle -mwaitpkg.
12502         * config.gcc: New header.
12503         * config/i386/cpuid.h (bit_WAITPKG): New bit.
12504         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12505         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12506         function type.
12507         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12508         OPTION_MASK_ISA_WAITPKG.
12509         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12510         (ix86_option_override_internal): Add PTA_WAITPKG.
12511         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12512         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12513         IX86_BUILTIN_TPAUSE.
12514         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12515         __builtin_ia32_umwait and __builtin_ia32_tpause.
12516         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12517         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12518         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12519         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12520         UNSPECV_TPAUSE): New.
12521         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12522         * config/i386/i386.opt: Add -mwaitpkg.
12523         * config/i386/waitpkgintrin.h: New file.
12524         * config/i386/x86intrin.h: New header.
12525         * doc/invoke.texi: Add -mwaitpkg.
12527 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12529         PR target/85606
12530         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12531         equivalent.
12532         (cortex-m0): Use armv6s-m isa.
12533         (cortex-m0plus): Likewise.
12534         (cortex-m1): Likewise.
12535         (cortex-m0.small-multiply): Likewise.
12536         (cortex-m0plus.small-multiply): Likewise.
12537         (cortex-m1.small-multiply): Likewise.
12539 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
12540             Jakub Jelinek  <jakub@redhat.com>
12542         PR tree-optimization/85692
12543         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12544         source permute as well.
12546 2018-05-11  Martin Liska  <mliska@suse.cz>
12548         PR sanitizer/85556
12549         * doc/extend.texi: Document LLVM style format for no_sanitize
12550         attribute.
12552 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12554         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12555         mode_supports_vsx_dform_quad to mode_supports_dq_form.
12556         (mode_supports_vsx_dform_quad): Likewise.
12557         (mode_supports_vmx_dform): Move these functions to be next to the
12558         other mode_supports functions.
12559         (mode_supports_dq_form): Likewise.
12560         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12561         mode_supports_dq_form.
12562         (reg_offset_addressing_ok_p): Likewise.
12563         (offsettable_ok_by_alignment): Likewise.
12564         (rs6000_legitimate_offset_address_p): Likewise.
12565         (legitimate_lo_sum_address_p): Likewise.
12566         (rs6000_legitimize_address): Likewise.
12567         (rs6000_legitimize_reload_address): Likewise.
12568         (rs6000_secondary_reload_inner): Likewise.
12569         (rs6000_preferred_reload_class): Likewise.
12570         (rs6000_output_move_128bit): Likewise.
12572 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12574         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12575         Generate SImode target register for null target.
12576         <case IX86_BUILTIN_XGETBV>: Ditto.
12577         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12578         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12580 2018-05-10  Carl Love  <cel@us.ibm.com>
12582         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12583         dcbtt and dcbtstt if operands[2] is 0.
12585 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12587         PR target/85693
12588         * config/i386/sse.md (usadv64qi): New expander.
12590 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
12592         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12593         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12594         -maltivec=be support.
12595         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12596         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12597         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12598         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12599         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12600         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12601         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12602         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12603         altivec_vsumsws): Adjust.
12604         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12605         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12606         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12607         support.
12608         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12609         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12610         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12611         (altivec_lve<VI_char>x): Delete expand.
12612         (*altivec_lve<VI_char>x_internal): Rename to...
12613         (altivec_lve<VI_char>x): ... this.
12614         (altivec_lvxl_<mode>): Delete expand.
12615         (*altivec_lvxl_<mode>_internal): Rename to ...
12616         (altivec_lvxl_<mode>): ... this.
12617         (altivec_stvxl_<mode>): Delete expand.
12618         (*altivec_stvxl_<mode>_internal): Rename to ...
12619         (altivec_stvxl_<mode>): ... this.
12620         (altivec_stve<VI_char>x): Delete expand.
12621         (*altivec_stve<VI_char>x_internal): Rename to ...
12622         (altivec_stve<VI_char>x): ... this.
12623         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12624         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12625         reduc_plus_scal_<mode>): Adjust.
12626         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12627         comment.
12628         (rs6000_cpu_cpp_builtins): Adjust.
12629         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12630         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12631         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12632         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12633         -maltivec=be support.
12634         (rs6000_split_vec_extract_var): Adjust.
12635         (rs6000_split_v4si_init): Adjust.
12636         (swap_selector_for_mode): Delete.
12637         (altivec_expand_lvx_be, altivec_expand_stvx_be,
12638         altivec_expand_stvex_be): Delete.
12639         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12640         -maltivec=be support.
12641         (rs6000_gimple_fold_builtin): Ditto.
12642         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12643         Adjust.
12644         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12645         (TARGET_DIRECT_MOVE_64BIT): Adjust.
12646         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
12647         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
12648         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
12649         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
12650         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
12651         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
12652         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
12653         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
12654         anonymous split): Adjust.
12655         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
12656         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
12658 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
12660         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
12661         when --with-gxx-include-dir is also specified.
12662         * configure: Regenerate.
12664 2018-05-09  Jim Wilson  <jimw@sifive.com>
12666         PR target/84797
12667         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
12668         * config/riscv/t-withmultilib: New.
12669         * config/riscv/withmultilib.h: New.
12670         * doc/install.texi: Document RISC-V --with-multilib-list support.
12672 2018-05-09  Richard Biener  <rguenther@suse.de>
12674         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
12675         vector.
12676         (vect_bb_vectorization_profitable_p): Adjust.  Compute
12677         actual scalar cost using the cost vector and the add_stmt_cost
12678         machinery.
12680 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12682         PR rtl-optimization/85645
12683         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
12684         in the REG_CFA_REGISTER note for LR, don't leave it empty.
12686 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12688         PR rtl-optimization/85645
12689         * shrink-wrap.c (spread_components): Return a boolean saying if
12690         anything was changed.
12691         (try_shrink_wrapping_separate): Iterate spread_components until
12692         nothing changes anymore.
12694 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12696         PR rtl-optimization/85645
12697         * regrename.c (build_def_use): Also kill the chains that include the
12698         destination of a REG_CFA_REGISTER note.
12700 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
12702         PR rtl-optimization/85645
12703         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
12704         insn that has a REG_CFA_REGISTER note.
12706 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
12708         * cfgexpand.c (expand_clobber): New function.
12709         (expand_gimple_stmt_1): Use it.
12710         * tree-vect-stmts.c (vect_clobber_variable): New function,
12711         split out from...
12712         (vectorizable_simd_clone_call): ...here.
12713         (vectorizable_store): Emit a clobber either side of an
12714         IFN_STORE_LANES sequence.
12715         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
12717 2018-05-09  Tom de Vries  <tom@codesourcery.com>
12719         PR target/85626
12720         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
12721         (define_insn "trap_if_false"): Add exit after trap.
12723 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
12725         PR rtl-optimization/85638
12726         * bb-reorder.c: Include common/common-target.h.
12727         (create_forwarder_block): New function extracted from...
12728         (fix_up_crossing_landing_pad): ...here.  Rename into...
12729         (dw2_fix_up_crossing_landing_pad): ...this.
12730         (sjlj_fix_up_crossing_landing_pad): New function.
12731         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
12732         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
12733         from both partitions and exit the loop after one iteration.
12735 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12737         Revert:
12738         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12739         subsection.
12740         (Basic PowerPC Built-in Functions): The new name of the
12741         subsection previously known as "PowerPC Built-in Functions".
12742         (Basic PowerPC Built-in Functions Available on all Configurations):
12743         New subsubsection.
12744         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12745         subsubsection.
12746         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12747         subsubsection.
12748         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12749         subsubsection.
12750         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12751         subsubsection.
12753 2018-05-08  Jim Wilson  <jimw@sifive.com>
12755         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
12756         (LD_EMUL_SUFFIX): New.
12757         (LINK_SPEC): Use it.
12759 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12761         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12762         subsection.
12763         (Basic PowerPC Built-in Functions): The new name of the
12764         subsection previously known as "PowerPC Built-in Functions".
12765         (Basic PowerPC Built-in Functions Available on all Configurations):
12766         New subsubsection.
12767         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
12768         subsubsection.
12769         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
12770         subsubsection.
12771         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
12772         subsubsection.
12773         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
12774         subsubsection.
12776 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
12778         PR target/85683
12779         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
12780         after cmpelim optimization.
12782 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
12784         * config.gcc: Support "goldmont".
12785         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
12786         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12787         PROCESSOR_GOLDMONT.
12788         * config/i386/i386.c (m_GOLDMONT): Define.
12789         (processor_target_table): Add "goldmont".
12790         (PTA_GOLDMONT): Define.
12791         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
12792         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
12793         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
12794         (fold_builtin_cpu): Add "goldmont".
12795         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
12796         (ix86_option_override_internal): Add "goldmont".
12797         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
12798         (processor_type): Add PROCESSOR_GOLDMONT.
12799         * config/i386/i386.md: Add CPU "glm".
12800         * config/i386/glm.md: New file.
12801         * config/i386/x86-tune.def: Add m_GOLDMONT.
12802         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
12804 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
12806         PR target/85572
12807         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
12808         E_V4DImode.
12809         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
12810         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
12811         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
12813         PR target/85317
12814         * config/i386/i386.c (ix86_fold_builtin): Handle
12815         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
12817         PR target/85480
12818         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
12819         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
12821 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
12823         PR target/85658
12824         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
12825         (check_arch): Likewise.
12826         (check_fpu): Return the result rather than printing it.
12827         (end arch): Fix operator precedence.
12828         (end cpu): Likewise.
12829         (END): Print the result from check_fpu.
12831 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12832             Alan Hayward  <alan.hayward@arm.com>
12833             David Sherwood  <david.sherwood@arm.com>
12835         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
12836         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
12837         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
12838         (*fcmuo<mode>_and): New patterns.
12840 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
12842         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
12843         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
12844         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
12845         (cmp_op, sve_imm_con): New code attributes.
12846         (SVE_COND_INT_CMP, imm_con): Delete.
12847         (cmp_op): Remove above unspecs from int attribute.
12848         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
12849         to...
12850         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
12851         comparison-specific unspecs.
12852         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
12853         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
12854         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
12855         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
12856         (*vec_fcm<cmp_op><mode>): Rename to...
12857         (*fcm<cmp_op><mode>): ...this and adjust likewise.
12858         (*vec_fcmuo<mode>): Rename to...
12859         (*fcmuo<mode>): ...this and adjust likewise.
12860         (*pred_fcm<cmp_op><mode>): New pattern.
12861         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
12862         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
12863         functions.
12864         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
12865         and UNORDERED.
12866         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
12867         (aarch64_emit_sve_predicated_cond): New function.
12868         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
12869         (aarch64_emit_unspec_cond_or): Replace with...
12870         (aarch64_emit_sve_or_conds): ...this new function.  Use
12871         aarch64_emit_sve_ptrue_op for the individual comparisons and
12872         aarch64_emit_binop to OR them together.
12873         (aarch64_emit_inverted_unspec_cond): Replace with...
12874         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
12875         aarch64_emit_sve_ptrue_op for the comparison and
12876         aarch64_emit_unop to invert the result.
12877         (aarch64_expand_sve_vec_cmp_float): Update after the above
12878         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
12880 2018-05-07  Nathan Sidwell  <nathan@acm.org>
12882         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
12883         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
12884         (Backwards Compatibility): Likewise.
12886 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12888         PR bootstrap/85681
12889         Revert:
12890         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12892         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12893         <prefetch_dynamic_strides>: New const bool field.
12894         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12895         prefetch_dynamic_strides.
12896         (exynosm1_prefetch_tune): Likewise.
12897         (thunderxt88_prefetch_tune): Likewise.
12898         (thunderx_prefetch_tune): Likewise.
12899         (thunderx2t99_prefetch_tune): Likewise.
12900         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12901         to false.
12902         (aarch64_override_options_internal): Update to set
12903         PARAM_PREFETCH_DYNAMIC_STRIDES.
12904         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12905         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12906         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12907         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12908         prefetch-dynamic-strides setting.
12910         2018-05-07  Luis Machado  <luis.machado@linaro.org>
12912         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12913         <minimum_stride>: New const int field.
12914         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12915         minimum_stride field.
12916         (exynosm1_prefetch_tune): Likewise.
12917         (thunderxt88_prefetch_tune): Likewise.
12918         (thunderx_prefetch_tune): Likewise.
12919         (thunderx2t99_prefetch_tune): Likewise.
12920         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12921         (aarch64_override_options_internal): Update to set
12922         PARAM_PREFETCH_MINIMUM_STRIDE.
12923         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12924         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12925         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12926         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12927         stride is constant and is below the minimum stride threshold.
12929 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12931         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
12932         to 512.
12934 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12936         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12937         <prefetch_dynamic_strides>: New const bool field.
12938         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12939         prefetch_dynamic_strides.
12940         (exynosm1_prefetch_tune): Likewise.
12941         (thunderxt88_prefetch_tune): Likewise.
12942         (thunderx_prefetch_tune): Likewise.
12943         (thunderx2t99_prefetch_tune): Likewise.
12944         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
12945         to false.
12946         (aarch64_override_options_internal): Update to set
12947         PARAM_PREFETCH_DYNAMIC_STRIDES.
12948         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
12949         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
12950         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
12951         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
12952         prefetch-dynamic-strides setting.
12954 2018-05-07  Luis Machado  <luis.machado@linaro.org>
12956         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
12957         <minimum_stride>: New const int field.
12958         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
12959         minimum_stride field.
12960         (exynosm1_prefetch_tune): Likewise.
12961         (thunderxt88_prefetch_tune): Likewise.
12962         (thunderx_prefetch_tune): Likewise.
12963         (thunderx2t99_prefetch_tune): Likewise.
12964         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
12965         (aarch64_override_options_internal): Update to set
12966         PARAM_PREFETCH_MINIMUM_STRIDE.
12967         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
12968         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
12969         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
12970         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
12971         stride is constant and is below the minimum stride threshold.
12973 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
12975         PR c++/85659
12976         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
12977         the type is addressable.  Don't force op into register if it has
12978         BLKmode.
12980 2018-05-05  Roland McGrath  <mcgrathr@google.com>
12982         PR other/77609
12983         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
12984         any section for which we don't know a specific type it should have,
12985         regardless of name.  Previously this was done only for the exact
12986         names ".init_array", ".fini_array", and ".preinit_array".
12987         (default_elf_asm_named_section): Add comment about
12988         relationship with default_section_type_flags and SECTION_NOTYPE.
12989         (get_section): Don't consider it a type conflict if one side has
12990         SECTION_NOTYPE and the other doesn't, as long as neither has the
12991         SECTION_BSS et al used in the default_section_type_flags logic.
12993 2018-05-05  Tom de Vries  <tom@codesourcery.com>
12995         PR target/85653
12996         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
12997         (workaround_barsyncs): New function.
12998         (nvptx_reorg): Use workaround_barsyncs.
12999         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13000         (define_expand "nvptx_membar_cta"): New define_expand.
13001         (define_insn "*nvptx_membar_cta"): New insn.
13003 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
13005         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13006         To improve optimization opportunities.
13007         * builtin-types.def: The new needed builtin types for the above.
13009 2018-05-04  Richard Biener  <rguenther@suse.de>
13011         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13012         * gimple-ssa-store-merging.c
13013         (imm_store_chain_info::output_merged_store): Remove redundant create,
13014         release split_store vector contents on failure.
13015         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13016         scalar stmt vector on cache hit.
13018 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
13020         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13021         Xilinx FP support.
13022         * config.gcc (powerpc-xilinx-eabi*): Remove.
13023         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13024         support.
13025         (fusion_addis_mem_combo_load): Ditto.
13026         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13027         FP support.
13028         (rs6000_cpu_cpp_builtins): Ditto.
13029         * config/rs6000/rs6000-linux.c
13030         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13031         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13032         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13033         support.
13034         (rs6000_setup_reg_addr_masks): Ditto.
13035         (rs6000_init_hard_regno_mode_ok): Ditto.
13036         (rs6000_option_override_internal): Ditto.
13037         (legitimate_lo_sum_address_p): Ditto.
13038         (rs6000_legitimize_address): Ditto.
13039         (rs6000_legitimize_reload_address): Ditto.
13040         (rs6000_legitimate_address_p): Ditto.
13041         (abi_v4_pass_in_fpr): Ditto.
13042         (setup_incoming_varargs): Ditto.
13043         (rs6000_gimplify_va_arg): Ditto.
13044         (rs6000_split_multireg_move): Ditto.
13045         (rs6000_savres_strategy): Ditto.
13046         (rs6000_emit_prologue_components): Ditto.
13047         (rs6000_emit_epilogue_components): Ditto.
13048         (rs6000_emit_prologue): Ditto.
13049         (rs6000_emit_epilogue): Ditto.
13050         (rs6000_elf_file_end): Ditto.
13051         (rs6000_function_value): Ditto.
13052         (rs6000_libcall_value): Ditto.
13053         * config/rs6000/rs6000.h: Ditto.
13054         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13055         (TARGET_MINMAX): ... this.  New.
13056         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13057         * config/rs6000/rs6000.md: Remove Xilinx FP support.
13058         (*movsi_internal1_single): Delete.
13059         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13060         mfpu=, mxilinx-fpu): Delete.
13061         * config/rs6000/singlefp.h: Delete.
13062         * config/rs6000/sysv4.h: Remove Xilinx FP support.
13063         * config/rs6000/t-rs6000: Ditto.
13064         * config/rs6000/t-xilinx: Delete.
13065         * config/rs6000/titan.md: Adjust for fp_type removal.
13066         * config/rs6000/vsx.md: Remove Xilinx FP support.
13067         (VStype_simple): Delete.
13068         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13069         * config/rs6000/xfpu.h: Delete.
13070         * config/rs6000/xfpu.md: Delete.
13071         * config/rs6000/xilinx.h: Delete.
13072         * config/rs6000/xilinx.opt: Delete.
13073         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13074         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13076 2018-05-04  Tom de Vries  <tom@codesourcery.com>
13078         PR libgomp/85639
13079         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13080         if ignore == 0.
13082 2018-05-04  Richard Biener  <rguenther@suse.de>
13084         PR middle-end/85627
13085         * tree-complex.c (update_complex_assignment): We are always in SSA form.
13086         (expand_complex_div_wide): Likewise.
13087         (expand_complex_operations_1): Likewise.
13088         (expand_complex_libcall): Preserve EH info of the original stmt.
13089         (tree_lower_complex): Handle removed blocks.
13090         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13091         on complex multiplication and division libcall builtins.
13093 2018-05-04  Richard Biener  <rguenther@suse.de>
13095         PR middle-end/85574
13096         * fold-const.c (negate_expr_p): Restrict negation of operand
13097         zero of a division to when we know that can happen without
13098         overflow.
13099         (fold_negate_expr_1): Likewise.
13101 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
13103         PR libstdc++/85466
13104         * real.h (real_nextafter): Declare.
13105         * real.c (real_nextafter): New function.
13106         * fold-const-call.c (fold_const_nextafter): New function.
13107         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13108         CASE_CFN_NEXTTOWARD.
13109         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13110         even when arg1_mode is different from arg0_mode.
13112 2018-05-03  Nathan Sidwell  <nathan@acm.org>
13114         * doc/extend.texi (Deprecated Features): Remove
13115         -ffriend-injection.
13116         (Backwards Compatibility): Likewise.
13117         * doc/invoke.texi (C++ Language Options): Likewise.
13118         (C++ Dialect Options): Likewise.
13120 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
13122         PR target/85530
13123         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13124         _mm512_mask_mullox_epi64): New intrinsics.
13126 2018-05-03  Tom de Vries  <tom@codesourcery.com>
13128         PR testsuite/85106
13129         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13130         dump files): Add offload-tree.
13132 2018-05-03  Richard Biener  <rguenther@suse.de>
13134         PR tree-optimization/85615
13135         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13136         to loops not nested in BBs loop father to avoid creating multi-entry
13137         loops.
13139 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13141         PR tree-optimization/70291
13142         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13143         arguments.  Change return type to tree.  Emit libcall as a new
13144         statement rather than replacing existing one when inplace_p is true.
13145         (expand_complex_multiplication_components): New function.
13146         (expand_complex_multiplication): Expand floating-point complex
13147         multiplication using the above.
13148         (expand_complex_division): Rename inner_type parameter to type.
13149         Update expand_complex_libcall call-site.
13150         (expand_complex_operations_1): Update expand_complex_multiplication
13151         and expand_complex_division call-sites.
13153 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13155         PR target/85582
13156         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13157         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13158         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13159         the highest significant bit of the shift count mask is clear.  In
13160         check whether and[sq]i3 is needed verify that all significant bits
13161         of the shift count other than the highest are set.
13163 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13165         PR libgomp/82428
13166         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13167         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13168         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13169         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13170         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13171         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13172         __builtin_goacc_parlevel_size.
13174 2018-05-02  Richard Biener  <rguenther@suse.de>
13176         PR tree-optimization/85597
13177         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13178         do not use split vect_get_vec_defs call but call vect_get_slp_defs
13179         directly.
13181 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13183         PR testsuite/85106
13184         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13185         dump files): Add ltrans-tree.
13187 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13189         PR testsuite/85106
13190         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13191         dump files): Add wpa-ipa.
13193 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
13195         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
13196         powerpc*-*-linux*paired* target.
13197         * config/rs6000/750cl.h: Delete.
13198         * config/rs6000/paired.h: Delete.
13199         * config/rs6000/paired.md: Delete.
13200         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13201         float support.
13202         * config/rs6000/rs6000-builtin.def: Remove paired float support.
13203         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13204         comment.  Remove paired float support.
13205         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13206         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13207         VECTOR_PAIRED.
13208         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13209         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13210         declarations.
13211         * config/rs6000/rs6000.c: Remove paired float support.
13212         (paired_expand_vector_init, paired_expand_vector_move,
13213         paired_emit_vector_compare, paired_emit_vector_cond_expr,
13214         (paired_expand_lv_builtin, paired_expand_stv_builtin,
13215         paired_expand_builtin, paired_expand_predicate_builtin,
13216         paired_init_builtins): Delete.
13217         * config/rs6000/rs6000.h: Remove paired float support.
13218         * config/rs6000/rs6000.md: Remove paired float support.
13219         (move_from_CR_ov_bit): Delete.
13220         * config/rs6000/rs6000.opt (mpaired): Delete.
13221         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13222         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13224 2018-05-02  Richard Biener  <rguenther@suse.de>
13226         PR middle-end/85567
13227         * gimplify.c (gimplify_save_expr): When in SSA form allow
13228         SAVE_EXPRs to compute to SSA vars.
13230 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13232         PR target/85582
13233         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13234         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13235         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13236         clobber operands[2], instead use a new pseudo.  Formatting fixes.
13238 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
13240         PR tree-optimization/85586
13241         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13242         exit early for statements in the same group if the accesses are
13243         not strided.
13245 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13247         PR lto/85451
13248         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13249         error message.
13251 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
13253         PR tree-optimization/85143
13254         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13256 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13258         PR lto/85451
13259         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13260         not found" error message.
13262 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13264         PR other/83786
13265         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13266         * vec.c (test_ordered_remove_if): New function.
13267         (vec_c_tests): Call test_ordered_remove_if.
13268         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13269         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13270         * tree-vect-patterns.c (vect_pattern_recog_1): Use
13271         VEC_ORDERED_REMOVE_IF.
13273 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13275         PR tree-optimization/82665
13276         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13277         pointer subtraction where arguments come from a memchr call.
13279 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
13281         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13282         --push-state --as-needed and --pop-state instead of --as-needed and
13283         --no-as-needed if ld supports it.
13284         * configure: Regenerated.
13286         PR web/85578
13287         * doc/install.texi2html: Replace _002d with - and _002a with * in
13288         generated html files using sed.
13290 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13292         PR c++/85523
13293         * gcc-rich-location.c (blank_line_before_p): New function.
13294         (use_new_line): New function.
13295         (gcc_rich_location::add_fixit_insert_formatted): New function.
13296         * gcc-rich-location.h
13297         (gcc_rich_location::add_fixit_insert_formatted): New function.
13299 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13301         * selftest.c (assert_streq): Rename "expected" and "actual" to
13302         "val1" and "val2".  Extend NULL-handling to cover both inputs
13303         symmetrically, while still requiring both to be non-NULL for a pass.
13304         * selftest.h (assert_streq): Rename "expected" and "actual" to
13305         "val1" and "val2".
13306         (ASSERT_EQ): Likewise.
13307         (ASSERT_EQ_AT): Likewise.
13308         (ASSERT_KNOWN_EQ): Likewise.
13309         (ASSERT_KNOWN_EQ_AT): Likewise.
13310         (ASSERT_NE): Likewise.
13311         (ASSERT_MAYBE_NE): Likewise.
13312         (ASSERT_MAYBE_NE_AT): Likewise.
13313         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
13314         the assertion to pass.
13315         (ASSERT_STREQ_AT): Likewise.
13317 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13319         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13320         interaction with -pie.
13322 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13324         * selftest.h: Fix alphabetization of per-source-file selftest
13325         declarations.
13327 2018-04-30  Jason Merrill  <jason@redhat.com>
13329         PR c++/61982 - dead stores to destroyed objects.
13330         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13331         of clobber.
13333 2018-04-30  Jason Merrill  <jason@redhat.com>
13335         * tree.c (build_clobber): New.
13336         * tree.h: Declare it.
13337         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13339 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13341         * diagnostic-show-locus.c (layout::layout): Update for
13342         location_get_source_line returning a char_span.
13343         (struct char_span): Move to input.h.
13344         (struct correction): Update for fields in char_span becoming
13345         private.
13346         (struct source_line): Update for location_get_source_line
13347         returning a char_span.
13348         (layout::print_line): Likewise.
13349         * edit-context.c (edited_file::print_content): Likewise.
13350         (edited_file::print_diff_hunk): Likewise.
13351         (edited_file::print_run_of_changed_lines): Likewise.
13352         (edited_file::get_num_lines): Likewise.
13353         (edited_line::edited_line): Likewise.
13354         * final.c (asm_show_source): Likewise.
13355         * input.c (location_get_source_line): Convert return type
13356         from const char * to char_span, losing the final "line_len"
13357         param.
13358         (dump_location_info): Update for the above.
13359         (get_substring_ranges_for_loc): Likewise.  Use a char_span
13360         when handling the literal within the line.
13361         (test_reading_source_line): Update for location_get_source_line
13362         returning a char_span.
13363         * input.h (class char_span): Move here from
13364         diagnostic-show-locus.c, converting from a struct to a class.
13365         Make data members private.
13366         (char_span::operator bool): New.
13367         (char_span::length): New.
13368         (char_span::get_buffer): New.
13369         (char_span::operator[]): New.
13370         (char_span::subspan): Make const.
13371         (char_span::xstrdup): New.
13372         (location_get_source_line): Convert return type from const char *
13373         to char_span, losing the final "line_size" param.
13375 2018-04-30  Jan Hubicka  <jh@suse.cz>
13377         * lto-wrapper.c (ltrans_priorities): New static var.
13378         (cmp_priority): New.
13379         (run_gcc): Read priorities and if doing parallel build order
13380         the Makefile by them.
13382 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13384         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13386 2018-04-30  Richard Biener  <rguenther@suse.de>
13388         * tree-cfg.c (verify_address): Remove base argument, add
13389         flag whether to check TREE_ADDRESSABLE and do that.
13390         (verify_expr): Remove.
13391         (verify_types_in_gimple_reference): Add pieces from verify_expr.
13392         (verify_gimple_assign_single): Likewise.
13393         (verify_gimple_switch): Likewise.
13394         (verify_expr_location_1): Dereference tp once.  Add (disabled)
13395         piece from verify_expr.
13396         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13398 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13400         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13402 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13404         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13405         (small_data_pattern): Likewise.
13406         (arc_rewrite_small_data): Likewise.
13407         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13408         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13409         (get_symbol_alignment): New function.
13410         (legitimate_small_data_address_p): Likewise.
13411         (legitimate_scaled_address): Update, call
13412         legitimate_small_data_address_p.
13413         (output_sdata): New static variable.
13414         (arc_print_operand): Update how we handle small data operands.
13415         (arc_print_operand_address): Likewise.
13416         (arc_legitimate_address_p): Update, use
13417         legitimate_small_data_address_p.
13418         (arc_rewrite_small_data_p): Remove.
13419         (arc_rewrite_small_data_1): Likewise.
13420         (arc_rewrite_small_data): Likewise.
13421         (small_data_pattern): Likewise.
13422         (compact_sda_memory_operand): Update to use
13423         legitimate_small_data_address_p and get_symbol_alignment.
13424         (prepare_move_operands): Don't rewite sdata pattern.
13425         (prepare_extend_operands): Remove.
13426         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13427         pattern.
13428         (zero_extendqisi2): Likewise.
13429         (zero_extendhisi2): Likewise.
13430         (extendqihi2): Likewise.
13431         (extendqisi2): Likewise.
13432         (extendhisi2): Likewise.
13433         (addsi3): Likewise.
13434         (subsi3): Likewise.
13435         (andsi3): Likewise.
13436         * config/arc/constraints.md (Usd): Change it to memory constraint.
13438 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13440         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13441         as source of std instructions.
13442         * config/arc/arc.md (movsi_insn): Update pattern predicate to
13443         allow 6-bit constants as source for store instructions.
13444         (movdi_insn): Update instruction pattern to allow 6-bit constants
13445         as source for store instructions.
13447 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13449         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13451 2018-04-30  Nathan Sidwell  <nathan@acm.org>
13452             Sandra Loosemore <sandra@codesourcery.com>
13454         * dumpfile.c (dump_open): Allow '-' for stdout.
13455         * doc/invoke.texi (Developer Options): Document dump filename
13456         determination early.  Document stdin/stdout selection.
13458 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
13460         Microblaze Target: PIC data text relative
13462         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13463         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13464         Add declaration.
13465         * config/microblaze/microblaze.h (microblaze_constant_address_p):
13466         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13467         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13468         New addressing mode for data-text relative position indepenedent code.
13469         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13470         'ADDRESS_SYMBOLIC_TXT_REL'.
13471         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13472         (microblaze_legitimate_pic_operand): Exclude function calls from
13473         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13474         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13475         addresses cases.
13476         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13477         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13478         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13479         for 'address + offset'.
13480         (microblaze_expand_prologue): Add new function prologue call for
13481         'r20' assignation.
13482         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13483         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13484         table in case of TARGET_PIC_DATA_TEXT_REL.
13485         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13486         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13487         Add new macros 'UNSPEC_TEXT',
13488         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13489         + exclude function calls from 'UNSPEC_PLT' in case of data text
13490         relative mode.
13491         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13492         new target hook for generating address diff vector tables in case of
13493         flag_pic.
13494         * doc/tm.texi : Regenerate.
13495         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13496         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13497         of addr diff vector generation.
13498         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13499         target hook definition.
13500         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13501         Add default function for generate_pic_addr_diff_vec -> flag_pic.
13502         * doc/invoke.texi (Add new pic option): Add new microblaze pic
13503         option for data text relative.
13505 2018-04-30  Richard Biener  <rguenther@suse.de>
13507         * tree-chrec.h (evolution_function_is_constant_p): Remove
13508         redundant check.
13509         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13511 2018-04-30  Richard Biener  <rguenther@suse.de>
13513         PR bootstrap/85571
13514         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13516 2018-04-30  Richard Biener  <rguenther@suse.de>
13518         PR tree-optimization/28364
13519         PR tree-optimization/85275
13520         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13521         copying first exit test.
13523 2018-04-28  Mark Wielaard  <mark@klomp.org>
13525         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13526         dwarf_version >= 5.
13527         (dwarf_AT): Handle DW_AT_addr_base.
13528         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13530 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
13532         PR target/84431
13533         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13534         (*ashl<dwi>3_doubleword_mask_1): Ditto.
13535         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13536         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13538 2018-04-28  Richard Biener  <rguenther@suse.de>
13540         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13541         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13542         to reflect use.  Only add interesting stmts.
13544 2018-04-27  Martin Jambor  <mjambor@suse.cz>
13546         PR ipa/85549
13547         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13548         the jump function allows for passing through aggregate values.
13550 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
13552         * input.h (in_system_header_at): Convert from macro to inline
13553         function.
13554         (from_macro_expansion_at): Likewise.
13555         (from_macro_definition_at): Likewise.
13557 2018-04-27  Jeff Law  <law@redhat.com>
13559         * config.gcc: Mark tile* targets as deprecated/obsolete.
13561 2018-04-27  Richard Biener  <rguenther@suse.de>
13563         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13564         fix for ILP32.
13566 2018-04-27  Richard Biener  <rguenther@suse.de>
13568         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13570 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
13572         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13573         with Yd constraint. Set "preferred_for_speed" attribute from
13574         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13575         with Yd constraint.
13576         (*movdi_internal): Ditto.
13577         (movti_interunit splitters): Remove
13578         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13579         (movdi_interunit splitters): Ditto.
13580         * config/i386/constraints.md (Ye): Remove.
13581         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13583 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13585         PR target/85512
13586         * config/aarch64/constraints.md (Usg): Limit to 31.
13587         (Usj): Limit to 63.
13589 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
13591         PR tree-optimization/85529
13592         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13593         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13594         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13595         zero extension or masking of the MSB bit.
13596         (optimize_range_tests): Add FIRST_BB argument, pass it through
13597         to optimize_range_tests_var_bound.
13598         (maybe_optimize_range_tests, reassociate_bb): Adjust
13599         optimize_range_tests callers.
13601 2018-04-26  Richard Biener  <rguenther@suse.de>
13602             Jakub Jelinek  <jakub@redhat.com>
13604         * cgraph.h (symbol_table): Just declare debug method here.
13605         * symtab.c (symbol_table::debug): Define.
13607 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
13609         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13611 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
13613         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13614         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13615         (*movdi_internal): Substitute Yi and Yj constraint with x
13616         and Ym and Yn constraint with y constraint.  Update "isa"
13617         attribute and set "preferred_for_speed" attribute from
13618         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13619         (*movsi_internal): Ditto.
13620         (*movdf_internal): Ditto.
13621         (*movsf_internal): Ditto.
13622         (*zero_extendsidi2): Ditto.
13623         * config/i386/sse.md (vec_set<mode>_0): Ditto.
13624         (sse2_loadld): Ditto.
13625         (*vec_extract<ssevecmodelower>_0): Ditto.
13626         (*vec_extractv4si_0_zext_sse4): Ditto.
13627         (vec_concatv2di): Ditto.
13628         (*vec_dup<mode>): Ditto.
13629         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13630         * config/i386/constraints.md (Yi): Remove.
13631         (Yj): Remove.
13632         (Ym): Remove.
13633         (Yn): Remove.
13635 2018-04-26  Nathan Sidwell  <nathan@acm.org>
13637         * dumpfile.c (dump_open): New.
13638         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13639         (dump_finish): Detect stdio/stderr by value not name.
13641 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
13643         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13645 2018-04-26  Tom de Vries  <tom@codesourcery.com>
13647         PR target/84952
13648         * config/nvptx/nvptx.c (verify_neutering_jumps)
13649         (verify_neutering_labels): New function
13650         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
13652 2018-04-26  Tom de Vries  <tom@codesourcery.com>
13654         PR target/84025
13655         * config/nvptx/nvptx.c (needs_neutering_p): New function.
13656         (nvptx_single): Use needs_neutering_p to skip over insns that do not
13657         need neutering.
13659 2018-04-26  Richard Biener <rguenther@suse.de>
13660             Tom de Vries  <tom@codesourcery.com>
13662         PR lto/85422
13663         * lto-streamer-out.c (output_function): Fixup loops if required to match
13664         discovery done in the reader.
13666 2018-04-26  Richard Biener  <rguenther@suse.de>
13668         PR tree-optimization/85116
13669         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
13670         have a loop exit from the single latch predecessor.  Remove
13671         case of header with just condition.
13672         (ch_base::copy_headers): Exclude infinite loops from any
13673         processing.
13674         (pass_ch::execute): Record exits.
13676 2018-04-26  Richard Biener  <rguenther@suse.de>
13678         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
13679         prologue cost vector and pass it to vect_get_load_cost.
13680         (vect_get_peeling_costs_all_drs): Likewise.
13681         (vect_peeling_hash_get_lowest_cost): Likewise.
13682         (vect_enhance_data_refs_alignment): Likewise.
13684 2018-04-26  Richard Biener  <rguenther@suse.de>
13686         PR middle-end/85450
13687         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
13688         checking of integer<->pointer conversions.
13689         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
13690         sign-/zero-extending pointer types.
13691         (expand_omp_for_static_chunk): Likewise.
13693 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
13694             Jean Lee  <xiaoyur347@gmail.com>
13696         * config/mips/mips.c (mips_asan_shadow_offset): New function.
13697         (TARGET_ASAN_SHADOW_OFFSET): Define.
13698         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
13699         true for -fsanitize=address.
13701 2018-04-25  Mark Wielaard  <mark@klomp.org>
13703         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
13704         shorter ones.
13706 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
13708         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
13709         than "alu", remove explicit "memory" and "imm_disp" attributes.
13710         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
13712         PR middle-end/85414
13713         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
13714         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
13715         gen_lowpart_no_emit.
13717 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
13719         PR target/85473
13720         * config/i386/i386.c (ix86_expand_builtin): Change memory
13721         operand to XI, extend p0 to Pmode.
13722         * config/i386/i386.md: Change unspec volatile and operand
13723         1 mode to XI, change operand 0 mode to P.
13725 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13727         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
13728         GET_MODE_MASK before any checking.
13729         (nds32_can_use_bset_p): Likewise.
13730         (nds32_can_use_btgl_p): Likewise.
13732 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13734         * config/nds32/nds32-doubleword.md: New define_split pattern for
13735         illegal register number.
13737 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13739         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
13741 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
13743         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
13745 2018-04-25  Richard Biener  <rguenther@suse.de>
13747         * lto-streamer.h (LTO_major_version): Bump to 8.
13749 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
13751         * BASE-VER: Set to 9.0.0.
13753 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
13755         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
13756         in __abskf2 and __powikf2.
13758 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13760         PR target/85512
13761         * config/aarch64/constraints.md (Usg, Usj): New constraints.
13762         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
13763         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
13764         Use the above on operand 2.  Reindent.
13765         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
13767 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
13769         PR target/85485
13770         * common/config/i386/i386-common.c (ix86_handle_option): Don't
13771         handle OPT_mcet.
13772         * config/i386/i386.opt (mcet): Removed.
13773         * doc/install.texi: Remove -mcet documentation.
13774         * doc/invoke.texi: Likewise.
13776 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
13778         PR target/85485
13779         * doc/install.texi: Remove -mcet from bootstrap-cet.
13781 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13783         PR target/85511
13784         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
13785         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
13786         if TARGET_64BIT.
13788         PR target/85503
13789         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
13790         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
13791         containing a CONST_VECTOR.
13793 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
13795         * doc/install.texi: Update newlib dependency for nvptx.
13797 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13799         PR target/85508
13800         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
13801         instead of INTVAL when shifting x left.
13803 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
13805         PR tree-optimization/85478
13806         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
13807         vect_grouped_store_supported for single element vectors.
13809 2018-04-24  Richard Biener  <rguenther@suse.de>
13811         PR target/85491
13812         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
13813         load cost increase to the case of non-constant step.
13815 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
13817         PR target/84828
13818         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
13819         destination if any_malformed_asm.
13821 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
13823         PR middle-end/85496
13824         * expr.c (store_field): In the bitfield case, if the value comes from
13825         a function call and is returned in registers by means of a PARALLEL,
13826         do not change the mode of the temporary unless BLKmode and VOIDmode.
13828 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
13830         PR rtl-optimization/85423
13831         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
13832         dependencies to debug insns when the previous insn is non-debug.
13834 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13836         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
13837         enums into a single definition.
13838         (fls): Fix predicates and printing.
13839         (seti): Likewise.
13841 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
13843         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
13844         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
13845         and short u6 immediate.
13846         (check_if_valid_sleep_operand): Remove.
13847         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
13849 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13851         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
13852         flag_always_save_lp condition.
13853         * config/nds32/nds32.opt (malways-save-lp): New option.
13855 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13857         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
13858         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
13859         * config/nds32/nds32.h
13860         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
13861         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
13863 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13865         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
13866         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
13868 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
13869             Chung-Ju Wu  <jasonwucj@gmail.com>
13871         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
13872         Declare.
13873         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
13874         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
13876 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13878         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
13880 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13882         * config/nds32/nds32-protos.h (nds32_data_alignment,
13883         nds32_local_alignment): Declare.
13884         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
13885         nds32_local_alignment): New functions.
13886         (TARGET_CONSTANT_ALIGNMENT): Define.
13887         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
13889 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13891         * config/nds32/nds32.c
13892         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
13893         (TARGET_MODES_TIEABLE_P): Likewise.
13895 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
13897         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
13898         level Ofast and Og.
13900 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
13901             Chung-Ju Wu  <jasonwucj@gmail.com>
13903         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13904         for unaligned access.
13905         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13906         unaligned access.
13907         * config/nds32/nds32-intrinsic.md: Likewise.
13908         * config/nds32/nds32_intrinsic.h: Likewise.
13909         * config/nds32/nds32.h (nds32_builtins): Likewise.
13910         * config/nds32/nds32.opt (munaligned-access): New option.
13911         * config/nds32/nds32.c (nds32_asm_file_start): Display
13912         flag_unaligned_access status.
13914 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13916         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
13917         -mno-relax is present.
13918         * config/riscv/linux.h (LINK_SPEC): Ditto.
13920 2018-04-20  Martin Sebor  <msebor@redhat.com>
13922         PR c/85365
13923         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
13924         for null pointers.
13925         (gimple_fold_builtin_stxcpy_chk): Same.
13926         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
13928 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
13930         PR target/85456
13931         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
13932         __powikf2 when long double is IEEE 128-bit.
13934 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
13936         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
13937         step to make sure stack always aligned.
13939 2018-04-20  Carl Love  <cel@us.ibm.com>
13941         PR target/83402
13942         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
13943         size check for arg0.
13945 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13946             Tom de Vries  <tom@codesourcery.com>
13948         PR target/85445
13949         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
13950         Emit insns for calls too.
13951         (nvptx_find_par): Always look for worker-level predecessor insn.
13952         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
13953         calls.
13954         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
13955         (nvptx_process_pars): Propagate frames for calls.
13957 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
13959         PR target/85469
13960         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
13961         Removed.
13962         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
13963         (ix86_handle_option): Don't handle OPT_mibt.
13964         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
13965         __SHSTK__.
13966         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
13967         has_ibt and ibt.
13968         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
13969         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
13970         (ix86_target_macros): Define __CET__ with flag_cf_protection
13971         for -fcf-protection.
13972         * config/i386/i386.c (isa2_opts): Remove -mibt.
13973         * config/i386/i386.h (TARGET_IBT): Removed.
13974         (TARGET_IBT_P): Likewise.
13975         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
13976         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
13977         * config/i386/i386.opt (mcet): Update help message.
13978         (mshstk): Likewise.
13979         (mibt): Removed.
13980         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
13981         -mcet as an alias for -mshstk.
13983 2018-04-20  Richard Biener <rguenther@suse.de>
13985         PR middle-end/85475
13986         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
13987         complexity by forcing a single use of the multiply operand.
13989 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13991         ipa/85449
13992         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
13993         recursion dependency to only apply to non-clones.
13995 2018-04-20  Martin Jambor  <mjambor@suse.cz>
13997         ipa/85447
13998         * ipa-cp.c (create_specialized_node): Check that clones of
13999         self-recursive edges exist during IPA-CP.
14001 2018-04-19  Toon Moene  <toon@moene.org>
14003         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14004         by -O3.
14006 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14008         PR tree-optimization/85467
14009         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14010         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
14011         VECTOR_CST element to type.
14013 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14015         PR target/85397
14016         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14017         * config/i386/i386.md (builtin_setjmp_setup): Removed.
14018         (builtin_longjmp): Likewise.
14019         (save_stack_nonlocal): New pattern.
14020         (restore_stack_nonlocal): Likewise.
14022 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14024         PR target/85404
14025         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14026         Replace ASM_OUTPUT_LABEL with fprintf.
14028 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14030         PR target/85417
14031         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14032         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14033         * config/i386/i386-c.c (ix86_target_macros_internal): Also
14034         define __IBT__ and __SHSTK__ for -fcf-protection.
14035         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14036         TARGET_IBT.
14037         (ix86_trampoline_init): Likewise.
14038         (x86_output_mi_thunk): Likewise.
14039         (ix86_notrack_prefixed_insn_p): Likewise.
14040         (ix86_option_override_internal): Don't disallow -fcf-protection.
14041         * config/i386/i386.md (rdssp<mode>): Also enable for
14042         -fcf-protection.
14043         (incssp<mode>): Likewise.
14044         (nop_endbr): Likewise.
14045         * config/i386/i386.opt (mcet): Change help message to built-in
14046         functions only.
14047         (mibt): Likewise.
14048         (mshstk): Likewise.
14049         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14050         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
14051         enable CET built-in functions.
14053 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
14055         * common/config/i386/i386-common.c
14056         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14057         OPTION_MASK_ISA_MOVDIRI_UNSET,
14058         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14059         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14060         * config.gcc (movdirintrin.h): New header.
14061         * config/i386/cpuid.h (bit_MOVDIRI,
14062         bit_MOVDIR64B): New bits.
14063         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14064         and -mmvodir64b.
14065         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14066         (VOID, PVOID, PCVOID)): New function types.
14067         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14068         __builtin_ia32_directstoreu_u64,
14069         __builtin_ia32_movdir64b): New builtins.
14070         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14071         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14072         and -mmovdiri.
14073         (ix86_valid_target_attribute_inner_p): Ditto.
14074         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14075         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14076         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14077         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14078         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14079         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14080         (movdiri<mode>, movdir64b_<mode>): New.
14081         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14082         * config/i386/immintrin.h: Include movdirintrin.h.
14083         * config/i386/movdirintrin.h: New file.
14084         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14086 2018-04-19  Richard Biener  <rguenther@suse.de>
14088         PR middle-end/85455
14089         * cfg.c (clear_bb_flags): When loop state says we have
14090         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14092 2018-04-19  Richard Biener  <rguenther@suse.de>
14094         PR tree-optimization/84737
14095         * tree-vect-data-refs.c (vect_copy_ref_info): New function
14096         copying restrict info.
14097         (vect_setup_realignment): Use it.
14098         * tree-vectorizer.h (vect_copy_ref_info): Declare.
14099         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14100         the first DR to all generated stores.
14101         (vectorizable_load): Likewise for loads.
14103 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14105         PR tree-optimization/85446
14106         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14107         the integral and pointer types to have the same precision.
14109         * doc/install.texi: Document --disable-cet being the default and
14110         --enable-cet=auto.
14112 2018-04-18  Martin Liska  <mliska@suse.cz>
14114         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14115         style.
14117 2018-04-18  Martin Liska  <mliska@suse.cz>
14119         Revert
14120         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14122         PR ipa/83983
14123         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14124         arguments if they are comparable.
14126 2018-04-18  Martin Liska  <mliska@suse.cz>
14128         Revert
14129         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14131         PR lto/84805
14132         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14133         incomplete types.
14135 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
14137         PR target/85388
14138         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14139         ENDBR after calling __morestack.
14141 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
14143         PR jit/85384
14144         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14145         by using gcc_base_ver to generate a gcc_driver_version, and use
14146         it when generating GCC_DRIVER_NAME.
14147         * configure: Regenerate.
14149 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
14151         PR target/81084
14152         * config.gcc: Obsolete powerpc*-*-*spe*.
14154 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14156         PR debug/84637
14157         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14158         (stabstr_D): Change type of unum from unsigned int to
14159         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
14160         type.
14162 2018-04-17  Jim Wilson  <jimw@sifive.com>
14164         PR 84856
14165         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14166         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14167         Set arg_pointer_offset after using pretend_args_size.
14169 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14171         PR rtl-optimization/85431
14172         * dse.c (record_store): Ignore zero width stores.
14174         PR sanitizer/85230
14175         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
14176         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14177         __builtin_stack_restore rather than after it.
14178         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14179         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14180         argument instead of virtual_dynamic_stack_rtx.
14182 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14184         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14185         New prototype.
14186         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14187         Add note to error message to explain internal mapping of overloaded
14188         built-in function name to non-overloaded built-in function name.
14189         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14190         function.
14192 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14194         PR target/85424
14195         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14196         where the inputs overlap with the output.
14198 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14200         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14201         (=v, v) alternative and explicit "memory" attribute.
14202         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
14203         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14204         attributes.
14205         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14206         "sselog1" type instead of "sselog".
14207         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14208         "sselog".  Remove explicit "memory" attribute.
14209         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14210         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14211         attributes.
14212         (vec_extract_hi_v32hi): Merge all alternatives into one, use
14213         "sselog1" type instead of "sselog".  Remove explicit "memory"
14214         attribute.
14215         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14216         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14217         attribute.
14218         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14219         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14220         attributes.
14221         (vec_extract_hi_v64qi): Merge all alternatives into one, use
14222         "sselog1" type instead of "sselog".  Remove explicit "memory"
14223         attribute.
14224         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14225         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14226         attribute.
14228         PR target/85430
14229         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14231         PR middle-end/85414
14232         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14233         on a SUBREG.
14235 2018-04-17  Martin Jambor  <mjambor@suse.cz>
14237         PR ipa/85421
14238         * ipa-cp.c (create_specialized_node): Call
14239         expand_all_artificial_thunks if necessary.
14241 2018-04-17  Martin Liska  <mliska@suse.cz>
14243         PR lto/85405
14244         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14245         in message, remote space in between '_G' and '('.
14247 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14249         PR target/85281
14250         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14251         avx512f_vmcmp<mode>3<round_saeonly_name>,
14252         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14253         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14254         avx512f_rndscale<mode><round_saeonly_name>,
14255         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14256         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14257         Use %<iptr>2 instead of %2 for -masm=intel.
14258         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14259         avx512f_vcvttss2usi<round_saeonly_name>,
14260         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14261         -masm=intel.
14262         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14263         avx512f_vcvttsd2usi<round_saeonly_name>,
14264         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14265         Use %q1 instead of %1 for -masm=intel.
14266         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14267         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14268         of %3 for -masm=intel.
14269         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14270         -masm=intel.
14271         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14272         -masm=intel.
14273         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14274         -masm=intel.
14275         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14276         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14277         %g1.
14278         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14279         -masm=intel.
14280         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14281         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14282         %g1 and one with %0 and %1.
14283         (avx512er_vmrcp28<mode><round_saeonly_name>,
14284         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14285         %1 for -masm=intel.
14286         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14287         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14288         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14289         of %0 and %{%4%} for -masm=intel.
14290         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14291         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14292         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14293         order of %0 and %{%5%}%{z%} for -masm=intel.
14295 2018-04-17  Jan Hubicka  <jh@suse.cz>
14297         PR lto/85405
14298         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14300 2018-04-17  Martin Liska  <mliska@suse.cz>
14302         PR ipa/85329
14303         * multiple_target.c (create_dispatcher_calls): Set apostrophes
14304         for target_clone error message.  Make default implementation
14305         clone to be a local declaration.
14306         (separate_attrs): Add new argument and check for an empty
14307         string.
14308         (expand_target_clones): Handle it.
14309         (ipa_target_clone): Make redirection just for target_clones
14310         functions.
14312 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
14313             Tom de Vries  <tom@codesourcery.com>
14315         PR middle-end/84955
14316         * omp-expand.c (expand_oacc_for): Add dummy false branch for
14317         tiled basic blocks without omp continue statements.
14319 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
14321         PR target/83660
14322         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14323         vec_extract expression as having side effects to make sure it gets
14324         a cleanup point.
14326 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
14328         PR target/85403
14329         * config/i386/i386.c (get_builtin_code_for_version): Check
14330         error_mark_node.
14332 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
14334         PR target/84331
14335         * config.gcc: Support "skylake".
14336         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14337         PROCESSOR_SKYLAKE.
14338         * config/i386/i386.c (m_SKYLAKE): Define.
14339         (processor_target_table): Add "skylake".
14340         (ix86_option_override_internal): Add "skylake".
14341         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14342         PROCESSOR_CANNONLAKE.
14343         (get_builtin_code_for_version): Fix priority for
14344         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14345         PROCESSOR_SKYLAKE-AVX512.
14346         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14347         (processor_type): Add PROCESSOR_SKYLAKE.
14349 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
14350             Jason Merrill  <jason@redhat.com>
14352         PR c++/85112
14353         * convert.c (convert_to_integer_1): Use direct recursion for
14354         enumeral types and types with a precision less than the number
14355         of bits in their mode.
14357 2018-04-16  Julia Koval  <julia.koval@intel.com>
14359         PR target/84413
14360         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14361         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14363 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
14365         PR target/85293
14366         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14367         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14368         and -mno-direct-move.
14370 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
14372         PR target/83402
14373         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14374         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14375         Ensure negative shifts result in {0}.
14377 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
14379         PR rtl-optimization/79916
14380         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14381         regs (if any) to define how to gnerate SD moves when LRA is in
14382         progress.
14384 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
14386         PR rtl-optimization/85393
14387         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14388         * except.c (expand_dw2_landing_pad_for_region): Make static.
14389         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14390         a label and unconditional jump to old_bb, rather than
14391         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14392         basic block.
14394         PR rtl-optimization/85376
14395         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14396         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14397         instead of a specific value.
14399 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14400             Bin Cheng  <bin.cheng@arm.com>
14402         PR tree-optimization/82965
14403         PR tree-optimization/83991
14404         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14405         by_profile_only parameter.
14406         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14407         information if the loop was predicted to iterate too many times.
14408         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14410 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14412         PR lto/71991
14413         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14414         always inline.
14416 2018-04-13  Martin Liska  <mliska@suse.cz>
14417             Jakub Jelinek  <jakub@redhat.com>
14419         PR middle-end/81657
14420         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14421         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14422         * builtins.c (expand_builtin_memory_copy_args): Use
14423         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14424         handle dest_addr == pc_rtx.
14426 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
14428         PR target/85291
14429         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14430         asked to not generate direct moves.
14431         (fix_trunc<mode>si2_stfiwx): Similar.
14432         (fix_trunc<mode>si2_internal): Similar.
14434 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14436         PR debug/83157
14437         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14438         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14439         lookup if dest in some wider mode is known to be const0_rtx and
14440         if so, record permanent equivalence for it to be ZERO_EXTEND of
14441         the narrower mode destination.
14443 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14445         * lto-streamer-out.c (output_function): Revert 259346.
14446         * omp-expand.c (expand_oacc_for): Likewise.
14448 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
14450         PR rtl-optimization/85354
14451         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14452         * sel-sched.c (sel_global_init): ... here.
14454 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
14456         PR target/85238
14457         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14458         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14459         mode for PE-COFF targets.
14460         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14461         (i386_pe_asm_lto_end): Likewise.
14462         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14463         (TARGET_ASM_LTO_END): Likewise.
14464         * config/i386/winnt.c (saved_debug_info_level): New static variable.
14465         (i386_pe_asm_lto_start): New function.
14466         (i386_pe_asm_lto_end): Likewise.
14468 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14469             Richard Biener  <rguenther@suse.de>
14471         PR middle-end/84955
14472         * lto-streamer-out.c (output_function): Fix CFG loop state before
14473         streaming out.
14474         * omp-expand.c (expand_oacc_for): Handle calls to internal
14475         functions like regular functions.
14477 2018-04-12  Richard Biener  <rguenther@suse.de>
14479         PR lto/85371
14480         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14481         for the early LTO debug to properly generate references to it
14482         during DIE emission.  Do not re-use that for the skeleton for
14483         split-dwarf.
14484         (dwarf2out_early_finish): Likewise.
14486 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14488         PR target/85328
14489         * config/i386/sse.md
14490         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14491         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14492         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14493         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14494         and output is a reg, avoid creating invalid lowpart subreg, but
14495         instead split into a 512-bit move.  Don't split if not AVX512VL,
14496         input is xmm16+ reg and output is a mem.
14497         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14498         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14499         xmm16+ reg and output is a mem.
14501 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14503         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14504         also for flag_dwarf2_cfi_asm.
14506 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14508         PR rtl-optimization/85342
14509         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14510         a bool scalar var inside of the loop instead.  Don't try to update
14511         recog_data.operand after failed apply_change_group.
14513 2018-04-12  Tom de Vries  <tom@codesourcery.com>
14515         PR target/85296
14516         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14517         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
14518         array with flexible array member as array without given dimension.
14519         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14520         argument for undefined param to true.
14522 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
14524         PR target/85321
14525         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14526         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14527         from PowerPC section.
14528         * config/rs6000/sysv4.opt (mcall-): Improve help text.
14529         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14530         help text that is too long.
14531         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14532         help text that is too long.
14533         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14534         help text that is too long.
14536 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
14538         * config/alpha/alpha.md (stack_probe_internal): Rename
14539         from "probe_stack".  Update all callers.
14541 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14543         PR rtl-optimization/84566
14544         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14545         sched_macro_fuse_insns.
14547 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14549         PR target/84301
14550         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14551         (compute_block_dependences): ... from here.
14553 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14555         PR tree-optimization/85331
14556         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14557         from int to HOST_WIDE_INT.
14559 2018-04-11  Martin Jambor  <mjambor@suse.cz>
14561         PR ipa/84149
14562         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14563         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14564         not the same as the source val.
14565         (cgraph_edge_brings_value_p): New parameter.
14566         (gather_edges_for_value): Pass destination value to
14567         cgraph_edge_brings_value_p.
14568         (perhaps_add_new_callers): Likewise.
14569         (get_info_about_necessary_edges): Likewise and exclude values brought
14570         only by self-recursive edges.
14571         (create_specialized_node): Redirect only clones of self-calling edges.
14572         (+self_recursive_pass_through_p): New function.
14573         (find_more_scalar_values_for_callers_subset): Use it.
14574         (find_aggregate_values_for_callers_subset): Likewise.
14575         (known_aggs_to_agg_replacement_list): Removed.
14576         (decide_whether_version_node): Re-calculate known constants for all
14577         remaining context clones.
14579 2018-04-11  Richard Biener  <rguenther@suse.de>
14581         PR lto/85339
14582         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14583         from early DWARF output.
14584         (dwarf2out_early_finish): Output line info unconditionally into
14585         early DWARF and add reference to it.
14587 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14589         PR target/85281
14590         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14591         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14592         other than V2DFmode using iptr mode attribute.
14593         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14595 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14597         PR rtl-optimization/84659
14598         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14600 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14602         PR debug/85302
14603         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14604         SIZEP is NULL.
14605         (output_loc_list): Pass address of a dummy size variable even in the
14606         locview handling loop.
14607         (index_location_lists): Add comment on why skip_loc_list_entry can't
14608         call size_of_locs.
14610 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14612         PR target/85261
14613         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14614         into register.
14616 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
14618         PR target/85321
14619         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14620         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14621         and -mstring-compare-inline-limit.
14623 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14625         PR target/85287
14626         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14627         for stack clash protection in a register whenever we need it to be in
14628         a register.
14630 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14632         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14633         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14635 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14637         PR target/85321
14638         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14639         the help text.
14640         (mlong-double-): Ditto.
14641         * config/rs6000/sysv4.opt (msdata=): Ditto.
14642         (mtls-size=): Ditto.
14644 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14646         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14647         erroneous entries for
14648         "vector int vec_ldl (int, long int *)", and
14649         "vector unsigned int vec_ldl (int, unsigned long int *)".
14650         Add comments and entries for
14651         "vector bool char vec_ldl (int, bool char *)",
14652         "vector bool short vec_ldl (int, bool short *)",
14653         "vector bool int vec_ldl (int, bool int *)",
14654         "vector bool long long vec_ldl (int, bool long long *)",
14655         "vector pixel vec_ldl (int, pixel *)",
14656         "vector long long vec_ldl (int, long long *)",
14657         "vector unsigned long long vec_ldl (int, unsigned long long *)".
14658         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
14659         type tree bool_long_long_type_node and correct definition of
14660         bool_V2DI_type_node to make reference to this new type tree.
14661         (rs6000_mangle_type): Replace erroneous reference to
14662         bool_long_type_node with bool_long_long_type_node.
14663         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
14664         comments to emphasize sign distinctions for char and int types and
14665         replace RS6000_BTI_bool_long constant with
14666         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
14667         use of RS6000_BTI_pixel.
14668         (bool_long_type_node): Remove this macro definition.
14669         (bool_long_long_type_node): New macro definition
14671 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
14673         PR rtl-optimization/85300
14674         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
14675         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
14676         simplify_unary_operation fails.
14678 2018-04-10  Martin Liska  <mliska@suse.cz>
14680         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
14681         cgraph_edge and ipa_ref.
14683 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
14685         PR target/85177
14686         PR target/85255
14687         * config/i386/sse.md
14688         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
14689         computation of the VEC_MERGE selector from mask.
14690         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
14691         Fix decoding of the VEC_MERGE selector into mask.
14693 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
14695         PR tree-optimization/85286
14696         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
14698 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
14700         * final.c (final_1): Set insn_last_address as well as
14701         insn_current_address.
14703 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14705         PR target/85173
14706         * explow.c (emit_stack_probe): Call validize_mem on memory location
14707         before passing it to gen_probe_stack.  Create address operand and
14708         legitimize it for the probe_stack_address case.
14710 2018-04-09  Jan Hubicka  <jh@suse.cz>
14712         PR lto/85078
14713         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
14714         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
14715         * tree.c (free_lang_data_in_type): Fix handling of binfos;
14716         walk basetypes.
14717         (free_lang_data): Rebuild type inheritance graph.
14719 2018-04-09  Martin Sebor  <msebor@redhat.com>
14721         * invoke.texi (-finline-small-functions): Mention other optimization
14722         options.
14723         (-findirect-inlining, -fpartial-inlining): Same.
14724         (-finline-functions-called-once): Same.
14725         (-freorder-blocks-and-partition): Same.
14727 2018-04-09  Jan Hubicka  <jh@suse.cz>
14729         PR rtl/84058
14730         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
14731         jumps; choose last target that matches the criteria (i.e.
14732         no partition changes for non-crossing jumps).
14733         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
14734         support for redirecting crossing jumps to non-crossing.
14736 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
14738         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
14739         also for naked functions.
14741 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
14743         * config/arc/arc.md (add_shift): New pattern.
14744         (add_shift2): Likewise.
14745         (sub_shift): Likewise.
14746         (sub_shift_cmp0_noout): Likewise.
14747         (compare_si_ashiftsi): Likewise.
14748         (xbfu_cmp0_noout): New combine pattern.
14749         (xbfu_cmp0"): Likewise.
14750         (movsi_set_cc_insn): Place the predicable variant first.
14751         (commutative_binary_cmp0_noout): Remove clobber.
14752         (commutative_binary_cmp0): New pattern.
14753         (noncommutative_binary_cmp0): Likewise.
14754         (noncommutative_binary_cmp0_noout): Likewise.
14755         (noncommutative_binary_comparison_result_used): Removed.
14756         (rsub_cmp0): New pattern.
14757         (rsub_cmp0_noout): Likewise.
14758         (extzvsi): Changed, keep only meaningful variants.
14759         (SQH, SEZ): New iterators.
14760         (SQH_postfix): New mode attribute.
14761         (SEZ_prefix): New code attribute.
14762         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
14763         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
14764         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
14765         of numerical value.
14766         (noncommutative_operator): Check the availability of barrel
14767         shifter option.
14769 2018-04-09  Richard Biener  <rguenther@suse.de>
14771         PR tree-optimization/85284
14772         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
14773         Only use the niter constraining form of simple_iv when the exit
14774         is always executed.
14776 2018-04-09  Tom de Vries  <tom@codesourcery.com>
14778         PR target/84041
14779         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
14780         (define_expand "*memory_barrier"): New define_expand.
14781         (define_insn "memory_barrier"): New insn.
14783 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14785         PR rtl-optimization/80463
14786         PR rtl-optimization/83972
14787         PR rtl-optimization/83480
14789         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
14790         correct producer for the insn.
14791         (tidy_control_flow): Fixup seqnos in case of debug insns.
14793 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14795         PR rtl-optimization/83913
14797         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
14798         different sched-times when merging exprs.
14800 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14802         PR rtl-optimization/83962
14804         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
14805         tidy_fallthru_edge and tidy_control_flow.
14807 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
14809         PR rtl-optimization/83530
14811         * sel-sched.c (force_next_insn): New global variable.
14812         (remove_insn_for_debug): When force_next_insn is true, also leave only
14813         next insn in the ready list.
14814         (sel_sched_region): When the region wasn't scheduled, make another pass
14815         over it with force_next_insn set to 1.
14817 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14819         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
14820         into tm_file.
14821         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14822         for interrupt control.
14823         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14824         functions for interrupt control.
14825         * config/nds32/nds32-intrinsic.md: Likewise.
14826         * config/nds32/nds32_intrinsic.h: Likewise.
14827         * config/nds32/nds32.h (nds32_builtins): Likewise.
14829 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14831         * config/nds32/nds32.c (nds32_init_machine_status,
14832         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
14833         strict_aligned_p field.
14834         (nds32_expand_to_rtl_hook): New function.
14835         (TARGET_EXPAND_TO_RTL_HOOK): Define.
14836         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
14838 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14839             Chung-Ju Wu  <jasonwucj@gmail.com>
14841         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
14842         * config/nds32/nds32-n7.md: New file.
14843         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
14844         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
14845         pipeline.
14846         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
14847         * config/nds32/nds32.md (pipeline_model): Add n7.
14848         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
14849         * config/nds32/pipelines.md: Include n7 settings.
14851 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14852             Chung-Ju Wu  <jasonwucj@gmail.com>
14854         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
14855         * config/nds32/nds32-e8.md: New file.
14856         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
14857         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
14858         pipeline.
14859         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
14860         * config/nds32/nds32.md (pipeline_model): Add e8.
14861         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
14862         * config/nds32/pipelines.md: Include e8 settings.
14864 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14865             Chung-Ju Wu  <jasonwucj@gmail.com>
14867         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
14868         * config/nds32/nds32-n8.md: New file.
14869         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
14870         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
14871         pipeline.
14872         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
14873         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
14874         * config/nds32/nds32.md (pipeline_model): Add n8.
14875         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
14876         * config/nds32/pipelines.md: Include n8 settings.
14878 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
14879             Chung-Ju Wu  <jasonwucj@gmail.com>
14881         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
14882         * config/nds32/nds32-n9-2r1w.md: New file.
14883         * config/nds32/nds32-n9-3r2w.md: New file.
14884         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
14885         nds32_register_ports): New or modify for cpu n9.
14886         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
14887         pipeline.
14888         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
14889         * config/nds32/nds32-utils.c: New file.
14890         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
14891         TARGET_MUL_SLOW): Define.
14892         * config/nds32/nds32.md (pipeline_model): New attribute.
14893         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
14894         New options that support cpu n9.
14895         * config/nds32/pipelines.md: Include n9 settings.
14896         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
14898 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
14900         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
14901         information if necessary.
14902         (output_cond_branch_compare_zero): Likewise.
14903         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
14904         (nds32_target_alignment): Refine for alignment.
14905         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
14906         (FUNCTION_BOUNDARY): Modify.
14907         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
14908         align case.
14909         * config/nds32/nds32.opt (malways-align, malign-functions): New.
14911 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
14913         * config/nds32/constants.md (unspec_volatile_element): Add values for
14914         TLB operation and data prefetch.
14915         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
14916         functions for TLB operation and data prefetch.
14917         * config/nds32/nds32-intrinsic.md: Likewise.
14918         * config/nds32/nds32_intrinsic.h: Likewise.
14919         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
14920         (nds32_print_operand): Likewise.
14921         * config/nds32/nds32.h (nds32_builtins): Likewise.
14923 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
14924         Andrew Pinski <pinsika@gcc.gnu.org>
14926         PR middle-end/82976
14927         * match.pd: Use constant_boolean_node of correct type instead of
14928         boolean_true_node or boolean_false_node for simplifying
14929         pointer comparisons to zero.
14931 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14933         PR tree-optimization/80021
14934         * tree.c (verify_type_variant): Make error call in verify_variant_match
14935         translatable and remove final full stop.
14937 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14939         * config/nds32/constants.md (unspec_volatile_element): Add
14940         UNSPEC_VOLATILE_EH_RETURN.
14941         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
14942         nds32_output_stack_pop): Support dwarf exception handling process.
14943         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
14944         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
14945         exception handling process.
14946         (nds32_compute_stack_frame): Likewise.
14947         (nds32_return_addr_rtx): Likewise.
14948         (nds32_initial_elimination_offset): Likewise.
14949         (nds32_expand_prologue): Likewise.
14950         (nds32_expand_epilogue): Likewise.
14951         (nds32_dynamic_chain_address): New function.
14952         * config/nds32/nds32.h (machine_function): Add fields for dwarf
14953         exception handling.
14954         (DYNAMIC_CHAIN_ADDRESS): Define.
14955         (EH_RETURN_DATA_REGNO): Define.
14956         (EH_RETURN_STACKADJ_RTX): Define.
14957         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
14958         patterns for dwarf exception handling.
14960 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
14962         * config/nds32/nds32.h: Clean up obsolete macros.
14964 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14966         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14967         Add enum values for particular instructions.
14968         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14969         particular intrinsic functions.
14970         * config/nds32/nds32-intrinsic.md: Likewise.
14971         * config/nds32/nds32_intrinsic.h: Likewise.
14972         * config/nds32/nds32.h (nds32_builtins): Likewise.
14973         * config/nds32/nds32.md (type): Add pbsad and pbsada.
14974         (btst, ave): New patterns for particular instructions.
14976 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14978         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
14979         Add enum values for atomic load/store and memory sync.
14980         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
14981         and memory sync.
14982         * config/nds32/nds32-intrinsic.md: Likewise.
14983         * config/nds32/nds32_intrinsic.h: Likewise.
14984         * config/nds32/nds32.h (nds32_builtins): Likewise.
14986 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
14988         PR tree-optimization/85257
14989         * fold-const.c (native_encode_vector): If not all elts could fit
14990         and off is -1, return 0 rather than offset.
14991         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
14992         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
14993         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
14994         adjust buffer in native_interpret_expr call.
14996 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
14998         * config/nds32/constants.md (unspec_volatile_element): Add cache
14999         control enum values.
15000         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15001         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15002         * config/nds32/nds32.c (nds32_cctl_names): New.
15003         (nds32_print_operand): Handle cache control register names.
15004         * config/nds32/nds32.h (nds32_builtins): New enum values.
15005         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15006         macros.
15007         * config/nds32/nds32.md (type): Add mmu.
15008         * config/nds32/pipelines.md (simple_insn): Add mmu.
15010 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15012         * config/nds32/nds32.md (type): Remove call.
15013         * config/nds32/pipelines.md (simple_insn): Likewise.
15015 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15017         * config/nds32/constants.md (unspec_volatile_element): Add
15018         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15019         UNSPEC_VOLATILE_FMFCFG.
15020         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15021         description for fmfcfg and fmfcsr.
15022         (bdesc_1arg): Add fmtcsr.
15023         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15024         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15025         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15026         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15027         unspec_fmfcfg): New patterns.
15028         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15029         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15030         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15031         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15032         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15033         __nds32__fmfcfg): Define.
15035 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15037         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15038         intrinsic register names.
15039         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15040         intrinsic register enum values and macros.
15042 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15044         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15045         for load/store addressing form.
15046         (nds32_print_operand_address): Likewise.
15048 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
15050         PR target/85196
15051         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15052         based on LABEL_REF.  Remove useless assertion.
15053         (pic_address_needs_scratch): Fix formatting.
15054         (sparc_legitimize_pic_address): Minor tweaks.
15055         (sparc_delegitimize_address): Adjust assertion accordingly.
15056         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15057         into symbolic_operand.
15058         (movsi_high_pic_label_ref): Likewise.
15059         (movsi_lo_sum_pic_label_ref): Likewise.
15060         (movdi_pic_label_ref): Likewise.
15061         (movdi_high_pic_label_ref): Likewise.
15062         (movdi_lo_sum_pic_label_ref): Likewise.
15064 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
15066         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15067         custom LIB_SPEC setup.
15069 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
15070             Kito Cheng  <kito.cheng@gmail.com>
15072         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15073         * config/riscv/freebsd.h: New.
15075 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15077         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15078         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15079         file.
15081 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15082             Kito Cheng  <kito.cheng@gmail.com>
15084         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15085         nds32_output_call, nds32_symbol_binds_local_p): New functions.
15086         * config/nds32/nds32-protos.h (nds32_output_call,
15087         nds32_output_return): Declare.
15088         * config/nds32/nds32.md: Refine all the call and return patterns.
15090 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15092         PR debug/85252
15093         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15094         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15096         PR rtl-optimization/84872
15097         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15098         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15099         EDGE_CROSSING edge.
15101 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
15103         * expr.c (copy_blkmode_to_reg): Revert 254862.
15104         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15106 2018-04-06  Richard Biener  <rguenther@suse.de>
15108         PR middle-end/85244
15109         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15110         after seeing a component reference with an adjacent field.  Treat
15111         refs to arrays at struct end of external decls similar to
15112         refs to unconstrained commons.
15114 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15116         PR sanitizer/85213
15117         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15118         look through SAVE_EXPRs with non-side-effects argument.  Adjust
15119         recursive calls.
15120         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15121         save_p here.
15123 2018-04-06  Richard Biener  <rguenther@suse.de>
15125         PR middle-end/85180
15126         * alias.c (find_base_term): New wrapper around find_base_term
15127         unwinding CSELIB_VAL_PTR changes.
15128         (find_base_term): Do not restore CSELIB_VAL_PTR during the
15129         recursion.
15131 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15133         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15134         instructions.
15135         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15136         constant definitions.
15137         ("nop"): lr 0,0 -> nopr r0
15138         ("nop_lr0", "nop_lr1"): New insn definitions.
15140 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15142         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15143         NDS32_V3PUSH_AVAILABLE_P macro.
15145 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
15146             Chung-Ju Wu  <jasonwucj@gmail.com>
15148         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15149         (nds32*-*-*): Add float and fpu_config into supported_defaults.
15150         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15151         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15152         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15153         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15154         * config/nds32/constraints.md: New constraints and checking for hard
15155         float configuration.
15156         * config/nds32/iterators.md: New mode iterator and attribute for hard
15157         float configuration.
15158         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15159         patterns.
15160         * config/nds32/nds32-fpu.md: New file.
15161         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15162         deal with hard float code generation.
15163         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15164         ARCH_V3S.
15165         (abi_type, float_reg_number): New enum type.
15166         * config/nds32/nds32-predicates.c: New predicates for hard float.
15167         * config/nds32/nds32-protos.h: Declare functions for hard float.
15168         * config/nds32/nds32.c: Implementation for hard float configuration.
15169         * config/nds32/nds32.h: Definitions for hard float configuration.
15170         * config/nds32/nds32.md: Include hard float machine description and
15171         modify patterns for hard float configuration.
15172         * config/nds32/nds32.opt: New options for hard float configuration.
15173         * config/nds32/predicates.md: New predicates for hard float
15174         configuration.
15176 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15178         * common/config/nds32/nds32-common.c
15179         (nds32_option_optimization_table): Enable -mreleax-hint by default.
15181 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
15183         PR middle-end/85195
15184         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15185         CONSTRUCTOR_ELT (ctor, ...)->value.
15187 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
15189         PR target/85193
15190         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15192 2018-04-05  Tom de Vries  <tom@codesourcery.com>
15194         PR target/85204
15195         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15196         cond jump.
15198 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15199             Kito Cheng  <kito.cheng@gmail.com>
15201         * config/nds32/constraints.md (U33): Fine-tune checking condition.
15202         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15203         * config/nds32/nds32.h (nds32_16bit_address_type): Add
15204         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15206 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15207             Kito Cheng  <kito.cheng@gmail.com>
15209         * config/nds32/constraints.md (Ufe): New memory constraint.
15210         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15211         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15212         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15213         operands.
15214         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15215         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15217 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15219         * config/nds32/nds32.md: Use optimize_size in the condition for
15220         alu-shift instructions.
15222 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15224         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15226 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15228         * config/nds32/nds32.md (negsi2): Refine pattern.
15230 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15231             Chung-Ju Wu  <jasonwucj@gmail.com>
15233         * config/nds32/iterators.md (shift_rotate): New code iterator.
15234         (shift): New code attribute.
15235         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15236         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15237         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15238         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15239         bit-wise operations.
15240         (andsi3, *andsi3): Ditto.
15241         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15242         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15243         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15244         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15245         nds32_ior_operand, nds32_xor_operand): New predicates.
15247 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15249         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15250         (addsi3, subsi3): ... this.
15252 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15254         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15256 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15258         * config/nds32/nds32.md: Adjust indention.
15260 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15262         * config/nds32/nds32.md (feature): New attribute.
15264 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15266         * config/nds32/nds32.md (subtype): New attribute.
15268 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15270         PR target/85203
15271         * config/arm/arm-builtins.c (arm_expand_builtin): Change
15272         expansion to perform a bitwise AND of the argument followed by a
15273         boolean negation of the result.
15275 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
15277         PR rtl-optimization/84878
15278         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15279         the basic block.  Assert the use reference is not artificial and that
15280         it has an associated insn.
15282 2018-04-04  Michael Matz  <matz@suse.de>
15284         * builtins.c (compute_objsize): Pass correct operand
15285         to array_at_struct_end_p.
15287 2018-04-04  Richard Biener  <rguenther@suse.de>
15289         PR lto/85176
15290         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15291         from contexts for DINFO_LEVEL_TERSE and below.
15293 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15295         * config/nds32/nds32-doubleword.md (move_<mode>): Require
15296         resiter_operand condition.
15297         * config/nds32/nds32.md (*move<mode>): Ditto.
15299 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15300             Monk Chiang  <sh.chiang04@gmail.com>
15302         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15304 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15306         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15308 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15309             Kito Cheng  <kito.cheng@gmail.com>
15311         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15312         nds32_cond_code_str, output_cond_branch,
15313         output_cond_branch_compare_zero, nds32_expand_cbranch,
15314         nds32_expand_cstore, nds32_expand_movcc,
15315         nds32_output_cbranchsi4_equality_zero,
15316         nds32_output_cbranchsi4_equality_reg,
15317         nds32_output_cbranchsi4_equality_reg_or_const_int,
15318         nds32_output_cbranchsi4_greater_less_zero: New functions.
15319         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15320         nds32_expand_cstore, nds32_expand_movcc,
15321         nds32_output_cbranchsi4_equality_zero,
15322         nds32_output_cbranchsi4_equality_reg,
15323         nds32_output_cbranchsi4_equality_reg_or_const_int,
15324         nds32_output_cbranchsi4_greater_less_zero): Declare.
15325         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15326         nds32_rimm11s_operand): New predicates.
15327         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15328         * config/nds32/nds32.md: Rewrite all the branch and conditional move
15329         patterns.
15331 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15333         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15334         * config/nds32/nds32.md: Ditto.
15335         * config/nds32/pipelines.md: Ditto.
15337 2018-04-04  Richard Biener  <rguenther@suse.de>
15339         PR tree-optimization/85168
15340         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15341         propagating abnormals.
15343 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15345         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15347 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15348             Kito Cheng  <kito.cheng@gmail.com>
15350         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15351         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15352         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15353         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15354         * config/nds32/nds32.md (sibcall_internal): New.
15355         (sibcall_register): Remove.
15356         (sibcall_immediate): Remove.
15357         (sibcall_value_internal): New.
15358         (sibcall_value_register): Remove.
15359         (sibcall_value_immediate): Remove.
15360         * config/nds32/predicates.md (nds32_general_register_operand): New.
15361         (nds32_call_address_operand): New.
15363 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15365         PR rtl-optimization/85167
15366         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15367         bb_defs if *split_p, instead preinitialize it to NULL.
15369         PR tree-optimization/85156
15370         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15371         evaluating the argument multiple times.
15373 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
15375         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15376         than vector.
15377         (_mm_cvtpd_ps): Likewise.
15378         (_mm_cvttpd_epi32): Likewise.
15379         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15380         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15381         vector, pixel, and bool following altivec.h include.
15383 2018-04-03  Martin Sebor  <msebor@redhat.com>
15385         * doc/extend.texi (Common Function Attributes): Clarify.
15386         (const attribute): Likewise.
15387         (pure attribute): Likewise.
15389 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15391         PR target/85169
15392         * config/i386/i386.c (ix86_expand_vector_set): Use
15393         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
15395 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
15397         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15398         instructions when changing rounding bits to preserve precision bits
15399         in the x87 control word.
15401 2018-04-03  Martin Liska  <mliska@suse.cz>
15403         PR tree-optimization/82491
15404         * rtl.h (strip_offset_and_add): Replace += suboffset with
15405         poly_uint64 () + suboffset.
15407 2018-03-29  Martin Liska  <mliska@suse.cz>
15408             Martin Jambor  <mjambor@suse.cz>
15410         PR ipa/84947
15411         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15412         param_type is not an integral or pointer type.
15414 2018-04-03  Richard Biener  <rguenther@suse.de>
15416         * sese.h (recompute_all_dominators): Remove.
15418 2018-04-02  Martin Sebor  <msebor@redhat.com>
15420         * doc/invoke.texi (-Wrestrict): Fix typos.
15422 2018-04-02  Jim Wilson  <jimw@sifive.com>
15424         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15425         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15426         (<optab>di3, <optab>si3_extend): Likewise.
15427         (<optab>si3_mask, <optab>si3_mask_1): New.
15428         (<optab>di3_mask, <optab>di3_mask_1): New.
15429         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15430         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15431         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15433 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
15435         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15436         example.
15438 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15440         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15441         (nds32_canonicalize_comparison): New function.
15443 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15444             Kito Cheng  <kito.cheng@gmail.com>
15445             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15447         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15448         * config/nds32/constants.md (unspec_volatile_element): Add
15449         UNSPEC_VOLATILE_RELAX_GROUP.
15450         * config/nds32/nds32-relax-opt.c: New file.
15451         * config/nds32/nds32-predicates.c
15452         (nds32_symbol_load_store_p): New function.
15453         * config/nds32/nds32-protos.h
15454         (nds32_symbol_load_store_p): Declare function.
15455         (make_pass_nds32_relax_opt): Declare new rtl pass function.
15456         * config/nds32/nds32.c
15457         (nds32_register_pass): New function to register pass.
15458         (nds32_register_passes): New function to register passes.
15459         * config/nds32/nds32.md (relax_group): New pattern.
15460         * config/nds32/nds32.opt (mrelax-hint): New option.
15461         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15463 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
15465         * config/nds32/t-nds32: Modify files dependency.
15467 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15469         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15470         (PROFILE_HOOK): Define its implementation.
15472 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15474         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15475         type and 32-bit size.
15477 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
15479         PR middle-end/85090
15480         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15481         (V_128_256): New mode iterator.
15482         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15483         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15484         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15485         of V.
15486         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15487         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15489 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
15491         PR target/83315
15492         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15493         NaN inputs correctly.
15495 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
15497         PR target/80546
15498         * config/rs6000/vsx.md (??r): New mode attribute.
15499         (*vsx_mov<mode>_64bit): Use it.
15500         (*vsx_mov<mode>_32bit): Likewise.
15502 2018-03-30  Martin Sebor  <msebor@redhat.com>
15504         PR tree-optimization/84818
15505         * builtins.c (check_access): Use warning_n.
15507 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15509         PR target/83822
15510         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15511         condition.
15512         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15513         condition.
15515 2018-03-30  Julia Koval  <julia.koval@intel.com>
15517         PR target/84413
15518         * x86-tune.def (movx, partial_reg_dependency): Enable for
15519         m_SKYLAKE_AVX512.
15521 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
15523         PR inline-asm/84985
15524         * lra-constraints.c (process_alt_operands): Move setting
15525         this_alternative_matches below.
15527 2018-03-29  Martin Liska  <mliska@suse.cz>
15529         PR lto/84995.
15530         * doc/invoke.texi: Document how LTO works with debug info.
15531         Describe auto-load support of binutils.  Mention 'x86-64'
15532         as valid option value of -march option.
15534 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
15536         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15538         PR c/85094
15539         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15540         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15541         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15542         checking.
15544 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15546         PR target/84912
15547         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15548         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15549         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15550         for RS6000_BTM_POWERPC64.
15551         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15552         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15553         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15554         definition.
15555         (DIVDE): Use it.
15556         (DIVDEU): Likewise.
15558 2018-03-28  Carl Love  <cel@us.ibm.com>
15560         Revert
15561         2017-09-27  Carl Love  <cel@us.ibm.com>
15563         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15564         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15565         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15566         fctiw instruction.
15568 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15570         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15571         instead of __vector bool.
15572         (_mm_max_pu8): Likewise.
15573         (_mm_min_pi16): Likewise.
15575 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15577         PR target/84912
15578         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15579         (DIVWEUO): Likewise.
15580         (DIVDEO): Likewise.
15581         (DIVDEUO): Likewise.
15582         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15583         DIVWEUO and DIVDEUO.
15584         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15585         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15586         (div_extend): Likewise.
15587         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15588         builtin function.
15589         (__builtin_divweuo): Likewise.
15590         (__builtin_divdeo): Likewise.
15591         (__builtin_divdeuo): Likewise.
15593 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15595         PR target/85095
15596         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15597         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15599         PR tree-optimization/82004
15600         * gimple-match-head.c (optimize_pow_to_exp): New function.
15601         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15602         Don't fold to exp if optimize_pow_to_exp is false.
15604 2018-03-28  Martin Liska  <mliska@suse.cz>
15606         PR other/84819
15607         * calls.c (initialize_argument_information): Fix trailing space.
15608         * common.opt: Fix typo and provide better explanation for
15609         -fsanitize-coverage option.
15610         * config/i386/i386.opt: Fix typo.
15612 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15613             Martin Liska  <mliska@suse.cz>
15615         PR sanitizer/85081
15616         * gimplify.c (asan_poison_variable): Don't do the check for
15617         gimplify_omp_ctxp here.
15618         (gimplify_decl_expr): Do it here.
15619         (gimplify_target_expr): Likewise.
15621 2018-03-28  Martin Liska  <mliska@suse.cz>
15623         PR target/84988
15624         * config/i386/i386.c (ix86_function_arg_advance): Do not call
15625         chkp_type_bounds_count if MPX is not enabled.
15627 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15629         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15631 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
15633         PR target/84914
15634         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15635         function to create the function decl for complex long double
15636         multiply and divide for -mabi=ieeelongdouble.
15637         (init_float128_ieee): Call it.
15639 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
15641         PR target/85044
15642         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15643         -fcf-protection=branch -mibt.
15644         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15646 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15648         PR target/81863
15649         * config/arm/arm.c (arm_valid_symbolic_address): Handle
15650         arm_word_relocations.
15652 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
15654         PR target/85056
15655         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
15656         extern array declarations.
15658 2018-03-27  Richard Biener  <rguenther@suse.de>
15660         PR middle-end/84067
15661         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
15662         explicit single_use checks.
15664 2018-03-27  Richard Biener  <rguenther@suse.de>
15666         PR tree-optimization/85082
15667         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
15668         Valueize the VUSE.
15670 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15672         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
15673         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
15674         Turn on fasynchronous-unwind-tables and funwind-tables.
15676 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
15678         PR target/85073
15679         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
15680         (*bmi_blsr_<mode>_ccz): Ditto.
15682 2018-03-26  Tom de Vries  <tom@codesourcery.com>
15684         PR tree-optimization/85063
15685         * omp-general.c (offloading_function_p): New function.  Factor out
15686         of ...
15687         * omp-offload.c (pass_omp_target_link::gate): ... here.
15688         * omp-general.h (offloading_function_p): Declare.
15689         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
15690         with attribute omp declare target for offloading functions.
15692 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
15694         PR tree-optimization/84005
15695         * tree-data-ref.h (get_base_for_alignment): Declare.
15696         * tree-data-ref.c (get_base_for_alignment_1): New function.
15697         (get_base_for_alignment): Likewise.
15698         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
15699         get_base_for_alignment to find a suitable base object, instead
15700         of always using drb->base_address.
15702 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
15704         PR inline-asm/85022
15705         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
15706         known size by default.
15708 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
15710         PR inline-asm/85030
15711         * lra-constraints.c (process_alt_operands): Don't match BLKmode
15712         and non BLKmode operands.
15714 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15716         PR target/85026
15717         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
15718         Clean up attributes.
15720 2018-03-23  Richard Biener  <rguenther@suse.de>
15722         PR debug/85020
15723         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
15724         we are going to emit early debug for LTO.
15726 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
15728         PR inline-asm/85034
15729         * function.c (match_asm_constraints_1): Don't optimize if input
15730         doesn't satisfy general_operand predicate for output's mode.
15732         PR inline-asm/85022
15733         * alias.c (write_dependence_p): Don't require for x_canonicalized
15734         non-VOIDmode if x has VOIDmode.
15736         PR sanitizer/85029
15737         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
15738         just don't try to optimize it rather than assert it never happens.
15740 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15742         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
15743         macro expansions for definition of ST_INTERNAL_<mode> and
15744         LD_INTERNAL_<mode> builtins.
15745         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
15746         Remove prototype.
15747         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
15748         function.
15749         (altivec_expand_st_builtin): Likewise.
15750         (altivec_expand_builtin): Remove calls to deleted functions.
15751         (rs6000_address_for_altivec): Delete this function.
15752         * config/rs6000/vector.md: Remove expands for
15753         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
15755 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
15757         PR target/84826
15758         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
15759         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
15760         re-computing once computed.
15761         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
15762         (arm_init_machine_status): Initialize
15763         machine->static_chain_stack_bytes.
15765 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15767         PR target/84760
15768         * doc/extend.texi: Add four new prototypes for vec_ld.
15769         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
15770         definitions for more logical presentation.
15771         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
15772         entries for V1TI variants of __builtin_altivec_ld builtin.
15773         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
15774         handling of V1TI variant of LVX icode pattern.
15775         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
15776         (rs6000_gimple_fold_builtin): Likewise.
15777         (altivec_init_builtins): Add code to define
15778         __builtin_altivec_lvx_v1ti function.
15780 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
15782         PR inline-asm/84941
15783         * function.c (match_asm_constraints_1): Don't do the optimization
15784         if input isn't a REG, SUBREG, MEM or constant.
15786 2018-03-22  Tom de Vries  <tom@codesourcery.com>
15788         PR tree-optimization/84956
15789         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
15790         bb_has_abnormal_pred.
15792 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
15794         PR sanitizer/85018
15795         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
15796         DECL_INITIAL (decl) to decl at the end.
15797         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
15798         adjust the comment.
15800 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
15802         * doc/extend.texi (__builtin_tgmath): Document when complex
15803         integer types are treated as _Complex _Float64.
15805 2018-03-21  Tom de Vries  <tom@codesourcery.com>
15807         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
15809 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15811         PR tree-optimization/84960
15812         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
15813         if it is ENTRY block, move them into single succ of ENTRY in that case.
15815 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
15817         PR tree-optimization/84811
15818         * poly-int.h (poly_span_traits): Remove the T3 parameter and
15819         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
15820         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
15821         (known_subrange_p): Update accordingly.  Cast each value involved
15822         in the size comparison, rather than casting the result of the
15823         subtraction.
15825 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15827         PR tree-optimization/84982
15828         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
15829         by flipping the least significant bit rather than all bits from
15830         bitpos to bitpos + bitsize - 1.
15832 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15834         * doc/extend.texi (Deprecated Features): Remove mention of
15835         long-deleted deprecations.
15837 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15839         PR jit/84288
15840         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
15841         * configure: Regenerate.
15843 2018-03-21  Tom de Vries  <tom@codesourcery.com>
15845         PR tree-optimization/83126
15846         * tree-parloops.c (num_phis): New function.
15847         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
15849 2018-03-21  Nathan Sidwell  <nathan@acm.org>
15851         * doc/extend.texi (Deprecated Features): Update deprecated flags,
15852         mention anon-struct/union members and trailing attributes.
15854 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
15856         PR tree-optimization/84969
15857         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
15858         builtin memset partitions if they set different rhs values.
15860 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
15862         PR rtl-optimization/84989
15863         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
15864         VEC_DUPLICATE with scalar result mode.
15866 2018-03-21  Martin Liska  <mliska@suse.cz>
15868         PR ipa/84963
15869         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
15870         not intended return statement.
15872 2018-03-21  Martin Liska  <mliska@suse.cz>
15874         PR target/84988
15875         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
15876         (chkp_find_bound_slots_1): Limit number of iterations.
15878 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
15880         PR target/84838
15881         * Minor grammar fixes for x86 options.
15883 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15885         PR debug/84875
15886         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
15887         holding REG_CFA_RESTORE notes, instead turn them into a USE.
15889 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
15891         PR target/83789
15892         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
15893         (altivec_lvx_<mode>_1op): Likewise.
15894         (altivec_stvx_<mode>_2op): Likewise.
15895         (altivec_stvx_<mode>_1op): Likewise.
15896         (altivec_lvx_<VM2:mode>): New define_expand.
15897         (altivec_stvx_<VM2:mode>): Likewise.
15898         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
15899         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15900         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
15901         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
15902         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
15903         (rs6000_gen_lvx): Likewise.
15904         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
15905         (altivec_expand_stv_builtin): Likewise.
15906         (altivec_expand_builtin): Likewise.
15907         * config/rs6000/vector.md: Likewise.
15909 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15911         PR target/82518
15912         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
15913         BYTES_BIG_ENDIAN.
15915 2018-03-20  Richard Biener  <rguenther@suse.de>
15917         PR target/84986
15918         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
15919         sign-conversions as zero, fall back to standard scalar_stmt
15920         cost for the rest.
15922 2018-03-20  Martin Liska  <mliska@suse.cz>
15924         PR ipa/84825
15925         * predict.c (rebuild_frequencies): Handle case when we have
15926         PROFILE_ABSENT, but flag_guess_branch_prob is false.
15928 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15930         PR target/84990
15931         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
15932         flag_section_anchors.
15933         * varasm.c (use_blocks_for_decl_p): Remove hack for
15934         dw2_force_const_mem.
15936         PR target/84845
15937         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
15938         to ...
15939         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
15940         be created, use lowpart_subreg of operands[0] rather than operands[0]
15941         itself.
15942         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
15943         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
15944         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
15945         and n constraint instead of aarch64_shift_imm_di and Usd.
15946         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
15947         (*aarch64_<optab>_reg_minus<mode>3): ... this.
15949 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
15951         PR target/82989
15952         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
15953         to favor GPR over NEON registers.
15954         (<shift>di3_neon): Likewise.
15956 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15958         PR target/84952
15959         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
15960         (nvptx_process_pars): Emit bar.sync asap and alap.
15962 2018-03-20  Tom de Vries  <tom@codesourcery.com>
15964         PR target/84954
15965         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
15966         seen_label if seen_label is already set.
15968 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
15970         PR target/84945
15971         * config/i386/i386.c (fold_builtin_cpu): For features above 31
15972         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
15973         Use 1U instead of 1.  Formatting fixes.
15975         PR c/84953
15976         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
15977         instead of TREE_TYPE (s1) for the return value.
15979 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
15981         PR tree-optimization/84946
15982         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
15983         bitsize + bitsize in poly_uint64 rather than poly_int64.
15985         PR sanitizer/78651
15986         * dwarf2asm.c: Include fold-const.c.
15987         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
15988         of decl rather than decl itself.
15990         PR rtl-optimization/84643
15991         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
15993 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
15995         PR sanitizer/78651
15996         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
15997         calling assemble_variable.
15999 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
16001         PR target/81647
16002         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16003         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16005 2018-03-19  Jim Wilson  <jimw@sifive.com>
16007         PR bootstrap/84856
16008         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16009         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16010         (riscv_first_stack_step): Likewise.
16011         (riscv_option_override): Use STACK_BOUNDARY instead of
16012         MIN_STACK_BOUNDARY.
16013         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16014         MIN_STACK_BOUNDARY.
16015         (BIGGEST_ALIGNMENT): Set to 128.
16016         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16017         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16018         STACK_BOUNDARY.
16020 2018-03-19  Richard Biener  <rguenther@suse.de>
16022         PR tree-optimization/84933
16023         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16024         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16026 2018-03-19  Richard Biener  <rguenther@suse.de>
16028         PR tree-optimization/84859
16029         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16030         (cond_if_else_store_replacement): Perform sinking operation on
16031         single-store BBs regardless of MAX_STORES_TO_SINK setting.
16032         Generalize what a BB with a single eligible store is.
16034 2018-03-19  Richard Biener  <rguenther@suse.de>
16036         PR tree-optimization/84929
16037         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16038         chrec_is_positive against non-chrec arg.
16040 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
16042         PR target/84711
16043         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16045 2018-03-18  Martin Liska  <mliska@suse.cz>
16047         PR rtl-optimization/84635
16048         * regrename.c (build_def_use): Use matches_mode only when
16049         matches >= 0.
16051 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
16053         PR tree-optimization/84913
16054         * tree-vect-loop.c (vectorizable_reduction): Don't try to
16055         vectorize chains of COND_EXPRs.
16057 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16059         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16061 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16063         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16065 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16067         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16069 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16070             Kito Cheng  <kito.cheng@gmail.com>
16072         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16073         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16074         (nds32_adjust_reg_alloc_order): New function.
16075         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16077 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
16079         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16080         nds32_print_operand, nds32_print_operand_address): Use
16081         HOST_WIDE_INT_PRINT_DEC instead.
16083 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16085         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16087 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
16089         PR target/84902
16090         * config/i386/i386.c (initial_ix86_tune_features,
16091         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16092         unsigned long long.
16093         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16094         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16095         rather than 1u << ix86_tune.  Formatting fix.
16096         (ix86_option_override_internal): Change ix86_arch_mask from
16097         unsigned int to unsigned HOST_WIDE_INT, initialize to
16098         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16099         (ix86_function_specific_restore): Likewise.
16101 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16103         PR target/84899
16104         * postreload.c (reload_combine_recognize_pattern): Perform
16105         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16106         truncate_int_for_mode the result for the destination's mode.
16108         PR c/84909
16109         * hsa-gen.c (mem_type_for_type): Fix comment typo.
16110         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16111         Likewise.
16112         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16113         Likewise.
16115 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
16117         PR target/84876
16118         * lra-assigns.c (lra_split_hard_reg_for): Don't use
16119         regno_allocno_class_array and sorted_pseudos.
16120         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16121         insns where regno is used.
16123 2018-03-16  Martin Liska  <mliska@suse.cz>
16125         PR ipa/84833
16126         * multiple_target.c (create_dispatcher_calls): Redirect
16127         reference in the symbol table.
16129 2018-03-16  Martin Liska  <mliska@suse.cz>
16131         PR ipa/84722
16132         * multiple_target.c (create_dispatcher_calls): Redirect also
16133         an alias.
16135 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16137         PR c++/79937
16138         PR c++/82410
16139         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16140         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16141         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16143 2018-03-16  Julia Koval  <julia.koval@intel.com>
16145         * doc/invoke.texi (Skylake Server): Add CLWB.
16146         Cannonlake): Remove CLWB.
16148 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16150         PR tree-optimization/84841
16151         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16152         1 << 3.
16153         (FLOAT_ONE_CONST_TYPE): Define.
16154         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16155         (sort_by_operand_rank): Put entries with higher constant_type last
16156         rather than first to match comments.
16158 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
16160         * config/nios2/nios2.md (movsi_internal): Fix thinko in
16161         split predicate.
16163 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16165         PR c++/79085
16166         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16167         check and use address of target always.
16169 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
16171         PR target/84574
16172         * config/i386/i386.c (indirect_thunk_needed): Update comments.
16173         (indirect_thunk_bnd_needed): Likewise.
16174         (indirect_thunks_used): Likewise.
16175         (indirect_thunks_bnd_used): Likewise.
16176         (indirect_return_needed): New.
16177         (indirect_return_bnd_needed): Likewise.
16178         (output_indirect_thunk_function): Add a bool argument for
16179         function return.
16180         (output_indirect_thunk_function): Don't generate alias for
16181         function return thunk.
16182         (ix86_code_end): Call output_indirect_thunk_function to generate
16183         function return thunks.
16184         (ix86_output_function_return): Set indirect_return_bnd_needed
16185         and indirect_return_needed instead of indirect_thunk_bnd_needed
16186         and indirect_thunk_needed.
16188 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
16190         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16191         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16192         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16194 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
16195             Paul Hua <paul.hua.gm@gmail.com>
16197         PR c/84852
16198         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16200 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
16202         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16203         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16204         resp. SFmode cases.
16206 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
16208         PR target/84711
16209         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16210         instead of GET_MODE_SIZE when comparing Units.
16212 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16214         PR target/68256
16215         * varasm.c (hash_section): Return an unchangeble hash value
16216         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16217         Return !aarch64_can_use_per_function_literal_pools_p ().
16219 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16221         PR target/84860
16222         * optabs.c (emit_conditional_move): Pass address of cmode's copy
16223         rather than address of cmode as last argument to prepare_cmp_insn.
16225 2018-03-15  Julia Koval  <julia.koval@intel.com>
16227         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16228         F_AVX512VNNI, F_AVX512BITALG): New.
16230 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
16232         PR target/83451
16233         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
16234         insn for floating-point loads and stores.
16236 2018-03-14  Carl Love  <cel@us.ibm.com>
16238         * config/rs6000/rs6000-c.c: Add macro definitions for
16239         ALTIVEC_BUILTIN_VEC_PERMXOR.
16240         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16241         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16242         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16243         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16244         UNSPEC_VPERMXOR.
16245         * config/doc/extend.texi: Add prototypes for vec_permxor.
16247 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
16249         PR c/84852
16250         * diagnostic-show-locus.c (class layout_point): Convert m_line
16251         from int to linenum_type.
16252         (line_span::comparator): Use linenum "compare" function when
16253         comparing line numbers.
16254         (test_line_span): New function.
16255         (layout_range::contains_point): Convert param "row" from int to
16256         linenum_type.
16257         (layout_range::intersects_line_p): Likewise.
16258         (layout::will_show_line_p): Likewise.
16259         (layout::print_source_line): Likewise.
16260         (layout::should_print_annotation_line_p): Likewise.
16261         (layout::print_annotation_line): Likewise.
16262         (layout::print_leading_fixits): Likewise.
16263         (layout::annotation_line_showed_range_p): Likewise.
16264         (struct line_corrections): Likewise for field m_row.
16265         (line_corrections::line_corrections): Likewise for param "row".
16266         (layout::print_trailing_fixits): Likewise.
16267         (layout::get_state_at_point): Likewise.
16268         (layout::get_x_bound_for_row): Likewise.
16269         (layout::print_line): Likewise.
16270         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16271         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16272         * input.c (selftest::test_linenum_comparisons): New function.
16273         (selftest::input_c_tests): Call it.
16274         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16275         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16276         * selftest.h (ASSERT_GT): New macro.
16277         (ASSERT_GT_AT): New macro.
16278         (ASSERT_LT): New macro.
16279         (ASSERT_LT_AT): New macro.
16281 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
16283         PR rtl-optimization/84780
16284         * combine.c (distribute_links): Don't make a link based on pc_rtx.
16286 2018-03-14  Martin Liska  <mliska@suse.cz>
16288         * tree.c (record_node_allocation_statistics): Use
16289         get_stats_node_kind.
16290         (get_stats_node_kind): New function extracted from
16291         record_node_allocation_statistics.
16292         (free_node): Use get_stats_node_kind.
16294 2018-03-14  Richard Biener  <rguenther@suse.de>
16296         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16297         that the value-set of ANTIC_IN doesn't grow.
16299         Revert
16300         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16301         member.
16302         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16303         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16305 2018-03-14  Julia Koval  <julia.koval@intel.com>
16307         * config.gcc (icelake-client, icelake-server): New.
16308         (icelake): Remove.
16309         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16310         (initial_ix86_arch_features): Ditto.
16311         (PTA_SKYLAKE): Add SGX.
16312         (PTA_ICELAKE): Remove.
16313         (PTA_ICELAKE_CLIENT): New.
16314         (PTA_ICELAKE_SERVER): New.
16315         (ix86_option_override_internal): Split up icelake on icelake client and
16316         icelake server.
16317         (get_builtin_code_for_version): Ditto.
16318         (fold_builtin_cpu): Ditto.
16319         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16320         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16321         * config/i386/i386.h (processor_type): Ditto.
16322         * doc/invoke.texi: Ditto.
16324 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
16326         PR sanitizer/83392
16327         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16328         INTEGER_CST offset, add it together with bitpos / 8 and
16329         sign extend based on POINTER_SIZE.
16331         PR target/84844
16332         Revert
16333         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
16335         PR target/78090
16336         * config/i386/constraints.md (Yc): New register constraint.
16337         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16338         Use Yc constraint for alternative 2 of operand 0.  Remove
16339         preferred_for_speed attribute.
16341 2018-03-14  Richard Biener  <rguenther@suse.de>
16343         PR tree-optimization/84830
16344         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16345         with the old one to avoid oscillations.
16347 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
16349         PR target/83712
16350         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16351         pseudos.
16352         (assign_by_spills): Return a flag of reload assignment failure.
16353         Do not process the reload assignment failures.  Do not spill other
16354         reload pseudos if they has the same reg class.  Update n if
16355         necessary.
16356         (lra_assign): Add a return arg.  Set up from the result of
16357         assign_by_spills call.
16358         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16359         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16360         usage_insns if it is not NULL.
16361         (spill_hard_reg_in_range): New function.
16362         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16363         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16364         function prototypes.
16365         (lra_assign): Change prototype.
16366         * lra.c (lra): Add code to deal with fails by splitting hard reg
16367         live ranges.
16369 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
16371         * config/riscv/riscv.opt (mrelax): New option.
16372         * config/riscv/riscv.c (riscv_file_start): Emit ".option
16373         "norelax" when riscv_mrelax is disabled.
16374         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16376 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16378         PR target/84743
16379         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16380         reassociation for int modes.
16382 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16384         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16385         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16386         for big-endian.
16387         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16388         * config/aarch64/aarch64-sve.md
16389         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16390         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16391         (*extend<mode><Vwide>2): Rename to...
16392         (aarch64_sve_extend<mode><Vwide>2): ...this.
16393         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16394         renaming the old pattern to...
16395         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
16396         unsigned packs.
16397         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16398         define_expand, renaming the old pattern to...
16399         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16400         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16401         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16402         account when deciding which SVE instruction the optab should use.
16403         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16405 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16407         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16408         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16409         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16410         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16411         (tlsdesc_small_<mode>): Turn a define_expand and use
16412         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
16413         (tlsdesc_small_advsimd_<mode>): ...this.
16414         (tlsdesc_small_sve_<mode>): New pattern.
16416 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16418         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16419         (UNSPEC_UMUL_HIGHPART): New constants.
16420         (MUL_HIGHPART): New int iteraor.
16421         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16422         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16423         define_expand.
16424         (*<su>mul<mode>3_highpart): New define_insn.
16426 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16428         PR lto/84805
16429         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16430         incomplete types.
16432 2018-03-13  Martin Liska  <mliska@suse.cz>
16434         PR ipa/84658.
16435         * (sem_item_optimizer::sem_item_optimizer): Initialize new
16436         vector.
16437         (sem_item_optimizer::~sem_item_optimizer): Release it.
16438         (sem_item_optimizer::merge_classes): Register variable aliases.
16439         (sem_item_optimizer::fixup_pt_set): New function.
16440         (sem_item_optimizer::fixup_points_to_sets): Likewise.
16441         * ipa-icf.h: Declare new variables and functions.
16443 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
16445         PR middle-end/84834
16446         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16447         integer_pow2p@2 and test integer_pow2p in condition.
16448         (A < 0 ? C : 0): Similarly for @1.
16450         PR middle-end/84831
16451         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16452         characters starting at p contain '\0' character, don't look beyond
16453         that.
16455         PR target/84827
16456         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16457         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16459         PR target/84828
16460         * reg-stack.c (change_stack): Change update_end var from int to
16461         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16462         also call set_block_for_insn on the newly added insns and rescan.
16464         PR target/84786
16465         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16466         on the last operand.
16468         PR c++/84704
16469         * tree.c (stabilize_reference_1): Return save_expr (e) for
16470         STATEMENT_LIST even if it doesn't have side-effects.
16472 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
16474         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16476 2018-03-12  Renlin Li  <renlin.li@arm.com>
16478         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16479         aarch64_output_scalar_simd_mov_immediate.
16481 2018-03-12  Martin Sebor  <msebor@redhat.com>
16483         PR tree-optimization/83456
16484         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16485         for perfectly overlapping calls to memcpy.
16486         (gimple_fold_builtin_memory_chk): Same.
16487         (gimple_fold_builtin_strcpy): Handle no-warning.
16488         (gimple_fold_builtin_stxcpy_chk): Same.
16489         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16491 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16493         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16494         parameter.  Use it for SFmode.
16495         (rs6000_function_arg_advance_1): Adjust.
16496         (rs6000_function_arg): Adjust.
16497         (rs6000_gimplify_va_arg): Pass false for that new parameter.
16499 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16501         PR rtl-optimization/84169
16502         PR rtl-optimization/84780
16503         * combine.c (can_combine_p): Check for a 2-insn combination whether
16504         the destination register is used between the two insns, too.
16506 2018-03-12  Richard Biener  <rguenther@suse.de>
16508         PR tree-optimization/84803
16509         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16510         for refs DR analysis didn't process.
16512 2018-03-12  Richard Biener  <rguenther@suse.de>
16514         PR tree-optimization/84777
16515         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16516         force-vectorize loops ignore whether we are optimizing for size.
16518 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16520         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16521         (TARGET_MD_ASM_ADJUST): Define.
16523 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
16524             Kito Cheng  <kito.cheng@gmail.com>
16525             Chung-Ju Wu  <jasonwucj@gmail.com>
16527         * config/nds32/nds32.c (nds32_compute_stack_frame,
16528         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16529         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16530         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16531         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16532         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16533         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16534         * config/nds32/nds32.md (prologue, epilogue): Use macro
16535         NDS32_V3PUSH_AVAILABLE_P to do checking.
16537 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
16539         PR debug/58150
16540         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16541         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16542         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
16543         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
16544         addition of most attributes on !orig_type_die or the attribute not
16545         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16547 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16548             Chung-Ju Wu  <jasonwucj@gmail.com>
16550         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16551         __NDS32_VH__ macro.
16552         * config/nds32/nds32.opt (mvh): New option.
16554 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16555             Chung-Ju Wu  <jasonwucj@gmail.com>
16557         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16558         function.
16559         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16560         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16561         definition.
16563 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16564             Chung-Ju Wu  <jasonwucj@gmail.com>
16566         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16567         function.
16568         * config/nds32/nds32-multiple.md (strlensi): New pattern.
16569         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16571 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
16572             Kito Cheng  <kito.cheng@gmail.com>
16573             Chung-Ju Wu  <jasonwucj@gmail.com>
16575         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16576         UNSPEC_FFMISM and UNSPEC_FLMISM.
16577         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16578         for ffb, ffmism and flmism.
16579         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16580         (unspec_ffmism): Ditto.
16581         (unspec_flmism): Ditto.
16582         (nds32_expand_builtin_impl): Check if string extension is available.
16583         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16584         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16586 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
16588         Reverting patch:
16589         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16591         PR target/83712
16592         * lra-assigns.c (assign_by_spills): Return a flag of reload
16593         assignment failure.  Do not process the reload assignment
16594         failures.  Do not spill other reload pseudos if they has the same
16595         reg class.
16596         (lra_assign): Add a return arg.  Set up from the result of
16597         assign_by_spills call.
16598         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16599         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16600         usage_insns if it is not NULL.
16601         (spill_hard_reg_in_range): New function.
16602         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16603         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16604         function prototypes.
16605         (lra_assign): Change prototype.
16606         * lra.c (lra): Add code to deal with fails by splitting hard reg
16607         live ranges.
16609 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
16611         PR target/84807
16612         * config/i386/i386.opt: Replace Enforcment with Enforcement.
16614 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
16616         PR debug/84620
16617         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16618         (dw_val_node): Add val_symbolic_view.
16619         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16620         (symview_upper_bound): New.
16621         (new_line_info_table): Initialize symviews_since_reset.
16622         (dwarf2out_source_line): Count symviews_since_reset and set
16623         symview_upper_bound.
16624         (dw_val_equal_p): Handle symview.
16625         (add_AT_symview): New.
16626         (print_dw_val): Handle symview.
16627         (attr_checksum, attr_checksum_ordered): Likewise.
16628         (same_dw_val_p, size_of_die): Likewise.
16629         (value_format, output_die): Likewise.
16630         (add_high_low_attributes): Use add_AT_symview for entry_view.
16631         (dwarf2out_finish): Reset symview_upper_bound, clear
16632         zero_view_p.
16634 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
16636         PR target/83969
16637         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16638         Add strict argument and use it.
16639         (rs6000_split_multireg_move): Update for new strict argument.
16640         (mem_operand_gpr): Disallow all non-offsettable addresses.
16641         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16643 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
16645         PR target/84772
16646         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
16647         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
16648         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
16650         PR c++/84767
16651         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
16652         decl, use remap_type if we want to use the type.
16654 2018-03-09  Martin Sebor  <msebor@redhat.com>
16656         PR tree-optimization/84526
16657         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16658         Remove dead code.
16659         (builtin_access::generic_overlap): Be prepared to handle non-array
16660         base objects.
16662 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
16664         PR rtl-optimization/84682
16665         * lra-constraints.c (process_address_1): Check is_address flag
16666         for address constraints.
16667         (process_alt_operands): Likewise.
16668         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
16669         preprocess_constraints.
16670         * recog.h (preprocess_constraints): Add oploc parameter.
16671         Adjust callers.
16672         * recog.c (preprocess_constraints): Test address_operand for
16673         CT_ADDRESS constraints.
16675 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16677         PR target/83712
16678         * lra-assigns.c (assign_by_spills): Return a flag of reload
16679         assignment failure.  Do not process the reload assignment
16680         failures.  Do not spill other reload pseudos if they has the same
16681         reg class.
16682         (lra_assign): Add a return arg.  Set up from the result of
16683         assign_by_spills call.
16684         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16685         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16686         usage_insns if it is not NULL.
16687         (spill_hard_reg_in_range): New function.
16688         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16689         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16690         function prototypes.
16691         (lra_assign): Change prototype.
16692         * lra.c (lra): Add code to deal with fails by splitting hard reg
16693         live ranges.
16695 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16697         PR target/83193
16698         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
16699         Accept complain bool parameter.  Only emit errors if it is true.
16700         (arm_parse_cpu_option_name): Likewise.
16701         (arm_target_thumb_only): Adjust callers of the above.
16702         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
16703         prototype to take a default true bool parameter.
16704         (arm_parse_arch_option_name): Likewise.
16706 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
16707             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
16709         PR jit/64089
16710         PR jit/84288
16711         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
16712         * configure: Regenerate.
16713         * configure.ac ("linker --version-script option"): New.
16714         ("linker soname option"): New.
16716 2018-03-09  Richard Biener  <rguenther@suse.de>
16718         PR tree-optimization/84775
16719         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
16720         immediate uses of predicate stmts and mark them modified.
16722         Revert
16723         PR tree-optimization/84178
16724         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16725         to caller.
16726         (version_loop_for_if_conversion): Delay update_ssa call.
16727         (tree_if_conversion): Delay update_ssa until after predicate
16728         insertion.
16730 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
16732         PR target/84763
16733         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
16734         when the function accesses prior frames.
16736 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
16738         PR debug/84456
16739         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
16740         gen_llsym, otherwise call maybe_gen_llsym.
16742         PR inline-asm/84742
16743         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
16744         has ',' character inside of it.
16746 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16748         PR target/84748
16749         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
16750         as clobbering CC_REGNUM.
16752 2018-03-08  Richard Biener  <rguenther@suse.de>
16754         PR middle-end/84552
16755         * tree-scalar-evolution.c: Include tree-into-ssa.h.
16756         (follow_copies_to_constant): Do not follow SSA names registered
16757         for update.
16759 2018-03-08  Richard Biener  <rguenther@suse.de>
16761         PR tree-optimization/84178
16762         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
16763         to caller.
16764         (version_loop_for_if_conversion): Delay update_ssa call.
16765         (tree_if_conversion): Delay update_ssa until after predicate
16766         insertion.
16768 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
16770         PR tree-optimization/84178
16771         * tree-if-conv.c (release_bb_predicate): Remove the
16772         the assertion that the stmts have NULL use_ops.
16773         Discard the statements, asserting that they haven't
16774         yet been added to a BB.
16776 2018-03-08  Richard Biener  <rguenther@suse.de>
16778         PR tree-optimization/84746
16779         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
16780         (phi_translate): Pass in destination ANTIC_OUT set.
16781         (phi_translate_1): Likewise.  For a simplified result lookup
16782         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
16783         (phi_translate_set): Adjust.
16784         (do_pre_regular_insertion): Likewise.
16785         (do_pre_partial_partial_insertion): Likewise.
16787 2018-03-08  Martin Liska  <mliska@suse.cz>
16789         PR gcov-profile/84735
16790         * doc/gcov.texi: Document usage of profile files.
16791         * gcov-io.h: Document changes in the format.
16793 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
16795         PR debug/84404
16796         PR debug/84408
16797         * dwarf2out.c (struct dw_line_info_table): Update comments for
16798         view == -1.
16799         (FORCE_RESET_NEXT_VIEW): New.
16800         (FORCE_RESETTING_VIEW_P): New.
16801         (RESETTING_VIEW_P): Check for -1 too.
16802         (ZERO_VIEW_P): Likewise.
16803         (new_line_info_table): Force-reset next view.
16804         (dwarf2out_begin_function): Likewise.
16805         (dwarf2out_source_line): Simplify zero_view_p initialization.
16806         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
16807         view directly.  Omit view when omitting .loc at line 0.
16809 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
16811         PR tree-optimization/84740
16812         * tree-switch-conversion.c (process_switch): Call build_constructors
16813         only if info.phi_count is non-zero.
16815         PR tree-optimization/84739
16816         * tree-tailcall.c (find_tail_calls): Check call arguments against
16817         DECL_ARGUMENTS (current_function_decl) rather than
16818         DECL_ARGUMENTS (func) when checking for tail recursion.
16820 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16822         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
16823         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
16824         Volker Reichelt's entry and add entries for people that perform
16825         GCC fuzzy testing and report numerous bugs.
16827 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
16829         PR target/82411
16830         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
16831         readonly data in sdata, if that is disabled.
16832         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
16833         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
16834         -mreadonly-in-sdata option.
16836 2018-03-07  Martin Sebor  <msebor@redhat.com>
16838         PR tree-optimization/84468
16839         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
16840         basic block when looking for nul assignment.
16842 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
16844         PR target/84277
16845         * except.h (output_function_exception_table): Adjust prototype.
16846         * except.c (output_function_exception_table): Remove FNNAME parameter
16847         and add SECTION parameter.  Ouput one part of the table at a time.
16848         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
16849         the first part of the exception table and emit unwind directives.
16850         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
16851         (i386_pe_seh_cold_init): Likewise.
16852         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
16853         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
16854         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
16855         (ix86_output_call_insn): Emit a nop in one more case for SEH.
16856         * config/i386/winnt.c: Include except.h.
16857         (struct seh_frame_state): Add reg_offset, after_prologue and
16858         in_cold_section fields.
16859         (i386_pe_seh_end_prologue): Set seh->after_prologue.
16860         (i386_pe_seh_cold_init): New function.
16861         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
16862         to seh->in_cold_section.
16863         (seh_emit_push): Record the offset of the push.
16864         (seh_emit_save): Record the offet of the save.
16865         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
16866         Test seh->after_prologue to disregard the epilogue.
16867         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
16868         (i386_pe_end_cold_function): New function.
16870 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
16872         PR fortran/84565
16873         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
16874         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
16876         PR c++/84704
16877         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
16878         on tmp_var.
16879         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
16880         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
16882         PR middle-end/84723
16883         * multiple_target.c: Include tree-inline.h and intl.h.
16884         (expand_target_clones): Diagnose and fail if node->definition and
16885         !tree_versionable_function_p (node->decl).
16887 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
16889         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
16890         sprint_ul.
16891         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
16892         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16893         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
16895 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16897         PR target/84710
16898         * combine.c (try_combine): Use reg_or_subregno instead of handling
16899         just paradoxical SUBREGs and REGs.
16901 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
16903         * config/arc/arc.c (arc_finalize_pic): Remove function.
16904         (arc_must_save_register): We use single base PIC register, remove
16905         checks to save/restore the PIC register.
16906         (arc_expand_prologue): Likewise.
16907         * config/arc/arc-protos.h (arc_set_default_type_attributes):
16908         Remove.
16909         (arc_verify_short): Likewise.
16910         (arc_attr_type): Likewise.
16911         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
16912         (walk_stores): Likewise.
16913         (arc_address_cost): Make it static.
16914         (arc_verify_short): Likewise.
16915         (branch_dest): Likewise.
16916         (arc_attr_type): Likewise.
16917         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
16918         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
16919         (arc_final_prescan_insn): Remove inserting the nops due to
16920         hardware hazards.  It is done in reorg step.
16921         (insn_length_variant_t): Remove.
16922         (insn_length_parameters_t): Likewise.
16923         (arc_insn_length_parameters): Likewise.
16924         (arc_get_insn_variants): Likewise.
16925         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
16927 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
16929         PR inline-asm/84683
16930         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
16931         assertion failure.
16933         PR tree-optimization/84687
16934         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
16935         on new_node->decl.
16936         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
16938 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16940         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
16941         Rename to ppc_speculation_barrier.
16942         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
16943         __builtin_ppc_speculation_barrier.
16945 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16947         PR target/84700
16948         * combine.c (combine_simplify_rtx): Don't try to simplify if
16949         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
16950         are equal to x.
16952 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
16954         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
16955         to 32 bytes when compiling for POWER9.
16957 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
16959         PR target/84564
16960         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
16961         regparm >= 3 with no arg reg available also for calls with
16962         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
16964         PR target/84524
16965         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
16966         orig,vex.
16967         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
16969 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
16971         PR target/84264
16972         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
16974 2018-03-05  Richard Biener  <rguenther@suse.de>
16976         PR tree-optimization/84486
16977         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
16978         When inserting a __builtin_assume_aligned call set the LHS
16979         SSA name alignment info accordingly.
16981 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
16983         PR tree-optimization/84114
16984         * config/aarch64/aarch64.c (aarch64_reassociation_width)
16985         Avoid reassociation of FLOAT_MODE addition.
16987 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
16989         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
16990         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
16991         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
16992         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
16993         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
16994         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
16995         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
16996         and -mwbnoinvd.
16997         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
16998         __builtin_ia32_wbinvd): New builtins.
16999         (SPECIAL_ARGS2): New.
17000         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17001         (SPECIAL_ARGS2): New.
17002         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17003         (ix86_valid_target_attribute_inner_p): Ditto.
17004         (ix86_init_mmx_sse_builtins): Add special_args2.
17005         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17006         TARGET_WBNOINVD_P): New.
17007         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17008         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17009         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17010         * config/i386/immintrin.h (_wbinvd): New intrinsic.
17011         * config/i386/pconfigintrin.h: New file.
17012         * config/i386/wbnoinvdintrin.h: Ditto.
17013         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17014         wbnoinvdintrin.h.
17015         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17017 2018-03-05  Richard Biener  <rguenther@suse.de>
17019         PR tree-optimization/84670
17020         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17021         member.
17022         (BB_VISITED_WITH_VISITED_SUCCS): New define.
17023         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17024         (compute_antic_aux): Only assert the number of values in ANTIC_IN
17025         doesn't grow if all successors (recursively) were visited at least
17026         once.
17028 2018-03-05  Richard Biener  <rguenther@suse.de>
17030         PR tree-optimization/84650
17031         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17032         if executed in the loop pipeline.
17034 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
17036         * doc/configfiles.texi (Configuration Files): Move info about
17037         conditionalizing $target-protos.h to...
17038         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
17039         differs from $target-protos.h.
17041 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
17042             Chung-Ju Wu  <jasonwucj@gmail.com>
17044         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17045         * config/nds32/nds32-multiple.md (setmemsi): Define.
17046         * config/nds32/nds32-memory-manipulation.c
17047         (nds32_gen_dup_4_byte_to_word_value): New.
17048         (emit_setmem_word_loop): New.
17049         (emit_setmem_byte_loop): New.
17050         (nds32_expand_setmem_loop): New.
17051         (nds32_expand_setmem_loop_v3m): New.
17052         (nds32_expand_setmem_unroll): New.
17053         (nds32_expand_setmem): New.
17055 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17056             Chung-Ju Wu  <jasonwucj@gmail.com>
17058         * config/nds32/nds32-memory-manipulation.c
17059         (nds32_emit_load_store): New.
17060         (nds32_emit_post_inc_load_store): New.
17061         (nds32_emit_mem_move): New.
17062         (nds32_emit_mem_move_block): New.
17063         (nds32_expand_movmemsi_loop_unknown_size): New.
17064         (nds32_expand_movmemsi_loop_known_size): New.
17065         (nds32_expand_movmemsi_loop): New.
17066         (nds32_expand_movmemsi_unroll): New.
17067         (nds32_expand_movmemqi): Rename ...
17068         (nds32_expand_movmemsi): ... to this.
17069         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17070         (movmemsi): ... to this.
17071         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17072         (nds32_expand_movmemsi): ... to this.
17074 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17075             Monk Chiang  <sh.chiang04@gmail.com>
17076             Chung-Ju Wu  <jasonwucj@gmail.com>
17078         * config/nds32/nds32-protos.h
17079         (nds32_expand_load_multiple): New arguments.
17080         (nds32_expand_store_multiple): Ditto.
17081         (nds32_valid_multiple_load_store): Rename ...
17082         (nds32_valid_multiple_load_store_p): ... to this.
17083         * config/nds32/nds32-memory-manipulation.c
17084         (nds32_expand_load_multiple): Refine implementation.
17085         (nds32_expand_store_multiple): Ditto.
17086         * config/nds32/nds32-multiple.md
17087         (load_multiple): Update nds32_expand_load_multiple interface.
17088         (store_multiple): Update nds32_expand_store_multiple interface.
17089         * config/nds32/nds32-predicates.c
17090         (nds32_valid_multiple_load_store): Rename ...
17091         (nds32_valid_multiple_load_store_p): ... to this and refine
17092         implementation.
17093         * config/nds32/predicates.md
17094         (nds32_load_multiple_and_update_address_operation): New predicate.
17095         (nds32_store_multiple_and_update_address_operation): New predicate.
17097 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17098             Chung-Ju Wu  <jasonwucj@gmail.com>
17100         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17101         (combo): New attribute.
17102         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17104 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17106         * config/nds32/nds32.opt: Change -mcmodel= default value.
17108 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
17109             Monk Chiang  <sh.chiang04@gmail.com>
17110             Chung-Ju Wu  <jasonwucj@gmail.com>
17112         * config/nds32/constants.md (unspec_element): New enum.
17113         * config/nds32/constraints.md (Umw): New constraint.
17114         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17115         * config/nds32/nds32-intrinsic.md: Likewise.
17116         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17117         (nds32_valid_smw_lwm_base_p): New.
17118         (nds32_output_smw_single_word): New.
17119         (nds32_output_lmw_single_word): New.
17120         (nds32_expand_unaligned_load): New.
17121         (nds32_expand_unaligned_store): New.
17122         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17123         (nds32_output_smw_single_word): Declare.
17124         (nds32_output_lmw_single_word): Declare.
17125         (nds32_expand_unaligned_load): Declare.
17126         (nds32_expand_unaligned_store): Declare.
17127         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17128         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17129         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17130         NDS32_BUILTIN_UASTORE_DW.
17131         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17132         predicate.
17134 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
17135             Kito Cheng  <kito.cheng@gmail.com>
17136             Chung-Ju Wu  <jasonwucj@gmail.com>
17138         * config/nds32/nds32-intrinsic.c
17139         (nds32_expand_builtin_null_ftype_reg): Delete.
17140         (nds32_expand_builtin_reg_ftype_imm): Ditto.
17141         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17142         (nds32_read_argument): New.
17143         (nds32_legitimize_target): Ditto.
17144         (nds32_legitimize_argument): Ditto.
17145         (nds32_check_constant_argument): Ditto.
17146         (nds32_expand_unop_builtin): Ditto.
17147         (nds32_expand_unopimm_builtin): Ditto.
17148         (nds32_expand_binop_builtin): Ditto.
17149         (nds32_builtin_decl_impl): Ditto.
17150         (builtin_description): Ditto.
17151         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17152         (nds32_init_builtins_impl): Ditto.
17153         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17154         (nds32_builtin_decl): New.
17155         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17156         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17158 2018-03-02  Jeff Law  <law@redhat.com>
17160         * reorg.c (stop_search_p): Handle DEBUG_INSN.
17161         (redundant_insn, fill_simple_delay_slots): Likewise.
17162         (fill_slots_from_thread): Likewise.
17163         * resource.c (mark_referenced_resources): Likewise.
17164         (mark_set_resources, find_dead_or_set_registers): Likewise.
17166 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17168         * substring-locations.h (format_warning_va): Formatting fix for
17169         ATTRIBUTE_GCC_DIAG.
17170         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17171         argument.
17172         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17173         * substring-locations.c: Include intl.h.
17174         (format_warning_va): Turned into small wrapper around
17175         format_warning_n_va, renamed to ...
17176         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17177         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17178         use ngettext.
17179         (format_warning_at_substring_n): New function.
17180         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17181         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
17182         format_warning_at_substring with just a shorter name instead of
17183         const function pointer.
17184         (fmtwarn_n): New function.
17185         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17186         appropriate, get rid of all the fmtstr temporaries, move conditionals
17187         with G_() wrapped string literals directly into fmtwarn arguments,
17188         cast dir.len to (int), formatting fixes.
17190 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
17192         * doc/invoke.texi: Remove "Cilk Plus" references.
17194 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17195             Richard Biener  <rguenther@suse.de>
17197         PR ipa/84628
17198         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17199         for error or warning attributes if CALL_FROM_THUNK_P is set.
17200         Formatting fixes.
17202 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17204         PR target/56540
17205         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17206         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17208         PR target/56540
17209         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17210         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17212         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17213         instead of -1U in last predictors element's probability member.
17215 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17217         PR ipa/83983
17218         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17219         arguments if they are comparable.
17221 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17223         PR tree-optimization/84634
17224         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17225         masks and masked_loop_p with a single loop_masks, making sure it's
17226         null for bb vectorization.
17228 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17230         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17231         (vect_analyze_data_ref_access): Use loop->safe_len rather than
17232         loop->force_vectorize to check whether there is no alias.
17234 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17236         PR target/84614
17237         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17238         prototypes.
17239         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17240         comments.
17241         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17242         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17243         instead of a loop around prev_real_insn.
17244         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17245         prev_real_insn.
17247         PR inline-asm/84625
17248         * config/i386/i386.c (ix86_print_operand): Use conditional
17249         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17250         zero vector.
17252 2018-03-02  Richard Biener  <rguenther@suse.de>
17254         PR tree-optimization/84427
17255         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17256         (bitmap_set_subtract_values): Rewrite to handle multiple
17257         exprs per value.
17258         (clean): Likewise.
17259         (prune_clobbered_mems): Likewise.
17260         (phi_translate): Take edge instead of pred/phiblock.
17261         (phi_translate_1): Likewise.
17262         (phi_translate_set): Likewise.  Insert all translated
17263         exprs for a value into the set, keeping possibly multiple
17264         expressions per value.
17265         (compute_antic_aux): Adjust for phi_translate changes.
17266         When intersecting union the expressions and prune those
17267         not in the final value set, keeping possibly multiple
17268         expressions per value.  Do not use value-insertion
17269         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17270         all expressions.  Add verification that the value-sets
17271         only shrink during iteration.
17272         (compute_partial_antic_aux): Adjust for the phi_translate changes.
17273         (do_pre_regular_insertion): Likewise.
17274         (do_pre_partial_partial_insertion): Likewise.
17276 2018-03-02  Richard Biener  <rguenther@suse.de>
17278         PR target/82005
17279         * config/darwin.c (saved_debug_info_level): New static global.
17280         (darwin_asm_lto_start): Disable debug info generation for LTO out.
17281         (darwin_asm_lto_end): Restore debug info generation settings.
17283 2018-03-01  Martin Liska  <mliska@suse.cz>
17285         PR sanitizer/82484
17286         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17287         volatile arguments.
17289 2018-03-01  Richard Biener  <rguenther@suse.de>
17291         PR debug/84645
17292         * dwarf2out.c (gen_variable_die): Properly handle late VLA
17293         type annotation with LTO when debug was disabled at compile-time.
17295 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
17297         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17298         XINT with INTVAL.
17299         (mips_final_postscan_insn): Likewise.
17301 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
17303         PR rtl-optimization/84528
17304         * alias.c (init_alias_target): Add commentary.
17305         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17306         a unique base value if the frame pointer is not eliminated
17307         to the stack pointer.
17309 2018-03-01  Tom de Vries  <tom@codesourcery.com>
17311         PR rtl-optimization/83327
17312         * lra-int.h (hard_regs_spilled_into): Declare.
17313         * lra.c (hard_regs_spilled_into): Define.
17314         (init_reg_info): Init hard_regs_spilled_into.
17315         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17316         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17317         (process_bb_lives): Handle hard_regs_spilled_into.
17318         (lra_create_live_ranges_1): Before doing liveness propagation, clear
17319         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17321 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
17323         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17324         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17325         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17326         * config/rs6000/aix72.h: New file.
17328 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
17330         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17331         instead of warning_at with conditional singular and plural messages
17332         where possible.
17334         PR target/52991
17335         * stor-layout.c (update_alignment_for_field): For
17336         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17337         && !DECL_PACKED (field), do the alignment update, just use
17338         only desired_align instead of MAX (type_align, desired_align)
17339         as the alignment.
17340         (place_field): Don't do known_align < desired_align handling
17341         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17342         is non-NULL, instead do it after rli->prev_field handling and
17343         only if not within a bitfield word.  For DECL_PACKED (field)
17344         use type_align of BITS_PER_UNIT.
17346 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
17348         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17349         superfluous parentheses and trailing spaces.
17351 2018-02-28  Richard Biener  <rguenther@suse.de>
17353         PR tree-optimization/84584
17354         * graphite-scop-detection.c (scop_detection::add_scop): Discard
17355         SCoPs with fake exit edge.
17357 2018-02-28  Martin Liska  <mliska@suse.cz>
17359         PR testsuite/84597
17360         * timevar.c (timer::print): Fix format to properly print 100%
17361         values.
17363 2018-02-28  Richard Biener  <rguenther@suse.de>
17365         PR middle-end/84607
17366         * genmatch.c (capture_info::walk_match): Do not mark
17367         captured expressions without operands as expr_p given
17368         they act more like predicates and should be subject to
17369         "lost tail" side-effect preserving.
17371 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
17373         PR rtl-optimization/81611
17374         * auto-inc-dec.c (attempt_change): Move dead note from
17375         mem_insn if it's the next use of regno
17376         (find_address): Take address use of reg holding
17377         non-incremented value.  Add parm to limit search to the named
17378         reg only.
17379         (merge_in_block): Attempt to use a mem insn that is the next
17380         use of the original regno.
17382 2018-02-27  Martin Sebor  <msebor@redhat.com>
17384         PR c++/83871
17385         * doc/invoke.texi (-Wmissing-attributes): New option.
17386         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17388 2018-02-27  Martin Sebor  <msebor@redhat.com>
17390         PR translation/84207
17391         * diagnostic-core.h (warning_n, error_n, inform_n): Change
17392         n argument to unsigned HOST_WIDE_INT.
17393         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17394         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
17395         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17396         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17398 2018-02-27  Richard Biener  <rguenther@suse.de>
17400         PR tree-optimization/84512
17401         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17402         Do not use the estimate returned from record_stmt_cost for
17403         the scalar iteration cost but sum properly using add_stmt_cost.
17405 2018-02-27  Richard Biener  <rguenther@suse.de>
17407         PR tree-optimization/84466
17408         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17409         Adjust last change to less strictly validate use operands.
17411 2018-02-27  Martin Liska  <mliska@suse.cz>
17413         PR gcov-profile/84548
17414         * gcov.c (process_file): Allow partial overlap and consider it
17415         also as group functions.
17416         (output_lines): Properly calculate range of lines for a group.
17418 2018-02-27  Martin Liska  <mliska@suse.cz>
17420         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17421         'ggc' suffixes.  Change first column width.
17422         (timer::print): Fix formatting of the column.
17424 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
17426         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17427         preserve inline entry blocks for the sake of debug inline
17428         entry point markers alone.
17429         (remove_unused_locals): Suggest in comments a better place to
17430         force the preservation of inline entry blocks that are
17431         otherwise unused, but do not preserve them.
17433 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17435         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17437 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17439         PR target/84039
17440         * config/i386/constraints.md (Bs): Replace
17441         ix86_indirect_branch_register with
17442         TARGET_INDIRECT_BRANCH_REGISTER.
17443         (Bw): Likewise.
17444         * config/i386/i386.md (indirect_jump): Likewise.
17445         (tablejump): Likewise.
17446         (*sibcall_memory): Likewise.
17447         (*sibcall_value_memory): Likewise.
17448         Peepholes of indirect call and jump via memory: Likewise.
17449         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17450         (*sibcall_value_GOT_32): Likewise.
17451         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17452         (GOT_memory_operand): Likewise.
17453         (call_insn_operand): Likewise.
17454         (sibcall_insn_operand): Likewise.
17455         (GOT32_symbol_operand): Likewise.
17456         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17458 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17460         PR rtl-optimization/83496
17461         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17462         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
17463         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17464         redundant insn, if any.
17465         (relax_delay_slots): Likewise.
17466         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17468 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
17470         PR tree-optimization/83965
17471         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17472         that grouped statements are part of a reduction chain.  Return
17473         true if the statement is not marked as a reduction itself but
17474         is part of a group.
17475         (vect_recog_dot_prod_pattern): Don't check whether the statement
17476         is part of a group here.
17477         (vect_recog_sad_pattern): Likewise.
17478         (vect_recog_widen_sum_pattern): Likewise.
17480 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17482         PR debug/84545
17483         * final.c (rest_of_clean_state): Also look for calls inside sequences.
17485 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17487         PR target/84530
17488         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17489         the bool argument.
17490         (ix86_output_indirect_function_return): New prototype.
17491         (ix86_split_simple_return_pop_internal): Likewise.
17492         * config/i386/i386.c (indirect_return_via_cx): New.
17493         (indirect_return_via_cx_bnd): Likewise.
17494         (indirect_thunk_name): Handle return va CX_REG.
17495         (output_indirect_thunk_function): Create alias for
17496         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17497         (ix86_output_indirect_jmp): Remove the bool argument.
17498         (ix86_output_indirect_function_return): New function.
17499         (ix86_split_simple_return_pop_internal): Likewise.
17500         * config/i386/i386.md (*indirect_jump): Don't pass false
17501         to ix86_output_indirect_jmp.
17502         (*tablejump_1): Likewise.
17503         (simple_return_pop_internal): Change it to define_insn_and_split.
17504         Call ix86_split_simple_return_pop_internal to split it for
17505         -mfunction-return=.
17506         (simple_return_indirect_internal): Call
17507         ix86_output_indirect_function_return instead of
17508         ix86_output_indirect_jmp.
17510 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
17512         PR bootstrap/84405
17513         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17514         memset and value initialization afterwards.
17516 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
17518         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17520 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17522         PR target/84521
17523         * common/config/aarch64/aarch64-common.c
17524         (aarch_option_optimization_table[]): Switch
17525         off fomit-frame-pointer
17527 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17528             Chung-Ju Wu  <jasonwucj@gmail.com>
17530         * config/nds32/nds32-multiple.md (load_multiple): Disallow
17531         volatile memory.
17532         (store_multiple): Ditto.
17534 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17536         * config.gcc: Add --with-cpu support for nds32 target.
17537         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17538         * config/nds32/nds32.opt: Add -mcpu= option.
17540 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
17542         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17543         isel=yes): Warn for these deprecated options.
17545 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
17547         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17548         ISA_2_5_MASKS_EMBEDDED.
17550 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
17552         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17553         p->max as pointers rather than using iterative_hash_expr.
17555 2018-02-23  Carl Love  <cel@us.ibm.com>
17557         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17558         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17559         BU_P8V_OVERLOAD_2.
17560         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17561         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17562         P8V_BUILTIN_VEC_VUNSIGNED2.
17564 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
17566         PR target/81572
17567         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17568         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17569         LRA_UNKNOWN_ALT.
17570         * lra-constraints.c (curr_insn_transform): Set up
17571         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
17572         LRA_UNKNOWN_ALT.
17573         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17574         * lra-eliminations.c (spill_pseudos): Ditto.
17575         (process_insn_for_elimination): Ditto.
17576         * lra-lives.c (reg_early_clobber_p): Use the new macros.
17577         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17578         LRA_NON_CLOBBERED_ALT.
17580 2018-02-22  Martin Sebor  <msebor@redhat.com>
17582         PR tree-optimization/84480
17583         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17584         to maybe_diag_stxncpy_trunc.  Call it.
17585         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17586         from gimple_fold_builtin_strcpy.  Print inlining stack.
17587         (handle_builtin_stxncpy): Print inlining stack.
17588         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17590 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
17592         PR target/84176
17593         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17594         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17595         and -fcheck-pointer-bounds are used together.
17596         (indirect_thunk_prefix): New enum.
17597         (indirect_thunk_need_prefix): New function.
17598         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
17599         "_nt" instead of "_bnd" for NOTRACK prefix.
17600         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17601         (output_indirect_thunk_function): Likewise.
17602         (): Likewise.
17603         (ix86_code_end): Update output_indirect_thunk_function calls.
17604         (ix86_output_indirect_branch_via_reg): Replace
17605         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17606         (ix86_output_indirect_branch_via_push): Likewise.
17607         (ix86_output_function_return): Likewise.
17608         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17609         incompatible with -fcf-protection=branch and
17610         -fcheck-pointer-bounds.
17612 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17614         PR target/83335
17615         * config/aarch64/aarch64.c (aarch64_print_address_internal):
17616         Change gcc_assert call to output_operand_lossage.
17618 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17620         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17622 2018-02-22  DJ Delorie  <dj@redhat.com>
17623             Sebastian Perta  <sebastian.perta@renesas.com>
17624             Oleg Endo  <olegendo@gcc.gnu.org>
17626         * config/rx/rx.c (rx_rtx_costs): New function.
17627         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17629 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17631         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17633 2018-02-22  Martin Liska  <mliska@suse.cz>
17635         PR driver/83193
17636         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17637         Add "native" as a possible value.
17639 2018-02-22  Martin Liska  <mliska@suse.cz>
17641         PR driver/83193
17642         * config/i386/i386.c (ix86_option_override_internal):
17643         Add "native" as a possible value for -march and -mtune.
17645 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
17647         PR target/84502
17648         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
17649         to all type variants.
17651         PR tree-optimization/84503
17652         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
17653         width as info->bitpos + info->bitsize - start.
17654         (merged_store_group::merge_overlapping): Simplify width computation.
17655         (check_no_overlap): New function.
17656         (imm_store_chain_info::try_coalesce_bswap): Compute expected
17657         start + width and last_order of the group, fail if check_no_overlap
17658         fails.
17659         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
17660         to group if check_no_overlap fails.
17662 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
17664         * config/rs6000/altivec.md: Delete contraint arguments to
17665         define_expand, define_split, and define_peephole2, and in
17666         define_insn_and_split if always unused.
17667         * config/rs6000/darwin.md: Ditto.
17668         * config/rs6000/dfp.md: Ditto.
17669         * config/rs6000/rs6000.md: Ditto.
17670         * config/rs6000/sync.md: Ditto.
17671         * config/rs6000/vector.md: Ditto.
17672         * config/rs6000/vsx.md: Ditto.
17674 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
17676         * config/rs6000/altivec.md: Write output control strings as braced
17677         blocks instead of double-quoted strings.
17678         * config/rs6000/darwin.md: Ditto.
17679         * config/rs6000/rs6000.md: Ditto.
17680         * config/rs6000/vector.md: Ditto.
17681         * config/rs6000/vsx.md: Ditto.
17683 2018-02-21  Jason Merrill  <jason@redhat.com>
17685         PR c++/84314 - ICE with templates and fastcall attribute.
17686         * attribs.c (build_type_attribute_qual_variant): Remove assert.
17688 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
17690         * ipa-cp.c (determine_versionability): Fix comment typos.
17692 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
17694         PR c/84229
17695         * ipa-cp.c (determine_versionability): Do not version functions caling
17696         va_arg_pack.
17698 2018-02-21  Martin Liska  <mliska@suse.cz>
17700         PR driver/83193
17701         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
17702         Add "native" as a possible value.
17703         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
17704         the macro when native cpu detection is available.
17706 2018-02-21  Martin Liska  <mliska@suse.cz>
17708         PR driver/83193
17709         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
17710         Add "native" as a possible value.
17711         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
17712         when native cpu detection is available.
17714 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
17715             Martin Sebor  <msebor@redhat.com>
17717         PR tree-optimization/84478
17718         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
17719         false.
17720         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
17721         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
17722         support which is conservatively correct, for 2 only stay conservative
17723         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
17724         argument to the 2 argument get_range_strlen, adjust 6 arg
17725         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
17726         false.
17727         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
17728         (gimple_fold_builtin_strlen): Pass true as last argument to
17729         get_range_strlen.
17731 2018-02-20  Martin Sebor  <msebor@redhat.com>
17733         PR middle-end/84095
17734         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
17735         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
17736         (builtin_memref::builtin_memref): Factor out parts into
17737         set_base_and_offset and call it.
17739 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
17741         PR middle-end/84406
17742         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
17743         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
17744         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
17745         search at the associated MODE_INT.
17747 2018-02-20  Jeff Law  <law@redhat.com>
17749         PR middle-end/82123
17750         PR tree-optimization/81592
17751         PR middle-end/79257
17752         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
17753         for range data rather than using global data.
17754         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
17755         range data rather than using global data.
17756         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
17757         pass it to children as needed.
17758         (struct directive::fmtresult): Similarly.
17759         (struct directive::set_width): Similarly.
17760         (struct directive::set_precision): Similarly.
17761         (format_integer, format_directive, parse_directive): Similarly.
17762         (format_none): Accept unnamed vr_values parameter.
17763         (format_percent, format_floating, format_character): Similarly.
17764         (format_string, format_plain): Similarly.
17765         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
17766         the EVRP range analyzer for range data rather than using global data.
17767         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
17768         gimple-ssa-evrp-analyze.h
17769         (class sprintf_dom_walker): Add after_dom_children member function.
17770         Add evrp_range_analyzer member.
17771         (sprintf_dom_walker::before_dom_children): Call into the EVRP
17772         range analyzer as needed.
17773         (sprintf_dom_walker::after_dom_children): New member function.
17774         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
17775         if not optimizing.
17776         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
17777         (evrp_range_analyzer::pop_to_marker): Likewise.
17779 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
17781         PR tree-optimization/84419
17782         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
17783         with the required type if its current type is compatible but
17784         different.
17786 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
17788         PR middle-end/82004
17789         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
17790         after vectorization.
17792 2018-02-20  Martin Liska  <mliska@suse.cz>
17794         PR driver/83193
17795         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
17796         possible values if we don't have a hint.
17798 2018-02-20  Martin Liska  <mliska@suse.cz>
17800         PR c/84310
17801         PR target/79747
17802         * final.c (shorten_branches): Build align_tab array with one
17803         more element.
17804         * opts.c (finish_options): Add alignment option limit check.
17805         (MAX_CODE_ALIGN): Likewise.
17806         (MAX_CODE_ALIGN_VALUE): Likewise.
17807         * doc/invoke.texi: Document maximum allowed option value for
17808         all -falign-* options.
17810 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
17812         PR target/84146
17813         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
17814         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
17815         * var-tracking.c (emit_note_insn_var_location): Remove all references
17816         to NOTE_INSN_CALL_ARG_LOCATION.
17817         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
17818         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
17819         Use copy_rtx_if_shared.
17820         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
17821         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
17822         (dwarf2out_var_location): Remove handling of
17823         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
17824         on call_insn.
17825         * final.c (final_scan_insn): Remove all references to
17826         NOTE_INSN_CALL_ARG_LOCATION.
17827         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
17828         before dumping final insns.
17829         * except.c (emit_note_eh_region_end): Remove all references to
17830         NOTE_INSN_CALL_ARG_LOCATION.
17831         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
17832         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
17833         * config/arc/arc.c (hwloop_optimize): Likewise.
17834         * config/arm/arm.c (create_fix_barrier): Likewise.
17835         * config/s390/s390.c (s390_chunkify_start): Likewise.
17836         * config/sh/sh.c (find_barrier): Likewise.
17837         * config/i386/i386.c (rest_of_insert_endbranch,
17838         ix86_seh_fixup_eh_fallthru): Likewise.
17839         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
17840         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
17841         * config/frv/frv.c (frv_function_prologue): Likewise.
17842         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
17843         reg note.
17844         (note_outside_basic_block_p): Remove all references to
17845         NOTE_INSN_CALL_ARG_LOCATION.
17846         * gengtype.c (adjust_field_rtx_def): Likewise.
17847         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
17848         Likewise.
17849         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
17850         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
17852         PR c++/84444
17853         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
17854         is ADDR_EXPR.
17856         PR tree-optimization/84452
17857         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
17858         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
17859         is NULL.
17861 2018-02-19  Martin Liska  <mliska@suse.cz>
17863         PR sanitizer/82183
17864         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
17866 2018-02-19  Martin Liska  <mliska@suse.cz>
17867             Richard Sandiford  <richard.sandiford@linaro.org>
17869         PR tree-optimization/82491
17870         * gimple-fold.c (get_base_constructor): Make earlier bail out
17871         to prevent ubsan.
17873 2018-02-19  Carl Love  <cel@us.ibm.com>
17875         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
17876         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
17877         BU_P8V_OVERLOAD_1.
17878         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
17879         P8V_BUILTIN_VEC_NEG.
17881 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
17883         * config/rl78/rl78.md (movdf): New define expand.
17885 2018-02-19  Martin Liska  <mliska@suse.cz>
17887         PR other/80589
17888         * doc/invoke.texi: Fix typo.
17889         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
17891 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
17893         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
17894         handle rs6000_single_float and rs6000_double_float specially for
17895         e500 family CPUs.
17897 2018-02-16  Jeff Law  <law@redhat.com>
17899         * config/rx/rx.c (add_pop_cfi_notes): New function.;
17900         (pop_regs): Use it.
17902 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
17904         PR ipa/84425
17905         * ipa-inline.c (inline_small_functions): Fix a typo.
17907 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17909         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
17911 2018-02-16  Carl Love  <cel@us.ibm.com>
17913         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
17914         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
17915         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
17916         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
17917         expansion to P8V_BUILTIN_VEC_FLOAT2.
17919 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
17921         PR rtl-optimization/70023
17922         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
17923         src_regno into account.
17925 2018-02-16  Carl Love  <cel@us.ibm.com>
17927         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
17928         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
17929         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
17930         * config/rs6000/rs6000.c: Remove case statements for
17931         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
17932         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
17933         and P9V_BUILTIN_VEC_VINSERT4B.
17934         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
17935         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
17936         * config/rs6000/vsx.md:
17937         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
17938         vec_insert4b.
17940 2018-02-16  Carl Love  <cel@us.ibm.com>
17942         * config/rs6000/altivec.h: Add builtin names vec_extract4b
17943         vec_insert4b.
17944         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
17945         definitions.
17946         * config/rs6000/rs6000-c.c: Add the definitions for
17947         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
17948         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
17949         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
17950         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
17951         definition for insert4b and define insn *insert3b_internal.
17952         * doc/extend.texi: Add documentation for vec_extract4b.
17954 2018-02-16  Nathan Sidwell  <nathan@acm.org>
17956         * doc/extend.texi (Backwards Compatibility): Mention friend
17957         injection.  Note for-scope is deprecated.
17958         * doc/invoke.texi (-ffriend-injection): Deprecate.
17960 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
17962         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
17963         that moved to I2, also allow destinations that are a paradoxical
17964         subreg (instead of a normal reg).
17966 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
17968         PR target/83831
17969         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
17970         to QImode.
17972 2018-02-16  Richard Biener  <rguenther@suse.de>
17974         PR tree-optimization/84037
17975         PR tree-optimization/84016
17976         PR target/82862
17977         * config/i386/i386.c (ix86_builtin_vectorization_cost):
17978         Adjust vec_construct for the fact we need additional higher latency
17979         128bit inserts for AVX256 and AVX512 vector builds.
17980         (ix86_add_stmt_cost): Scale vector construction cost for
17981         elementwise loads.
17983 2018-02-16  Richard Biener  <rguenther@suse.de>
17985         PR tree-optimization/84417
17986         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
17987         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
17988         (non_rewritable_lvalue_p): Likewise, use poly-ints.
17990 2018-02-16  Martin Liska  <mliska@suse.cz>
17992         PR sanitizer/84307
17993         * internal-fn.def (ASAN_CHECK): Set proper flags.
17994         (ASAN_MARK): Likewise.
17996 2018-02-16  Julia Koval  <julia.koval@intel.com>
17998         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
17999         from PTA_CANNONLAKE.
18001 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18003         PR target/84272
18004         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18005         Use ++iter rather than iter++ for std::list iterators.
18006         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
18007         defer deleting them until all nodes in the forest are processed.  Do
18008         free even leaf nodes.  Change to_process into auto_vec.
18010         PR bootstrap/84405
18011         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18012         * vec.h (vec_default_construct): Use memset instead of placement new
18013         if BROKEN_VALUE_INITIALIZATION is defined.
18014         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18015         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18016         is defined.
18018         PR rtl-optimization/83723
18019         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18020         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
18021         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
18022         recursive calls.
18023         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18024         callers.
18025         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18027 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
18029         PR rtl-optimization/81443
18030         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18031         from inner REGs to paradoxical SUBREGs.
18033 2018-02-16  Richard Biener  <rguenther@suse.de>
18035         PR tree-optimization/84399
18036         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18037         For operands we can analyze at their definition make sure we can
18038         analyze them at each use as well.
18040 2018-02-16  Richard Biener  <rguenther@suse.de>
18042         PR tree-optimization/84190
18043         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18044         volatile accesses if the decl isn't volatile.
18046 2018-02-15  Jason Merrill  <jason@redhat.com>
18048         PR c++/84314 - ICE with templates and fastcall attribute.
18049         * attribs.c (build_type_attribute_qual_variant): Don't clobber
18050         TYPE_CANONICAL on an existing type.
18052 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
18054         PR tree-optimization/84383
18055         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18056         dstoff nor call operand_equal_p if dstbase is NULL.
18058         PR tree-optimization/84334
18059         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18060         also a CONSTANT_CLASS_P, punt.
18062 2018-02-14  Jim Wilson  <jimw@sifive.com>
18064         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18065         first SMALL_OPERAND check.  New local min_second_step.  Move assert
18066         to where locals are set.  Add TARGET_RVC support.
18067         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18069 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
18071         * doc/invoke.texi: Correct -Wformat-overflow code sample.
18073 2018-02-14  Martin Sebor  <msebor@redhat.com>
18075         PR tree-optimization/83698
18076         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18077         arrays constrain the offset range to their bounds.
18078         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18079         (builtin_access::overlap): Avoid setting the size of overlap if it's
18080         already been set.
18081         (maybe_diag_overlap): Also consider arrays when deciding what values
18082         of offsets to include in diagnostics.
18084 2018-02-14  Martin Sebor  <msebor@redhat.com>
18086         PR c/84108
18087         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18088         that correspond to the kind of a declaration.
18090 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
18092         PR target/83984
18093         * config/pa/pa.md: Load address of PIC label using the linkage table
18094         if the label is nonlocal.
18096 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18098         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18099         warning message if user requests -maltivec=be.
18100         * doc/invoke.texi: Document deprecation of -maltivec=be.
18102 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
18104         PR target/84220
18105         * config/rs6000/rs6000-c.c: Update definitions for
18106         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18107         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18109 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18111         PR target/84239
18112         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18113         add _get_ssp intrinsics. Remove argument from
18114         __builtin_ia32_rdssp[d|q].
18115         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18116         * config/i386/i386-builtin.def: Remove argument from
18117         __builtin_ia32_rdssp[d|q].
18118         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18119         ix86_expand_special_args_builtin for _rdssp[d|q].
18120         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18121         Clear register before usage.
18122         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18123         Add documentation for new _get_ssp and _inc_ssp intrinsics.
18125 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
18127         PR tree-optimization/84357
18128         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18129         operand 1 of an ARRAY_REF too.
18131 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
18133         PR target/83831
18134         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18135         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18136         declarations.
18137         (set_of_reg): New struct.
18138         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18139         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18140         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18141         functions.
18142         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18143         Split into bitclr, bitset, bitinvert patterns if appropriate.
18144         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18145         use rx_fuse_in_memory_bitop.
18146         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18147         to named insn, correct maximum insn length.
18149 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
18151         PR target/79242
18152         * machmode.def: Define a complex mode for PARTIAL_INT.
18153         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18154         MODE_PARTIAL_INT.
18155         * doc/rtl.texi: Document CSPImode.
18156         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18157         handling.
18158         (msp430_hard_regno_nregs_with_padding): Likewise.
18160 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
18162         PR target/84279
18163         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18165 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
18167         PR rtl-optimization/84169
18168         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
18169         we generated a parallel as new i3 and we split that to new i2 and i3
18170         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
18171         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
18172         those to i2, not i1.  Partially rewrite this scan code.
18174 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18176         PR c/82210
18177         * stor-layout.c (place_field): For variable length fields, adjust
18178         offset_align afterwards not just based on the field's alignment,
18179         but also on the size.
18181         PR middle-end/84309
18182         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18183         of exps and logs in the use_exp2 case.
18185 2018-02-13  Jeff Law  <law@redhat.com>
18187         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18188         entry for "vector".
18190         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18191         ARGS as unused.
18193 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
18195         PR debug/84342
18196         PR debug/84319
18197         * common.opt (gas-loc-support, gas-locview-support): New.
18198         (ginline-points, ginternal-reset-location-views): New.
18199         * doc/invoke.texi: Document them.  Use @itemx where intended.
18200         (gvariable-location-views): Adjust.
18201         * target.def (reset_location_view): New.
18202         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18203         (TARGET_RESET_LOCATION_VIEW): New.
18204         * doc/tm.texi: Rebuilt.
18205         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18206         (dwarf2out_default_as_locview_support): New.
18207         (output_asm_line_debug_info): Use option variables.
18208         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18209         (output_loc_list): Likewise.
18210         (add_high_low_attributes): Check option variables.
18211         Don't output entry view attribute in strict mode.
18212         (gen_inlined_subroutine_die): Check option variables.
18213         (dwarf2out_inline_entry): Likewise.
18214         (init_sections_and_labels): Likewise.
18215         (dwarf2out_early_finish): Likewise.
18216         (maybe_reset_location_view): New, from...
18217         (dwarf2out_var_location): ... here.  Call it.
18218         * debug.h (dwarf2out_default_as_loc_support): Declare.
18219         (dwarf2out_default_as_locview_support): Declare.
18220         * hooks.c (hook_int_rtx_insn_0): New.
18221         * hooks.h (hook_int_rtx_insn_0): Declare.
18222         * toplev.c (process_options): Take -gas-loc-support and
18223         -gas-locview-support from dwarf2out.  Enable
18224         -gvariable-location-views by default only with locview
18225         assembler support.  Enable -ginternal-reset-location-views by
18226         default only if the target defines the corresponding hook.
18227         Enable -ginline-points by default if location views are
18228         enabled; force it disabled if statement frontiers are
18229         disabled.
18230         * tree-inline.c (expand_call_inline): Check option variables.
18231         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18233 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
18235         PR tree-optimization/84321
18236         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18237         handling.  Also check whether the anti-range contains any values
18238         that satisfy the mask; switch to a VR_RANGE if not.
18240 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
18242         PR sanitizer/84340
18243         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18245 2018-02-13  Martin Jambor  <mjambor@suse.cz>
18247         PR c++/83990
18248         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18249         of call statements, also set location of a load to a temporary.
18251 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
18253         * config/rl78/rl78.c (add_vector_labels): New function.
18254         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18255         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18256         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18257         which checks that no arguments are passed.
18258         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18259         * doc/extend.texi: Documentation for the new attribute.
18261 2018-02-13  Andreas Schwab  <schwab@suse.de>
18263         * config/riscv/linux.h (CPP_SPEC): Define.
18265 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18267         PR target/84335
18268         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18269         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18270         OPTION_MASK_ISA_AES as first argument to def_builtin_const
18271         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18272         instead of OPTION_MASK_ISA_PCLMUL as first argument to
18273         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18274         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18275         temporarily for AES and PCLMUL builtins.
18277         PR tree-optimization/84339
18278         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18279         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18280         Formatting fixes.
18282         PR middle-end/84309
18283         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18284         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18285         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18286         inline function.
18287         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18288         inline function.
18289         * omp-simd-clone.h: New file.
18290         * omp-simd-clone.c: Include omp-simd-clone.h.
18291         (expand_simd_clones): No longer static.
18292         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18293         cgraph.h and omp-simd-clone.h.
18294         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18295         (vect_recog_widen_shift_pattern): Formatting fix.
18296         (vect_pattern_recog_1): Don't check optab for calls.
18298         PR target/84336
18299         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18300         operands[2] into a REG before using gen_lowpart on it.
18302 2018-02-12  Jeff Law  <law@redhat.com>
18304         PR target/83760
18305         * config/sh/sh.c (find_barrier): Consider a sibling call
18306         a barrier as well.
18308         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18309         successfully back substituting a reg.
18311 2018-02-12  Richard Biener  <rguenther@suse.de>
18313         PR tree-optimization/84037
18314         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18315         parameter, move visited init to caller.
18316         (vect_slp_analyze_operations): Separate cost from validity
18317         check, initialize visited once for all instances.
18318         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18319         for all instances.
18320         * tree-vect-stmts.c (vect_model_simple_cost): Make early
18321         out an assert.
18322         (vect_model_promotion_demotion_cost): Likewise.
18323         (vectorizable_bswap): Guard cost modeling with !slp_node
18324         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18325         SLP stmts.
18326         (vectorizable_call): Likewise.
18327         (vectorizable_conversion): Likewise.
18328         (vectorizable_assignment): Likewise.
18329         (vectorizable_shift): Likewise.
18330         (vectorizable_operation): Likewise.
18331         (vectorizable_store): Likewise.
18332         (vectorizable_load): Likewise.
18333         (vectorizable_condition): Likewise.
18334         (vectorizable_comparison): Likewise.
18336 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
18338         PR sanitizer/84307
18339         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18340         (ASAN_MARK): Fix fnspec to account for return value, change pointer
18341         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18343 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18345         PR middle-end/83665
18346         * params.def (inline-min-speedup): Increase from 8 to 15.
18347         (max-inline-insns-auto): Decrease from 40 to 30.
18348         * ipa-split.c (consider_split): Add some buffer for function to
18349         be considered inlining candidate.
18350         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18351         default values.
18353 2018-02-12  Richard Biener  <rguenther@suse.de>
18355         PR tree-optimization/84037
18356         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18357         matched stmts if we cannot swap the non-matched ones.
18359 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18361         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18362         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18363         _mm_maskz_scalef_round_ss): New intrinsics.
18364         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18365         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18366         __builtin_ia32_scalefss_round): Remove.
18367         (__builtin_ia32_scalefsd_mask_round,
18368         __builtin_ia32_scalefss_mask_round): New intrinsics.
18369         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18370         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18371         ((match_operand:VF_128 2 "<round_nimm_predicate>"
18372         "<round_constraint>")): Changed to ...
18373         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18374         "<round_scalar_constraint>")): ... this.
18375         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18376         %0, %1, %2<round_op3>}"): Changed to ...
18377         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18378         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18379         %2<round_scalar_mask_op3>}"): ... this.
18380         * config/i386/subst.md (round_scalar_nimm_predicate): New.
18382 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18384         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18385         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18386         (_mm_maskz_sqrt_round_ss): New intrinsics.
18387         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18388         (__builtin_ia32_sqrtsd_mask_round)
18389         (__builtin_ia32_sqrtss_mask_round): New builtins.
18390         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18391         (__builtin_ia32_sqrtss_round): Remove.
18392         (__builtin_ia32_sqrtsd_mask_round)
18393         (__builtin_ia32_sqrtss_mask_round): New builtins.
18394         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18395         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18396         ((match_operand:VF_128 1 "vector_operand"
18397         "xBm,<round_constraint>")): Changed to ...
18398         ((match_operand:VF_128 1 "vector_operand"
18399         "xBm,<round_scalar_constraint>")): ... this.
18400         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18401         %0, %2, %<iptr>1<round_op3>}): Changed to ...
18402         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18403         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18404         %<iptr>1<round_scalar_mask_op3>}): ... this.
18405         ((set_attr "prefix" "<round_prefix>")): Changed to ...
18406         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18408 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
18410         PR target/84266
18411         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18412         Cast vec_cmpeq result to correct type.
18413         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18414         Cast vec_cmpgt result to correct type.
18416 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
18418         * final.c (final_scan_insn_1): Renamed from...
18419         (final_scan_insn): ... this.  New wrapper, to recover
18420         seen from the outermost call in recursive ones.
18421         * config/sparc/sparc.c (output_return): Drop seen from call.
18422         (output_sibcall): Likewise.
18423         * config/visium/visium.c (output_branch): Likewise.
18425 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
18427         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18428         function label.
18430 2018-02-10  Alan Modra  <amodra@gmail.com>
18432         PR target/84300
18433         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18434         Specify LR as an input.
18436 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
18438         PR sanitizer/83987
18439         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18440         remove_member_access_dummy_vars): New functions.
18441         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18442         lower_omp_1, execute_lower_omp): Use them.
18444         PR rtl-optimization/84308
18445         * shrink-wrap.c (spread_components): Release todo vector.
18447 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
18449         PR rtl-optimization/57193
18450         * ira-color.c (struct allocno_color_data): Add member
18451         conflict_allocno_hard_prefs.
18452         (update_conflict_allocno_hard_prefs): New.
18453         (bucket_allocno_compare_func): Add a preference based on
18454         conflict_allocno_hard_prefs.
18455         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18456         (color_allocnos): Remove a dead code.  Initiate
18457         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
18459 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18461         PR target/84226
18462         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18463         constraint from =wa to wa.  Avoid a subreg on the output operand,
18464         instead use a pseudo and subreg it in a move.
18465         (p9_xxbrd_<mode>): Changed to ...
18466         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18467         (p9_xxbrd_v2df): New expander.
18468         (p9_xxbrw_<mode>): Changed to ...
18469         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18470         (p9_xxbrw_v4sf): New expander.
18472 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18474         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18476 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
18478         PR target/83926
18479         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18480         multiply in 32-bit mode.
18481         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18482         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18483         mode.
18485 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18487         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18488         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18489         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18490         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18492 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
18494         PR lto/84213
18495         * dwarf2out.c (is_trivial_indirect_ref): New function.
18496         (dwarf2out_late_global_decl): Do not generate a location
18497         attribute for variables that have a non-trivial DECL_VALUE_EXPR
18498         and that are not defined in the current unit.
18500 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18502         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18503         instead of a libcall for UNORDERED.
18505 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
18507         PR target/82641
18508         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18509         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18511 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18513         PR target/PR84295
18514         * config/s390/s390.c (s390_set_current_function): Invoke
18515         s390_indirect_branch_settings also if fndecl didn't change.
18517 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18519         * config/rs6000/rs6000.md (blockage): Set length to zero.
18521 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18523         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18525 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18527         PR sanitizer/84285
18528         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18529         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18530         -static-lib*san.
18532         PR debug/84252
18533         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18534         PARALLEL incoming that failed vt_get_decl_and_offset check.
18536         PR middle-end/84237
18537         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18538         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18539         TREE_READONLY bit.
18540         (get_variable_section): For decls in named .bss* sections pass true as
18541         second argument to bss_initializer_p.
18543 2018-02-09  Marek Polacek  <polacek@redhat.com>
18544             Jakub Jelinek  <jakub@redhat.com>
18546         PR c++/83659
18547         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18548         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
18549         Sync some changes from cxx_fold_indirect_ref.
18551 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18553         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18554         markers.
18555         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18556         (BLOCK_INLINE_ENTRY_LABEL): New.
18557         (dwarf2out_var_location): Disregard inline entry markers.
18558         (inline_entry_data): New struct.
18559         (inline_entry_data_hasher): New hashtable type.
18560         (inline_entry_data_hasher::hash): New.
18561         (inline_entry_data_hasher::equal): New.
18562         (inline_entry_data_table): New variable.
18563         (add_high_low_attributes): Add DW_AT_entry_pc and
18564         DW_AT_GNU_entry_view attributes if a pending entry is found
18565         in inline_entry_data_table.  Add old entry_pc attribute only
18566         if debug nonbinding markers are disabled.
18567         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18568         markers are enabled.
18569         (block_within_block_p, dwarf2out_inline_entry): New.
18570         (dwarf2out_finish): Check that no entries remained in
18571         inline_entry_data_table.
18572         * final.c (reemit_insn_block_notes): Handle inline entry notes.
18573         (final_scan_insn, notice_source_line): Likewise.
18574         (rest_of_clean_state): Skip inline entry markers.
18575         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18576         markers.
18577         * gimple.c (gimple_build_debug_inline_entry): New.
18578         * gimple.h (enum gimple_debug_subcode): Add
18579         GIMPLE_DEBUG_INLINE_ENTRY.
18580         (gimple_build_debug_inline_entry): Declare.
18581         (gimple_debug_inline_entry_p): New.
18582         (gimple_debug_nonbind_marker_p): Adjust.
18583         * insn-notes.def (INLINE_ENTRY): New.
18584         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18585         inline entry marker notes.
18586         (print_insn): Likewise.
18587         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18588         (INSN_DEBUG_MARKER_KIND): Likewise.
18589         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18590         * tree-inline.c (expand_call_inline): Build and insert
18591         debug_inline_entry stmt.
18592         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18593         inline entry blocks early, if nonbind markers are enabled.
18594         (dump_scope_block): Dump fragment info.
18595         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18596         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18597         (gimple_build_debug_inline_entry): New.
18598         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18599         Enable/disable inline entry points too.
18600         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18601         (DEBUG_INSN): Describe inline entry markers.
18603         * common.opt (gvariable-location-views): New.
18604         (gvariable-location-views=incompat5): New.
18605         * config.in: Rebuilt.
18606         * configure: Rebuilt.
18607         * configure.ac: Test assembler for view support.
18608         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18609         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18610         * dwarf2out.c (var_loc_view): New typedef.
18611         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18612         (dwarf2out_locviews_in_attribute): New.
18613         (dwarf2out_locviews_in_loclist): New.
18614         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18615         (enum dw_line_info_opcode): Add LI_adv_address.
18616         (struct dw_line_info_table): Add view.
18617         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18618         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18619         (zero_view_p): New variable.
18620         (ZERO_VIEW_P): New macro.
18621         (output_asm_line_debug_info): New.
18622         (struct var_loc_node): Add view.
18623         (add_AT_view_list, AT_loc_list): New.
18624         (add_var_loc_to_decl): Add view param.  Test it against last.
18625         (new_loc_list): Add view params.  Record them.
18626         (AT_loc_list_ptr): Handle loc and view lists.
18627         (view_list_to_loc_list_val_node): New.
18628         (print_dw_val): Handle dw_val_class_view_list.
18629         (size_of_die): Likewise.
18630         (value_format): Likewise.
18631         (loc_list_has_views): New.
18632         (gen_llsym): Set vl_symbol too.
18633         (maybe_gen_llsym, skip_loc_list_entry): New.
18634         (dwarf2out_maybe_output_loclist_view_pair): New.
18635         (output_loc_list): Output view list or entries too.
18636         (output_view_list_offset): New.
18637         (output_die): Handle dw_val_class_view_list.
18638         (output_dwarf_version): New.
18639         (output_compilation_unit_header): Use it.
18640         (output_skeleton_debug_sections): Likewise.
18641         (output_rnglists, output_line_info): Likewise.
18642         (output_pubnames, output_aranges): Update version comments.
18643         (output_one_line_info_table): Output view numbers in asm comments.
18644         (dw_loc_list): Determine current endview, pass it to new_loc_list.
18645         Call maybe_gen_llsym.
18646         (loc_list_from_tree_1): Adjust.
18647         (add_AT_location_description): Create view list attribute if
18648         needed, check it's absent otherwise.
18649         (convert_cfa_to_fb_loc_list): Adjust.
18650         (maybe_emit_file): Call output_asm_line_debug_info for test.
18651         (dwarf2out_var_location): Reset views as needed.  Precompute
18652         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
18653         attribute.  Set view.
18654         (new_line_info_table): Reset next view.
18655         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
18656         (dwarf2out_source_line): Likewise.  Output view resets and labels to
18657         the assembler, or select appropriate line info opcodes.
18658         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
18659         (optimize_string_length): Catch it.  Adjust.
18660         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
18661         dw_val_class_view_list, and remove it if no longer needed.
18662         (hash_loc_list): Hash view numbers.
18663         (loc_list_hasher::equal): Compare them.
18664         (optimize_location_lists): Check whether a view list symbol is
18665         needed, and whether the locview attribute is present, and
18666         whether they match.  Remove the locview attribute if no longer
18667         needed.
18668         (index_location_lists): Call skip_loc_list_entry for test.
18669         (dwarf2out_finish): Call output_asm_line_debug_info for test.
18670         Use output_dwarf_version.
18671         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
18672         (struct dw_val_node): Add val_view_list.
18673         * final.c (SEEN_NEXT_VIEW): New.
18674         (set_next_view_needed): New.
18675         (clear_next_view_needed): New.
18676         (maybe_output_next_view): New.
18677         (final_start_function): Rename to...
18678         (final_start_function_1): ... this.  Take pointer to FIRST,
18679         add SEEN parameter.  Emit param bindings in the initial view.
18680         (final_start_function): Reintroduce SEEN-less interface.
18681         (final): Rename to...
18682         (final_1): ... this.  Take SEEN parameter.  Output final pending
18683         next view at the end.
18684         (final): Reintroduce seen-less interface.
18685         (final_scan_insn): Output pending next view before switching
18686         sections or ending a block.  Mark the next view as needed when
18687         outputting variable locations.  Notify debug backend of section
18688         changes, and of location view changes.
18689         (rest_of_handle_final): Adjust.
18690         * toplev.c (process_options): Autodetect value for debug variable
18691         location views option.  Warn on incompat5 without -gdwarf-5.
18692         * doc/invoke.texi (gvariable-location-views): New.
18693         (gvariable-location-views=incompat5): New.
18694         (gno-variable-location-views): New.
18696 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
18698         PR tree-optimization/84136
18699         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
18700         that the result of find_edge is non-NULL.
18702 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
18704         PR target/83008
18705         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
18706         storing integer register in SImode.  Fix cost of 256 and 512
18707         byte aligned SSE register store.
18709 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
18711         * config/i386/i386.c (ix86_multiplication_cost): Fix
18712         multiplication cost for TARGET_AVX512DQ.
18714 2018-02-08  Marek Polacek  <polacek@redhat.com>
18716         PR tree-optimization/84238
18717         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
18718         get_range_strlen.
18720 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18722         PR tree-optimization/84265
18723         * tree-vect-stmts.c (vectorizable_store): Don't treat
18724         VMAT_CONTIGUOUS accesses as grouped.
18725         (vectorizable_load): Likewise.
18727 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18729         PR tree-optimization/81635
18730         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
18731         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
18732         (test_round_for_mask): New functions.
18733         (wide_int_cc_tests): Call test_round_for_mask.
18734         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
18735         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
18736         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
18737         range returned by get_range_info.
18739 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18741         PR ipa/81360
18742         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
18743         * symtab.c: Include builtins.h
18744         (symtab_node::output_to_lto_symbol_table_p): Move here
18745         from lto-streamer-out.c:output_symbol_p.
18746         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
18747         (output_symbol_p): Move all logic to symtab.c
18748         (produce_symtab): Update.
18750 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18752         * config/s390/s390-opts.h (enum indirect_branch): Define.
18753         * config/s390/s390-protos.h (s390_return_addr_from_memory)
18754         (s390_indirect_branch_via_thunk)
18755         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
18756         (enum s390_indirect_branch_type): Define.
18757         * config/s390/s390.c (struct s390_frame_layout, struct
18758         machine_function): Remove.
18759         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
18760         (indirect_branch_table_label_no, indirect_branch_table_name):
18761         Define variables.
18762         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
18763         (enum s390_indirect_branch_option): Define.
18764         (s390_return_addr_from_memory): New function.
18765         (s390_handle_string_attribute): New function.
18766         (s390_attribute_table): Add new attribute handler.
18767         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
18768         (s390_indirect_branch_via_thunk): New function.
18769         (s390_indirect_branch_via_inline_thunk): New function.
18770         (s390_function_ok_for_sibcall): When jumping via thunk disallow
18771         sibling call optimization for non z10 compiles.
18772         (s390_emit_call): Force indirect branch target to be a single
18773         register.  Add r1 clobber for non-z10 compiles.
18774         (s390_emit_epilogue): Emit return jump via return_use expander.
18775         (s390_reorg): Handle JUMP_INSNs as execute targets.
18776         (s390_option_override_internal): Perform validity checks for the
18777         new command line options.
18778         (s390_indirect_branch_attrvalue): New function.
18779         (s390_indirect_branch_settings): New function.
18780         (s390_set_current_function): Invoke s390_indirect_branch_settings.
18781         (s390_output_indirect_thunk_function):  New function.
18782         (s390_code_end): Implement target hook.
18783         (s390_case_values_threshold): Implement target hook.
18784         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
18785         macros.
18786         * config/s390/s390.h (struct s390_frame_layout)
18787         (struct machine_function): Move here from s390.c.
18788         (TARGET_INDIRECT_BRANCH_NOBP_RET)
18789         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
18790         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
18791         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
18792         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
18793         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
18794         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
18795         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
18796         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
18797         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
18798         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
18799         (mnemonic attribute): Add values which aren't recognized
18800         automatically.
18801         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
18802         pattern for branch conversion.  Fix mnemonic attribute.
18803         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
18804         indirect branch via thunk if requested.
18805         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
18806         ("*indirect_jump"): Disable for branch conversion using out of
18807         line thunks.
18808         ("indirect_jump_via_thunk<mode>_z10")
18809         ("indirect_jump_via_thunk<mode>")
18810         ("indirect_jump_via_inlinethunk<mode>_z10")
18811         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
18812         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
18813         ("casesi_jump_via_inlinethunk<mode>_z10")
18814         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
18815         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
18816         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
18817         ("*indirect2_jump"): Disable for branch conversion.
18818         ("casesi_jump"): Turn into expander and expand patterns for branch
18819         conversion.
18820         ("return_use"): New expander.
18821         ("*return"): Emit return via thunk and rename it to ...
18822         ("*return<mode>"): ... this one.
18823         * config/s390/s390.opt: Add new options and and enum for the
18824         option values.
18826 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
18828         * lra-constraints.c (match_reload): Unconditionally use
18829         gen_lowpart_SUBREG, rather than selecting between that
18830         and equivalent gen_rtx_SUBREG code.
18832 2018-02-08  Richard Biener  <rguenther@suse.de>
18834         PR tree-optimization/84233
18835         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
18836         changed flag instead of boguously re-using phi_inserted.
18838 2018-02-08  Martin Jambor  <mjambor@suse.cz>
18840         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
18841         static local variables.
18843 2018-02-08  Richard Biener  <rguenther@suse.de>
18845         PR tree-optimization/84278
18846         * tree-vect-stmts.c (vectorizable_store): When looking for
18847         smaller vector types to perform grouped strided loads/stores
18848         make sure the mode is supported by the target.
18849         (vectorizable_load): Likewise.
18851 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18853         * config/aarch64/aarch64.c (aarch64_components_for_bb):
18854         Increase LDP/STP opportunities by adding adjacent callee-saves.
18856 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
18858         PR rtl-optimization/84068
18859         PR rtl-optimization/83459
18860         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
18862 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
18864         PR tree-optimization/84224
18865         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
18866         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
18867         non-zero arguments.
18869 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
18871         PR target/84113
18872         * config/rs6000/altivec.md (*restore_world): Remove LR use.
18873         * config/rs6000/predicates.md (restore_world_operation): Adjust op
18874         count, remove one USE.
18876 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
18878         * doc/install.texi (Configuration): Document the
18879         --with-long-double-format={ibm,ieee} PowerPC configuration
18880         options.
18882         PR target/84154
18883         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
18884         Convert from define_expand to be define_insn_and_split.  Rework
18885         float/double/_Float128 conversions to QI/HI/SImode to work with
18886         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
18887         conversions to QI/HImode types did a store and then a load to
18888         truncate the value.  For conversions to VSX registers, don't split
18889         the insn, instead emit the code directly.  Use the code iterator
18890         any_fix to combine signed and unsigned conversions.
18891         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
18892         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
18893         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18894         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
18895         (fix_<mode>di2_hw): Likewise.
18896         (fixuns_<mode>di2_hw): Likewise.
18897         (fix_<mode>si2_hw): Likewise.
18898         (fixuns_<mode>si2_hw): Likewise.
18899         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
18900         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
18901         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
18902         fix<uns>_trunc<SFDF:mode>si2_p8.
18903         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
18904         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
18905         (fix<uns>_<mode>_mem): Likewise.
18906         (fctiw<u>z_<mode>_mem): Likewise.
18907         (fix<uns>_<mode>_mem): Likewise.
18908         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
18909         the register allocator from doing a direct move to the GPRs to do
18910         a store, and instead use the ISA 3.0 store byte/half-word from
18911         vector register instruction.  For IEEE 128-bit floating point,
18912         also optimize stores of 32-bit ints.
18913         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
18915 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
18917         * genextract.c (push_pathstr_operand): New function to support
18918         [a-zA-Z].
18919         (walk_rtx): Call push_pathstr_operand.
18920         (print_path): Support [a-zA-Z].
18922 2018-02-07  Richard Biener  <rguenther@suse.de>
18924         PR tree-optimization/84037
18925         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
18926         (cse_and_gimplify_to_preheader): Declare.
18927         (vect_get_place_in_interleaving_chain): Likewise.
18928         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18929         ivexpr_map.
18930         (_loop_vec_info::~_loop_vec_info): Delete it.
18931         (cse_and_gimplify_to_preheader): New function.
18932         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
18933         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
18934         (vectorizable_load): Likewise.  For grouped stores always base
18935         the IV on the first element.
18936         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
18937         condition before gimplifying.
18939 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18941         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
18942         *DIV_EXPR and *MOD_EXPR.
18944 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
18946         PR target/84248
18947         * config/i386/i386.c (ix86_option_override_internal): Mask out
18948         the CF_SET bit when checking -fcf-protection.
18950 2018-02-07  Tom de Vries  <tom@codesourcery.com>
18952         PR libgomp/84217
18953         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
18954         enough.
18956 2018-02-07  Richard Biener  <rguenther@suse.de>
18958         PR tree-optimization/84204
18959         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
18960         this place.
18962         PR tree-optimization/84205
18963         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
18964         special-case isl_ast_op_zdiv_r.
18966         PR tree-optimization/84223
18967         * graphite-scop-detection.c (gather_bbs::before_dom_children):
18968         Only add conditions from within the region.
18969         (gather_bbs::after_dom_children): Adjust.
18971 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
18973         PR target/84209
18974         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
18975         * config/avr/avr.md: Only post-reload split REG-REG moves if
18976         either register is GENERAL_REG_P.
18978 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
18980         PR tree-optimization/84235
18981         * tree-ssa-scopedtables.c
18982         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
18983         if the subtraction is performed in floating point type where NaNs are
18984         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
18985         build 1.  Formatting fix.
18987 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
18989         PR target/84146
18990         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
18991         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
18992         and skip it regardless of bb boundaries.  Use CALL_P macro,
18993         don't test INSN_P (insn) together with CALL_P or JUMP_P check
18994         unnecessarily, formatting fix.
18996 2018-02-06  Michael Collison  <michael.collison@arm.com>
18998         * config/arm/thumb2.md:
18999         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19000         (*thumb_mov_notscc): Ditto.
19002 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
19004         PR target/84154
19005         * config/rs6000/rs6000.md (su code attribute): Use "u" for
19006         unsigned_fix, not "s".
19008 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19010         * configure.ac (gcc_fn_eh_frame_ro): New function.
19011         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19012         correct .eh_frame permissions.
19013         * configure: Regenerate.
19015 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
19017         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19018         irrelevant options.
19020 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19022         * config/rs6000/rs6000.c (rs6000_option_override_internal):
19023         Display warning message for -mno-speculate-indirect-jumps.
19025 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
19027         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19028         Undocumented.
19029         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19031 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
19033         PR tree-optimization/84225
19034         * tree-eh.c (find_trapping_overflow): Only call
19035         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19037 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19039         PR target/84145
19040         * config/i386/i386.c: Reimplement the check of possible options
19041         -mibt/-mshstk conbination. Change error messages.
19042         * doc/invoke.texi: Fix a typo: remove extra '='.
19044 2018-02-06  Marek Polacek  <polacek@redhat.com>
19046         PR tree-optimization/84228
19047         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19049 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
19051         PR target/82641
19052         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19053         emitted arch directives.
19054         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19055         __ARM_FEATURE_COPROC before changing architectures.
19057 2018-02-06  Richard Biener  <rguenther@suse.de>
19059         * config/i386/i386.c (print_reg): Fix typo.
19060         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19062 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
19064         * configure: Regenerate.
19066 2018-02-05  Martin Sebor  <msebor@redhat.com>
19068         PR tree-optimization/83369
19069         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19070         inlining context.
19072 2018-02-05  Martin Liska  <mliska@suse.cz>
19074         * doc/invoke.texi: Cherry-pick upstream r323995.
19076 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
19078         * ira.c (ira_init_register_move_cost): Adjust comment.
19080 2018-02-05  Martin Liska  <mliska@suse.cz>
19082         PR gcov-profile/84137
19083         * doc/gcov.texi: Fix typo in documentation.
19085 2018-02-05  Martin Liska  <mliska@suse.cz>
19087         PR gcov-profile/83879
19088         * doc/gcov.texi: Document necessity of --dynamic-list-data when
19089         using dlopen functionality.
19091 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
19093         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19094         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19095         _mm_maskz_range_ss, _mm_mask_range_round_ss,
19096         _mm_maskz_range_round_ss): New intrinsics.
19097         (__builtin_ia32_rangesd128_round)
19098         (__builtin_ia32_rangess128_round): Remove.
19099         (__builtin_ia32_rangesd128_mask_round,
19100         __builtin_ia32_rangess128_mask_round): New builtins.
19101         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19102         __builtin_ia32_rangess128_round): Remove.
19103         (__builtin_ia32_rangesd128_mask_round,
19104         __builtin_ia32_rangess128_mask_round): New builtins.
19105         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19106         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19107         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19108         "<round_saeonly_constraint>")): Changed to ...
19109         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19110         "<round_saeonly_scalar_constraint>")): ... this.
19111         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19112         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19113         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19114         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19115         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19117 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
19119         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19120         options.
19121         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19122         Remove all values except native, 8540 and 8548.
19124 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
19126         * config/i386/i386.c (ix86_output_function_return): Pass
19127         INVALID_REGNUM, instead of -1, as invalid register number to
19128         indirect_thunk_name and output_indirect_thunk.
19130 2018-02-02  Julia Koval  <julia.koval@intel.com>
19132         * config.gcc: Add -march=icelake.
19133         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19134         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19135         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19136         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19137         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19138         (processor_target_table): Add icelake.
19139         (ix86_option_override_internal): Handle new PTAs.
19140         (get_builtin_code_for_version): Handle icelake.
19141         (M_INTEL_COREI7_ICELAKE): New.
19142         (fold_builtin_cpu): Handle icelake.
19143         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19144         * doc/invoke.texi: Add -march=icelake.
19146 2018-02-02  Julia Koval  <julia.koval@intel.com>
19148         * config/i386/i386.c (ix86_option_override_internal): Change flags type
19149         to wide_int_bitmask.
19150         * wide-int-bitmask.h: New.
19152 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19154         PR target/84066
19155         * config/i386/i386.md: Replace Pmode with word_mode in
19156         builtin_setjmp_setup and builtin_longjmp to support x32.
19158 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
19160         PR target/56010
19161         PR target/83743
19162         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19163         #include "opts.h".
19164         (rs6000_supported_cpu_names): New static variable.
19165         (linux_cpu_translation_table): Likewise.
19166         (elf_platform) <cpu>: Define new static variable and use it.
19167         Translate kernel AT_PLATFORM name to canonical name if needed.
19168         Error if platform name is unknown.
19170 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
19172         PR target/84089
19173         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19175 2018-02-01  Jeff Law  <law@redhat.com>
19177         PR target/84128
19178         * config/i386/i386.c (release_scratch_register_on_entry): Add new
19179         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
19180         the scratch if RELEASE_VIA_POP is false.
19181         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19182         If we have to save a temporary register, decrement SIZE appropriately.
19183         Pass new arguments to release_scratch_register_on_entry.
19184         (ix86_adjust_stack_and_probe): Likewise.
19185         (ix86_emit_probe_stack_range): Pass new arguments to
19186         release_scratch_register_on_entry.
19188 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
19190         PR rtl-optimization/84157
19191         * combine.c (change_zero_ext): Use REG_P predicate in
19192         front of HARD_REGISTER_P predicate.
19194 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
19196         * config/avr/avr.c (avr_option_override): Move disabling of
19197         -fdelete-null-pointer-checks to...
19198         * common/config/avr/avr-common.c (avr_option_optimization_table):
19199         ...here.
19201 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19203         PR tree-optimization/81635
19204         * tree-data-ref.c (split_constant_offset_1): For types that
19205         wrap on overflow, try to use range info to prove that wrapping
19206         cannot occur.
19208 2018-02-01  Renlin Li  <renlin.li@arm.com>
19210         PR target/83370
19211         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19212         TAILCALL_ADDR_REGS.
19213         (aarch64_register_move_cost): Likewise.
19214         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19215         TAILCALL_ADDR_REGS.
19216         (REG_CLASS_NAMES): Likewise.
19217         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19218         TAILCALL_ADDR_REGS. Remove IP registers.
19219         * config/aarch64/aarch64.md (Ucs): Update register constraint.
19221 2018-02-01  Richard Biener  <rguenther@suse.de>
19223         * domwalk.h (dom_walker::dom_walker): Add additional constructor
19224         for specifying RPO order and allow NULL for that.
19225         * domwalk.c (dom_walker::dom_walker): Likewise.
19226         (dom_walker::walk): Handle NULL RPO order.
19227         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19228         in RPO order.
19229         (rewrite_update_dom_walker): Likewise.
19230         (mark_def_dom_walker): Likewise.
19232 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19234         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19235         (aarch64_maybe_expand_sve_subreg_move): Declare.
19236         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19237         * config/aarch64/predicates.md (aarch64_any_register_operand): New
19238         predicate.
19239         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19240         that are semantically a reverse operation.
19241         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19242         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19243         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19244         functions.
19245         (aarch64_can_change_mode_class): For big-endian, forbid changes
19246         between two SVE modes if they have different element sizes.
19248 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19250         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19251         the TImode handling for big-endian targets.
19253 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19255         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19256         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
19257         not just bytes.
19258         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19259         Remove BSWAP handing for big-endian targets and use the form of
19260         LD1RQ appropariate for the mode.
19262 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19264         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19265         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19266         duplicated element.
19268 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19270         PR tearget/83845
19271         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19272         check for operands that need to go through aarch64_sve_reload_be.
19274 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
19276         PR tree-optimization/81661
19277         PR tree-optimization/84117
19278         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19279         * tree-eh.c: Include gimplify.h.
19280         (find_trapping_overflow, replace_trapping_overflow,
19281         rewrite_to_non_trapping_overflow): New functions.
19282         * tree-vect-loop.c: Include tree-eh.h.
19283         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19284         * tree-data-ref.c: Include tree-eh.h.
19285         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19287 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
19289         PR rtl-optimization/84123
19290         * combine.c (change_zero_ext): Check if hard register satisfies
19291         can_change_dest_mode before calling gen_lowpart_SUBREG.
19293 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
19295         PR target/82444
19296         * ira.c (ira_init_register_move_cost): Remove assert.
19298 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19300         PR rtl-optimization/84071
19301         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19302         * doc/tm.texi: Regenerate.
19304 2018-01-31  Richard Biener  <rguenther@suse.de>
19306         PR tree-optimization/84132
19307         * tree-data-ref.c (analyze_miv_subscript): Properly
19308         check whether evolution_function_is_affine_multivariate_p
19309         before calling gcd_of_steps_may_divide_p.
19311 2018-01-31  Julia Koval  <julia.koval@intel.com>
19313         PR target/83618
19314         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19315         * config/i386/i386.md (rdpid_rex64) New.
19316         (rdpid): Make 32bit only.
19318 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
19320         PR lto/84105
19321         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19322         an IDENTIFIER_NODE for FUNCTION_TYPE's.
19324 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19326         Revert
19327         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19329         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19331 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19333         PR rtl-optimization/84071
19334         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19335         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19337 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19339         * config/arc/arc.c (arc_handle_aux_attribute): New function.
19340         (arc_attribute_table): Add 'aux' attribute.
19341         (arc_in_small_data_p): Consider aux like variables.
19342         (arc_is_aux_reg_p): New function.
19343         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19344         (arc_get_aux_arg): New function.
19345         (prepare_move_operands): Handle aux-register access.
19346         (arc_handle_aux_attribute): New function.
19347         * doc/extend.texi (ARC Variable attributes): Add subsection.
19349 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19351         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19352         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19353         (arc_attribute_table): Add 'uncached' attribute.
19354         (arc_print_operand): Print '.di' flag for uncached memory
19355         accesses.
19356         (arc_in_small_data_p): Do not consider for small data the uncached
19357         types.
19358         (arc_is_uncached_mem_p): New function.
19359         * config/arc/predicates.md (compact_store_memory_operand): Check
19360         for uncached memory accesses.
19361         (nonvol_nonimm_operand): Likewise.
19362         * doc/extend.texi (ARC Type Attribute): New subsection.
19364 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
19366         PR c/84100
19367         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19368         falign-loops=): Add Optimization flag.
19370 2018-01-30  Jeff Law  <law@redhat.com>
19372         PR target/84064
19373         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19374         INT_REGISTERS_SAVED.  Check it prior to calling
19375         get_scratch_register_on_entry.
19376         (ix86_adjust_stack_and_probe): Similarly.
19377         (ix86_emit_probe_stack_range): Similarly.
19378         (ix86_expand_prologue): Corresponding changes.
19380 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19382         PR target/40411
19383         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19384         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19386 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
19388         PR target/84112
19389         * lra-constraints.c (curr_insn_transform): Process AND in the
19390         address.
19392 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
19394         PR rtl-optimization/83986
19395         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19396         dependence against last_pending_memory_flush in addition to
19397         pending_jump_insns.
19399 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
19401         PR tree-optimization/81611
19402         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19403         copies.
19405 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19407         PR target/83758
19408         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19409         a reg rtx.
19411 2018-01-30  Richard Biener  <rguenther@suse.de>
19412             Jakub Jelinek  <jakub@redhat.com>
19414         PR tree-optimization/84111
19415         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19416         inner loops added during recursion, as they don't have up-to-date
19417         SSA form.
19419 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19421         PR ipa/81360
19422         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19423         (can_inline_edge_by_limits_p): ... here.
19424         (can_early_inline_edge_p, check_callers,
19425         update_caller_keys, update_callee_keys, recursive_inlining,
19426         add_new_edges_to_heap, speculation_useful_p,
19427         inline_small_functions,
19428         inline_small_functions, flatten_function,
19429         inline_to_all_callers_1): Update.
19431 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19433         * profile-count.c (profile_count::combine_with_ipa_count): Handle
19434         zeros correctly.
19436 2018-01-30  Richard Biener  <rguenther@suse.de>
19438         PR tree-optimization/83008
19439         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19440         invariant and constant vector uses in stmts when they need
19441         more than one stmt.
19443 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19445         PR bootstrap/84017
19446         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19447         * configure: Regenerate.
19449 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19451         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19452         pattern.
19453         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19454         Use gen_rtx_REG rather than gen_lowpart.
19456 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19458         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19459         rather than 0 when creating partial subregs.
19461 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19463         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19464         of usage.
19466 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
19468         PR target/81550
19469         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19470         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19471         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19472         flags.  This restores the settings used before the 2017-07-24.
19473         Turning off pre increment/decrement/modify allows IVOPTS to
19474         optimize DF/SF loops where the index is an int.
19476 2018-01-29  Richard Biener  <rguenther@suse.de>
19477             Kelvin Nilsen  <kelvin@gcc.gnu.org>
19479         PR bootstrap/80867
19480         * tree-vect-stmts.c (vectorizable_call): Don't call
19481         targetm.vectorize_builtin_md_vectorized_function if callee is
19482         NULL.
19484 2018-01-22  Carl Love  <cel@us.ibm.com>
19486         * doc/extend.tex: Fix typo in second arg in
19487         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19489 2018-01-29  Richard Biener  <rguenther@suse.de>
19491         PR tree-optimization/84086
19492         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19493         (flush_ssaname_freelist): When SSA names were released reset
19494         the SCEV hash table.
19496 2018-01-29  Richard Biener  <rguenther@suse.de>
19498         PR tree-optimization/84057
19499         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19500         removed paths when removing edges.
19502 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
19504         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19505         -mfunction-return=@var{choice}.
19507 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19509         PR diagnostic/84034
19510         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19511         Handle CR like TAB.
19512         (layout::print_source_line): Likewise.
19513         (test_get_line_width_without_trailing_whitespace): Add test cases.
19515 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
19517         PR middle-end/84040
19518         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19519         debug insns.
19521 2018-01-26  Jim Wilson  <jimw@sifive.com>
19523         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19525         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19526         specified.
19528 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19530         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19531         and CMP + SUB-immediate -> SUBS.
19533 2018-01-26  Martin Sebor  <msebor@redhat.com>
19535         PR tree-optimization/83896
19536         * tree-ssa-strlen.c (get_string_len): Rename...
19537         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
19538         Avoid assuming length is constant.
19539         (handle_char_store): Use HOST_WIDE_INT for string length.
19541 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
19543         PR target/81763
19544         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19545         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19547 2018-01-26  Richard Biener  <rguenther@suse.de>
19549         PR rtl-optimization/84003
19550         * dse.c (record_store): Only record redundant stores when
19551         the earlier store aliases at least all accesses the later one does.
19553 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
19555         PR rtl-optimization/83985
19556         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19557         REG_CFA_RESTORE insns.
19558         (delete_unmarked_insns): Don't ignore separate shrink wrapping
19559         REG_CFA_RESTORE insns here.
19561         PR c/83989
19562         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19563         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19565 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19567         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19568         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19569         (arc_init): Likewise.
19570         (arc_override_options): Likewise.
19571         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19572         value.
19573         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19574         support.
19575         * config/arc/arc.h (TARGET_DBNZ): Define.
19576         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19577         properly set the tune attribute.
19578         (dbnz): Use TARGET_DBNZ guard.
19579         * config/arc/arc.opt (mtune): Add core3 option.
19581 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19583         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19584         recognize new pic like addresses.
19585         (arc_delegitimize_address): Clean up.
19587 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19589         * config/arc/arc-arches.def: Option mrf16 valid for all
19590         architectures.
19591         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19592         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19593         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19594         * config/arc/arc-tables.opt: Regenerate.
19595         * config/arc/arc.c (arc_conditional_register_usage): Handle
19596         reduced register file case.
19597         (arc_file_start): Set must have build attributes.
19598         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19599         mrf16 option value.
19600         * config/arc/arc.opt (mrf16): Add new option.
19601         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19602         * config/arc/genmultilib.awk: Handle new mrf16 option.
19603         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19604         * config/arc/t-multilib: Regenerate.
19605         * doc/invoke.texi (ARC Options): Document mrf16 option.
19607 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19609         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19610         * config/arc/arc.c (arc_handle_secure_attribute): New function.
19611         (arc_attribute_table): Add 'secure_call' attribute.
19612         (arc_print_operand): Print secure call operand.
19613         (arc_function_ok_for_sibcall): Don't optimize tail calls when
19614         secure.
19615         (arc_is_secure_call_p): New function.  * config/arc/arc.md
19616         (call_i): Add support for sjli instruction.
19617         (call_value_i): Likewise.
19618         * config/arc/constraints.md (Csc): New constraint.
19620 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19621             John Eric Martin  <John.Martin@emmicro-us.com>
19623         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19624         * config/arc/arc.c (_arc_jli_section): New struct.
19625         (arc_jli_section): New type.
19626         (rc_jli_sections): New static variable.
19627         (arc_handle_jli_attribute): New function.
19628         (arc_attribute_table): Add jli_always and jli_fixed attribute.
19629         (arc_file_end): New function.
19630         (TARGET_ASM_FILE_END): Define.
19631         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19632         (arc_add_jli_section): New function.
19633         (jli_call_scan): Likewise.
19634         (arc_reorg): Call jli_call_scan.
19635         (arc_output_addsi): Remove 'S' from printing asm operand.
19636         (arc_is_jli_call_p): New function.
19637         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19638         operand.
19639         (movhi_insn): Likewise.
19640         (movsi_insn): Likewise.
19641         (movsi_set_cc_insn): Likewise.
19642         (loadqi_update): Likewise.
19643         (load_zeroextendqisi_update): Likewise.
19644         (load_signextendqisi_update): Likewise.
19645         (loadhi_update): Likewise.
19646         (load_zeroextendhisi_update): Likewise.
19647         (load_signextendhisi_update): Likewise.
19648         (loadsi_update): Likewise.
19649         (loadsf_update): Likewise.
19650         (movsicc_insn): Likewise.
19651         (bset_insn): Likewise.
19652         (bxor_insn): Likewise.
19653         (bclr_insn): Likewise.
19654         (bmsk_insn): Likewise.
19655         (bicsi3_insn): Likewise.
19656         (cmpsi_cc_c_insn): Likewise.
19657         (movsi_ne): Likewise.
19658         (movsi_cond_exec): Likewise.
19659         (clrsbsi2): Likewise.
19660         (norm_f): Likewise.
19661         (normw): Likewise.
19662         (swap): Likewise.
19663         (divaw): Likewise.
19664         (flag): Likewise.
19665         (sr): Likewise.
19666         (kflag): Likewise.
19667         (ffs): Likewise.
19668         (ffs_f): Likewise.
19669         (fls): Likewise.
19670         (call_i): Remove 'S' asm letter, add jli instruction.
19671         (call_value_i): Likewise.
19672         * config/arc/arc.op (mjli-always): New option.
19673         * config/arc/constraints.md (Cji): New constraint.
19674         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
19675         operand.
19676         (subsf3_fpx): Likewise.
19677         (mulsf3_fpx): Likewise.
19678         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
19679         asm operand.
19680         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
19681         function attrbutes.
19682         * doc/invoke.texi (ARC): Document mjli-always option.
19684 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
19686         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
19687         avoid addition with 0 and use incw and decw where possible.
19689 2018-01-26  Richard Biener  <rguenther@suse.de>
19691         PR tree-optimization/81082
19692         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
19693         association if it requires casting to unsigned.
19694         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
19695         from fold_plusminus_mult_expr to catch important cases late when
19696         range info is available.
19698 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19700         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
19701         * configure.ac (hidden_linkonce): New test.
19702         * configure: Regenerate.
19703         * config.in: Regenerate.
19705 2018-01-26  Julia Koval  <julia.koval@intel.com>
19707         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
19708         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
19709         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
19710         _mm_mask_bitshuffle_epi64_mask): Fix type.
19711         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
19712         USI_FTYPE_V4DI_V4DI_USI): Remove.
19713         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
19714         __builtin_ia32_vpshufbitqmb256_mask,
19715         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
19716         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
19717         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
19719 2018-01-26  Alan Modra  <amodra@gmail.com>
19721         PR target/84033
19722         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
19723         UNSPEC_VBPERMQ.  Sort other unspecs.
19725 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
19727         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
19729 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
19731         PR middle-end/83055
19732         * predict.c (drop_profile): Do not push/pop cfun; update also
19733         node->count.
19734         (handle_missing_profiles): Fix logic looking for zero profiles.
19736 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
19738         PR middle-end/83977
19739         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
19740         on functions with #pragma omp declare simd or functions with simd
19741         attribute.
19742         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
19743         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
19744         Remove trailing \n from warning_at calls.
19746 2018-01-25  Tom de Vries  <tom@codesourcery.com>
19748         PR target/84028
19749         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19750         for neutered workers.
19752 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
19754         PR target/68467
19755         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
19756         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
19758 2018-01-24  Jeff Law  <law@redhat.com>
19760         PR target/83994
19761         * i386.c (get_probe_interval): Move to earlier point.
19762         (ix86_compute_frame_layout): If -fstack-clash-protection and
19763         the frame is larger than the probe interval, then use pushes
19764         to save registers rather than reg->mem moves.
19765         (ix86_expand_prologue): Remove conditional for int_registers_saved
19766         assertion.
19768 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
19770         PR target/84014
19771         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
19772         min/max for never referenced object.
19774 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
19776         PR middle-end/83977
19777         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
19778         here.
19779         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
19780         attributes from DECL_ATTRIBUTES (decl) without affecting
19781         DECL_ATTRIBUTES (current_function_decl).
19782         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
19783         functions with non-NULL DECL_ABSTRACT_ORIGIN.
19785 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
19787         PR tree-optimization/83979
19788         * fold-const.c (fold_comparison): Use constant_boolean_node
19789         instead of boolean_{true,false}_node.
19791 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
19793         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
19794         with zero counts.
19796 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19798         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19799         Simplify the clause that sets the length attribute.
19800         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19801         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
19802         clause that sets the length attribute.
19803         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19805 2018-01-24  Tom de Vries  <tom@codesourcery.com>
19807         PR target/83589
19808         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
19809         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
19810         Add strict parameter.
19811         (prevent_branch_around_nothing): Insert dummy insn between branch to
19812         label and label with no ptx insn inbetween.
19813         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
19815 2018-01-24  Tom de Vries  <tom@codesourcery.com>
19817         PR target/81352
19818         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
19819         for neutered threads in warp.
19820         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
19822 2018-01-24  Richard Biener  <rguenther@suse.de>
19824         PR tree-optimization/83176
19825         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
19826         operands.
19828 2018-01-24  Richard Biener  <rguenther@suse.de>
19830         PR tree-optimization/82819
19831         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
19832         code generating pluses that are no-ops in the target precision.
19834 2018-01-24  Richard Biener  <rguenther@suse.de>
19836         PR middle-end/84000
19837         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
19839 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19841         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
19842         to merge probabilities.
19843         * predict.c (probably_never_executed): Also mark as cold functions
19844         with global 0 profile and guessed local profile.
19845         * profile-count.c (profile_probability::combine_with_count): New
19846         member function.
19847         * profile-count.h (profile_probability::operator*,
19848         profile_probability::operator*=, profile_probability::operator/,
19849         profile_probability::operator/=): Reduce precision to adjusted
19850         and set value to guessed on contradictory divisions.
19851         (profile_probability::combine_with_freq): Remove.
19852         (profile_probability::combine_wiht_count): Declare.
19853         (profile_count::force_nonzero):: Set to adjusted.
19854         (profile_count::probability_in):: Set quality to adjusted.
19855         * tree-ssa-tail-merge.c (replace_block_by): Use
19856         combine_with_count.
19858 2018-01-23  Andrew Waterman  <andrew@sifive.com>
19859             Jim Wilson  <jimw@sifive.com>
19861         * config/riscv/riscv.c (riscv_stack_boundary): New.
19862         (riscv_option_override): Set riscv_stack_boundary.  Handle
19863         riscv_preferred_stack_boundary_arg.
19864         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
19865         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
19866         (STACK_BOUNDARY): Set to riscv_stack_boundary.
19867         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
19868         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
19869         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
19871 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
19873         PR target/83905
19874         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
19875         of struct ix86_frame.
19876         (ix86_expand_epilogue): Likewise.  Add a local variable for
19877         the reg_save_offset field in struct ix86_frame.
19879 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
19881         PR tree-optimization/82604
19882         * tree-loop-distribution.c (enum partition_kind): New enum item
19883         PKIND_PARTIAL_MEMSET.
19884         (partition_builtin_p): Support above new enum item.
19885         (generate_code_for_partition): Ditto.
19886         (compute_access_range): Differentiate cases that equality can be
19887         proven at all loops, the innermost loops or no loops.
19888         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
19889         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
19890         (finalize_partitions, distribute_loop): Don't fuse partition of
19891         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
19892         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
19893         parloop is enabled.
19895 2018-01-23  Martin Liska  <mliska@suse.cz>
19897         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
19898         order to ignore the predictor.
19899         (PRED_POLYMORPHIC_CALL): Likewise.
19900         (PRED_RECURSIVE_CALL): Likewise.
19902 2018-01-23  Martin Liska  <mliska@suse.cz>
19904         * tree-profile.c (tree_profiling): Print function header to
19905         aware reader which function we are working on.
19906         * value-prof.c (gimple_find_values_to_profile): Do not print
19907         not interesting value histograms.
19909 2018-01-23  Martin Liska  <mliska@suse.cz>
19911         * profile-count.h (enum profile_quality): Add
19912         profile_uninitialized as the first value. Do not number values
19913         as they are zero based.
19914         (profile_count::verify): Update sanity check.
19915         (profile_probability::verify): Likewise.
19917 2018-01-23  Nathan Sidwell  <nathan@acm.org>
19919         * doc/invoke.texi (ffor-scope): Deprecate.
19921 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19923         PR tree-optimization/83510
19924         * domwalk.c (set_all_edges_as_executable): New function.
19925         (dom_walker::dom_walker): Convert bool param
19926         "skip_unreachable_blocks" to enum reachability.  Move setup of
19927         edge flags to set_all_edges_as_executable and only do it when
19928         reachability is REACHABLE_BLOCKS.
19929         * domwalk.h (enum dom_walker::reachability): New enum.
19930         (dom_walker::dom_walker): Convert bool param
19931         "skip_unreachable_blocks" to enum reachability.
19932         (set_all_edges_as_executable): New decl.
19933         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
19934         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
19935         "reachability".
19936         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
19937         but converting true to REACHABLE_BLOCKS.
19938         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
19939         * tree-vrp.c
19940         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
19941         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
19942         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
19943         REACHABLE_BLOCKS.
19944         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
19945         if check_all_array_refs will be called.
19947 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19949         * tree.c (selftest::test_location_wrappers): Add more test
19950         coverage.
19952 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
19954         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
19955         (selftest::test_bit_in_range): Likewise.
19957 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19959         PR testsuite/83888
19960         * doc/sourcebuild.texi (vect_float): Say that the selector
19961         only describes the situation when -funsafe-math-optimizations is on.
19962         (vect_float_strict): Document.
19964 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
19966         PR tree-optimization/83965
19967         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
19968         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
19969         instead of checking only for a reduction.
19970         (vect_recog_widen_sum_pattern): Likewise.
19972 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19974         * predict.c (probably_never_executed): Only use precise profile info.
19975         (compute_function_frequency): Skip after inlining hack since we now
19976         have quality checking.
19978 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
19980         * profile-count.h (profile_probability::very_unlikely,
19981         profile_probability::unlikely, profile_probability::even): Set
19982         precision to guessed.
19984 2018-01-23  Richard Biener  <rguenther@suse.de>
19986         PR tree-optimization/83963
19987         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
19988         Properly terminate dominator walk when crossing the exit edge not
19989         when visiting its source block.
19991 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
19993         PR c++/83918
19994         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
19995         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
19997 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
19999         PR tree-optimization/83957
20000         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
20001         semicolon after for body surrounded by braces.
20003         PR tree-optimization/83081
20004         * profile-count.h (profile_probability::split): New method.
20005         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20006         Use profile_probability::split.
20007         (do_compare_rtx_and_jump): Fix adjustment of probabilities
20008         when splitting a single conditional jump into 2.
20010 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
20012         PR tree-optimization/69452
20013         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20014         decl.
20016 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20018         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20019         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20020         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20022 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20024         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20025         declaration.
20026         * config/rl78/rl78.md (movdi): New define_expand.
20027         * config/rl78/rl78.c (rl78_split_movdi): New function.
20029 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
20031         PR target/83862
20032         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20033         no longer used.
20034         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20035         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20036         128-bit to produce an UNSPEC move to get the double word with the
20037         signbit and then a shift directly to do signbit.
20038         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20039         implementation with a new version that just does either a direct
20040         move or a regular move.  Move memory interface to separate insns.
20041         Move insns so they are next to the expander.
20042         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20043         with signbit move.  Split big and little endian case.
20044         (signbit<mode>2_dm_mem_le): Likewise.
20045         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20046         (signbit<mode>2_dm2): Likewise.
20048 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20050         * config/rl78/rl78.md (anddi3): New define_expand.
20052 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20054         * config/rl78/rl78.md (umindi3): New define_expand.
20056 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20058         * config/rl78/rl78.md (smindi3): New define_expand.
20060 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20062         * config/rl78/rl78.md (smaxdi3): New define_expand.
20064 2018-01-22  Carl Love  <cel@us.ibm.com>
20066         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20067         LVX_V1TI): Add macro expansion.
20068         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20069         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20070         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20071         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20072         Change check to determine if the instruction is a byte reversing
20073         entry.  Fix typo in comment.
20074         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20075         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20076         Add def_builtin calls for new builtins.
20077         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20078         Add define_insn expansion.
20080 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20082         * config/rl78/rl78.md (umaxdi3): New define_expand.
20084 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20086         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20087         for non-QImode registers.
20089 2018-01-22  Richard Biener  <rguenther@suse.de>
20091         PR tree-optimization/83963
20092         * graphite-scop-detection.c (scop_detection::get_sese): Delay
20093         including the loop exit block.
20094         (scop_detection::merge_sese): Likewise.
20095         (scop_detection::add_scop): Do it here instead.
20097 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20099         * doc/sourcebuild.texi (arm_softfloat): Document.
20101 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
20103         PR gcc/77734
20104         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20105         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20106         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20108 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20109             David Edelsohn  <dje.gcc@gmail.com>
20111         PR target/83946
20112         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20113         Change "crset eq" to "crset 2".
20114         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20115         (*call_indirect_aix<mode>_nospec): Likewise.
20116         (*call_value_indirect_aix<mode>_nospec): Likewise.
20117         (*call_indirect_elfv2<mode>_nospec): Likewise.
20118         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20119         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20120         change assembly output from . to $.
20121         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20122         (indirect_jump<mode>_nospec): Change assembly output from . to $.
20123         (*tablejump<mode>_internal1_nospec): Likewise.
20125 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
20127         PR target/80870
20128         * config/sh/sh_optimize_sett_clrt.cc:
20129         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20131 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
20133         PR tree-optimization/83940
20134         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20135         offset_dt to vect_constant_def rather than vect_unknown_def_type.
20136         (vect_check_load_store_mask): Add a mask_dt_out parameter and
20137         use it to pass back the definition type.
20138         (vect_check_store_rhs): Likewise rhs_dt_out.
20139         (vect_build_gather_load_calls): Add a mask_dt argument and use
20140         it instead of a call to vect_is_simple_use.
20141         (vectorizable_store): Update calls to vect_check_load_store_mask
20142         and vect_check_store_rhs.  Use the dt returned by the latter instead
20143         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
20144         instead of calls to vect_is_simple_use.  Pass the scalar rather
20145         than the vector operand to vect_is_simple_use when handling
20146         second and subsequent copies of an rhs value.
20147         (vectorizable_load): Update calls to vect_check_load_store_mask
20148         and vect_build_gather_load_calls.  Use the cached mask_dt and
20149         gs_info.offset_dt instead of calls to vect_is_simple_use.
20151 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
20153         PR middle-end/83945
20154         * tree-emutls.c: Include gimplify.h.
20155         (lower_emutls_2): New function.
20156         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20157         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20158         it before further processing.
20160         PR target/83930
20161         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20162         UINTVAL (trueop1) instead of INTVAL (op1).
20164 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
20166         PR debug/81570
20167         PR debug/83728
20168         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20169         INCOMING_FRAME_SP_OFFSET if not defined.
20170         (scan_trace): Add ENTRY argument.  If true and
20171         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20172         emit a note to adjust the CFA offset.
20173         (create_cfi_notes): Adjust scan_trace callers.
20174         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20175         INCOMING_FRAME_SP_OFFSET in the CIE.
20176         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20177         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20178         Likewise.
20179         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20180         * doc/tm.texi: Regenerated.
20182 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20184         PR rtl-optimization/83147
20185         * lra-constraints.c (remove_inheritance_pseudos): Use
20186         lra_substitute_pseudo_within_insn.
20188 2018-01-19  Tom de Vries  <tom@codesourcery.com>
20189             Cesar Philippidis  <cesar@codesourcery.com>
20191         PR target/83920
20192         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20194 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
20196         PR target/83790
20197         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20198         spaces for function labels.
20200 2018-01-19  Martin Liska  <mliska@suse.cz>
20202         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20203         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20204         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20205         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20206         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20207         (PRED_CONST_RETURN): Change from 69 to 65.
20208         (PRED_NULL_RETURN): Change from 91 to 71.
20209         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20210         (PRED_LOOP_GUARD): Change from 66 to 73.
20212 2018-01-19  Martin Liska  <mliska@suse.cz>
20214         * predict.c (predict_insn_def): Add new assert.
20215         (struct branch_predictor): Change type to signed integer.
20216         (test_prediction_value_range): Amend test to cover
20217         PROB_UNINITIALIZED.
20218         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20219         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20220         (PRED_LOOP_ITERATIONS_MAX): Likewise.
20221         (PRED_LOOP_IV_COMPARE): Likewise.
20222         * predict.h (PROB_UNINITIALIZED): Define new constant.
20224 2018-01-19  Martin Liska  <mliska@suse.cz>
20226         * predict.c (dump_prediction): Add new format for
20227         analyze_brprob.py script which is enabled with -details
20228         suboption.
20229         * profile-count.h (precise_p): New function.
20231 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20233         PR tree-optimization/83922
20234         * tree-vect-loop.c (vect_verify_full_masking): Return false if
20235         there are no statements that need masking.
20236         (vect_active_double_reduction_p): New function.
20237         (vect_analyze_loop_operations): Use it when handling phis that
20238         are not in the loop header.
20240 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20242         PR tree-optimization/83914
20243         * tree-vect-loop.c (vectorizable_induction): Don't convert
20244         init_expr or apply the peeling adjustment for inductions
20245         that are nested within the vectorized loop.
20247 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20249         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20250         instead of NEG.
20252 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20254         PR sanitizer/81715
20255         PR testsuite/83882
20256         * function.h (gimplify_parameters): Add gimple_seq * argument.
20257         * function.c: Include gimple.h and options.h.
20258         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20259         for the added local temporaries if needed.
20260         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20261         if there are any parameter cleanups, wrap whole body into a
20262         try/finally with the cleanups.
20264 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
20266         PR target/82964
20267         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20268         Use GET_MODE_CLASS for scalar floating point.
20270 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20272         PR ipa/82256
20273         patch by PaX Team
20274         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20275         Fix call of call_cgraph_insertion_hooks.
20277 2018-01-18  Martin Sebor  <msebor@redhat.com>
20279         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20281 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20283         PR ipa/83619
20284         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20285         frequencies.
20287 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
20289         PR other/70268
20290         * common.opt: (-ffile-prefix-map): New option.
20291         * opts.c (common_handle_option): Defer it.
20292         * opts-global.c (handle_common_deferred_options): Handle it.
20293         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20294         * file-prefix-map.h: New file.
20295         (remap_debug_filename, add_debug_prefix_map): ...here.
20296         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20297         * final.c (debug_prefix_map, add_debug_prefix_map
20298         remap_debug_filename): Move to...
20299         * file-prefix-map.c: New file.
20300         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20301         generalize, get rid of alloca(), use strrchr() instead of strchr().
20302         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20303         Implement in terms of add_prefix_map().
20304         (remap_macro_filename, remap_debug_filename): Implement in term of
20305         remap_filename().
20306         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20307         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20308         * dbxout.c: Include file-prefix-map.h.
20309         * varasm.c: Likewise.
20310         * vmsdbgout.c: Likewise.
20311         * xcoffout.c: Likewise.
20312         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20313         * doc/cppopts.texi (-fmacro-prefix-map): Document.
20314         * doc/invoke.texi (-ffile-prefix-map): Document.
20315         (-fdebug-prefix-map): Update description.
20317 2018-01-18  Martin Liska  <mliska@suse.cz>
20319         * config/i386/i386.c (indirect_thunk_name): Document that also
20320         lfence is emitted.
20321         (output_indirect_thunk): Document why both instructions
20322         (pause and lfence) are generated.
20324 2018-01-18  Richard Biener  <rguenther@suse.de>
20326         PR tree-optimization/83887
20327         * graphite-scop-detection.c
20328         (scop_detection::get_nearest_dom_with_single_entry): Remove.
20329         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20330         (scop_detection::merge_sese): Re-implement with a flood-fill
20331         algorithm that properly finds a SESE region if it exists.
20333 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20335         PR c/61240
20336         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20337         pointer_diff optimizations use view_convert instead of convert.
20339 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20341         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20342         Generate different code for -mno-speculate-indirect-jumps.
20343         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20344         (*call_indirect_aix<mode>): Disable for
20345         -mno-speculate-indirect-jumps.
20346         (*call_indirect_aix<mode>_nospec): New define_insn.
20347         (*call_value_indirect_aix<mode>): Disable for
20348         -mno-speculate-indirect-jumps.
20349         (*call_value_indirect_aix<mode>_nospec): New define_insn.
20350         (*sibcall_nonlocal_sysv<mode>): Generate different code for
20351         -mno-speculate-indirect-jumps.
20352         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20354 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
20356         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20357         long double type, set the flags for noting the default long double
20358         type, even if we don't pass or return a long double type.
20360 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
20362         PR ipa/83051
20363         * ipa-inline.c (flatten_function): Do not overwrite final inlining
20364         failure.
20366 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
20368         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20369         support for merge[hl].
20370         (fold_mergehl_helper): New helper function.
20371         (tree-vector-builder.h): New #include for tree_vector_builder usage.
20372         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20373         (altivec_vmrglw_direct): Add xxmrglw insn.
20375 2018-01-17  Andrew Waterman  <andrew@sifive.com>
20377         * config/riscv/riscv.c (riscv_conditional_register_usage): If
20378         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20380 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
20382         PR lto/83121
20383         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20384         call the lto_location_cache before reading the
20385         DECL_SOURCE_LOCATION of the types.
20387 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
20388             Richard Sandiford  <richard.sandiford@linaro.org>
20390         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20391         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20392         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20393         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20394         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20395         Add declaration.
20396         * config/aarch64/constraints.md (aarch64_movti_operand):
20397         Limit immediates.
20398         * config/aarch64/predicates.md (Uti): Add new constraint.
20400 2018-01-17  Carl Love  <cel@us.ibm.com>
20402         * config/rs6000/vsx.md (define_expand xl_len_r,
20403         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20404         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20405         lxvll.
20406         (define_expand, define_insn): Move the shift left from  the
20407         define_insn to the define_expand for lxvl and stxvl instructions.
20408         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20409         and XL_LEN_R definitions to PURE.
20411 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
20413         * config/i386/i386.c (indirect_thunk_name): Declare regno
20414         as unsigned int.  Compare regno with INVALID_REGNUM.
20415         (output_indirect_thunk): Ditto.
20416         (output_indirect_thunk_function): Ditto.
20417         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
20418         in the call to output_indirect_thunk_function.
20420 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
20422         PR middle-end/83884
20423         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20424         rather than the size of inner_type to determine the stack slot size
20425         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20427 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
20429         PR target/83546
20430         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20431         to PTA_SILVERMONT.
20433 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
20435         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20436         endian Linux systems to optionally enable multilibs for selecting
20437         the long double type if the user configured an explicit type.
20438         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20439         have no long double multilibs if not defined.
20440         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20441         warn if the user used -mabi={ieee,ibm}longdouble and we built
20442         multilibs for long double.
20443         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20444         appropriate multilib option.
20445         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20446         multilib options.
20447         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20448         for building long double multilibs.
20449         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20451 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
20453         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20454         copies.
20456         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20457         64 bits.
20458         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20459         128 bits.
20461         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20462         variables.
20464         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20465         return value.
20467 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20469         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20470         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20472 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20474         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20475         different rtl trees depending on TARGET_64BIT.
20476         (rs6000_gen_lvx): Likewise.
20478 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20480         * config/visium/visium.md (nop): Tweak comment.
20481         (hazard_nop): Likewise.
20483 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20485         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20486         -mspeculate-indirect-jumps.
20487         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20488         for -mno-speculate-indirect-jumps.
20489         (*call_indirect_elfv2<mode>_nospec): New define_insn.
20490         (*call_value_indirect_elfv2<mode>): Disable for
20491         -mno-speculate-indirect-jumps.
20492         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20493         (indirect_jump): Emit different RTL for
20494         -mno-speculate-indirect-jumps.
20495         (*indirect_jump<mode>): Disable for
20496         -mno-speculate-indirect-jumps.
20497         (*indirect_jump<mode>_nospec): New define_insn.
20498         (tablejump): Emit different RTL for
20499         -mno-speculate-indirect-jumps.
20500         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20501         (tablejumpsi_nospec): New define_expand.
20502         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20503         (tablejumpdi_nospec): New define_expand.
20504         (*tablejump<mode>_internal1): Disable for
20505         -mno-speculate-indirect-jumps.
20506         (*tablejump<mode>_internal1_nospec): New define_insn.
20507         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20508         option.
20510 2018-01-16  Artyom Skrobov tyomitch@gmail.com
20512         * caller-save.c (insert_save): Drop unnecessary parameter.  All
20513         callers updated.
20515 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20516             Richard Biener  <rguenth@suse.de>
20518         PR libgomp/83590
20519         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20520         return early, inline manually is_gimple_sizepos.  Make sure if we
20521         call gimplify_expr we don't end up with a gimple constant.
20522         * tree.c (variably_modified_type_p): Don't return true for
20523         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
20524         * gimplify.h (is_gimple_sizepos): Remove.
20526 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20528         PR tree-optimization/83857
20529         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20530         vectorizable_live_operation for pure SLP statements.
20531         (vectorizable_live_operation): Handle PHIs.
20533 2018-01-16  Richard Biener  <rguenther@suse.de>
20535         PR tree-optimization/83867
20536         * tree-vect-stmts.c (vect_transform_stmt): Precompute
20537         nested_in_vect_loop_p since the scalar stmt may get invalidated.
20539 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20541         PR c/83844
20542         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20543         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20544         If off is not INTEGER_CST, issue a may not be aligned warning
20545         rather than isn't aligned.  Use isn%'t rather than isn't.
20546         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20547         into MULT_EXPR.
20548         <case MULT_EXPR>: Improve the case when bottom and one of the
20549         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20550         operand, in that case check if the other operand is multiple of
20551         bottom divided by the INTEGER_CST operand.
20553 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20555         PR target/83858
20556         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20557         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20558         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20559         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20560         * config/pa/pa.c (pa_function_arg_advance): Likewise.
20561         (pa_function_arg, pa_arg_partial_bytes): Likewise.
20562         (pa_function_arg_size): New function.
20564 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20566         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20567         in a separate statement.
20569 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20571         PR tree-optimization/83847
20572         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20573         group gathers and scatters.
20575 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20577         PR rtl-optimization/86620
20578         * params.def (max-sched-ready-insns): Bump minimum value to 1.
20580         PR rtl-optimization/83213
20581         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20582         to last if both are JUMP_INSNs.
20584         PR tree-optimization/83843
20585         * gimple-ssa-store-merging.c
20586         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20587         store_immediate_info for bswap/nop orig_stores.
20589 2018-01-15  Andrew Waterman  <andrew@sifive.com>
20591         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20592         !TARGET_MUL.
20593         <UDIV>: Increase cost if !TARGET_DIV.
20595 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
20597         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20598         (define_attr "cr_logical_3op"): New.
20599         (cceq_ior_compare): Adjust.
20600         (cceq_ior_compare_complement): Adjust.
20601         (*cceq_rev_compare): Adjust.
20602         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20603         (is_cracked_insn): Adjust.
20604         (insn_must_be_first_in_group): Adjust.
20605         * config/rs6000/40x.md: Adjust.
20606         * config/rs6000/440.md: Adjust.
20607         * config/rs6000/476.md: Adjust.
20608         * config/rs6000/601.md: Adjust.
20609         * config/rs6000/603.md: Adjust.
20610         * config/rs6000/6xx.md: Adjust.
20611         * config/rs6000/7450.md: Adjust.
20612         * config/rs6000/7xx.md: Adjust.
20613         * config/rs6000/8540.md: Adjust.
20614         * config/rs6000/cell.md: Adjust.
20615         * config/rs6000/e300c2c3.md: Adjust.
20616         * config/rs6000/e500mc.md: Adjust.
20617         * config/rs6000/e500mc64.md: Adjust.
20618         * config/rs6000/e5500.md: Adjust.
20619         * config/rs6000/e6500.md: Adjust.
20620         * config/rs6000/mpc.md: Adjust.
20621         * config/rs6000/power4.md: Adjust.
20622         * config/rs6000/power5.md: Adjust.
20623         * config/rs6000/power6.md: Adjust.
20624         * config/rs6000/power7.md: Adjust.
20625         * config/rs6000/power8.md: Adjust.
20626         * config/rs6000/power9.md: Adjust.
20627         * config/rs6000/rs64.md: Adjust.
20628         * config/rs6000/titan.md: Adjust.
20630 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20632         * config/i386/predicates.md (indirect_branch_operand): Rewrite
20633         ix86_indirect_branch_register logic.
20635 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20637         * config/i386/constraints.md (Bs): Update
20638         ix86_indirect_branch_register check.  Don't check
20639         ix86_indirect_branch_register with GOT_memory_operand.
20640         (Bw): Likewise.
20641         * config/i386/predicates.md (GOT_memory_operand): Don't check
20642         ix86_indirect_branch_register here.
20643         (GOT32_symbol_operand): Likewise.
20645 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20647         * config/i386/predicates.md (constant_call_address_operand):
20648         Rewrite ix86_indirect_branch_register logic.
20649         (sibcall_insn_operand): Likewise.
20651 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20653         * config/i386/constraints.md (Bs): Replace
20654         ix86_indirect_branch_thunk_register with
20655         ix86_indirect_branch_register.
20656         (Bw): Likewise.
20657         * config/i386/i386.md (indirect_jump): Likewise.
20658         (tablejump): Likewise.
20659         (*sibcall_memory): Likewise.
20660         (*sibcall_value_memory): Likewise.
20661         Peepholes of indirect call and jump via memory: Likewise.
20662         * config/i386/i386.opt: Likewise.
20663         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20664         (GOT_memory_operand): Likewise.
20665         (call_insn_operand): Likewise.
20666         (sibcall_insn_operand): Likewise.
20667         (GOT32_symbol_operand): Likewise.
20669 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
20671         PR middle-end/83837
20672         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
20673         type rather than type addr's type points to.
20674         (expand_omp_atomic_mutex): Likewise.
20675         (expand_omp_atomic): Likewise.
20677 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20679         PR target/83839
20680         * config/i386/i386.c (output_indirect_thunk_function): Use
20681         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
20682         for  __x86_return_thunk.
20684 2018-01-15  Richard Biener  <rguenther@suse.de>
20686         PR middle-end/83850
20687         * expmed.c (extract_bit_field_1): Fix typo.
20689 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20691         PR target/83687
20692         * config/arm/iterators.md (VF): New mode iterator.
20693         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
20694         Remove integer-related logic from pattern.
20695         (neon_vabd<mode>_3): Likewise.
20697 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
20699         PR middle-end/82694
20700         * common.opt (fstrict-overflow): No longer an alias.
20701         (fwrapv-pointer): New option.
20702         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
20703         also for pointer types based on flag_wrapv_pointer.
20704         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
20705         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
20706         opts->x_flag_wrapv got set.
20707         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
20708         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
20709         POINTER_TYPE_OVERFLOW_UNDEFINED.
20710         * match.pd: Likewise in address comparison pattern.
20711         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
20713 2018-01-15  Richard Biener  <rguenther@suse.de>
20715         PR lto/83804
20716         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
20717         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
20718         Reset type names to their identifier if their TYPE_DECL doesn't
20719         have linkage (and thus is used for ODR and devirt).
20720         (save_debug_info_for_decl): Remove.
20721         (save_debug_info_for_type): Likewise.
20722         (add_tree_to_fld_list): Adjust.
20723         * tree-pretty-print.c (dump_generic_node): Make dumping of
20724         type names more robust.
20726 2018-01-15  Richard Biener  <rguenther@suse.de>
20728         * BASE-VER: Bump to 8.0.1.
20730 2018-01-14  Martin Sebor  <msebor@redhat.com>
20732         PR other/83508
20733         * builtins.c (check_access): Avoid warning when the no-warning bit
20734         is set.
20736 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
20738         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
20739         * ira-color (allocno_hard_regs_compare): Likewise.
20741 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
20743         PR target/83013
20744         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
20745         Use .pushsection/.popsection.
20747 2018-01-14  Martin Sebor  <msebor@redhat.com>
20749         PR c++/81327
20750         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
20752 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
20754         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
20755         entry from extra_headers.
20756         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
20757         extra_headers, make the list bitwise identical to the i?86-*-* one.
20759 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20761         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
20762         -mcmodel=large with -mindirect-branch=thunk,
20763         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
20764         -mfunction-return=thunk-extern.
20765         * doc/invoke.texi: Document -mcmodel=large is incompatible with
20766         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
20767         -mfunction-return=thunk and -mfunction-return=thunk-extern.
20769 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20771         * config/i386/i386.c (print_reg): Print the name of the full
20772         integer register without '%'.
20773         (ix86_print_operand): Handle 'V'.
20774         * doc/extend.texi: Document 'V' modifier.
20776 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20778         * config/i386/constraints.md (Bs): Disallow memory operand for
20779         -mindirect-branch-register.
20780         (Bw): Likewise.
20781         * config/i386/predicates.md (indirect_branch_operand): Likewise.
20782         (GOT_memory_operand): Likewise.
20783         (call_insn_operand): Likewise.
20784         (sibcall_insn_operand): Likewise.
20785         (GOT32_symbol_operand): Likewise.
20786         * config/i386/i386.md (indirect_jump): Call convert_memory_address
20787         for -mindirect-branch-register.
20788         (tablejump): Likewise.
20789         (*sibcall_memory): Likewise.
20790         (*sibcall_value_memory): Likewise.
20791         Disallow peepholes of indirect call and jump via memory for
20792         -mindirect-branch-register.
20793         (*call_pop): Replace m with Bw.
20794         (*call_value_pop): Likewise.
20795         (*sibcall_pop_memory): Replace m with Bs.
20796         * config/i386/i386.opt (mindirect-branch-register): New option.
20797         * doc/invoke.texi: Document -mindirect-branch-register option.
20799 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20801         * config/i386/i386-protos.h (ix86_output_function_return): New.
20802         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
20803         set function_return_type.
20804         (indirect_thunk_name): Add ret_p to indicate thunk for function
20805         return.
20806         (output_indirect_thunk_function): Pass false to
20807         indirect_thunk_name.
20808         (ix86_output_indirect_branch_via_reg): Likewise.
20809         (ix86_output_indirect_branch_via_push): Likewise.
20810         (output_indirect_thunk_function): Create alias for function
20811         return thunk if regno < 0.
20812         (ix86_output_function_return): New function.
20813         (ix86_handle_fndecl_attribute): Handle function_return.
20814         (ix86_attribute_table): Add function_return.
20815         * config/i386/i386.h (machine_function): Add
20816         function_return_type.
20817         * config/i386/i386.md (simple_return_internal): Use
20818         ix86_output_function_return.
20819         (simple_return_internal_long): Likewise.
20820         * config/i386/i386.opt (mfunction-return=): New option.
20821         (indirect_branch): Mention -mfunction-return=.
20822         * doc/extend.texi: Document function_return function attribute.
20823         * doc/invoke.texi: Document -mfunction-return= option.
20825 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
20827         * config/i386/i386-opts.h (indirect_branch): New.
20828         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
20829         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
20830         with local indirect jump when converting indirect call and jump.
20831         (ix86_set_indirect_branch_type): New.
20832         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
20833         (indirectlabelno): New.
20834         (indirect_thunk_needed): Likewise.
20835         (indirect_thunk_bnd_needed): Likewise.
20836         (indirect_thunks_used): Likewise.
20837         (indirect_thunks_bnd_used): Likewise.
20838         (INDIRECT_LABEL): Likewise.
20839         (indirect_thunk_name): Likewise.
20840         (output_indirect_thunk): Likewise.
20841         (output_indirect_thunk_function): Likewise.
20842         (ix86_output_indirect_branch_via_reg): Likewise.
20843         (ix86_output_indirect_branch_via_push): Likewise.
20844         (ix86_output_indirect_branch): Likewise.
20845         (ix86_output_indirect_jmp): Likewise.
20846         (ix86_code_end): Call output_indirect_thunk_function if needed.
20847         (ix86_output_call_insn): Call ix86_output_indirect_branch if
20848         needed.
20849         (ix86_handle_fndecl_attribute): Handle indirect_branch.
20850         (ix86_attribute_table): Add indirect_branch.
20851         * config/i386/i386.h (machine_function): Add indirect_branch_type
20852         and has_local_indirect_jump.
20853         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
20854         to true.
20855         (tablejump): Likewise.
20856         (*indirect_jump): Use ix86_output_indirect_jmp.
20857         (*tablejump_1): Likewise.
20858         (simple_return_indirect_internal): Likewise.
20859         * config/i386/i386.opt (mindirect-branch=): New option.
20860         (indirect_branch): New.
20861         (keep): Likewise.
20862         (thunk): Likewise.
20863         (thunk-inline): Likewise.
20864         (thunk-extern): Likewise.
20865         * doc/extend.texi: Document indirect_branch function attribute.
20866         * doc/invoke.texi: Document -mindirect-branch= option.
20868 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
20870         PR ipa/83051
20871         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
20873 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
20875         * ipa-inline.c (want_inline_small_function_p): Return false if
20876         inlining has already failed with CIF_FINAL_ERROR.
20877         (update_caller_keys): Call want_inline_small_function_p before
20878         can_inline_edge_p.
20879         (update_callee_keys): Likewise.
20881 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20883         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
20884         New function.
20885         (rs6000_quadword_masked_address_p): Likewise.
20886         (quad_aligned_load_p): Likewise.
20887         (quad_aligned_store_p): Likewise.
20888         (const_load_sequence_p): Add comment to describe the outer-most loop.
20889         (mimic_memory_attributes_and_flags): New function.
20890         (rs6000_gen_stvx): Likewise.
20891         (replace_swapped_aligned_store): Likewise.
20892         (rs6000_gen_lvx): Likewise.
20893         (replace_swapped_aligned_load): Likewise.
20894         (replace_swapped_load_constant): Capitalize argument name in
20895         comment describing this function.
20896         (rs6000_analyze_swaps): Add a third pass to search for vector loads
20897         and stores that access quad-word aligned addresses and replace
20898         with stvx or lvx instructions when appropriate.
20899         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
20900         New function prototype.
20901         (rs6000_quadword_masked_address_p): Likewise.
20902         (rs6000_gen_lvx): Likewise.
20903         (rs6000_gen_stvx): Likewise.
20904         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
20905         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
20906         when memory address is aligned.
20907         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
20908         this split to select lvx instruction when memory address is aligned.
20909         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
20910         instruction when memory address is aligned.
20911         (*vsx_le_perm_load_v16qi): Likewise.
20912         (four unnamed splitters): Modify to select the stvx instruction
20913         when memory is aligned.
20915 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
20917         * predict.c (determine_unlikely_bbs): Handle correctly BBs
20918         which appears in the queue multiple times.
20920 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20921             Alan Hayward  <alan.hayward@arm.com>
20922             David Sherwood  <david.sherwood@arm.com>
20924         * tree-vectorizer.h (vec_lower_bound): New structure.
20925         (_loop_vec_info): Add check_nonzero and lower_bounds.
20926         (LOOP_VINFO_CHECK_NONZERO): New macro.
20927         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
20928         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
20929         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
20930         fields.  Make seg_len the distance travelled, not including the
20931         access size.
20932         (dr_direction_indicator): Declare.
20933         (dr_zero_step_indicator): Likewise.
20934         (dr_known_forward_stride_p): Likewise.
20935         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
20936         tree-ssanames.h.
20937         (runtime_alias_check_p): Allow runtime alias checks with
20938         variable strides.
20939         (operator ==): Compare access_size and align.
20940         (prune_runtime_alias_test_list): Rework for new distinction between
20941         the access_size and seg_len.
20942         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
20943         segment lengths.
20944         (get_segment_min_max): New function.
20945         (create_intersect_range_checks): Use it.
20946         (dr_step_indicator): New function.
20947         (dr_direction_indicator): Likewise.
20948         (dr_zero_step_indicator): Likewise.
20949         (dr_known_forward_stride_p): Likewise.
20950         * tree-loop-distribution.c (data_ref_segment_size): Return
20951         DR_STEP * (niters - 1).
20952         (compute_alias_check_pairs): Update call to the dr_with_seg_len
20953         constructor.
20954         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
20955         (vect_preserves_scalar_order_p): New function, split out from...
20956         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
20957         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
20958         (vect_vfa_access_size): New function.
20959         (vect_vfa_align): Likewise.
20960         (vect_compile_time_alias): Take access_size_a and access_b arguments.
20961         (dump_lower_bound): New function.
20962         (vect_check_lower_bound): Likewise.
20963         (vect_small_gap_p): Likewise.
20964         (vectorizable_with_step_bound_p): Likewise.
20965         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
20966         depencies if the vectorization factor is 1.  Convert the checks
20967         for nonzero steps into checks on the bounds of DR_STEP.  Try using
20968         a bunds check for variable steps if the minimum required step is
20969         relatively small. Update calls to the dr_with_seg_len
20970         constructor and to vect_compile_time_alias.
20971         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
20972         function.
20973         (vect_loop_versioning): Call it.
20974         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
20975         when retrying.
20976         (vect_estimate_min_profitable_iters): Account for any bounds checks.
20978 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20979             Alan Hayward  <alan.hayward@arm.com>
20980             David Sherwood  <david.sherwood@arm.com>
20982         * doc/sourcebuild.texi (vect_scatter_store): Document.
20983         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
20984         optabs.
20985         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
20986         Document.
20987         * genopinit.c (main): Add supports_vec_scatter_store and
20988         supports_vec_scatter_store_cached to target_optabs.
20989         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
20990         IFN_MASK_SCATTER_STORE.
20991         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
20992         functions.
20993         * internal-fn.h (internal_store_fn_p): Declare.
20994         (internal_fn_stored_value_index): Likewise.
20995         * internal-fn.c (scatter_store_direct): New macro.
20996         (expand_scatter_store_optab_fn): New function.
20997         (direct_scatter_store_optab_supported_p): New macro.
20998         (internal_store_fn_p): New function.
20999         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21000         IFN_MASK_SCATTER_STORE.
21001         (internal_fn_mask_index): Likewise.
21002         (internal_fn_stored_value_index): New function.
21003         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21004         for scatter stores.
21005         * optabs-query.h (supports_vec_scatter_store_p): Declare.
21006         * optabs-query.c (supports_vec_scatter_store_p): New function.
21007         * tree-vectorizer.h (vect_get_store_rhs): Declare.
21008         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21009         true for scatter stores.
21010         (vect_gather_scatter_fn_p): Handle scatter stores too.
21011         (vect_check_gather_scatter): Consider using scatter stores if
21012         supports_vec_scatter_store_p.
21013         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21014         scatter stores too.
21015         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21016         internal_fn_stored_value_index.
21017         (check_load_store_masking): Handle scatter stores too.
21018         (vect_get_store_rhs): Make public.
21019         (vectorizable_call): Use internal_store_fn_p.
21020         (vectorizable_store): Handle scatter store internal functions.
21021         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21022         when deciding whether the end of the group has been reached.
21023         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21024         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21025         (mask_scatter_store<mode>): New insns.
21027 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21028             Alan Hayward  <alan.hayward@arm.com>
21029             David Sherwood  <david.sherwood@arm.com>
21031         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21032         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21033         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21034         function.
21035         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21036         Use vect_truncate_gather_scatter_offset if we can't treat the
21037         operation as a normal gather load or scatter store.
21038         (get_group_load_store_type): Take the gather_scatter_info
21039         as argument.  Try using a gather load or scatter store for
21040         single-element groups.
21041         (get_load_store_type): Update calls to get_group_load_store_type
21042         and vect_use_strided_gather_scatters_p.
21044 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21045             Alan Hayward  <alan.hayward@arm.com>
21046             David Sherwood  <david.sherwood@arm.com>
21048         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21049         optional tree argument.
21050         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21051         null target hooks.
21052         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21053         but continue to use the current value as a fallback.
21054         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21055         to compare the updates.
21056         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21057         (get_load_store_type): Use it when handling a strided access.
21058         (vect_get_strided_load_store_ops): New function.
21059         (vect_get_data_ptr_increment): Likewise.
21060         (vectorizable_load): Handle strided gather loads.  Always pass
21061         a step to vect_create_data_ref_ptr and bump_vector_ptr.
21063 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21064             Alan Hayward  <alan.hayward@arm.com>
21065             David Sherwood  <david.sherwood@arm.com>
21067         * doc/md.texi (gather_load@var{m}): Document.
21068         (mask_gather_load@var{m}): Likewise.
21069         * genopinit.c (main): Add supports_vec_gather_load and
21070         supports_vec_gather_load_cached to target_optabs.
21071         * optabs-tree.c (init_tree_optimization_optabs): Use
21072         ggc_cleared_alloc to allocate target_optabs.
21073         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21074         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21075         functions.
21076         * internal-fn.h (internal_load_fn_p): Declare.
21077         (internal_gather_scatter_fn_p): Likewise.
21078         (internal_fn_mask_index): Likewise.
21079         (internal_gather_scatter_fn_supported_p): Likewise.
21080         * internal-fn.c (gather_load_direct): New macro.
21081         (expand_gather_load_optab_fn): New function.
21082         (direct_gather_load_optab_supported_p): New macro.
21083         (direct_internal_fn_optab): New function.
21084         (internal_load_fn_p): Likewise.
21085         (internal_gather_scatter_fn_p): Likewise.
21086         (internal_fn_mask_index): Likewise.
21087         (internal_gather_scatter_fn_supported_p): Likewise.
21088         * optabs-query.c (supports_at_least_one_mode_p): New function.
21089         (supports_vec_gather_load_p): Likewise.
21090         * optabs-query.h (supports_vec_gather_load_p): Declare.
21091         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21092         and memory_type field.
21093         (NUM_PATTERNS): Bump to 15.
21094         * tree-vect-data-refs.c: Include internal-fn.h.
21095         (vect_gather_scatter_fn_p): New function.
21096         (vect_describe_gather_scatter_call): Likewise.
21097         (vect_check_gather_scatter): Try using internal functions for
21098         gather loads.  Recognize existing calls to a gather load function.
21099         (vect_analyze_data_refs): Consider using gather loads if
21100         supports_vec_gather_load_p.
21101         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21102         (vect_get_gather_scatter_offset_type): Likewise.
21103         (vect_convert_mask_for_vectype): Likewise.
21104         (vect_add_conversion_to_patterm): Likewise.
21105         (vect_try_gather_scatter_pattern): Likewise.
21106         (vect_recog_gather_scatter_pattern): New pattern recognizer.
21107         (vect_vect_recog_func_ptrs): Add it.
21108         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21109         internal_fn_mask_index and internal_gather_scatter_fn_p.
21110         (check_load_store_masking): Take the gather_scatter_info as an
21111         argument and handle gather loads.
21112         (vect_get_gather_scatter_ops): New function.
21113         (vectorizable_call): Check internal_load_fn_p.
21114         (vectorizable_load): Likewise.  Handle gather load internal
21115         functions.
21116         (vectorizable_store): Update call to check_load_store_masking.
21117         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21118         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21119         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21120         (aarch64_gather_scale_operand_d): New predicates.
21121         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21122         (mask_gather_load<mode>): New insns.
21124 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21125             Alan Hayward  <alan.hayward@arm.com>
21126             David Sherwood  <david.sherwood@arm.com>
21128         * optabs.def (fold_left_plus_optab): New optab.
21129         * doc/md.texi (fold_left_plus_@var{m}): Document.
21130         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21131         * internal-fn.c (fold_left_direct): Define.
21132         (expand_fold_left_optab_fn): Likewise.
21133         (direct_fold_left_optab_supported_p): Likewise.
21134         * fold-const-call.c (fold_const_fold_left): New function.
21135         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21136         * tree-parloops.c (valid_reduction_p): New function.
21137         (gather_scalar_reductions): Use it.
21138         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21139         (vect_finish_replace_stmt): Declare.
21140         * tree-vect-loop.c (fold_left_reduction_fn): New function.
21141         (needs_fold_left_reduction_p): New function, split out from...
21142         (vect_is_simple_reduction): ...here.  Accept reductions that
21143         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21144         (vect_force_simple_reduction): Also store the reduction type in
21145         the assignment's STMT_VINFO_REDUC_TYPE.
21146         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21147         (merge_with_identity): New function.
21148         (vect_expand_fold_left): Likewise.
21149         (vectorize_fold_left_reduction): Likewise.
21150         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
21151         scalar phi in place for it.  Check for target support and reject
21152         cases that would reassociate the operation.  Defer the transform
21153         phase to vectorize_fold_left_reduction.
21154         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21155         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21156         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21158 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21160         * tree-if-conv.c (predicate_mem_writes): Remove redundant
21161         call to ifc_temp_var.
21163 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21164             Alan Hayward  <alan.hayward@arm.com>
21165             David Sherwood  <david.sherwood@arm.com>
21167         * target.def (legitimize_address_displacement): Take the original
21168         offset as a poly_int.
21169         * targhooks.h (default_legitimize_address_displacement): Update
21170         accordingly.
21171         * targhooks.c (default_legitimize_address_displacement): Likewise.
21172         * doc/tm.texi: Regenerate.
21173         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21174         as an argument, moving assert of ad->disp == ad->disp_term to...
21175         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
21176         Try calling targetm.legitimize_address_displacement before expanding
21177         the address rather than afterwards, and adjust for the new interface.
21178         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21179         Match the new hook interface.  Handle SVE addresses.
21180         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21181         new hook interface.
21183 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21185         * Makefile.in (OBJS): Add early-remat.o.
21186         * target.def (select_early_remat_modes): New hook.
21187         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21188         * doc/tm.texi: Regenerate.
21189         * targhooks.h (default_select_early_remat_modes): Declare.
21190         * targhooks.c (default_select_early_remat_modes): New function.
21191         * timevar.def (TV_EARLY_REMAT): New timevar.
21192         * passes.def (pass_early_remat): New pass.
21193         * tree-pass.h (make_pass_early_remat): Declare.
21194         * early-remat.c: New file.
21195         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21196         function.
21197         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21199 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21200             Alan Hayward  <alan.hayward@arm.com>
21201             David Sherwood  <david.sherwood@arm.com>
21203         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21204         vfm1 with a bound_epilog parameter.
21205         (vect_do_peeling): Update calls accordingly, and move the prologue
21206         call earlier in the function.  Treat the base bound_epilog as 0 for
21207         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
21208         this base when peeling for gaps.
21209         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21210         with fully-masked loops.
21211         (vect_estimate_min_profitable_iters): Handle the single peeled
21212         iteration in that case.
21214 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21215             Alan Hayward  <alan.hayward@arm.com>
21216             David Sherwood  <david.sherwood@arm.com>
21218         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21219         single-element interleaving even if the size is not a power of 2.
21220         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21221         accesses for single-element interleaving if the group size is
21222         not a power of 2.
21224 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21225             Alan Hayward  <alan.hayward@arm.com>
21226             David Sherwood  <david.sherwood@arm.com>
21228         * doc/md.texi (fold_extract_last_@var{m}): Document.
21229         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21230         * optabs.def (fold_extract_last_optab): New optab.
21231         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21232         * internal-fn.c (fold_extract_direct): New macro.
21233         (expand_fold_extract_optab_fn): Likewise.
21234         (direct_fold_extract_optab_supported_p): Likewise.
21235         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21236         * tree-vect-loop.c (vect_model_reduction_cost): Handle
21237         EXTRACT_LAST_REDUCTION.
21238         (get_initial_def_for_reduction): Do not create an initial vector
21239         for EXTRACT_LAST_REDUCTION reductions.
21240         (vectorizable_reduction): Leave the scalar phi in place for
21241         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
21242         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
21243         epilogue code for EXTRACT_LAST_REDUCTION and defer the
21244         transform phase to vectorizable_condition.
21245         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21246         split out from...
21247         (vect_finish_stmt_generation): ...here.
21248         (vect_finish_replace_stmt): New function.
21249         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21250         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21251         pattern.
21252         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21254 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21255             Alan Hayward  <alan.hayward@arm.com>
21256             David Sherwood  <david.sherwood@arm.com>
21258         * doc/md.texi (extract_last_@var{m}): Document.
21259         * optabs.def (extract_last_optab): New optab.
21260         * internal-fn.def (EXTRACT_LAST): New internal function.
21261         * internal-fn.c (cond_unary_direct): New macro.
21262         (expand_cond_unary_optab_fn): Likewise.
21263         (direct_cond_unary_optab_supported_p): Likewise.
21264         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21265         loops using EXTRACT_LAST.
21266         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21267         (extract_last_<mode>): ...this optab.
21268         (vec_extract<mode><Vel>): Update accordingly.
21270 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21271             Alan Hayward  <alan.hayward@arm.com>
21272             David Sherwood  <david.sherwood@arm.com>
21274         * target.def (empty_mask_is_expensive): New hook.
21275         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21276         * doc/tm.texi: Regenerate.
21277         * targhooks.h (default_empty_mask_is_expensive): Declare.
21278         * targhooks.c (default_empty_mask_is_expensive): New function.
21279         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21280         if the target says that empty masks are expensive.
21281         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21282         New function.
21283         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21285 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21286             Alan Hayward  <alan.hayward@arm.com>
21287             David Sherwood  <david.sherwood@arm.com>
21289         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21290         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21291         (vect_use_loop_mask_for_alignment_p): New function.
21292         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21293         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21294         niters_skip argument.  Make sure that the first niters_skip elements
21295         of the first iteration are inactive.
21296         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21297         Update call to vect_set_loop_masks_directly.
21298         (get_misalign_in_elems): New function, split out from...
21299         (vect_gen_prolog_loop_niters): ...here.
21300         (vect_update_init_of_dr): Take a code argument that specifies whether
21301         the adjustment should be added or subtracted.
21302         (vect_update_init_of_drs): Likewise.
21303         (vect_prepare_for_masked_peels): New function.
21304         (vect_do_peeling): Skip prologue peeling if we're using a mask
21305         instead.  Update call to vect_update_inits_of_drs.
21306         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21307         mask_skip_niters.
21308         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21309         alignment.  Do not include the number of peeled iterations in
21310         the minimum threshold in that case.
21311         (vectorizable_induction): Adjust the start value down by
21312         LOOP_VINFO_MASK_SKIP_NITERS iterations.
21313         (vect_transform_loop): Call vect_prepare_for_masked_peels.
21314         Take the number of skipped iterations into account when calculating
21315         the loop bounds.
21316         * tree-vect-stmts.c (vect_gen_while_not): New function.
21318 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21319             Alan Hayward  <alan.hayward@arm.com>
21320             David Sherwood  <david.sherwood@arm.com>
21322         * doc/sourcebuild.texi (vect_fully_masked): Document.
21323         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21324         default value to 0.
21325         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21326         split out from...
21327         (vect_analyze_loop_2): ...here. Don't check the vectorization
21328         factor against the number of loop iterations if the loop is
21329         fully-masked.
21331 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21332             Alan Hayward  <alan.hayward@arm.com>
21333             David Sherwood  <david.sherwood@arm.com>
21335         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21336         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21337         (dump_groups): Update accordingly.
21338         (iv_use::mem_type): New member variable.
21339         (address_p): New function.
21340         (record_use): Add a mem_type argument and initialize the new
21341         mem_type field.
21342         (record_group_use): Add a mem_type argument.  Use address_p.
21343         Remove obsolete null checks of base_object.  Update call to record_use.
21344         (find_interesting_uses_op): Update call to record_group_use.
21345         (find_interesting_uses_cond): Likewise.
21346         (find_interesting_uses_address): Likewise.
21347         (get_mem_type_for_internal_fn): New function.
21348         (find_address_like_use): Likewise.
21349         (find_interesting_uses_stmt): Try find_address_like_use before
21350         calling find_interesting_uses_op.
21351         (addr_offset_valid_p): Use the iv mem_type field as the type
21352         of the addressed memory.
21353         (add_autoinc_candidates): Likewise.
21354         (get_address_cost): Likewise.
21355         (split_small_address_groups_p): Use address_p.
21356         (split_address_groups): Likewise.
21357         (add_iv_candidate_for_use): Likewise.
21358         (autoinc_possible_for_pair): Likewise.
21359         (rewrite_groups): Likewise.
21360         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21361         (determine_group_iv_cost): Update after split of USE_ADDRESS.
21362         (get_alias_ptr_type_for_ptr_address): New function.
21363         (rewrite_use_address): Rewrite address uses in calls that were
21364         identified by find_address_like_use.
21366 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21367             Alan Hayward  <alan.hayward@arm.com>
21368             David Sherwood  <david.sherwood@arm.com>
21370         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21371         TARGET_MEM_REFs.
21372         * gimple-expr.h (is_gimple_addressable: Likewise.
21373         * gimple-expr.c (is_gimple_address): Likewise.
21374         * internal-fn.c (expand_call_mem_ref): New function.
21375         (expand_mask_load_optab_fn): Use it.
21376         (expand_mask_store_optab_fn): Likewise.
21378 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21379             Alan Hayward  <alan.hayward@arm.com>
21380             David Sherwood  <david.sherwood@arm.com>
21382         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21383         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21384         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21385         (cond_umax@var{mode}): Document.
21386         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21387         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21388         (cond_umin_optab, cond_umax_optab): New optabs.
21389         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21390         (COND_IOR, COND_XOR): New internal functions.
21391         * internal-fn.h (get_conditional_internal_fn): Declare.
21392         * internal-fn.c (cond_binary_direct): New macro.
21393         (expand_cond_binary_optab_fn): Likewise.
21394         (direct_cond_binary_optab_supported_p): Likewise.
21395         (get_conditional_internal_fn): New function.
21396         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21397         Cope with reduction statements that are vectorized as calls rather
21398         than assignments.
21399         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21400         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21401         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21402         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21403         (UNSPEC_COND_EOR): New unspecs.
21404         (optab): Add mappings for them.
21405         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21406         (sve_int_op, sve_fp_op): New int attributes.
21408 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21409             Alan Hayward  <alan.hayward@arm.com>
21410             David Sherwood  <david.sherwood@arm.com>
21412         * optabs.def (while_ult_optab): New optab.
21413         * doc/md.texi (while_ult@var{m}@var{n}): Document.
21414         * internal-fn.def (WHILE_ULT): New internal function.
21415         * internal-fn.h (direct_internal_fn_supported_p): New override
21416         that takes two types as argument.
21417         * internal-fn.c (while_direct): New macro.
21418         (expand_while_optab_fn): New function.
21419         (convert_optab_supported_p): Likewise.
21420         (direct_while_optab_supported_p): New macro.
21421         * wide-int.h (wi::udiv_ceil): New function.
21422         * tree-vectorizer.h (rgroup_masks): New structure.
21423         (vec_loop_masks): New typedef.
21424         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21425         and fully_masked_p.
21426         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21427         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21428         (vect_max_vf): New function.
21429         (slpeel_make_loop_iterate_ntimes): Delete.
21430         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21431         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21432         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21433         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21434         internal-fn.h, stor-layout.h and optabs-query.h.
21435         (vect_set_loop_mask): New function.
21436         (add_preheader_seq): Likewise.
21437         (add_header_seq): Likewise.
21438         (interleave_supported_p): Likewise.
21439         (vect_maybe_permute_loop_masks): Likewise.
21440         (vect_set_loop_masks_directly): Likewise.
21441         (vect_set_loop_condition_masked): Likewise.
21442         (vect_set_loop_condition_unmasked): New function, split out from
21443         slpeel_make_loop_iterate_ntimes.
21444         (slpeel_make_loop_iterate_ntimes): Rename to..
21445         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
21446         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21447         (vect_do_peeling): Update call accordingly.
21448         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21449         loops.
21450         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21451         mask_compare_type, can_fully_mask_p and fully_masked_p.
21452         (release_vec_loop_masks): New function.
21453         (_loop_vec_info): Use it to free the loop masks.
21454         (can_produce_all_loop_masks_p): New function.
21455         (vect_get_max_nscalars_per_iter): Likewise.
21456         (vect_verify_full_masking): Likewise.
21457         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21458         retries, and free the mask rgroups before retrying.  Check loop-wide
21459         reasons for disallowing fully-masked loops.  Make the final decision
21460         about whether use a fully-masked loop or not.
21461         (vect_estimate_min_profitable_iters): Do not assume that peeling
21462         for the number of iterations will be needed for fully-masked loops.
21463         (vectorizable_reduction): Disable fully-masked loops.
21464         (vectorizable_live_operation): Likewise.
21465         (vect_halve_mask_nunits): New function.
21466         (vect_double_mask_nunits): Likewise.
21467         (vect_record_loop_mask): Likewise.
21468         (vect_get_loop_mask): Likewise.
21469         (vect_transform_loop): Handle the case in which the final loop
21470         iteration might handle a partial vector.  Call vect_set_loop_condition
21471         instead of slpeel_make_loop_iterate_ntimes.
21472         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21473         (check_load_store_masking): New function.
21474         (prepare_load_store_mask): Likewise.
21475         (vectorizable_store): Handle fully-masked loops.
21476         (vectorizable_load): Likewise.
21477         (supportable_widening_operation): Use vect_halve_mask_nunits for
21478         booleans.
21479         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21480         (vect_gen_while): New function.
21481         * config/aarch64/aarch64.md (umax<mode>3): New expander.
21482         (aarch64_uqdec<mode>): New insn.
21484 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21485             Alan Hayward  <alan.hayward@arm.com>
21486             David Sherwood  <david.sherwood@arm.com>
21488         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21489         (reduc_xor_scal_optab): New optabs.
21490         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21491         (reduc_xor_scal_@var{m}): Document.
21492         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21493         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21494         internal functions.
21495         * fold-const-call.c (fold_const_call): Handle them.
21496         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21497         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21498         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21499         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21500         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21501         (UNSPEC_XORV): New unspecs.
21502         (optab): Add entries for them.
21503         (BITWISEV): New int iterator.
21504         (bit_reduc_op): New int attributes.
21506 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21507             Alan Hayward  <alan.hayward@arm.com>
21508             David Sherwood  <david.sherwood@arm.com>
21510         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21511         * internal-fn.def (VEC_SHL_INSERT): New internal function.
21512         * optabs.def (vec_shl_insert_optab): New optab.
21513         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21514         (duplicate_and_interleave): Likewise.
21515         * tree-vect-loop.c: Include internal-fn.h.
21516         (neutral_op_for_slp_reduction): New function, split out from
21517         get_initial_defs_for_reduction.
21518         (get_initial_def_for_reduction): Handle option 2 for variable-length
21519         vectors by loading the neutral value into a vector and then shifting
21520         the initial value into element 0.
21521         (get_initial_defs_for_reduction): Replace the code argument with
21522         the neutral value calculated by neutral_op_for_slp_reduction.
21523         Use gimple_build_vector for constant-length vectors.
21524         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21525         but the first group_size elements have a neutral value.
21526         Use duplicate_and_interleave otherwise.
21527         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21528         Update call to get_initial_defs_for_reduction.  Handle SLP
21529         reductions for variable-length vectors by creating one vector
21530         result for each scalar result, with the elements associated
21531         with other scalar results stubbed out with the neutral value.
21532         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21533         Require IFN_VEC_SHL_INSERT for double reductions on
21534         variable-length vectors, or SLP reductions that have
21535         a neutral value.  Require can_duplicate_and_interleave_p
21536         support for variable-length unchained SLP reductions if there
21537         is no neutral value, such as for MIN/MAX reductions.  Also require
21538         the number of vector elements to be a multiple of the number of
21539         SLP statements when doing variable-length unchained SLP reductions.
21540         Update call to vect_create_epilog_for_reduction.
21541         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21542         and remove initial values.
21543         (duplicate_and_interleave): Make public.
21544         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21545         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21547 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21548             Alan Hayward  <alan.hayward@arm.com>
21549             David Sherwood  <david.sherwood@arm.com>
21551         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21552         (can_duplicate_and_interleave_p): New function.
21553         (vect_get_and_check_slp_defs): Take the vector of statements
21554         rather than just the current one.  Remove excess parentheses.
21555         Restriction rejectinon of vect_constant_def and vect_external_def
21556         for variable-length vectors to boolean types, or types for which
21557         can_duplicate_and_interleave_p is false.
21558         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21559         (duplicate_and_interleave): New function.
21560         (vect_get_constant_vectors): Use gimple_build_vector for
21561         constant-length vectors and suitable variable-length constant
21562         vectors.  Use duplicate_and_interleave for other variable-length
21563         vectors.  Don't defer the update when inserting new statements.
21565 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21566             Alan Hayward  <alan.hayward@arm.com>
21567             David Sherwood  <david.sherwood@arm.com>
21569         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21570         min_profitable_iters doesn't go negative.
21572 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21573             Alan Hayward  <alan.hayward@arm.com>
21574             David Sherwood  <david.sherwood@arm.com>
21576         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21577         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21578         * optabs.def (vec_mask_load_lanes_optab): New optab.
21579         (vec_mask_store_lanes_optab): Likewise.
21580         * internal-fn.def (MASK_LOAD_LANES): New internal function.
21581         (MASK_STORE_LANES): Likewise.
21582         * internal-fn.c (mask_load_lanes_direct): New macro.
21583         (mask_store_lanes_direct): Likewise.
21584         (expand_mask_load_optab_fn): Handle masked operations.
21585         (expand_mask_load_lanes_optab_fn): New macro.
21586         (expand_mask_store_optab_fn): Handle masked operations.
21587         (expand_mask_store_lanes_optab_fn): New macro.
21588         (direct_mask_load_lanes_optab_supported_p): Likewise.
21589         (direct_mask_store_lanes_optab_supported_p): Likewise.
21590         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21591         parameter.
21592         (vect_load_lanes_supported): Likewise.
21593         * tree-vect-data-refs.c (strip_conversion): New function.
21594         (can_group_stmts_p): Likewise.
21595         (vect_analyze_data_ref_accesses): Use it instead of checking
21596         for a pair of assignments.
21597         (vect_store_lanes_supported): Take a masked_p parameter.
21598         (vect_load_lanes_supported): Likewise.
21599         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21600         vect_store_lanes_supported and vect_load_lanes_supported.
21601         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21602         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21603         parameter.  Don't allow gaps for masked accesses.
21604         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
21605         and vect_load_lanes_supported.
21606         (get_load_store_type): Take a masked_p parameter and update
21607         call to get_group_load_store_type.
21608         (vectorizable_store): Update call to get_load_store_type.
21609         Handle IFN_MASK_STORE_LANES.
21610         (vectorizable_load): Update call to get_load_store_type.
21611         Handle IFN_MASK_LOAD_LANES.
21613 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21614             Alan Hayward  <alan.hayward@arm.com>
21615             David Sherwood  <david.sherwood@arm.com>
21617         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21618         modes for SVE.
21619         * config/aarch64/aarch64-protos.h
21620         (aarch64_sve_struct_memory_operand_p): Declare.
21621         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21622         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21623         (VPRED, vpred): Handle SVE structure modes.
21624         * config/aarch64/constraints.md (Utx): New constraint.
21625         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21626         (aarch64_sve_struct_nonimmediate_operand): New predicates.
21627         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21628         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21629         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21630         structure modes.  Split into pieces after RA.
21631         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21632         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21633         New patterns.
21634         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21635         SVE structure modes.
21636         (aarch64_classify_address): Likewise.
21637         (sizetochar): Move earlier in file.
21638         (aarch64_print_operand): Handle SVE register lists.
21639         (aarch64_array_mode): New function.
21640         (aarch64_sve_struct_memory_operand_p): Likewise.
21641         (TARGET_ARRAY_MODE): Redefine.
21643 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21644             Alan Hayward  <alan.hayward@arm.com>
21645             David Sherwood  <david.sherwood@arm.com>
21647         * target.def (array_mode): New target hook.
21648         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
21649         * doc/tm.texi: Regenerate.
21650         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
21651         * hooks.c (hook_optmode_mode_uhwi_none): New function.
21652         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
21653         targetm.array_mode.
21654         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
21655         type sizes.
21657 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21658             Alan Hayward  <alan.hayward@arm.com>
21659             David Sherwood  <david.sherwood@arm.com>
21661         * fold-const.c (fold_binary_loc): Check the argument types
21662         rather than the result type when testing for a vector operation.
21664 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21666         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
21667         * doc/tm.texi: Regenerate.
21669 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21670             Alan Hayward  <alan.hayward@arm.com>
21671             David Sherwood  <david.sherwood@arm.com>
21673         * doc/invoke.texi (-msve-vector-bits=): Document new option.
21674         (sve): Document new AArch64 extension.
21675         * doc/md.texi (w): Extend the description of the AArch64
21676         constraint to include SVE vectors.
21677         (Upl, Upa): Document new AArch64 predicate constraints.
21678         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
21679         enum.
21680         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
21681         (msve-vector-bits=): New option.
21682         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
21683         SVE when these are disabled.
21684         (sve): New extension.
21685         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
21686         modes.  Adjust their number of units based on aarch64_sve_vg.
21687         (MAX_BITSIZE_MODE_ANY_MODE): Define.
21688         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
21689         aarch64_addr_query_type.
21690         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
21691         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
21692         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
21693         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
21694         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
21695         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
21696         (aarch64_simd_imm_zero_p): Delete.
21697         (aarch64_check_zero_based_sve_index_immediate): Declare.
21698         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21699         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21700         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21701         (aarch64_sve_float_mul_immediate_p): Likewise.
21702         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21703         rather than an rtx.
21704         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
21705         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
21706         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
21707         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
21708         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
21709         (aarch64_regmode_natural_size): Likewise.
21710         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
21711         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
21712         left one place.
21713         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
21714         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
21715         for VG and the SVE predicate registers.
21716         (V_ALIASES): Add a "z"-prefixed alias.
21717         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
21718         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
21719         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
21720         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
21721         (REG_CLASS_NAMES): Add entries for them.
21722         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
21723         and the predicate registers.
21724         (aarch64_sve_vg): Declare.
21725         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
21726         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
21727         (REGMODE_NATURAL_SIZE): Define.
21728         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
21729         SVE macros.
21730         * config/aarch64/aarch64.c: Include cfgrtl.h.
21731         (simd_immediate_info): Add a constructor for series vectors,
21732         and an associated step field.
21733         (aarch64_sve_vg): New variable.
21734         (aarch64_dbx_register_number): Handle VG and the predicate registers.
21735         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
21736         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
21737         (VEC_ANY_DATA, VEC_STRUCT): New constants.
21738         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
21739         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
21740         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
21741         (aarch64_get_mask_mode): New functions.
21742         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
21743         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
21744         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
21745         predicate modes and predicate registers.  Explicitly restrict
21746         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
21747         to store a vector mode if it is recognized by
21748         aarch64_classify_vector_mode.
21749         (aarch64_regmode_natural_size): New function.
21750         (aarch64_hard_regno_caller_save_mode): Return the original mode
21751         for predicates.
21752         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
21753         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
21754         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
21755         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
21756         functions.
21757         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
21758         does not overlap dest if the function is frame-related.  Handle
21759         SVE constants.
21760         (aarch64_split_add_offset): New function.
21761         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
21762         them aarch64_add_offset.
21763         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
21764         and update call to aarch64_sub_sp.
21765         (aarch64_add_cfa_expression): New function.
21766         (aarch64_expand_prologue): Pass extra temporary registers to the
21767         functions above.  Handle the case in which we need to emit new
21768         DW_CFA_expressions for registers that were originally saved
21769         relative to the stack pointer, but now have to be expressed
21770         relative to the frame pointer.
21771         (aarch64_output_mi_thunk): Pass extra temporary registers to the
21772         functions above.
21773         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
21774         IP0 and IP1 values for SVE frames.
21775         (aarch64_expand_vec_series): New function.
21776         (aarch64_expand_sve_widened_duplicate): Likewise.
21777         (aarch64_expand_sve_const_vector): Likewise.
21778         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
21779         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
21780         into the register, rather than emitting a SET directly.
21781         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
21782         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
21783         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
21784         (offset_9bit_signed_scaled_p): New functions.
21785         (aarch64_replicate_bitmask_imm): New function.
21786         (aarch64_bitmask_imm): Use it.
21787         (aarch64_cannot_force_const_mem): Reject expressions involving
21788         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
21789         (aarch64_classify_index): Handle SVE indices, by requiring
21790         a plain register index with a scale that matches the element size.
21791         (aarch64_classify_address): Handle SVE addresses.  Assert that
21792         the mode of the address is VOIDmode or an integer mode.
21793         Update call to aarch64_classify_symbol.
21794         (aarch64_classify_symbolic_expression): Update call to
21795         aarch64_classify_symbol.
21796         (aarch64_const_vec_all_in_range_p): New function.
21797         (aarch64_print_vector_float_operand): Likewise.
21798         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
21799         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
21800         and the FP immediates 1.0 and 0.5.
21801         (aarch64_print_address_internal): Handle SVE addresses.
21802         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
21803         (aarch64_regno_regclass): Handle predicate registers.
21804         (aarch64_secondary_reload): Handle big-endian reloads of SVE
21805         data modes.
21806         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
21807         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
21808         (aarch64_convert_sve_vector_bits): New function.
21809         (aarch64_override_options): Use it to handle -msve-vector-bits=.
21810         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
21811         rather than an rtx.
21812         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
21813         Handle SVE vector and predicate modes.  Accept VL-based constants
21814         that need only one temporary register, and VL offsets that require
21815         no temporary registers.
21816         (aarch64_conditional_register_usage): Mark the predicate registers
21817         as fixed if SVE isn't available.
21818         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
21819         Return true for SVE vector and predicate modes.
21820         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
21821         rather than an unsigned int.  Handle SVE modes.
21822         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
21823         SVE modes.
21824         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
21825         if SVE is enabled.
21826         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
21827         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
21828         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
21829         (aarch64_sve_float_mul_immediate_p): New functions.
21830         (aarch64_sve_valid_immediate): New function.
21831         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
21832         Explicitly reject structure modes.  Check for INDEX constants.
21833         Handle PTRUE and PFALSE constants.
21834         (aarch64_check_zero_based_sve_index_immediate): New function.
21835         (aarch64_simd_imm_zero_p): Delete.
21836         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
21837         vector modes.  Accept constants in the range of CNT[BHWD].
21838         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
21839         ask for an Advanced SIMD mode.
21840         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
21841         (aarch64_simd_vector_alignment): Handle SVE predicates.
21842         (aarch64_vectorize_preferred_vector_alignment): New function.
21843         (aarch64_simd_vector_alignment_reachable): Use it instead of
21844         the vector size.
21845         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
21846         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
21847         functions.
21848         (MAX_VECT_LEN): Delete.
21849         (expand_vec_perm_d): Add a vec_flags field.
21850         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
21851         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
21852         (aarch64_evpc_ext): Don't apply a big-endian lane correction
21853         for SVE modes.
21854         (aarch64_evpc_rev): Rename to...
21855         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
21856         (aarch64_evpc_rev_global): New function.
21857         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
21858         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
21859         MAX_VECT_LEN.
21860         (aarch64_evpc_sve_tbl): New function.
21861         (aarch64_expand_vec_perm_const_1): Update after rename of
21862         aarch64_evpc_rev.  Handle SVE permutes too, trying
21863         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
21864         than aarch64_evpc_tbl.
21865         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
21866         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
21867         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
21868         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
21869         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
21870         (aarch64_expand_sve_vcond): New functions.
21871         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
21872         of aarch64_vector_mode_p.
21873         (aarch64_dwarf_poly_indeterminate_value): New function.
21874         (aarch64_compute_pressure_classes): Likewise.
21875         (aarch64_can_change_mode_class): Likewise.
21876         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
21877         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
21878         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
21879         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
21880         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
21881         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
21882         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
21883         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
21884         constraints.
21885         (Dn, Dl, Dr): Accept const as well as const_vector.
21886         (Dz): Likewise.  Compare against CONST0_RTX.
21887         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
21888         of "vector" where appropriate.
21889         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
21890         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
21891         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
21892         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
21893         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
21894         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
21895         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
21896         (v_int_equiv): Extend to SVE modes.
21897         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
21898         mode attributes.
21899         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
21900         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
21901         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
21902         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
21903         (SVE_COND_FP_CMP): New int iterators.
21904         (perm_hilo): Handle the new unpack unspecs.
21905         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
21906         attributes.
21907         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
21908         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
21909         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
21910         (aarch64_equality_operator, aarch64_constant_vector_operand)
21911         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
21912         (aarch64_sve_nonimmediate_operand): Likewise.
21913         (aarch64_sve_general_operand): Likewise.
21914         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
21915         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
21916         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
21917         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
21918         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
21919         (aarch64_sve_float_arith_immediate): Likewise.
21920         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
21921         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
21922         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
21923         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
21924         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
21925         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
21926         (aarch64_sve_float_arith_operand): Likewise.
21927         (aarch64_sve_float_arith_with_sub_operand): Likewise.
21928         (aarch64_sve_float_mul_operand): Likewise.
21929         (aarch64_sve_vec_perm_operand): Likewise.
21930         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
21931         (aarch64_mov_operand): Accept const_poly_int and const_vector.
21932         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
21933         as well as const_vector.
21934         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
21935         in file.  Use CONST0_RTX and CONSTM1_RTX.
21936         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
21937         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
21938         Use aarch64_simd_imm_zero.
21939         * config/aarch64/aarch64-sve.md: New file.
21940         * config/aarch64/aarch64.md: Include it.
21941         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
21942         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
21943         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
21944         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
21945         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
21946         (sve): New attribute.
21947         (enabled): Disable instructions with the sve attribute unless
21948         TARGET_SVE.
21949         (movqi, movhi): Pass CONST_POLY_INT operaneds through
21950         aarch64_expand_mov_immediate.
21951         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
21952         CNT[BHSD] immediates.
21953         (movti): Split CONST_POLY_INT moves into two halves.
21954         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
21955         Split additions that need a temporary here if the destination
21956         is the stack pointer.
21957         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
21958         (*add<mode>3_poly_1): New instruction.
21959         (set_clobber_cc): New expander.
21961 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21963         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
21964         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
21965         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
21966         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
21967         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
21968         Change innermode from fixed_mode_size to machine_mode.
21969         (simplify_subreg): Update call accordingly.  Handle a constant-sized
21970         subreg of a variable-length CONST_VECTOR.
21972 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21973             Alan Hayward  <alan.hayward@arm.com>
21974             David Sherwood  <david.sherwood@arm.com>
21976         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
21977         (add_offset_to_base): New function, split out from...
21978         (create_mem_ref): ...here.  When handling a scale other than 1,
21979         check first whether the address is valid without the offset.
21980         Add it into the base if so, leaving the index and scale as-is.
21982 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
21984         PR c++/83778
21985         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
21986         fold_for_warn before checking if arg2 is INTEGER_CST.
21988 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
21990         * config/rs6000/predicates.md (load_multiple_operation): Delete.
21991         (store_multiple_operation): Delete.
21992         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
21993         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
21994         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
21995         guarded by TARGET_STRING.
21996         (rs6000_output_load_multiple): Delete.
21997         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
21998         OPTION_MASK_STRING / TARGET_STRING handling.
21999         (print_operand) <'N', 'O'>: Add comment that these are unused now.
22000         (const rs6000_opt_masks) <"string">: Change mask to 0.
22001         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22002         (MASK_STRING): Delete.
22003         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22004         parts.  Simplify.
22005         (load_multiple): Delete.
22006         (*ldmsi8): Delete.
22007         (*ldmsi7): Delete.
22008         (*ldmsi6): Delete.
22009         (*ldmsi5): Delete.
22010         (*ldmsi4): Delete.
22011         (*ldmsi3): Delete.
22012         (store_multiple): Delete.
22013         (*stmsi8): Delete.
22014         (*stmsi7): Delete.
22015         (*stmsi6): Delete.
22016         (*stmsi5): Delete.
22017         (*stmsi4): Delete.
22018         (*stmsi3): Delete.
22019         (movmemsi_8reg): Delete.
22020         (corresponding unnamed define_insn): Delete.
22021         (movmemsi_6reg): Delete.
22022         (corresponding unnamed define_insn): Delete.
22023         (movmemsi_4reg): Delete.
22024         (corresponding unnamed define_insn): Delete.
22025         (movmemsi_2reg): Delete.
22026         (corresponding unnamed define_insn): Delete.
22027         (movmemsi_1reg): Delete.
22028         (corresponding unnamed define_insn): Delete.
22029         * config/rs6000/rs6000.opt (mno-string): New.
22030         (mstring): Replace by deprecation warning stub.
22031         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22033 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22035         * regrename.c (regrename_do_replace): If replacing the same
22036         reg multiple times, try to reuse last created gen_raw_REG.
22038         PR debug/81155
22039         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22040         main to workaround a bug in GDB.
22042 2018-01-12  Tom de Vries  <tom@codesourcery.com>
22044         PR target/83737
22045         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22047 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
22049         PR rtl-optimization/80481
22050         * ira-color.c (get_cap_member): New function.
22051         (allocnos_conflict_by_live_ranges_p): Use it.
22052         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22053         (setup_slot_coalesced_allocno_live_ranges): Ditto.
22055 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
22057         PR target/83628
22058         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22059         (*saddl_se_1): Ditto.
22060         (*ssubsi_1): Ditto.
22061         (*ssubl_se_1): Ditto.
22063 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22065         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22066         rather than wi::to_widest for DR_INITs.
22067         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22068         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22069         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22070         INTEGER_CSTs.
22071         (vect_analyze_group_access_1): Note that here.
22073 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22075         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22076         polynomial type sizes.
22078 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22080         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22081         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22082         (gimple_add_tmp_var): Likewise.
22084 2018-01-12  Martin Liska  <mliska@suse.cz>
22086         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22087         (gimple_alloc_sizes): Likewise.
22088         (dump_gimple_statistics): Use PRIu64 in printf format.
22089         * gimple.h: Change uint64_t to int.
22091 2018-01-12  Martin Liska  <mliska@suse.cz>
22093         * tree-core.h: Use uint64_t instead of int.
22094         * tree.c (tree_node_counts): Likewise.
22095         (tree_node_sizes): Likewise.
22096         (dump_tree_statistics): Use PRIu64 in printf format.
22098 2018-01-12  Martin Liska  <mliska@suse.cz>
22100         * Makefile.in: As qsort_chk is implemented in vec.c, add
22101         vec.o to linkage of gencfn-macros.
22102         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22103         passing the info to record_node_allocation_statistics.
22104         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22105         and pass the info.
22106         * ggc-common.c (struct ggc_usage): Add operator== and use
22107         it in operator< and compare function.
22108         * mem-stats.h (struct mem_usage): Likewise.
22109         * vec.c (struct vec_usage): Remove operator< and compare
22110         function. Can be simply inherited.
22112 2018-01-12  Martin Jambor  <mjambor@suse.cz>
22114         PR target/81616
22115         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22116         * tree-ssa-math-opts.c: Include domwalk.h.
22117         (convert_mult_to_fma_1): New function.
22118         (fma_transformation_info): New type.
22119         (fma_deferring_state): Likewise.
22120         (cancel_fma_deferring): New function.
22121         (result_of_phi): Likewise.
22122         (last_fma_candidate_feeds_initial_phi): Likewise.
22123         (convert_mult_to_fma): Added deferring logic, split actual
22124         transformation to convert_mult_to_fma_1.
22125         (math_opts_dom_walker): New type.
22126         (math_opts_dom_walker::after_dom_children): New method, body moved
22127         here from pass_optimize_widening_mul::execute, added deferring logic
22128         bits.
22129         (pass_optimize_widening_mul::execute): Moved most of code to
22130         math_opts_dom_walker::after_dom_children.
22131         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22132         * config/i386/i386.c (ix86_option_override_internal): Added
22133         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22135 2018-01-12  Richard Biener  <rguenther@suse.de>
22137         PR debug/83157
22138         * dwarf2out.c (gen_variable_die): Do not reset old_die for
22139         inline instance vars.
22141 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
22143         PR target/81819
22144         * config/rx/rx.c (rx_is_restricted_memory_address):
22145         Handle SUBREG case.
22147 2018-01-12  Richard Biener  <rguenther@suse.de>
22149         PR tree-optimization/80846
22150         * target.def (split_reduction): New target hook.
22151         * targhooks.c (default_split_reduction): New function.
22152         * targhooks.h (default_split_reduction): Declare.
22153         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22154         target requests first reduce vectors by combining low and high
22155         parts.
22156         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22157         (get_vectype_for_scalar_type_and_size): Export.
22158         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22159         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22160         * doc/tm.texi: Regenerate.
22161         * config/i386/i386.c (ix86_split_reduction): Implement
22162         TARGET_VECTORIZE_SPLIT_REDUCTION.
22164 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22166         PR target/83368
22167         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22168         in PIC mode except for TARGET_VXWORKS_RTP.
22169         * config/sparc/sparc.c: Include cfgrtl.h.
22170         (TARGET_INIT_PIC_REG): Define.
22171         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22172         (sparc_pic_register_p): New predicate.
22173         (sparc_legitimate_address_p): Use it.
22174         (sparc_legitimize_pic_address): Likewise.
22175         (sparc_delegitimize_address): Likewise.
22176         (sparc_mode_dependent_address_p): Likewise.
22177         (gen_load_pcrel_sym): Remove 4th parameter.
22178         (load_got_register): Adjust call to above.  Remove obsolete stuff.
22179         (sparc_expand_prologue): Do not call load_got_register here.
22180         (sparc_flat_expand_prologue): Likewise.
22181         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22182         (sparc_use_pseudo_pic_reg): New function.
22183         (sparc_init_pic_reg): Likewise.
22184         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22185         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22187 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
22189         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22190         Add item for branch_cost.
22192 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22194         PR rtl-optimization/83565
22195         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22196         not extend the result to a larger mode for rotate operations.
22197         (num_sign_bit_copies1): Likewise.
22199 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22201         PR target/40411
22202         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22203         -symbolic.
22204         Use values-Xc.o for -pedantic.
22205         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22207 2018-01-12  Martin Liska  <mliska@suse.cz>
22209         PR ipa/83054
22210         * ipa-devirt.c (final_warning_record::grow_type_warnings):
22211         New function.
22212         (possible_polymorphic_call_targets): Use it.
22213         (ipa_devirt): Likewise.
22215 2018-01-12  Martin Liska  <mliska@suse.cz>
22217         * profile-count.h (enum profile_quality): Use 0 as invalid
22218         enum value of profile_quality.
22220 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
22222         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22223         -mext-string options.
22225 2018-01-12  Richard Biener  <rguenther@suse.de>
22227         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22228         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22229         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22230         Likewise.
22231         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22233 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22235         * configure.ac (--with-long-double-format): Add support for the
22236         configuration option to change the default long double format on
22237         PowerPC systems.
22238         * config.gcc (powerpc*-linux*-*): Likewise.
22239         * configure: Regenerate.
22240         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22241         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22242         used without modification.
22244 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22246         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22247         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22248         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22249         MISC_BUILTIN_SPEC_BARRIER.
22250         (rs6000_init_builtins): Likewise.
22251         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22252         enum value.
22253         (speculation_barrier): New define_insn.
22254         * doc/extend.texi: Document __builtin_speculation_barrier.
22256 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22258         PR target/83203
22259         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22260         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22261         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22262         iterators.
22263         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
22264         integral modes instead of "ss" and "sd".
22265         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22266         vectors with 32-bit and 64-bit elements.
22267         (vecdupssescalarmodesuffix): New mode attribute.
22268         (vec_dup<mode>): Use it.
22270 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
22272         PR target/83330
22273         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22274         frame if argument is passed on stack.
22276 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22278         PR target/82682
22279         * ree.c (combine_reaching_defs): Optimize also
22280         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22281         reg2=any_extend(exp); reg1=reg2;, formatting fix.
22283 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22285         PR middle-end/83189
22286         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22288 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22290         PR middle-end/83718
22291         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22292         after they are computed.
22294 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
22296         PR tree-optimization/83695
22297         * gimple-loop-linterchange.cc
22298         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22299         reset cached scev information after interchange.
22300         (pass_linterchange::execute): Remove call to scev_reset_htab.
22302 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22304         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22305         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22306         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22307         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22308         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22309         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22310         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22311         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22312         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22313         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22314         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22315         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22316         (V_lane_reg): Likewise.
22317         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22318         New define_expand.
22319         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22320         (vfmal_lane_low<mode>_intrinsic,
22321         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22322         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22323         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22324         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22325         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22326         vfmsl_lane_high<mode>_intrinsic): New define_insns.
22328 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22330         * config/arm/arm-cpus.in (fp16fml): New feature.
22331         (ALL_SIMD): Add fp16fml.
22332         (armv8.2-a): Add fp16fml as an option.
22333         (armv8.3-a): Likewise.
22334         (armv8.4-a): Add fp16fml as part of fp16.
22335         * config/arm/arm.h (TARGET_FP16FML): Define.
22336         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22337         when appropriate.
22338         * config/arm/arm-modes.def (V2HF): Define.
22339         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22340         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22341         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22342         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22343         vfmsl_low, vfmsl_high): New set of builtins.
22344         * config/arm/iterators.md (PLUSMINUS): New code iterator.
22345         (vfml_op): New code attribute.
22346         (VFMLHALVES): New int iterator.
22347         (VFML, VFMLSEL): New mode attributes.
22348         (V_reg): Define mapping for V2HF.
22349         (V_hi, V_lo): New mode attributes.
22350         (VF_constraint): Likewise.
22351         (vfml_half, vfml_half_selector): New int attributes.
22352         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22353         define_expand.
22354         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22355         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22356         New define_insn.
22357         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22358         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22359         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22360         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
22361         documentation.
22362         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22363         Document new effective target and option set.
22365 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22367         * config/arm/arm-cpus.in (armv8_4): New feature.
22368         (ARMv8_4a): New fgroup.
22369         (armv8.4-a): New arch.
22370         * config/arm/arm-tables.opt: Regenerate.
22371         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22372         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22373         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22374         Add matching rules for -march=armv8.4-a and extensions.
22375         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22377 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
22379         PR target/81821
22380         * config/rx/rx.md (BW): New mode attribute.
22381         (sync_lock_test_and_setsi): Add mode suffix to insn output.
22383 2018-01-11  Richard Biener  <rguenther@suse.de>
22385         PR tree-optimization/83435
22386         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22387         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22388         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22390 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22391             Alan Hayward  <alan.hayward@arm.com>
22392             David Sherwood  <david.sherwood@arm.com>
22394         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22395         field.
22396         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
22397         (aarch64_print_address_internal): Use it to check for a zero offset.
22399 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22400             Alan Hayward  <alan.hayward@arm.com>
22401             David Sherwood  <david.sherwood@arm.com>
22403         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22404         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22405         Return a poly_int64 rather than a HOST_WIDE_INT.
22406         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22407         rather than a HOST_WIDE_INT.
22408         * config/aarch64/aarch64.h (aarch64_frame): Protect with
22409         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
22410         hard_fp_offset, frame_size, initial_adjust, callee_offset and
22411         final_offset from HOST_WIDE_INT to poly_int64.
22412         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22413         to_constant when getting the number of units in an Advanced SIMD
22414         mode.
22415         (aarch64_builtin_vectorized_function): Check for a constant number
22416         of units.
22417         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22418         GET_MODE_SIZE.
22419         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22420         attribute instead of GET_MODE_NUNITS.
22421         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22422         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22423         GET_MODE_SIZE for fixed-size registers.
22424         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22425         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22426         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22427         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22428         (aarch64_print_operand, aarch64_print_address_internal)
22429         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22430         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22431         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22432         Handle polynomial GET_MODE_SIZE.
22433         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
22434         wider than SImode without modification.
22435         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22436         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22437         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22438         passing and returning SVE modes.
22439         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22440         rather than GEN_INT.
22441         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22442         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22443         (aarch64_allocate_and_probe_stack_space): Likewise.
22444         (aarch64_layout_frame): Cope with polynomial offsets.
22445         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22446         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
22447         polynomial offsets.
22448         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22449         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22450         poly_int64 rather than a HOST_WIDE_INT.
22451         (aarch64_get_separate_components, aarch64_process_components)
22452         (aarch64_expand_prologue, aarch64_expand_epilogue)
22453         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22454         (aarch64_anchor_offset): New function, split out from...
22455         (aarch64_legitimize_address): ...here.
22456         (aarch64_builtin_vectorization_cost): Handle polynomial
22457         TYPE_VECTOR_SUBPARTS.
22458         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22459         GET_MODE_NUNITS.
22460         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22461         number of elements from the PARALLEL rather than the mode.
22462         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22463         rather than GET_MODE_BITSIZE.
22464         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22465         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22466         (aarch64_expand_vec_perm_const_1): Handle polynomial
22467         d->perm.length () and d->perm elements.
22468         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
22469         Apply to_constant to d->perm elements.
22470         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22471         polynomial CONST_VECTOR_NUNITS.
22472         (aarch64_move_pointer): Take amount as a poly_int64 rather
22473         than an int.
22474         (aarch64_progress_pointer): Avoid temporary variable.
22475         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22476         the mode attribute instead of GET_MODE.
22478 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22479             Alan Hayward  <alan.hayward@arm.com>
22480             David Sherwood  <david.sherwood@arm.com>
22482         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22483         x exists before using it.
22484         (aarch64_add_constant_internal): Rename to...
22485         (aarch64_add_offset_1): ...this.  Replace regnum with separate
22486         src and dest rtxes.  Handle the case in which they're different,
22487         including when the offset is zero.  Replace scratchreg with an rtx.
22488         Use 2 additions if there is no spare register into which we can
22489         move a 16-bit constant.
22490         (aarch64_add_constant): Delete.
22491         (aarch64_add_offset): Replace reg with separate src and dest
22492         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
22493         Use aarch64_add_offset_1.
22494         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22495         an rtx rather than an int.  Take the delta as a poly_int64
22496         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
22497         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22498         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22499         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22500         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22501         and aarch64_add_sp.
22502         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22503         aarch64_add_constant.
22505 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22507         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22508         Use scalar_float_mode.
22510 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22512         * config/aarch64/aarch64-simd.md
22513         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22514         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22515         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22516         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22517         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22518         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22519         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22520         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22521         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22522         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22524 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22526         PR target/83514
22527         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22528         targ_options->x_arm_arch_string is non NULL.
22530 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
22532         * config/aarch64/aarch64.h
22533         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
22535 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
22537         PR target/82096
22538         * expmed.c (emit_store_flag_force): Swap if const op0
22539         and change VOIDmode to mode of op0.
22541 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22543         PR rtl-optimization/83761
22544         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22545         than bytes to mode_for_size.
22547 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22549         PR middle-end/83189
22550         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22551         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22552         profile.
22554 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22556         PR middle-end/83575
22557         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22558         when in layout mode.
22559         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22560         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22561         partition fixup.
22563 2018-01-10  Michael Collison  <michael.collison@arm.com>
22565         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22566         * config/aarch64/aarch64-option-extension.def: Add
22567         AARCH64_OPT_EXTENSION of 'fp16fml'.
22568         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22569         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22570         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22571         * config/aarch64/constraints.md (Ui7): New constraint.
22572         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22573         (VFMLA_SEL_W): Ditto.
22574         (f16quad): Ditto.
22575         (f16mac1): Ditto.
22576         (VFMLA16_LOW): New int iterator.
22577         (VFMLA16_HIGH): Ditto.
22578         (UNSPEC_FMLAL): New unspec.
22579         (UNSPEC_FMLSL): Ditto.
22580         (UNSPEC_FMLAL2): Ditto.
22581         (UNSPEC_FMLSL2): Ditto.
22582         (f16mac): New code attribute.
22583         * config/aarch64/aarch64-simd-builtins.def
22584         (aarch64_fmlal_lowv2sf): Ditto.
22585         (aarch64_fmlsl_lowv2sf): Ditto.
22586         (aarch64_fmlalq_lowv4sf): Ditto.
22587         (aarch64_fmlslq_lowv4sf): Ditto.
22588         (aarch64_fmlal_highv2sf): Ditto.
22589         (aarch64_fmlsl_highv2sf): Ditto.
22590         (aarch64_fmlalq_highv4sf): Ditto.
22591         (aarch64_fmlslq_highv4sf): Ditto.
22592         (aarch64_fmlal_lane_lowv2sf): Ditto.
22593         (aarch64_fmlsl_lane_lowv2sf): Ditto.
22594         (aarch64_fmlal_laneq_lowv2sf): Ditto.
22595         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22596         (aarch64_fmlalq_lane_lowv4sf): Ditto.
22597         (aarch64_fmlsl_lane_lowv4sf): Ditto.
22598         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22599         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22600         (aarch64_fmlal_lane_highv2sf): Ditto.
22601         (aarch64_fmlsl_lane_highv2sf): Ditto.
22602         (aarch64_fmlal_laneq_highv2sf): Ditto.
22603         (aarch64_fmlsl_laneq_highv2sf): Ditto.
22604         (aarch64_fmlalq_lane_highv4sf): Ditto.
22605         (aarch64_fmlsl_lane_highv4sf): Ditto.
22606         (aarch64_fmlalq_laneq_highv4sf): Ditto.
22607         (aarch64_fmlsl_laneq_highv4sf): Ditto.
22608         * config/aarch64/aarch64-simd.md:
22609         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22610         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22611         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22612         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22613         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22614         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22615         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22616         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22617         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22618         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22619         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22620         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22621         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22622         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22623         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22624         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22625         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22626         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22627         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22628         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22629         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22630         (vfmlsl_low_u32): Ditto.
22631         (vfmlalq_low_u32): Ditto.
22632         (vfmlslq_low_u32): Ditto.
22633         (vfmlal_high_u32): Ditto.
22634         (vfmlsl_high_u32): Ditto.
22635         (vfmlalq_high_u32): Ditto.
22636         (vfmlslq_high_u32): Ditto.
22637         (vfmlal_lane_low_u32): Ditto.
22638         (vfmlsl_lane_low_u32): Ditto.
22639         (vfmlal_laneq_low_u32): Ditto.
22640         (vfmlsl_laneq_low_u32): Ditto.
22641         (vfmlalq_lane_low_u32): Ditto.
22642         (vfmlslq_lane_low_u32): Ditto.
22643         (vfmlalq_laneq_low_u32): Ditto.
22644         (vfmlslq_laneq_low_u32): Ditto.
22645         (vfmlal_lane_high_u32): Ditto.
22646         (vfmlsl_lane_high_u32): Ditto.
22647         (vfmlal_laneq_high_u32): Ditto.
22648         (vfmlsl_laneq_high_u32): Ditto.
22649         (vfmlalq_lane_high_u32): Ditto.
22650         (vfmlslq_lane_high_u32): Ditto.
22651         (vfmlalq_laneq_high_u32): Ditto.
22652         (vfmlslq_laneq_high_u32): Ditto.
22653         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
22654         (AARCH64_FL_FOR_ARCH8_4): New.
22655         (AARCH64_ISA_F16FML): New ISA flag.
22656         (TARGET_F16FML): New feature flag for fp16fml.
22657         (doc/invoke.texi): Document new fp16fml option.
22659 2018-01-10  Michael Collison  <michael.collison@arm.com>
22661         * config/aarch64/aarch64-builtins.c:
22662         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
22663         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22664         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
22665         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
22666         (AARCH64_ISA_SHA3): New ISA flag.
22667         (TARGET_SHA3): New feature flag for sha3.
22668         * config/aarch64/iterators.md (sha512_op): New int attribute.
22669         (CRYPTO_SHA512): New int iterator.
22670         (UNSPEC_SHA512H): New unspec.
22671         (UNSPEC_SHA512H2): Ditto.
22672         (UNSPEC_SHA512SU0): Ditto.
22673         (UNSPEC_SHA512SU1): Ditto.
22674         * config/aarch64/aarch64-simd-builtins.def
22675         (aarch64_crypto_sha512hqv2di): New builtin.
22676         (aarch64_crypto_sha512h2qv2di): Ditto.
22677         (aarch64_crypto_sha512su0qv2di): Ditto.
22678         (aarch64_crypto_sha512su1qv2di): Ditto.
22679         (aarch64_eor3qv8hi): Ditto.
22680         (aarch64_rax1qv2di): Ditto.
22681         (aarch64_xarqv2di): Ditto.
22682         (aarch64_bcaxqv8hi): Ditto.
22683         * config/aarch64/aarch64-simd.md:
22684         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
22685         (aarch64_crypto_sha512su0qv2di): Ditto.
22686         (aarch64_crypto_sha512su1qv2di): Ditto.
22687         (aarch64_eor3qv8hi): Ditto.
22688         (aarch64_rax1qv2di): Ditto.
22689         (aarch64_xarqv2di): Ditto.
22690         (aarch64_bcaxqv8hi): Ditto.
22691         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
22692         (vsha512h2q_u64): Ditto.
22693         (vsha512su0q_u64): Ditto.
22694         (vsha512su1q_u64): Ditto.
22695         (veor3q_u16): Ditto.
22696         (vrax1q_u64): Ditto.
22697         (vxarq_u64): Ditto.
22698         (vbcaxq_u16): Ditto.
22699         * config/arm/types.md (crypto_sha512): New type attribute.
22700         (crypto_sha3): Ditto.
22701         (doc/invoke.texi): Document new sha3 option.
22703 2018-01-10  Michael Collison  <michael.collison@arm.com>
22705         * config/aarch64/aarch64-builtins.c:
22706         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
22707         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22708         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
22709         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
22710         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
22711         (AARCH64_ISA_SM4): New ISA flag.
22712         (TARGET_SM4): New feature flag for sm4.
22713         * config/aarch64/aarch64-simd-builtins.def
22714         (aarch64_sm3ss1qv4si): Ditto.
22715         (aarch64_sm3tt1aq4si): Ditto.
22716         (aarch64_sm3tt1bq4si): Ditto.
22717         (aarch64_sm3tt2aq4si): Ditto.
22718         (aarch64_sm3tt2bq4si): Ditto.
22719         (aarch64_sm3partw1qv4si): Ditto.
22720         (aarch64_sm3partw2qv4si): Ditto.
22721         (aarch64_sm4eqv4si): Ditto.
22722         (aarch64_sm4ekeyqv4si): Ditto.
22723         * config/aarch64/aarch64-simd.md:
22724         (aarch64_sm3ss1qv4si): Ditto.
22725         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
22726         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
22727         (aarch64_sm4eqv4si): Ditto.
22728         (aarch64_sm4ekeyqv4si): Ditto.
22729         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
22730         (sm3part_op): Ditto.
22731         (CRYPTO_SM3TT): Ditto.
22732         (CRYPTO_SM3PART): Ditto.
22733         (UNSPEC_SM3SS1): New unspec.
22734         (UNSPEC_SM3TT1A): Ditto.
22735         (UNSPEC_SM3TT1B): Ditto.
22736         (UNSPEC_SM3TT2A): Ditto.
22737         (UNSPEC_SM3TT2B): Ditto.
22738         (UNSPEC_SM3PARTW1): Ditto.
22739         (UNSPEC_SM3PARTW2): Ditto.
22740         (UNSPEC_SM4E): Ditto.
22741         (UNSPEC_SM4EKEY): Ditto.
22742         * config/aarch64/constraints.md (Ui2): New constraint.
22743         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
22744         * config/arm/types.md (crypto_sm3): New type attribute.
22745         (crypto_sm4): Ditto.
22746         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
22747         (vsm3tt1aq_u32): Ditto.
22748         (vsm3tt1bq_u32): Ditto.
22749         (vsm3tt2aq_u32): Ditto.
22750         (vsm3tt2bq_u32): Ditto.
22751         (vsm3partw1q_u32): Ditto.
22752         (vsm3partw2q_u32): Ditto.
22753         (vsm4eq_u32): Ditto.
22754         (vsm4ekeyq_u32): Ditto.
22755         (doc/invoke.texi): Document new sm4 option.
22757 2018-01-10  Michael Collison  <michael.collison@arm.com>
22759         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
22760         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
22761         (AARCH64_FL_FOR_ARCH8_4): New.
22762         (AARCH64_FL_V8_4): New flag.
22763         (doc/invoke.texi): Document new armv8.4-a option.
22765 2018-01-10  Michael Collison  <michael.collison@arm.com>
22767         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22768         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
22769         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
22770         * config/aarch64/aarch64-option-extension.def: Add
22771         AARCH64_OPT_EXTENSION of 'sha2'.
22772         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
22773         (crypto): Disable sha2 and aes if crypto disabled.
22774         (crypto): Enable aes and sha2 if enabled.
22775         (simd): Disable sha2 and aes if simd disabled.
22776         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
22777         New flags.
22778         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
22779         (TARGET_SHA2): New feature flag for sha2.
22780         (TARGET_AES): New feature flag for aes.
22781         * config/aarch64/aarch64-simd.md:
22782         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
22783         conditional on TARGET_AES.
22784         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
22785         (aarch64_crypto_sha1hsi): Make pattern conditional
22786         on TARGET_SHA2.
22787         (aarch64_crypto_sha1hv4si): Ditto.
22788         (aarch64_be_crypto_sha1hv4si): Ditto.
22789         (aarch64_crypto_sha1su1v4si): Ditto.
22790         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
22791         (aarch64_crypto_sha1su0v4si): Ditto.
22792         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
22793         (aarch64_crypto_sha256su0v4si): Ditto.
22794         (aarch64_crypto_sha256su1v4si): Ditto.
22795         (doc/invoke.texi): Document new aes and sha2 options.
22797 2018-01-10  Martin Sebor  <msebor@redhat.com>
22799         PR tree-optimization/83781
22800         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
22801         as string arrays.
22803 2018-01-11  Martin Sebor  <msebor@gmail.com>
22804             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22806         PR tree-optimization/83501
22807         PR tree-optimization/81703
22809         * tree-ssa-strlen.c (get_string_cst): Rename...
22810         (get_string_len): ...to this.  Handle global constants.
22811         (handle_char_store): Adjust.
22813 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
22814             Jim Wilson  <jimw@sifive.com>
22816         * config/riscv/riscv-protos.h (riscv_output_return): New.
22817         * config/riscv/riscv.c (struct machine_function): New naked_p field.
22818         (riscv_attribute_table, riscv_output_return),
22819         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
22820         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
22821         (riscv_compute_frame_info): Only compute frame->mask if not a naked
22822         function.
22823         (riscv_expand_prologue): Add early return for naked function.
22824         (riscv_expand_epilogue): Likewise.
22825         (riscv_function_ok_for_sibcall): Return false for naked function.
22826         (riscv_set_current_function): New.
22827         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
22828         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
22829         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
22830         * doc/extend.texi (RISC-V Function Attributes): New.
22832 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
22834         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
22835         check for 128-bit long double before checking TCmode.
22836         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
22837         128-bit long doubles before checking TFmode or TCmode.
22838         (FLOAT128_IBM_P): Likewise.
22840 2018-01-10  Martin Sebor  <msebor@redhat.com>
22842         PR tree-optimization/83671
22843         * builtins.c (c_strlen): Unconditionally return zero for the empty
22844         string.
22845         Use -Warray-bounds for warnings.
22846         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
22847         for non-constant array indices with COMPONENT_REF, arrays of
22848         arrays, and pointers to arrays.
22849         (gimple_fold_builtin_strlen): Determine and set length range for
22850         non-constant character arrays.
22852 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
22854         PR middle-end/81897
22855         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
22856         empty blocks.
22858 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
22860         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
22862 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22864         PR target/83399
22865         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
22866         VECTOR_MEM_ALTIVEC_OR_VSX_P.
22867         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
22868         indexed_or_indirect_operand predicate.
22869         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
22870         (*vsx_le_perm_load_v8hi): Likewise.
22871         (*vsx_le_perm_load_v16qi): Likewise.
22872         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
22873         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
22874         (*vsx_le_perm_store_v8hi): Likewise.
22875         (*vsx_le_perm_store_v16qi): Likewise.
22876         (eight unnamed splitters): Likewise.
22878 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
22880         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
22881         * config/rs6000/emmintrin.h: Likewise.
22882         * config/rs6000/mmintrin.h: Likewise.
22883         * config/rs6000/xmmintrin.h: Likewise.
22885 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
22887         PR c++/43486
22888         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
22889         "public_flag".
22890         * tree.c (tree_nop_conversion): Return true for location wrapper
22891         nodes.
22892         (maybe_wrap_with_location): New function.
22893         (selftest::check_strip_nops): New function.
22894         (selftest::test_location_wrappers): New function.
22895         (selftest::tree_c_tests): Call it.
22896         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
22897         (maybe_wrap_with_location): New decl.
22898         (EXPR_LOCATION_WRAPPER_P): New macro.
22899         (location_wrapper_p): New inline function.
22900         (tree_strip_any_location_wrapper): New inline function.
22902 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
22904         PR target/83735
22905         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
22906         stack_realign_offset for the largest alignment of stack slot
22907         actually used.
22908         (ix86_find_max_used_stack_alignment): New function.
22909         (ix86_finalize_stack_frame_flags): Use it.  Set
22910         max_used_stack_alignment if we don't realign stack.
22911         * config/i386/i386.h (machine_function): Add
22912         max_used_stack_alignment.
22914 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
22916         * config/arm/arm.opt (-mbranch-cost): New option.
22917         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
22918         account.
22920 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
22922         PR target/83629
22923         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
22924         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
22926 2018-01-10  Richard Biener  <rguenther@suse.de>
22928         PR debug/83765
22929         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
22930         early out so it also covers the case where we have a non-NULL
22931         origin.
22933 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22935         PR tree-optimization/83753
22936         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
22937         for non-strided grouped accesses if the number of elements is 1.
22939 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22941         PR target/81616
22942         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
22943         * i386.h (TARGET_USE_GATHER): Define.
22944         * x86-tune.def (X86_TUNE_USE_GATHER): New.
22946 2018-01-10  Martin Liska  <mliska@suse.cz>
22948         PR bootstrap/82831
22949         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
22950         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
22951         partitioning.
22952         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
22953         CLEANUP_NO_PARTITIONING is not set.
22955 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
22957         * doc/rtl.texi: Remove documentation of (const ...) wrappers
22958         for vectors, as a partial revert of r254296.
22959         * rtl.h (const_vec_p): Delete.
22960         (const_vec_duplicate_p): Don't test for vector CONSTs.
22961         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
22962         * expmed.c (make_tree): Likewise.
22964         Revert:
22965         * common.md (E, F): Use CONSTANT_P instead of checking for
22966         CONST_VECTOR.
22967         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
22968         checking for CONST_VECTOR.
22970 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
22972         PR middle-end/83575
22973         * predict.c (force_edge_cold): Handle in more sane way edges
22974         with no prediction.
22976 2018-01-09  Carl Love  <cel@us.ibm.com>
22978         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
22979         V4SI, V4SF types.
22980         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
22981         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
22982         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
22983         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
22984         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
22985         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
22986         * config/rs6000/rs6000-protos.h: Add extern defition for
22987         rs6000_generate_float2_double_code.
22988         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
22989         function.
22990         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
22991         (float2_v2df): Add define_expand.
22993 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
22995         PR target/83628
22996         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
22997         op_mode in the force_to_mode call.
22999 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23001         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23002         instead of checking each element individually.
23003         (aarch64_evpc_uzp): Likewise.
23004         (aarch64_evpc_zip): Likewise.
23005         (aarch64_evpc_ext): Likewise.
23006         (aarch64_evpc_rev): Likewise.
23007         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23008         instead of checking each element individually.  Return true without
23009         generating rtl if
23010         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23011         whether all selected elements come from the same input, instead of
23012         checking each element individually.  Remove calls to gen_rtx_REG,
23013         start_sequence and end_sequence and instead assert that no rtl is
23014         generated.
23016 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23018         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23019         order of HIGH and CONST checks.
23021 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23023         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23024         if the destination isn't an SSA_NAME.
23026 2018-01-09  Richard Biener  <rguenther@suse.de>
23028         PR tree-optimization/83668
23029         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23030         move prologue...
23031         (canonicalize_loop_form): ... here, renamed from ...
23032         (canonicalize_loop_closed_ssa_form): ... this and amended to
23033         swap successor edges for loop exit blocks to make us use
23034         the RPO order we need for initial schedule generation.
23036 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
23038         PR tree-optimization/64811
23039         * match.pd: When optimizing comparisons with Inf, avoid
23040         introducing or losing exceptions from comparisons with NaN.
23042 2018-01-09  Martin Liska  <mliska@suse.cz>
23044         PR sanitizer/82517
23045         * asan.c (shadow_mem_size): Add gcc_assert.
23047 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
23049         Don't save registers in main().
23051         PR target/83738
23052         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23053         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23054         * config/avr/avr.c (avr_set_current_function): Don't error if
23055         naked, OS_task or OS_main are specified at the same time.
23056         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23057         OS_main.
23058         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23059         attribute.
23060         * common/config/avr/avr-common.c (avr_option_optimization_table):
23061         Switch on -mmain-is-OS_task for optimizing compilations.
23063 2018-01-09  Richard Biener  <rguenther@suse.de>
23065         PR tree-optimization/83572
23066         * graphite.c: Include cfganal.h.
23067         (graphite_transform_loops): Connect infinite loops to exit
23068         and remove fake edges at the end.
23070 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23072         * ipa-inline.c (edge_badness): Revert accidental checkin.
23074 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23076         PR ipa/80763
23077         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23078         symbols; not inline clones.
23080 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
23082         PR target/83507
23083         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23084         hard registers.  Formatting fixes.
23086         PR preprocessor/83722
23087         * gcc.c (try_generate_repro): Pass
23088         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23089         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23090         do_report_bug.
23092 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
23093             Kito Cheng  <kito.cheng@gmail.com>
23095         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23096         (riscv_leaf_function_p): Delete.
23097         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23099 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23101         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23102         function.
23103         (do_ifelse): New function.
23104         (do_isel): New function.
23105         (do_sub3): New function.
23106         (do_add3): New function.
23107         (do_load_mask_compare): New function.
23108         (do_overlap_load_compare): New function.
23109         (expand_compare_loop): New function.
23110         (expand_block_compare): Call expand_compare_loop() when appropriate.
23111         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23112         option description.
23113         (-mblock-compare-inline-loop-limit): New option.
23115 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23117         PR target/83677
23118         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23119         Reverse order of second and third operands in first alternative.
23120         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23121         of first and second elements in UNSPEC_VPERMR vector.
23122         (altivec_expand_vec_perm_le): Likewise.
23124 2018-01-08  Jeff Law  <law@redhat.com>
23126         PR rtl-optimizatin/81308
23127         * tree-switch-conversion.c (cfg_altered): New file scoped static.
23128         (process_switch): If group_case_labels makes a change, then set
23129         cfg_altered.
23130         (pass_convert_switch::execute): If a switch is converted, then
23131         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
23133         PR rtl-optimization/81308
23134         * recog.c (split_all_insns): Conditionally cleanup the CFG after
23135         splitting insns.
23137 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
23139         PR target/83663 - Revert r255946
23140         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23141         generation for cases where splatting a value is not useful.
23142         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23143         across a vec_duplicate and a paradoxical subreg forming a vector
23144         mode to a vec_concat.
23146 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23148         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23149         -march=armv8.3-a variants.
23150         * config/arm/t-multilib: Likewise.
23151         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
23153 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23155         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23156         to generate rtl.
23157         (cceq_ior_compare_complement): Give it a name so I can use it, and
23158         change boolean_or_operator predicate to boolean_operator so it can
23159         be used to generate a crand.
23160         (eqne): New code iterator.
23161         (bd/bd_neg): New code_attrs.
23162         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23163         a single define_insn.
23164         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23165         decrement (bdnzt/bdnzf/bdzt/bdzf).
23166         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23167         with the new names of the branch decrement patterns, and added the
23168         names of the branch decrement conditional patterns.
23170 2018-01-08  Richard Biener  <rguenther@suse.de>
23172         PR tree-optimization/83563
23173         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23174         cache.
23176 2018-01-08  Richard Biener  <rguenther@suse.de>
23178         PR middle-end/83713
23179         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23181 2018-01-08  Richard Biener  <rguenther@suse.de>
23183         PR tree-optimization/83685
23184         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23185         references to abnormals.
23187 2018-01-08  Richard Biener  <rguenther@suse.de>
23189         PR lto/83719
23190         * dwarf2out.c (output_indirect_strings): Handle empty
23191         skeleton_debug_str_hash.
23192         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23194 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23196         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23197         (emit_store_direct): Likewise.
23198         (arc_trampoline_adjust_address): Likewise.
23199         (arc_asm_trampoline_template): New function.
23200         (arc_initialize_trampoline): Use asm_trampoline_template.
23201         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23202         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23203         * config/arc/arc.md (flush_icache): Delete pattern.
23205 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23207         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23208         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23209         munaligned-access.
23211 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23213         PR target/83681
23214         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23215         by not USED_FOR_TARGET.
23216         (make_pass_resolve_sw_modes): Likewise.
23218 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23220         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23221         USED_FOR_TARGET.
23223 2018-01-08  Richard Biener  <rguenther@suse.de>
23225         PR middle-end/83580
23226         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23228 2018-01-08  Richard Biener  <rguenther@suse.de>
23230         PR middle-end/83517
23231         * match.pd ((t * 2) / 2) -> t): Add missing :c.
23233 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
23235         PR middle-end/81897
23236         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23237         basic blocks with a small number of successors.
23238         (convert_control_dep_chain_into_preds): Improve handling of
23239         forwarder blocks.
23240         (dump_predicates): Split apart into...
23241         (dump_pred_chain): ...here...
23242         (dump_pred_info): ...and here.
23243         (can_one_predicate_be_invalidated_p): Add debugging printfs.
23244         (can_chain_union_be_invalidated_p): Improve check for invalidation
23245         of paths.
23246         (uninit_uses_cannot_happen): Avoid unnecessary if
23247         convert_control_dep_chain_into_preds yielded nothing.
23249 2018-01-06  Martin Sebor  <msebor@redhat.com>
23251         PR tree-optimization/83640
23252         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23253         subtracting negative offset from size.
23254         (builtin_access::overlap): Adjust offset bounds of the access to fall
23255         within the size of the object if possible.
23257 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
23259         PR rtl-optimization/83699
23260         * expmed.c (extract_bit_field_1): Restrict the vector usage of
23261         extract_bit_field_as_subreg to cases in which the extracted
23262         value is also a vector.
23264         * lra-constraints.c (process_alt_operands): Test for the equivalence
23265         substitutions when detecting a possible reload cycle.
23267 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
23269         PR debug/83480
23270         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23271         by default if flag_selective_schedling{,2}.  Formatting fixes.
23273         PR rtl-optimization/83682
23274         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23275         if it has non-VECTOR_MODE element mode.
23276         (vec_duplicate_p): Likewise.
23278         PR middle-end/83694
23279         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23280         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23282 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23284         PR target/83604
23285         * config/i386/i386-builtin.def
23286         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23287         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23288         Require also OPTION_MASK_ISA_AVX512F in addition to
23289         OPTION_MASK_ISA_GFNI.
23290         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23291         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23292         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23293         to OPTION_MASK_ISA_GFNI.
23294         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23295         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23296         OPTION_MASK_ISA_AVX512BW.
23297         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23298         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23299         addition to OPTION_MASK_ISA_GFNI.
23300         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23301         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23302         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23303         to OPTION_MASK_ISA_GFNI.
23304         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23305         a requirement for all ISAs rather than any of them with a few
23306         exceptions.
23307         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23308         processing.
23309         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23310         bitmasks to be enabled with 3 exceptions, instead of requiring any
23311         enabled ISA with lots of exceptions.
23312         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23313         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23314         Change avx512bw in isa attribute to avx512f.
23315         * config/i386/sgxintrin.h: Add license boilerplate.
23316         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
23317         to __AVX512F__ and __AVX512VL to __AVX512VL__.
23318         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23319         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23320         defined.
23321         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23322         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23323         temporarily sse2 rather than sse if not enabled already.
23325         PR target/83604
23326         * config/i386/sse.md (VI248_VLBW): Rename to ...
23327         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
23328         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23329         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23330         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23331         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23332         mode iterator instead of VI248_VLBW.
23334 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
23336         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23337         (record_modified): Skip clobbers; add debug output.
23338         (param_change_prob): Use sreal frequencies.
23340 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23342         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23343         punt for user-aligned variables.
23345 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23347         * tree-chrec.c (chrec_contains_symbols): Return true for
23348         POLY_INT_CST.
23350 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
23352         PR target/82439
23353         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23354         of (x|y) == x for BICS pattern.
23356 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23358         PR tree-optimization/83605
23359         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23360         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23361         can throw.
23363 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23365         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23366         * config/epiphany/rtems.h: New file.
23368 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23369             Uros Bizjak  <ubizjak@gmail.com>
23371         PR target/83554
23372         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23373         QIreg_operand instead of register_operand predicate.
23374         * config/i386/i386.c (ix86_rop_should_change_byte_p,
23375         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23376         comments instead of -fmitigate[-_]rop.
23378 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23380         PR bootstrap/81926
23381         * cgraphunit.c (symbol_table::compile): Switch to text_section
23382         before calling assembly_start debug hook.
23383         * run-rtl-passes.c (run_rtl_passes): Likewise.
23384         Include output.h.
23386 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23388         * tree-vrp.c (extract_range_from_binary_expr_1): Check
23389         range_int_cst_p rather than !symbolic_range_p before calling
23390         extract_range_from_multiplicative_op_1.
23392 2018-01-04  Jeff Law  <law@redhat.com>
23394         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23395         redundant test in assertion.
23397 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23399         * doc/rtl.texi: Document machine_mode wrapper classes.
23401 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23403         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23404         using tree_to_uhwi.
23406 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23408         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23409         the VEC_PERM_EXPR fold to fail.
23411 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23413         PR debug/83585
23414         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23415         to switched_sections.
23417 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23419         PR target/83680
23420         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23421         test for d.testing.
23423 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
23425         PR target/83387
23426         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23427         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23429 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23431         PR debug/83666
23432         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23433         is BLKmode and bitpos not zero or mode change is needed.
23435 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23437         PR target/83675
23438         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23439         TARGET_VIS2.
23441 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
23443         PR target/83628
23444         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23445         instead of MULT rtx.  Update all corresponding splitters.
23446         (*saddl_se): Ditto.
23447         (*ssub<modesuffix>): Ditto.
23448         (*ssubl_se): Ditto.
23449         (*cmp_sadd_di): Update split patterns.
23450         (*cmp_sadd_si): Ditto.
23451         (*cmp_sadd_sidi): Ditto.
23452         (*cmp_ssub_di): Ditto.
23453         (*cmp_ssub_si): Ditto.
23454         (*cmp_ssub_sidi): Ditto.
23455         * config/alpha/predicates.md (const23_operand): New predicate.
23456         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23457         Look for ASHIFT, not MULT inner operand.
23458         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23460 2018-01-04  Martin Liska  <mliska@suse.cz>
23462         PR gcov-profile/83669
23463         * gcov.c (output_intermediate_file): Add version to intermediate
23464         gcov file.
23465         * doc/gcov.texi: Document new field 'version' in intermediate
23466         file format. Fix location of '-k' option of gcov command.
23468 2018-01-04  Martin Liska  <mliska@suse.cz>
23470         PR ipa/82352
23471         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23473 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23475         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23477 2018-01-03  Martin Sebor  <msebor@redhat.com>
23479         PR tree-optimization/83655
23480         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23481         checking calls with invalid arguments.
23483 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23485         * tree-vect-stmts.c (vect_get_store_rhs): New function.
23486         (vectorizable_mask_load_store): Delete.
23487         (vectorizable_call): Return false for masked loads and stores.
23488         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
23489         instead of gimple_assign_rhs1.
23490         (vectorizable_load): Handle IFN_MASK_LOAD.
23491         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23493 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23495         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23496         split out from..,
23497         (vectorizable_mask_load_store): ...here.
23498         (vectorizable_load): ...and here.
23500 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23502         * tree-vect-stmts.c (vect_build_all_ones_mask)
23503         (vect_build_zero_merge_argument): New functions, split out from...
23504         (vectorizable_load): ...here.
23506 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23508         * tree-vect-stmts.c (vect_check_store_rhs): New function,
23509         split out from...
23510         (vectorizable_mask_load_store): ...here.
23511         (vectorizable_store): ...and here.
23513 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23515         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23516         split out from...
23517         (vectorizable_mask_load_store): ...here.
23519 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23521         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23522         (vect_model_store_cost): Take a vec_load_store_type instead of a
23523         vect_def_type.
23524         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23525         (vect_model_store_cost): Take a vec_load_store_type instead of a
23526         vect_def_type.
23527         (vectorizable_mask_load_store): Update accordingly.
23528         (vectorizable_store): Likewise.
23529         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23531 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23533         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23534         IFN_MASK_LOAD calls here rather than...
23535         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23537 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23538             Alan Hayward  <alan.hayward@arm.com>
23539             David Sherwood  <david.sherwood@arm.com>
23541         * expmed.c (extract_bit_field_1): For vector extracts,
23542         fall back to extract_bit_field_as_subreg if vec_extract
23543         isn't available.
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         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23550         they are variable or constant sized.
23551         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23552         slots for constant-sized data.
23554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23555             Alan Hayward  <alan.hayward@arm.com>
23556             David Sherwood  <david.sherwood@arm.com>
23558         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23559         handling COND_EXPRs with boolean comparisons, try to find a better
23560         basis for the mask type than the boolean itself.
23562 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23564         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23565         is calculated and how it can be overridden.
23566         * genmodes.c (max_bitsize_mode_any_mode): New variable.
23567         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23568         if defined.
23569         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23570         if nonzero.
23572 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23573             Alan Hayward  <alan.hayward@arm.com>
23574             David Sherwood  <david.sherwood@arm.com>
23576         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23577         Remove the mode argument.
23578         (aarch64_simd_valid_immediate): Remove the mode and inverse
23579         arguments.
23580         * config/aarch64/iterators.md (bitsize): New iterator.
23581         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23582         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23583         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23584         aarch64_simd_valid_immediate.
23585         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23586         (aarch64_reg_or_bic_imm): Likewise.
23587         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23588         with an insn_type enum and msl with a modifier_type enum.
23589         Replace element_width with a scalar_mode.  Change the shift
23590         to unsigned int.  Add constructors for scalar_float_mode and
23591         scalar_int_mode elements.
23592         (aarch64_vect_float_const_representable_p): Delete.
23593         (aarch64_can_const_movi_rtx_p)
23594         (aarch64_simd_scalar_immediate_valid_for_move)
23595         (aarch64_simd_make_constant): Update call to
23596         aarch64_simd_valid_immediate.
23597         (aarch64_advsimd_valid_immediate_hs): New function.
23598         (aarch64_advsimd_valid_immediate): Likewise.
23599         (aarch64_simd_valid_immediate): Remove mode and inverse
23600         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
23601         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23602         and aarch64_float_const_representable_p on the result.
23603         (aarch64_output_simd_mov_immediate): Remove mode argument.
23604         Update call to aarch64_simd_valid_immediate and use of
23605         simd_immediate_info.
23606         (aarch64_output_scalar_simd_mov_immediate): Update call
23607         accordingly.
23609 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23610             Alan Hayward  <alan.hayward@arm.com>
23611             David Sherwood  <david.sherwood@arm.com>
23613         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23614         (mode_nunits): Likewise CONST_MODE_NUNITS.
23615         * machmode.def (ADJUST_NUNITS): Document.
23616         * genmodes.c (mode_data::need_nunits_adj): New field.
23617         (blank_mode): Update accordingly.
23618         (adj_nunits): New variable.
23619         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23620         parameter.
23621         (emit_mode_size_inline): Set need_bytesize_adj for all modes
23622         listed in adj_nunits.
23623         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23624         listed in adj_nunits.  Don't emit case statements for such modes.
23625         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23626         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
23627         nothing if adj_nunits is nonnull.
23628         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23629         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23630         (emit_mode_fbit): Update use of print_maybe_const_decl.
23631         (emit_move_size): Likewise.  Treat the array as non-const
23632         if adj_nunits.
23633         (emit_mode_adjustments): Handle adj_nunits.
23635 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23637         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23638         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23639         (VECTOR_MODES): Use it.
23640         (make_vector_modes): Take the prefix as an argument.
23642 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23643             Alan Hayward  <alan.hayward@arm.com>
23644             David Sherwood  <david.sherwood@arm.com>
23646         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
23647         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
23648         for MODE_VECTOR_BOOL.
23649         * machmode.def (VECTOR_BOOL_MODE): Document.
23650         * genmodes.c (VECTOR_BOOL_MODE): New macro.
23651         (make_vector_bool_mode): New function.
23652         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
23653         MODE_VECTOR_BOOL.
23654         * lto-streamer-in.c (lto_input_mode_table): Likewise.
23655         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
23656         Likewise.
23657         * stor-layout.c (int_mode_for_mode): Likewise.
23658         * tree.c (build_vector_type_for_mode): Likewise.
23659         * varasm.c (output_constant_pool_2): Likewise.
23660         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
23661         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
23662         for MODE_VECTOR_BOOL.
23663         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
23664         of mode class checks.
23665         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
23666         instead of a list of mode class checks.
23667         (expand_vector_scalar_condition): Likewise.
23668         (type_for_widest_vector_mode): Handle BImode as an inner mode.
23670 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23671             Alan Hayward  <alan.hayward@arm.com>
23672             David Sherwood  <david.sherwood@arm.com>
23674         * machmode.h (mode_size): Change from unsigned short to
23675         poly_uint16_pod.
23676         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
23677         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23678         or if measurement_type is not polynomial.
23679         (fixed_size_mode::includes_p): Check for constant-sized modes.
23680         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
23681         return a poly_uint16 rather than an unsigned short.
23682         (emit_mode_size): Change the type of mode_size from unsigned short
23683         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
23684         (emit_mode_adjustments): Cope with polynomial vector sizes.
23685         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23686         for GET_MODE_SIZE.
23687         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23688         for GET_MODE_SIZE.
23689         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
23690         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
23691         * caller-save.c (setup_save_areas): Likewise.
23692         (replace_reg_with_saved_mem): Likewise.
23693         * calls.c (emit_library_call_value_1): Likewise.
23694         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
23695         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
23696         (gen_lowpart_for_combine): Likewise.
23697         * convert.c (convert_to_integer_1): Likewise.
23698         * cse.c (equiv_constant, cse_insn): Likewise.
23699         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
23700         (cselib_subst_to_values): Likewise.
23701         * dce.c (word_dce_process_block): Likewise.
23702         * df-problems.c (df_word_lr_mark_ref): Likewise.
23703         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
23704         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
23705         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
23706         (rtl_for_decl_location): Likewise.
23707         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
23708         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
23709         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
23710         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
23711         (expand_expr_real_1): Likewise.
23712         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
23713         (pad_below): Likewise.
23714         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23715         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
23716         * ira.c (get_subreg_tracking_sizes): Likewise.
23717         * ira-build.c (ira_create_allocno_objects): Likewise.
23718         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
23719         (ira_sort_regnos_for_alter_reg): Likewise.
23720         * ira-costs.c (record_operand_costs): Likewise.
23721         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
23722         (resolve_simple_move): Likewise.
23723         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
23724         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
23725         (lra_constraints): Likewise.
23726         (CONST_POOL_OK_P): Reject variable-sized modes.
23727         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
23728         (add_pseudo_to_slot, lra_spill): Likewise.
23729         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23730         * optabs-query.c (get_best_extraction_insn): Likewise.
23731         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23732         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
23733         (expand_mult_highpart, valid_multiword_target_p): Likewise.
23734         * recog.c (offsettable_address_addr_space_p): Likewise.
23735         * regcprop.c (maybe_mode_change): Likewise.
23736         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
23737         * regrename.c (build_def_use): Likewise.
23738         * regstat.c (dump_reg_info): Likewise.
23739         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
23740         (find_reloads, find_reloads_subreg_address): Likewise.
23741         * reload1.c (eliminate_regs_1): Likewise.
23742         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
23743         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
23744         (simplify_binary_operation_1, simplify_subreg): Likewise.
23745         * targhooks.c (default_function_arg_padding): Likewise.
23746         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
23747         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
23748         (verify_gimple_assign_ternary): Likewise.
23749         * tree-inline.c (estimate_move_cost): Likewise.
23750         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23751         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
23752         (get_address_cost_ainc): Likewise.
23753         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23754         (vect_supportable_dr_alignment): Likewise.
23755         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23756         (vectorizable_reduction): Likewise.
23757         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
23758         (vectorizable_operation, vectorizable_load): Likewise.
23759         * tree.c (build_same_sized_truth_vector_type): Likewise.
23760         * valtrack.c (cleanup_auto_inc_dec): Likewise.
23761         * var-tracking.c (emit_note_insn_var_location): Likewise.
23762         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
23763         (ADDR_VEC_ALIGN): Likewise.
23765 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23766             Alan Hayward  <alan.hayward@arm.com>
23767             David Sherwood  <david.sherwood@arm.com>
23769         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
23770         unsigned short.
23771         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
23772         or if measurement_type is polynomial.
23773         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
23774         * combine.c (make_extraction): Likewise.
23775         * dse.c (find_shift_sequence): Likewise.
23776         * dwarf2out.c (mem_loc_descriptor): Likewise.
23777         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
23778         (extract_bit_field, extract_low_bits): Likewise.
23779         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
23780         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
23781         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
23782         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
23783         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
23784         * reload.c (find_reloads): Likewise.
23785         * reload1.c (alter_reg): Likewise.
23786         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
23787         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
23788         * tree-if-conv.c (predicate_mem_writes): Likewise.
23789         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
23790         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
23791         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
23792         * valtrack.c (dead_debug_insert_temp): Likewise.
23793         * varasm.c (mergeable_constant_section): Likewise.
23794         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
23796 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23797             Alan Hayward  <alan.hayward@arm.com>
23798             David Sherwood  <david.sherwood@arm.com>
23800         * expr.c (expand_assignment): Cope with polynomial mode sizes
23801         when assigning to a CONCAT.
23803 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23804             Alan Hayward  <alan.hayward@arm.com>
23805             David Sherwood  <david.sherwood@arm.com>
23807         * machmode.h (mode_precision): Change from unsigned short to
23808         poly_uint16_pod.
23809         (mode_to_precision): Return a poly_uint16 rather than an unsigned
23810         short.
23811         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
23812         or if measurement_type is not polynomial.
23813         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
23814         in which the mode is already known to be a scalar_int_mode.
23815         * genmodes.c (emit_mode_precision): Change the type of mode_precision
23816         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
23817         initializer.
23818         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23819         for GET_MODE_PRECISION.
23820         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23821         for GET_MODE_PRECISION.
23822         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
23823         as polynomial.
23824         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
23825         (expand_field_assignment, make_extraction): Likewise.
23826         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
23827         (get_last_value): Likewise.
23828         * convert.c (convert_to_integer_1): Likewise.
23829         * cse.c (cse_insn): Likewise.
23830         * expr.c (expand_expr_real_1): Likewise.
23831         * lra-constraints.c (simplify_operand_subreg): Likewise.
23832         * optabs-query.c (can_atomic_load_p): Likewise.
23833         * optabs.c (expand_atomic_load): Likewise.
23834         (expand_atomic_store): Likewise.
23835         * ree.c (combine_reaching_defs): Likewise.
23836         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
23837         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
23838         * tree.h (type_has_mode_precision_p): Likewise.
23839         * ubsan.c (instrument_si_overflow): Likewise.
23841 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23842             Alan Hayward  <alan.hayward@arm.com>
23843             David Sherwood  <david.sherwood@arm.com>
23845         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
23846         polynomial numbers of units.
23847         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
23848         (valid_vector_subparts_p): New function.
23849         (build_vector_type): Remove temporary shim and take the number
23850         of units as a poly_uint64 rather than an int.
23851         (build_opaque_vector_type): Take the number of units as a
23852         poly_uint64 rather than an int.
23853         * tree.c (build_vector_from_ctor): Handle polynomial
23854         TYPE_VECTOR_SUBPARTS.
23855         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
23856         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
23857         (build_vector_from_val): If the number of units is variable,
23858         use build_vec_duplicate_cst for constant operands and
23859         VEC_DUPLICATE_EXPR otherwise.
23860         (make_vector_type): Remove temporary is_constant ().
23861         (build_vector_type, build_opaque_vector_type): Take the number of
23862         units as a poly_uint64 rather than an int.
23863         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
23864         VECTOR_CST_NELTS.
23865         * cfgexpand.c (expand_debug_expr): Likewise.
23866         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
23867         (store_constructor, expand_expr_real_1): Likewise.
23868         (const_scalar_mask_from_tree): Likewise.
23869         * fold-const-call.c (fold_const_reduction): Likewise.
23870         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
23871         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
23872         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
23873         (fold_relational_const): Likewise.
23874         (native_interpret_vector): Likewise.  Change the size from an
23875         int to an unsigned int.
23876         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
23877         TYPE_VECTOR_SUBPARTS.
23878         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
23879         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
23880         duplicating a non-constant operand into a variable-length vector.
23881         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
23882         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
23883         * ipa-icf.c (sem_variable::equals): Likewise.
23884         * match.pd: Likewise.
23885         * omp-simd-clone.c (simd_clone_subparts): Likewise.
23886         * print-tree.c (print_node): Likewise.
23887         * stor-layout.c (layout_type): Likewise.
23888         * targhooks.c (default_builtin_vectorization_cost): Likewise.
23889         * tree-cfg.c (verify_gimple_comparison): Likewise.
23890         (verify_gimple_assign_binary): Likewise.
23891         (verify_gimple_assign_ternary): Likewise.
23892         (verify_gimple_assign_single): Likewise.
23893         * tree-pretty-print.c (dump_generic_node): Likewise.
23894         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23895         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
23896         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
23897         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
23898         (vect_shift_permute_load_chain): Likewise.
23899         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
23900         (expand_vector_condition, optimize_vector_constructor): Likewise.
23901         (lower_vec_perm, get_compute_type): Likewise.
23902         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
23903         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
23904         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
23905         (vect_recog_mask_conversion_pattern): Likewise.
23906         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
23907         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
23908         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23909         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
23910         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
23911         (vectorizable_shift, vectorizable_operation, vectorizable_store)
23912         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
23913         (supportable_widening_operation): Likewise.
23914         (supportable_narrowing_operation): Likewise.
23915         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
23916         Likewise.
23917         * varasm.c (output_constant): Likewise.
23919 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23920             Alan Hayward  <alan.hayward@arm.com>
23921             David Sherwood  <david.sherwood@arm.com>
23923         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
23924         so that both the length == 3 and length != 3 cases set up their
23925         own permute vectors.  Add comments explaining why we know the
23926         number of elements is constant.
23927         (vect_permute_load_chain): Likewise.
23929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23930             Alan Hayward  <alan.hayward@arm.com>
23931             David Sherwood  <david.sherwood@arm.com>
23933         * machmode.h (mode_nunits): Change from unsigned char to
23934         poly_uint16_pod.
23935         (ONLY_FIXED_SIZE_MODES): New macro.
23936         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
23937         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
23938         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
23939         New typedefs.
23940         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
23941         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
23942         or if measurement_type is not polynomial.
23943         * genmodes.c (ZERO_COEFFS): New macro.
23944         (emit_mode_nunits_inline): Make mode_nunits_inline return a
23945         poly_uint16.
23946         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
23947         Use ZERO_COEFFS when emitting initializers.
23948         * data-streamer.h (bp_pack_poly_value): New function.
23949         (bp_unpack_poly_value): Likewise.
23950         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
23951         for GET_MODE_NUNITS.
23952         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
23953         for GET_MODE_NUNITS.
23954         * tree.c (make_vector_type): Remove temporary shim and make
23955         the real function take the number of units as a poly_uint64
23956         rather than an int.
23957         (build_vector_type_for_mode): Handle polynomial nunits.
23958         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
23959         * emit-rtl.c (const_vec_series_p_1): Likewise.
23960         (gen_rtx_CONST_VECTOR): Likewise.
23961         * fold-const.c (test_vec_duplicate_folding): Likewise.
23962         * genrecog.c (validate_pattern): Likewise.
23963         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
23964         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
23965         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
23966         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
23967         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
23968         * rtlanal.c (subreg_get_info): Likewise.
23969         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23970         (vect_grouped_load_supported): Likewise.
23971         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
23972         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
23973         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
23974         (simplify_const_unary_operation, simplify_binary_operation_1)
23975         (simplify_const_binary_operation, simplify_ternary_operation)
23976         (test_vector_ops_duplicate, test_vector_ops): Likewise.
23977         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
23978         instead of CONST_VECTOR_NUNITS.
23979         * varasm.c (output_constant_pool_2): Likewise.
23980         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
23981         explicit-encoded elements in the XVEC for variable-length vectors.
23983 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23985         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
23987 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23988             Alan Hayward  <alan.hayward@arm.com>
23989             David Sherwood  <david.sherwood@arm.com>
23991         * coretypes.h (fixed_size_mode): Declare.
23992         (fixed_size_mode_pod): New typedef.
23993         * builtins.h (target_builtins::x_apply_args_mode)
23994         (target_builtins::x_apply_result_mode): Change type to
23995         fixed_size_mode_pod.
23996         * builtins.c (apply_args_size, apply_result_size, result_vector)
23997         (expand_builtin_apply_args_1, expand_builtin_apply)
23998         (expand_builtin_return): Update accordingly.
24000 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24002         * cse.c (hash_rtx_cb): Hash only the encoded elements.
24003         * cselib.c (cselib_hash_rtx): Likewise.
24004         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24005         CONST_VECTOR encoding.
24007 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24008             Jeff Law  <law@redhat.com>
24010         PR target/83641
24011         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24012         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24013         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24014         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24016         PR target/83641
24017         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24018         explicitly probe *sp in a noreturn function if there were any callee
24019         register saves or frame pointer is needed.
24021 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24023         PR debug/83621
24024         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24025         BLKmode for ternary, binary or unary expressions.
24027         PR debug/83645
24028         * var-tracking.c (delete_vta_debug_insn): New inline function.
24029         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24030         insns from get_insns () to NULL instead of each bb separately.
24031         Use delete_vta_debug_insn.  No longer static.
24032         (vt_debug_insns_local, variable_tracking_main_1): Adjust
24033         delete_vta_debug_insns callers.
24034         * rtl.h (delete_vta_debug_insns): Declare.
24035         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24036         instead of variable_tracking_main.
24038 2018-01-03  Martin Sebor  <msebor@redhat.com>
24040         PR tree-optimization/83603
24041         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24042         arguments past the endof the argument list in functions declared
24043         without a prototype.
24044         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24045         Avoid checking when arguments are null.
24047 2018-01-03  Martin Sebor  <msebor@redhat.com>
24049         PR c/83559
24050         * doc/extend.texi (attribute const): Fix a typo.
24051         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24052         issuing -Wsuggest-attribute for void functions.
24054 2018-01-03  Martin Sebor  <msebor@redhat.com>
24056         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24057         offset_int::from instead of wide_int::to_shwi.
24058         (maybe_diag_overlap): Remove assertion.
24059         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24060         * gimple-ssa-sprintf.c (format_directive): Same.
24061         (parse_directive): Same.
24062         (sprintf_dom_walker::compute_format_length): Same.
24063         (try_substitute_return_value): Same.
24065 2018-01-03  Jeff Law  <law@redhat.com>
24067         PR middle-end/83654
24068         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24069         non-constant residual for zero at runtime and avoid probing in
24070         that case.  Reorganize code for trailing problem to mirror handling
24071         of the residual.
24073 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24075         PR tree-optimization/83501
24076         * tree-ssa-strlen.c (get_string_cst): New.
24077         (handle_char_store): Call get_string_cst.
24079 2018-01-03  Martin Liska  <mliska@suse.cz>
24081         PR tree-optimization/83593
24082         * tree-ssa-strlen.c: Include tree-cfg.h.
24083         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24084         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24085         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24086         to false.
24087         (strlen_dom_walker::before_dom_children): Call
24088         gimple_purge_dead_eh_edges. Dump tranformation with details
24089         dump flags.
24090         (strlen_dom_walker::before_dom_children): Update call by adding
24091         new argument cleanup_eh.
24092         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24094 2018-01-03  Martin Liska  <mliska@suse.cz>
24096         PR ipa/83549
24097         * cif-code.def (VARIADIC_THUNK): New enum value.
24098         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24099         thunks.
24101 2018-01-03  Jan Beulich  <jbeulich@suse.com>
24103         * sse.md (mov<mode>_internal): Tighten condition for when to use
24104         vmovdqu<ssescalarsize> for TI and OI modes.
24106 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24108         Update copyright years.
24110 2018-01-03  Martin Liska  <mliska@suse.cz>
24112         PR ipa/83594
24113         * ipa-visibility.c (function_and_variable_visibility): Skip
24114         functions with noipa attribure.
24116 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24118         * gcc.c (process_command): Update copyright notice dates.
24119         * gcov-dump.c (print_version): Ditto.
24120         * gcov.c (print_version): Ditto.
24121         * gcov-tool.c (print_version): Ditto.
24122         * gengtype.c (create_file): Ditto.
24123         * doc/cpp.texi: Bump @copying's copyright year.
24124         * doc/cppinternals.texi: Ditto.
24125         * doc/gcc.texi: Ditto.
24126         * doc/gccint.texi: Ditto.
24127         * doc/gcov.texi: Ditto.
24128         * doc/install.texi: Ditto.
24129         * doc/invoke.texi: Ditto.
24131 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24133         * vector-builder.h (vector_builder::m_full_nelts): Change from
24134         unsigned int to poly_uint64.
24135         (vector_builder::full_nelts): Update prototype accordingly.
24136         (vector_builder::new_vector): Likewise.
24137         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24138         (vector_builder::operator ==): Likewise.
24139         (vector_builder::finalize): Likewise.
24140         * int-vector-builder.h (int_vector_builder::int_vector_builder):
24141         Take the number of elements as a poly_uint64 rather than an
24142         unsigned int.
24143         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24144         from unsigned int to poly_uint64.
24145         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24146         (vec_perm_indices::new_vector): Likewise.
24147         (vec_perm_indices::length): Likewise.
24148         (vec_perm_indices::nelts_per_input): Likewise.
24149         (vec_perm_indices::input_nelts): Likewise.
24150         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24151         number of elements per input as a poly_uint64 rather than an
24152         unsigned int.  Use the original encoding for variable-length
24153         vectors, rather than clamping each individual element.
24154         For the second and subsequent elements in each pattern,
24155         clamp the step and base before clamping their sum.
24156         (vec_perm_indices::series_p): Handle polynomial element counts.
24157         (vec_perm_indices::all_in_range_p): Likewise.
24158         (vec_perm_indices_to_tree): Likewise.
24159         (vec_perm_indices_to_rtx): Likewise.
24160         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24161         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24162         (tree_vector_builder::new_binary_operation): Handle polynomial
24163         element counts.  Return false if we need to know the number
24164         of elements at compile time.
24165         * fold-const.c (fold_vec_perm): Punt if the number of elements
24166         isn't known at compile time.
24168 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24170         * vec-perm-indices.h (vec_perm_builder): Change element type
24171         from HOST_WIDE_INT to poly_int64.
24172         (vec_perm_indices::element_type): Update accordingly.
24173         (vec_perm_indices::clamp): Handle polynomial element_types.
24174         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24175         (vec_perm_indices::all_in_range_p): Likewise.
24176         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24177         than shwi trees.
24178         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24179         polynomial vec_perm_indices element types.
24180         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24181         * fold-const.c (fold_vec_perm): Likewise.
24182         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24183         * tree-vect-generic.c (lower_vec_perm): Likewise.
24184         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24185         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24186         element type to HOST_WIDE_INT.
24188 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24189             Alan Hayward  <alan.hayward@arm.com>
24190             David Sherwood  <david.sherwood@arm.com>
24192         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24193         rather than an int.  Use plus_constant.
24194         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24195         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24197 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24198             Alan Hayward  <alan.hayward@arm.com>
24199             David Sherwood  <david.sherwood@arm.com>
24201         * calls.c (emit_call_1, expand_call): Change struct_value_size from
24202         a HOST_WIDE_INT to a poly_int64.
24204 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24205             Alan Hayward  <alan.hayward@arm.com>
24206             David Sherwood  <david.sherwood@arm.com>
24208         * calls.c (load_register_parameters): Cope with polynomial
24209         mode sizes.  Require a constant size for BLKmode parameters
24210         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
24211         forces a parameter to be padded at the lsb end in order to
24212         fill a complete number of words, require the parameter size
24213         to be ordered wrt UNITS_PER_WORD.
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         * reload1.c (spill_stack_slot_width): Change element type
24220         from unsigned int to poly_uint64_pod.
24221         (alter_reg): Treat mode sizes as polynomial.
24223 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24224             Alan Hayward  <alan.hayward@arm.com>
24225             David Sherwood  <david.sherwood@arm.com>
24227         * reload.c (complex_word_subreg_p): New function.
24228         (reload_inner_reg_of_subreg, push_reload): Use it.
24230 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24231             Alan Hayward  <alan.hayward@arm.com>
24232             David Sherwood  <david.sherwood@arm.com>
24234         * lra-constraints.c (process_alt_operands): Reject matched
24235         operands whose sizes aren't ordered.
24236         (match_reload): Refer to this check here.
24238 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24239             Alan Hayward  <alan.hayward@arm.com>
24240             David Sherwood  <david.sherwood@arm.com>
24242         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24243         that the mode size is in the set {1, 2, 4, 8, 16}.
24245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24246             Alan Hayward  <alan.hayward@arm.com>
24247             David Sherwood  <david.sherwood@arm.com>
24249         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24250         Use plus_constant instead of gen_rtx_PLUS.
24252 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24253             Alan Hayward  <alan.hayward@arm.com>
24254             David Sherwood  <david.sherwood@arm.com>
24256         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24257         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24258         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24259         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24260         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24261         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24262         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24263         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24264         * config/i386/i386.c (ix86_push_rounding): ...this new function.
24265         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24266         a poly_int64.
24267         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24268         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24269         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24270         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24271         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24272         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24273         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24274         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24275         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24276         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24277         function.
24278         * expr.c (emit_move_resolve_push): Treat the input and result
24279         of PUSH_ROUNDING as a poly_int64.
24280         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24281         (emit_push_insn): Likewise.
24282         * lra-eliminations.c (mark_not_eliminable): Likewise.
24283         * recog.c (push_operand): Likewise.
24284         * reload1.c (elimination_effects): Likewise.
24285         * rtlanal.c (nonzero_bits1): Likewise.
24286         * calls.c (store_one_arg): Likewise.  Require the padding to be
24287         known at compile time.
24289 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24290             Alan Hayward  <alan.hayward@arm.com>
24291             David Sherwood  <david.sherwood@arm.com>
24293         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24294         Use plus_constant instead of gen_rtx_PLUS.
24296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24297             Alan Hayward  <alan.hayward@arm.com>
24298             David Sherwood  <david.sherwood@arm.com>
24300         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24301         rather than an int.
24303 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24304             Alan Hayward  <alan.hayward@arm.com>
24305             David Sherwood  <david.sherwood@arm.com>
24307         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24308         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24309         via stack temporaries.  Treat the mode size as polynomial too.
24311 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24312             Alan Hayward  <alan.hayward@arm.com>
24313             David Sherwood  <david.sherwood@arm.com>
24315         * expr.c (expand_expr_real_2): When handling conversions involving
24316         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24317         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
24318         as a poly_uint64 too.
24320 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24321             Alan Hayward  <alan.hayward@arm.com>
24322             David Sherwood  <david.sherwood@arm.com>
24324         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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         * combine.c (can_change_dest_mode): Handle polynomial
24331         REGMODE_NATURAL_SIZE.
24332         * expmed.c (store_bit_field_1): Likewise.
24333         * expr.c (store_constructor): Likewise.
24334         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24335         and polynomial REGMODE_NATURAL_SIZE.
24336         (gen_lowpart_common): Likewise.
24337         * reginfo.c (record_subregs_of_mode): Likewise.
24338         * rtlanal.c (read_modify_subreg_p): Likewise.
24340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24341             Alan Hayward  <alan.hayward@arm.com>
24342             David Sherwood  <david.sherwood@arm.com>
24344         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24345         numbers of elements.
24347 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24348             Alan Hayward  <alan.hayward@arm.com>
24349             David Sherwood  <david.sherwood@arm.com>
24351         * match.pd: Cope with polynomial numbers of vector elements.
24353 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24354             Alan Hayward  <alan.hayward@arm.com>
24355             David Sherwood  <david.sherwood@arm.com>
24357         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24358         in a POINTER_PLUS_EXPR.
24360 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24361             Alan Hayward  <alan.hayward@arm.com>
24362             David Sherwood  <david.sherwood@arm.com>
24364         * omp-simd-clone.c (simd_clone_subparts): New function.
24365         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24366         (ipa_simd_modify_function_body): Likewise.
24368 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24369             Alan Hayward  <alan.hayward@arm.com>
24370             David Sherwood  <david.sherwood@arm.com>
24372         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24373         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24374         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24375         (expand_vector_condition, vector_element): Likewise.
24376         (subparts_gt): New function.
24377         (get_compute_type): Use subparts_gt.
24378         (count_type_subparts): Delete.
24379         (expand_vector_operations_1): Use subparts_gt instead of
24380         count_type_subparts.
24382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24383             Alan Hayward  <alan.hayward@arm.com>
24384             David Sherwood  <david.sherwood@arm.com>
24386         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24387         (vect_compile_time_alias): ...this new function.  Do the calculation
24388         on poly_ints rather than trees.
24389         (vect_prune_runtime_alias_test_list): Update call accordingly.
24391 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24392             Alan Hayward  <alan.hayward@arm.com>
24393             David Sherwood  <david.sherwood@arm.com>
24395         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24396         numbers of units.
24397         (vect_schedule_slp_instance): Likewise.
24399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24400             Alan Hayward  <alan.hayward@arm.com>
24401             David Sherwood  <david.sherwood@arm.com>
24403         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24404         constant and extern definitions for variable-length vectors.
24405         (vect_get_constant_vectors): Note that the number of units
24406         is known to be constant.
24408 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24409             Alan Hayward  <alan.hayward@arm.com>
24410             David Sherwood  <david.sherwood@arm.com>
24412         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24413         of units as polynomial.  Choose between WIDE and NARROW based
24414         on multiple_p.
24416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24417             Alan Hayward  <alan.hayward@arm.com>
24418             David Sherwood  <david.sherwood@arm.com>
24420         * tree-vect-stmts.c (simd_clone_subparts): New function.
24421         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24423 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24424             Alan Hayward  <alan.hayward@arm.com>
24425             David Sherwood  <david.sherwood@arm.com>
24427         * tree-vect-stmts.c (vectorizable_call): Treat the number of
24428         vectors as polynomial.  Use build_index_vector for
24429         IFN_GOMP_SIMD_LANE.
24431 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24432             Alan Hayward  <alan.hayward@arm.com>
24433             David Sherwood  <david.sherwood@arm.com>
24435         * tree-vect-stmts.c (get_load_store_type): Treat the number of
24436         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24437         for variable-length vectors.
24438         (vectorizable_mask_load_store): Treat the number of units as
24439         polynomial, asserting that it is constant if the condition has
24440         already been enforced.
24441         (vectorizable_store, vectorizable_load): Likewise.
24443 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24444             Alan Hayward  <alan.hayward@arm.com>
24445             David Sherwood  <david.sherwood@arm.com>
24447         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24448         of units as polynomial.  Punt if we can't tell at compile time
24449         which vector contains the final result.
24451 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24452             Alan Hayward  <alan.hayward@arm.com>
24453             David Sherwood  <david.sherwood@arm.com>
24455         * tree-vect-loop.c (vectorizable_induction): Treat the number
24456         of units as polynomial.  Punt on SLP inductions.  Use an integer
24457         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
24458         cast of such a series for variable-length floating-point
24459         reductions.
24461 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24462             Alan Hayward  <alan.hayward@arm.com>
24463             David Sherwood  <david.sherwood@arm.com>
24465         * tree.h (build_index_vector): Declare.
24466         * tree.c (build_index_vector): New function.
24467         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24468         of units as polynomial, forcibly converting it to a constant if
24469         vectorizable_reduction has already enforced the condition.
24470         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
24471         to create a {1,2,3,...} vector.
24472         (vectorizable_reduction): Treat the number of units as polynomial.
24473         Choose vectype_in based on the largest scalar element size rather
24474         than the smallest number of units.  Enforce the restrictions
24475         relied on above.
24477 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24478             Alan Hayward  <alan.hayward@arm.com>
24479             David Sherwood  <david.sherwood@arm.com>
24481         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24482         number of units as polynomial.
24484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24485             Alan Hayward  <alan.hayward@arm.com>
24486             David Sherwood  <david.sherwood@arm.com>
24488         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24489         * target.def (autovectorize_vector_sizes): Return the vector sizes
24490         by pointer, using vector_sizes rather than a bitmask.
24491         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24492         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24493         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24494         Likewise.
24495         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24496         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24497         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24498         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24499         * omp-general.c (omp_max_vf): Likewise.
24500         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24501         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24502         * tree-vect-loop.c (vect_analyze_loop): Likewise.
24503         * tree-vect-slp.c (vect_slp_bb): Likewise.
24504         * doc/tm.texi: Regenerate.
24505         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24506         to a poly_uint64.
24507         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24508         the vector size as a poly_uint64 rather than an unsigned int.
24509         (current_vector_size): Change from an unsigned int to a poly_uint64.
24510         (get_vectype_for_scalar_type): Update accordingly.
24511         * tree.h (build_truth_vector_type): Take the size and number of
24512         units as a poly_uint64 rather than an unsigned int.
24513         (build_vector_type): Add a temporary overload that takes
24514         the number of units as a poly_uint64 rather than an unsigned int.
24515         * tree.c (make_vector_type): Likewise.
24516         (build_truth_vector_type): Take the number of units as a poly_uint64
24517         rather than an unsigned int.
24519 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24520             Alan Hayward  <alan.hayward@arm.com>
24521             David Sherwood  <david.sherwood@arm.com>
24523         * target.def (get_mask_mode): Take the number of units and length
24524         as poly_uint64s rather than unsigned ints.
24525         * targhooks.h (default_get_mask_mode): Update accordingly.
24526         * targhooks.c (default_get_mask_mode): Likewise.
24527         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24528         * doc/tm.texi: Regenerate.
24530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24531             Alan Hayward  <alan.hayward@arm.com>
24532             David Sherwood  <david.sherwood@arm.com>
24534         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24535         * omp-general.c (omp_max_vf): Likewise.
24536         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24537         (expand_omp_simd): Handle polynomial safelen.
24538         * omp-low.c (omplow_simd_context): Add a default constructor.
24539         (omplow_simd_context::max_vf): Change from int to poly_uint64.
24540         (lower_rec_simd_input_clauses): Update accordingly.
24541         (lower_rec_input_clauses): Likewise.
24543 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24544             Alan Hayward  <alan.hayward@arm.com>
24545             David Sherwood  <david.sherwood@arm.com>
24547         * tree-vectorizer.h (vect_nunits_for_cost): New function.
24548         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24549         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24550         (vect_analyze_slp_cost): Likewise.
24551         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24552         (vect_model_load_cost): Likewise.
24554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24555             Alan Hayward  <alan.hayward@arm.com>
24556             David Sherwood  <david.sherwood@arm.com>
24558         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24559         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24560         from an unsigned int * to a poly_uint64_pod *.
24561         (calculate_unrolling_factor): New function.
24562         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
24564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24565             Alan Hayward  <alan.hayward@arm.com>
24566             David Sherwood  <david.sherwood@arm.com>
24568         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24569         from an unsigned int to a poly_uint64.
24570         (_loop_vec_info::slp_unrolling_factor): Likewise.
24571         (_loop_vec_info::vectorization_factor): Change from an int
24572         to a poly_uint64.
24573         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24574         (vect_get_num_vectors): New function.
24575         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24576         (vect_get_num_copies): Use vect_get_num_vectors.
24577         (vect_analyze_data_ref_dependences): Change max_vf from an int *
24578         to an unsigned int *.
24579         (vect_analyze_data_refs): Change min_vf from an int * to a
24580         poly_uint64 *.
24581         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24582         than an unsigned HOST_WIDE_INT.
24583         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24584         (vect_analyze_data_ref_dependence): Change max_vf from an int *
24585         to an unsigned int *.
24586         (vect_analyze_data_ref_dependences): Likewise.
24587         (vect_compute_data_ref_alignment): Handle polynomial vf.
24588         (vect_enhance_data_refs_alignment): Likewise.
24589         (vect_prune_runtime_alias_test_list): Likewise.
24590         (vect_shift_permute_load_chain): Likewise.
24591         (vect_supportable_dr_alignment): Likewise.
24592         (dependence_distance_ge_vf): Take the vectorization factor as a
24593         poly_uint64 rather than an unsigned HOST_WIDE_INT.
24594         (vect_analyze_data_refs): Change min_vf from an int * to a
24595         poly_uint64 *.
24596         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24597         vfm1 as a poly_uint64 rather than an int.  Make the same change
24598         for the returned bound_scalar.
24599         (vect_gen_vector_loop_niters): Handle polynomial vf.
24600         (vect_do_peeling): Likewise.  Update call to
24601         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24602         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24603         be constant.
24604         * tree-vect-loop.c (vect_determine_vectorization_factor)
24605         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24606         (vect_get_known_peeling_cost): Likewise.
24607         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24608         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24609         (vect_transform_loop): Likewise.  Use the lowest possible VF when
24610         updating the upper bounds of the loop.
24611         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
24612         rather than an int.
24613         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24614         polynomial unroll factors.
24615         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24616         (vect_make_slp_decision): Likewise.
24617         (vect_supported_load_permutation_p): Likewise, and polynomial
24618         vf too.
24619         (vect_analyze_slp_cost): Handle polynomial vf.
24620         (vect_slp_analyze_node_operations): Likewise.
24621         (vect_slp_analyze_bb_1): Likewise.
24622         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24623         than an unsigned HOST_WIDE_INT.
24624         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24625         (vectorizable_load): Handle polynomial vf.
24626         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24627         a poly_uint64.
24628         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24630 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24631             Alan Hayward  <alan.hayward@arm.com>
24632             David Sherwood  <david.sherwood@arm.com>
24634         * match.pd: Handle bit operations involving three constants
24635         and try to fold one pair.
24637 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24639         * tree-vect-loop-manip.c: Include gimple-fold.h.
24640         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24641         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
24642         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24643         Add a path that uses a step of VF instead of 1, but disable it
24644         for now.
24645         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24646         and niters_no_overflow parameters.  Update calls to
24647         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
24648         Create a new SSA name if the latter choses to use a ste other
24649         than zero, and return it via niters_vector_mult_vf_var.
24650         * tree-vect-loop.c (vect_transform_loop): Update calls to
24651         vect_do_peeling, vect_gen_vector_loop_niters and
24652         slpeel_make_loop_iterate_ntimes.
24653         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
24654         (vect_gen_vector_loop_niters): Update declarations after above changes.
24656 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
24658         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
24659         128-bit round to integer instructions.
24660         (ceil<mode>2): Likewise.
24661         (btrunc<mode>2): Likewise.
24662         (round<mode>2): Likewise.
24664 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24666         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
24667         unaligned VSX load/store on P8/P9.
24668         (expand_block_clear): Allow the use of unaligned VSX
24669         load/store on P8/P9.
24671 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24673         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
24674         New function.
24675         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
24676         swap associated with both a load and a store.
24678 2018-01-02  Andrew Waterman  <andrew@sifive.com>
24680         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
24681         * config/riscv/riscv.md (clear_cache): Use it.
24683 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
24685         * web.c: Remove out-of-date comment.
24687 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24689         * expr.c (fixup_args_size_notes): Check that any existing
24690         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
24691         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
24692         (emit_single_push_insn): ...here.
24694 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24696         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
24697         (const_vector_encoded_nelts): New function.
24698         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
24699         (const_vector_int_elt, const_vector_elt): Declare.
24700         * emit-rtl.c (const_vector_int_elt_1): New function.
24701         (const_vector_elt): Likewise.
24702         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
24703         of CONST_VECTOR_ELT.
24705 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24707         * expr.c: Include rtx-vector-builder.h.
24708         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
24709         directly on the tree encoding.
24710         (const_vector_from_tree): Likewise.
24711         * optabs.c: Include rtx-vector-builder.h.
24712         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
24713         sequence of "u" values.
24714         * vec-perm-indices.c: Include rtx-vector-builder.h.
24715         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
24716         directly on the vec_perm_indices encoding.
24718 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24720         * doc/rtl.texi (const_vector): Describe new encoding scheme.
24721         * Makefile.in (OBJS): Add rtx-vector-builder.o.
24722         * rtx-vector-builder.h: New file.
24723         * rtx-vector-builder.c: Likewise.
24724         * rtl.h (rtx_def::u2): Add a const_vector field.
24725         (CONST_VECTOR_NPATTERNS): New macro.
24726         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
24727         (CONST_VECTOR_DUPLICATE_P): Likewise.
24728         (CONST_VECTOR_STEPPED_P): Likewise.
24729         (CONST_VECTOR_ENCODED_ELT): Likewise.
24730         (const_vec_duplicate_p): Check for a duplicated vector encoding.
24731         (unwrap_const_vec_duplicate): Likewise.
24732         (const_vec_series_p): Check for a non-duplicated vector encoding.
24733         Say that the function only returns true for integer vectors.
24734         * emit-rtl.c: Include rtx-vector-builder.h.
24735         (gen_const_vec_duplicate_1): Delete.
24736         (gen_const_vector): Call gen_const_vec_duplicate instead of
24737         gen_const_vec_duplicate_1.
24738         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
24739         (gen_const_vec_duplicate): Use rtx_vector_builder.
24740         (gen_const_vec_series): Likewise.
24741         (gen_rtx_CONST_VECTOR): Likewise.
24742         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
24743         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24744         Build a new vector rather than modifying a CONST_VECTOR in-place.
24745         (handle_special_swappables): Update call accordingly.
24746         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
24747         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
24748         Build a new vector rather than modifying a CONST_VECTOR in-place.
24749         (handle_special_swappables): Update call accordingly.
24751 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24753         * simplify-rtx.c (simplify_const_binary_operation): Use
24754         CONST_VECTOR_ELT instead of XVECEXP.
24756 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24758         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
24759         the selector elements to be different from the data elements
24760         if the selector is a VECTOR_CST.
24761         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
24762         ssizetype for the selector.
24764 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24766         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
24767         before testing each element individually.
24768         * tree-vect-generic.c (lower_vec_perm): Likewise.
24770 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24772         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
24773         * selftest-run-tests.c (selftest::run_tests): Call it.
24774         * vector-builder.h (vector_builder::operator ==): New function.
24775         (vector_builder::operator !=): Likewise.
24776         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
24777         (vec_perm_indices::all_from_input_p): New function.
24778         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24779         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
24780         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
24781         instead of reading the VECTOR_CST directly.  Detect whether both
24782         vector inputs are the same before constructing the vec_perm_indices,
24783         and update the number of inputs argument accordingly.  Use the
24784         utility functions added above.  Only construct sel2 if we need to.
24786 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24788         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
24789         the broadcast of the low byte.
24790         (expand_mult_highpart): Use an explicit encoding for the permutes.
24791         * optabs-query.c (can_mult_highpart_p): Likewise.
24792         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
24793         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24794         (vectorizable_bswap): Likewise.
24795         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
24796         explicit encoding for the power-of-2 permutes.
24797         (vect_permute_store_chain): Likewise.
24798         (vect_grouped_load_supported): Likewise.
24799         (vect_permute_load_chain): Likewise.
24801 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24803         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
24804         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
24805         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
24806         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24807         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
24808         (vect_gen_perm_mask_any): Likewise.
24810 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24812         * int-vector-builder.h: New file.
24813         * vec-perm-indices.h: Include int-vector-builder.h.
24814         (vec_perm_indices): Redefine as an int_vector_builder.
24815         (auto_vec_perm_indices): Delete.
24816         (vec_perm_builder): Redefine as a stand-alone class.
24817         (vec_perm_indices::vec_perm_indices): New function.
24818         (vec_perm_indices::clamp): Likewise.
24819         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
24820         (vec_perm_indices::new_vector): New function.
24821         (vec_perm_indices::new_expanded_vector): Update for new
24822         vec_perm_indices class.
24823         (vec_perm_indices::rotate_inputs): New function.
24824         (vec_perm_indices::all_in_range_p): Operate directly on the
24825         encoded form, without computing elided elements.
24826         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
24827         encoding.  Update for new vec_perm_indices class.
24828         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
24829         the given vec_perm_builder.
24830         (expand_vec_perm_var): Update vec_perm_builder constructor.
24831         (expand_mult_highpart): Use vec_perm_builder instead of
24832         auto_vec_perm_indices.
24833         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
24834         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
24835         or double series encoding as appropriate.
24836         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
24837         vec_perm_indices instead of auto_vec_perm_indices.
24838         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24839         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24840         (vect_permute_store_chain): Likewise.
24841         (vect_grouped_load_supported): Likewise.
24842         (vect_permute_load_chain): Likewise.
24843         (vect_shift_permute_load_chain): Likewise.
24844         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
24845         (vect_transform_slp_perm_load): Likewise.
24846         (vect_schedule_slp_instance): Likewise.
24847         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24848         (vectorizable_mask_load_store): Likewise.
24849         (vectorizable_bswap): Likewise.
24850         (vectorizable_store): Likewise.
24851         (vectorizable_load): Likewise.
24852         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
24853         vec_perm_indices instead of auto_vec_perm_indices.  Use
24854         tree_to_vec_perm_builder to read the vector from a tree.
24855         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
24856         vec_perm_builder instead of a vec_perm_indices.
24857         (have_whole_vector_shift): Use vec_perm_builder and
24858         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
24859         truncation to calc_vec_perm_mask_for_shift.
24860         (vect_create_epilog_for_reduction): Likewise.
24861         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
24862         from auto_vec_perm_indices to vec_perm_indices.
24863         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24864         instead of changing individual elements.
24865         (aarch64_vectorize_vec_perm_const): Use new_vector to install
24866         the vector in d.perm.
24867         * config/arm/arm.c (expand_vec_perm_d::perm): Change
24868         from auto_vec_perm_indices to vec_perm_indices.
24869         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
24870         instead of changing individual elements.
24871         (arm_vectorize_vec_perm_const): Use new_vector to install
24872         the vector in d.perm.
24873         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
24874         Update vec_perm_builder constructor.
24875         (rs6000_expand_interleave): Likewise.
24876         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
24877         (rs6000_expand_interleave): Likewise.
24879 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24881         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
24882         to qimode could truncate the indices.
24883         * optabs.c (expand_vec_perm_var): Likewise.
24885 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
24887         * Makefile.in (OBJS): Add vec-perm-indices.o.
24888         * vec-perm-indices.h: New file.
24889         * vec-perm-indices.c: Likewise.
24890         * target.h (vec_perm_indices): Replace with a forward class
24891         declaration.
24892         (auto_vec_perm_indices): Move to vec-perm-indices.h.
24893         * optabs.h: Include vec-perm-indices.h.
24894         (expand_vec_perm): Delete.
24895         (selector_fits_mode_p, expand_vec_perm_var): Declare.
24896         (expand_vec_perm_const): Declare.
24897         * target.def (vec_perm_const_ok): Replace with...
24898         (vec_perm_const): ...this new hook.
24899         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
24900         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
24901         * doc/tm.texi: Regenerate.
24902         * optabs.def (vec_perm_const): Delete.
24903         * doc/md.texi (vec_perm_const): Likewise.
24904         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
24905         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
24906         expand_vec_perm for constant permutation vectors.  Assert that
24907         the mode of variable permutation vectors is the integer equivalent
24908         of the mode that is being permuted.
24909         * optabs-query.h (selector_fits_mode_p): Declare.
24910         * optabs-query.c: Include vec-perm-indices.h.
24911         (selector_fits_mode_p): New function.
24912         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
24913         is defined, instead of checking whether the vec_perm_const_optab
24914         exists.  Use targetm.vectorize.vec_perm_const instead of
24915         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
24916         fit in the vector mode before using a variable permute.
24917         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
24918         vec_perm_indices instead of an rtx.
24919         (expand_vec_perm): Replace with...
24920         (expand_vec_perm_const): ...this new function.  Take the selector
24921         as a vec_perm_indices rather than an rtx.  Also take the mode of
24922         the selector.  Update call to shift_amt_for_vec_perm_mask.
24923         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
24924         Use vec_perm_indices::new_expanded_vector to expand the original
24925         selector into bytes.  Check whether the indices fit in the vector
24926         mode before using a variable permute.
24927         (expand_vec_perm_var): Make global.
24928         (expand_mult_highpart): Use expand_vec_perm_const.
24929         * fold-const.c: Includes vec-perm-indices.h.
24930         * tree-ssa-forwprop.c: Likewise.
24931         * tree-vect-data-refs.c: Likewise.
24932         * tree-vect-generic.c: Likewise.
24933         * tree-vect-loop.c: Likewise.
24934         * tree-vect-slp.c: Likewise.
24935         * tree-vect-stmts.c: Likewise.
24936         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
24937         Delete.
24938         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
24939         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
24940         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
24941         (aarch64_vectorize_vec_perm_const): ...this new function.
24942         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24943         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24944         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
24945         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
24946         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24947         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24948         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
24949         into...
24950         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
24951         check for NEON modes.
24952         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
24953         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
24954         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
24955         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
24956         into...
24957         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
24958         the old VEC_PERM_CONST conditions.
24959         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
24960         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
24961         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
24962         (ia64_vectorize_vec_perm_const_ok): Merge into...
24963         (ia64_vectorize_vec_perm_const): ...this new function.
24964         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
24965         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
24966         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
24967         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
24968         * config/mips/mips.c (mips_expand_vec_perm_const)
24969         (mips_vectorize_vec_perm_const_ok): Merge into...
24970         (mips_vectorize_vec_perm_const): ...this new function.
24971         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
24972         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
24973         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
24974         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
24975         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
24976         (rs6000_expand_vec_perm_const): Delete.
24977         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
24978         Delete.
24979         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24980         (altivec_expand_vec_perm_const_le): Take each operand individually.
24981         Operate on constant selectors rather than rtxes.
24982         (altivec_expand_vec_perm_const): Likewise.  Update call to
24983         altivec_expand_vec_perm_const_le.
24984         (rs6000_expand_vec_perm_const): Delete.
24985         (rs6000_vectorize_vec_perm_const_ok): Delete.
24986         (rs6000_vectorize_vec_perm_const): New function.
24987         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
24988         an element count and rtx array.
24989         (rs6000_expand_extract_even): Update call accordingly.
24990         (rs6000_expand_interleave): Likewise.
24991         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
24992         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
24993         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
24994         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
24995         (rs6000_expand_vec_perm_const): Delete.
24996         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
24997         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
24998         (altivec_expand_vec_perm_const_le): Take each operand individually.
24999         Operate on constant selectors rather than rtxes.
25000         (altivec_expand_vec_perm_const): Likewise.  Update call to
25001         altivec_expand_vec_perm_const_le.
25002         (rs6000_expand_vec_perm_const): Delete.
25003         (rs6000_vectorize_vec_perm_const_ok): Delete.
25004         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
25005         reference to the SPE evmerge intructions.
25006         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25007         an element count and rtx array.
25008         (rs6000_expand_extract_even): Update call accordingly.
25009         (rs6000_expand_interleave): Likewise.
25010         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25011         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25012         new function.
25013         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25015 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25017         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25018         vector mode and that that mode matches the mode of the data
25019         being permuted.
25020         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25021         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
25022         directly using expand_vec_perm_1 when forcing selectors into
25023         registers.
25024         (expand_vec_perm_var): New function, split out from expand_vec_perm.
25026 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25028         * optabs-query.h (can_vec_perm_p): Delete.
25029         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25030         * optabs-query.c (can_vec_perm_p): Split into...
25031         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25032         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25033         particular selector is valid.
25034         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25035         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25036         (vect_grouped_load_supported): Likewise.
25037         (vect_shift_permute_load_chain): Likewise.
25038         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25039         (vect_transform_slp_perm_load): Likewise.
25040         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25041         (vectorizable_bswap): Likewise.
25042         (vect_gen_perm_mask_checked): Likewise.
25043         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
25044         implementations of variable permutation vectors into account
25045         when deciding which selector to use.
25046         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25047         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25048         with a false third argument.
25049         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25050         to test whether the constant selector is valid and can_vec_perm_var_p
25051         to test whether a variable selector is valid.
25053 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25055         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25056         * optabs-query.c (can_vec_perm_p): Likewise.
25057         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25058         instead of vec_perm_indices.
25059         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25060         (vect_gen_perm_mask_checked): Likewise,
25061         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25062         (vect_gen_perm_mask_checked): Likewise,
25064 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25066         * optabs-query.h (qimode_for_vec_perm): Declare.
25067         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25068         (qimode_for_vec_perm): ...this new function.
25069         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25071 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25073         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25074         does not have a conditional at the top.
25076 2018-01-02  Richard Biener  <rguenther@suse.de>
25078         * ipa-inline.c (big_speedup_p): Fix expression.
25080 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25082         PR target/81616
25083         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25084         for generic 4->6.
25086 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25088         PR target/81616
25089         Generic tuning.
25090         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25091         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25092         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25093         cond_taken_branch_cost 3->4.
25095 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
25097         PR tree-optimization/83581
25098         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25099         TODO_cleanup_cfg if any changes have been made.
25101         PR middle-end/83608
25102         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25103         convert_modes if target mode has the right side, but different mode
25104         class.
25106         PR middle-end/83609
25107         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25108         last argument when extracting from CONCAT.  If either from_real or
25109         from_imag is NULL, use expansion through memory.  If result is not
25110         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25111         the parts directly to inner mode, if even that fails, use expansion
25112         through memory.
25114         PR middle-end/83623
25115         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25116         check for bswap in mode rather than HImode and use that in expand_unop
25117         too.
25119 Copyright (C) 2018 Free Software Foundation, Inc.
25121 Copying and distribution of this file, with or without modification,
25122 are permitted in any medium without royalty provided the copyright
25123 notice and this notice are preserved.