[AArch64] Improve LDP/STP generation that requires a base register
[official-gcc.git] / gcc / ChangeLog
blob9b89baa67320d13d5c8adccf1b3b01d04bd2ebb3
1 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
3         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
4         (aarch64_ldrstr_offset_compare): New.
5         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6         load/store orderings.
7         (aarch64_gen_adjusted_ldpstp): Likewise.
9 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
11         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
12         Check for subset of GENERAL_REGS and FP_REGS.
13         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
14         r=w alternative.
16 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
18         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
19         and wi::to_poly_offset.  Add the current offset and then check
20         whether the sum fits, rather than using an unchecked addition of
21         a checked term.  Check for a shwi rather than a uhwi.
22         * expr.c (get_bit_range): Use tree_to_poly_uint64.
23         (store_constructor): Use poly_int_tree_p.
24         (expand_expr_real_1): Likewise.
25         * function.c (assign_temp): Likewise.
26         * fold-const.c (const_binop): Use poly_int_tree_p and
27         wi::to_poly_offset.
28         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
29         division.
30         * ipa-icf-gimple.c (func_checker::compare_operand): Use
31         to_poly_offset for MEM offsets.
32         * ipa-icf.c (sem_variable::equals): Likewise.
33         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
34         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
35         wi::to_poly_offset for BIT_FIELD_REF offsets.
36         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
37         wi::to_poly_offset.
38         * var-tracking.c (emit_note_insn_var_location): Use
39         tree_to_poly_uint64.
41 2018-05-29  Jim Wilson  <jimw@sifive.com>
43         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
45 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
47         PR target/85950
48         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
49         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
50         sequence.
51         (sse4_1_round<mode>2): Use nonimmediate_operand
52         for operand 1 predicate.
54 2018-05-29  Martin Sebor  <msebor@redhat.com>
55             Richard Biener  <rguenther@suse.de>
57         PR testsuite/85888
58         * calls.c (get_size_range): Call determine_value_range instead
59         of get_value_range..
60         * tree-vrp.h (determine_value_range): Declared new function.
61         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
63 2018-05-29  Richard Biener  <rguenther@suse.de>
65         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
66         sure to use non-pattern stmts for get_earlier_stmt arguments.
67         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
68         called on pattern stmts.
69         (get_later_stmt): Likewise.
71 2018-05-29  Martin Liska  <mliska@suse.cz>
73         PR gcov-profile/85759
74         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
75         env variables.
77 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
79         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
80         VEC_UNPACK_*_EXPR.
81         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
82         VEC_PACK_*_EXPR.
84         PR target/85918
85         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
86         VEC_PACK_FLOAT_EXPR): New tree codes.
87         * tree-pretty-print.c (op_code_prio): Handle
88         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
89         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
90         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
91         * tree-inline.c (estimate_operator_cost): Likewise.
92         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
93         * fold-const.c (const_binop): Likewise.
94         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
95         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
96         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
97         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
98         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
99         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
100         * expr.c (expand_expr_real_2): Likewise.
101         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
102         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
103         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
104         optabs.
105         * optabs.c (expand_widen_pattern_expr): For
106         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
107         sign from result type rather than operand's type.
108         (expand_binop_directly): For vec_packu_float_optab and
109         vec_packs_float_optab allow result type to be different from operand's
110         type.
111         * optabs-tree.c (optab_for_tree_code): Handle
112         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
113         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
114         * tree-vect-generic.c (expand_vector_operations_1):  Handle
115         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
116         VEC_PACK_FLOAT_EXPR.
117         * tree-vect-stmts.c (supportable_widening_operation): Handle
118         FIX_TRUNC_EXPR.
119         (supportable_narrowing_operation): Handle FLOAT_EXPR.
120         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
121         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
122         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
123         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
124         mode attributes.
125         (vec_pack<floatprefix>_float_<mode>): New expander.
126         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
127         attributes.
128         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
129         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
130         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
131         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
132         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
133         Document.
134         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
135         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
136         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
137         VEC_PACK_FLOAT_EXPR): Document.
139 2018-05-29  Richard Biener  <rguenther@suse.de>
141         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
142         member.
143         (stmt_vec_info_vec): Make pointer.
144         (init_stmt_vec_info_vec): Remove.
145         (free_stmt_vec_info_vec): Likewise.
146         (set_stmt_vec_info_vec): New function.
147         (free_stmt_vec_infos): Likewise.
148         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
149         (set_vinfo_for_stmt): Likewise.
150         (get_earlier_stmt): Likewise.
151         (get_later_stmt): Likewise.
152         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
153         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
154         (vec_info::~vec_info): Free stmt_vec_infos.
155         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
156         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
157         (pass_slp_vectorize::execute): Likewise.
158         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
159         (free_stmt_vec_info_vec): Likewise.
160         (set_stmt_vec_info_vec): New function.
161         (free_stmt_vec_infos): Likewise.
162         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
163         the global stmt_vec_info_vec.
164         * tree-parloops.c (gather_scalar_reductions): Use
165         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
166         vector.
168 2018-05-29  Richard Biener  <rguenther@suse.de>
170         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
172 2018-05-29  Martin Liska  <mliska@suse.cz>
173             David Malcolm  <dmalcolm@redhat.com>
175         * vec.c (test_reverse): New.
176         (vec_c_tests): Add new test.
177         * vec.h (vl_ptr>::reverse): New function.
179 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
181         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
183         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
184         and later.
186 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
188         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
190 2018-05-28  Richard Biener  <rguenther@suse.de>
192         PR tree-optimization/85933
193         * tree-vect-data-refs.c (vect_record_base_alignments): Only
194         look at stmts marked as vectorizable.
196 2018-05-28  Richard Biener  <rguenther@suse.de>
198         PR tree-optimization/85934
199         * tree-vect-generic.c (expand_vector_operations_1): Hoist
200         vector boolean check before scalar optimization.
202 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
204         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
205         for armv5te.
207 2018-05-28  Mark Wielaard  <mark@klomp.org>
209         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
210         if it is an expression containing a minus sign.
212 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
214         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
216 2018-05-27  Paul Koning  <ni1d@arrl.net>
218         * config/pdp11/pdp11.md (truncsihi2): Remove.
220 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
221             Chung-Ju Wu  <jasonwucj@gmail.com>
223         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
224         implementation.
225         (unaligned_store_dw): Ditto.
226         * config/nds32/nds32-memory-manipulation.c
227         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
228         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
229         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
230         (emit_setmem_word_loop): Rename to ...
231         (emit_setmem_doubleword_loop): ... this.
232         (nds32_gen_dup_4_byte_to_word_value): New function.
233         (nds32_gen_dup_8_byte_to_double_word_value): New function.
234         (nds32_expand_setmem_loop): Refine implementation.
235         (nds32_expand_setmem_loop_v3m): Ditto.
236         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
237         pattern.
239 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
241         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
243 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
245         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
246         (nds32_init_machine_status): Initialize machine->attr_naked_p and
247         machine->attr_no_prologue_p.
248         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
249         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
250         (nds32_expand_epilogue): Consider attr_naked_p.
251         (nds32_expand_epilogue_v3pop): Likewise.
252         (nds32_can_use_return_insn): Likewise.
253         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
254         attr_no_prologue_p fields.
255         * config/nds32/nds32.opt (mret-in-naked-func): New option.
257 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
259         PR target/85918
260         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
261         attributes.
262         * config/i386/sse.md
263         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
264         Rename to ...
265         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
266         ... this.
267         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
268         Rename to ...
269         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
270         ... this.
271         (*<floatsuffix>floatv2div2sf2): Rename to ...
272         (*float<floatunssuffix>v2div2sf2): ... this.
273         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
274         (float<floatunssuffix>v2div2sf2_mask): ... this.
275         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
276         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
277         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
278         to ...
279         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
280         ... this.
281         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
282         Rename to ...
283         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
284         ... this.
285         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
286         Rename to ...
287         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
288         ... this.
289         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
290         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
291         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
292         gen_ufix_truncv8dfv8si2.
293         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
294         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
295         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
296         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
297         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
298         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
299         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
300         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
302 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
304         PR target/85900
305         PR target/85345
306         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
308 2018-05-25  Jim Wilson  <jimw@sifive.com>
310         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
311         * config/riscv/riscv.c (struct machine_function): Add
312         interrupt_handler_p and attribute_checked_p fields.
313         (riscv_attribute_table): Add interrupt.
314         (riscv_interrupt_type_p): New.
315         (riscv_save_reg_p): Save extra regs for interrupt handler.
316         (riscv_use_save_libcall): Return false  for interrupt handler.
317         (riscv_first_stack_step): Add forward declaration.
318         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
319         for interrupt handler with large frame.  Use it for saved reg list.
320         (riscv_expand_prologue): Move flag_stack_usage_info support to
321         eliminate duplication.
322         (riscv_expand_epilogue): Generate mret for interrupt handler.
323         (riscv_epilogue_uses): New.
324         (riscv_can_use_return_insn): Return false for interrupt handler.
325         (riscv_function_ok_for_sibcall): Likewise.
326         (riscv_set_current_function): Add interrupt handler support.
327         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
328         * config/riscv/riscv.md (UNSPECV_MRET): New.
329         (GP_REGNUM): New.
330         (riscv_frflags, riscv_fsflags): Use tab after opcode.
331         (riscv_mret): New.
332         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
334 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
336         PR tree-optimization/85712
337         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
338         this candidate has already been replaced in-situ by a copy.
340 2018-05-25  Jason Merrill  <jason@redhat.com>
342         PR c++/80485 - inline function non-zero address.
343         * symtab.c (nonzero_address): Check DECL_COMDAT.
345 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
347         PR target/83628
348         * config/alpha/alpha.md (ashlsi3): New insn pattern.
349         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
350         extension of SImode operation.  Use const123_operand predicate.
351         (*saddsi_1): Remove.
352         (*saddl_se_1): Ditto.
353         (*ssubsi_1): Ditto.
354         (*ssubl_se_1): Ditto.
355         * config/alpha/predicates.md (const123_operand): New predicate.
356         * config/alpha/constraints.md (P): Use IN_RANGE.
358 2018-05-25  Richard Biener  <rguenther@suse.de>
360         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
361         defaulted to true.
362         (ref_maybe_used_by_stmt_p): Likewise.
363         (stmt_may_clobber_ref_p): Likewise.
364         (stmt_may_clobber_ref_p_1): Likewise.
365         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
366         and pass it along.
367         (ref_maybe_used_by_stmt_p): Likewise.
368         (stmt_may_clobber_ref_p): Likewise.
369         (stmt_may_clobber_ref_p_1): Likewise.
370         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
371         the alias oracle to disambiguate DRs with stmts DR analysis
372         couldn't handle.
373         (vect_analyze_data_refs): Do not give up on not analyzable
374         DRs for BB vectorization.  Remove code truncating the dataref
375         vector.
377 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
379         PR target/85832
380         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
381         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
382         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
384 2018-05-25  Richard Biener  <rguenther@suse.de>
386         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
387         function, combining stmt data ref gathering and fatal analysis
388         parts.
389         (vect_analyze_data_refs): Remove now redudnant code and simplify.
390         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
391         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
392         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
393         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
395 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
397         PR tree-optimization/85720
398         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
399         SCC if all partitions are builtins.
400         (version_loop_by_alias_check): New parameter.  Generate cancelable
401         runtime alias check if all partitions are builtins.
402         (distribute_loop): Update call to above function.
404 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
406         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
407         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
408         (parm_default_def_partition_arg): Ditto.
409         (set_parm_default_def_partition): Ditto.
410         (get_parm_default_def_partitions): Ditto and make it static.
411         (get_undefined_value_partitions): Ditto and make it static.
412         (remove_ssa_form): Refactor call to init_var_map here.
413         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
414         computation for loop region.
415         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
416         (register_default_def): Delete.
417         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
418         (parm_default_def_partition_arg): Ditto.
419         (set_parm_default_def_partition): Ditto.
420         (get_parm_default_def_partitions): Ditto and make it static.
421         (get_undefined_value_partitions): Ditto and make it static.
422         (coalesce_with_default, coalesce_with_default): Update comment.
423         (create_coalesce_list_for_region): New func factored out from
424         create_outofssa_var_map.
425         (populate_coalesce_list_for_outofssa): New func factored out from
426         create_outofssa_var_map and coalesce_ssa_name.
427         (create_outofssa_var_map): Delete.
428         (coalesce_ssa_name): Refactor to support live range computation.
429         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
430         (get_parm_default_def_partitions): Delete.
431         (get_undefined_value_partitions): Ditto.
432         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
433         computation for loop region.
434         (new_tree_live_info, loe_visit_block): Ditto.
435         (live_worklist, set_var_live_on_entry): Ditto.
436         (calculate_live_on_exit, verify_live_on_entry): Ditto.
437         * tree-ssa-live.h (struct _var_map): New fields.
438         (init_var_map): Change decl.
439         (region_contains_p): New.
441 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
443         * tree-ssa-live.h (live_merge_and_clear): Delete.
445 2018-05-25  Richard Biener  <rguenther@suse.de>
447         PR c++/85912
448         * tree-dump.c (dequeue_and_dump): Remove access to removed
449         operand 2 of a SWITCH_EXPR.
451 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
453         * doc/sourcebuild.texi (vect_double_cond_arith): Include
454         multiplication and division.
455         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
456         (cond_udiv@var{m}, cond_umod@var{m}): Document.
457         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
458         (cond_udiv_optab, cond_umod_optab): New optabs.
459         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
460         (IFN_COND_RDIV): New internal functions.
461         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
462         TRUNC_MOD_EXPR and RDIV_EXPR.
463         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
464         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
465         New unspecs.
466         (SVE_INT_BINARY): Include mult.
467         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
468         (optab, sve_int_op): Handle mult.
469         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
470         UNSPEC_COND_DIV.
471         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
472         for SVE_INT_BINARY_SD.
474 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
476         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
477         (optab, sve_int_op): Handle div and udiv.
478         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
479         for SVE_INT_BINARY_SD.
480         (*<optab><mode>3): New insn for the same.
482 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
484         * tree-vect-patterns.c: Include predict.h.
485         (vect_recog_divmod_pattern): Restrict check for division support
486         to when optimizing for size.
488 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
490         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
491         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
492         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
493         (gimple_match_op::set_op): Likewise.
494         (gimple_resimplify4): Declare.
495         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
496         (expr::gen_transform): Likewise.
497         (decision_tree::gen): Generate a simplification routine for 4 operands.
498         * gimple-match-head.c (gimple_simplify): Add an overload for
499         4 operands.  In the top-level function, handle up to 4 call
500         arguments and call gimple_resimplify4.
501         (gimple_resimplify4): New function.
502         (build_call_internal): Pass a fourth operand.
503         (maybe_push_to_seq): Likewise.
504         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
505         Fold VEC_COND_EXPRs of an operation and a default value into
506         an IFN_COND_* function if possible.
507         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
508         New unspecs.
509         (SVE_COND_FP_BINARY): Include them.
510         (optab, sve_fp_op): Handle them.
511         (SVE_INT_BINARY_REV): New code iterator.
512         (SVE_COND_FP_BINARY_REV): New int iterator.
513         (commutative): New int attribute.
514         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
515         Declare.
516         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
517         function.
518         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
519         (*cond_<optab><mode>): New patterns for reversed operands.
521 2018-05-25  Richard Biener  <rguenther@suse.de>
523         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
524         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
525         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
526         (STMT_VINFO_GROUPED_ACCESS): Adjust.
527         * tree-vect-data-refs.c (everywhere): Adjust users.
528         * tree-vect-loop.c (everywhere): Likewise.
529         * tree-vect-slp.c (everywhere): Likewise.
530         * tree-vect-stmts.c (everywhere): Likewise.
531         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
533 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
535         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
536         Rename to...
537         (gcc_cv_as_section_exclude): ... this.
538         Try Solaris as #exclude syntax.
539         * configure: Regenerate.
540         * config.in: Regenerate.
541         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
542         SECTION_EXCLUDE.
543         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
544         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
546         * varasm.c (default_elf_asm_named_section): Don't check if
547         HAVE_GAS_SECTION_EXCLUDE is defined.
549 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
551         * doc/md.texi: Update the documentation of the cond_* optabs
552         to mention the new final operand.  Fix GET_MODE_NUNITS call.
553         Describe the scalar case too.
554         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
555         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
556         instead of 2.
557         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
558         (get_conditional_internal_fn): Update comment.
559         * tree-vect-loop.c (vectorizable_reduction): Pass the original
560         accumulator value as a final argument to conditional functions.
561         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
562         a define_expand and add an "else" operand.  Assert for now that
563         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
564         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
565         (*cond_<optab><mode>): New patterns.
566         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
567         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
568         (UNSPEC_COND_EOR): Delete.
569         (optab): Remove associated mappings.
570         (SVE_INT_BINARY): New code iterator.
571         (sve_int_op): Remove int attribute and add "minus" to the code
572         attribute.
573         (SVE_COND_INT_OP): Delete.
574         (SVE_COND_FP_OP): Rename to...
575         (SVE_COND_FP_BINARY): ...this.
577 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
579         * optabs.c (can_reuse_operands_p): New function.
580         (maybe_legitimize_operands): Try to reuse the results for
581         earlier operands.
583 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
585         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
586         Add {q} suffix to insn mnemonic.
588 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
590         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
591         (msp430_warn_func_return): New.
593 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
595         * fold-const.c (tree_nonzero_bits): New function.
596         * fold-const.h (tree_nonzero_bits): Likewise.
597         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
598         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
600 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
602         PR target/85900
603         PR target/85345
604         * varasm.c (assemble_alias): Check ifunc_resolver only on
605         FUNCTION_DECL.
607 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
609         PR target/85903
610         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
611         when memory input operand is handled.
613 2018-05-24  Luis Machado  <luis.machado@linaro.org>
615         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
616         global.
617         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
619 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
621         * match.pd: Delay FMA folds until after vectorization.
623 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
625         PR target/83009
626         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
627         address check not strict.
629 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
631         * gimple-match.h (gimple_match_op): New class.
632         (mprts_hook): Replace parameters with a gimple_match_op *.
633         (maybe_build_generic_op): Likewise.
634         (gimple_simplified_result_is_gimple_val): Replace parameters with
635         a const gimple_match_op *.
636         (gimple_simplify): Replace code_helper * and tree * parameters with
637         a gimple_match_op * parameter.
638         (gimple_resimplify1): Replace code_helper *, tree and tree *
639         parameters with a gimple_match_op * parameter.
640         (gimple_resimplify2): Likewise.
641         (gimple_resimplify3): Likewise.
642         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
643         parameters with a gimple_match_op * parameter.
644         * gimple-match-head.c (gimple_simplify): Change prototypes of
645         auto-generated functions to take a gimple_match_op * instead of
646         separate code_helper * and tree * parameters.  Make the same
647         change in the top-level overload and update calls to the
648         gimple_resimplify routines.  Update calls to the auto-generated
649         functions and to maybe_push_res_to_seq in the publicly-facing
650         operation-specific gimple_simplify overloads.
651         (gimple_match_op::MAX_NUM_OPS): Define.
652         (gimple_resimplify1): Replace rcode and ops with a single res_op
653         parameter.  Update call to gimple_simplify.
654         (gimple_resimplify2): Likewise.
655         (gimple_resimplify3): Likewise.
656         (mprts_hook): Replace parameters with a gimple_match_op *.
657         (maybe_build_generic_op): Likewise.
658         (build_call_internal): Replace type, nargs and ops with
659         a gimple_match_op *.
660         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
661         with a single gimple_match_op *.  Update calls to mprts_hook,
662         build_call_internal and gimple_simplified_result_is_gimple_val.
663         Factor out code that is common to the tree_code and combined_fn cases.
664         * genmatch.c (expr::gen_transform): Replace tem_code and
665         tem_ops with a gimple_match_op called tem_op.  Update calls
666         to the gimple_resimplify functions and maybe_push_res_to_seq.
667         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
668         res_ops.  Update call to the gimple_resimplify functions.
669         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
670         (decision_tree::gen): Make the functions take a gimple_match_op *
671         called res_op instead of separate res_code and res_ops parameters.
672         Update call accordingly.
673         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
674         and ops with a single res_op parameter.  Update calls to
675         maybe_build_generic_op and maybe_push_res_to_seq.
676         (fold_stmt_1): Update calls to gimple_simplify and
677         replace_stmt_with_simplification.
678         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
679         and gimple_simplified_result_is_gimple_val.
680         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
681         gimple_simplify.
682         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
683         with a gimple_match_op *.
684         (vn_nary_build_or_lookup): Likewise.  Update call to
685         vn_nary_build_or_lookup_1.
686         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
687         gimple_match_op *.  Update calls to the gimple_resimplify routines
688         and to gimple_simplified_result_is_gimple_val.
689         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
690         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
691         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
692         (visit_nary_op): Likewise.
693         (visit_reference_op_load): Likewise.
695 2018-05-23  Luis Machado  <luis.machado@linaro.org>
697         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
698         modifier for printing the step amount.
700 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
702         PR target/78849
703         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
704         types.
706 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
708         * doc/sourcebuild.texi (Endianness): New subsubsection.
710 2018-05-23  Luis Machado  <luis.machado@linaro.org>
712         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
713         <prefetch_dynamic_strides>: New const bool field.
714         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
715         prefetch_dynamic_strides.
716         (exynosm1_prefetch_tune): Likewise.
717         (thunderxt88_prefetch_tune): Likewise.
718         (thunderx_prefetch_tune): Likewise.
719         (thunderx2t99_prefetch_tune): Likewise.
720         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
721         false.
722         (aarch64_override_options_internal): Update to set
723         PARAM_PREFETCH_DYNAMIC_STRIDES.
724         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
725         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
726         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
727         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
728         prefetch-dynamic-strides setting.
730 2018-05-23  Luis Machado  <luis.machado@linaro.org>
732         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
733         <minimum_stride>: New const int field.
734         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
735         minimum_stride field defaulting to -1.
736         (exynosm1_prefetch_tune): Likewise.
737         (thunderxt88_prefetch_tune): Likewise.
738         (thunderx_prefetch_tune): Likewise.
739         (thunderx2t99_prefetch_tune): Likewise.
740         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
741         <default_opt_level>: Set to 3.
742         (aarch64_override_options_internal): Update to set
743         PARAM_PREFETCH_MINIMUM_STRIDE.
744         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
745         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
746         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
747         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
748         stride is constant and is below the minimum stride threshold.
750 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
752         * config/arm/arm-cpus.in (mode26): Delete.
753         (armv4): Delete mode26 reference.
754         * config/arm/arm.c (arm_configure_build_target): Delete use of
755         isa_bit_mode26.
757 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
759         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
760         New insn pattern.
761         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
762         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
763         for non-SSE modes.
764         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
765         (floatunsdidf2): Ditto.
767 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
769         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
770         (fixuns_trunc<mode>si2_avx512f): Ditto.
771         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
772         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
773         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
775 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
777         PR rtl-optimization/79985
778         * df-scan.c (df_insn_refs_collect): Remove special case for
779         global registers and asm statements.
781 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
783         * extend.texi (Global Register Variables): Rewrite the bullet list.
784         Note that the register is available for allocation. Note that access
785         via inline asm must use constraints. Add note about async-signal
786         handlers. Remove paragraph about automagic register selection.
788 2018-05-23  Richard Biener  <rguenther@suse.de>
790         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
791         of fixed offset from memset VN.
793 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
795         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
796         first_interp field.
797         (alloc_cand_and_find_basis): Initialize first_interp field.
798         (slsr_process_mul): Modify first_interp field.
799         (slsr_process_add): Likewise.
800         (slsr_process_cast): Modify first_interp field for each new
801         interpretation.
802         (slsr_process_copy): Likewise.
803         (dump_candidate): Dump first_interp field.
804         (replace_mult_candidate): Process all interpretations, not just
805         subsequent ones.
806         (replace_rhs_if_not_dup): Likewise.
807         (replace_one_candidate): Likewise.
809 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
811         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
812         Add new boolean.
813         (aarch64_needs_frame_chain): New function.
814         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
816 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
818         PR target/84882
819         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
820         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
821         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
822         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
823         as true for strict-align.
824         (aarch64_can_inline_p): Perform checks even when callee has no
825         attributes to check for strict alignment.
826         * doc/extend.texi (AArch64 Function Attributes): Document
827         no-strict-align.
828         * doc/invoke.texi: (AArch64 Options): Likewise.
830 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
832         PR tree-optimization/85853
833         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
834         the handling of the root of the node to...
835         (vect_slp_analyze_node_operations_1): ...this new function,
836         and run the whole thing with the child nodes' def types
837         set according to their SLP node's def type.
839 2018-05-23  Richard Biener  <rguenther@suse.de>
841         PR middle-end/85874
842         * tree-data-ref.c (create_runtime_alias_checks): Defer
843         and ignore overflow warnings.
845 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
847         PR tree-optimization/85822
848         * tree-vrp.c (is_masked_range_test): Fix handling of negative
849         constants.
851 2018-05-23  Richard Biener  <rguenther@suse.de>
853         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
854         memset constants via native_interpret_expr.
856 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
858         PR target/85345
859         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
860         attribute.
861         (cgraph_node::create_alias): Likewise.
862         (cgraph_node::get_availability): Check ifunc_resolver instead
863         of looking up ifunc attribute.
864         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
865         * varasm.c (do_assemble_alias): Likewise.
866         (assemble_alias): Likewise.
867         (default_binds_local_p_3): Likewise.
868         * cgraph.h (cgraph_node): Add ifunc_resolver.
869         (cgraph_node::only_called_directly_or_aliased_p): Return false
870         for IFUNC resolver.
871         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
872         attribute.
873         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
874         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
875         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
876         instead of looking up ifunc attribute.
878 2018-05-22  Luis Machado  <luis.machado@linaro.org>
880         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
882 2018-05-22  Martin Sebor  <msebor@redhat.com>
884         PR middle-end/85359
885         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
886         only when expasion succeeds.
887         (expand_builtin_strcmp): Same.
888         (expand_builtin_strncmp): Same.
890 2018-05-22  Martin Sebor  <msebor@redhat.com>
892         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
894 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
895             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
897         * config/aarch64/aarch64-ldpstp.md: Replace uses of
898         aarch64_mem_pair_operand with memory_operand and delete operand swapping
899         code.
900         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
901         Add check for legitimate_address.
902         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
903         (aarch64_swap_ldrstr_operands): New.
904         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
905         Define prototype.
907 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
908             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
910         * config/aarch64/aarch64.md: New patterns to generate stp
911         and ldp.
912         (store_pair_sw, store_pair_dw): New patterns to generate stp for
913         single words and double words.
914         (load_pair_sw, load_pair_dw): Likewise.
915         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
916         Delete.
917         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
918         Delete.
919         * config/aarch64/aarch64-ldpstp.md: Modify peephole
920         for different mode ldpstp and add peephole for merged zero stores.
921         Likewise for loads.
922         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
923         Add size check.
924         (aarch64_gen_store_pair): Rename calls to match new patterns.
925         (aarch64_gen_load_pair): Rename calls to match new patterns.
926         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
927         (load_pair<DREG:mode><DREG2:mode>): ... This.
928         (store_pair<mode>): Rename to...
929         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
930         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
931         New mode iterators.
932         (V_INT_EQUIV): Handle SImode.
933         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
934         New predicate.
936 2018-05-22  Martin Sebor  <msebor@redhat.com>
938         PR c/85623
939         * calls.c (maybe_warn_nonstring_arg): Use string length to set
940         or ajust the presumed bound on an operation to avoid unnecessary
941         warnings.
943 2018-05-22  Martin Sebor  <msebor@redhat.com>
945         PR tree-optimization/85826
946         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
947         assuming that a DECL necesarily has a constant size.
949 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
951         PR middle-end/85862
952         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
954 2018-05-22  Richard Biener  <rguenther@suse.de>
956         PR tree-optimization/85834
957         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
958         non-constant and non-zero memset arguments.
960 2018-05-22  Martin Liska  <mliska@suse.cz>
962         PR ipa/85607
963         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
965 2018-05-22  Richard Biener  <rguenther@suse.de>
967         PR tree-optimization/85863
968         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
969         comparisons when vectype is specified.
970         (vectorizable_condition): Do not specify vectype for
971         vect_is_simple_cond when SLP vectorizing.
973 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
975         PR target/85657
976         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
977         define __ibm128 as long double.
978         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
979         as a distinct type when IEEE 128-bit support is enabled.
980         (init_float128_ieee): Fix up conversions between IFmode and IEEE
981         128-bit types to use the correct functions.
982         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
983         convert between 128-bit floating point types that have different
984         modes but the same representation, instead of using gen_lowpart to
985         makean alias.
986         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
987         KFmode.
988         (IFKF_reg): New attributes to give the register constraints for
989         IFmode and KFmode.
990         (extend<mode>tf2_internal): New insns to mark an explicit
991         conversion between 128-bit floating point types that have a
992         different mode but share the same representation.
994 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
996         PR tree-optimization/85814
997         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
998         a null return from get_strinfo when unsharing the next
999         strinfo in the chain.
1001 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
1003         PR gcc/84923
1004         * varasm.c (weak_finish): Clean up weak_decls.
1006 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1008         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
1009         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
1010         UNSPEC_UADALP values.
1011         * config/aarch64/iterators.md (ABAL): New int iterator.
1012         (ABDL2): Likewise.
1013         (ADALP): Likewise.
1014         (sur): Add mappings for the above.
1015         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
1016         New define_insn.
1017         (aarch64_<sur>abal<mode>_4): Likewise.
1018         (aarch64_<sur>adalp<mode>_3): Likewise.
1019         (<sur>sadv16qi): New define_expand.
1021 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
1023         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
1024         (*movdf_internal): Ditto.
1025         (*rcpsf2_sse): Ditto.
1026         (*rsqrtsf2_sse): Ditto.
1027         (*sqrt<mode>2_sse): Ditto.
1029 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
1031         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
1032         eor3q<mode>4.
1033         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
1034         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
1035         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
1036         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
1037         vbcaxq_s64): New.
1038         * config/aarch64/arm_neon.h: Likewise.
1039         * config/aarch64/iterators.md (VQ_I): New.
1041 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
1043         * config.gcc: Add arc/t-multilib-linux to tmake_file for
1044         arc*-*-linux*.
1045         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
1046         MULTILIB_DIRNAMES
1048 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1050         * config/nds32/constraints.md (S): New constraint.
1051         * config/nds32/nds32.md (call_internal): Use constraint S.
1052         (call_value_internal): Likewise.
1053         (sibcall_internal): Likewise.
1054         (sibcall_value_internal): Likewise.
1056 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1057             Chung-Ju Wu  <jasonwucj@gmail.com>
1059         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
1060         into consideration.
1062 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1063             Chung-Ju Wu  <jasonwucj@gmail.com>
1065         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
1066         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
1067         (nds32_rtx_costs_impl): Simplify.
1068         (nds32_address_cost_impl): Simplify.
1069         (nds32_init_rtx_costs): New function.
1070         (nds32_rtx_costs_speed_prefer): Likewise.
1071         (nds32_rtx_costs_size_prefer): Likewise.
1072         (nds32_address_cost_speed_prefer): Likewise.
1073         (nds32_address_cost_speed_fwprop): Likewise.
1074         (nds32_address_cost_size_prefer): Likewise.
1075         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
1076         * config/nds32/nds32.c (nds32_option_override): Use
1077         nds32_init_rtx_costs function.
1079 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1081         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
1082         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
1083         (TARGET_PIPELINE_N8): Likewise.
1084         (TARGET_PIPELINE_N10): Likewise.
1085         (TARGET_PIPELINE_N13): Likewise.
1086         (TARGET_PIPELINE_GRAYWOLF): Likewise.
1088 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
1090         * config/nds32/nds32-fpu.md: Update copyright year.
1092 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1094         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
1096 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1098         * config/nds32/nds32.c
1099         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
1100         * config/nds32/nds32.opt (minline-asm-r15): New option.
1102 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1104         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
1105         MASK_HW_ABS.
1106         * config/nds32/nds32.md (abssi2): New pattern.
1108 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
1110         * config/i386/i386.md (rex64namesuffix): New mode attribute.
1111         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
1112         Merge insn pattern from sse_cvtsi2ss<round_name> and
1113         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
1114         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
1115         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
1116         using SWI48 mode iterator.
1117         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
1118         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
1119         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
1120         pattern from sse_cvttss2si<round_saeonly_name>
1121         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
1122         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
1123         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
1124         using SWI48 mode iterator.
1125         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
1126         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
1127         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
1128         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
1129         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
1130         using SWI48 mode iterator.
1131         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
1132         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
1133         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
1134         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
1135         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
1136         SWI48 mode iterator.
1137         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
1138         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
1139         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
1140         pattern from sse_cvttsd2si<round_saeonly_name>
1141         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
1143 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1145         * config/nds32/nds32-md-auxiliary.c
1146         (nds32_valid_smw_lwm_base_p): Refine.
1147         (nds32_output_smw_single_word): Refine.
1148         (nds32_output_smw_double_word): New.
1149         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
1151 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1153         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
1154         (nds32_output_stack_pop): Refine.
1155         (nds32_expand_unaligned_load): Refine.
1156         (nds32_expand_unaligned_store): Refine.
1158 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1159             Chung-Ju Wu  <jasonwucj@gmail.com>
1161         * config/nds32/constants.md: Add TP_REGNUM constant.
1162         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
1163         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
1164         UNSPEC_ADD32.
1165         * config/nds32/nds32-doubleword.md: Consider flag_pic.
1166         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
1167         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
1168         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
1169         and PIC code generation.
1170         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
1171         code generation.
1172         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
1173         optimization.
1174         * config/nds32/nds32.md: Support TLS and PIC.
1175         * config/nds32/nds32.c: Support TLS and PIC.
1176         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
1177         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
1178         predicate.
1180 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1182         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
1183         mode with E_ prefix.
1185 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1186             Chung-Ju Wu  <jasonwucj@gmail.com>
1188         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
1189         * config/nds32/nds32-md-auxiliary.c
1190         (symbolic_reference_mentioned_p): New.
1191         (nds32_legitimize_ict_address): New.
1192         (nds32_expand_ict_move): New.
1193         (nds32_indirect_call_referenced_p): New.
1194         (nds32_symbol_binds_local_p): Delete.
1195         (nds32_long_call_p): Modify.
1196         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
1197         * config/nds32/nds32-protos.h
1198         (symbolic_reference_mentioned_p): Declare.
1199         (nds32_legitimize_ict_address): Declare.
1200         (nds32_expand_ict_move): Declare.
1201         (nds32_indirect_call_referenced_p): Declare.
1202         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
1203         (nds32_relax_group): Use nds32_ict_const_p as condition.
1204         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
1205         (nds32_asm_file_start): Output ict_model directive in asm code.
1206         (nds32_legitimate_address_p): Consider indirect call.
1207         (nds32_print_operand): Consider indirect call.
1208         (nds32_print_operand_address): Consider indirect call.
1209         (nds32_insert_attributes): Handle "indirect_call" attribute.
1210         (TARGET_LEGITIMATE_ADDRESS_P): Define.
1211         (TARGET_LEGITIMATE_CONSTANT_P): Define.
1212         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1213         (TARGET_DELEGITIMIZE_ADDRESS): Define.
1214         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
1215         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
1216         (TARGET_ICT_MODEL_SMALL): Define.
1217         (TARGET_ICT_MODEL_LARGE): Define.
1218         * config/nds32/nds32.md (movsi): Consider ict model.
1219         (call, call_value): Consider ict model.
1220         (sibcall, sibcall_value): Consider ict model.
1221         * config/nds32/nds32.opt (mict-model): New option.
1222         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
1223         model.
1225 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
1226             Monk Chiang  <sh.chiang04@gmail.com>
1227             Jim Wilson <jimw@sifive.com>
1229         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
1230         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
1231         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
1232         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
1233         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
1234         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
1235         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
1236         compute save_libcall_adjustment properly.
1237         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
1238         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
1239         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
1240         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
1241         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1242         (ABI_SPEC): Handle mabi=ilp32e.
1243         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1244         (RVE): Add RVE mask.
1245         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1246         <-march>: Add rv32e as an example.
1248 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
1250         PR c++/82899
1251         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1252         (intra_create_variable_infos): Handle C++ constructors.
1254 2018-05-18  Martin Liska  <mliska@suse.cz>
1256         * passes.def: Remove a redundant pass.
1258 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
1260         PR bootstrap/85838
1261         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1263 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1265         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1266         (ARMv4): Update.
1267         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1268         (ARMv6m): Update.
1269         (armv2, armv2a, armv3, armv3m): Delete architectures.
1270         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1271         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1272         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1273         Delete cpus.
1274         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1275         (*mulsidi3adddi): Likewise.
1276         (mulsidi3): Likewise.
1277         (*mulsidi3_nov6): Likewise.
1278         (umulsidi3): Likewise.
1279         (umulsidi3_nov6): Likewise.
1280         (umaddsidi4): Likewise.
1281         (*umulsidi3adddi): Likewise.
1282         (smulsi3_highpart): Likewise.
1283         (*smulsi3_highpart_nov6): Likewise.
1284         (umulsi3_highpart): Likewise.
1285         (*umulsi3_highpart_nov6): Likewise.
1286         * config/arm/arm.h (arm_arch3m): Delete.
1287         * config/arm/arm.c (arm_arch3m): Delete.
1288         (arm_option_override_internal): Update armv3-related comment.
1289         (arm_configure_build_target): Delete use of isa_bit_mode32.
1290         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1291         (arm_rtx_costs_internal): Delete check of arm_arch3m.
1292         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1293         (mulsa3): Likewise.
1294         (mulusa3): Likewise.
1295         * config/arm/arm-protos.h (arm_arch3m): Delete.
1296         * config/arm/arm-tables.opt: Regenerate.
1297         * config/arm/arm-tune.md: Likewise.
1298         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
1299         deleted architectures.
1301 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1303         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
1304         (armv5t, armv5te): New features.
1305         (ARMv5, ARMv5e): Delete fgroups.
1306         (ARMv5t, ARMv5te): Adjust for above changes.
1307         (ARMv6m): Likewise.
1308         (armv5, armv5e): Delete arches.
1309         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
1310         arm_arch5.
1311         (*call_reg_arm): Likewise.
1312         (*call_value_reg_armv5): Likewise.
1313         (*call_value_reg_arm): Likewise.
1314         (*call_symbol): Likewise.
1315         (*call_value_symbol): Likewise.
1316         (*sibcall_insn): Likewise.
1317         (*sibcall_value_insn): Likewise.
1318         (clzsi2): Likewise.
1319         (prefetch): Likewise.
1320         (define_split and define_peephole2 dependent on arm_arch5):
1321         Likewise.
1322         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
1323         arm_arch5e.
1324         (TARGET_ARM_QBIT): Likewise.
1325         (TARGET_DSP_MULTIPLY): Likewise.
1326         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
1327         (arm_arch5, arm_arch5e): Delete.
1328         (arm_arch5t, arm_arch5te): Declare.
1329         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
1330         (arm_arch5t): Declare.
1331         (arm_option_reconfigure_globals): Update for the above.
1332         (arm_options_perform_arch_sanity_checks): Update comment, replace
1333         use of arm_arch5 with arm_arch5t.
1334         (use_return_insn): Likewise.
1335         (arm_emit_call_insn): Likewise.
1336         (output_return_instruction): Likewise.
1337         (arm_final_prescan_insn): Likewise.
1338         (arm_coproc_builtin_available): Likewise.
1339         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
1340         arm_arch5e with arm_arch5t and arm_arch5te.
1341         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
1342         (arm_arch5t, arm_arch5te): Declare.
1343         * config/arm/arm-tables.opt: Regenerate.
1344         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
1345         * config/arm/t-multilib: Likewise.
1346         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
1347         instead of arm_arch5.
1348         (*call_reg_thumb1): Likewise.
1349         (*call_value_reg_thumb1_v5): Likewise.
1350         (*call_value_reg_thumb1): Likewise.
1351         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
1352         unreachable path.
1353         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
1355 2018-05-18  Martin Liska  <mliska@suse.cz>
1357         PR gcov-profile/84846
1358         * doc/gcov.texi: Document -t option of gcov tool.
1360 2018-05-18  Martin Liska  <mliska@suse.cz>
1362         PR gcov-profile/84846
1363         * gcov.c (print_usage): Add new -t option.
1364         (process_args): Handle the option.
1365         (generate_results): Use stdout as output when requested by
1366         the option.
1368 2018-05-18  Martin Liska  <mliska@suse.cz>
1370         PR gcov-profile/84846
1371         * coverage.c (coverage_init): Write PWD to .gcno file.
1372         * doc/gcov.texi: Document how working directory is printed.
1373         * gcov-dump.c (dump_gcov_file): Print PWD.
1374         * gcov.c (output_intermediate_file): Likewise.
1375         (read_graph_file): Read PWD string.
1376         (output_lines): Print PWD.
1378 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1380         PR middle-end/85817
1381         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1382         for retval and return false if all args to phi are zero.        
1384 2018-05-18  Richard Biener  <rguenther@suse.de>
1386         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1387         method.
1388         (evrp_dom_walker::before_dom_children): Call it.
1390 2018-05-18  Richard Biener  <rguenther@suse.de>
1392         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1393         results when processing array refs with variable index.
1395 2018-05-18  Toon Moene  <toon@moene.org>
1397         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1398         directly after that of -floop-interchange. Indicate that both
1399         options are enabled by default when specifying -O3. 
1401 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1403         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1404         iterator.  Delete separate integer-mode vec_set<mode> expander.
1405         (aarch64_simd_vec_setv2di): Delete.
1406         (vec_setv2di): Delete.
1407         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1408         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
1409         the "w, r" alternative.
1411 2018-05-18  Martin Liska  <mliska@suse.cz>
1413         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1414         * tree-pass.h (make_pass_lower_switch_O0): New function.
1415         * tree-switch-conversion.c (node_has_low_bound): Remove.
1416         (node_has_high_bound): Likewise.
1417         (node_is_bounded): Likewise.
1418         (class pass_lower_switch): Make it a template type and create
1419         two instances.
1420         (pass_lower_switch::execute): Add template argument.
1421         (make_pass_lower_switch): New function.
1422         (make_pass_lower_switch_O0): New function.
1423         (do_jump_if_equal): Remove.
1424         (emit_case_nodes): Simplify to just handle all 3 cases and leave
1425         all the hard work to tree optimization passes.
1427 2018-05-18  Martin Liska  <mliska@suse.cz>
1429         * dbgcnt.c (limit_low): Renamed from limit.
1430         (limit_high): New variable.
1431         (dbg_cnt_is_enabled): Check for upper limit.
1432         (dbg_cnt): Adjust dumping.
1433         (dbg_cnt_set_limit_by_index): Add new argument for high
1434         value.
1435         (dbg_cnt_set_limit_by_name): Likewise.
1436         (dbg_cnt_process_single_pair): Parse new format.
1437         (dbg_cnt_process_opt): Use strtok.
1438         (dbg_cnt_list_all_counters): Remove 'value' and add
1439         'limit_high'.
1440         * doc/invoke.texi: Document changes.
1442 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
1444         * doc/sourcebuild.texi (scalar_all_fma): Document.
1445         * tree.def (FMA_EXPR): Delete.
1446         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1447         * internal-fn.c (ternary_direct): New macro.
1448         (expand_ternary_optab_fn): Likewise.
1449         (direct_ternary_optab_supported_p): Likewise.
1450         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1451         * builtins.c (fold_builtin_fma): Delete.
1452         (fold_builtin_3): Don't call it.
1453         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1454         * expr.c (expand_expr_real_2): Likewise.
1455         * fold-const.c (operand_equal_p): Likewise.
1456         (fold_ternary_loc): Likewise.
1457         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1458         * gimple.c (DEFTREECODE): Likewise.
1459         * gimplify.c (gimplify_expr): Likewise.
1460         * optabs-tree.c (optab_for_tree_code): Likewise.
1461         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1462         * tree-eh.c (operation_could_trap_p): Likewise.
1463         (stmt_could_throw_1_p): Likewise.
1464         * tree-inline.c (estimate_operator_cost): Likewise.
1465         * tree-pretty-print.c (dump_generic_node): Likewise.
1466         (op_code_prio): Likewise.
1467         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1468         * tree-ssa-operands.c (get_expr_operands): Likewise.
1469         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1470         * fold-const-call.h (fold_fma): Delete.
1471         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1472         CFN_FNMA and CFN_FNMS.
1473         (fold_fma): Delete.
1474         * genmatch.c (combined_fn): New enum.
1475         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1476         (commutative_op): New function.
1477         (commutate): Use it.  Handle more than 2 operands.
1478         (dt_operand::gen_gimple_expr): Use commutative_op.
1479         (parser::parse_expr): Allow :c to be used with non-binary
1480         operators if the commutative operand is known.
1481         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1482         CFN_FMS, CFN_FNMA and CFN_FNMS.
1483         (backprop::process_assign_use): Remove FMA_EXPR handling.
1484         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1485         (gen_hsa_fma): New function.
1486         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1487         IFN_FNMA and IFN_FNMS.
1488         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1489         * gimple-fold.h (follow_all_ssa_edges): Declare.
1490         * gimple-fold.c (follow_all_ssa_edges): New function.
1491         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1492         gimple_build interface and use follow_all_ssa_edges to fold the result.
1493         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1494         instead of checking for optabs directly.
1495         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1496         rather than FMA_EXPRs.
1497         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1498         call to IFN_FMA instead of an FMA_EXPR.
1500 2018-05-17  Jim Wilson  <jimw@sifive.com>
1502         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1503         sign extended promoted subreg, and the range does not have the sign bit
1504         set, then do a sign extend.
1506         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1507         test, check for sign extended subreg and/or constant operands, and
1508         do a sign extend in that case.
1510 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1512         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1513         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1514         Add untyped.
1515         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1516         Change logics_shift_reg to logics_shift_imm.
1517         (thunderx2t99_fp_loadpair_basic): Delete.
1518         (thunderx2t99_fp_storepair_basic): Delete.
1519         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1520         (thunderx2t99_asimd_polynomial): Delete.
1521         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1522         and neon_fp_mul_d_scalar_q.
1523         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1524         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1525         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1526         (thunderx2t99_asimd_lut): Add missing tbl types.
1527         (thunderx2t99_asimd_ext): Delete.
1528         (thunderx2t99_asimd_load1_1_mult): Delete.
1529         (thunderx2t99_asimd_load1_2_mult): Delete.
1530         (thunderx2t99_asimd_load1_ldp): New.
1531         (thunderx2t99_asimd_load1): New.
1532         (thunderx2t99_asimd_load2): Add missing *load2* types.
1533         (thunderx2t99_asimd_load3): New.
1534         (thunderx2t99_asimd_load4): New.
1535         (thunderx2t99_asimd_store1_1_mult): Delete.
1536         (thunderx2t99_asimd_store1_2_mult): Delete.
1537         (thunderx2t99_asimd_store2_mult): Delete.
1538         (thunderx2t99_asimd_store2_onelane): Delete.
1539         (thunderx2t99_asimd_store_stp): New.
1540         (thunderx2t99_asimd_store1): New.
1541         (thunderx2t99_asimd_store2): New.
1542         (thunderx2t99_asimd_store3): New.
1543         (thunderx2t99_asimd_store4): New.
1545 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1547         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1548         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1550 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1551             Segher Boessenkool  <segher@kernel.crashing.org>
1553         PR target/85698
1554         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1555         operand.
1557 2018-05-17  Richard Biener  <rguenther@suse.de>
1559         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1560         for pruning loop and prune defs feeding only already visited PHIs.
1562 2018-05-17  Richard Biener  <rguenther@suse.de>
1564         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1566 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1567             Richard Biener  <rguenther@suse.de>
1569         PR tree-optimization/85793
1570         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1571         for VMAT_ELEMENTWISE.
1573 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1575         * internal-fn.h (lookup_internal_fn): Declare
1576         * internal-fn.c (lookup_internal_fn): New function.
1577         * gimple.c (gimple_build_call_from_tree): Handle calls to
1578         internal functions.
1579         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1580         internal function names.
1581         * tree-pretty-print.c (dump_generic_node): Likewise.
1582         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1584 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1586         * gimple-fold.h (gimple_build): Make the function forms take
1587         combined_fn rather than built_in_function.
1588         (gimple_simplify): Likewise.
1589         * gimple-match-head.c (gimple_simplify): Likewise.
1590         * gimple-fold.c (gimple_build): Likewise.
1591         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1592         rather than gimple_build_call_internal.
1593         (get_initial_defs_for_reduction): Likewise.
1594         (vect_create_epilog_for_reduction): Likewise.
1595         (vectorizable_live_operation): Likewise.
1597 2018-05-17  Martin Liska  <mliska@suse.cz>
1599         * gimple-ssa-sprintf.c (format_directive): Do not use
1600         space in between 'G_' and '('.
1602 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1604         PR target/85323
1605         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1606         even if the mask is not all ones.
1608         PR target/85323
1609         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1610         vector.
1611         (ix86_gimple_fold_builtin): Likewise.
1613         PR target/85323
1614         * config/i386/i386.c: Include tree-vector-builder.h.
1615         (ix86_vector_shift_count): New function.
1616         (ix86_fold_builtin): Fold shift builtins by scalar count.
1617         (ix86_gimple_fold_builtin): Likewise.
1619         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1620         _mm512_setzero): New intrinsics.
1622 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1623             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1625         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1626         code generation for cases where splatting a value is not useful.
1627         * simplify-rtx.c (simplify_ternary_operation): Simplify
1628         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1629         mode to a vec_concat.
1631 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1633         * config.gcc: Support "goldmont-plus".
1634         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1635         "goldmont-plus".
1636         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1637         PROCESSOR_GOLDMONT_PLUS.
1638         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1639         (processor_target_table): Add "goldmont-plus".
1640         (PTA_GOLDMONT_PLUS): Define.
1641         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1642         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1643         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1644         (fold_builtin_cpu): Add "goldmont-plus".
1645         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1646         (ix86_option_override_internal): Add "goldmont-plus".
1647         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1648         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1649         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1650         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1652 2018-05-17  Richard Biener  <rguenther@suse.de>
1654         PR tree-optimization/85757
1655         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1656         remove defs that only feed that PHI from further processing.
1658 2018-05-16  Jim Wilson  <jimw@sifive.com>
1660         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1661         asterisk to name.
1662         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1664 2018-05-16  Mark Wielaard  <mark@klomp.org>
1666         * dwarf2out.c (count_index_strings): New function.
1667         (output_indirect_strings): Call count_index_strings and generate
1668         header for dwarf_version >= 5.
1670 2018-05-16  Mark Wielaard  <mark@klomp.org>
1672         * dwarf2out.c (dwarf_FORM): New function.
1673         (set_indirect_string): Use dwarf_FORM.
1674         (reset_indirect_string): Likewise.
1675         (size_of_die): Likewise.
1676         (value_format): Likewise.
1677         (output_die): Likewise.
1678         (add_skeleton_AT_string): Likewise.
1679         (output_macinfo_op): Likewise.
1680         (index_string): Likewise.
1681         (output_index_string_offset): Likewise.
1682         (output_index_string): Likewise.
1683         (count_index_strings): Likewise.
1685 2018-05-16  Carl Love  <cel@us.ibm.com>
1687         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1688         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1690 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1692         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1693         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1695 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1697         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1698         (fnma<mode>4): Likewise.
1699         (fms<mode>4): Likewise.
1700         (fnms<mode>4): Likewise.
1701         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1702         (aarch64_fnma<mode>4): Likewise.
1703         (aarch64_fms<mode>4): Likewise.
1704         (aarch64_fnms<mode>4): Likewise.
1705         (aarch64_fnmadd<mode>4): Likewise.
1707 2018-05-16  Jason Merrill  <jason@redhat.com>
1709         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1711 2018-05-16  Richard Biener  <rguenther@suse.de>
1713         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1714         (dump_stmt_cost): Declare.
1715         (add_stmt_cost): Dump cost we add.
1716         (add_stmt_costs): New function.
1717         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1718         No longer exported.
1719         (vect_analyze_stmt): Adjust prototype.
1720         (vectorizable_condition): Likewise.
1721         (vectorizable_live_operation): Likewise.
1722         (vectorizable_reduction): Likewise.
1723         (vectorizable_induction): Likewise.
1724         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1725         cost vector to pass to vectorizable_ and record afterwards.
1726         (vect_model_reduction_cost): Take cost vector argument and adjust.
1727         (vect_model_induction_cost): Likewise.
1728         (vectorizable_reduction): Likewise.
1729         (vectorizable_induction): Likewise.
1730         (vectorizable_live_operation): Likewise.
1731         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1732         SLP_TREE_NUMBER_OF_VEC_STMTS.
1733         (vect_analyze_slp_cost_1): Remove.
1734         (vect_analyze_slp_cost): Likewise.
1735         (vect_slp_analyze_node_operations): Take visited args and
1736         a target cost vector.  Avoid processing already visited stmt sets.
1737         (vect_slp_analyze_operations): Use a local cost vector to gather
1738         costs and register those of non-discarded instances.
1739         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1740         (vect_schedule_slp_instance): Remove copying of
1741         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
1742         zero.
1743         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1744         adding cost.  Record cost entry location.
1745         (vect_prologue_cost_for_slp_op): Function to compute cost of
1746         a constant or invariant generated for SLP vect in the prologue,
1747         split out from vect_analyze_slp_cost_1.
1748         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
1749         (vect_model_promotion_demotion_cost): Likewise.
1750         (vect_model_store_cost): Likewise, make static.
1751         (vect_model_load_cost): Likewise.
1752         (vectorizable_bswap): Add cost vector arg and adjust.
1753         (vectorizable_call): Likewise.
1754         (vectorizable_simd_clone_call): Likewise.
1755         (vectorizable_conversion): Likewise.
1756         (vectorizable_assignment): Likewise.
1757         (vectorizable_shift): Likewise.
1758         (vectorizable_operation): Likewise.
1759         (vectorizable_store): Likewise.
1760         (vectorizable_load): Likewise.
1761         (vectorizable_condition): Likewise.
1762         (vectorizable_comparison): Likewise.
1763         (can_vectorize_live_stmts): Likewise.
1764         (vect_analyze_stmt): Likewise.
1765         (vect_transform_stmt): Adjust calls to vectorizable_*.
1766         * tree-vectorizer.c: Include gimple-pretty-print.h.
1767         (dump_stmt_cost): New function.
1769 2018-05-16  Richard Biener  <rguenther@suse.de>
1771         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1772         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1773         * tree-ssa-dse.c: Include tree-ssa-loop.h.
1774         (check_name): New callback.
1775         (dse_classify_store): Track cycles via a visited bitmap of PHI
1776         defs and simplify handling of in-loop and across loop dead stores
1777         and properly fail for loop-variant refs.  Handle byte-tracking with
1778         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1779         limiting the walk.
1781 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
1783         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1784         (vect_get_mask_type_for_stmt): Likewise.
1785         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1786         split out from...
1787         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
1788         to determine the statement's vector type and the vector type that
1789         should be used for calculating nunits.  Deal with cases in which
1790         the type has to be deferred.
1791         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1792         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
1793         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
1794         (vect_determine_vf_for_stmt): New functions, split out from...
1795         (vect_determine_vectorization_factor): ...here.
1796         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
1797         (vect_get_mask_type_for_stmt): New functions, split out from
1798         vect_determine_vectorization_factor.
1800 2018-05-16  Richard Biener  <rguenther@suse.de>
1802         * tree-cfg.c (verify_gimple_assign_ternary): Properly
1803         verify the [VEC_]COND_EXPR embedded comparison.
1805 2018-05-15  Martin Sebor  <msebor@redhat.com>
1807         PR tree-optimization/85753
1808         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
1809         RECORD_TYPE in addition to ARRAY_TYPE.
1811 2018-05-15  Martin Sebor  <msebor@redhat.com>
1813         PR middle-end/85643
1814         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
1816 2018-05-15  Richard Biener  <rguenther@suse.de>
1818         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
1819         add by_clobber_p one.  Change algorithm to collect all defs
1820         representing uses we need to walk and try reducing them to
1821         a single one before failing.
1822         (dse_dom_walker::dse_optimize_stmt): Adjust.
1824 2018-05-13  Mark Wielaard  <mark@klomp.org>
1826         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
1827         (size_of_loc_descr): Likewise.
1828         (output_loc_operands): Likewise.
1829         (output_loc_operands_raw): Likewise.
1830         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
1831         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
1832         (hash_loc_operands): Likewise.
1833         (compare_loc_operands): Likewise.
1835 2018-05-14  Mark Wielaard  <mark@klomp.org>
1837         * dwarf2out.c (count_index_addrs): New function.
1838         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
1840 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1842         PR tree-optimization/83648
1843         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
1844         return value as malloc candidate.
1846 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1848         PR ipa/85734
1849         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
1850         as true in call to suggest_attribute.
1852 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
1854         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
1855         -mreadonly-in-sdata.
1857 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1859         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
1860         New pattern.
1861         (aarch64_crypto_aesd_fused): Likewise.
1863 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
1865         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
1866         (movsi_aarch64): Likewise.
1867         (load_pairsi): Likewise.
1868         (load_pairdi): Likewise.
1869         (store_pairsi): Likewise.
1870         (store_pairdi): Likewise.
1871         (load_pairsf): Likewise.
1872         (load_pairdf): Likewise.
1873         (store_pairsf): Likewise.
1874         (store_pairdf): Likewise.
1875         (zero_extend): Likewise.
1876         (trunc): Swap alternatives.
1877         (fcvt_target): Add '?' to prefer w over r.
1879 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
1881         PR target/85756
1882         * config/i386/i386.md: Disallow non-commutative arithmetics in
1883         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
1884         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
1885         in the peephole2 before it.
1887 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
1889         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
1890         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
1891         (ix86_handle_option): Handle -mcldemote.
1892         * config.gcc: New header.
1893         * config/i386/cldemoteintrin.h: New file.
1894         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
1895         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1896         -mcldemote.
1897         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1898         OPTION_MASK_ISA_CLDEMOTE.
1899         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
1900         (ix86_valid_target_attribute_inner_p): Ditto.
1901         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
1902         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
1903         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
1904         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
1905         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
1906         (cldemote): New.
1907         * config/i386/i386.opt: Add -mcldemote.
1908         * config/i386/x86intrin.h: New header.
1909         * doc/invoke.texi: Add -mcldemote.
1911 2018-05-14  Richard Biener  <rguenther@suse.de>
1913         * doc/match-and-simplify.texi: Adjust :s documentation.
1915 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
1917         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
1918         intended memcpy size.
1919         (REORDER_45): Likewise.
1921 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
1923         * sort.cc: New file.
1924         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
1925         * vec.c (qsort_chk): Use gcc_qsort.
1926         * Makefile.in (OBJS-libcommon): Add sort.o.
1927         (build/sort.o): New target.  Use it...
1928         (BUILD_RTL): ... here, and...
1929         (build/gencfn-macros): ... here, and...
1930         (build/genmatch): ... here.
1932 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1933             Chung-Ju Wu  <jasonwucj@gmail.com>
1935         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
1936         * config/nds32/nds32-graywolf.md: New file.
1937         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
1938         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
1939         pipeline.
1940         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
1941         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
1942         * config/nds32/nds32.md (pipeline_model): Add graywolf.
1943         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
1944         * config/nds32/pipelines.md: Include n15 settings.
1946 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1947             Chung-Ju Wu  <jasonwucj@gmail.com>
1949         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
1950         * config/nds32/nds32-n13.md: New file.
1951         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
1952         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
1953         pipeline.
1954         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
1955         * config/nds32/nds32.md (pipeline_model): Add n13.
1956         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
1957         * config/nds32/pipelines.md: Include n13 settings.
1959 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1960             Chung-Ju Wu  <jasonwucj@gmail.com>
1962         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
1963         * config/nds32/nds32-n10.md: New file.
1964         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
1965         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
1966         pipeline.
1967         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
1968         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
1969         * config/nds32/nds32.md (pipeline_model): Add n10.
1970         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
1971         * config/nds32/pipelines.md: Include n10 settings.
1973 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
1974             Kito Cheng  <kito.cheng@gmail.com>
1975             Chung-Ju Wu  <jasonwucj@gmail.com>
1977         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
1978         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
1979         Add enum values for DSP extension instructions.
1980         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
1981         New constraints.
1982         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
1983         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
1984         New code iterators.
1985         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
1986         * config/nds32/nds32-dspext.md: New file for DSP implementation.
1987         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
1988         * config/nds32/nds32-intrinsic.md: Likewise.
1989         * config/nds32/nds32_intrinsic.h: Likewise.
1990         * config/nds32/nds32-md-auxiliary.c: Likewise.
1991         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
1992         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
1993         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
1994         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
1995         * config/nds32/nds32-protos.h: New declarations for DSP extension.
1996         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
1997         TYPE_DMAC in switch statement.
1998         * config/nds32/nds32.c: New checking and implementation for DSP
1999         extension instructions.
2000         * config/nds32/nds32.h: Likewise.
2001         * config/nds32/nds32.md: Likewise.
2002         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
2003         * config/nds32/predicates.md: Implement new predicates for DSP
2004         extension.
2006 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
2008         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
2009         Reformat alternatives and attributes so it is easier to identify
2010         which constraints/attributes go with which instruction.
2011         (mov<mode>_hardfloat32, FMOVE64): Likewise.
2012         (mov<mode>_softfloat32, FMOVE64): Likewise.
2013         (mov<mode>_hardfloat64, FMOVE64): Likewise.
2014         (mov<mode>_softfloat64, FMOVE64): Likewise.
2016 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2018         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2019         subsection.
2020         (Basic PowerPC Built-in Functions): The new name of the
2021         subsection previously known as "PowerPC Built-in Functions".
2022         (Basic PowerPC Built-in Functions Available on all Configurations):
2023         New subsubsection.
2024         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
2025         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
2026         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
2027         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
2029 2018-05-11  Martin Jambor  <mjambor@suse.cz>
2031         PR ipa/85655
2032         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
2033         single const.
2035 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2037         PR target/85733
2038         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
2040 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
2042         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
2043         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
2044         (ix86_handle_option): Handle -mwaitpkg.
2045         * config.gcc: New header.
2046         * config/i386/cpuid.h (bit_WAITPKG): New bit.
2047         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
2048         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
2049         function type.
2050         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2051         OPTION_MASK_ISA_WAITPKG.
2052         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
2053         (ix86_option_override_internal): Add PTA_WAITPKG.
2054         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
2055         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
2056         IX86_BUILTIN_TPAUSE.
2057         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
2058         __builtin_ia32_umwait and __builtin_ia32_tpause.
2059         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
2060         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
2061         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
2062         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
2063         UNSPECV_TPAUSE): New.
2064         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
2065         * config/i386/i386.opt: Add -mwaitpkg.
2066         * config/i386/waitpkgintrin.h: New file.
2067         * config/i386/x86intrin.h: New header.
2068         * doc/invoke.texi: Add -mwaitpkg.
2070 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2072         PR target/85606
2073         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
2074         equivalent.
2075         (cortex-m0): Use armv6s-m isa.
2076         (cortex-m0plus): Likewise.
2077         (cortex-m1): Likewise.
2078         (cortex-m0.small-multiply): Likewise.
2079         (cortex-m0plus.small-multiply): Likewise.
2080         (cortex-m1.small-multiply): Likewise.
2082 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2083             Jakub Jelinek  <jakub@redhat.com>
2085         PR tree-optimization/85692
2086         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
2087         source permute as well.
2089 2018-05-11  Martin Liska  <mliska@suse.cz>
2091         PR sanitizer/85556
2092         * doc/extend.texi: Document LLVM style format for no_sanitize
2093         attribute.
2095 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
2097         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
2098         mode_supports_vsx_dform_quad to mode_supports_dq_form.
2099         (mode_supports_vsx_dform_quad): Likewise.
2100         (mode_supports_vmx_dform): Move these functions to be next to the
2101         other mode_supports functions.
2102         (mode_supports_dq_form): Likewise.
2103         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
2104         mode_supports_dq_form.
2105         (reg_offset_addressing_ok_p): Likewise.
2106         (offsettable_ok_by_alignment): Likewise.
2107         (rs6000_legitimate_offset_address_p): Likewise.
2108         (legitimate_lo_sum_address_p): Likewise.
2109         (rs6000_legitimize_address): Likewise.
2110         (rs6000_legitimize_reload_address): Likewise.
2111         (rs6000_secondary_reload_inner): Likewise.
2112         (rs6000_preferred_reload_class): Likewise.
2113         (rs6000_output_move_128bit): Likewise.
2115 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2117         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
2118         Generate SImode target register for null target.
2119         <case IX86_BUILTIN_XGETBV>: Ditto.
2120         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
2121         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
2123 2018-05-10  Carl Love  <cel@us.ibm.com>
2125         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
2126         dcbtt and dcbtstt if operands[2] is 0.
2128 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2130         PR target/85693
2131         * config/i386/sse.md (usadv64qi): New expander.
2133 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
2135         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
2136         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
2137         -maltivec=be support.
2138         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
2139         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
2140         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
2141         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
2142         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
2143         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
2144         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
2145         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
2146         altivec_vsumsws): Adjust.
2147         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
2148         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
2149         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
2150         support.
2151         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
2152         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
2153         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
2154         (altivec_lve<VI_char>x): Delete expand.
2155         (*altivec_lve<VI_char>x_internal): Rename to...
2156         (altivec_lve<VI_char>x): ... this.
2157         (altivec_lvxl_<mode>): Delete expand.
2158         (*altivec_lvxl_<mode>_internal): Rename to ...
2159         (altivec_lvxl_<mode>): ... this.
2160         (altivec_stvxl_<mode>): Delete expand.
2161         (*altivec_stvxl_<mode>_internal): Rename to ...
2162         (altivec_stvxl_<mode>): ... this.
2163         (altivec_stve<VI_char>x): Delete expand.
2164         (*altivec_stve<VI_char>x_internal): Rename to ...
2165         (altivec_stve<VI_char>x): ... this.
2166         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
2167         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
2168         reduc_plus_scal_<mode>): Adjust.
2169         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
2170         comment.
2171         (rs6000_cpu_cpp_builtins): Adjust.
2172         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
2173         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
2174         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
2175         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
2176         -maltivec=be support.
2177         (rs6000_split_vec_extract_var): Adjust.
2178         (rs6000_split_v4si_init): Adjust.
2179         (swap_selector_for_mode): Delete.
2180         (altivec_expand_lvx_be, altivec_expand_stvx_be,
2181         altivec_expand_stvex_be): Delete.
2182         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
2183         -maltivec=be support.
2184         (rs6000_gimple_fold_builtin): Ditto.
2185         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
2186         Adjust.
2187         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
2188         (TARGET_DIRECT_MOVE_64BIT): Adjust.
2189         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
2190         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
2191         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
2192         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
2193         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
2194         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
2195         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
2196         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
2197         anonymous split): Adjust.
2198         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
2199         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
2201 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
2203         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
2204         when --with-gxx-include-dir is also specified.
2205         * configure: Regenerate.
2207 2018-05-09  Jim Wilson  <jimw@sifive.com>
2209         PR target/84797
2210         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
2211         * config/riscv/t-withmultilib: New.
2212         * config/riscv/withmultilib.h: New.
2213         * doc/install.texi: Document RISC-V --with-multilib-list support.
2215 2018-05-09  Richard Biener  <rguenther@suse.de>
2217         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
2218         vector.
2219         (vect_bb_vectorization_profitable_p): Adjust.  Compute
2220         actual scalar cost using the cost vector and the add_stmt_cost
2221         machinery.
2223 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2225         PR rtl-optimization/85645
2226         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
2227         in the REG_CFA_REGISTER note for LR, don't leave it empty.
2229 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2231         PR rtl-optimization/85645
2232         * shrink-wrap.c (spread_components): Return a boolean saying if
2233         anything was changed.
2234         (try_shrink_wrapping_separate): Iterate spread_components until
2235         nothing changes anymore.
2237 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2239         PR rtl-optimization/85645
2240         * regrename.c (build_def_use): Also kill the chains that include the
2241         destination of a REG_CFA_REGISTER note.
2243 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2245         PR rtl-optimization/85645
2246         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2247         insn that has a REG_CFA_REGISTER note.
2249 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
2251         * cfgexpand.c (expand_clobber): New function.
2252         (expand_gimple_stmt_1): Use it.
2253         * tree-vect-stmts.c (vect_clobber_variable): New function,
2254         split out from...
2255         (vectorizable_simd_clone_call): ...here.
2256         (vectorizable_store): Emit a clobber either side of an
2257         IFN_STORE_LANES sequence.
2258         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2260 2018-05-09  Tom de Vries  <tom@codesourcery.com>
2262         PR target/85626
2263         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2264         (define_insn "trap_if_false"): Add exit after trap.
2266 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2268         PR rtl-optimization/85638
2269         * bb-reorder.c: Include common/common-target.h.
2270         (create_forwarder_block): New function extracted from...
2271         (fix_up_crossing_landing_pad): ...here.  Rename into...
2272         (dw2_fix_up_crossing_landing_pad): ...this.
2273         (sjlj_fix_up_crossing_landing_pad): New function.
2274         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2275         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2276         from both partitions and exit the loop after one iteration.
2278 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2280         Revert:
2281         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2282         subsection.
2283         (Basic PowerPC Built-in Functions): The new name of the
2284         subsection previously known as "PowerPC Built-in Functions".
2285         (Basic PowerPC Built-in Functions Available on all Configurations):
2286         New subsubsection.
2287         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2288         subsubsection.
2289         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2290         subsubsection.
2291         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2292         subsubsection.
2293         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2294         subsubsection.
2296 2018-05-08  Jim Wilson  <jimw@sifive.com>
2298         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
2299         (LD_EMUL_SUFFIX): New.
2300         (LINK_SPEC): Use it.
2302 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2304         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2305         subsection.
2306         (Basic PowerPC Built-in Functions): The new name of the
2307         subsection previously known as "PowerPC Built-in Functions".
2308         (Basic PowerPC Built-in Functions Available on all Configurations):
2309         New subsubsection.
2310         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2311         subsubsection.
2312         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2313         subsubsection.
2314         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2315         subsubsection.
2316         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2317         subsubsection.
2319 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2321         PR target/85683
2322         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
2323         after cmpelim optimization.
2325 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
2327         * config.gcc: Support "goldmont".
2328         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
2329         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2330         PROCESSOR_GOLDMONT.
2331         * config/i386/i386.c (m_GOLDMONT): Define.
2332         (processor_target_table): Add "goldmont".
2333         (PTA_GOLDMONT): Define.
2334         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
2335         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
2336         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
2337         (fold_builtin_cpu): Add "goldmont".
2338         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
2339         (ix86_option_override_internal): Add "goldmont".
2340         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
2341         (processor_type): Add PROCESSOR_GOLDMONT.
2342         * config/i386/i386.md: Add CPU "glm".
2343         * config/i386/glm.md: New file.
2344         * config/i386/x86-tune.def: Add m_GOLDMONT.
2345         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2347 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2349         PR target/85572
2350         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
2351         E_V4DImode.
2352         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
2353         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
2354         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
2356         PR target/85317
2357         * config/i386/i386.c (ix86_fold_builtin): Handle
2358         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2360         PR target/85480
2361         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2362         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2364 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
2366         PR target/85658
2367         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2368         (check_arch): Likewise.
2369         (check_fpu): Return the result rather than printing it.
2370         (end arch): Fix operator precedence.
2371         (end cpu): Likewise.
2372         (END): Print the result from check_fpu.
2374 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2375             Alan Hayward  <alan.hayward@arm.com>
2376             David Sherwood  <david.sherwood@arm.com>
2378         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2379         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2380         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2381         (*fcmuo<mode>_and): New patterns.
2383 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2385         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2386         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2387         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2388         (cmp_op, sve_imm_con): New code attributes.
2389         (SVE_COND_INT_CMP, imm_con): Delete.
2390         (cmp_op): Remove above unspecs from int attribute.
2391         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2392         to...
2393         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
2394         comparison-specific unspecs.
2395         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2396         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2397         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2398         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2399         (*vec_fcm<cmp_op><mode>): Rename to...
2400         (*fcm<cmp_op><mode>): ...this and adjust likewise.
2401         (*vec_fcmuo<mode>): Rename to...
2402         (*fcmuo<mode>): ...this and adjust likewise.
2403         (*pred_fcm<cmp_op><mode>): New pattern.
2404         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2405         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2406         functions.
2407         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2408         and UNORDERED.
2409         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2410         (aarch64_emit_sve_predicated_cond): New function.
2411         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2412         (aarch64_emit_unspec_cond_or): Replace with...
2413         (aarch64_emit_sve_or_conds): ...this new function.  Use
2414         aarch64_emit_sve_ptrue_op for the individual comparisons and
2415         aarch64_emit_binop to OR them together.
2416         (aarch64_emit_inverted_unspec_cond): Replace with...
2417         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
2418         aarch64_emit_sve_ptrue_op for the comparison and
2419         aarch64_emit_unop to invert the result.
2420         (aarch64_expand_sve_vec_cmp_float): Update after the above
2421         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
2423 2018-05-07  Nathan Sidwell  <nathan@acm.org>
2425         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2426         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2427         (Backwards Compatibility): Likewise.
2429 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2431         PR bootstrap/85681
2432         Revert:
2433         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2435         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2436         <prefetch_dynamic_strides>: New const bool field.
2437         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2438         prefetch_dynamic_strides.
2439         (exynosm1_prefetch_tune): Likewise.
2440         (thunderxt88_prefetch_tune): Likewise.
2441         (thunderx_prefetch_tune): Likewise.
2442         (thunderx2t99_prefetch_tune): Likewise.
2443         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2444         (aarch64_override_options_internal): Update to set
2445         PARAM_PREFETCH_DYNAMIC_STRIDES.
2446         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2447         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2448         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2449         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2450         prefetch-dynamic-strides setting.
2452         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2454         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2455         <minimum_stride>: New const int field.
2456         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2457         minimum_stride field.
2458         (exynosm1_prefetch_tune): Likewise.
2459         (thunderxt88_prefetch_tune): Likewise.
2460         (thunderx_prefetch_tune): Likewise.
2461         (thunderx2t99_prefetch_tune): Likewise.
2462         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2463         (aarch64_override_options_internal): Update to set
2464         PARAM_PREFETCH_MINIMUM_STRIDE.
2465         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2466         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2467         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2468         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2469         stride is constant and is below the minimum stride threshold.
2471 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2473         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2474         to 512.
2476 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2478         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2479         <prefetch_dynamic_strides>: New const bool field.
2480         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2481         prefetch_dynamic_strides.
2482         (exynosm1_prefetch_tune): Likewise.
2483         (thunderxt88_prefetch_tune): Likewise.
2484         (thunderx_prefetch_tune): Likewise.
2485         (thunderx2t99_prefetch_tune): Likewise.
2486         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2487         (aarch64_override_options_internal): Update to set
2488         PARAM_PREFETCH_DYNAMIC_STRIDES.
2489         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2490         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2491         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2492         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2493         prefetch-dynamic-strides setting.
2495 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2497         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2498         <minimum_stride>: New const int field.
2499         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2500         minimum_stride field.
2501         (exynosm1_prefetch_tune): Likewise.
2502         (thunderxt88_prefetch_tune): Likewise.
2503         (thunderx_prefetch_tune): Likewise.
2504         (thunderx2t99_prefetch_tune): Likewise.
2505         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2506         (aarch64_override_options_internal): Update to set
2507         PARAM_PREFETCH_MINIMUM_STRIDE.
2508         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2509         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2510         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2511         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2512         stride is constant and is below the minimum stride threshold.
2514 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2516         PR c++/85659
2517         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2518         the type is addressable.  Don't force op into register if it has
2519         BLKmode.
2521 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2523         PR other/77609
2524         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2525         any section for which we don't know a specific type it should have,
2526         regardless of name.  Previously this was done only for the exact
2527         names ".init_array", ".fini_array", and ".preinit_array".
2528         (default_elf_asm_named_section): Add comment about
2529         relationship with default_section_type_flags and SECTION_NOTYPE.
2530         (get_section): Don't consider it a type conflict if one side has
2531         SECTION_NOTYPE and the other doesn't, as long as neither has the
2532         SECTION_BSS et al used in the default_section_type_flags logic.
2534 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2536         PR target/85653
2537         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2538         (workaround_barsyncs): New function.
2539         (nvptx_reorg): Use workaround_barsyncs.
2540         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2541         (define_expand "nvptx_membar_cta"): New define_expand.
2542         (define_insn "*nvptx_membar_cta"): New insn.
2544 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2546         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2547         To improve optimization opportunities.
2548         * builtin-types.def: The new needed builtin types for the above.
2550 2018-05-04  Richard Biener  <rguenther@suse.de>
2552         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2553         * gimple-ssa-store-merging.c
2554         (imm_store_chain_info::output_merged_store): Remove redundant create,
2555         release split_store vector contents on failure.
2556         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2557         scalar stmt vector on cache hit.
2559 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2561         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2562         Xilinx FP support.
2563         * config.gcc (powerpc-xilinx-eabi*): Remove.
2564         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2565         support.
2566         (fusion_addis_mem_combo_load): Ditto.
2567         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2568         FP support.
2569         (rs6000_cpu_cpp_builtins): Ditto.
2570         * config/rs6000/rs6000-linux.c
2571         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2572         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2573         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2574         support.
2575         (rs6000_setup_reg_addr_masks): Ditto.
2576         (rs6000_init_hard_regno_mode_ok): Ditto.
2577         (rs6000_option_override_internal): Ditto.
2578         (legitimate_lo_sum_address_p): Ditto.
2579         (rs6000_legitimize_address): Ditto.
2580         (rs6000_legitimize_reload_address): Ditto.
2581         (rs6000_legitimate_address_p): Ditto.
2582         (abi_v4_pass_in_fpr): Ditto.
2583         (setup_incoming_varargs): Ditto.
2584         (rs6000_gimplify_va_arg): Ditto.
2585         (rs6000_split_multireg_move): Ditto.
2586         (rs6000_savres_strategy): Ditto.
2587         (rs6000_emit_prologue_components): Ditto.
2588         (rs6000_emit_epilogue_components): Ditto.
2589         (rs6000_emit_prologue): Ditto.
2590         (rs6000_emit_epilogue): Ditto.
2591         (rs6000_elf_file_end): Ditto.
2592         (rs6000_function_value): Ditto.
2593         (rs6000_libcall_value): Ditto.
2594         * config/rs6000/rs6000.h: Ditto.
2595         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2596         (TARGET_MINMAX): ... this.  New.
2597         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2598         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2599         (*movsi_internal1_single): Delete.
2600         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2601         mfpu=, mxilinx-fpu): Delete.
2602         * config/rs6000/singlefp.h: Delete.
2603         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2604         * config/rs6000/t-rs6000: Ditto.
2605         * config/rs6000/t-xilinx: Delete.
2606         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2607         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2608         (VStype_simple): Delete.
2609         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2610         * config/rs6000/xfpu.h: Delete.
2611         * config/rs6000/xfpu.md: Delete.
2612         * config/rs6000/xilinx.h: Delete.
2613         * config/rs6000/xilinx.opt: Delete.
2614         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2615         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2617 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2619         PR libgomp/85639
2620         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2621         if ignore == 0.
2623 2018-05-04  Richard Biener  <rguenther@suse.de>
2625         PR middle-end/85627
2626         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2627         (expand_complex_div_wide): Likewise.
2628         (expand_complex_operations_1): Likewise.
2629         (expand_complex_libcall): Preserve EH info of the original stmt.
2630         (tree_lower_complex): Handle removed blocks.
2631         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2632         on complex multiplication and division libcall builtins.
2634 2018-05-04  Richard Biener  <rguenther@suse.de>
2636         PR middle-end/85574
2637         * fold-const.c (negate_expr_p): Restrict negation of operand
2638         zero of a division to when we know that can happen without
2639         overflow.
2640         (fold_negate_expr_1): Likewise.
2642 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2644         PR libstdc++/85466
2645         * real.h (real_nextafter): Declare.
2646         * real.c (real_nextafter): New function.
2647         * fold-const-call.c (fold_const_nextafter): New function.
2648         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2649         CASE_CFN_NEXTTOWARD.
2650         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2651         even when arg1_mode is different from arg0_mode.
2653 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2655         * doc/extend.texi (Deprecated Features): Remove
2656         -ffriend-injection.
2657         (Backwards Compatibility): Likewise.
2658         * doc/invoke.texi (C++ Language Options): Likewise.
2659         (C++ Dialect Options): Likewise.
2661 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2663         PR target/85530
2664         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2665         _mm512_mask_mullox_epi64): New intrinsics.
2667 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2669         PR testsuite/85106
2670         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2671         dump files): Add offload-tree.
2673 2018-05-03  Richard Biener  <rguenther@suse.de>
2675         PR tree-optimization/85615
2676         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2677         to loops not nested in BBs loop father to avoid creating multi-entry
2678         loops.
2680 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2682         PR tree-optimization/70291
2683         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2684         arguments.  Change return type to tree.  Emit libcall as a new
2685         statement rather than replacing existing one when inplace_p is true.
2686         (expand_complex_multiplication_components): New function.
2687         (expand_complex_multiplication): Expand floating-point complex
2688         multiplication using the above.
2689         (expand_complex_division): Rename inner_type parameter to type.
2690         Update expand_complex_libcall call-site.
2691         (expand_complex_operations_1): Update expand_complex_multiplication
2692         and expand_complex_division call-sites.
2694 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2696         PR target/85582
2697         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2698         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2699         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2700         the highest significant bit of the shift count mask is clear.  In
2701         check whether and[sq]i3 is needed verify that all significant bits
2702         of the shift count other than the highest are set.
2704 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2706         PR libgomp/82428
2707         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2708         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2709         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2710         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2711         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2712         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2713         __builtin_goacc_parlevel_size.
2715 2018-05-02  Richard Biener  <rguenther@suse.de>
2717         PR tree-optimization/85597
2718         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2719         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2720         directly.
2722 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2724         PR testsuite/85106
2725         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2726         dump files): Add ltrans-tree.
2728 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2730         PR testsuite/85106
2731         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2732         dump files): Add wpa-ipa.
2734 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2736         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
2737         powerpc*-*-linux*paired* target.
2738         * config/rs6000/750cl.h: Delete.
2739         * config/rs6000/paired.h: Delete.
2740         * config/rs6000/paired.md: Delete.
2741         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2742         float support.
2743         * config/rs6000/rs6000-builtin.def: Remove paired float support.
2744         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2745         comment.  Remove paired float support.
2746         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2747         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2748         VECTOR_PAIRED.
2749         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2750         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2751         declarations.
2752         * config/rs6000/rs6000.c: Remove paired float support.
2753         (paired_expand_vector_init, paired_expand_vector_move,
2754         paired_emit_vector_compare, paired_emit_vector_cond_expr,
2755         (paired_expand_lv_builtin, paired_expand_stv_builtin,
2756         paired_expand_builtin, paired_expand_predicate_builtin,
2757         paired_init_builtins): Delete.
2758         * config/rs6000/rs6000.h: Remove paired float support.
2759         * config/rs6000/rs6000.md: Remove paired float support.
2760         (move_from_CR_ov_bit): Delete.
2761         * config/rs6000/rs6000.opt (mpaired): Delete.
2762         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2763         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2765 2018-05-02  Richard Biener  <rguenther@suse.de>
2767         PR middle-end/85567
2768         * gimplify.c (gimplify_save_expr): When in SSA form allow
2769         SAVE_EXPRs to compute to SSA vars.
2771 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2773         PR target/85582
2774         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2775         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2776         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2777         clobber operands[2], instead use a new pseudo.  Formatting fixes.
2779 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
2781         PR tree-optimization/85586
2782         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2783         exit early for statements in the same group if the accesses are
2784         not strided.
2786 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2788         PR lto/85451
2789         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2790         error message.
2792 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
2794         PR tree-optimization/85143
2795         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2797 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2799         PR lto/85451
2800         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
2801         not found" error message.
2803 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2805         PR other/83786
2806         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
2807         * vec.c (test_ordered_remove_if): New function.
2808         (vec_c_tests): Call test_ordered_remove_if.
2809         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
2810         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
2811         * tree-vect-patterns.c (vect_pattern_recog_1): Use
2812         VEC_ORDERED_REMOVE_IF.
2814 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2816         PR tree-optimization/82665
2817         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
2818         pointer subtraction where arguments come from a memchr call.
2820 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
2822         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
2823         --push-state --as-needed and --pop-state instead of --as-needed and
2824         --no-as-needed if ld supports it.
2825         * configure: Regenerated.
2827         PR web/85578
2828         * doc/install.texi2html: Replace _002d with - and _002a with * in
2829         generated html files using sed.
2831 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2833         PR c++/85523
2834         * gcc-rich-location.c (blank_line_before_p): New function.
2835         (use_new_line): New function.
2836         (gcc_rich_location::add_fixit_insert_formatted): New function.
2837         * gcc-rich-location.h
2838         (gcc_rich_location::add_fixit_insert_formatted): New function.
2840 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2842         * selftest.c (assert_streq): Rename "expected" and "actual" to
2843         "val1" and "val2".  Extend NULL-handling to cover both inputs
2844         symmetrically, while still requiring both to be non-NULL for a pass.
2845         * selftest.h (assert_streq): Rename "expected" and "actual" to
2846         "val1" and "val2".
2847         (ASSERT_EQ): Likewise.
2848         (ASSERT_EQ_AT): Likewise.
2849         (ASSERT_KNOWN_EQ): Likewise.
2850         (ASSERT_KNOWN_EQ_AT): Likewise.
2851         (ASSERT_NE): Likewise.
2852         (ASSERT_MAYBE_NE): Likewise.
2853         (ASSERT_MAYBE_NE_AT): Likewise.
2854         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
2855         the assertion to pass.
2856         (ASSERT_STREQ_AT): Likewise.
2858 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2860         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
2861         interaction with -pie.
2863 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2865         * selftest.h: Fix alphabetization of per-source-file selftest
2866         declarations.
2868 2018-04-30  Jason Merrill  <jason@redhat.com>
2870         PR c++/61982 - dead stores to destroyed objects.
2871         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
2872         of clobber.
2874 2018-04-30  Jason Merrill  <jason@redhat.com>
2876         * tree.c (build_clobber): New.
2877         * tree.h: Declare it.
2878         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
2880 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2882         * diagnostic-show-locus.c (layout::layout): Update for
2883         location_get_source_line returning a char_span.
2884         (struct char_span): Move to input.h.
2885         (struct correction): Update for fields in char_span becoming
2886         private.
2887         (struct source_line): Update for location_get_source_line
2888         returning a char_span.
2889         (layout::print_line): Likewise.
2890         * edit-context.c (edited_file::print_content): Likewise.
2891         (edited_file::print_diff_hunk): Likewise.
2892         (edited_file::print_run_of_changed_lines): Likewise.
2893         (edited_file::get_num_lines): Likewise.
2894         (edited_line::edited_line): Likewise.
2895         * final.c (asm_show_source): Likewise.
2896         * input.c (location_get_source_line): Convert return type
2897         from const char * to char_span, losing the final "line_len"
2898         param.
2899         (dump_location_info): Update for the above.
2900         (get_substring_ranges_for_loc): Likewise.  Use a char_span
2901         when handling the literal within the line.
2902         (test_reading_source_line): Update for location_get_source_line
2903         returning a char_span.
2904         * input.h (class char_span): Move here from
2905         diagnostic-show-locus.c, converting from a struct to a class.
2906         Make data members private.
2907         (char_span::operator bool): New.
2908         (char_span::length): New.
2909         (char_span::get_buffer): New.
2910         (char_span::operator[]): New.
2911         (char_span::subspan): Make const.
2912         (char_span::xstrdup): New.
2913         (location_get_source_line): Convert return type from const char *
2914         to char_span, losing the final "line_size" param.
2916 2018-04-30  Jan Hubicka  <jh@suse.cz>
2918         * lto-wrapper.c (ltrans_priorities): New static var.
2919         (cmp_priority): New.
2920         (run_gcc): Read priorities and if doing parallel build order
2921         the Makefile by them.
2923 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2925         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2927 2018-04-30  Richard Biener  <rguenther@suse.de>
2929         * tree-cfg.c (verify_address): Remove base argument, add
2930         flag whether to check TREE_ADDRESSABLE and do that.
2931         (verify_expr): Remove.
2932         (verify_types_in_gimple_reference): Add pieces from verify_expr.
2933         (verify_gimple_assign_single): Likewise.
2934         (verify_gimple_switch): Likewise.
2935         (verify_expr_location_1): Dereference tp once.  Add (disabled)
2936         piece from verify_expr.
2937         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
2939 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2941         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2943 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2945         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
2946         (small_data_pattern): Likewise.
2947         (arc_rewrite_small_data): Likewise.
2948         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
2949         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
2950         (get_symbol_alignment): New function.
2951         (legitimate_small_data_address_p): Likewise.
2952         (legitimate_scaled_address): Update, call
2953         legitimate_small_data_address_p.
2954         (output_sdata): New static variable.
2955         (arc_print_operand): Update how we handle small data operands.
2956         (arc_print_operand_address): Likewise.
2957         (arc_legitimate_address_p): Update, use
2958         legitimate_small_data_address_p.
2959         (arc_rewrite_small_data_p): Remove.
2960         (arc_rewrite_small_data_1): Likewise.
2961         (arc_rewrite_small_data): Likewise.
2962         (small_data_pattern): Likewise.
2963         (compact_sda_memory_operand): Update to use
2964         legitimate_small_data_address_p and get_symbol_alignment.
2965         (prepare_move_operands): Don't rewite sdata pattern.
2966         (prepare_extend_operands): Remove.
2967         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
2968         pattern.
2969         (zero_extendqisi2): Likewise.
2970         (zero_extendhisi2): Likewise.
2971         (extendqihi2): Likewise.
2972         (extendqisi2): Likewise.
2973         (extendhisi2): Likewise.
2974         (addsi3): Likewise.
2975         (subsi3): Likewise.
2976         (andsi3): Likewise.
2977         * config/arc/constraints.md (Usd): Change it to memory constraint.
2979 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2981         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
2982         as source of std instructions.
2983         * config/arc/arc.md (movsi_insn): Update pattern predicate to
2984         allow 6-bit constants as source for store instructions.
2985         (movdi_insn): Update instruction pattern to allow 6-bit constants
2986         as source for store instructions.
2988 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2990         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
2992 2018-04-30  Nathan Sidwell  <nathan@acm.org>
2993             Sandra Loosemore <sandra@codesourcery.com>
2995         * dumpfile.c (dump_open): Allow '-' for stdout.
2996         * doc/invoke.texi (Developer Options): Document dump filename
2997         determination early.  Document stdin/stdout selection.
2999 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
3001         Microblaze Target: PIC data text relative
3003         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
3004         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
3005         Add declaration.
3006         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
3007         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
3008         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
3009         New addressing mode for data-text relative position indepenedent code.
3010         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
3011         'ADDRESS_SYMBOLIC_TXT_REL'.
3012         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
3013         (microblaze_legitimate_pic_operand): Exclude function calls from
3014         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
3015         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
3016         addresses cases.
3017         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3018         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3019         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
3020         for 'address + offset'.
3021         (microblaze_expand_prologue): Add new function prologue call for
3022         'r20' assignation.
3023         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
3024         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
3025         table in case of TARGET_PIC_DATA_TEXT_REL.
3026         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
3027         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
3028         Add new macros 'UNSPEC_TEXT',
3029         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
3030         + exclude function calls from 'UNSPEC_PLT' in case of data text
3031         relative mode.
3032         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3033         new target hook for generating address diff vector tables in case of
3034         flag_pic.
3035         * doc/tm.texi : Regenerate.
3036         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
3037         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
3038         of addr diff vector generation.
3039         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3040         target hook definition.
3041         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
3042         Add default function for generate_pic_addr_diff_vec -> flag_pic.
3043         * doc/invoke.texi (Add new pic option): Add new microblaze pic
3044         option for data text relative.
3046 2018-04-30  Richard Biener  <rguenther@suse.de>
3048         * tree-chrec.h (evolution_function_is_constant_p): Remove
3049         redundant check.
3050         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
3052 2018-04-30  Richard Biener  <rguenther@suse.de>
3054         PR bootstrap/85571
3055         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
3057 2018-04-30  Richard Biener  <rguenther@suse.de>
3059         PR tree-optimization/28364
3060         PR tree-optimization/85275
3061         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
3062         copying first exit test.
3064 2018-04-28  Mark Wielaard  <mark@klomp.org>
3066         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
3067         dwarf_version >= 5.
3068         (dwarf_AT): Handle DW_AT_addr_base.
3069         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
3071 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
3073         PR target/84431
3074         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
3075         (*ashl<dwi>3_doubleword_mask_1): Ditto.
3076         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
3077         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
3079 2018-04-28  Richard Biener  <rguenther@suse.de>
3081         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
3082         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
3083         to reflect use.  Only add interesting stmts.
3085 2018-04-27  Martin Jambor  <mjambor@suse.cz>
3087         PR ipa/85549
3088         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
3089         the jump function allows for passing through aggregate values.
3091 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
3093         * input.h (in_system_header_at): Convert from macro to inline
3094         function.
3095         (from_macro_expansion_at): Likewise.
3096         (from_macro_definition_at): Likewise.
3098 2018-04-27  Jeff Law  <law@redhat.com>
3100         * config.gcc: Mark tile* targets as deprecated/obsolete.
3102 2018-04-27  Richard Biener  <rguenther@suse.de>
3104         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
3105         fix for ILP32.
3107 2018-04-27  Richard Biener  <rguenther@suse.de>
3109         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
3111 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
3113         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
3114         with Yd constraint. Set "preferred_for_speed" attribute from
3115         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
3116         with Yd constraint.
3117         (*movdi_internal): Ditto.
3118         (movti_interunit splitters): Remove
3119         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
3120         (movdi_interunit splitters): Ditto.
3121         * config/i386/constraints.md (Ye): Remove.
3122         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
3124 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3126         PR target/85512
3127         * config/aarch64/constraints.md (Usg): Limit to 31.
3128         (Usj): Limit to 63.
3130 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
3132         PR tree-optimization/85529
3133         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
3134         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
3135         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
3136         zero extension or masking of the MSB bit.
3137         (optimize_range_tests): Add FIRST_BB argument, pass it through
3138         to optimize_range_tests_var_bound.
3139         (maybe_optimize_range_tests, reassociate_bb): Adjust
3140         optimize_range_tests callers.
3142 2018-04-26  Richard Biener  <rguenther@suse.de>
3143             Jakub Jelinek  <jakub@redhat.com>
3145         * cgraph.h (symbol_table): Just declare debug method here.
3146         * symtab.c (symbol_table::debug): Define.
3148 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
3150         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
3152 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
3154         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
3155         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
3156         (*movdi_internal): Substitute Yi and Yj constraint with x
3157         and Ym and Yn constraint with y constraint.  Update "isa"
3158         attribute and set "preferred_for_speed" attribute from
3159         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
3160         (*movsi_internal): Ditto.
3161         (*movdf_internal): Ditto.
3162         (*movsf_internal): Ditto.
3163         (*zero_extendsidi2): Ditto.
3164         * config/i386/sse.md (vec_set<mode>_0): Ditto.
3165         (sse2_loadld): Ditto.
3166         (*vec_extract<ssevecmodelower>_0): Ditto.
3167         (*vec_extractv4si_0_zext_sse4): Ditto.
3168         (vec_concatv2di): Ditto.
3169         (*vec_dup<mode>): Ditto.
3170         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
3171         * config/i386/constraints.md (Yi): Remove.
3172         (Yj): Remove.
3173         (Ym): Remove.
3174         (Yn): Remove.
3176 2018-04-26  Nathan Sidwell  <nathan@acm.org>
3178         * dumpfile.c (dump_open): New.
3179         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
3180         (dump_finish): Detect stdio/stderr by value not name.
3182 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
3184         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
3186 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3188         PR target/84952
3189         * config/nvptx/nvptx.c (verify_neutering_jumps)
3190         (verify_neutering_labels): New function
3191         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
3193 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3195         PR target/84025
3196         * config/nvptx/nvptx.c (needs_neutering_p): New function.
3197         (nvptx_single): Use needs_neutering_p to skip over insns that do not
3198         need neutering.
3200 2018-04-26  Richard Biener <rguenther@suse.de>
3201             Tom de Vries  <tom@codesourcery.com>
3203         PR lto/85422
3204         * lto-streamer-out.c (output_function): Fixup loops if required to match
3205         discovery done in the reader.
3207 2018-04-26  Richard Biener  <rguenther@suse.de>
3209         PR tree-optimization/85116
3210         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
3211         have a loop exit from the single latch predecessor.  Remove
3212         case of header with just condition.
3213         (ch_base::copy_headers): Exclude infinite loops from any
3214         processing.
3215         (pass_ch::execute): Record exits.
3217 2018-04-26  Richard Biener  <rguenther@suse.de>
3219         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
3220         prologue cost vector and pass it to vect_get_load_cost.
3221         (vect_get_peeling_costs_all_drs): Likewise.
3222         (vect_peeling_hash_get_lowest_cost): Likewise.
3223         (vect_enhance_data_refs_alignment): Likewise.
3225 2018-04-26  Richard Biener  <rguenther@suse.de>
3227         PR middle-end/85450
3228         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
3229         checking of integer<->pointer conversions.
3230         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
3231         sign-/zero-extending pointer types.
3232         (expand_omp_for_static_chunk): Likewise.
3234 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
3235             Jean Lee  <xiaoyur347@gmail.com>
3237         * config/mips/mips.c (mips_asan_shadow_offset): New function.
3238         (TARGET_ASAN_SHADOW_OFFSET): Define.
3239         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
3240         true for -fsanitize=address.
3242 2018-04-25  Mark Wielaard  <mark@klomp.org>
3244         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3245         shorter ones.
3247 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3249         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3250         than "alu", remove explicit "memory" and "imm_disp" attributes.
3251         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3253         PR middle-end/85414
3254         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3255         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3256         gen_lowpart_no_emit.
3258 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
3260         PR target/85473
3261         * config/i386/i386.c (ix86_expand_builtin): Change memory
3262         operand to XI, extend p0 to Pmode.
3263         * config/i386/i386.md: Change unspec volatile and operand
3264         1 mode to XI, change operand 0 mode to P.
3266 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3268         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3269         GET_MODE_MASK before any checking.
3270         (nds32_can_use_bset_p): Likewise.
3271         (nds32_can_use_btgl_p): Likewise.
3273 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3275         * config/nds32/nds32-doubleword.md: New define_split pattern for
3276         illegal register number.
3278 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3280         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3282 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3284         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3286 2018-04-25  Richard Biener  <rguenther@suse.de>
3288         * lto-streamer.h (LTO_major_version): Bump to 8.
3290 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3292         * BASE-VER: Set to 9.0.0.
3294 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
3296         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
3297         in __abskf2 and __powikf2.
3299 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3301         PR target/85512
3302         * config/aarch64/constraints.md (Usg, Usj): New constraints.
3303         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
3304         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
3305         Use the above on operand 2.  Reindent.
3306         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
3308 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3310         PR target/85485
3311         * common/config/i386/i386-common.c (ix86_handle_option): Don't
3312         handle OPT_mcet.
3313         * config/i386/i386.opt (mcet): Removed.
3314         * doc/install.texi: Remove -mcet documentation.
3315         * doc/invoke.texi: Likewise.
3317 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3319         PR target/85485
3320         * doc/install.texi: Remove -mcet from bootstrap-cet.
3322 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3324         PR target/85511
3325         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
3326         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
3327         if TARGET_64BIT.
3329         PR target/85503
3330         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
3331         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
3332         containing a CONST_VECTOR.
3334 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
3336         * doc/install.texi: Update newlib dependency for nvptx.
3338 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3340         PR target/85508
3341         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
3342         instead of INTVAL when shifting x left.
3344 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
3346         PR tree-optimization/85478
3347         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
3348         vect_grouped_store_supported for single element vectors.
3350 2018-04-24  Richard Biener  <rguenther@suse.de>
3352         PR target/85491
3353         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
3354         load cost increase to the case of non-constant step.
3356 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3358         PR target/84828
3359         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3360         destination if any_malformed_asm.
3362 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
3364         PR middle-end/85496
3365         * expr.c (store_field): In the bitfield case, if the value comes from
3366         a function call and is returned in registers by means of a PARALLEL,
3367         do not change the mode of the temporary unless BLKmode and VOIDmode.
3369 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
3371         PR rtl-optimization/85423
3372         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3373         dependencies to debug insns when the previous insn is non-debug.
3375 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3377         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3378         enums into a single definition.
3379         (fls): Fix predicates and printing.
3380         (seti): Likewise.
3382 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3384         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3385         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3386         and short u6 immediate.
3387         (check_if_valid_sleep_operand): Remove.
3388         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3390 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3392         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3393         flag_always_save_lp condition.
3394         * config/nds32/nds32.opt (malways-save-lp): New option.
3396 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3398         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3399         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3400         * config/nds32/nds32.h
3401         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3402         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3404 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3406         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3407         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3409 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3410             Chung-Ju Wu  <jasonwucj@gmail.com>
3412         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3413         Declare.
3414         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3415         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3417 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3419         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3421 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3423         * config/nds32/nds32-protos.h (nds32_data_alignment,
3424         nds32_local_alignment): Declare.
3425         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3426         nds32_local_alignment): New functions.
3427         (TARGET_CONSTANT_ALIGNMENT): Define.
3428         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3430 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3432         * config/nds32/nds32.c
3433         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3434         (TARGET_MODES_TIEABLE_P): Likewise.
3436 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3438         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3439         level Ofast and Og.
3441 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
3442             Chung-Ju Wu  <jasonwucj@gmail.com>
3444         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3445         for unaligned access.
3446         * config/nds32/nds32-intrinsic.c: Implementation of expanding
3447         unaligned access.
3448         * config/nds32/nds32-intrinsic.md: Likewise.
3449         * config/nds32/nds32_intrinsic.h: Likewise.
3450         * config/nds32/nds32.h (nds32_builtins): Likewise.
3451         * config/nds32/nds32.opt (munaligned-access): New option.
3452         * config/nds32/nds32.c (nds32_asm_file_start): Display
3453         flag_unaligned_access status.
3455 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3457         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3458         -mno-relax is present.
3459         * config/riscv/linux.h (LINK_SPEC): Ditto.
3461 2018-04-20  Martin Sebor  <msebor@redhat.com>
3463         PR c/85365
3464         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3465         for null pointers.
3466         (gimple_fold_builtin_stxcpy_chk): Same.
3467         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3469 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
3471         PR target/85456
3472         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3473         __powikf2 when long double is IEEE 128-bit.
3475 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3477         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3478         step to make sure stack always aligned.
3480 2018-04-20  Carl Love  <cel@us.ibm.com>
3482         PR target/83402
3483         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3484         size check for arg0.
3486 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3487             Tom de Vries  <tom@codesourcery.com>
3489         PR target/85445
3490         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3491         Emit insns for calls too.
3492         (nvptx_find_par): Always look for worker-level predecessor insn.
3493         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3494         calls.
3495         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3496         (nvptx_process_pars): Propagate frames for calls.
3498 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3500         PR target/85469
3501         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3502         Removed.
3503         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3504         (ix86_handle_option): Don't handle OPT_mibt.
3505         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3506         __SHSTK__.
3507         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3508         has_ibt and ibt.
3509         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3510         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3511         (ix86_target_macros): Define __CET__ with flag_cf_protection
3512         for -fcf-protection.
3513         * config/i386/i386.c (isa2_opts): Remove -mibt.
3514         * config/i386/i386.h (TARGET_IBT): Removed.
3515         (TARGET_IBT_P): Likewise.
3516         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3517         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3518         * config/i386/i386.opt (mcet): Update help message.
3519         (mshstk): Likewise.
3520         (mibt): Removed.
3521         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3522         -mcet as an alias for -mshstk.
3524 2018-04-20  Richard Biener <rguenther@suse.de>
3526         PR middle-end/85475
3527         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3528         complexity by forcing a single use of the multiply operand.
3530 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3532         ipa/85449
3533         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3534         recursion dependency to only apply to non-clones.
3536 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3538         ipa/85447
3539         * ipa-cp.c (create_specialized_node): Check that clones of
3540         self-recursive edges exist during IPA-CP.
3542 2018-04-19  Toon Moene  <toon@moene.org>
3544         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3545         by -O3. 
3547 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3549         PR tree-optimization/85467
3550         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3551         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3552         VECTOR_CST element to type.
3554 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3556         PR target/85397
3557         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3558         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3559         (builtin_longjmp): Likewise.
3560         (save_stack_nonlocal): New pattern.
3561         (restore_stack_nonlocal): Likewise.
3563 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3565         PR target/85404
3566         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3567         Replace ASM_OUTPUT_LABEL with fprintf.
3569 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3571         PR target/85417
3572         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3573         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3574         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3575         define __IBT__ and __SHSTK__ for -fcf-protection.
3576         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3577         TARGET_IBT.
3578         (ix86_trampoline_init): Likewise.
3579         (x86_output_mi_thunk): Likewise.
3580         (ix86_notrack_prefixed_insn_p): Likewise.
3581         (ix86_option_override_internal): Don't disallow -fcf-protection.
3582         * config/i386/i386.md (rdssp<mode>): Also enable for
3583         -fcf-protection.
3584         (incssp<mode>): Likewise.
3585         (nop_endbr): Likewise.
3586         * config/i386/i386.opt (mcet): Change help message to built-in
3587         functions only.
3588         (mibt): Likewise.
3589         (mshstk): Likewise.
3590         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3591         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3592         enable CET built-in functions.
3594 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3596         * common/config/i386/i386-common.c 
3597         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3598         OPTION_MASK_ISA_MOVDIRI_UNSET,
3599         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3600         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3601         * config.gcc (movdirintrin.h): New header.
3602         * config/i386/cpuid.h (bit_MOVDIRI,
3603         bit_MOVDIR64B): New bits.
3604         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3605         and -mmvodir64b.
3606         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3607         (VOID, PVOID, PCVOID)): New function types.
3608         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3609         __builtin_ia32_directstoreu_u64,
3610          __builtin_ia32_movdir64b): New builtins.
3611         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3612         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3613         and -mmovdiri.
3614         (ix86_valid_target_attribute_inner_p): Ditto.
3615         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3616         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3617         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3618         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3619         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3620         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3621         (movdiri<mode>, movdir64b_<mode>): New.
3622         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3623         * config/i386/immintrin.h: Include movdirintrin.h.
3624         * config/i386/movdirintrin.h: New file.
3625         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3627 2018-04-19  Richard Biener  <rguenther@suse.de>
3629         PR middle-end/85455
3630         * cfg.c (clear_bb_flags): When loop state says we have
3631         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3633 2018-04-19  Richard Biener  <rguenther@suse.de>
3635         PR tree-optimization/84737
3636         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3637         copying restrict info.
3638         (vect_setup_realignment): Use it.
3639         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3640         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3641         the first DR to all generated stores.
3642         (vectorizable_load): Likewise for loads.
3644 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3646         PR tree-optimization/85446
3647         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3648         the integral and pointer types to have the same precision.
3650         * doc/install.texi: Document --disable-cet being the default and
3651         --enable-cet=auto.
3653 2018-04-18  Martin Liska  <mliska@suse.cz>
3655         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3656         style.
3658 2018-04-18  Martin Liska  <mliska@suse.cz>
3660         Revert
3661         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3663         PR ipa/83983
3664         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3665         arguments if they are comparable.
3667 2018-04-18  Martin Liska  <mliska@suse.cz>
3669         Revert
3670         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3672         PR lto/84805
3673         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3674         incomplete types.
3676 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3678         PR target/85388
3679         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3680         ENDBR after calling __morestack.
3682 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3684         PR jit/85384
3685         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3686         by using gcc_base_ver to generate a gcc_driver_version, and use
3687         it when generating GCC_DRIVER_NAME.
3688         * configure: Regenerate.
3690 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3692         PR target/81084
3693         * config.gcc: Obsolete powerpc*-*-*spe*.
3695 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3697         PR debug/84637
3698         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3699         (stabstr_D): Change type of unum from unsigned int to
3700         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3701         type.
3703 2018-04-17  Jim Wilson  <jimw@sifive.com>
3705         PR 84856
3706         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3707         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3708         Set arg_pointer_offset after using pretend_args_size.
3710 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3712         PR rtl-optimization/85431
3713         * dse.c (record_store): Ignore zero width stores.
3715         PR sanitizer/85230
3716         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3717         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3718         __builtin_stack_restore rather than after it.
3719         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3720         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3721         argument instead of virtual_dynamic_stack_rtx.
3723 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3725         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3726         New prototype.
3727         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3728         Add note to error message to explain internal mapping of overloaded
3729         built-in function name to non-overloaded built-in function name.
3730         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3731         function.
3733 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3735         PR target/85424
3736         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3737         where the inputs overlap with the output.
3739 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3741         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3742         (=v, v) alternative and explicit "memory" attribute.
3743         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
3744         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3745         attributes.
3746         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3747         "sselog1" type instead of "sselog".
3748         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3749         "sselog".  Remove explicit "memory" attribute.
3750         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3751         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3752         attributes.
3753         (vec_extract_hi_v32hi): Merge all alternatives into one, use
3754         "sselog1" type instead of "sselog".  Remove explicit "memory"
3755         attribute.
3756         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3757         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3758         attribute.
3759         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3760         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3761         attributes.
3762         (vec_extract_hi_v64qi): Merge all alternatives into one, use
3763         "sselog1" type instead of "sselog".  Remove explicit "memory"
3764         attribute.
3765         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3766         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3767         attribute.
3769         PR target/85430
3770         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3772         PR middle-end/85414
3773         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3774         on a SUBREG.
3776 2018-04-17  Martin Jambor  <mjambor@suse.cz>
3778         PR ipa/85421
3779         * ipa-cp.c (create_specialized_node): Call
3780         expand_all_artificial_thunks if necessary.
3782 2018-04-17  Martin Liska  <mliska@suse.cz>
3784         PR lto/85405
3785         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3786         in message, remote space in between '_G' and '('.
3788 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3790         PR target/85281
3791         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3792         avx512f_vmcmp<mode>3<round_saeonly_name>,
3793         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
3794         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
3795         avx512f_rndscale<mode><round_saeonly_name>,
3796         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
3797         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
3798         Use %<iptr>2 instead of %2 for -masm=intel.
3799         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
3800         avx512f_vcvttss2usi<round_saeonly_name>,
3801         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
3802         -masm=intel.
3803         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
3804         avx512f_vcvttsd2usi<round_saeonly_name>,
3805         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
3806         Use %q1 instead of %1 for -masm=intel.
3807         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
3808         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
3809         of %3 for -masm=intel.
3810         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
3811         -masm=intel.
3812         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
3813         -masm=intel.
3814         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
3815         -masm=intel.
3816         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
3817         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
3818         %g1.
3819         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
3820         -masm=intel.
3821         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
3822         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
3823         %g1 and one with %0 and %1.
3824         (avx512er_vmrcp28<mode><round_saeonly_name>,
3825         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
3826         %1 for -masm=intel.
3827         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
3828         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
3829         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
3830         of %0 and %{%4%} for -masm=intel.
3831         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
3832         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
3833         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
3834         order of %0 and %{%5%}%{z%} for -masm=intel.
3836 2018-04-17  Jan Hubicka  <jh@suse.cz>
3838         PR lto/85405
3839         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
3841 2018-04-17  Martin Liska  <mliska@suse.cz>
3843         PR ipa/85329
3844         * multiple_target.c (create_dispatcher_calls): Set apostrophes
3845         for target_clone error message.  Make default implementation
3846         clone to be a local declaration.
3847         (separate_attrs): Add new argument and check for an empty
3848         string.
3849         (expand_target_clones): Handle it.
3850         (ipa_target_clone): Make redirection just for target_clones
3851         functions.
3853 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
3854             Tom de Vries  <tom@codesourcery.com>
3856         PR middle-end/84955
3857         * omp-expand.c (expand_oacc_for): Add dummy false branch for
3858         tiled basic blocks without omp continue statements.
3860 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
3862         PR target/83660
3863         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
3864         vec_extract expression as having side effects to make sure it gets
3865         a cleanup point.
3867 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
3869         PR target/85403
3870         * config/i386/i386.c (get_builtin_code_for_version): Check
3871         error_mark_node.
3873 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
3875         PR target/84331
3876         * gcc/config.gcc: Support "skylake".
3877         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
3878         PROCESSOR_SKYLAKE.
3879         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
3880         (processor_target_table): Add "skylake".
3881         (ix86_option_override_internal): Add "skylake".
3882         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
3883         PROCESSOR_CANNONLAKE.
3884         (get_builtin_code_for_version): Fix priority for
3885         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
3886         PROCESSOR_SKYLAKE-AVX512.
3887         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
3888         (processor_type): Add PROCESSOR_SKYLAKE.
3890 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3891             Jason Merrill  <jason@redhat.com>
3893         PR c++/85112
3894         * convert.c (convert_to_integer_1): Use direct recursion for
3895         enumeral types and types with a precision less than the number
3896         of bits in their mode.
3898 2018-04-16  Julia Koval  <julia.koval@intel.com>
3900         PR target/84413
3901         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
3902         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
3904 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
3906         PR target/85293
3907         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
3908         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
3909         and -mno-direct-move.
3911 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
3913         PR target/83402
3914         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
3915         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
3916         Ensure negative shifts result in {0}.
3918 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
3920         PR rtl-optimization/79916
3921         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
3922         regs (if any) to define how to gnerate SD moves when LRA is in
3923         progress.
3925 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
3927         PR rtl-optimization/85393
3928         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
3929         * except.c (expand_dw2_landing_pad_for_region): Make static.
3930         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
3931         a label and unconditional jump to old_bb, rather than
3932         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
3933         basic block.
3935         PR rtl-optimization/85376
3936         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
3937         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
3938         instead of a specific value.
3940 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3941             Bin Cheng  <bin.cheng@arm.com>
3943         PR tree-optimization/82965
3944         PR tree-optimization/83991
3945         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
3946         by_profile_only parameter.
3947         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
3948         information if the loop was predicted to iterate too many times.
3949         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
3951 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3953         PR lto/71991
3954         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
3955         always inline.
3957 2018-04-13  Martin Liska  <mliska@suse.cz>
3958             Jakub Jelinek  <jakub@redhat.com>
3960         PR middle-end/81657
3961         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
3962         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
3963         * builtins.c (expand_builtin_memory_copy_args): Use
3964         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
3965         handle dest_addr == pc_rtx.
3967 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
3969         PR target/85291
3970         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
3971         asked to not generate direct moves.
3972         (fix_trunc<mode>si2_stfiwx): Similar.
3973         (fix_trunc<mode>si2_internal): Similar.
3975 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3977         PR debug/83157
3978         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
3979         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
3980         lookup if dest in some wider mode is known to be const0_rtx and
3981         if so, record permanent equivalence for it to be ZERO_EXTEND of
3982         the narrower mode destination.
3984 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3986         * lto-streamer-out.c (output_function): Revert 259346.
3987         * omp-expand.c (expand_oacc_for): Likewise.
3989 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
3991         PR rtl-optimization/85354
3992         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
3993         * sel-sched.c (sel_global_init): ... here.
3995 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
3997         PR target/85238
3998         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
3999         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4000         mode for PE-COFF targets.
4001         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
4002         (i386_pe_asm_lto_end): Likewise.
4003         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
4004         (TARGET_ASM_LTO_END): Likewise.
4005         * config/i386/winnt.c (saved_debug_info_level): New static variable.
4006         (i386_pe_asm_lto_start): New function.
4007         (i386_pe_asm_lto_end): Likewise.
4009 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4010             Richard Biener  <rguenther@suse.de>
4012         PR middle-end/84955
4013         * lto-streamer-out.c (output_function): Fix CFG loop state before
4014         streaming out.
4015         * omp-expand.c (expand_oacc_for): Handle calls to internal
4016         functions like regular functions.
4018 2018-04-12  Richard Biener  <rguenther@suse.de>
4020         PR lto/85371
4021         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
4022         for the early LTO debug to properly generate references to it
4023         during DIE emission.  Do not re-use that for the skeleton for
4024         split-dwarf.
4025         (dwarf2out_early_finish): Likewise.
4027 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4029         PR target/85328
4030         * config/i386/sse.md
4031         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
4032         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
4033         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
4034         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
4035         and output is a reg, avoid creating invalid lowpart subreg, but
4036         instead split into a 512-bit move.  Don't split if not AVX512VL,
4037         input is xmm16+ reg and output is a mem.
4038         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
4039         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
4040         xmm16+ reg and output is a mem.
4042 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4044         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
4045         also for flag_dwarf2_cfi_asm.
4047 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4049         PR rtl-optimization/85342
4050         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
4051         a bool scalar var inside of the loop instead.  Don't try to update
4052         recog_data.operand after failed apply_change_group.
4054 2018-04-12  Tom de Vries  <tom@codesourcery.com>
4056         PR target/85296
4057         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
4058         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
4059         array with flexible array member as array without given dimension.
4060         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
4061         argument for undefined param to true.
4063 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
4065         PR target/85321
4066         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4067         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
4068         from PowerPC section.
4069         * config/rs6000/sysv4.opt (mcall-): Improve help text.
4070         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
4071         help text that is too long.
4072         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
4073         help text that is too long.
4074         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
4075         help text that is too long.
4077 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
4079         * config/alpha/alpha.md (stack_probe_internal): Rename
4080         from "probe_stack".  Update all callers.
4082 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4084         PR rtl-optimization/84566
4085         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
4086         sched_macro_fuse_insns.
4088 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4090         PR target/84301
4091         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
4092         (compute_block_dependences): ... from here.
4094 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4096         PR tree-optimization/85331
4097         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
4098         from int to HOST_WIDE_INT.
4100 2018-04-11  Martin Jambor  <mjambor@suse.cz>
4102         PR ipa/84149
4103         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
4104         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
4105         not the same as the source val.
4106         (cgraph_edge_brings_value_p): New parameter.
4107         (gather_edges_for_value): Pass destination value to
4108         cgraph_edge_brings_value_p.
4109         (perhaps_add_new_callers): Likewise.
4110         (get_info_about_necessary_edges): Likewise and exclude values brought
4111         only by self-recursive edges.
4112         (create_specialized_node): Redirect only clones of self-calling edges.
4113         (+self_recursive_pass_through_p): New function.
4114         (find_more_scalar_values_for_callers_subset): Use it.
4115         (find_aggregate_values_for_callers_subset): Likewise.
4116         (known_aggs_to_agg_replacement_list): Removed.
4117         (decide_whether_version_node): Re-calculate known constants for all
4118         remaining context clones.
4120 2018-04-11  Richard Biener  <rguenther@suse.de>
4122         PR lto/85339
4123         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
4124         from early DWARF output.
4125         (dwarf2out_early_finish): Output line info unconditionally into
4126         early DWARF and add reference to it.
4128 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4130         PR target/85281
4131         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
4132         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
4133         other than V2DFmode using iptr mode attribute.
4134         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
4136 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4138         PR rtl-optimization/84659
4139         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
4141 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4143         PR debug/85302
4144         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
4145         SIZEP is NULL.
4146         (output_loc_list): Pass address of a dummy size variable even in the
4147         locview handling loop.
4148         (index_location_lists): Add comment on why skip_loc_list_entry can't
4149         call size_of_locs.
4151 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4153         PR target/85261
4154         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
4155         into register.
4157 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
4159         PR target/85321
4160         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4161         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
4162         and -mstring-compare-inline-limit.
4164 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4166         PR target/85287
4167         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
4168         for stack clash protection in a register whenever we need it to be in
4169         a register.
4171 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4173         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
4174         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
4176 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4178         PR target/85321
4179         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
4180         the help text.
4181         (mlong-double-): Ditto.
4182         * config/rs6000/sysv4.opt (msdata=): Ditto.
4183         (mtls-size=): Ditto.
4185 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4187         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4188         erroneous entries for
4189         "vector int vec_ldl (int, long int *)", and
4190         "vector unsigned int vec_ldl (int, unsigned long int *)".
4191         Add comments and entries for
4192         "vector bool char vec_ldl (int, bool char *)",
4193         "vector bool short vec_ldl (int, bool short *)",
4194         "vector bool int vec_ldl (int, bool int *)",
4195         "vector bool long long vec_ldl (int, bool long long *)",
4196         "vector pixel vec_ldl (int, pixel *)",
4197         "vector long long vec_ldl (int, long long *)",
4198         "vector unsigned long long vec_ldl (int, unsigned long long *)".
4199         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
4200         type tree bool_long_long_type_node and correct definition of
4201         bool_V2DI_type_node to make reference to this new type tree.
4202         (rs6000_mangle_type): Replace erroneous reference to
4203         bool_long_type_node with bool_long_long_type_node.
4204         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
4205         comments to emphasize sign distinctions for char and int types and
4206         replace RS6000_BTI_bool_long constant with
4207         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
4208         use of RS6000_BTI_pixel.
4209         (bool_long_type_node): Remove this macro definition.
4210         (bool_long_long_type_node): New macro definition
4212 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4214         PR rtl-optimization/85300
4215         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
4216         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
4217         simplify_unary_operation fails.
4219 2018-04-10  Martin Liska  <mliska@suse.cz>
4221         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
4222         cgraph_edge and ipa_ref.
4224 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4226         PR target/85177
4227         PR target/85255
4228         * config/i386/sse.md
4229         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
4230         computation of the VEC_MERGE selector from mask.
4231         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
4232         Fix decoding of the VEC_MERGE selector into mask.
4234 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4236         PR tree-optimization/85286
4237         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
4239 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4241         * final.c (final_1): Set insn_last_address as well as
4242         insn_current_address.
4244 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4246         PR target/85173
4247         * explow.c (emit_stack_probe): Call validize_mem on memory location
4248         before passing it to gen_probe_stack.  Create address operand and
4249         legitimize it for the probe_stack_address case.
4251 2018-04-09  Jan Hubicka  <jh@suse.cz>
4253         PR lto/85078
4254         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4255         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4256         * tree.c (free_lang_data_in_type): Fix handling of binfos;
4257         walk basetypes.
4258         (free_lang_data): Rebuild type inheritance graph.
4260 2018-04-09  Martin Sebor  <msebor@redhat.com>
4262         * invoke.texi (-finline-small-functions): Mention other optimization
4263         options.
4264         (-findirect-inlining, -fpartial-inlining): Same.
4265         (-finline-functions-called-once): Same.
4266         (-freorder-blocks-and-partition): Same.
4268 2018-04-09  Jan Hubicka  <jh@suse.cz>
4270         PR rtl/84058
4271         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4272         jumps; choose last target that matches the criteria (i.e.
4273         no partition changes for non-crossing jumps).
4274         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4275         support for redirecting crossing jumps to non-crossing.
4277 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
4279         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4280         also for naked functions.
4282 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
4284         * config/arc/arc.md (add_shift): New pattern.
4285         (add_shift2): Likewise.
4286         (sub_shift): Likewise.
4287         (sub_shift_cmp0_noout): Likewise.
4288         (compare_si_ashiftsi): Likewise.
4289         (xbfu_cmp0_noout): New combine pattern.
4290         (xbfu_cmp0"): Likewise.
4291         (movsi_set_cc_insn): Place the predicable variant first.
4292         (commutative_binary_cmp0_noout): Remove clobber.
4293         (commutative_binary_cmp0): New pattern.
4294         (noncommutative_binary_cmp0): Likewise.
4295         (noncommutative_binary_cmp0_noout): Likewise.
4296         (noncommutative_binary_comparison_result_used): Removed.
4297         (rsub_cmp0): New pattern.
4298         (rsub_cmp0_noout): Likewise.
4299         (extzvsi): Changed, keep only meaningful variants.
4300         (SQH, SEZ): New iterators.
4301         (SQH_postfix): New mode attribute.
4302         (SEZ_prefix): New code attribute.
4303         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
4304         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
4305         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
4306         of numerical value.
4307         (noncommutative_operator): Check the availability of barrel
4308         shifter option.
4310 2018-04-09  Richard Biener  <rguenther@suse.de>
4312         PR tree-optimization/85284
4313         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
4314         Only use the niter constraining form of simple_iv when the exit
4315         is always executed.
4317 2018-04-09  Tom de Vries  <tom@codesourcery.com>
4319         PR target/84041
4320         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4321         (define_expand "*memory_barrier"): New define_expand.
4322         (define_insn "memory_barrier"): New insn.
4324 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4326         PR rtl-optimization/80463
4327         PR rtl-optimization/83972
4328         PR rtl-optimization/83480
4330         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
4331         correct producer for the insn.
4332         (tidy_control_flow): Fixup seqnos in case of debug insns.
4334 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4336         PR rtl-optimization/83913
4338         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
4339         different sched-times when merging exprs.
4341 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4343         PR rtl-optimization/83962
4345         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
4346         tidy_fallthru_edge and tidy_control_flow.
4348 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4350         PR rtl-optimization/83530
4352         * sel-sched.c (force_next_insn): New global variable.
4353         (remove_insn_for_debug): When force_next_insn is true, also leave only
4354         next insn in the ready list.
4355         (sel_sched_region): When the region wasn't scheduled, make another pass
4356         over it with force_next_insn set to 1.
4358 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4360         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4361         into tm_file.
4362         * config/nds32/constants.md (unspec_volatile_element): Add enum values
4363         for interrupt control.
4364         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4365         functions for interrupt control.
4366         * config/nds32/nds32-intrinsic.md: Likewise.
4367         * config/nds32/nds32_intrinsic.h: Likewise.
4368         * config/nds32/nds32.h (nds32_builtins): Likewise.
4370 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4372         * config/nds32/nds32.c (nds32_init_machine_status,
4373         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4374         strict_aligned_p field.
4375         (nds32_expand_to_rtl_hook): New function.
4376         (TARGET_EXPAND_TO_RTL_HOOK): Define.
4377         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4379 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4380             Chung-Ju Wu  <jasonwucj@gmail.com>
4382         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4383         * config/nds32/nds32-n7.md: New file.
4384         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4385         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4386         pipeline.
4387         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4388         * config/nds32/nds32.md (pipeline_model): Add n7.
4389         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4390         * config/nds32/pipelines.md: Include n7 settings.
4392 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4393             Chung-Ju Wu  <jasonwucj@gmail.com>
4395         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4396         * config/nds32/nds32-e8.md: New file.
4397         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4398         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4399         pipeline.
4400         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4401         * config/nds32/nds32.md (pipeline_model): Add e8.
4402         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4403         * config/nds32/pipelines.md: Include e8 settings.
4405 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4406             Chung-Ju Wu  <jasonwucj@gmail.com>
4408         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4409         * config/nds32/nds32-n8.md: New file.
4410         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4411         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4412         pipeline.
4413         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4414         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4415         * config/nds32/nds32.md (pipeline_model): Add n8.
4416         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4417         * config/nds32/pipelines.md: Include n8 settings.
4419 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4420             Chung-Ju Wu  <jasonwucj@gmail.com>
4422         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4423         * config/nds32/nds32-n9-2r1w.md: New file.
4424         * config/nds32/nds32-n9-3r2w.md: New file.
4425         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4426         nds32_register_ports): New or modify for cpu n9.
4427         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4428         pipeline.
4429         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4430         * config/nds32/nds32-utils.c: New file.
4431         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4432         TARGET_MUL_SLOW): Define.
4433         * config/nds32/nds32.md (pipeline_model): New attribute.
4434         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4435         New options that support cpu n9.
4436         * config/nds32/pipelines.md: Include n9 settings.
4437         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4439 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4441         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4442         information if necessary.
4443         (output_cond_branch_compare_zero): Likewise.
4444         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4445         (nds32_target_alignment): Refine for alignment.
4446         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4447         (FUNCTION_BOUNDARY): Modify.
4448         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4449         align case.
4450         * config/nds32/nds32.opt (malways-align, malign-functions): New.
4452 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4454         * config/nds32/constants.md (unspec_volatile_element): Add values for
4455         TLB operation and data prefetch.
4456         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4457         functions for TLB operation and data prefetch.
4458         * config/nds32/nds32-intrinsic.md: Likewise.
4459         * config/nds32/nds32_intrinsic.h: Likewise.
4460         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4461         (nds32_print_operand): Likewise.
4462         * config/nds32/nds32.h (nds32_builtins): Likewise.
4464 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4465         Andrew Pinski <pinsika@gcc.gnu.org>
4467         PR middle-end/82976
4468         * match.pd: Use constant_boolean_node of correct type instead of
4469         boolean_true_node or boolean_false_node for simplifying
4470         pointer comparisons to zero.
4472 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4474         PR tree-optimization/80021
4475         * tree.c (verify_type_variant): Make error call in verify_variant_match
4476         translatable and remove final full stop.
4478 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4480         * config/nds32/constants.md (unspec_volatile_element): Add
4481         UNSPEC_VOLATILE_EH_RETURN.
4482         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4483         nds32_output_stack_pop): Support dwarf exception handling process.
4484         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4485         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4486         exception handling process.
4487         (nds32_compute_stack_frame): Likewise.
4488         (nds32_return_addr_rtx): Likewise.
4489         (nds32_initial_elimination_offset): Likewise.
4490         (nds32_expand_prologue): Likewise.
4491         (nds32_expand_epilogue): Likewise.
4492         (nds32_dynamic_chain_address): New function.
4493         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4494         exception handling.
4495         (DYNAMIC_CHAIN_ADDRESS): Define.
4496         (EH_RETURN_DATA_REGNO): Define.
4497         (EH_RETURN_STACKADJ_RTX): Define.
4498         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4499         patterns for dwarf exception handling.
4501 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4503         * config/nds32/nds32.h: Clean up obsolete macros.
4505 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4507         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4508         Add enum values for particular instructions.
4509         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4510         particular intrinsic functions.
4511         * config/nds32/nds32-intrinsic.md: Likewise.
4512         * config/nds32/nds32_intrinsic.h: Likewise.
4513         * config/nds32/nds32.h (nds32_builtins): Likewise.
4514         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4515         (btst, ave): New patterns for particular instructions.
4517 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4519         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4520         Add enum values for atomic load/store and memory sync.
4521         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4522         and memory sync.
4523         * config/nds32/nds32-intrinsic.md: Likewise.
4524         * config/nds32/nds32_intrinsic.h: Likewise.
4525         * config/nds32/nds32.h (nds32_builtins): Likewise.
4527 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4529         PR tree-optimization/85257
4530         * fold-const.c (native_encode_vector): If not all elts could fit
4531         and off is -1, return 0 rather than offset.
4532         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4533         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4534         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4535         adjust buffer in native_interpret_expr call.
4537 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4539         * config/nds32/constants.md (unspec_volatile_element): Add cache
4540         control enum values.
4541         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4542         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4543         * config/nds32/nds32.c (nds32_cctl_names): New.
4544         (nds32_print_operand): Handle cache control register names.
4545         * config/nds32/nds32.h (nds32_builtins): New enum values.
4546         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4547         macros.
4548         * config/nds32/nds32.md (type): Add mmu.
4549         * config/nds32/pipelines.md (simple_insn): Add mmu.
4551 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4553         * config/nds32/nds32.md (type): Remove call.
4554         * config/nds32/pipelines.md (simple_insn): Likewise.
4556 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4558         * config/nds32/constants.md (unspec_volatile_element): Add
4559         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4560         UNSPEC_VOLATILE_FMFCFG.
4561         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4562         description for fmfcfg and fmfcsr.
4563         (bdesc_1arg): Add fmtcsr.
4564         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4565         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4566         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4567         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4568         unspec_fmfcfg): New patterns.
4569         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4570         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4571         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4572         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4573         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4574         __nds32__fmfcfg): Define.
4576 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4578         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4579         intrinsic register names.
4580         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4581         intrinsic register enum values and macros.
4583 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4585         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4586         for load/store addressing form.
4587         (nds32_print_operand_address): Likewise.
4589 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4591         PR target/85196
4592         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4593         based on LABEL_REF.  Remove useless assertion.
4594         (pic_address_needs_scratch): Fix formatting.
4595         (sparc_legitimize_pic_address): Minor tweaks.
4596         (sparc_delegitimize_address): Adjust assertion accordingly.
4597         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4598         into symbolic_operand.
4599         (movsi_high_pic_label_ref): Likewise.
4600         (movsi_lo_sum_pic_label_ref): Likewise.
4601         (movdi_pic_label_ref): Likewise.
4602         (movdi_high_pic_label_ref): Likewise.
4603         (movdi_lo_sum_pic_label_ref): Likewise.
4605 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4607         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4608         custom LIB_SPEC setup.
4610 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4611             Kito Cheng  <kito.cheng@gmail.com>
4613         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4614         * config/riscv/freebsd.h: New.
4616 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4618         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4619         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4620         file.
4622 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4623             Kito Cheng  <kito.cheng@gmail.com>
4625         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4626         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4627         * config/nds32/nds32-protos.h (nds32_output_call,
4628         nds32_output_return): Declare.
4629         * config/nds32/nds32.md: Refine all the call and return patterns.
4631 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4633         PR debug/85252
4634         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4635         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4637         PR rtl-optimization/84872
4638         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4639         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4640         EDGE_CROSSING edge.
4642 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4644         * expr.c (copy_blkmode_to_reg): Revert 254862.
4645         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4647 2018-04-06  Richard Biener  <rguenther@suse.de>
4649         PR middle-end/85244
4650         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4651         after seeing a component reference with an adjacent field.  Treat
4652         refs to arrays at struct end of external decls similar to
4653         refs to unconstrained commons.
4655 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4657         PR sanitizer/85213
4658         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4659         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4660         recursive calls.
4661         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4662         save_p here.
4664 2018-04-06  Richard Biener  <rguenther@suse.de>
4666         PR middle-end/85180
4667         * alias.c (find_base_term): New wrapper around find_base_term
4668         unwinding CSELIB_VAL_PTR changes.
4669         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4670         recursion.
4672 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4674         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4675         instructions.
4676         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4677         constant definitions.
4678         ("nop"): lr 0,0 -> nopr r0
4679         ("nop_lr0", "nop_lr1"): New insn definitions.
4681 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4683         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4684         NDS32_V3PUSH_AVAILABLE_P macro.
4686 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4687             Chung-Ju Wu  <jasonwucj@gmail.com>
4689         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4690         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4691         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4692         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4693         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4694         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4695         * config/nds32/constraints.md: New constraints and checking for hard
4696         float configuration.
4697         * config/nds32/iterators.md: New mode iterator and attribute for hard
4698         float configuration.
4699         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4700         patterns.
4701         * config/nds32/nds32-fpu.md: New file.
4702         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4703         deal with hard float code generation.
4704         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4705         ARCH_V3S.
4706         (abi_type, float_reg_number): New enum type.
4707         * config/nds32/nds32-predicates.c: New predicates for hard float.
4708         * config/nds32/nds32-protos.h: Declare functions for hard float.
4709         * config/nds32/nds32.c: Implementation for hard float configuration.
4710         * config/nds32/nds32.h: Definitions for hard float configuration.
4711         * config/nds32/nds32.md: Include hard float machine description and
4712         modify patterns for hard float configuration.
4713         * config/nds32/nds32.opt: New options for hard float configuration.
4714         * config/nds32/predicates.md: New predicates for hard float
4715         configuration.
4717 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4719         * common/config/nds32/nds32-common.c
4720         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4722 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4724         PR middle-end/85195
4725         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4726         CONSTRUCTOR_ELT (ctor, ...)->value.
4728 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4730         PR target/85193
4731         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4733 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4735         PR target/85204
4736         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4737         cond jump.
4739 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4740             Kito Cheng  <kito.cheng@gmail.com>
4742         * config/nds32/constraints.md (U33): Fine-tune checking condition.
4743         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4744         * config/nds32/nds32.h (nds32_16bit_address_type): Add
4745         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4747 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4748             Kito Cheng  <kito.cheng@gmail.com>
4750         * config/nds32/constraints.md (Ufe): New memory constraint.
4751         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4752         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4753         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4754         operands.
4755         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4756         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4758 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4760         * config/nds32/nds32.md: Use optimize_size in the condition for
4761         alu-shift instructions.
4763 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4765         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4767 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4769         * config/nds32/nds32.md (negsi2): Refine pattern.
4771 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4772             Chung-Ju Wu  <jasonwucj@gmail.com>
4774         * config/nds32/iterators.md (shift_rotate): New code iterator.
4775         (shift): New code attribute.
4776         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4777         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4778         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4779         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4780         bit-wise operations.
4781         (andsi3, *andsi3): Ditto.
4782         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4783         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4784         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4785         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4786         nds32_ior_operand, nds32_xor_operand): New predicates.
4788 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4790         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4791         (addsi3, subsi3): ... this.
4793 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4795         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
4797 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4799         * config/nds32/nds32.md: Adjust indention.
4801 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4803         * config/nds32/nds32.md (feature): New attribute.
4805 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4807         * config/nds32/nds32.md (subtype): New attribute.
4809 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4811         PR target/85203
4812         * config/arm/arm-builtins.c (arm_expand_builtin): Change
4813         expansion to perform a bitwise AND of the argument followed by a
4814         boolean negation of the result.
4816 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
4818         PR rtl-optimization/84878
4819         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
4820         the basic block.  Assert the use reference is not artificial and that
4821         it has an associated insn.
4823 2018-04-04  Michael Matz  <matz@suse.de>
4825         * builtins.c (compute_objsize): Pass correct operand
4826         to array_at_struct_end_p.
4828 2018-04-04  Richard Biener  <rguenther@suse.de>
4830         PR lto/85176
4831         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
4832         from contexts for DINFO_LEVEL_TERSE and below.
4834 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4836         * config/nds32/nds32-doubleword.md (move_<mode>): Require
4837         resiter_operand condition.
4838         * config/nds32/nds32.md (*move<mode>): Ditto.
4840 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4841             Monk Chiang  <sh.chiang04@gmail.com>
4843         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
4845 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4847         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
4849 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4850             Kito Cheng  <kito.cheng@gmail.com>
4852         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
4853         nds32_cond_code_str, output_cond_branch,
4854         output_cond_branch_compare_zero, nds32_expand_cbranch,
4855         nds32_expand_cstore, nds32_expand_movcc,
4856         nds32_output_cbranchsi4_equality_zero,
4857         nds32_output_cbranchsi4_equality_reg,
4858         nds32_output_cbranchsi4_equality_reg_or_const_int,
4859         nds32_output_cbranchsi4_greater_less_zero: New functions.
4860         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
4861         nds32_expand_cstore, nds32_expand_movcc,
4862         nds32_output_cbranchsi4_equality_zero,
4863         nds32_output_cbranchsi4_equality_reg,
4864         nds32_output_cbranchsi4_equality_reg_or_const_int,
4865         nds32_output_cbranchsi4_greater_less_zero): Declare.
4866         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
4867         nds32_rimm11s_operand): New predicates.
4868         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
4869         * config/nds32/nds32.md: Rewrite all the branch and conditional move
4870         patterns.
4872 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4874         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
4875         * config/nds32/nds32.md: Ditto.
4876         * config/nds32/pipelines.md: Ditto.
4878 2018-04-04  Richard Biener  <rguenther@suse.de>
4880         PR tree-optimization/85168
4881         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
4882         propagating abnormals.
4884 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4886         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
4888 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4889             Kito Cheng  <kito.cheng@gmail.com>
4891         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
4892         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
4893         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
4894         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
4895         * config/nds32/nds32.md (sibcall_internal): New.
4896         (sibcall_register): Remove.
4897         (sibcall_immediate): Remove.
4898         (sibcall_value_internal): New.
4899         (sibcall_value_register): Remove.
4900         (sibcall_value_immediate): Remove.
4901         * config/nds32/predicates.md (nds32_general_register_operand): New.
4902         (nds32_call_address_operand): New.
4904 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4906         PR rtl-optimization/85167
4907         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
4908         bb_defs if *split_p, instead preinitialize it to NULL.
4910         PR tree-optimization/85156
4911         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
4912         evaluating the argument multiple times.
4914 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
4916         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
4917         than vector.
4918         (_mm_cvtpd_ps): Likewise.
4919         (_mm_cvttpd_epi32): Likewise.
4920         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
4921         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
4922         vector, pixel, and bool following altivec.h include.
4924 2018-04-03  Martin Sebor  <msebor@redhat.com>
4926         * doc/extend.texi (Common Function Attributes): Clarify.
4927         (const attribute): Likewise.
4928         (pure attribute): Likewise.
4930 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4932         PR target/85169
4933         * config/i386/i386.c (ix86_expand_vector_set): Use
4934         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
4936 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
4938         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
4939         instructions when changing rounding bits to preserve precision bits
4940         in the x87 control word.
4942 2018-04-03  Martin Liska  <mliska@suse.cz>
4944         PR tree-optimization/82491
4945         * rtl.h (strip_offset_and_add): Replace += suboffset with
4946         poly_uint64 () + suboffset.
4948 2018-03-29  Martin Liska  <mliska@suse.cz>
4949             Martin Jambor  <mjambor@suse.cz>
4951         PR ipa/84947
4952         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
4953         param_type is not an integral or pointer type.
4955 2018-04-03  Richard Biener  <rguenther@suse.de>
4957         * sese.h (recompute_all_dominators): Remove.
4959 2018-04-02  Martin Sebor  <msebor@redhat.com>
4961         * doc/invoke.texi (-Wrestrict): Fix typos.
4963 2018-04-02  Jim Wilson  <jimw@sifive.com>
4965         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
4966         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
4967         (<optab>di3, <optab>si3_extend): Likewise.
4968         (<optab>si3_mask, <optab>si3_mask_1): New.
4969         (<optab>di3_mask, <optab>di3_mask_1): New.
4970         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
4971         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
4972         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
4974 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
4976         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
4977         example.
4979 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4981         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
4982         (nds32_canonicalize_comparison): New function.
4984 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4985             Kito Cheng  <kito.cheng@gmail.com>
4986             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4988         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
4989         * config/nds32/constants.md (unspec_volatile_element): Add
4990         UNSPEC_VOLATILE_RELAX_GROUP.
4991         * config/nds32/nds32-relax-opt.c: New file.
4992         * config/nds32/nds32-predicates.c
4993         (nds32_symbol_load_store_p): New function.
4994         * config/nds32/nds32-protos.h
4995         (nds32_symbol_load_store_p): Declare function.
4996         (make_pass_nds32_relax_opt): Declare new rtl pass function.
4997         * config/nds32/nds32.c
4998         (nds32_register_pass): New function to register pass.
4999         (nds32_register_passes): New function to register passes.
5000         * config/nds32/nds32.md (relax_group): New pattern.
5001         * config/nds32/nds32.opt (mrelax-hint): New option.
5002         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
5004 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
5006         * config/nds32/t-nds32: Modify files dependency.
5008 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5010         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
5011         (PROFILE_HOOK): Define its implementation.
5013 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5015         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
5016         type and 32-bit size.
5018 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
5020         PR middle-end/85090
5021         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
5022         (V_128_256): New mode iterator.
5023         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
5024         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
5025         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
5026         of V.
5027         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
5028         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
5030 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
5032         PR target/83315
5033         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
5034         NaN inputs correctly.
5036 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
5038         PR target/80546
5039         * config/rs6000/vsx.md (??r): New mode attribute.
5040         (*vsx_mov<mode>_64bit): Use it.
5041         (*vsx_mov<mode>_32bit): Likewise.
5043 2018-03-30  Martin Sebor  <msebor@redhat.com>
5045         PR tree-optimization/84818
5046         * builtins.c (check_access): Use warning_n.
5048 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5050         PR target/83822
5051         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
5052         condition.
5053         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
5054         condition.
5056 2018-03-30  Julia Koval  <julia.koval@intel.com>
5058         PR target/84413
5059         * x86-tune.def (movx, partial_reg_dependency): Enable for
5060         m_SKYLAKE_AVX512.
5062 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
5064         PR inline-asm/84985
5065         * lra-constraints.c (process_alt_operands): Move setting
5066         this_alternative_matches below.
5068 2018-03-29  Martin Liska  <mliska@suse.cz>
5070         PR lto/84995.
5071         * doc/invoke.texi: Document how LTO works with debug info.
5072         Describe auto-load support of binutils.  Mention 'x86-64'
5073         as valid option value of -march option.
5075 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
5077         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
5079         PR c/85094
5080         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
5081         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
5082         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
5083         checking.
5085 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5087         PR target/84912
5088         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
5089         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
5090         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
5091         for RS6000_BTM_POWERPC64.
5092         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
5093         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
5094         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
5095         definition.
5096         (DIVDE): Use it.
5097         (DIVDEU): Likewise.
5099 2018-03-28 Carl Love  <cel@us.ibm.com>
5101         Revert
5102         2017-09-27  Carl Love  <cel@us.ibm.com>
5104         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
5105         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
5106         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
5107         fctiw instruction.
5109 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5111         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
5112         instead of __vector bool.
5113         (_mm_max_pu8): Likewise.
5114         (_mm_min_pi16): Likewise.
5116 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5118         PR target/84912
5119         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
5120         (DIVWEUO): Likewise.
5121         (DIVDEO): Likewise.
5122         (DIVDEUO): Likewise.
5123         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
5124         DIVWEUO and DIVDEUO.
5125         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
5126         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
5127         (div_extend): Likewise.
5128         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
5129         builtin function.
5130         (__builtin_divweuo): Likewise.
5131         (__builtin_divdeo): Likewise.
5132         (__builtin_divdeuo): Likewise.
5134 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5136         PR target/85095
5137         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
5138         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
5140         PR tree-optimization/82004
5141         * gimple-match-head.c (optimize_pow_to_exp): New function.
5142         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
5143         Don't fold to exp if optimize_pow_to_exp is false.
5145 2018-03-28  Martin Liska  <mliska@suse.cz>
5147         PR other/84819
5148         * calls.c (initialize_argument_information): Fix trailing space.
5149         * common.opt: Fix typo and provide better explanation for
5150         -fsanitize-coverage option.
5151         * config/i386/i386.opt: Fix typo.
5153 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5154             Martin Liska  <mliska@suse.cz>
5156         PR sanitizer/85081
5157         * gimplify.c (asan_poison_variable): Don't do the check for
5158         gimplify_omp_ctxp here.
5159         (gimplify_decl_expr): Do it here.
5160         (gimplify_target_expr): Likewise.
5162 2018-03-28  Martin Liska  <mliska@suse.cz>
5164         PR target/84988
5165         * config/i386/i386.c (ix86_function_arg_advance): Do not call
5166         chkp_type_bounds_count if MPX is not enabled.
5168 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5170         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
5172 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
5174         PR target/84914
5175         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
5176         function to create the function decl for complex long double
5177         multiply and divide for -mabi=ieeelongdouble.
5178         (init_float128_ieee): Call it.
5180 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
5182         PR target/85044
5183         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
5184         -fcf-protection=branch -mibt.
5185         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
5187 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5189         PR target/81863
5190         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
5192 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
5194         PR target/85056
5195         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
5196         extern array declarations.
5198 2018-03-27  Richard Biener  <rguenther@suse.de>
5200         PR middle-end/84067
5201         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
5202         explicit single_use checks.
5204 2018-03-27  Richard Biener  <rguenther@suse.de>
5206         PR tree-optimization/85082
5207         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
5208         Valueize the VUSE.
5210 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5212         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
5213         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
5214         Turn on fasynchronous-unwind-tables and funwind-tables.
5216 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
5218         PR target/85073
5219         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
5220         (*bmi_blsr_<mode>_ccz): Ditto.
5222 2018-03-26  Tom de Vries  <tom@codesourcery.com>
5224         PR tree-optimization/85063
5225         * omp-general.c (offloading_function_p): New function.  Factor out
5226         of ...
5227         * omp-offload.c (pass_omp_target_link::gate): ... here.
5228         * omp-general.h (offloading_function_p): Declare.
5229         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
5230         with attribute omp declare target for offloading functions.
5232 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
5234         PR tree-optimization/84005
5235         * tree-data-ref.h (get_base_for_alignment): Declare.
5236         * tree-data-ref.c (get_base_for_alignment_1): New function.
5237         (get_base_for_alignment): Likewise.
5238         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
5239         get_base_for_alignment to find a suitable base object, instead
5240         of always using drb->base_address.
5242 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5244         PR inline-asm/85022
5245         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5246         known size by default.
5248 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
5250         PR inline-asm/85030
5251         * lra-constraints.c (process_alt_operands): Don't match BLKmode
5252         and non BLKmode operands.
5254 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5256         PR target/85026
5257         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5258         Clean up attributes.
5260 2018-03-23  Richard Biener  <rguenther@suse.de>
5262         PR debug/85020
5263         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5264         we are going to emit early debug for LTO.
5266 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5268         PR inline-asm/85034
5269         * function.c (match_asm_constraints_1): Don't optimize if input
5270         doesn't satisfy general_operand predicate for output's mode.
5272         PR inline-asm/85022
5273         * alias.c (write_dependence_p): Don't require for x_canonicalized
5274         non-VOIDmode if x has VOIDmode.
5276         PR sanitizer/85029
5277         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5278         just don't try to optimize it rather than assert it never happens.
5280 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5282         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5283         macro expansions for definition of ST_INTERNAL_<mode> and
5284         LD_INTERNAL_<mode> builtins.
5285         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5286         Remove prototype.
5287         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5288         function.
5289         (altivec_expand_st_builtin): Likewise.
5290         (altivec_expand_builtin): Remove calls to deleted functions.
5291         (rs6000_address_for_altivec): Delete this function.
5292         * config/rs6000/vector.md: Remove expands for
5293         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
5295 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
5297         PR target/84826
5298         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
5299         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
5300         re-computing once computed.
5301         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
5302         (arm_init_machine_status): Initialize
5303         machine->static_chain_stack_bytes.
5305 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5307         PR target/84760
5308         * doc/extend.texi: Add four new prototypes for vec_ld.
5309         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
5310         definitions for more logical presentation.
5311         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
5312         entries for V1TI variants of __builtin_altivec_ld builtin.
5313         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
5314         handling of V1TI variant of LVX icode pattern.
5315         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
5316         (rs6000_gimple_fold_builtin): Likewise.
5317         (altivec_init_builtins): Add code to define
5318         __builtin_altivec_lvx_v1ti function.
5320 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5322         PR inline-asm/84941
5323         * function.c (match_asm_constraints_1): Don't do the optimization
5324         if input isn't a REG, SUBREG, MEM or constant.
5326 2018-03-22  Tom de Vries  <tom@codesourcery.com>
5328         PR tree-optimization/84956
5329         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
5330         bb_has_abnormal_pred.
5332 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5334         PR sanitizer/85018
5335         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
5336         DECL_INITIAL (decl) to decl at the end.
5337         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
5338         adjust the comment.
5340 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
5342         * doc/extend.texi (__builtin_tgmath): Document when complex
5343         integer types are treated as _Complex _Float64.
5345 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5347         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
5349 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5351         PR tree-optimization/84960
5352         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
5353         if it is ENTRY block, move them into single succ of ENTRY in that case.
5355 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
5357         PR tree-optimization/84811
5358         * poly-int.h (poly_span_traits): Remove the T3 parameter and
5359         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5360         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5361         (known_subrange_p): Update accordingly.  Cast each value involved
5362         in the size comparison, rather than casting the result of the
5363         subtraction.
5365 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5367         PR tree-optimization/84982
5368         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5369         by flipping the least significant bit rather than all bits from
5370         bitpos to bitpos + bitsize - 1.
5372 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5374         * doc/extend.texi (Deprecated Features): Remove mention of
5375         long-deleted deprecations.
5377 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5379         PR jit/84288
5380         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5381         * configure: Regenerate.
5383 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5385         PR tree-optimization/83126
5386         * tree-parloops.c (num_phis): New function.
5387         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5389 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5391         * doc/extend.texi (Deprecated Features): Update deprecated flags,
5392         mention anon-struct/union members and trailing attributes.
5394 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
5396         PR tree-optimization/84969
5397         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5398         builtin memset partitions if they set different rhs values.
5400 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5402         PR rtl-optimization/84989
5403         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5404         VEC_DUPLICATE with scalar result mode.
5406 2018-03-21  Martin Liska  <mliska@suse.cz>
5408         PR ipa/84963
5409         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5410         not intended return statement.
5412 2018-03-21  Martin Liska  <mliska@suse.cz>
5414         PR target/84988
5415         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5416         (chkp_find_bound_slots_1): Limit number of iterations.
5418 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
5420         PR target/84838
5421         * Minor grammar fixes for x86 options.
5423 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5425         PR debug/84875
5426         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5427         holding REG_CFA_RESTORE notes, instead turn them into a USE.
5429 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
5431         PR target/83789
5432         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5433         (altivec_lvx_<mode>_1op): Likewise.
5434         (altivec_stvx_<mode>_2op): Likewise.
5435         (altivec_stvx_<mode>_1op): Likewise.
5436         (altivec_lvx_<VM2:mode>): New define_expand.
5437         (altivec_stvx_<VM2:mode>): Likewise.
5438         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5439         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5440         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5441         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5442         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5443         (rs6000_gen_lvx): Likewise.
5444         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5445         (altivec_expand_stv_builtin): Likewise.
5446         (altivec_expand_builtin): Likewise.
5447         * config/rs6000/vector.md: Likewise.
5449 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5451         PR target/82518
5452         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5453         BYTES_BIG_ENDIAN.
5455 2018-03-20  Richard Biener  <rguenther@suse.de>
5457         PR target/84986
5458         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5459         sign-conversions as zero, fall back to standard scalar_stmt
5460         cost for the rest.
5462 2018-03-20  Martin Liska  <mliska@suse.cz>
5464         PR ipa/84825
5465         * predict.c (rebuild_frequencies): Handle case when we have
5466         PROFILE_ABSENT, but flag_guess_branch_prob is false.
5468 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5470         PR target/84990
5471         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5472         flag_section_anchors.
5473         * varasm.c (use_blocks_for_decl_p): Remove hack for
5474         dw2_force_const_mem.
5476         PR target/84845
5477         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5478         to ...
5479         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5480         be created, use lowpart_subreg of operands[0] rather than operands[0]
5481         itself.
5482         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5483         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5484         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5485         and n constraint instead of aarch64_shift_imm_di and Usd.
5486         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5487         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5489 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5491         PR target/82989
5492         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5493         to favor GPR over NEON registers.
5494         (<shift>di3_neon): Likewise.
5496 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5498         PR target/84952
5499         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5500         (nvptx_process_pars): Emit bar.sync asap and alap.
5502 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5504         PR target/84954
5505         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5506         seen_label if seen_label is already set.
5508 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5510         PR target/84945
5511         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5512         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5513         Use 1U instead of 1.  Formatting fixes.
5515         PR c/84953
5516         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5517         instead of TREE_TYPE (s1) for the return value.
5519 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5521         PR tree-optimization/84946
5522         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5523         bitsize + bitsize in poly_uint64 rather than poly_int64.
5525         PR sanitizer/78651
5526         * dwarf2asm.c: Include fold-const.c.
5527         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5528         of decl rather than decl itself.
5530         PR rtl-optimization/84643
5531         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5533 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5535         PR sanitizer/78651
5536         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5537         calling assemble_variable.
5539 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5541         PR target/81647
5542         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5543         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5545 2018-03-19  Jim Wilson  <jimw@sifive.com>
5547         PR bootstrap/84856
5548         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5549         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5550         (riscv_first_stack_step): Likewise.
5551         (riscv_option_override): Use STACK_BOUNDARY instead of
5552         MIN_STACK_BOUNDARY.
5553         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5554         MIN_STACK_BOUNDARY.
5555         (BIGGEST_ALIGNMENT): Set to 128.
5556         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5557         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5558         STACK_BOUNDARY.
5560 2018-03-19  Richard Biener  <rguenther@suse.de>
5562         PR tree-optimization/84933
5563         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5564         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5566 2018-03-19  Richard Biener  <rguenther@suse.de>
5568         PR tree-optimization/84859
5569         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5570         (cond_if_else_store_replacement): Perform sinking operation on
5571         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5572         Generalize what a BB with a single eligible store is.
5574 2018-03-19  Richard Biener  <rguenther@suse.de>
5576         PR tree-optimization/84929
5577         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5578         chrec_is_positive against non-chrec arg.
5580 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5582         PR target/84711
5583         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5585 2018-03-18  Martin Liska  <mliska@suse.cz>
5587         PR rtl-optimization/84635
5588         * regrename.c (build_def_use): Use matches_mode only when
5589         matches >= 0.
5591 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5593         PR tree-optimization/84913
5594         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5595         vectorize chains of COND_EXPRs.
5597 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5599         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5601 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5603         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5605 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5607         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5609 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5610             Kito Cheng  <kito.cheng@gmail.com>
5612         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5613         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5614         (nds32_adjust_reg_alloc_order): New function.
5615         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5617 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5619         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5620         nds32_print_operand, nds32_print_operand_address): Use
5621         HOST_WIDE_INT_PRINT_DEC instead.
5623 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5625         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5627 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5629         PR target/84902
5630         * config/i386/i386.c (initial_ix86_tune_features,
5631         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5632         unsigned long long.
5633         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5634         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5635         rather than 1u << ix86_tune.  Formatting fix.
5636         (ix86_option_override_internal): Change ix86_arch_mask from
5637         unsigned int to unsigned HOST_WIDE_INT, initialize to
5638         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5639         (ix86_function_specific_restore): Likewise.
5641 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5643         PR target/84899
5644         * postreload.c (reload_combine_recognize_pattern): Perform
5645         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5646         truncate_int_for_mode the result for the destination's mode.
5648         PR c/84909
5649         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5650         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5651         Likewise.
5652         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5653         Likewise.
5655 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5657         PR target/84876
5658         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5659         regno_allocno_class_array and sorted_pseudos.
5660         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5661         insns where regno is used.
5663 2018-03-16  Martin Liska  <mliska@suse.cz>
5665         PR ipa/84833
5666         * multiple_target.c (create_dispatcher_calls): Redirect
5667         reference in the symbol table.
5669 2018-03-16  Martin Liska  <mliska@suse.cz>
5671         PR ipa/84722
5672         * multiple_target.c (create_dispatcher_calls): Redirect also
5673         an alias.
5675 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5677         PR c++/79937
5678         PR c++/82410
5679         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5680         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5681         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5683 2018-03-16  Julia Koval  <julia.koval@intel.com>
5685         * doc/invoke.texi (Skylake Server): Add CLWB.
5686         Cannonlake): Remove CLWB.
5688 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5690         PR tree-optimization/84841
5691         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5692         1 << 3.
5693         (FLOAT_ONE_CONST_TYPE): Define.
5694         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5695         (sort_by_operand_rank): Put entries with higher constant_type last
5696         rather than first to match comments.
5698 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5700         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5701         split predicate.
5703 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5705         PR c++/79085
5706         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5707         check and use address of target always.
5709 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5711         PR target/84574
5712         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5713         (indirect_thunk_bnd_needed): Likewise.
5714         (indirect_thunks_used): Likewise.
5715         (indirect_thunks_bnd_used): Likewise.
5716         (indirect_return_needed): New.
5717         (indirect_return_bnd_needed): Likewise.
5718         (output_indirect_thunk_function): Add a bool argument for
5719         function return.
5720         (output_indirect_thunk_function): Don't generate alias for
5721         function return thunk.
5722         (ix86_code_end): Call output_indirect_thunk_function to generate
5723         function return thunks.
5724         (ix86_output_function_return): Set indirect_return_bnd_needed
5725         and indirect_return_needed instead of indirect_thunk_bnd_needed
5726         and indirect_thunk_needed.
5728 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5730         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5731         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5732         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5734 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5735             Paul Hua <paul.hua.gm@gmail.com>
5737         PR c/84852
5738         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5740 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
5742         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5743         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5744         resp. SFmode cases.
5746 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
5748         PR target/84711
5749         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5750         instead of GET_MODE_SIZE when comparing Units.
5752 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5754         PR target/68256
5755         * varasm.c (hash_section): Return an unchangeble hash value
5756         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5757         Return !aarch64_can_use_per_function_literal_pools_p ().
5759 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5761         PR target/84860
5762         * optabs.c (emit_conditional_move): Pass address of cmode's copy
5763         rather than address of cmode as last argument to prepare_cmp_insn.
5765 2018-03-15  Julia Koval  <julia.koval@intel.com>
5767         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5768         F_AVX512VNNI, F_AVX512BITALG): New.
5770 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
5772         PR target/83451
5773         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
5774         insn for floating-point loads and stores.
5776 2018-03-14  Carl Love  <cel@us.ibm.com>
5778         * config/rs6000/rs6000-c.c: Add macro definitions for
5779         ALTIVEC_BUILTIN_VEC_PERMXOR.
5780         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5781         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5782         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5783         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5784         UNSPEC_VPERMXOR.
5785         * config/doc/extend.texi: Add prototypes for vec_permxor.
5787 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
5789         PR c/84852
5790         * diagnostic-show-locus.c (class layout_point): Convert m_line
5791         from int to linenum_type.
5792         (line_span::comparator): Use linenum "compare" function when
5793         comparing line numbers.
5794         (test_line_span): New function.
5795         (layout_range::contains_point): Convert param "row" from int to
5796         linenum_type.
5797         (layout_range::intersects_line_p): Likewise.
5798         (layout::will_show_line_p): Likewise.
5799         (layout::print_source_line): Likewise.
5800         (layout::should_print_annotation_line_p): Likewise.
5801         (layout::print_annotation_line): Likewise.
5802         (layout::print_leading_fixits): Likewise.
5803         (layout::annotation_line_showed_range_p): Likewise.
5804         (struct line_corrections): Likewise for field m_row.
5805         (line_corrections::line_corrections): Likewise for param "row".
5806         (layout::print_trailing_fixits): Likewise.
5807         (layout::get_state_at_point): Likewise.
5808         (layout::get_x_bound_for_row): Likewise.
5809         (layout::print_line): Likewise.
5810         (diagnostic_show_locus): Likewise for locals "last_line" and
5811         "row".
5812         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
5813         * input.c (selftest::test_linenum_comparisons): New function.
5814         (selftest::input_c_tests): Call it.
5815         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
5816         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
5817         * selftest.h (ASSERT_GT): New macro.
5818         (ASSERT_GT_AT): New macro.
5819         (ASSERT_LT): New macro.
5820         (ASSERT_LT_AT): New macro.
5822 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
5824         PR rtl-optimization/84780
5825         * combine.c (distribute_links): Don't make a link based on pc_rtx.
5827 2018-03-14  Martin Liska  <mliska@suse.cz>
5829         * tree.c (record_node_allocation_statistics): Use
5830         get_stats_node_kind.
5831         (get_stats_node_kind): New function extracted from
5832         record_node_allocation_statistics.
5833         (free_node): Use get_stats_node_kind.
5835 2018-03-14  Richard Biener  <rguenther@suse.de>
5837         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
5838         that the value-set of ANTIC_IN doesn't grow.
5840         Revert
5841         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5842         member.
5843         (BB_VISITED_WITH_VISITED_SUCCS): New define.
5844         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5846 2018-03-14  Julia Koval  <julia.koval@intel.com>
5848         * config.gcc (icelake-client, icelake-server): New.
5849         (icelake): Remove.
5850         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
5851         (initial_ix86_arch_features): Ditto.
5852         (PTA_SKYLAKE): Add SGX.
5853         (PTA_ICELAKE): Remove.
5854         (PTA_ICELAKE_CLIENT): New.
5855         (PTA_ICELAKE_SERVER): New.
5856         (ix86_option_override_internal): Split up icelake on icelake client and
5857         icelake server.
5858         (get_builtin_code_for_version): Ditto.
5859         (fold_builtin_cpu): Ditto.
5860         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
5861         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
5862         * config/i386/i386.h (processor_type): Ditto.
5863         * doc/invoke.texi: Ditto.
5865 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
5867         PR sanitizer/83392
5868         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
5869         INTEGER_CST offset, add it together with bitpos / 8 and
5870         sign extend based on POINTER_SIZE.
5872         PR target/84844
5873         Revert
5874         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
5876         PR target/78090
5877         * config/i386/constraints.md (Yc): New register constraint.
5878         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
5879         Use Yc constraint for alternative 2 of operand 0.  Remove
5880         preferred_for_speed attribute.
5882 2018-03-14  Richard Biener  <rguenther@suse.de>
5884         PR tree-optimization/84830
5885         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
5886         with the old one to avoid oscillations.
5888 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
5890         PR target/83712
5891         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
5892         pseudos.
5893         (assign_by_spills): Return a flag of reload assignment failure.
5894         Do not process the reload assignment failures.  Do not spill other
5895         reload pseudos if they has the same reg class.  Update n if
5896         necessary.
5897         (lra_assign): Add a return arg.  Set up from the result of
5898         assign_by_spills call.
5899         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5900         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5901         usage_insns if it is not NULL.
5902         (spill_hard_reg_in_range): New function.
5903         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5904         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5905         function prototypes.
5906         (lra_assign): Change prototype.
5907         * lra.c (lra): Add code to deal with fails by splitting hard reg
5908         live ranges.
5910 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
5912         * config/riscv/riscv.opt (mrelax): New option.
5913         * config/riscv/riscv.c (riscv_file_start): Emit ".option
5914         "norelax" when riscv_mrelax is disabled.
5915         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
5917 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5919         PR target/84743
5920         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
5921         reassociation for int modes.
5923 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5925         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
5926         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
5927         for big-endian.
5928         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
5929         * config/aarch64/aarch64-sve.md
5930         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
5931         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
5932         (*extend<mode><Vwide>2): Rename to...
5933         (aarch64_sve_extend<mode><Vwide>2): ...this.
5934         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
5935         renaming the old pattern to...
5936         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
5937         unsigned packs.
5938         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
5939         define_expand, renaming the old pattern to...
5940         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
5941         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
5942         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
5943         account when deciding which SVE instruction the optab should use.
5944         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
5946 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5948         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
5949         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
5950         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
5951         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
5952         (tlsdesc_small_<mode>): Turn a define_expand and use
5953         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
5954         (tlsdesc_small_advsimd_<mode>): ...this.
5955         (tlsdesc_small_sve_<mode>): New pattern.
5957 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5959         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
5960         (UNSPEC_UMUL_HIGHPART): New constants.
5961         (MUL_HIGHPART): New int iteraor.
5962         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
5963         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
5964         define_expand.
5965         (*<su>mul<mode>3_highpart): New define_insn.
5967 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
5969         PR lto/84805
5970         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5971         incomplete types.
5973 2018-03-13  Martin Liska  <mliska@suse.cz>
5975         PR ipa/84658.
5976         * (sem_item_optimizer::sem_item_optimizer): Initialize new
5977         vector.
5978         (sem_item_optimizer::~sem_item_optimizer): Release it.
5979         (sem_item_optimizer::merge_classes): Register variable aliases.
5980         (sem_item_optimizer::fixup_pt_set): New function.
5981         (sem_item_optimizer::fixup_points_to_sets): Likewise.
5982         * ipa-icf.h: Declare new variables and functions.
5984 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
5986         PR middle-end/84834
5987         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
5988         integer_pow2p@2 and test integer_pow2p in condition.
5989         (A < 0 ? C : 0): Similarly for @1.
5991         PR middle-end/84831
5992         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
5993         characters starting at p contain '\0' character, don't look beyond
5994         that.
5996         PR target/84827
5997         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
5998         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
6000         PR target/84828
6001         * reg-stack.c (change_stack): Change update_end var from int to
6002         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
6003         also call set_block_for_insn on the newly added insns and rescan.
6005         PR target/84786
6006         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
6007         on the last operand.
6009         PR c++/84704
6010         * tree.c (stabilize_reference_1): Return save_expr (e) for
6011         STATEMENT_LIST even if it doesn't have side-effects.
6013 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
6015         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
6017 2018-03-12  Renlin Li  <renlin.li@arm.com>
6019         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
6020         aarch64_output_scalar_simd_mov_immediate.
6022 2018-03-12  Martin Sebor  <msebor@redhat.com>
6024         PR tree-optimization/83456
6025         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
6026         for perfectly overlapping calls to memcpy.
6027         (gimple_fold_builtin_memory_chk): Same.
6028         (gimple_fold_builtin_strcpy): Handle no-warning.
6029         (gimple_fold_builtin_stxcpy_chk): Same.
6030         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
6032 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6034         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
6035         parameter.  Use it for SFmode.
6036         (rs6000_function_arg_advance_1): Adjust.
6037         (rs6000_function_arg): Adjust.
6038         (rs6000_gimplify_va_arg): Pass false for that new parameter.
6040 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6042         PR rtl-optimization/84169
6043         PR rtl-optimization/84780
6044         * combine.c (can_combine_p): Check for a 2-insn combination whether
6045         the destination register is used between the two insns, too.
6047 2018-03-12  Richard Biener  <rguenther@suse.de>
6049         PR tree-optimization/84803
6050         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
6051         for refs DR analysis didn't process.
6053 2018-03-12  Richard Biener  <rguenther@suse.de>
6055         PR tree-optimization/84777
6056         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
6057         force-vectorize loops ignore whether we are optimizing for size.
6059 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6061         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
6062         (TARGET_MD_ASM_ADJUST): Define.
6064 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
6065             Kito Cheng  <kito.cheng@gmail.com>
6066             Chung-Ju Wu  <jasonwucj@gmail.com>
6068         * config/nds32/nds32.c (nds32_compute_stack_frame,
6069         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
6070         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
6071         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
6072         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
6073         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
6074         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
6075         * config/nds32/nds32.md (prologue, epilogue): Use macro
6076         NDS32_V3PUSH_AVAILABLE_P to do checking.
6078 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
6080         PR debug/58150
6081         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
6082         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
6083         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
6084         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
6085         addition of most attributes on !orig_type_die or the attribute not
6086         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
6088 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6089             Chung-Ju Wu  <jasonwucj@gmail.com>
6091         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
6092         __NDS32_VH__ macro.
6093         * config/nds32/nds32.opt (mvh): New option.
6095 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6096             Chung-Ju Wu  <jasonwucj@gmail.com>
6098         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
6099         function.
6100         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
6101         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
6102         definition.
6104 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6105             Chung-Ju Wu  <jasonwucj@gmail.com>
6107         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
6108         function.
6109         * config/nds32/nds32-multiple.md (strlensi): New pattern.
6110         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
6112 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
6113             Kito Cheng  <kito.cheng@gmail.com>
6114             Chung-Ju Wu  <jasonwucj@gmail.com>
6116         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
6117         UNSPEC_FFMISM and UNSPEC_FLMISM.
6118         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
6119         for ffb, ffmism and flmism.
6120         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
6121         (unspec_ffmism): Ditto.
6122         (unspec_flmism): Ditto.
6123         (nds32_expand_builtin_impl): Check if string extension is available.
6124         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
6125         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
6127 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
6129         Reverting patch:
6130         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6132         PR target/83712
6133         * lra-assigns.c (assign_by_spills): Return a flag of reload
6134         assignment failure.  Do not process the reload assignment
6135         failures.  Do not spill other reload pseudos if they has the same
6136         reg class.
6137         (lra_assign): Add a return arg.  Set up from the result of
6138         assign_by_spills call.
6139         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6140         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6141         usage_insns if it is not NULL.
6142         (spill_hard_reg_in_range): New function.
6143         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6144         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6145         function prototypes.
6146         (lra_assign): Change prototype.
6147         * lra.c (lra): Add code to deal with fails by splitting hard reg
6148         live ranges.
6150 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
6152         PR target/84807
6153         * config/i386/i386.opt: Replace Enforcment with Enforcement.
6155 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
6157         PR debug/84620
6158         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
6159         (dw_val_node): Add val_symbolic_view.
6160         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
6161         (symview_upper_bound): New.
6162         (new_line_info_table): Initialize symviews_since_reset.
6163         (dwarf2out_source_line): Count symviews_since_reset and set
6164         symview_upper_bound.
6165         (dw_val_equal_p): Handle symview.
6166         (add_AT_symview): New.
6167         (print_dw_val): Handle symview.
6168         (attr_checksum, attr_checksum_ordered): Likewise.
6169         (same_dw_val_p, size_of_die): Likewise.
6170         (value_format, output_die): Likewise.
6171         (add_high_low_attributes): Use add_AT_symview for entry_view.
6172         (dwarf2out_finish): Reset symview_upper_bound, clear
6173         zero_view_p.
6175 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
6177         PR target/83969
6178         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
6179         Add strict argument and use it.
6180         (rs6000_split_multireg_move): Update for new strict argument.
6181         (mem_operand_gpr): Disallow all non-offsettable addresses.
6182         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
6184 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
6186         PR target/84772
6187         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
6188         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
6189         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
6191         PR c++/84767
6192         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
6193         decl, use remap_type if we want to use the type.
6195 2018-03-09  Martin Sebor  <msebor@redhat.com>
6197         PR tree-optimization/84526
6198         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6199         Remove dead code.
6200         (builtin_access::generic_overlap): Be prepared to handle non-array
6201         base objects.
6203 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
6205         PR rtl-optimization/84682
6206         * lra-constraints.c (process_address_1): Check is_address flag
6207         for address constraints.
6208         (process_alt_operands): Likewise.
6209         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
6210         preprocess_constraints.
6211         * recog.h (preprocess_constraints): Add oploc parameter.
6212         Adjust callers.
6213         * recog.c (preprocess_constraints): Test address_operand for
6214         CT_ADDRESS constraints.
6216 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6218         PR target/83712
6219         * lra-assigns.c (assign_by_spills): Return a flag of reload
6220         assignment failure.  Do not process the reload assignment
6221         failures.  Do not spill other reload pseudos if they has the same
6222         reg class.
6223         (lra_assign): Add a return arg.  Set up from the result of
6224         assign_by_spills call.
6225         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6226         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6227         usage_insns if it is not NULL.
6228         (spill_hard_reg_in_range): New function.
6229         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6230         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6231         function prototypes.
6232         (lra_assign): Change prototype.
6233         * lra.c (lra): Add code to deal with fails by splitting hard reg
6234         live ranges.
6236 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6238         PR target/83193
6239         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
6240         Accept complain bool parameter.  Only emit errors if it is true.
6241         (arm_parse_cpu_option_name): Likewise.
6242         (arm_target_thumb_only): Adjust callers of the above.
6243         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6244         prototype to take a default true bool parameter.
6245         (arm_parse_arch_option_name): Likewise.
6247 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
6248             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
6250         PR jit/64089
6251         PR jit/84288
6252         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6253         * configure: Regenerate.
6254         * configure.ac ("linker --version-script option"): New.
6255         ("linker soname option"): New.
6257 2018-03-09  Richard Biener  <rguenther@suse.de>
6259         PR tree-optimization/84775
6260         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6261         immediate uses of predicate stmts and mark them modified.
6263         Revert
6264         PR tree-optimization/84178
6265         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6266         to caller.
6267         (version_loop_for_if_conversion): Delay update_ssa call.
6268         (tree_if_conversion): Delay update_ssa until after predicate
6269         insertion.
6271 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
6273         PR target/84763
6274         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6275         when the function accesses prior frames.
6277 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6279         PR debug/84456
6280         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6281         gen_llsym, otherwise call maybe_gen_llsym.
6283         PR inline-asm/84742
6284         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6285         has ',' character inside of it.
6287 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6289         PR target/84748
6290         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6291         as clobbering CC_REGNUM.
6293 2018-03-08  Richard Biener  <rguenther@suse.de>
6295         PR middle-end/84552
6296         * tree-scalar-evolution.c: Include tree-into-ssa.h.
6297         (follow_copies_to_constant): Do not follow SSA names registered
6298         for update.
6300 2018-03-08  Richard Biener  <rguenther@suse.de>
6302         PR tree-optimization/84178
6303         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6304         to caller.
6305         (version_loop_for_if_conversion): Delay update_ssa call.
6306         (tree_if_conversion): Delay update_ssa until after predicate
6307         insertion.
6309 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
6311         PR tree-optimization/84178
6312         * tree-if-conv.c (release_bb_predicate): Remove the
6313         the assertion that the stmts have NULL use_ops.
6314         Discard the statements, asserting that they haven't
6315         yet been added to a BB.
6317 2018-03-08  Richard Biener  <rguenther@suse.de>
6319         PR tree-optimization/84746
6320         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
6321         (phi_translate): Pass in destination ANTIC_OUT set.
6322         (phi_translate_1): Likewise.  For a simplified result lookup
6323         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
6324         (phi_translate_set): Adjust.
6325         (do_pre_regular_insertion): Likewise.
6326         (do_pre_partial_partial_insertion): Likewise.
6328 2018-03-08  Martin Liska  <mliska@suse.cz>
6330         PR gcov-profile/84735
6331         * doc/gcov.texi: Document usage of profile files.
6332         * gcov-io.h: Document changes in the format.
6334 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
6336         PR debug/84404
6337         PR debug/84408
6338         * dwarf2out.c (struct dw_line_info_table): Update comments for
6339         view == -1.
6340         (FORCE_RESET_NEXT_VIEW): New.
6341         (FORCE_RESETTING_VIEW_P): New.
6342         (RESETTING_VIEW_P): Check for -1 too.
6343         (ZERO_VIEW_P): Likewise.
6344         (new_line_info_table): Force-reset next view.
6345         (dwarf2out_begin_function): Likewise.
6346         (dwarf2out_source_line): Simplify zero_view_p initialization.
6347         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
6348         view directly.  Omit view when omitting .loc at line 0.
6350 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6352         PR tree-optimization/84740
6353         * tree-switch-conversion.c (process_switch): Call build_constructors
6354         only if info.phi_count is non-zero.
6356         PR tree-optimization/84739
6357         * tree-tailcall.c (find_tail_calls): Check call arguments against
6358         DECL_ARGUMENTS (current_function_decl) rather than
6359         DECL_ARGUMENTS (func) when checking for tail recursion.
6361 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6363         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6364         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6365         Volker Reichelt's entry and add entries for people that perform
6366         GCC fuzzy testing and report numerous bugs.
6368 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
6370         PR target/82411
6371         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6372         readonly data in sdata, if that is disabled.
6373         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6374         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6375         -mreadonly-in-sdata option.
6377 2018-03-07  Martin Sebor  <msebor@redhat.com>
6379         PR tree-optimization/84468
6380         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6381         basic block when looking for nul assignment.
6383 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
6385         PR target/84277
6386         * except.h (output_function_exception_table): Adjust prototype.
6387         * except.c (output_function_exception_table): Remove FNNAME parameter
6388         and add SECTION parameter.  Ouput one part of the table at a time.
6389         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6390         the first part of the exception table and emit unwind directives.
6391         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6392         (i386_pe_seh_cold_init): Likewise.
6393         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6394         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6395         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6396         (ix86_output_call_insn): Emit a nop in one more case for SEH.
6397         * config/i386/winnt.c: Include except.h.
6398         (struct seh_frame_state): Add reg_offset, after_prologue and
6399         in_cold_section fields.
6400         (i386_pe_seh_end_prologue): Set seh->after_prologue.
6401         (i386_pe_seh_cold_init): New function.
6402         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6403         to seh->in_cold_section.
6404         (seh_emit_push): Record the offset of the push.
6405         (seh_emit_save): Record the offet of the save.
6406         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6407         Test seh->after_prologue to disregard the epilogue.
6408         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6409         (i386_pe_end_cold_function): New function.
6411 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6413         PR fortran/84565
6414         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6415         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6417         PR c++/84704
6418         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6419         on tmp_var.
6420         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6421         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6423         PR middle-end/84723
6424         * multiple_target.c: Include tree-inline.h and intl.h.
6425         (expand_target_clones): Diagnose and fail if node->definition and
6426         !tree_versionable_function_p (node->decl).
6428 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
6430         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6431         sprint_ul.
6432         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6433         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6434         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6436 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6438         PR target/84710
6439         * combine.c (try_combine): Use reg_or_subregno instead of handling
6440         just paradoxical SUBREGs and REGs.
6442 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
6444          * config/arc/arc.c (arc_finalize_pic): Remove function.
6445          (arc_must_save_register): We use single base PIC register, remove
6446          checks to save/restore the PIC register.
6447          (arc_expand_prologue): Likewise.
6448          * config/arc/arc-protos.h (arc_set_default_type_attributes):
6449          Remove.
6450          (arc_verify_short): Likewise.
6451          (arc_attr_type): Likewise.
6452          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6453          (walk_stores): Likewise.
6454          (arc_address_cost): Make it static.
6455          (arc_verify_short): Likewise.
6456          (branch_dest): Likewise.
6457          (arc_attr_type): Likewise.
6458          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6459          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6460          (arc_final_prescan_insn): Remove inserting the nops due to
6461          hardware hazards.  It is done in reorg step.
6462          (insn_length_variant_t): Remove.
6463          (insn_length_parameters_t): Likewise.
6464          (arc_insn_length_parameters): Likewise.
6465          (arc_get_insn_variants): Likewise.
6466          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6468 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6470         PR inline-asm/84683
6471         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6472         assertion failure.
6474         PR tree-optimization/84687
6475         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6476         on new_node->decl.
6477         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6479 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6481         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6482         Rename to ppc_speculation_barrier.
6483         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6484         __builtin_ppc_speculation_barrier.
6486 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6488         PR target/84700
6489         * combine.c (combine_simplify_rtx): Don't try to simplify if
6490         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6491         are equal to x.
6493 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6495         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6496         to 32 bytes when compiling for POWER9.
6498 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6500         PR target/84564
6501         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6502         regparm >= 3 with no arg reg available also for calls with
6503         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6505         PR target/84524
6506         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6507         orig,vex.
6508         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6510 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6512         PR target/84264
6513         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6515 2018-03-05  Richard Biener  <rguenther@suse.de>
6517         PR tree-optimization/84486
6518         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6519         When inserting a __builtin_assume_aligned call set the LHS
6520         SSA name alignment info accordingly.
6522 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6524         PR tree-optimization/84114
6525         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6526         Avoid reassociation of FLOAT_MODE addition.
6528 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6530         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6531         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6532         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6533         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6534         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6535         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6536         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6537         and -mwbnoinvd.
6538         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6539         __builtin_ia32_wbinvd): New builtins.
6540         (SPECIAL_ARGS2): New.
6541         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6542         (SPECIAL_ARGS2): New.
6543         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6544         (ix86_valid_target_attribute_inner_p): Ditto.
6545         (ix86_init_mmx_sse_builtins): Add special_args2.
6546         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6547         TARGET_WBNOINVD_P): New.
6548         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6549         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6550         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6551         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6552         * config/i386/pconfigintrin.h: New file.
6553         * config/i386/wbnoinvdintrin.h: Ditto.
6554         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6555         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6557 2018-03-05  Richard Biener  <rguenther@suse.de>
6559         PR tree-optimization/84670
6560         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6561         member.
6562         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6563         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6564         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6565         doesn't grow if all successors (recursively) were visited at least
6566         once.
6568 2018-03-05  Richard Biener  <rguenther@suse.de>
6570         PR tree-optimization/84650
6571         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6572         if executed in the loop pipeline.
6574 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6576         * doc/configfiles.texi (Configuration Files): Move info about
6577         conditionalizing $target-protos.h to...
6578         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6579         differs from $target-protos.h.
6581 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6582             Chung-Ju Wu  <jasonwucj@gmail.com>
6584         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6585         * config/nds32/nds32-multiple.md (setmemsi): Define.
6586         * config/nds32/nds32-memory-manipulation.c
6587         (nds32_gen_dup_4_byte_to_word_value): New.
6588         (emit_setmem_word_loop): New.
6589         (emit_setmem_byte_loop): New.
6590         (nds32_expand_setmem_loop): New.
6591         (nds32_expand_setmem_loop_v3m): New.
6592         (nds32_expand_setmem_unroll): New.
6593         (nds32_expand_setmem): New.
6595 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6596             Chung-Ju Wu  <jasonwucj@gmail.com>
6598         * config/nds32/nds32-memory-manipulation.c
6599         (nds32_emit_load_store): New.
6600         (nds32_emit_post_inc_load_store): New.
6601         (nds32_emit_mem_move): New.
6602         (nds32_emit_mem_move_block): New.
6603         (nds32_expand_movmemsi_loop_unknown_size): New.
6604         (nds32_expand_movmemsi_loop_known_size): New.
6605         (nds32_expand_movmemsi_loop): New.
6606         (nds32_expand_movmemsi_unroll): New.
6607         (nds32_expand_movmemqi): Rename ...
6608         (nds32_expand_movmemsi): ... to this.
6609         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6610         (movmemsi): ... to this.
6611         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6612         (nds32_expand_movmemsi): ... to this.
6614 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6615             Monk Chiang  <sh.chiang04@gmail.com>
6616             Chung-Ju Wu  <jasonwucj@gmail.com>
6618         * config/nds32/nds32-protos.h
6619         (nds32_expand_load_multiple): New arguments.
6620         (nds32_expand_store_multiple): Ditto.
6621         (nds32_valid_multiple_load_store): Rename ...
6622         (nds32_valid_multiple_load_store_p): ... to this.
6623         * config/nds32/nds32-memory-manipulation.c
6624         (nds32_expand_load_multiple): Refine implementation.
6625         (nds32_expand_store_multiple): Ditto.
6626         * config/nds32/nds32-multiple.md
6627         (load_multiple): Update nds32_expand_load_multiple interface.
6628         (store_multiple): Update nds32_expand_store_multiple interface.
6629         * config/nds32/nds32-predicates.c
6630         (nds32_valid_multiple_load_store): Rename ...
6631         (nds32_valid_multiple_load_store_p): ... to this and refine
6632         implementation.
6633         * config/nds32/predicates.md
6634         (nds32_load_multiple_and_update_address_operation): New predicate.
6635         (nds32_store_multiple_and_update_address_operation): New predicate.
6637 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6638             Chung-Ju Wu  <jasonwucj@gmail.com>
6640         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6641         (combo): New attribute.
6642         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6644 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6646         * config/nds32/nds32.opt: Change -mcmodel= default value.
6648 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6649             Monk Chiang  <sh.chiang04@gmail.com>
6650             Chung-Ju Wu  <jasonwucj@gmail.com>
6652         * config/nds32/constants.md (unspec_element): New enum.
6653         * config/nds32/constraints.md (Umw): New constraint.
6654         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6655         * config/nds32/nds32-intrinsic.md: Likewise.
6656         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6657         (nds32_valid_smw_lwm_base_p): New.
6658         (nds32_output_smw_single_word): New.
6659         (nds32_output_lmw_single_word): New.
6660         (nds32_expand_unaligned_load): New.
6661         (nds32_expand_unaligned_store): New.
6662         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6663         (nds32_output_smw_single_word): Declare.
6664         (nds32_output_lmw_single_word): Declare.
6665         (nds32_expand_unaligned_load): Declare.
6666         (nds32_expand_unaligned_store): Declare.
6667         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6668         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6669         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6670         NDS32_BUILTIN_UASTORE_DW.
6671         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6672         predicate.
6674 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6675             Kito Cheng  <kito.cheng@gmail.com>
6676             Chung-Ju Wu  <jasonwucj@gmail.com>
6678         * config/nds32/nds32-intrinsic.c
6679         (nds32_expand_builtin_null_ftype_reg): Delete.
6680         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6681         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6682         (nds32_read_argument): New.
6683         (nds32_legitimize_target): Ditto.
6684         (nds32_legitimize_argument): Ditto.
6685         (nds32_check_constant_argument): Ditto.
6686         (nds32_expand_unop_builtin): Ditto.
6687         (nds32_expand_unopimm_builtin): Ditto.
6688         (nds32_expand_binop_builtin): Ditto.
6689         (nds32_builtin_decl_impl): Ditto.
6690         (builtin_description): Ditto.
6691         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6692         (nds32_init_builtins_impl): Ditto.
6693         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6694         (nds32_builtin_decl): New.
6695         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6696         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6698 2018-03-02  Jeff Law  <law@redhat.com>
6700         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6701         (redundant_insn, fill_simple_delay_slots): Likewise.
6702         (fill_slots_from_thread): Likewise.
6703         * resource.c (mark_referenced_resources): Likewise.
6704         (mark_set_resources, find_dead_or_set_registers): Likewise.
6706 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6708         * substring-locations.h (format_warning_va): Formatting fix for
6709         ATTRIBUTE_GCC_DIAG.
6710         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6711         argument.
6712         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6713         * substring-locations.c: Include intl.h.
6714         (format_warning_va): Turned into small wrapper around
6715         format_warning_n_va, renamed to ...
6716         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6717         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6718         use ngettext.
6719         (format_warning_at_substring_n): New function.
6720         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6721         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6722         format_warning_at_substring with just a shorter name instead of
6723         const function pointer.
6724         (fmtwarn_n): New function.
6725         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6726         appropriate, get rid of all the fmtstr temporaries, move conditionals
6727         with G_() wrapped string literals directly into fmtwarn arguments,
6728         cast dir.len to (int), formatting fixes.
6730 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6732         * doc/invoke.texi: Remove "Cilk Plus" references.
6734 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6735             Richard Biener  <rguenther@suse.de>
6737         PR ipa/84628
6738         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6739         for error or warning attributes if CALL_FROM_THUNK_P is set.
6740         Formatting fixes.
6742 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6744         PR target/56540
6745         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6746         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6748         PR target/56540
6749         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6750         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6752         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6753         instead of -1U in last predictors element's probability member.
6755 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6757         PR ipa/83983
6758         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6759         arguments if they are comparable.
6761 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6763         PR tree-optimization/84634
6764         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6765         masks and masked_loop_p with a single loop_masks, making sure it's
6766         null for bb vectorization.
6768 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6770         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6771         (vect_analyze_data_ref_access): Use loop->safe_len rather than
6772         loop->force_vectorize to check whether there is no alias.
6774 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6776         PR target/84614
6777         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6778         prototypes.
6779         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6780         comments.
6781         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6782         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6783         instead of a loop around prev_real_insn.
6784         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6785         prev_real_insn.
6787         PR inline-asm/84625
6788         * config/i386/i386.c (ix86_print_operand): Use conditional
6789         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6790         zero vector.
6792 2018-03-02  Richard Biener  <rguenther@suse.de>
6794         PR tree-optimization/84427
6795         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
6796         (bitmap_set_subtract_values): Rewrite to handle multiple
6797         exprs per value.
6798         (clean): Likewise.
6799         (prune_clobbered_mems): Likewise.
6800         (phi_translate): Take edge instead of pred/phiblock.
6801         (phi_translate_1): Likewise.
6802         (phi_translate_set): Likewise.  Insert all translated
6803         exprs for a value into the set, keeping possibly multiple
6804         expressions per value.
6805         (compute_antic_aux): Adjust for phi_translate changes.
6806         When intersecting union the expressions and prune those
6807         not in the final value set, keeping possibly multiple
6808         expressions per value.  Do not use value-insertion
6809         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
6810         all expressions.  Add verification that the value-sets
6811         only shrink during iteration.
6812         (compute_partial_antic_aux): Adjust for the phi_translate changes.
6813         (do_pre_regular_insertion): Likewise.
6814         (do_pre_partial_partial_insertion): Likewise.
6816 2018-03-02  Richard Biener  <rguenther@suse.de>
6818         PR target/82005
6819         * config/darwin.c (saved_debug_info_level): New static global.
6820         (darwin_asm_lto_start): Disable debug info generation for LTO out.
6821         (darwin_asm_lto_end): Restore debug info generation settings.
6823 2018-03-01  Martin Liska  <mliska@suse.cz>
6825         PR sanitizer/82484
6826         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6827         volatile arguments.
6829 2018-03-01  Richard Biener  <rguenther@suse.de>
6831         PR debug/84645
6832         * dwarf2out.c (gen_variable_die): Properly handle late VLA
6833         type annotation with LTO when debug was disabled at compile-time.
6835 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
6837         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
6838         XINT with INTVAL.
6839         (mips_final_postscan_insn): Likewise.
6841 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
6843         PR rtl-optimization/84528
6844         * alias.c (init_alias_target): Add commentary.
6845         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
6846         a unique base value if the frame pointer is not eliminated
6847         to the stack pointer.
6849 2018-03-01  Tom de Vries  <tom@codesourcery.com>
6851         PR rtl-optimization/83327
6852         * lra-int.h (hard_regs_spilled_into): Declare.
6853         * lra.c (hard_regs_spilled_into): Define.
6854         (init_reg_info): Init hard_regs_spilled_into.
6855         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
6856         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
6857         (process_bb_lives): Handle hard_regs_spilled_into.
6858         (lra_create_live_ranges_1): Before doing liveness propagation, clear
6859         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
6861 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
6863         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
6864         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
6865         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
6866         * config/rs6000/aix72.h: New file.
6868 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
6870         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
6871         instead of warning_at with conditional singular and plural messages
6872         where possible.
6874         PR target/52991
6875         * stor-layout.c (update_alignment_for_field): For
6876         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
6877         && !DECL_PACKED (field), do the alignment update, just use
6878         only desired_align instead of MAX (type_align, desired_align)
6879         as the alignment.
6880         (place_field): Don't do known_align < desired_align handling
6881         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
6882         is non-NULL, instead do it after rli->prev_field handling and
6883         only if not within a bitfield word.  For DECL_PACKED (field)
6884         use type_align of BITS_PER_UNIT.
6886 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6888         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
6889         superfluous parentheses and trailing spaces.
6891 2018-02-28  Richard Biener  <rguenther@suse.de>
6893         PR tree-optimization/84584
6894         * graphite-scop-detection.c (scop_detection::add_scop): Discard
6895         SCoPs with fake exit edge.
6897 2018-02-28  Martin Liska  <mliska@suse.cz>
6899         PR testsuite/84597
6900         * timevar.c (timer::print): Fix format to properly print 100%
6901         values.
6903 2018-02-28  Richard Biener  <rguenther@suse.de>
6905         PR middle-end/84607
6906         * genmatch.c (capture_info::walk_match): Do not mark
6907         captured expressions without operands as expr_p given
6908         they act more like predicates and should be subject to
6909         "lost tail" side-effect preserving.
6911 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
6913         PR rtl-optimization/81611
6914         * auto-inc-dec.c (attempt_change): Move dead note from
6915         mem_insn if it's the next use of regno
6916         (find_address): Take address use of reg holding
6917         non-incremented value.  Add parm to limit search to the named
6918         reg only.
6919         (merge_in_block): Attempt to use a mem insn that is the next
6920         use of the original regno.
6922 2018-02-27  Martin Sebor  <msebor@redhat.com>
6924         PR c++/83871
6925         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
6926         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
6928 2018-02-27  Martin Sebor  <msebor@redhat.com>
6930         PR translation/84207
6931         * diagnostic-core.h (warning_n, error_n, inform_n): Change
6932         n argument to unsigned HOST_WIDE_INT.
6933         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
6934         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
6935         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
6936         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
6938 2018-02-27  Richard Biener  <rguenther@suse.de>
6940         PR tree-optimization/84512
6941         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6942         Do not use the estimate returned from record_stmt_cost for
6943         the scalar iteration cost but sum properly using add_stmt_cost.
6945 2018-02-27  Richard Biener  <rguenther@suse.de>
6947         PR tree-optimization/84466
6948         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6949         Adjust last change to less strictly validate use operands.
6951 2018-02-27  Martin Liska  <mliska@suse.cz>
6953         PR gcov-profile/84548
6954         * gcov.c (process_file): Allow partial overlap and consider it
6955         also as group functions.
6956         (output_lines): Properly calculate range of lines for a group.
6958 2018-02-27  Martin Liska  <mliska@suse.cz>
6960         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
6961         'ggc' suffixes.  Change first column width.
6962         (timer::print): Fix formatting of the column.
6964 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
6966         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
6967         preserve inline entry blocks for the sake of debug inline
6968         entry point markers alone.
6969         (remove_unused_locals): Suggest in comments a better place to
6970         force the preservation of inline entry blocks that are
6971         otherwise unused, but do not preserve them.
6973 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6975         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
6977 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6979         PR target/84039
6980         * config/i386/constraints.md (Bs): Replace
6981         ix86_indirect_branch_register with
6982         TARGET_INDIRECT_BRANCH_REGISTER.
6983         (Bw): Likewise.
6984         * config/i386/i386.md (indirect_jump): Likewise.
6985         (tablejump): Likewise.
6986         (*sibcall_memory): Likewise.
6987         (*sibcall_value_memory): Likewise.
6988         Peepholes of indirect call and jump via memory: Likewise.
6989         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
6990         (*sibcall_value_GOT_32): Likewise.
6991         * config/i386/predicates.md (indirect_branch_operand): Likewise.
6992         (GOT_memory_operand): Likewise.
6993         (call_insn_operand): Likewise.
6994         (sibcall_insn_operand): Likewise.
6995         (GOT32_symbol_operand): Likewise.
6996         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
6998 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7000         PR rtl-optimization/83496
7001         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
7002         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
7003         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
7004         redundant insn, if any.
7005         (relax_delay_slots): Likewise.
7006         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
7008 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
7010         PR tree-optimization/83965
7011         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
7012         that grouped statements are part of a reduction chain.  Return
7013         true if the statement is not marked as a reduction itself but
7014         is part of a group.
7015         (vect_recog_dot_prod_pattern): Don't check whether the statement
7016         is part of a group here.
7017         (vect_recog_sad_pattern): Likewise.
7018         (vect_recog_widen_sum_pattern): Likewise.
7020 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7022         PR debug/84545
7023         * final.c (rest_of_clean_state): Also look for calls inside sequences.
7025 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7027         PR target/84530
7028         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
7029         the bool argument.
7030         (ix86_output_indirect_function_return): New prototype.
7031         (ix86_split_simple_return_pop_internal): Likewise.
7032         * config/i386/i386.c (indirect_return_via_cx): New.
7033         (indirect_return_via_cx_bnd): Likewise.
7034         (indirect_thunk_name): Handle return va CX_REG.
7035         (output_indirect_thunk_function): Create alias for
7036         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
7037         (ix86_output_indirect_jmp): Remove the bool argument.
7038         (ix86_output_indirect_function_return): New function.
7039         (ix86_split_simple_return_pop_internal): Likewise.
7040         * config/i386/i386.md (*indirect_jump): Don't pass false
7041         to ix86_output_indirect_jmp.
7042         (*tablejump_1): Likewise.
7043         (simple_return_pop_internal): Change it to define_insn_and_split.
7044         Call ix86_split_simple_return_pop_internal to split it for
7045         -mfunction-return=.
7046         (simple_return_indirect_internal): Call
7047         ix86_output_indirect_function_return instead of
7048         ix86_output_indirect_jmp.
7050 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
7052         PR bootstrap/84405
7053         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
7054         memset and value initialization afterwards.
7056 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
7058         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
7060 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7062         PR target/84521
7063         * common/config/aarch64/aarch64-common.c
7064         (aarch_option_optimization_table[]): Switch
7065         off fomit-frame-pointer
7067 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7068             Chung-Ju Wu  <jasonwucj@gmail.com>
7070         * config/nds32/nds32-multiple.md (load_multiple): Disallow
7071         volatile memory.
7072         (store_multiple): Ditto.
7074 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7076         * config.gcc: Add --with-cpu support for nds32 target.
7077         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
7078         * config/nds32/nds32.opt: Add -mcpu= option.
7080 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
7082         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
7083         isel=yes): Warn for these deprecated options.
7085 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
7087         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
7088         ISA_2_5_MASKS_EMBEDDED.
7090 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
7092         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
7093         p->max as pointers rather than using iterative_hash_expr.
7095 2018-02-23  Carl Love  <cel@us.ibm.com>
7097         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
7098         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
7099         BU_P8V_OVERLOAD_2.
7100         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
7101         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
7102         P8V_BUILTIN_VEC_VUNSIGNED2.
7104 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
7106         PR target/81572
7107         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
7108         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
7109         LRA_UNKNOWN_ALT.
7110         * lra-constraints.c (curr_insn_transform): Set up
7111         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
7112         LRA_UNKNOWN_ALT.
7113         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
7114         * lra-eliminations.c (spill_pseudos): Ditto.
7115         (process_insn_for_elimination): Ditto.
7116         * lra-lives.c (reg_early_clobber_p): Use the new macros.
7117         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
7118         LRA_NON_CLOBBERED_ALT.
7120 2018-02-22  Martin Sebor  <msebor@redhat.com>
7122         PR tree-optimization/84480
7123         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
7124         to maybe_diag_stxncpy_trunc.  Call it.
7125         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
7126         from gimple_fold_builtin_strcpy.  Print inlining stack.
7127         (handle_builtin_stxncpy): Print inlining stack.
7128         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
7130 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
7132         PR target/84176
7133         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
7134         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
7135         and -fcheck-pointer-bounds are used together.
7136         (indirect_thunk_prefix): New enum.
7137         (indirect_thunk_need_prefix): New function.
7138         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
7139         "_nt" instead of "_bnd" for NOTRACK prefix.
7140         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
7141         (output_indirect_thunk_function): Likewise.
7142         (): Likewise.
7143         (ix86_code_end): Update output_indirect_thunk_function calls.
7144         (ix86_output_indirect_branch_via_reg): Replace
7145         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
7146         (ix86_output_indirect_branch_via_push): Likewise.
7147         (ix86_output_function_return): Likewise.
7148         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
7149         incompatible with -fcf-protection=branch and
7150         -fcheck-pointer-bounds.
7152 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7154         PR target/83335
7155         * config/aarch64/aarch64.c (aarch64_print_address_internal):
7156         Change gcc_assert call to output_operand_lossage.
7158 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7160         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
7162 2018-02-22  DJ Delorie  <dj@redhat.com>
7163             Sebastian Perta  <sebastian.perta@renesas.com>
7164             Oleg Endo  <olegendo@gcc.gnu.org>
7166         * config/rx/rx.c (rx_rtx_costs): New function.
7167         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
7169 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7171         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
7173 2018-02-22  Martin Liska  <mliska@suse.cz>
7175         PR driver/83193
7176         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
7177         Add "native" as a possible value.
7179 2018-02-22  Martin Liska  <mliska@suse.cz>
7181         PR driver/83193
7182         * config/i386/i386.c (ix86_option_override_internal):
7183         Add "native" as a possible value for -march and -mtune.
7185 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
7187         PR target/84502
7188         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
7189         to all type variants.
7191         PR tree-optimization/84503
7192         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
7193         width as info->bitpos + info->bitsize - start.
7194         (merged_store_group::merge_overlapping): Simplify width computation.
7195         (check_no_overlap): New function.
7196         (imm_store_chain_info::try_coalesce_bswap): Compute expected
7197         start + width and last_order of the group, fail if check_no_overlap
7198         fails.
7199         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
7200         to group if check_no_overlap fails.
7202 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7204         * config/rs6000/altivec.md: Delete contraint arguments to
7205         define_expand, define_split, and define_peephole2, and in
7206         define_insn_and_split if always unused.
7207         * config/rs6000/darwin.md: Ditto.
7208         * config/rs6000/dfp.md: Ditto.
7209         * config/rs6000/rs6000.md: Ditto.
7210         * config/rs6000/sync.md: Ditto.
7211         * config/rs6000/vector.md: Ditto.
7212         * config/rs6000/vsx.md: Ditto.
7214 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7216         * config/rs6000/altivec.md: Write output control strings as braced
7217         blocks instead of double-quoted strings.
7218         * config/rs6000/darwin.md: Ditto.
7219         * config/rs6000/rs6000.md: Ditto.
7220         * config/rs6000/vector.md: Ditto.
7221         * config/rs6000/vsx.md: Ditto.
7223 2018-02-21  Jason Merrill  <jason@redhat.com>
7225         PR c++/84314 - ICE with templates and fastcall attribute.
7226         * attribs.c (build_type_attribute_qual_variant): Remove assert.
7228 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7230         * ipa-cp.c (determine_versionability): Fix comment typos.
7232 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7234         PR c/84229
7235         * ipa-cp.c (determine_versionability): Do not version functions caling
7236         va_arg_pack.
7238 2018-02-21  Martin Liska  <mliska@suse.cz>
7240         PR driver/83193
7241         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7242         Add "native" as a possible value.
7243         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
7244         the macro when native cpu detection is available.
7246 2018-02-21  Martin Liska  <mliska@suse.cz>
7248         PR driver/83193
7249         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7250         Add "native" as a possible value.
7251         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7252         when native cpu detection is available.
7254 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
7255             Martin Sebor  <msebor@redhat.com>
7257         PR tree-optimization/84478
7258         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7259         false.
7260         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7261         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7262         support which is conservatively correct, for 2 only stay conservative
7263         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
7264         argument to the 2 argument get_range_strlen, adjust 6 arg
7265         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7266         false.
7267         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7268         (gimple_fold_builtin_strlen): Pass true as last argument to
7269         get_range_strlen.
7271 2018-02-20  Martin Sebor  <msebor@redhat.com>
7273         PR middle-end/84095
7274         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7275         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
7276         (builtin_memref::builtin_memref): Factor out parts into
7277         set_base_and_offset and call it.
7279 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7281         PR middle-end/84406
7282         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7283         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7284         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
7285         search at the associated MODE_INT.
7287 2018-02-20  Jeff Law  <law@redhat.com>
7289         PR middle-end/82123
7290         PR tree-optimization/81592
7291         PR middle-end/79257
7292         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
7293         for range data rather than using global data.
7294         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
7295         range data rather than using global data.
7296         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
7297         pass it to children as needed.
7298         (struct directive::fmtresult): Similarly.
7299         (struct directive::set_width): Similarly.
7300         (struct directive::set_precision): Similarly.
7301         (format_integer, format_directive, parse_directive): Similarly.
7302         (format_none): Accept unnamed vr_values parameter.
7303         (format_percent, format_floating, format_character): Similarly.
7304         (format_string, format_plain): Similarly.
7305         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
7306         the EVRP range analyzer for range data rather than using global data.
7307         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
7308         gimple-ssa-evrp-analyze.h
7309         (class sprintf_dom_walker): Add after_dom_children member function.
7310         Add evrp_range_analyzer member.
7311         (sprintf_dom_walker::before_dom_children): Call into the EVRP
7312         range analyzer as needed.
7313         (sprintf_dom_walker::after_dom_children): New member function.
7314         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
7315         if not optimizing.
7316         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
7317         (evrp_range_analyzer::pop_to_marker): Likewise.
7319 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7321         PR tree-optimization/84419
7322         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
7323         with the required type if its current type is compatible but
7324         different.
7326 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
7328         PR middle-end/82004
7329         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
7330         after vectorization.
7332 2018-02-20  Martin Liska  <mliska@suse.cz>
7334         PR driver/83193
7335         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
7336         possible values if we don't have a hint.
7338 2018-02-20  Martin Liska  <mliska@suse.cz>
7340         PR c/84310
7341         PR target/79747
7342         * final.c (shorten_branches): Build align_tab array with one
7343         more element.
7344         * opts.c (finish_options): Add alignment option limit check.
7345         (MAX_CODE_ALIGN): Likewise.
7346         (MAX_CODE_ALIGN_VALUE): Likewise.
7347         * doc/invoke.texi: Document maximum allowed option value for
7348         all -falign-* options.
7350 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
7352         PR target/84146
7353         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
7354         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
7355         * var-tracking.c (emit_note_insn_var_location): Remove all references
7356         to NOTE_INSN_CALL_ARG_LOCATION.
7357         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7358         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7359         Use copy_rtx_if_shared.
7360         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7361         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7362         (dwarf2out_var_location): Remove handling of
7363         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7364         on call_insn.
7365         * final.c (final_scan_insn): Remove all references to
7366         NOTE_INSN_CALL_ARG_LOCATION.
7367         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
7368         before dumping final insns.
7369         * except.c (emit_note_eh_region_end): Remove all references to
7370         NOTE_INSN_CALL_ARG_LOCATION.
7371         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7372         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7373         * config/arc/arc.c (hwloop_optimize): Likewise.
7374         * config/arm/arm.c (create_fix_barrier): Likewise.
7375         * config/s390/s390.c (s390_chunkify_start): Likewise.
7376         * config/sh/sh.c (find_barrier): Likewise.
7377         * config/i386/i386.c (rest_of_insert_endbranch,
7378         ix86_seh_fixup_eh_fallthru): Likewise.
7379         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7380         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7381         * config/frv/frv.c (frv_function_prologue): Likewise.
7382         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
7383         reg note.
7384         (note_outside_basic_block_p): Remove all references to
7385         NOTE_INSN_CALL_ARG_LOCATION.
7386         * gengtype.c (adjust_field_rtx_def): Likewise.
7387         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7388         Likewise.
7389         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7390         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7392         PR c++/84444
7393         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7394         is ADDR_EXPR.
7396         PR tree-optimization/84452
7397         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7398         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7399         is NULL.
7401 2018-02-19  Martin Liska  <mliska@suse.cz>
7403         PR sanitizer/82183
7404         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7406 2018-02-19  Martin Liska  <mliska@suse.cz>
7407             Richard Sandiford  <richard.sandiford@linaro.org>
7409         PR tree-optimization/82491
7410         * gimple-fold.c (get_base_constructor): Make earlier bail out
7411         to prevent ubsan.
7413 2018-02-19  Carl Love  <cel@us.ibm.com>
7415         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7416         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7417         BU_P8V_OVERLOAD_1.
7418         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7419         P8V_BUILTIN_VEC_NEG.
7421 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
7423         * config/rl78/rl78.md (movdf): New define expand.
7425 2018-02-19  Martin Liska  <mliska@suse.cz>
7427         PR other/80589
7428         * doc/invoke.texi: Fix typo.
7429         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7431 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
7433         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7434         handle rs6000_single_float and rs6000_double_float specially for
7435         e500 family CPUs.
7437 2018-02-16  Jeff Law  <law@redhat.com>
7439         * config/rx/rx.c (add_pop_cfi_notes): New function.;
7440         (pop_regs): Use it.
7442 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7444         PR ipa/84425
7445         * ipa-inline.c (inline_small_functions): Fix a typo.
7447 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7449         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7451 2018-02-16  Carl Love  <cel@us.ibm.com>
7453         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7454         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7455         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7456         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7457         expansion to P8V_BUILTIN_VEC_FLOAT2.
7459 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
7461         PR rtl-optimization/70023
7462         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7463         src_regno into account.
7465 2018-02-16  Carl Love  <cel@us.ibm.com>
7467         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7468         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7469         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7470         * config/rs6000/rs6000.c: Remove case statements for
7471         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7472         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7473         and P9V_BUILTIN_VEC_VINSERT4B.
7474         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7475         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7476         * config/rs6000/vsx.md:
7477         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7478         vec_insert4b.
7480 2018-02-16  Carl Love  <cel@us.ibm.com>
7482         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7483         vec_insert4b.
7484         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7485         definitions.
7486         * config/rs6000/rs6000-c.c: Add the definitions for
7487         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7488         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7489         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7490         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7491         definition for insert4b and define insn *insert3b_internal.
7492         * doc/extend.texi: Add documentation for vec_extract4b.
7494 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7496         * doc/extend.texi (Backwards Compatibility): Mention friend
7497         injection.  Note for-scope is deprecated.
7498         * doc/invoke.texi (-ffriend-injection): Deprecate.
7500 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7502         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7503         that moved to I2, also allow destinations that are a paradoxical
7504         subreg (instead of a normal reg).
7506 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7508         PR target/83831
7509         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7510         to QImode.
7512 2018-02-16  Richard Biener  <rguenther@suse.de>
7514         PR tree-optimization/84037
7515         PR tree-optimization/84016
7516         PR target/82862
7517         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7518         Adjust vec_construct for the fact we need additional higher latency
7519         128bit inserts for AVX256 and AVX512 vector builds.
7520         (ix86_add_stmt_cost): Scale vector construction cost for
7521         elementwise loads.
7523 2018-02-16  Richard Biener  <rguenther@suse.de>
7525         PR tree-optimization/84417
7526         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7527         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7528         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7530 2018-02-16  Martin Liska  <mliska@suse.cz>
7532         PR sanitizer/84307
7533         * internal-fn.def (ASAN_CHECK): Set proper flags.
7534         (ASAN_MARK): Likewise.
7536 2018-02-16  Julia Koval  <julia.koval@intel.com>
7538         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7539         from PTA_CANNONLAKE.
7541 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7543         PR target/84272
7544         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7545         Use ++iter rather than iter++ for std::list iterators.
7546         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7547         defer deleting them until all nodes in the forest are processed.  Do
7548         free even leaf nodes.  Change to_process into auto_vec.
7550         PR bootstrap/84405
7551         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7552         * vec.h (vec_default_construct): Use memset instead of placement new
7553         if BROKEN_VALUE_INITIALIZATION is defined.
7554         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7555         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7556         is defined.
7558         PR rtl-optimization/83723
7559         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7560         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7561         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7562         recursive calls.
7563         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7564         callers.
7565         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7567 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7569         PR rtl-optimization/81443
7570         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7571         from inner REGs to paradoxical SUBREGs.
7573 2018-02-16  Richard Biener  <rguenther@suse.de>
7575         PR tree-optimization/84399
7576         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7577         For operands we can analyze at their definition make sure we can
7578         analyze them at each use as well.
7580 2018-02-16  Richard Biener  <rguenther@suse.de>
7582         PR tree-optimization/84190
7583         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7584         volatile accesses if the decl isn't volatile.
7586 2018-02-15  Jason Merrill  <jason@redhat.com>
7588         PR c++/84314 - ICE with templates and fastcall attribute.
7589         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7590         TYPE_CANONICAL on an existing type.
7592 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7594         PR tree-optimization/84383
7595         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7596         dstoff nor call operand_equal_p if dstbase is NULL.
7598         PR tree-optimization/84334
7599         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7600         also a CONSTANT_CLASS_P, punt.
7602 2018-02-14  Jim Wilson  <jimw@sifive.com>
7604         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7605         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7606         to where locals are set.  Add TARGET_RVC support.
7607         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7609 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7611         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7613 2018-02-14  Martin Sebor  <msebor@redhat.com>
7615         PR tree-optimization/83698
7616         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7617         arrays constrain the offset range to their bounds.
7618         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7619         (builtin_access::overlap): Avoid setting the size of overlap if it's
7620         already been set.
7621         (maybe_diag_overlap): Also consider arrays when deciding what values
7622         of offsets to include in diagnostics.
7624 2018-02-14  Martin Sebor  <msebor@redhat.com>
7626         PR c/84108
7627         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7628         that correspond to the kind of a declaration.
7630 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7632         PR target/83984
7633         * config/pa/pa.md: Load address of PIC label using the linkage table
7634         if the label is nonlocal.
7636 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7638         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7639         warning message if user requests -maltivec=be.
7640         * doc/invoke.texi: Document deprecation of -maltivec=be.
7642 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7644         PR target/84220
7645         * config/rs6000/rs6000-c.c: Update definitions for
7646         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7647         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7649 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7651         PR target/84239
7652         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7653         add _get_ssp intrinsics. Remove argument from
7654         __builtin_ia32_rdssp[d|q].
7655         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7656         * config/i386/i386-builtin.def: Remove argument from
7657         __builtin_ia32_rdssp[d|q].
7658         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7659         ix86_expand_special_args_builtin for _rdssp[d|q].
7660         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7661         Clear register before usage.
7662         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7663         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7665 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7667         PR tree-optimization/84357
7668         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7669         operand 1 of an ARRAY_REF too.
7671 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7673         PR target/83831
7674         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7675         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7676         declarations.
7677         (set_of_reg): New struct.
7678         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7679         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7680         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7681         functions.
7682         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7683         Split into bitclr, bitset, bitinvert patterns if appropriate.
7684         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7685         use rx_fuse_in_memory_bitop.
7686         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7687         to named insn, correct maximum insn length.
7689 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7691         PR target/79242
7692         * machmode.def: Define a complex mode for PARTIAL_INT.
7693         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7694         MODE_PARTIAL_INT.
7695         * doc/rtl.texi: Document CSPImode.
7696         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7697         handling.
7698         (msp430_hard_regno_nregs_with_padding): Likewise.
7700 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7702         PR target/84279
7703         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7705 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7707         PR rtl-optimization/84169
7708         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7709         we generated a parallel as new i3 and we split that to new i2 and i3
7710         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7711         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7712         those to i2, not i1.  Partially rewrite this scan code.
7714 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7716         PR c/82210
7717         * stor-layout.c (place_field): For variable length fields, adjust
7718         offset_align afterwards not just based on the field's alignment,
7719         but also on the size.
7721         PR middle-end/84309
7722         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7723         of exps and logs in the use_exp2 case.
7725 2018-02-13  Jeff Law  <law@redhat.com>
7727         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7728         entry for "vector".
7730         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7731         ARGS as unused.
7733 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7735         PR debug/84342
7736         PR debug/84319
7737         * common.opt (gas-loc-support, gas-locview-support): New.
7738         (ginline-points, ginternal-reset-location-views): New.
7739         * doc/invoke.texi: Document them.  Use @itemx where intended.
7740         (gvariable-location-views): Adjust.
7741         * target.def (reset_location_view): New.
7742         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7743         (TARGET_RESET_LOCATION_VIEW): New.
7744         * doc/tm.texi: Rebuilt.
7745         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7746         (dwarf2out_default_as_locview_support): New.
7747         (output_asm_line_debug_info): Use option variables.
7748         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7749         (output_loc_list): Likewise.
7750         (add_high_low_attributes): Check option variables.
7751         Don't output entry view attribute in strict mode.
7752         (gen_inlined_subroutine_die): Check option variables.
7753         (dwarf2out_inline_entry): Likewise.
7754         (init_sections_and_labels): Likewise.
7755         (dwarf2out_early_finish): Likewise.
7756         (maybe_reset_location_view): New, from...
7757         (dwarf2out_var_location): ... here.  Call it.
7758         * debug.h (dwarf2out_default_as_loc_support): Declare.
7759         (dwarf2out_default_as_locview_support): Declare.
7760         * hooks.c (hook_int_rtx_insn_0): New.
7761         * hooks.h (hook_int_rtx_insn_0): Declare.
7762         * toplev.c (process_options): Take -gas-loc-support and
7763         -gas-locview-support from dwarf2out.  Enable
7764         -gvariable-location-views by default only with locview
7765         assembler support.  Enable -ginternal-reset-location-views by
7766         default only if the target defines the corresponding hook.
7767         Enable -ginline-points by default if location views are
7768         enabled; force it disabled if statement frontiers are
7769         disabled.
7770         * tree-inline.c (expand_call_inline): Check option variables.
7771         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7773 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
7775         PR tree-optimization/84321
7776         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7777         handling.  Also check whether the anti-range contains any values
7778         that satisfy the mask; switch to a VR_RANGE if not.
7780 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
7782         PR sanitizer/84340
7783         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7785 2018-02-13  Martin Jambor  <mjambor@suse.cz>
7787         PR c++/83990
7788         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7789         of call statements, also set location of a load to a temporary.
7791 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
7793         * config/rl78/rl78.c (add_vector_labels): New function.
7794         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
7795         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
7796         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
7797         which checks that no arguments are passed.
7798         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
7799         * doc/extend.texi: Documentation for the new attribute.
7801 2018-02-13  Andreas Schwab  <schwab@suse.de>
7803         * config/riscv/linux.h (CPP_SPEC): Define.
7805 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7807         PR target/84335
7808         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
7809         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
7810         OPTION_MASK_ISA_AES as first argument to def_builtin_const
7811         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
7812         instead of OPTION_MASK_ISA_PCLMUL as first argument to
7813         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
7814         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
7815         temporarily for AES and PCLMUL builtins.
7817         PR tree-optimization/84339
7818         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
7819         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
7820         Formatting fixes.
7822         PR middle-end/84309
7823         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
7824         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
7825         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
7826         inline function.
7827         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
7828         inline function.
7829         * omp-simd-clone.h: New file.
7830         * omp-simd-clone.c: Include omp-simd-clone.h.
7831         (expand_simd_clones): No longer static.
7832         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
7833         cgraph.h and omp-simd-clone.h.
7834         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
7835         (vect_recog_widen_shift_pattern): Formatting fix.
7836         (vect_pattern_recog_1): Don't check optab for calls.
7838         PR target/84336
7839         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
7840         operands[2] into a REG before using gen_lowpart on it.
7842 2018-02-12  Jeff Law  <law@redhat.com>
7844         PR target/83760
7845         * config/sh/sh.c (find_barrier): Consider a sibling call
7846         a barrier as well.
7848         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
7849         successfully back substituting a reg.
7851 2018-02-12  Richard Biener  <rguenther@suse.de>
7853         PR tree-optimization/84037
7854         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
7855         parameter, move visited init to caller.
7856         (vect_slp_analyze_operations): Separate cost from validity
7857         check, initialize visited once for all instances.
7858         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
7859         for all instances.
7860         * tree-vect-stmts.c (vect_model_simple_cost): Make early
7861         out an assert.
7862         (vect_model_promotion_demotion_cost): Likewise.
7863         (vectorizable_bswap): Guard cost modeling with !slp_node
7864         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
7865         SLP stmts.
7866         (vectorizable_call): Likewise.
7867         (vectorizable_conversion): Likewise.
7868         (vectorizable_assignment): Likewise.
7869         (vectorizable_shift): Likewise.
7870         (vectorizable_operation): Likewise.
7871         (vectorizable_store): Likewise.
7872         (vectorizable_load): Likewise.
7873         (vectorizable_condition): Likewise.
7874         (vectorizable_comparison): Likewise.
7876 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
7878         PR sanitizer/84307
7879         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
7880         (ASAN_MARK): Fix fnspec to account for return value, change pointer
7881         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
7883 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7885         PR middle-end/83665
7886         * params.def (inline-min-speedup): Increase from 8 to 15.
7887         (max-inline-insns-auto): Decrease from 40 to 30.
7888         * ipa-split.c (consider_split): Add some buffer for function to
7889         be considered inlining candidate.
7890         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
7891         default values.
7893 2018-02-12  Richard Biener  <rguenther@suse.de>
7895         PR tree-optimization/84037
7896         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
7897         matched stmts if we cannot swap the non-matched ones.
7899 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7901         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
7902         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
7903         _mm_maskz_scalef_round_ss): New intrinsics.
7904         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
7905         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
7906         __builtin_ia32_scalefss_round): Remove.
7907         (__builtin_ia32_scalefsd_mask_round,
7908         __builtin_ia32_scalefss_mask_round): New intrinsics.
7909         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
7910         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
7911         ((match_operand:VF_128 2 "<round_nimm_predicate>"
7912         "<round_constraint>")): Changed to ...
7913         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
7914         "<round_scalar_constraint>")): ... this.
7915         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
7916         %0, %1, %2<round_op3>}"): Changed to ...
7917         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
7918         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
7919         %2<round_scalar_mask_op3>}"): ... this.
7920         * config/i386/subst.md (round_scalar_nimm_predicate): New.
7922 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7924         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
7925         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
7926         (_mm_maskz_sqrt_round_ss): New intrinsics.
7927         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
7928         (__builtin_ia32_sqrtsd_mask_round)
7929         (__builtin_ia32_sqrtss_mask_round): New builtins.
7930         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
7931         (__builtin_ia32_sqrtss_round): Remove.
7932         (__builtin_ia32_sqrtsd_mask_round)
7933         (__builtin_ia32_sqrtss_mask_round): New builtins.
7934         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
7935         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
7936         ((match_operand:VF_128 1 "vector_operand"
7937         "xBm,<round_constraint>")): Changed to ...
7938         ((match_operand:VF_128 1 "vector_operand"
7939         "xBm,<round_scalar_constraint>")): ... this.
7940         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
7941         %0, %2, %<iptr>1<round_op3>}): Changed to ...
7942         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
7943         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
7944         %<iptr>1<round_scalar_mask_op3>}): ... this.
7945         ((set_attr "prefix" "<round_prefix>")): Changed to ...
7946         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
7948 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
7950         PR target/84266
7951         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
7952         Cast vec_cmpeq result to correct type.
7953         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
7954         Cast vec_cmpgt result to correct type.
7956 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
7958         * final.c (final_scan_insn_1): Renamed from...
7959         (final_scan_insn): ... this.  New wrapper, to recover
7960         seen from the outermost call in recursive ones.
7961         * config/sparc/sparc.c (output_return): Drop seen from call.
7962         (output_sibcall): Likewise.
7963         * config/visium/visium.c (output_branch): Likewise.
7965 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
7967         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
7968         function label.
7970 2018-02-10  Alan Modra  <amodra@gmail.com>
7972         PR target/84300
7973         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
7974         Specify LR as an input.
7976 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
7978         PR sanitizer/83987
7979         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
7980         remove_member_access_dummy_vars): New functions.
7981         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
7982         lower_omp_1, execute_lower_omp): Use them.
7984         PR rtl-optimization/84308
7985         * shrink-wrap.c (spread_components): Release todo vector.
7987 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
7989         PR rtl-optimization/57193
7990         * ira-color.c (struct allocno_color_data): Add member
7991         conflict_allocno_hard_prefs.
7992         (update_conflict_allocno_hard_prefs): New.
7993         (bucket_allocno_compare_func): Add a preference based on
7994         conflict_allocno_hard_prefs.
7995         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
7996         (color_allocnos): Remove a dead code.  Initiate
7997         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
7999 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8001         PR target/84226
8002         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
8003         constraint from =wa to wa.  Avoid a subreg on the output operand,
8004         instead use a pseudo and subreg it in a move.
8005         (p9_xxbrd_<mode>): Changed to ...
8006         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
8007         (p9_xxbrd_v2df): New expander.
8008         (p9_xxbrw_<mode>): Changed to ...
8009         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
8010         (p9_xxbrw_v4sf): New expander.
8012 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8014         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
8016 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
8018         PR target/83926
8019         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
8020         multiply in 32-bit mode.
8021         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
8022         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
8023         mode.
8025 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8027         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
8028         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
8029         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
8030         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
8032 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
8034         PR lto/84213
8035         * dwarf2out.c (is_trivial_indirect_ref): New function.
8036         (dwarf2out_late_global_decl): Do not generate a location
8037         attribute for variables that have a non-trivial DECL_VALUE_EXPR
8038         and that are not defined in the current unit.
8040 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8042         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
8043         instead of a libcall for UNORDERED.
8045 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
8047         PR target/82641
8048         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
8049         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
8051 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8053         PR target/PR84295
8054         * config/s390/s390.c (s390_set_current_function): Invoke
8055         s390_indirect_branch_settings also if fndecl didn't change.
8057 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8059         * config/rs6000/rs6000.md (blockage): Set length to zero.
8061 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8063         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
8065 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8067         PR sanitizer/84285
8068         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
8069         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
8070         -static-lib*san.
8072         PR debug/84252
8073         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
8074         PARALLEL incoming that failed vt_get_decl_and_offset check.
8076         PR middle-end/84237
8077         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
8078         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
8079         TREE_READONLY bit.
8080         (get_variable_section): For decls in named .bss* sections pass true as
8081         second argument to bss_initializer_p.
8083 2018-02-09  Marek Polacek  <polacek@redhat.com>
8084             Jakub Jelinek  <jakub@redhat.com>
8086         PR c++/83659
8087         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
8088         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
8089         Sync some changes from cxx_fold_indirect_ref.
8091 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8093         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
8094         markers.
8095         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
8096         (BLOCK_INLINE_ENTRY_LABEL): New.
8097         (dwarf2out_var_location): Disregard inline entry markers.
8098         (inline_entry_data): New struct.
8099         (inline_entry_data_hasher): New hashtable type.
8100         (inline_entry_data_hasher::hash): New.
8101         (inline_entry_data_hasher::equal): New.
8102         (inline_entry_data_table): New variable.
8103         (add_high_low_attributes): Add DW_AT_entry_pc and
8104         DW_AT_GNU_entry_view attributes if a pending entry is found
8105         in inline_entry_data_table.  Add old entry_pc attribute only
8106         if debug nonbinding markers are disabled.
8107         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
8108         markers are enabled.
8109         (block_within_block_p, dwarf2out_inline_entry): New.
8110         (dwarf2out_finish): Check that no entries remained in
8111         inline_entry_data_table.
8112         * final.c (reemit_insn_block_notes): Handle inline entry notes.
8113         (final_scan_insn, notice_source_line): Likewise.
8114         (rest_of_clean_state): Skip inline entry markers.
8115         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
8116         markers.
8117         * gimple.c (gimple_build_debug_inline_entry): New.
8118         * gimple.h (enum gimple_debug_subcode): Add
8119         GIMPLE_DEBUG_INLINE_ENTRY.
8120         (gimple_build_debug_inline_entry): Declare.
8121         (gimple_debug_inline_entry_p): New.
8122         (gimple_debug_nonbind_marker_p): Adjust.
8123         * insn-notes.def (INLINE_ENTRY): New.
8124         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
8125         inline entry marker notes.
8126         (print_insn): Likewise.
8127         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
8128         (INSN_DEBUG_MARKER_KIND): Likewise.
8129         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
8130         * tree-inline.c (expand_call_inline): Build and insert
8131         debug_inline_entry stmt.
8132         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
8133         inline entry blocks early, if nonbind markers are enabled.
8134         (dump_scope_block): Dump fragment info.
8135         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
8136         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
8137         (gimple_build_debug_inline_entry): New.
8138         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
8139         Enable/disable inline entry points too.
8140         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
8141         (DEBUG_INSN): Describe inline entry markers.
8143         * common.opt (gvariable-location-views): New.
8144         (gvariable-location-views=incompat5): New.
8145         * config.in: Rebuilt.
8146         * configure: Rebuilt.
8147         * configure.ac: Test assembler for view support.
8148         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
8149         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
8150         * dwarf2out.c (var_loc_view): New typedef.
8151         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
8152         (dwarf2out_locviews_in_attribute): New.
8153         (dwarf2out_locviews_in_loclist): New.
8154         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
8155         (enum dw_line_info_opcode): Add LI_adv_address.
8156         (struct dw_line_info_table): Add view.
8157         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
8158         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
8159         (zero_view_p): New variable.
8160         (ZERO_VIEW_P): New macro.
8161         (output_asm_line_debug_info): New.
8162         (struct var_loc_node): Add view.
8163         (add_AT_view_list, AT_loc_list): New.
8164         (add_var_loc_to_decl): Add view param.  Test it against last.
8165         (new_loc_list): Add view params.  Record them.
8166         (AT_loc_list_ptr): Handle loc and view lists.
8167         (view_list_to_loc_list_val_node): New.
8168         (print_dw_val): Handle dw_val_class_view_list.
8169         (size_of_die): Likewise.
8170         (value_format): Likewise.
8171         (loc_list_has_views): New.
8172         (gen_llsym): Set vl_symbol too.
8173         (maybe_gen_llsym, skip_loc_list_entry): New.
8174         (dwarf2out_maybe_output_loclist_view_pair): New.
8175         (output_loc_list): Output view list or entries too.
8176         (output_view_list_offset): New.
8177         (output_die): Handle dw_val_class_view_list.
8178         (output_dwarf_version): New.
8179         (output_compilation_unit_header): Use it.
8180         (output_skeleton_debug_sections): Likewise.
8181         (output_rnglists, output_line_info): Likewise.
8182         (output_pubnames, output_aranges): Update version comments.
8183         (output_one_line_info_table): Output view numbers in asm comments.
8184         (dw_loc_list): Determine current endview, pass it to new_loc_list.
8185         Call maybe_gen_llsym.
8186         (loc_list_from_tree_1): Adjust.
8187         (add_AT_location_description): Create view list attribute if
8188         needed, check it's absent otherwise.
8189         (convert_cfa_to_fb_loc_list): Adjust.
8190         (maybe_emit_file): Call output_asm_line_debug_info for test.
8191         (dwarf2out_var_location): Reset views as needed.  Precompute
8192         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
8193         attribute.  Set view.
8194         (new_line_info_table): Reset next view.
8195         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
8196         (dwarf2out_source_line): Likewise.  Output view resets and labels to
8197         the assembler, or select appropriate line info opcodes.
8198         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
8199         (optimize_string_length): Catch it.  Adjust.
8200         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
8201         dw_val_class_view_list, and remove it if no longer needed.
8202         (hash_loc_list): Hash view numbers.
8203         (loc_list_hasher::equal): Compare them.
8204         (optimize_location_lists): Check whether a view list symbol is
8205         needed, and whether the locview attribute is present, and
8206         whether they match.  Remove the locview attribute if no longer
8207         needed.
8208         (index_location_lists): Call skip_loc_list_entry for test.
8209         (dwarf2out_finish): Call output_asm_line_debug_info for test.
8210         Use output_dwarf_version.
8211         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
8212         (struct dw_val_node): Add val_view_list.
8213         * final.c (SEEN_NEXT_VIEW): New.
8214         (set_next_view_needed): New.
8215         (clear_next_view_needed): New.
8216         (maybe_output_next_view): New.
8217         (final_start_function): Rename to...
8218         (final_start_function_1): ... this.  Take pointer to FIRST,
8219         add SEEN parameter.  Emit param bindings in the initial view.
8220         (final_start_function): Reintroduce SEEN-less interface.
8221         (final): Rename to...
8222         (final_1): ... this.  Take SEEN parameter.  Output final pending
8223         next view at the end.
8224         (final): Reintroduce seen-less interface.
8225         (final_scan_insn): Output pending next view before switching
8226         sections or ending a block.  Mark the next view as needed when
8227         outputting variable locations.  Notify debug backend of section
8228         changes, and of location view changes.
8229         (rest_of_handle_final): Adjust.
8230         * toplev.c (process_options): Autodetect value for debug variable
8231         location views option.  Warn on incompat5 without -gdwarf-5.
8232         * doc/invoke.texi (gvariable-location-views): New.
8233         (gvariable-location-views=incompat5): New.
8234         (gno-variable-location-views): New.
8236 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
8238         PR tree-optimization/84136
8239         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
8240         that the result of find_edge is non-NULL.
8242 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8244         PR target/83008
8245         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8246         storing integer register in SImode.  Fix cost of 256 and 512
8247         byte aligned SSE register store.
8249 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8251         * config/i386/i386.c (ix86_multiplication_cost): Fix
8252         multiplication cost for TARGET_AVX512DQ.
8254 2018-02-08  Marek Polacek  <polacek@redhat.com>
8256         PR tree-optimization/84238
8257         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8258         get_range_strlen.
8260 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8262         PR tree-optimization/84265
8263         * tree-vect-stmts.c (vectorizable_store): Don't treat
8264         VMAT_CONTIGUOUS accesses as grouped.
8265         (vectorizable_load): Likewise.
8267 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8269         PR tree-optimization/81635
8270         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8271         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8272         (test_round_for_mask): New functions.
8273         (wide_int_cc_tests): Call test_round_for_mask.
8274         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8275         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8276         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8277         range returned by get_range_info.
8279 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8281         PR ipa/81360
8282         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8283         * symtab.c: Include builtins.h
8284         (symtab_node::output_to_lto_symbol_table_p): Move here
8285         from lto-streamer-out.c:output_symbol_p.
8286         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8287         (output_symbol_p): Move all logic to symtab.c
8288         (produce_symtab): Update.
8290 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8292         * config/s390/s390-opts.h (enum indirect_branch): Define.
8293         * config/s390/s390-protos.h (s390_return_addr_from_memory)
8294         (s390_indirect_branch_via_thunk)
8295         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
8296         (enum s390_indirect_branch_type): Define.
8297         * config/s390/s390.c (struct s390_frame_layout, struct
8298         machine_function): Remove.
8299         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
8300         (indirect_branch_table_label_no, indirect_branch_table_name):
8301         Define variables.
8302         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
8303         (enum s390_indirect_branch_option): Define.
8304         (s390_return_addr_from_memory): New function.
8305         (s390_handle_string_attribute): New function.
8306         (s390_attribute_table): Add new attribute handler.
8307         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
8308         (s390_indirect_branch_via_thunk): New function.
8309         (s390_indirect_branch_via_inline_thunk): New function.
8310         (s390_function_ok_for_sibcall): When jumping via thunk disallow
8311         sibling call optimization for non z10 compiles.
8312         (s390_emit_call): Force indirect branch target to be a single
8313         register.  Add r1 clobber for non-z10 compiles.
8314         (s390_emit_epilogue): Emit return jump via return_use expander.
8315         (s390_reorg): Handle JUMP_INSNs as execute targets.
8316         (s390_option_override_internal): Perform validity checks for the
8317         new command line options.
8318         (s390_indirect_branch_attrvalue): New function.
8319         (s390_indirect_branch_settings): New function.
8320         (s390_set_current_function): Invoke s390_indirect_branch_settings.
8321         (s390_output_indirect_thunk_function):  New function.
8322         (s390_code_end): Implement target hook.
8323         (s390_case_values_threshold): Implement target hook.
8324         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
8325         macros.
8326         * config/s390/s390.h (struct s390_frame_layout)
8327         (struct machine_function): Move here from s390.c.
8328         (TARGET_INDIRECT_BRANCH_NOBP_RET)
8329         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
8330         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
8331         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
8332         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
8333         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
8334         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
8335         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
8336         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
8337         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
8338         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
8339         (mnemonic attribute): Add values which aren't recognized
8340         automatically.
8341         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
8342         pattern for branch conversion.  Fix mnemonic attribute.
8343         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
8344         indirect branch via thunk if requested.
8345         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
8346         ("*indirect_jump"): Disable for branch conversion using out of
8347         line thunks.
8348         ("indirect_jump_via_thunk<mode>_z10")
8349         ("indirect_jump_via_thunk<mode>")
8350         ("indirect_jump_via_inlinethunk<mode>_z10")
8351         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
8352         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
8353         ("casesi_jump_via_inlinethunk<mode>_z10")
8354         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
8355         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
8356         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8357         ("*indirect2_jump"): Disable for branch conversion.
8358         ("casesi_jump"): Turn into expander and expand patterns for branch
8359         conversion.
8360         ("return_use"): New expander.
8361         ("*return"): Emit return via thunk and rename it to ...
8362         ("*return<mode>"): ... this one.
8363         * config/s390/s390.opt: Add new options and and enum for the
8364         option values.
8366 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8368         * lra-constraints.c (match_reload): Unconditionally use
8369         gen_lowpart_SUBREG, rather than selecting between that
8370         and equivalent gen_rtx_SUBREG code.
8372 2018-02-08  Richard Biener  <rguenther@suse.de>
8374         PR tree-optimization/84233
8375         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8376         changed flag instead of boguously re-using phi_inserted.
8378 2018-02-08  Martin Jambor  <mjambor@suse.cz>
8380         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8381         static local variables.
8383 2018-02-08  Richard Biener  <rguenther@suse.de>
8385         PR tree-optimization/84278
8386         * tree-vect-stmts.c (vectorizable_store): When looking for
8387         smaller vector types to perform grouped strided loads/stores
8388         make sure the mode is supported by the target.
8389         (vectorizable_load): Likewise.
8391 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8393         * config/aarch64/aarch64.c (aarch64_components_for_bb):
8394         Increase LDP/STP opportunities by adding adjacent callee-saves.
8396 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8398         PR rtl-optimization/84068
8399         PR rtl-optimization/83459
8400         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8402 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
8404         PR tree-optimization/84224
8405         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8406         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8407         non-zero arguments.
8409 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
8411         PR target/84113
8412         * config/rs6000/altivec.md (*restore_world): Remove LR use.
8413         * config/rs6000/predicates.md (restore_world_operation): Adjust op
8414         count, remove one USE.
8416 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
8418         * doc/install.texi (Configuration): Document the
8419         --with-long-double-format={ibm,ieee} PowerPC configuration
8420         options.
8422         PR target/84154
8423         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8424         Convert from define_expand to be define_insn_and_split.  Rework
8425         float/double/_Float128 conversions to QI/HI/SImode to work with
8426         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
8427         conversions to QI/HImode types did a store and then a load to
8428         truncate the value.  For conversions to VSX registers, don't split
8429         the insn, instead emit the code directly.  Use the code iterator
8430         any_fix to combine signed and unsigned conversions.
8431         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8432         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8433         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8434         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8435         (fix_<mode>di2_hw): Likewise.
8436         (fixuns_<mode>di2_hw): Likewise.
8437         (fix_<mode>si2_hw): Likewise.
8438         (fixuns_<mode>si2_hw): Likewise.
8439         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8440         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8441         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8442         fix<uns>_trunc<SFDF:mode>si2_p8.
8443         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8444         used.
8445         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8446         (fix<uns>_<mode>_mem): Likewise.
8447         (fctiw<u>z_<mode>_mem): Likewise.
8448         (fix<uns>_<mode>_mem): Likewise.
8449         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8450         the register allocator from doing a direct move to the GPRs to do
8451         a store, and instead use the ISA 3.0 store byte/half-word from
8452         vector register instruction.  For IEEE 128-bit floating point,
8453         also optimize stores of 32-bit ints.
8454         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8456 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
8458         * genextract.c (push_pathstr_operand): New function to support
8459         [a-zA-Z].
8460         (walk_rtx): Call push_pathstr_operand.
8461         (print_path): Support [a-zA-Z].
8463 2018-02-07  Richard Biener  <rguenther@suse.de>
8465         PR tree-optimization/84037
8466         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8467         (cse_and_gimplify_to_preheader): Declare.
8468         (vect_get_place_in_interleaving_chain): Likewise.
8469         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8470         ivexpr_map.
8471         (_loop_vec_info::~_loop_vec_info): Delete it.
8472         (cse_and_gimplify_to_preheader): New function.
8473         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8474         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8475         (vectorizable_load): Likewise.  For grouped stores always base
8476         the IV on the first element.
8477         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8478         condition before gimplifying.
8480 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8482         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8483         *DIV_EXPR and *MOD_EXPR.
8485 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8487         PR target/84248
8488         * config/i386/i386.c (ix86_option_override_internal): Mask out
8489         the CF_SET bit when checking -fcf-protection.
8491 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8493         PR libgomp/84217
8494         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8495         enough.
8497 2018-02-07  Richard Biener  <rguenther@suse.de>
8499         PR tree-optimization/84204
8500         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8501         this place.
8503         PR tree-optimization/84205
8504         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8505         special-case isl_ast_op_zdiv_r.
8507         PR tree-optimization/84223
8508         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8509         Only add conditions from within the region.
8510         (gather_bbs::after_dom_children): Adjust.
8512 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8514         PR target/84209
8515         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8516         * config/avr/avr.md: Only post-reload split REG-REG moves if
8517         either register is GENERAL_REG_P.
8519 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8521         PR tree-optimization/84235
8522         * tree-ssa-scopedtables.c
8523         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8524         if the subtraction is performed in floating point type where NaNs are
8525         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8526         build 1.  Formatting fix.
8528 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8530         PR target/84146
8531         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8532         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8533         and skip it regardless of bb boundaries.  Use CALL_P macro,
8534         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8535         unnecessarily, formatting fix.
8537 2018-02-06  Michael Collison  <michael.collison@arm.com>
8539         * config/arm/thumb2.md:
8540         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8541         (*thumb_mov_notscc): Ditto.
8543 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8545         PR target/84154
8546         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8547         unsigned_fix, not "s".
8549 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8551         * configure.ac (gcc_fn_eh_frame_ro): New function.
8552         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8553         correct .eh_frame permissions.
8554         * configure: Regenerate.
8556 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8558         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8559         irrelevant options.
8561 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8563         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8564         Display warning message for -mno-speculate-indirect-jumps.
8566 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8568         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8569         Undocumented.
8570         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8572 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8574         PR tree-optimization/84225
8575         * tree-eh.c (find_trapping_overflow): Only call
8576         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8578 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8580         PR target/84145
8581         * config/i386/i386.c: Reimplement the check of possible options
8582         -mibt/-mshstk conbination. Change error messages.
8583         * doc/invoke.texi: Fix a typo: remove extra '='.
8585 2018-02-06  Marek Polacek  <polacek@redhat.com>
8587         PR tree-optimization/84228
8588         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8590 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8592         PR target/82641
8593         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8594         emitted arch directives.
8595         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8596         __ARM_FEATURE_COPROC before changing architectures.
8598 2018-02-06  Richard Biener  <rguenther@suse.de>
8600         * config/i386/i386.c (print_reg): Fix typo.
8601         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8603 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8605         * configure: Regenerate.
8607 2018-02-05  Martin Sebor  <msebor@redhat.com>
8609         PR tree-optimization/83369
8610         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8611         inlining context.
8613 2018-02-05  Martin Liska  <mliska@suse.cz>
8615         * doc/invoke.texi: Cherry-pick upstream r323995.
8617 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8619         * ira.c (ira_init_register_move_cost): Adjust comment.
8621 2018-02-05  Martin Liska  <mliska@suse.cz>
8623         PR gcov-profile/84137
8624         * doc/gcov.texi: Fix typo in documentation.
8626 2018-02-05  Martin Liska  <mliska@suse.cz>
8628         PR gcov-profile/83879
8629         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8630         using dlopen functionality.
8632 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8634         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8635         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8636         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8637         _mm_maskz_range_round_ss): New intrinsics.
8638         (__builtin_ia32_rangesd128_round)
8639         (__builtin_ia32_rangess128_round): Remove.
8640         (__builtin_ia32_rangesd128_mask_round,
8641         __builtin_ia32_rangess128_mask_round): New builtins.
8642         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8643         __builtin_ia32_rangess128_round): Remove.
8644         (__builtin_ia32_rangesd128_mask_round,
8645         __builtin_ia32_rangess128_mask_round): New builtins.
8646         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8647         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8648         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8649         "<round_saeonly_constraint>")): Changed to ...
8650         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8651         "<round_saeonly_scalar_constraint>")): ... this.
8652         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8653         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8654         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8655         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8656         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8658 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8660         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8661         options.
8662         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8663         Remove all values except native, 8540 and 8548.
8665 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8667         * config/i386/i386.c (ix86_output_function_return): Pass
8668         INVALID_REGNUM, instead of -1, as invalid register number to
8669         indirect_thunk_name and output_indirect_thunk.
8671 2018-02-02  Julia Koval  <julia.koval@intel.com>
8673         * config.gcc: Add -march=icelake.
8674         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8675         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8676         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8677         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8678         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8679         (processor_target_table): Add icelake.
8680         (ix86_option_override_internal): Handle new PTAs.
8681         (get_builtin_code_for_version): Handle icelake.
8682         (M_INTEL_COREI7_ICELAKE): New.
8683         (fold_builtin_cpu): Handle icelake.
8684         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8685         * doc/invoke.texi: Add -march=icelake.
8687 2018-02-02  Julia Koval  <julia.koval@intel.com>
8689         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8690         to wide_int_bitmask.
8691         * wide-int-bitmask.h: New.
8693 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8695         PR target/84066
8696         * config/i386/i386.md: Replace Pmode with word_mode in
8697         builtin_setjmp_setup and builtin_longjmp to support x32.
8699 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8701         PR target/56010
8702         PR target/83743
8703         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8704         #include "opts.h".
8705         (rs6000_supported_cpu_names): New static variable.
8706         (linux_cpu_translation_table): Likewise.
8707         (elf_platform) <cpu>: Define new static variable and use it.
8708         Translate kernel AT_PLATFORM name to canonical name if needed.
8709         Error if platform name is unknown.
8711 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8713         PR target/84089
8714         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8716 2018-02-01  Jeff Law  <law@redhat.com>
8718         PR target/84128
8719         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8720         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8721         the scratch if RELEASE_VIA_POP is false.
8722         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8723         If we have to save a temporary register, decrement SIZE appropriately.
8724         Pass new arguments to release_scratch_register_on_entry.
8725         (ix86_adjust_stack_and_probe): Likewise.
8726         (ix86_emit_probe_stack_range): Pass new arguments to
8727         release_scratch_register_on_entry.
8729 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8731         PR rtl-optimization/84157
8732         * combine.c (change_zero_ext): Use REG_P predicate in
8733         front of HARD_REGISTER_P predicate.
8735 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
8737         * config/avr/avr.c (avr_option_override): Move disabling of
8738         -fdelete-null-pointer-checks to...
8739         * common/config/avr/avr-common.c (avr_option_optimization_table):
8740         ...here.
8742 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8744         PR tree-optimization/81635
8745         * tree-data-ref.c (split_constant_offset_1): For types that
8746         wrap on overflow, try to use range info to prove that wrapping
8747         cannot occur.
8749 2018-02-01  Renlin Li  <renlin.li@arm.com>
8751         PR target/83370
8752         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8753         TAILCALL_ADDR_REGS.
8754         (aarch64_register_move_cost): Likewise.
8755         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8756         TAILCALL_ADDR_REGS.
8757         (REG_CLASS_NAMES): Likewise.
8758         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8759         TAILCALL_ADDR_REGS. Remove IP registers.
8760         * config/aarch64/aarch64.md (Ucs): Update register constraint.
8762 2018-02-01  Richard Biener  <rguenther@suse.de>
8764         * domwalk.h (dom_walker::dom_walker): Add additional constructor
8765         for specifying RPO order and allow NULL for that.
8766         * domwalk.c (dom_walker::dom_walker): Likewise.
8767         (dom_walker::walk): Handle NULL RPO order.
8768         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8769         in RPO order.
8770         (rewrite_update_dom_walker): Likewise.
8771         (mark_def_dom_walker): Likewise.
8773 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8775         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8776         (aarch64_maybe_expand_sve_subreg_move): Declare.
8777         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8778         * config/aarch64/predicates.md (aarch64_any_register_operand): New
8779         predicate.
8780         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8781         that are semantically a reverse operation.
8782         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8783         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8784         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8785         functions.
8786         (aarch64_can_change_mode_class): For big-endian, forbid changes
8787         between two SVE modes if they have different element sizes.
8789 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8791         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8792         the TImode handling for big-endian targets.
8794 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8796         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
8797         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
8798         not just bytes.
8799         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
8800         Remove BSWAP handing for big-endian targets and use the form of
8801         LD1RQ appropariate for the mode.
8803 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8805         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
8806         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
8807         duplicated element.
8809 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8811         PR tearget/83845
8812         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
8813         check for operands that need to go through aarch64_sve_reload_be.
8815 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
8817         PR tree-optimization/81661
8818         PR tree-optimization/84117
8819         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
8820         * tree-eh.c: Include gimplify.h.
8821         (find_trapping_overflow, replace_trapping_overflow,
8822         rewrite_to_non_trapping_overflow): New functions.
8823         * tree-vect-loop.c: Include tree-eh.h.
8824         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
8825         * tree-data-ref.c: Include tree-eh.h.
8826         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
8828 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
8830         PR rtl-optimization/84123
8831         * combine.c (change_zero_ext): Check if hard register satisfies
8832         can_change_dest_mode before calling gen_lowpart_SUBREG.
8834 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
8836         PR target/82444
8837         * ira.c (ira_init_register_move_cost): Remove assert.
8839 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8841         PR rtl-optimization/84071
8842         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
8843         * doc/tm.texi: Regenerate.
8845 2018-01-31  Richard Biener  <rguenther@suse.de>
8847         PR tree-optimization/84132
8848         * tree-data-ref.c (analyze_miv_subscript): Properly
8849         check whether evolution_function_is_affine_multivariate_p
8850         before calling gcd_of_steps_may_divide_p.
8852 2018-01-31  Julia Koval  <julia.koval@intel.com>
8854         PR target/83618
8855         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
8856         * config/i386/i386.md (rdpid_rex64) New.
8857         (rdpid): Make 32bit only.
8859 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
8861         PR lto/84105
8862         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
8863         an IDENTIFIER_NODE for FUNCTION_TYPE's.
8865 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8867         Revert
8868         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
8870         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
8872 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8874         PR rtl-optimization/84071
8875         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
8876         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
8878 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8880         * config/arc/arc.c (arc_handle_aux_attribute): New function.
8881         (arc_attribute_table): Add 'aux' attribute.
8882         (arc_in_small_data_p): Consider aux like variables.
8883         (arc_is_aux_reg_p): New function.
8884         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
8885         (arc_get_aux_arg): New function.
8886         (prepare_move_operands): Handle aux-register access.
8887         (arc_handle_aux_attribute): New function.
8888         * doc/extend.texi (ARC Variable attributes): Add subsection.
8890 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8892         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
8893         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
8894         (arc_attribute_table): Add 'uncached' attribute.
8895         (arc_print_operand): Print '.di' flag for uncached memory
8896         accesses.
8897         (arc_in_small_data_p): Do not consider for small data the uncached
8898         types.
8899         (arc_is_uncached_mem_p): New function.
8900         * config/arc/predicates.md (compact_store_memory_operand): Check
8901         for uncached memory accesses.
8902         (nonvol_nonimm_operand): Likewise.
8903         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
8905 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
8907         PR c/84100
8908         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
8909         falign-loops=): Add Optimization flag.
8911 2018-01-30  Jeff Law  <law@redhat.com>
8913         PR target/84064
8914         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
8915         INT_REGISTERS_SAVED.  Check it prior to calling
8916         get_scratch_register_on_entry.
8917         (ix86_adjust_stack_and_probe): Similarly.
8918         (ix86_emit_probe_stack_range): Similarly.
8919         (ix86_expand_prologue): Corresponding changes.
8921 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8923         PR target/40411
8924         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
8925         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
8927 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
8929         PR target/84112
8930         * lra-constraints.c (curr_insn_transform): Process AND in the
8931         address.
8933 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
8935         PR rtl-optimization/83986
8936         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
8937         dependence against last_pending_memory_flush in addition to
8938         pending_jump_insns.
8940 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
8942         PR tree-optimization/81611
8943         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
8944         copies.
8946 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8948         PR target/83758
8949         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
8950         a reg rtx.
8952 2018-01-30  Richard Biener  <rguenther@suse.de>
8953             Jakub Jelinek  <jakub@redhat.com>
8955         PR tree-optimization/84111
8956         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
8957         inner loops added during recursion, as they don't have up-to-date
8958         SSA form.
8960 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8962         PR ipa/81360
8963         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
8964         (can_inline_edge_by_limits_p): ... here.
8965         (can_early_inline_edge_p, check_callers,
8966         update_caller_keys, update_callee_keys, recursive_inlining,
8967         add_new_edges_to_heap, speculation_useful_p,
8968         inline_small_functions,
8969         inline_small_functions, flatten_function,
8970         inline_to_all_callers_1): Update.
8972 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8974         * profile-count.c (profile_count::combine_with_ipa_count): Handle
8975         zeros correctly.
8977 2018-01-30  Richard Biener  <rguenther@suse.de>
8979         PR tree-optimization/83008
8980         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
8981         invariant and constant vector uses in stmts when they need
8982         more than one stmt.
8984 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8986         PR bootstrap/84017
8987         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
8988         * configure: Regenerate.
8990 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8992         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
8993         pattern.
8994         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
8995         Use gen_rtx_REG rather than gen_lowpart.
8997 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
8999         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
9000         rather than 0 when creating partial subregs.
9002 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9004         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
9005         of usage.
9007 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
9009         PR target/81550
9010         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
9011         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
9012         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
9013         flags.  This restores the settings used before the 2017-07-24.
9014         Turning off pre increment/decrement/modify allows IVOPTS to
9015         optimize DF/SF loops where the index is an int.
9017 2018-01-29  Richard Biener  <rguenther@suse.de>
9018             Kelvin Nilsen  <kelvin@gcc.gnu.org>
9020         PR bootstrap/80867
9021         * tree-vect-stmts.c (vectorizable_call): Don't call
9022         targetm.vectorize_builtin_md_vectorized_function if callee is
9023         NULL.
9025 2018-01-22  Carl Love  <cel@us.ibm.com>
9027         * doc/extend.tex: Fix typo in second arg in
9028         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
9030 2018-01-29  Richard Biener  <rguenther@suse.de>
9032         PR tree-optimization/84086
9033         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
9034         (flush_ssaname_freelist): When SSA names were released reset
9035         the SCEV hash table.
9037 2018-01-29  Richard Biener  <rguenther@suse.de>
9039         PR tree-optimization/84057
9040         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
9041         removed paths when removing edges.
9043 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
9045         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
9046         -mfunction-return=@var{choice}.
9048 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9050         PR diagnostic/84034
9051         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
9052         Handle CR like TAB.
9053         (layout::print_source_line): Likewise.
9054         (test_get_line_width_without_trailing_whitespace): Add test cases.
9056 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
9058         PR middle-end/84040
9059         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
9060         debug insns.
9062 2018-01-26  Jim Wilson  <jimw@sifive.com>
9064         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
9066         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
9067         specified.
9069 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9071         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
9072         and CMP + SUB-immediate -> SUBS.
9074 2018-01-26  Martin Sebor  <msebor@redhat.com>
9076         PR tree-optimization/83896
9077         * tree-ssa-strlen.c (get_string_len): Rename...
9078         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
9079         Avoid assuming length is constant.
9080         (handle_char_store): Use HOST_WIDE_INT for string length.
9082 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
9084         PR target/81763
9085         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
9086         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
9088 2018-01-26  Richard Biener  <rguenther@suse.de>
9090         PR rtl-optimization/84003
9091         * dse.c (record_store): Only record redundant stores when
9092         the earlier store aliases at least all accesses the later one does.
9094 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
9096         PR rtl-optimization/83985
9097         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
9098         REG_CFA_RESTORE insns.
9099         (delete_unmarked_insns): Don't ignore separate shrink wrapping
9100         REG_CFA_RESTORE insns here.
9102         PR c/83989
9103         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
9104         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
9106 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9108         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
9109         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
9110         (arc_init): Likewise.
9111         (arc_override_options): Likewise.
9112         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
9113         value.
9114         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
9115         support.
9116         * config/arc/arc.h (TARGET_DBNZ): Define.
9117         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
9118         properly set the tune attribute.
9119         (dbnz): Use TARGET_DBNZ guard.
9120         * config/arc/arc.opt (mtune): Add core3 option.
9122 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9124         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
9125         recognize new pic like addresses.
9126         (arc_delegitimize_address): Clean up.
9128 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9130         * config/arc/arc-arches.def: Option mrf16 valid for all
9131         architectures.
9132         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
9133         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
9134         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
9135         * config/arc/arc-tables.opt: Regenerate.
9136         * config/arc/arc.c (arc_conditional_register_usage): Handle
9137         reduced register file case.
9138         (arc_file_start): Set must have build attributes.
9139         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
9140         mrf16 option value.
9141         * config/arc/arc.opt (mrf16): Add new option.
9142         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
9143         * config/arc/genmultilib.awk: Handle new mrf16 option.
9144         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
9145         * config/arc/t-multilib: Regenerate.
9146         * doc/invoke.texi (ARC Options): Document mrf16 option.
9148 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9150         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
9151         * config/arc/arc.c (arc_handle_secure_attribute): New function.
9152         (arc_attribute_table): Add 'secure_call' attribute.
9153         (arc_print_operand): Print secure call operand.
9154         (arc_function_ok_for_sibcall): Don't optimize tail calls when
9155         secure.
9156         (arc_is_secure_call_p): New function.  * config/arc/arc.md
9157         (call_i): Add support for sjli instruction.
9158         (call_value_i): Likewise.
9159         * config/arc/constraints.md (Csc): New constraint.
9161 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9162             John Eric Martin  <John.Martin@emmicro-us.com>
9164         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
9165         * config/arc/arc.c (_arc_jli_section): New struct.
9166         (arc_jli_section): New type.
9167         (rc_jli_sections): New static variable.
9168         (arc_handle_jli_attribute): New function.
9169         (arc_attribute_table): Add jli_always and jli_fixed attribute.
9170         (arc_file_end): New function.
9171         (TARGET_ASM_FILE_END): Define.
9172         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
9173         (arc_add_jli_section): New function.
9174         (jli_call_scan): Likewise.
9175         (arc_reorg): Call jli_call_scan.
9176         (arc_output_addsi): Remove 'S' from printing asm operand.
9177         (arc_is_jli_call_p): New function.
9178         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
9179         operand.
9180         (movhi_insn): Likewise.
9181         (movsi_insn): Likewise.
9182         (movsi_set_cc_insn): Likewise.
9183         (loadqi_update): Likewise.
9184         (load_zeroextendqisi_update): Likewise.
9185         (load_signextendqisi_update): Likewise.
9186         (loadhi_update): Likewise.
9187         (load_zeroextendhisi_update): Likewise.
9188         (load_signextendhisi_update): Likewise.
9189         (loadsi_update): Likewise.
9190         (loadsf_update): Likewise.
9191         (movsicc_insn): Likewise.
9192         (bset_insn): Likewise.
9193         (bxor_insn): Likewise.
9194         (bclr_insn): Likewise.
9195         (bmsk_insn): Likewise.
9196         (bicsi3_insn): Likewise.
9197         (cmpsi_cc_c_insn): Likewise.
9198         (movsi_ne): Likewise.
9199         (movsi_cond_exec): Likewise.
9200         (clrsbsi2): Likewise.
9201         (norm_f): Likewise.
9202         (normw): Likewise.
9203         (swap): Likewise.
9204         (divaw): Likewise.
9205         (flag): Likewise.
9206         (sr): Likewise.
9207         (kflag): Likewise.
9208         (ffs): Likewise.
9209         (ffs_f): Likewise.
9210         (fls): Likewise.
9211         (call_i): Remove 'S' asm letter, add jli instruction.
9212         (call_value_i): Likewise.
9213         * config/arc/arc.op (mjli-always): New option.
9214         * config/arc/constraints.md (Cji): New constraint.
9215         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
9216         operand.
9217         (subsf3_fpx): Likewise.
9218         (mulsf3_fpx): Likewise.
9219         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
9220         asm operand.
9221         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
9222         function attrbutes.
9223         * doc/invoke.texi (ARC): Document mjli-always option.
9225 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
9227         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
9228         avoid addition with 0 and use incw and decw where possible.
9230 2018-01-26  Richard Biener  <rguenther@suse.de>
9232         PR tree-optimization/81082
9233         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
9234         association if it requires casting to unsigned.
9235         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
9236         from fold_plusminus_mult_expr to catch important cases late when
9237         range info is available.
9239 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9241         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9242         * configure.ac (hidden_linkonce): New test.
9243         * configure: Regenerate.
9244         * config.in: Regenerate.
9246 2018-01-26  Julia Koval  <julia.koval@intel.com>
9248         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9249         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9250         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9251         _mm_mask_bitshuffle_epi64_mask): Fix type.
9252         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9253         USI_FTYPE_V4DI_V4DI_USI): Remove.
9254         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9255         __builtin_ia32_vpshufbitqmb256_mask,
9256         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9257         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9258         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9260 2018-01-26  Alan Modra  <amodra@gmail.com>
9262         PR target/84033
9263         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9264         UNSPEC_VBPERMQ.  Sort other unspecs.
9266 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
9268         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9270 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
9272         PR middle-end/83055
9273         * predict.c (drop_profile): Do not push/pop cfun; update also
9274         node->count.
9275         (handle_missing_profiles): Fix logic looking for zero profiles.
9277 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
9279         PR middle-end/83977
9280         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9281         on functions with #pragma omp declare simd or functions with simd
9282         attribute.
9283         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9284         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9285         Remove trailing \n from warning_at calls.
9287 2018-01-25  Tom de Vries  <tom@codesourcery.com>
9289         PR target/84028
9290         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9291         for neutered workers.
9293 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
9295         PR target/68467
9296         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
9297         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
9299 2018-01-24  Jeff Law  <law@redhat.com>
9301         PR target/83994
9302         * i386.c (get_probe_interval): Move to earlier point.
9303         (ix86_compute_frame_layout): If -fstack-clash-protection and
9304         the frame is larger than the probe interval, then use pushes
9305         to save registers rather than reg->mem moves.
9306         (ix86_expand_prologue): Remove conditional for int_registers_saved
9307         assertion.
9309 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
9311         PR target/84014
9312         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
9313         min/max for never referenced object.
9315 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
9317         PR middle-end/83977
9318         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
9319         here.
9320         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
9321         attributes from DECL_ATTRIBUTES (decl) without affecting
9322         DECL_ATTRIBUTES (current_function_decl).
9323         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
9324         functions with non-NULL DECL_ABSTRACT_ORIGIN.
9326 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
9328         PR tree-optimization/83979
9329         * fold-const.c (fold_comparison): Use constant_boolean_node
9330         instead of boolean_{true,false}_node.
9332 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
9334         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
9335         with zero counts.
9337 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9339         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9340         Simplify the clause that sets the length attribute.
9341         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9342         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
9343         clause that sets the length attribute.
9344         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9346 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9348         PR target/83589
9349         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
9350         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
9351         Add strict parameter.
9352         (prevent_branch_around_nothing): Insert dummy insn between branch to
9353         label and label with no ptx insn inbetween.
9354         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
9356 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9358         PR target/81352
9359         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9360         for neutered threads in warp.
9361         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9363 2018-01-24  Richard Biener  <rguenther@suse.de>
9365         PR tree-optimization/83176
9366         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9367         operands.
9369 2018-01-24  Richard Biener  <rguenther@suse.de>
9371         PR tree-optimization/82819
9372         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9373         code generating pluses that are no-ops in the target precision.
9375 2018-01-24  Richard Biener  <rguenther@suse.de>
9377         PR middle-end/84000
9378         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9380 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9382         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9383         to merge probabilities.
9384         * predict.c (probably_never_executed): Also mark as cold functions
9385         with global 0 profile and guessed local profile.
9386         * profile-count.c (profile_probability::combine_with_count): New
9387         member function.
9388         * profile-count.h (profile_probability::operator*,
9389         profile_probability::operator*=, profile_probability::operator/,
9390         profile_probability::operator/=): Reduce precision to adjusted
9391         and set value to guessed on contradictory divisions.
9392         (profile_probability::combine_with_freq): Remove.
9393         (profile_probability::combine_wiht_count): Declare.
9394         (profile_count::force_nonzero):: Set to adjusted.
9395         (profile_count::probability_in):: Set quality to adjusted.
9396         * tree-ssa-tail-merge.c (replace_block_by): Use
9397         combine_with_count.
9399 2018-01-23  Andrew Waterman  <andrew@sifive.com>
9400             Jim Wilson  <jimw@sifive.com>
9402         * config/riscv/riscv.c (riscv_stack_boundary): New.
9403         (riscv_option_override): Set riscv_stack_boundary.  Handle
9404         riscv_preferred_stack_boundary_arg.
9405         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9406         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9407         (STACK_BOUNDARY): Set to riscv_stack_boundary.
9408         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9409         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9410         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9412 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
9414         PR target/83905
9415         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9416         of struct ix86_frame.
9417         (ix86_expand_epilogue): Likewise.  Add a local variable for
9418         the reg_save_offset field in struct ix86_frame.
9420 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
9422         PR tree-optimization/82604
9423         * tree-loop-distribution.c (enum partition_kind): New enum item
9424         PKIND_PARTIAL_MEMSET.
9425         (partition_builtin_p): Support above new enum item.
9426         (generate_code_for_partition): Ditto.
9427         (compute_access_range): Differentiate cases that equality can be
9428         proven at all loops, the innermost loops or no loops.
9429         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9430         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
9431         (finalize_partitions, distribute_loop): Don't fuse partition of
9432         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9433         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9434         parloop is enabled.
9436 2018-01-23  Martin Liska  <mliska@suse.cz>
9438         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9439         order to ignore the predictor.
9440         (PRED_POLYMORPHIC_CALL): Likewise.
9441         (PRED_RECURSIVE_CALL): Likewise.
9443 2018-01-23  Martin Liska  <mliska@suse.cz>
9445         * tree-profile.c (tree_profiling): Print function header to
9446         aware reader which function we are working on.
9447         * value-prof.c (gimple_find_values_to_profile): Do not print
9448         not interesting value histograms.
9450 2018-01-23  Martin Liska  <mliska@suse.cz>
9452         * profile-count.h (enum profile_quality): Add
9453         profile_uninitialized as the first value. Do not number values
9454         as they are zero based.
9455         (profile_count::verify): Update sanity check.
9456         (profile_probability::verify): Likewise.
9458 2018-01-23  Nathan Sidwell  <nathan@acm.org>
9460         * doc/invoke.texi (ffor-scope): Deprecate.
9462 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9464         PR tree-optimization/83510
9465         * domwalk.c (set_all_edges_as_executable): New function.
9466         (dom_walker::dom_walker): Convert bool param
9467         "skip_unreachable_blocks" to enum reachability.  Move setup of
9468         edge flags to set_all_edges_as_executable and only do it when
9469         reachability is REACHABLE_BLOCKS.
9470         * domwalk.h (enum dom_walker::reachability): New enum.
9471         (dom_walker::dom_walker): Convert bool param
9472         "skip_unreachable_blocks" to enum reachability.
9473         (set_all_edges_as_executable): New decl.
9474         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9475         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9476         "reachability".
9477         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9478         but converting true to REACHABLE_BLOCKS.
9479         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9480         * tree-vrp.c
9481         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9482         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9483         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9484         REACHABLE_BLOCKS.
9485         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9486         if check_all_array_refs will be called.
9488 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9490         * tree.c (selftest::test_location_wrappers): Add more test
9491         coverage.
9493 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9495         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9496         (selftest::test_bit_in_range): Likewise.
9498 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9500         PR testsuite/83888
9501         * doc/sourcebuild.texi (vect_float): Say that the selector
9502         only describes the situation when -funsafe-math-optimizations is on.
9503         (vect_float_strict): Document.
9505 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9507         PR tree-optimization/83965
9508         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9509         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9510         instead of checking only for a reduction.
9511         (vect_recog_widen_sum_pattern): Likewise.
9513 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9515         * predict.c (probably_never_executed): Only use precise profile info.
9516         (compute_function_frequency): Skip after inlining hack since we now
9517         have quality checking.
9519 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9521         * profile-count.h (profile_probability::very_unlikely,
9522         profile_probability::unlikely, profile_probability::even): Set
9523         precision to guessed.
9525 2018-01-23  Richard Biener  <rguenther@suse.de>
9527         PR tree-optimization/83963
9528         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9529         Properly terminate dominator walk when crossing the exit edge not
9530         when visiting its source block.
9532 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9534         PR c++/83918
9535         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9536         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9538 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9540         PR tree-optimization/83957
9541         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9542         semicolon after for body surrounded by braces.
9544         PR tree-optimization/83081
9545         * profile-count.h (profile_probability::split): New method.
9546         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9547         Use profile_probability::split.
9548         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9549         when splitting a single conditional jump into 2.
9551 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9553         PR tree-optimization/69452
9554         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9555         decl.
9557 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9559         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9560         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9561         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9563 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9565         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9566         * config/rl78/rl78.md (movdi): New define_expand.
9567         * config/rl78/rl78.c (rl78_split_movdi): New function.
9569 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9571         PR target/83862
9572         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9573         no longer used.
9574         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9575         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9576         128-bit to produce an UNSPEC move to get the double word with the
9577         signbit and then a shift directly to do signbit.
9578         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9579         implementation with a new version that just does either a direct
9580         move or a regular move.  Move memory interface to separate insns.
9581         Move insns so they are next to the expander.
9582         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9583         with signbit move.  Split big and little endian case.
9584         (signbit<mode>2_dm_mem_le): Likewise.
9585         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9586         (signbit<mode>2_dm2): Likewise.
9588 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9590         * config/rl78/rl78.md (anddi3): New define_expand.
9592 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9594         * config/rl78/rl78.md (umindi3): New define_expand.
9596 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9598         * config/rl78/rl78.md (smindi3): New define_expand.
9600 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9602         * config/rl78/rl78.md (smaxdi3): New define_expand.
9604 2018-01-22  Carl Love  <cel@us.ibm.com>
9606         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9607         LVX_V1TI): Add macro expansion.
9608         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9609         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9610         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9611         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9612         Change check to determine if the instruction is a byte reversing
9613         entry.  Fix typo in comment.
9614         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9615         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9616         Add def_builtin calls for new builtins.
9617         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9618         Add define_insn expansion.
9620 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9622         * config/rl78/rl78.md (umaxdi3): New define_expand.
9624 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9626         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9627         for non-QImode registers.
9629 2018-01-22  Richard Biener  <rguenther@suse.de>
9631         PR tree-optimization/83963
9632         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9633         including the loop exit block.
9634         (scop_detection::merge_sese): Likewise.
9635         (scop_detection::add_scop): Do it here instead.
9637 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9639         * doc/sourcebuild.texi (arm_softfloat): Document.
9641 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9643         PR gcc/77734
9644         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9645         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9646         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9648 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9649             David Edelsohn  <dje.gcc@gmail.com>
9651         PR target/83946
9652         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9653         Change "crset eq" to "crset 2".
9654         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9655         (*call_indirect_aix<mode>_nospec): Likewise.
9656         (*call_value_indirect_aix<mode>_nospec): Likewise.
9657         (*call_indirect_elfv2<mode>_nospec): Likewise.
9658         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9659         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9660         change assembly output from . to $.
9661         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9662         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9663         (*tablejump<mode>_internal1_nospec): Likewise.
9665 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9667         PR target/80870
9668         * config/sh/sh_optimize_sett_clrt.cc:
9669         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9671 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9673         PR tree-optimization/83940
9674         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9675         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9676         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9677         use it to pass back the definition type.
9678         (vect_check_store_rhs): Likewise rhs_dt_out.
9679         (vect_build_gather_load_calls): Add a mask_dt argument and use
9680         it instead of a call to vect_is_simple_use.
9681         (vectorizable_store): Update calls to vect_check_load_store_mask
9682         and vect_check_store_rhs.  Use the dt returned by the latter instead
9683         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9684         instead of calls to vect_is_simple_use.  Pass the scalar rather
9685         than the vector operand to vect_is_simple_use when handling
9686         second and subsequent copies of an rhs value.
9687         (vectorizable_load): Update calls to vect_check_load_store_mask
9688         and vect_build_gather_load_calls.  Use the cached mask_dt and
9689         gs_info.offset_dt instead of calls to vect_is_simple_use.
9691 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9693         PR middle-end/83945
9694         * tree-emutls.c: Include gimplify.h.
9695         (lower_emutls_2): New function.
9696         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9697         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9698         it before further processing.
9700         PR target/83930
9701         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9702         UINTVAL (trueop1) instead of INTVAL (op1).
9704 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9706         PR debug/81570
9707         PR debug/83728
9708         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9709         INCOMING_FRAME_SP_OFFSET if not defined.
9710         (scan_trace): Add ENTRY argument.  If true and
9711         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9712         emit a note to adjust the CFA offset.
9713         (create_cfi_notes): Adjust scan_trace callers.
9714         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9715         INCOMING_FRAME_SP_OFFSET in the CIE.
9716         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9717         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9718         Likewise.
9719         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9720         * doc/tm.texi: Regenerated.
9722 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9724         PR rtl-optimization/83147
9725         * lra-constraints.c (remove_inheritance_pseudos): Use
9726         lra_substitute_pseudo_within_insn.
9728 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9729             Cesar Philippidis  <cesar@codesourcery.com>
9731         PR target/83920
9732         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9734 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9736         PR target/83790
9737         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9738         spaces for function labels.
9740 2018-01-19  Martin Liska  <mliska@suse.cz>
9742         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9743         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9744         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9745         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9746         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9747         (PRED_CONST_RETURN): Change from 69 to 65.
9748         (PRED_NULL_RETURN): Change from 91 to 71.
9749         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9750         (PRED_LOOP_GUARD): Change from 66 to 73.
9752 2018-01-19  Martin Liska  <mliska@suse.cz>
9754         * predict.c (predict_insn_def): Add new assert.
9755         (struct branch_predictor): Change type to signed integer.
9756         (test_prediction_value_range): Amend test to cover
9757         PROB_UNINITIALIZED.
9758         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9759         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9760         (PRED_LOOP_ITERATIONS_MAX): Likewise.
9761         (PRED_LOOP_IV_COMPARE): Likewise.
9762         * predict.h (PROB_UNINITIALIZED): Define new constant.
9764 2018-01-19  Martin Liska  <mliska@suse.cz>
9766         * predict.c (dump_prediction): Add new format for
9767         analyze_brprob.py script which is enabled with -details
9768         suboption.
9769         * profile-count.h (precise_p): New function.
9771 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9773         PR tree-optimization/83922
9774         * tree-vect-loop.c (vect_verify_full_masking): Return false if
9775         there are no statements that need masking.
9776         (vect_active_double_reduction_p): New function.
9777         (vect_analyze_loop_operations): Use it when handling phis that
9778         are not in the loop header.
9780 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9782         PR tree-optimization/83914
9783         * tree-vect-loop.c (vectorizable_induction): Don't convert
9784         init_expr or apply the peeling adjustment for inductions
9785         that are nested within the vectorized loop.
9787 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9789         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9790         instead of NEG.
9792 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9794         PR sanitizer/81715
9795         PR testsuite/83882
9796         * function.h (gimplify_parameters): Add gimple_seq * argument.
9797         * function.c: Include gimple.h and options.h.
9798         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
9799         for the added local temporaries if needed.
9800         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
9801         if there are any parameter cleanups, wrap whole body into a
9802         try/finally with the cleanups.
9804 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
9806         PR target/82964
9807         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
9808         Use GET_MODE_CLASS for scalar floating point.
9810 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9812         PR ipa/82256
9813         patch by PaX Team
9814         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
9815         Fix call of call_cgraph_insertion_hooks.
9817 2018-01-18  Martin Sebor  <msebor@redhat.com>
9819         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
9821 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9823         PR ipa/83619
9824         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
9825         frequencies.
9827 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
9829         PR other/70268
9830         * common.opt: (-ffile-prefix-map): New option.
9831         * opts.c (common_handle_option): Defer it.
9832         * opts-global.c (handle_common_deferred_options): Handle it.
9833         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
9834         * file-prefix-map.h: New file.
9835         (remap_debug_filename, add_debug_prefix_map): ...here.
9836         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
9837         * final.c (debug_prefix_map, add_debug_prefix_map
9838         remap_debug_filename): Move to...
9839         * file-prefix-map.c: New file.
9840         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
9841         generalize, get rid of alloca(), use strrchr() instead of strchr().
9842         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
9843         Implement in terms of add_prefix_map().
9844         (remap_macro_filename, remap_debug_filename): Implement in term of
9845         remap_filename().
9846         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
9847         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
9848         * dbxout.c: Include file-prefix-map.h.
9849         * varasm.c: Likewise.
9850         * vmsdbgout.c: Likewise.
9851         * xcoffout.c: Likewise.
9852         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
9853         * doc/cppopts.texi (-fmacro-prefix-map): Document.
9854         * doc/invoke.texi (-ffile-prefix-map): Document.
9855         (-fdebug-prefix-map): Update description.
9857 2018-01-18  Martin Liska  <mliska@suse.cz>
9859         * config/i386/i386.c (indirect_thunk_name): Document that also
9860         lfence is emitted.
9861         (output_indirect_thunk): Document why both instructions
9862         (pause and lfence) are generated.
9864 2018-01-18  Richard Biener  <rguenther@suse.de>
9866         PR tree-optimization/83887
9867         * graphite-scop-detection.c
9868         (scop_detection::get_nearest_dom_with_single_entry): Remove.
9869         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
9870         (scop_detection::merge_sese): Re-implement with a flood-fill
9871         algorithm that properly finds a SESE region if it exists.
9873 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9875         PR c/61240
9876         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
9877         pointer_diff optimizations use view_convert instead of convert.
9879 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9881         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9882         Generate different code for -mno-speculate-indirect-jumps.
9883         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9884         (*call_indirect_aix<mode>): Disable for
9885         -mno-speculate-indirect-jumps.
9886         (*call_indirect_aix<mode>_nospec): New define_insn.
9887         (*call_value_indirect_aix<mode>): Disable for
9888         -mno-speculate-indirect-jumps.
9889         (*call_value_indirect_aix<mode>_nospec): New define_insn.
9890         (*sibcall_nonlocal_sysv<mode>): Generate different code for
9891         -mno-speculate-indirect-jumps.
9892         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9894 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9896         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
9897         long double type, set the flags for noting the default long double
9898         type, even if we don't pass or return a long double type.
9900 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
9902         PR ipa/83051
9903         * ipa-inline.c (flatten_function): Do not overwrite final inlining
9904         failure.
9906 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
9908         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
9909         support for merge[hl].
9910         (fold_mergehl_helper): New helper function.
9911         (tree-vector-builder.h): New #include for tree_vector_builder usage.
9912         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
9913         (altivec_vmrglw_direct): Add xxmrglw insn.
9915 2018-01-17  Andrew Waterman  <andrew@sifive.com>
9917         * config/riscv/riscv.c (riscv_conditional_register_usage): If
9918         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
9920 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
9922         PR lto/83121
9923         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
9924         call the lto_location_cache before reading the
9925         DECL_SOURCE_LOCATION of the types.
9927 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
9928             Richard Sandiford  <richard.sandiford@linaro.org>
9930         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
9931         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
9932         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
9933         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
9934         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
9935         Add declaration.
9936         * config/aarch64/constraints.md (aarch64_movti_operand):
9937         Limit immediates.
9938         * config/aarch64/predicates.md (Uti): Add new constraint.
9940 2018-01-17 Carl Love  <cel@us.ibm.com>
9942         * config/rs6000/vsx.md (define_expand xl_len_r,
9943         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
9944         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
9945         lxvll.
9946         (define_expand, define_insn): Move the shift left from  the
9947         define_insn to the define_expand for lxvl and stxvl instructions.
9948         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
9949         and XL_LEN_R definitions to PURE.
9951 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
9953         * config/i386/i386.c (indirect_thunk_name): Declare regno
9954         as unsigned int.  Compare regno with INVALID_REGNUM.
9955         (output_indirect_thunk): Ditto.
9956         (output_indirect_thunk_function): Ditto.
9957         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
9958         in the call to output_indirect_thunk_function.
9960 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
9962         PR middle-end/83884
9963         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
9964         rather than the size of inner_type to determine the stack slot size
9965         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
9967 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
9969         PR target/83546
9970         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
9971         to PTA_SILVERMONT.
9973 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
9975         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
9976         endian Linux systems to optionally enable multilibs for selecting
9977         the long double type if the user configured an explicit type.
9978         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
9979         have no long double multilibs if not defined.
9980         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
9981         warn if the user used -mabi={ieee,ibm}longdouble and we built
9982         multilibs for long double.
9983         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
9984         appropriate multilib option.
9985         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
9986         multilib options.
9987         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
9988         for building long double multilibs.
9989         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
9991 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
9993         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
9994         copies.
9996         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
9997         64 bits.
9998         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
9999         128 bits.
10001         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
10002         variables.
10004         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
10005         return value.
10007 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10009         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
10010         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
10012 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10014         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
10015         different rtl trees depending on TARGET_64BIT.
10016         (rs6000_gen_lvx): Likewise.
10018 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10020         * config/visium/visium.md (nop): Tweak comment.
10021         (hazard_nop): Likewise.
10023 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10025         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
10026         -mspeculate-indirect-jumps.
10027         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
10028         for -mno-speculate-indirect-jumps.
10029         (*call_indirect_elfv2<mode>_nospec): New define_insn.
10030         (*call_value_indirect_elfv2<mode>): Disable for
10031         -mno-speculate-indirect-jumps.
10032         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
10033         (indirect_jump): Emit different RTL for
10034         -mno-speculate-indirect-jumps.
10035         (*indirect_jump<mode>): Disable for
10036         -mno-speculate-indirect-jumps.
10037         (*indirect_jump<mode>_nospec): New define_insn.
10038         (tablejump): Emit different RTL for
10039         -mno-speculate-indirect-jumps.
10040         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
10041         (tablejumpsi_nospec): New define_expand.
10042         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
10043         (tablejumpdi_nospec): New define_expand.
10044         (*tablejump<mode>_internal1): Disable for
10045         -mno-speculate-indirect-jumps.
10046         (*tablejump<mode>_internal1_nospec): New define_insn.
10047         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
10048         option.
10050 2018-01-16  Artyom Skrobov tyomitch@gmail.com
10052         * caller-save.c (insert_save): Drop unnecessary parameter.  All
10053         callers updated.
10055 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10056             Richard Biener  <rguenth@suse.de>
10058         PR libgomp/83590
10059         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
10060         return early, inline manually is_gimple_sizepos.  Make sure if we
10061         call gimplify_expr we don't end up with a gimple constant.
10062         * tree.c (variably_modified_type_p): Don't return true for
10063         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
10064         * gimplify.h (is_gimple_sizepos): Remove.
10066 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10068         PR tree-optimization/83857
10069         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
10070         vectorizable_live_operation for pure SLP statements.
10071         (vectorizable_live_operation): Handle PHIs.
10073 2018-01-16  Richard Biener  <rguenther@suse.de>
10075         PR tree-optimization/83867
10076         * tree-vect-stmts.c (vect_transform_stmt): Precompute
10077         nested_in_vect_loop_p since the scalar stmt may get invalidated.
10079 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10081         PR c/83844
10082         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
10083         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
10084         If off is not INTEGER_CST, issue a may not be aligned warning
10085         rather than isn't aligned.  Use isn%'t rather than isn't.
10086         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
10087         into MULT_EXPR.
10088         <case MULT_EXPR>: Improve the case when bottom and one of the
10089         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
10090         operand, in that case check if the other operand is multiple of
10091         bottom divided by the INTEGER_CST operand.
10093 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10095         PR target/83858
10096         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
10097         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
10098         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
10099         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
10100         * config/pa/pa.c (pa_function_arg_advance): Likewise.
10101         (pa_function_arg, pa_arg_partial_bytes): Likewise.
10102         (pa_function_arg_size): New function.
10104 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10106         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
10107         in a separate statement.
10109 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10111         PR tree-optimization/83847
10112         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
10113         group gathers and scatters.
10115 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10117         PR rtl-optimization/86620
10118         * params.def (max-sched-ready-insns): Bump minimum value to 1.
10120         PR rtl-optimization/83213
10121         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
10122         to last if both are JUMP_INSNs.
10124         PR tree-optimization/83843
10125         * gimple-ssa-store-merging.c
10126         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
10127         store_immediate_info for bswap/nop orig_stores.
10129 2018-01-15  Andrew Waterman  <andrew@sifive.com>
10131         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
10132         !TARGET_MUL.
10133         <UDIV>: Increase cost if !TARGET_DIV.
10135 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
10137         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
10138         (define_attr "cr_logical_3op"): New.
10139         (cceq_ior_compare): Adjust.
10140         (cceq_ior_compare_complement): Adjust.
10141         (*cceq_rev_compare): Adjust.
10142         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
10143         (is_cracked_insn): Adjust.
10144         (insn_must_be_first_in_group): Adjust.
10145         * config/rs6000/40x.md: Adjust.
10146         * config/rs6000/440.md: Adjust.
10147         * config/rs6000/476.md: Adjust.
10148         * config/rs6000/601.md: Adjust.
10149         * config/rs6000/603.md: Adjust.
10150         * config/rs6000/6xx.md: Adjust.
10151         * config/rs6000/7450.md: Adjust.
10152         * config/rs6000/7xx.md: Adjust.
10153         * config/rs6000/8540.md: Adjust.
10154         * config/rs6000/cell.md: Adjust.
10155         * config/rs6000/e300c2c3.md: Adjust.
10156         * config/rs6000/e500mc.md: Adjust.
10157         * config/rs6000/e500mc64.md: Adjust.
10158         * config/rs6000/e5500.md: Adjust.
10159         * config/rs6000/e6500.md: Adjust.
10160         * config/rs6000/mpc.md: Adjust.
10161         * config/rs6000/power4.md: Adjust.
10162         * config/rs6000/power5.md: Adjust.
10163         * config/rs6000/power6.md: Adjust.
10164         * config/rs6000/power7.md: Adjust.
10165         * config/rs6000/power8.md: Adjust.
10166         * config/rs6000/power9.md: Adjust.
10167         * config/rs6000/rs64.md: Adjust.
10168         * config/rs6000/titan.md: Adjust.
10170 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10172         * config/i386/predicates.md (indirect_branch_operand): Rewrite
10173         ix86_indirect_branch_register logic.
10175 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10177         * config/i386/constraints.md (Bs): Update
10178         ix86_indirect_branch_register check.  Don't check
10179         ix86_indirect_branch_register with GOT_memory_operand.
10180         (Bw): Likewise.
10181         * config/i386/predicates.md (GOT_memory_operand): Don't check
10182         ix86_indirect_branch_register here.
10183         (GOT32_symbol_operand): Likewise.
10185 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10187         * config/i386/predicates.md (constant_call_address_operand):
10188         Rewrite ix86_indirect_branch_register logic.
10189         (sibcall_insn_operand): Likewise.
10191 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10193         * config/i386/constraints.md (Bs): Replace
10194         ix86_indirect_branch_thunk_register with
10195         ix86_indirect_branch_register.
10196         (Bw): Likewise.
10197         * config/i386/i386.md (indirect_jump): Likewise.
10198         (tablejump): Likewise.
10199         (*sibcall_memory): Likewise.
10200         (*sibcall_value_memory): Likewise.
10201         Peepholes of indirect call and jump via memory: Likewise.
10202         * config/i386/i386.opt: Likewise.
10203         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10204         (GOT_memory_operand): Likewise.
10205         (call_insn_operand): Likewise.
10206         (sibcall_insn_operand): Likewise.
10207         (GOT32_symbol_operand): Likewise.
10209 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10211         PR middle-end/83837
10212         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
10213         type rather than type addr's type points to.
10214         (expand_omp_atomic_mutex): Likewise.
10215         (expand_omp_atomic): Likewise.
10217 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10219         PR target/83839
10220         * config/i386/i386.c (output_indirect_thunk_function): Use
10221         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
10222         for  __x86_return_thunk.
10224 2018-01-15  Richard Biener  <rguenther@suse.de>
10226         PR middle-end/83850
10227         * expmed.c (extract_bit_field_1): Fix typo.
10229 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10231         PR target/83687
10232         * config/arm/iterators.md (VF): New mode iterator.
10233         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
10234         Remove integer-related logic from pattern.
10235         (neon_vabd<mode>_3): Likewise.
10237 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10239         PR middle-end/82694
10240         * common.opt (fstrict-overflow): No longer an alias.
10241         (fwrapv-pointer): New option.
10242         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10243         also for pointer types based on flag_wrapv_pointer.
10244         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10245         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10246         opts->x_flag_wrapv got set.
10247         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10248         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10249         POINTER_TYPE_OVERFLOW_UNDEFINED.
10250         * match.pd: Likewise in address comparison pattern.
10251         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10253 2018-01-15  Richard Biener  <rguenther@suse.de>
10255         PR lto/83804
10256         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10257         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
10258         Reset type names to their identifier if their TYPE_DECL doesn't
10259         have linkage (and thus is used for ODR and devirt).
10260         (save_debug_info_for_decl): Remove.
10261         (save_debug_info_for_type): Likewise.
10262         (add_tree_to_fld_list): Adjust.
10263         * tree-pretty-print.c (dump_generic_node): Make dumping of
10264         type names more robust.
10266 2018-01-15  Richard Biener  <rguenther@suse.de>
10268         * BASE-VER: Bump to 8.0.1.
10270 2018-01-14  Martin Sebor  <msebor@redhat.com>
10272         PR other/83508
10273         * builtins.c (check_access): Avoid warning when the no-warning bit
10274         is set.
10276 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
10278         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10279         * ira-color (allocno_hard_regs_compare): Likewise.
10281 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
10283         PR target/83013
10284         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10285         Use .pushsection/.popsection.
10287 2018-01-14  Martin Sebor  <msebor@redhat.com>
10289         PR c++/81327
10290         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10292 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
10294         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
10295         entry from extra_headers.
10296         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
10297         extra_headers, make the list bitwise identical to the i?86-*-* one.
10299 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10301         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
10302         -mcmodel=large with -mindirect-branch=thunk,
10303         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
10304         -mfunction-return=thunk-extern.
10305         * doc/invoke.texi: Document -mcmodel=large is incompatible with
10306         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
10307         -mfunction-return=thunk and -mfunction-return=thunk-extern.
10309 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10311         * config/i386/i386.c (print_reg): Print the name of the full
10312         integer register without '%'.
10313         (ix86_print_operand): Handle 'V'.
10314          * doc/extend.texi: Document 'V' modifier.
10316 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10318         * config/i386/constraints.md (Bs): Disallow memory operand for
10319         -mindirect-branch-register.
10320         (Bw): Likewise.
10321         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10322         (GOT_memory_operand): Likewise.
10323         (call_insn_operand): Likewise.
10324         (sibcall_insn_operand): Likewise.
10325         (GOT32_symbol_operand): Likewise.
10326         * config/i386/i386.md (indirect_jump): Call convert_memory_address
10327         for -mindirect-branch-register.
10328         (tablejump): Likewise.
10329         (*sibcall_memory): Likewise.
10330         (*sibcall_value_memory): Likewise.
10331         Disallow peepholes of indirect call and jump via memory for
10332         -mindirect-branch-register.
10333         (*call_pop): Replace m with Bw.
10334         (*call_value_pop): Likewise.
10335         (*sibcall_pop_memory): Replace m with Bs.
10336         * config/i386/i386.opt (mindirect-branch-register): New option.
10337         * doc/invoke.texi: Document -mindirect-branch-register option.
10339 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10341         * config/i386/i386-protos.h (ix86_output_function_return): New.
10342         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
10343         set function_return_type.
10344         (indirect_thunk_name): Add ret_p to indicate thunk for function
10345         return.
10346         (output_indirect_thunk_function): Pass false to
10347         indirect_thunk_name.
10348         (ix86_output_indirect_branch_via_reg): Likewise.
10349         (ix86_output_indirect_branch_via_push): Likewise.
10350         (output_indirect_thunk_function): Create alias for function
10351         return thunk if regno < 0.
10352         (ix86_output_function_return): New function.
10353         (ix86_handle_fndecl_attribute): Handle function_return.
10354         (ix86_attribute_table): Add function_return.
10355         * config/i386/i386.h (machine_function): Add
10356         function_return_type.
10357         * config/i386/i386.md (simple_return_internal): Use
10358         ix86_output_function_return.
10359         (simple_return_internal_long): Likewise.
10360         * config/i386/i386.opt (mfunction-return=): New option.
10361         (indirect_branch): Mention -mfunction-return=.
10362         * doc/extend.texi: Document function_return function attribute.
10363         * doc/invoke.texi: Document -mfunction-return= option.
10365 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10367         * config/i386/i386-opts.h (indirect_branch): New.
10368         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10369         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10370         with local indirect jump when converting indirect call and jump.
10371         (ix86_set_indirect_branch_type): New.
10372         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10373         (indirectlabelno): New.
10374         (indirect_thunk_needed): Likewise.
10375         (indirect_thunk_bnd_needed): Likewise.
10376         (indirect_thunks_used): Likewise.
10377         (indirect_thunks_bnd_used): Likewise.
10378         (INDIRECT_LABEL): Likewise.
10379         (indirect_thunk_name): Likewise.
10380         (output_indirect_thunk): Likewise.
10381         (output_indirect_thunk_function): Likewise.
10382         (ix86_output_indirect_branch_via_reg): Likewise.
10383         (ix86_output_indirect_branch_via_push): Likewise.
10384         (ix86_output_indirect_branch): Likewise.
10385         (ix86_output_indirect_jmp): Likewise.
10386         (ix86_code_end): Call output_indirect_thunk_function if needed.
10387         (ix86_output_call_insn): Call ix86_output_indirect_branch if
10388         needed.
10389         (ix86_handle_fndecl_attribute): Handle indirect_branch.
10390         (ix86_attribute_table): Add indirect_branch.
10391         * config/i386/i386.h (machine_function): Add indirect_branch_type
10392         and has_local_indirect_jump.
10393         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10394         to true.
10395         (tablejump): Likewise.
10396         (*indirect_jump): Use ix86_output_indirect_jmp.
10397         (*tablejump_1): Likewise.
10398         (simple_return_indirect_internal): Likewise.
10399         * config/i386/i386.opt (mindirect-branch=): New option.
10400         (indirect_branch): New.
10401         (keep): Likewise.
10402         (thunk): Likewise.
10403         (thunk-inline): Likewise.
10404         (thunk-extern): Likewise.
10405         * doc/extend.texi: Document indirect_branch function attribute.
10406         * doc/invoke.texi: Document -mindirect-branch= option.
10408 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
10410         PR ipa/83051
10411         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10413 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
10415         * ipa-inline.c (want_inline_small_function_p): Return false if
10416         inlining has already failed with CIF_FINAL_ERROR.
10417         (update_caller_keys): Call want_inline_small_function_p before
10418         can_inline_edge_p.
10419         (update_callee_keys): Likewise.
10421 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10423         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10424         New function.
10425         (rs6000_quadword_masked_address_p): Likewise.
10426         (quad_aligned_load_p): Likewise.
10427         (quad_aligned_store_p): Likewise.
10428         (const_load_sequence_p): Add comment to describe the outer-most loop.
10429         (mimic_memory_attributes_and_flags): New function.
10430         (rs6000_gen_stvx): Likewise.
10431         (replace_swapped_aligned_store): Likewise.
10432         (rs6000_gen_lvx): Likewise.
10433         (replace_swapped_aligned_load): Likewise.
10434         (replace_swapped_load_constant): Capitalize argument name in
10435         comment describing this function.
10436         (rs6000_analyze_swaps): Add a third pass to search for vector loads
10437         and stores that access quad-word aligned addresses and replace
10438         with stvx or lvx instructions when appropriate.
10439         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10440         New function prototype.
10441         (rs6000_quadword_masked_address_p): Likewise.
10442         (rs6000_gen_lvx): Likewise.
10443         (rs6000_gen_stvx): Likewise.
10444         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10445         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10446         when memory address is aligned.
10447         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10448         this split to select lvx instruction when memory address is aligned.
10449         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10450         instruction when memory address is aligned.
10451         (*vsx_le_perm_load_v16qi): Likewise.
10452         (four unnamed splitters): Modify to select the stvx instruction
10453         when memory is aligned.
10455 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
10457         * predict.c (determine_unlikely_bbs): Handle correctly BBs
10458         which appears in the queue multiple times.
10460 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10461             Alan Hayward  <alan.hayward@arm.com>
10462             David Sherwood  <david.sherwood@arm.com>
10464         * tree-vectorizer.h (vec_lower_bound): New structure.
10465         (_loop_vec_info): Add check_nonzero and lower_bounds.
10466         (LOOP_VINFO_CHECK_NONZERO): New macro.
10467         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10468         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10469         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10470         fields.  Make seg_len the distance travelled, not including the
10471         access size.
10472         (dr_direction_indicator): Declare.
10473         (dr_zero_step_indicator): Likewise.
10474         (dr_known_forward_stride_p): Likewise.
10475         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10476         tree-ssanames.h.
10477         (runtime_alias_check_p): Allow runtime alias checks with
10478         variable strides.
10479         (operator ==): Compare access_size and align.
10480         (prune_runtime_alias_test_list): Rework for new distinction between
10481         the access_size and seg_len.
10482         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10483         segment lengths.
10484         (get_segment_min_max): New function.
10485         (create_intersect_range_checks): Use it.
10486         (dr_step_indicator): New function.
10487         (dr_direction_indicator): Likewise.
10488         (dr_zero_step_indicator): Likewise.
10489         (dr_known_forward_stride_p): Likewise.
10490         * tree-loop-distribution.c (data_ref_segment_size): Return
10491         DR_STEP * (niters - 1).
10492         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10493         constructor.
10494         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10495         (vect_preserves_scalar_order_p): New function, split out from...
10496         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10497         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10498         (vect_vfa_access_size): New function.
10499         (vect_vfa_align): Likewise.
10500         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10501         (dump_lower_bound): New function.
10502         (vect_check_lower_bound): Likewise.
10503         (vect_small_gap_p): Likewise.
10504         (vectorizable_with_step_bound_p): Likewise.
10505         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10506         depencies if the vectorization factor is 1.  Convert the checks
10507         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10508         a bunds check for variable steps if the minimum required step is
10509         relatively small. Update calls to the dr_with_seg_len
10510         constructor and to vect_compile_time_alias.
10511         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10512         function.
10513         (vect_loop_versioning): Call it.
10514         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10515         when retrying.
10516         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10518 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10519             Alan Hayward  <alan.hayward@arm.com>
10520             David Sherwood  <david.sherwood@arm.com>
10522         * doc/sourcebuild.texi (vect_scatter_store): Document.
10523         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10524         optabs.
10525         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10526         Document.
10527         * genopinit.c (main): Add supports_vec_scatter_store and
10528         supports_vec_scatter_store_cached to target_optabs.
10529         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10530         IFN_MASK_SCATTER_STORE.
10531         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10532         functions.
10533         * internal-fn.h (internal_store_fn_p): Declare.
10534         (internal_fn_stored_value_index): Likewise.
10535         * internal-fn.c (scatter_store_direct): New macro.
10536         (expand_scatter_store_optab_fn): New function.
10537         (direct_scatter_store_optab_supported_p): New macro.
10538         (internal_store_fn_p): New function.
10539         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10540         IFN_MASK_SCATTER_STORE.
10541         (internal_fn_mask_index): Likewise.
10542         (internal_fn_stored_value_index): New function.
10543         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10544         for scatter stores.
10545         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10546         * optabs-query.c (supports_vec_scatter_store_p): New function.
10547         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10548         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10549         true for scatter stores.
10550         (vect_gather_scatter_fn_p): Handle scatter stores too.
10551         (vect_check_gather_scatter): Consider using scatter stores if
10552         supports_vec_scatter_store_p.
10553         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10554         scatter stores too.
10555         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10556         internal_fn_stored_value_index.
10557         (check_load_store_masking): Handle scatter stores too.
10558         (vect_get_store_rhs): Make public.
10559         (vectorizable_call): Use internal_store_fn_p.
10560         (vectorizable_store): Handle scatter store internal functions.
10561         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10562         when deciding whether the end of the group has been reached.
10563         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10564         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10565         (mask_scatter_store<mode>): New insns.
10567 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10568             Alan Hayward  <alan.hayward@arm.com>
10569             David Sherwood  <david.sherwood@arm.com>
10571         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10572         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10573         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10574         function.
10575         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10576         Use vect_truncate_gather_scatter_offset if we can't treat the
10577         operation as a normal gather load or scatter store.
10578         (get_group_load_store_type): Take the gather_scatter_info
10579         as argument.  Try using a gather load or scatter store for
10580         single-element groups.
10581         (get_load_store_type): Update calls to get_group_load_store_type
10582         and vect_use_strided_gather_scatters_p.
10584 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10585             Alan Hayward  <alan.hayward@arm.com>
10586             David Sherwood  <david.sherwood@arm.com>
10588         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10589         optional tree argument.
10590         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10591         null target hooks.
10592         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10593         but continue to use the current value as a fallback.
10594         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10595         to compare the updates.
10596         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10597         (get_load_store_type): Use it when handling a strided access.
10598         (vect_get_strided_load_store_ops): New function.
10599         (vect_get_data_ptr_increment): Likewise.
10600         (vectorizable_load): Handle strided gather loads.  Always pass
10601         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10603 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10604             Alan Hayward  <alan.hayward@arm.com>
10605             David Sherwood  <david.sherwood@arm.com>
10607         * doc/md.texi (gather_load@var{m}): Document.
10608         (mask_gather_load@var{m}): Likewise.
10609         * genopinit.c (main): Add supports_vec_gather_load and
10610         supports_vec_gather_load_cached to target_optabs.
10611         * optabs-tree.c (init_tree_optimization_optabs): Use
10612         ggc_cleared_alloc to allocate target_optabs.
10613         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10614         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10615         functions.
10616         * internal-fn.h (internal_load_fn_p): Declare.
10617         (internal_gather_scatter_fn_p): Likewise.
10618         (internal_fn_mask_index): Likewise.
10619         (internal_gather_scatter_fn_supported_p): Likewise.
10620         * internal-fn.c (gather_load_direct): New macro.
10621         (expand_gather_load_optab_fn): New function.
10622         (direct_gather_load_optab_supported_p): New macro.
10623         (direct_internal_fn_optab): New function.
10624         (internal_load_fn_p): Likewise.
10625         (internal_gather_scatter_fn_p): Likewise.
10626         (internal_fn_mask_index): Likewise.
10627         (internal_gather_scatter_fn_supported_p): Likewise.
10628         * optabs-query.c (supports_at_least_one_mode_p): New function.
10629         (supports_vec_gather_load_p): Likewise.
10630         * optabs-query.h (supports_vec_gather_load_p): Declare.
10631         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10632         and memory_type field.
10633         (NUM_PATTERNS): Bump to 15.
10634         * tree-vect-data-refs.c: Include internal-fn.h.
10635         (vect_gather_scatter_fn_p): New function.
10636         (vect_describe_gather_scatter_call): Likewise.
10637         (vect_check_gather_scatter): Try using internal functions for
10638         gather loads.  Recognize existing calls to a gather load function.
10639         (vect_analyze_data_refs): Consider using gather loads if
10640         supports_vec_gather_load_p.
10641         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10642         (vect_get_gather_scatter_offset_type): Likewise.
10643         (vect_convert_mask_for_vectype): Likewise.
10644         (vect_add_conversion_to_patterm): Likewise.
10645         (vect_try_gather_scatter_pattern): Likewise.
10646         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10647         (vect_vect_recog_func_ptrs): Add it.
10648         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10649         internal_fn_mask_index and internal_gather_scatter_fn_p.
10650         (check_load_store_masking): Take the gather_scatter_info as an
10651         argument and handle gather loads.
10652         (vect_get_gather_scatter_ops): New function.
10653         (vectorizable_call): Check internal_load_fn_p.
10654         (vectorizable_load): Likewise.  Handle gather load internal
10655         functions.
10656         (vectorizable_store): Update call to check_load_store_masking.
10657         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10658         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10659         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10660         (aarch64_gather_scale_operand_d): New predicates.
10661         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10662         (mask_gather_load<mode>): New insns.
10664 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10665             Alan Hayward  <alan.hayward@arm.com>
10666             David Sherwood  <david.sherwood@arm.com>
10668         * optabs.def (fold_left_plus_optab): New optab.
10669         * doc/md.texi (fold_left_plus_@var{m}): Document.
10670         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10671         * internal-fn.c (fold_left_direct): Define.
10672         (expand_fold_left_optab_fn): Likewise.
10673         (direct_fold_left_optab_supported_p): Likewise.
10674         * fold-const-call.c (fold_const_fold_left): New function.
10675         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10676         * tree-parloops.c (valid_reduction_p): New function.
10677         (gather_scalar_reductions): Use it.
10678         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10679         (vect_finish_replace_stmt): Declare.
10680         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10681         (needs_fold_left_reduction_p): New function, split out from...
10682         (vect_is_simple_reduction): ...here.  Accept reductions that
10683         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10684         (vect_force_simple_reduction): Also store the reduction type in
10685         the assignment's STMT_VINFO_REDUC_TYPE.
10686         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10687         (merge_with_identity): New function.
10688         (vect_expand_fold_left): Likewise.
10689         (vectorize_fold_left_reduction): Likewise.
10690         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10691         scalar phi in place for it.  Check for target support and reject
10692         cases that would reassociate the operation.  Defer the transform
10693         phase to vectorize_fold_left_reduction.
10694         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10695         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10696         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10698 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10700         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10701         call to ifc_temp_var.
10703 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10704             Alan Hayward  <alan.hayward@arm.com>
10705             David Sherwood  <david.sherwood@arm.com>
10707         * target.def (legitimize_address_displacement): Take the original
10708         offset as a poly_int.
10709         * targhooks.h (default_legitimize_address_displacement): Update
10710         accordingly.
10711         * targhooks.c (default_legitimize_address_displacement): Likewise.
10712         * doc/tm.texi: Regenerate.
10713         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10714         as an argument, moving assert of ad->disp == ad->disp_term to...
10715         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10716         Try calling targetm.legitimize_address_displacement before expanding
10717         the address rather than afterwards, and adjust for the new interface.
10718         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10719         Match the new hook interface.  Handle SVE addresses.
10720         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10721         new hook interface.
10723 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10725         * Makefile.in (OBJS): Add early-remat.o.
10726         * target.def (select_early_remat_modes): New hook.
10727         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10728         * doc/tm.texi: Regenerate.
10729         * targhooks.h (default_select_early_remat_modes): Declare.
10730         * targhooks.c (default_select_early_remat_modes): New function.
10731         * timevar.def (TV_EARLY_REMAT): New timevar.
10732         * passes.def (pass_early_remat): New pass.
10733         * tree-pass.h (make_pass_early_remat): Declare.
10734         * early-remat.c: New file.
10735         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10736         function.
10737         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10739 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10740             Alan Hayward  <alan.hayward@arm.com>
10741             David Sherwood  <david.sherwood@arm.com>
10743         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10744         vfm1 with a bound_epilog parameter.
10745         (vect_do_peeling): Update calls accordingly, and move the prologue
10746         call earlier in the function.  Treat the base bound_epilog as 0 for
10747         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
10748         this base when peeling for gaps.
10749         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10750         with fully-masked loops.
10751         (vect_estimate_min_profitable_iters): Handle the single peeled
10752         iteration in that case.
10754 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10755             Alan Hayward  <alan.hayward@arm.com>
10756             David Sherwood  <david.sherwood@arm.com>
10758         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10759         single-element interleaving even if the size is not a power of 2.
10760         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10761         accesses for single-element interleaving if the group size is
10762         not a power of 2.
10764 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10765             Alan Hayward  <alan.hayward@arm.com>
10766             David Sherwood  <david.sherwood@arm.com>
10768         * doc/md.texi (fold_extract_last_@var{m}): Document.
10769         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10770         * optabs.def (fold_extract_last_optab): New optab.
10771         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10772         * internal-fn.c (fold_extract_direct): New macro.
10773         (expand_fold_extract_optab_fn): Likewise.
10774         (direct_fold_extract_optab_supported_p): Likewise.
10775         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10776         * tree-vect-loop.c (vect_model_reduction_cost): Handle
10777         EXTRACT_LAST_REDUCTION.
10778         (get_initial_def_for_reduction): Do not create an initial vector
10779         for EXTRACT_LAST_REDUCTION reductions.
10780         (vectorizable_reduction): Leave the scalar phi in place for
10781         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
10782         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
10783         epilogue code for EXTRACT_LAST_REDUCTION and defer the
10784         transform phase to vectorizable_condition.
10785         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10786         split out from...
10787         (vect_finish_stmt_generation): ...here.
10788         (vect_finish_replace_stmt): New function.
10789         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10790         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10791         pattern.
10792         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
10794 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10795             Alan Hayward  <alan.hayward@arm.com>
10796             David Sherwood  <david.sherwood@arm.com>
10798         * doc/md.texi (extract_last_@var{m}): Document.
10799         * optabs.def (extract_last_optab): New optab.
10800         * internal-fn.def (EXTRACT_LAST): New internal function.
10801         * internal-fn.c (cond_unary_direct): New macro.
10802         (expand_cond_unary_optab_fn): Likewise.
10803         (direct_cond_unary_optab_supported_p): Likewise.
10804         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
10805         loops using EXTRACT_LAST.
10806         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
10807         (extract_last_<mode>): ...this optab.
10808         (vec_extract<mode><Vel>): Update accordingly.
10810 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10811             Alan Hayward  <alan.hayward@arm.com>
10812             David Sherwood  <david.sherwood@arm.com>
10814         * target.def (empty_mask_is_expensive): New hook.
10815         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
10816         * doc/tm.texi: Regenerate.
10817         * targhooks.h (default_empty_mask_is_expensive): Declare.
10818         * targhooks.c (default_empty_mask_is_expensive): New function.
10819         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
10820         if the target says that empty masks are expensive.
10821         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
10822         New function.
10823         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
10825 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10826             Alan Hayward  <alan.hayward@arm.com>
10827             David Sherwood  <david.sherwood@arm.com>
10829         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
10830         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
10831         (vect_use_loop_mask_for_alignment_p): New function.
10832         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
10833         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
10834         niters_skip argument.  Make sure that the first niters_skip elements
10835         of the first iteration are inactive.
10836         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
10837         Update call to vect_set_loop_masks_directly.
10838         (get_misalign_in_elems): New function, split out from...
10839         (vect_gen_prolog_loop_niters): ...here.
10840         (vect_update_init_of_dr): Take a code argument that specifies whether
10841         the adjustment should be added or subtracted.
10842         (vect_update_init_of_drs): Likewise.
10843         (vect_prepare_for_masked_peels): New function.
10844         (vect_do_peeling): Skip prologue peeling if we're using a mask
10845         instead.  Update call to vect_update_inits_of_drs.
10846         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10847         mask_skip_niters.
10848         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
10849         alignment.  Do not include the number of peeled iterations in
10850         the minimum threshold in that case.
10851         (vectorizable_induction): Adjust the start value down by
10852         LOOP_VINFO_MASK_SKIP_NITERS iterations.
10853         (vect_transform_loop): Call vect_prepare_for_masked_peels.
10854         Take the number of skipped iterations into account when calculating
10855         the loop bounds.
10856         * tree-vect-stmts.c (vect_gen_while_not): New function.
10858 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10859             Alan Hayward  <alan.hayward@arm.com>
10860             David Sherwood  <david.sherwood@arm.com>
10862         * doc/sourcebuild.texi (vect_fully_masked): Document.
10863         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
10864         default value to 0.
10865         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
10866         split out from...
10867         (vect_analyze_loop_2): ...here. Don't check the vectorization
10868         factor against the number of loop iterations if the loop is
10869         fully-masked.
10871 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10872             Alan Hayward  <alan.hayward@arm.com>
10873             David Sherwood  <david.sherwood@arm.com>
10875         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
10876         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
10877         (dump_groups): Update accordingly.
10878         (iv_use::mem_type): New member variable.
10879         (address_p): New function.
10880         (record_use): Add a mem_type argument and initialize the new
10881         mem_type field.
10882         (record_group_use): Add a mem_type argument.  Use address_p.
10883         Remove obsolete null checks of base_object.  Update call to record_use.
10884         (find_interesting_uses_op): Update call to record_group_use.
10885         (find_interesting_uses_cond): Likewise.
10886         (find_interesting_uses_address): Likewise.
10887         (get_mem_type_for_internal_fn): New function.
10888         (find_address_like_use): Likewise.
10889         (find_interesting_uses_stmt): Try find_address_like_use before
10890         calling find_interesting_uses_op.
10891         (addr_offset_valid_p): Use the iv mem_type field as the type
10892         of the addressed memory.
10893         (add_autoinc_candidates): Likewise.
10894         (get_address_cost): Likewise.
10895         (split_small_address_groups_p): Use address_p.
10896         (split_address_groups): Likewise.
10897         (add_iv_candidate_for_use): Likewise.
10898         (autoinc_possible_for_pair): Likewise.
10899         (rewrite_groups): Likewise.
10900         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
10901         (determine_group_iv_cost): Update after split of USE_ADDRESS.
10902         (get_alias_ptr_type_for_ptr_address): New function.
10903         (rewrite_use_address): Rewrite address uses in calls that were
10904         identified by find_address_like_use.
10906 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10907             Alan Hayward  <alan.hayward@arm.com>
10908             David Sherwood  <david.sherwood@arm.com>
10910         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
10911         TARGET_MEM_REFs.
10912         * gimple-expr.h (is_gimple_addressable: Likewise.
10913         * gimple-expr.c (is_gimple_address): Likewise.
10914         * internal-fn.c (expand_call_mem_ref): New function.
10915         (expand_mask_load_optab_fn): Use it.
10916         (expand_mask_store_optab_fn): Likewise.
10918 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10919             Alan Hayward  <alan.hayward@arm.com>
10920             David Sherwood  <david.sherwood@arm.com>
10922         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
10923         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
10924         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
10925         (cond_umax@var{mode}): Document.
10926         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
10927         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
10928         (cond_umin_optab, cond_umax_optab): New optabs.
10929         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
10930         (COND_IOR, COND_XOR): New internal functions.
10931         * internal-fn.h (get_conditional_internal_fn): Declare.
10932         * internal-fn.c (cond_binary_direct): New macro.
10933         (expand_cond_binary_optab_fn): Likewise.
10934         (direct_cond_binary_optab_supported_p): Likewise.
10935         (get_conditional_internal_fn): New function.
10936         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
10937         Cope with reduction statements that are vectorized as calls rather
10938         than assignments.
10939         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
10940         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
10941         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
10942         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10943         (UNSPEC_COND_EOR): New unspecs.
10944         (optab): Add mappings for them.
10945         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
10946         (sve_int_op, sve_fp_op): New int attributes.
10948 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10949             Alan Hayward  <alan.hayward@arm.com>
10950             David Sherwood  <david.sherwood@arm.com>
10952         * optabs.def (while_ult_optab): New optab.
10953         * doc/md.texi (while_ult@var{m}@var{n}): Document.
10954         * internal-fn.def (WHILE_ULT): New internal function.
10955         * internal-fn.h (direct_internal_fn_supported_p): New override
10956         that takes two types as argument.
10957         * internal-fn.c (while_direct): New macro.
10958         (expand_while_optab_fn): New function.
10959         (convert_optab_supported_p): Likewise.
10960         (direct_while_optab_supported_p): New macro.
10961         * wide-int.h (wi::udiv_ceil): New function.
10962         * tree-vectorizer.h (rgroup_masks): New structure.
10963         (vec_loop_masks): New typedef.
10964         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
10965         and fully_masked_p.
10966         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
10967         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
10968         (vect_max_vf): New function.
10969         (slpeel_make_loop_iterate_ntimes): Delete.
10970         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
10971         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
10972         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
10973         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
10974         internal-fn.h, stor-layout.h and optabs-query.h.
10975         (vect_set_loop_mask): New function.
10976         (add_preheader_seq): Likewise.
10977         (add_header_seq): Likewise.
10978         (interleave_supported_p): Likewise.
10979         (vect_maybe_permute_loop_masks): Likewise.
10980         (vect_set_loop_masks_directly): Likewise.
10981         (vect_set_loop_condition_masked): Likewise.
10982         (vect_set_loop_condition_unmasked): New function, split out from
10983         slpeel_make_loop_iterate_ntimes.
10984         (slpeel_make_loop_iterate_ntimes): Rename to..
10985         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
10986         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
10987         (vect_do_peeling): Update call accordingly.
10988         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
10989         loops.
10990         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10991         mask_compare_type, can_fully_mask_p and fully_masked_p.
10992         (release_vec_loop_masks): New function.
10993         (_loop_vec_info): Use it to free the loop masks.
10994         (can_produce_all_loop_masks_p): New function.
10995         (vect_get_max_nscalars_per_iter): Likewise.
10996         (vect_verify_full_masking): Likewise.
10997         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
10998         retries, and free the mask rgroups before retrying.  Check loop-wide
10999         reasons for disallowing fully-masked loops.  Make the final decision
11000         about whether use a fully-masked loop or not.
11001         (vect_estimate_min_profitable_iters): Do not assume that peeling
11002         for the number of iterations will be needed for fully-masked loops.
11003         (vectorizable_reduction): Disable fully-masked loops.
11004         (vectorizable_live_operation): Likewise.
11005         (vect_halve_mask_nunits): New function.
11006         (vect_double_mask_nunits): Likewise.
11007         (vect_record_loop_mask): Likewise.
11008         (vect_get_loop_mask): Likewise.
11009         (vect_transform_loop): Handle the case in which the final loop
11010         iteration might handle a partial vector.  Call vect_set_loop_condition
11011         instead of slpeel_make_loop_iterate_ntimes.
11012         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
11013         (check_load_store_masking): New function.
11014         (prepare_load_store_mask): Likewise.
11015         (vectorizable_store): Handle fully-masked loops.
11016         (vectorizable_load): Likewise.
11017         (supportable_widening_operation): Use vect_halve_mask_nunits for
11018         booleans.
11019         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
11020         (vect_gen_while): New function.
11021         * config/aarch64/aarch64.md (umax<mode>3): New expander.
11022         (aarch64_uqdec<mode>): New insn.
11024 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11025             Alan Hayward  <alan.hayward@arm.com>
11026             David Sherwood  <david.sherwood@arm.com>
11028         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
11029         (reduc_xor_scal_optab): New optabs.
11030         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
11031         (reduc_xor_scal_@var{m}): Document.
11032         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
11033         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
11034         internal functions.
11035         * fold-const-call.c (fold_const_call): Handle them.
11036         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
11037         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
11038         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
11039         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
11040         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
11041         (UNSPEC_XORV): New unspecs.
11042         (optab): Add entries for them.
11043         (BITWISEV): New int iterator.
11044         (bit_reduc_op): New int attributes.
11046 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11047             Alan Hayward  <alan.hayward@arm.com>
11048             David Sherwood  <david.sherwood@arm.com>
11050         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
11051         * internal-fn.def (VEC_SHL_INSERT): New internal function.
11052         * optabs.def (vec_shl_insert_optab): New optab.
11053         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
11054         (duplicate_and_interleave): Likewise.
11055         * tree-vect-loop.c: Include internal-fn.h.
11056         (neutral_op_for_slp_reduction): New function, split out from
11057         get_initial_defs_for_reduction.
11058         (get_initial_def_for_reduction): Handle option 2 for variable-length
11059         vectors by loading the neutral value into a vector and then shifting
11060         the initial value into element 0.
11061         (get_initial_defs_for_reduction): Replace the code argument with
11062         the neutral value calculated by neutral_op_for_slp_reduction.
11063         Use gimple_build_vector for constant-length vectors.
11064         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
11065         but the first group_size elements have a neutral value.
11066         Use duplicate_and_interleave otherwise.
11067         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
11068         Update call to get_initial_defs_for_reduction.  Handle SLP
11069         reductions for variable-length vectors by creating one vector
11070         result for each scalar result, with the elements associated
11071         with other scalar results stubbed out with the neutral value.
11072         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
11073         Require IFN_VEC_SHL_INSERT for double reductions on
11074         variable-length vectors, or SLP reductions that have
11075         a neutral value.  Require can_duplicate_and_interleave_p
11076         support for variable-length unchained SLP reductions if there
11077         is no neutral value, such as for MIN/MAX reductions.  Also require
11078         the number of vector elements to be a multiple of the number of
11079         SLP statements when doing variable-length unchained SLP reductions.
11080         Update call to vect_create_epilog_for_reduction.
11081         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
11082         and remove initial values.
11083         (duplicate_and_interleave): Make public.
11084         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
11085         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
11087 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11088             Alan Hayward  <alan.hayward@arm.com>
11089             David Sherwood  <david.sherwood@arm.com>
11091         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
11092         (can_duplicate_and_interleave_p): New function.
11093         (vect_get_and_check_slp_defs): Take the vector of statements
11094         rather than just the current one.  Remove excess parentheses.
11095         Restriction rejectinon of vect_constant_def and vect_external_def
11096         for variable-length vectors to boolean types, or types for which
11097         can_duplicate_and_interleave_p is false.
11098         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
11099         (duplicate_and_interleave): New function.
11100         (vect_get_constant_vectors): Use gimple_build_vector for
11101         constant-length vectors and suitable variable-length constant
11102         vectors.  Use duplicate_and_interleave for other variable-length
11103         vectors.  Don't defer the update when inserting new statements.
11105 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11106             Alan Hayward  <alan.hayward@arm.com>
11107             David Sherwood  <david.sherwood@arm.com>
11109         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
11110         min_profitable_iters doesn't go negative.
11112 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11113             Alan Hayward  <alan.hayward@arm.com>
11114             David Sherwood  <david.sherwood@arm.com>
11116         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
11117         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
11118         * optabs.def (vec_mask_load_lanes_optab): New optab.
11119         (vec_mask_store_lanes_optab): Likewise.
11120         * internal-fn.def (MASK_LOAD_LANES): New internal function.
11121         (MASK_STORE_LANES): Likewise.
11122         * internal-fn.c (mask_load_lanes_direct): New macro.
11123         (mask_store_lanes_direct): Likewise.
11124         (expand_mask_load_optab_fn): Handle masked operations.
11125         (expand_mask_load_lanes_optab_fn): New macro.
11126         (expand_mask_store_optab_fn): Handle masked operations.
11127         (expand_mask_store_lanes_optab_fn): New macro.
11128         (direct_mask_load_lanes_optab_supported_p): Likewise.
11129         (direct_mask_store_lanes_optab_supported_p): Likewise.
11130         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
11131         parameter.
11132         (vect_load_lanes_supported): Likewise.
11133         * tree-vect-data-refs.c (strip_conversion): New function.
11134         (can_group_stmts_p): Likewise.
11135         (vect_analyze_data_ref_accesses): Use it instead of checking
11136         for a pair of assignments.
11137         (vect_store_lanes_supported): Take a masked_p parameter.
11138         (vect_load_lanes_supported): Likewise.
11139         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
11140         vect_store_lanes_supported and vect_load_lanes_supported.
11141         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11142         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
11143         parameter.  Don't allow gaps for masked accesses.
11144         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
11145         and vect_load_lanes_supported.
11146         (get_load_store_type): Take a masked_p parameter and update
11147         call to get_group_load_store_type.
11148         (vectorizable_store): Update call to get_load_store_type.
11149         Handle IFN_MASK_STORE_LANES.
11150         (vectorizable_load): Update call to get_load_store_type.
11151         Handle IFN_MASK_LOAD_LANES.
11153 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11154             Alan Hayward  <alan.hayward@arm.com>
11155             David Sherwood  <david.sherwood@arm.com>
11157         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
11158         modes for SVE.
11159         * config/aarch64/aarch64-protos.h
11160         (aarch64_sve_struct_memory_operand_p): Declare.
11161         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
11162         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
11163         (VPRED, vpred): Handle SVE structure modes.
11164         * config/aarch64/constraints.md (Utx): New constraint.
11165         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
11166         (aarch64_sve_struct_nonimmediate_operand): New predicates.
11167         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
11168         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
11169         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
11170         structure modes.  Split into pieces after RA.
11171         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
11172         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
11173         New patterns.
11174         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
11175         SVE structure modes.
11176         (aarch64_classify_address): Likewise.
11177         (sizetochar): Move earlier in file.
11178         (aarch64_print_operand): Handle SVE register lists.
11179         (aarch64_array_mode): New function.
11180         (aarch64_sve_struct_memory_operand_p): Likewise.
11181         (TARGET_ARRAY_MODE): Redefine.
11183 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11184             Alan Hayward  <alan.hayward@arm.com>
11185             David Sherwood  <david.sherwood@arm.com>
11187         * target.def (array_mode): New target hook.
11188         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
11189         * doc/tm.texi: Regenerate.
11190         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
11191         * hooks.c (hook_optmode_mode_uhwi_none): New function.
11192         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
11193         targetm.array_mode.
11194         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
11195         type sizes.
11197 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11198             Alan Hayward  <alan.hayward@arm.com>
11199             David Sherwood  <david.sherwood@arm.com>
11201         * fold-const.c (fold_binary_loc): Check the argument types
11202         rather than the result type when testing for a vector operation.
11204 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11206         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
11207         * doc/tm.texi: Regenerate.
11209 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11210             Alan Hayward  <alan.hayward@arm.com>
11211             David Sherwood  <david.sherwood@arm.com>
11213         * doc/invoke.texi (-msve-vector-bits=): Document new option.
11214         (sve): Document new AArch64 extension.
11215         * doc/md.texi (w): Extend the description of the AArch64
11216         constraint to include SVE vectors.
11217         (Upl, Upa): Document new AArch64 predicate constraints.
11218         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
11219         enum.
11220         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
11221         (msve-vector-bits=): New option.
11222         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
11223         SVE when these are disabled.
11224         (sve): New extension.
11225         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
11226         modes.  Adjust their number of units based on aarch64_sve_vg.
11227         (MAX_BITSIZE_MODE_ANY_MODE): Define.
11228         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
11229         aarch64_addr_query_type.
11230         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
11231         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
11232         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
11233         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
11234         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
11235         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
11236         (aarch64_simd_imm_zero_p): Delete.
11237         (aarch64_check_zero_based_sve_index_immediate): Declare.
11238         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11239         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11240         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11241         (aarch64_sve_float_mul_immediate_p): Likewise.
11242         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11243         rather than an rtx.
11244         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11245         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11246         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11247         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11248         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11249         (aarch64_regmode_natural_size): Likewise.
11250         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11251         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11252         left one place.
11253         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11254         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11255         for VG and the SVE predicate registers.
11256         (V_ALIASES): Add a "z"-prefixed alias.
11257         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11258         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11259         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11260         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11261         (REG_CLASS_NAMES): Add entries for them.
11262         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
11263         and the predicate registers.
11264         (aarch64_sve_vg): Declare.
11265         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11266         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11267         (REGMODE_NATURAL_SIZE): Define.
11268         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11269         SVE macros.
11270         * config/aarch64/aarch64.c: Include cfgrtl.h.
11271         (simd_immediate_info): Add a constructor for series vectors,
11272         and an associated step field.
11273         (aarch64_sve_vg): New variable.
11274         (aarch64_dbx_register_number): Handle VG and the predicate registers.
11275         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11276         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11277         (VEC_ANY_DATA, VEC_STRUCT): New constants.
11278         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11279         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11280         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11281         (aarch64_get_mask_mode): New functions.
11282         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11283         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11284         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
11285         predicate modes and predicate registers.  Explicitly restrict
11286         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
11287         to store a vector mode if it is recognized by
11288         aarch64_classify_vector_mode.
11289         (aarch64_regmode_natural_size): New function.
11290         (aarch64_hard_regno_caller_save_mode): Return the original mode
11291         for predicates.
11292         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
11293         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
11294         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
11295         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
11296         functions.
11297         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
11298         does not overlap dest if the function is frame-related.  Handle
11299         SVE constants.
11300         (aarch64_split_add_offset): New function.
11301         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
11302         them aarch64_add_offset.
11303         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
11304         and update call to aarch64_sub_sp.
11305         (aarch64_add_cfa_expression): New function.
11306         (aarch64_expand_prologue): Pass extra temporary registers to the
11307         functions above.  Handle the case in which we need to emit new
11308         DW_CFA_expressions for registers that were originally saved
11309         relative to the stack pointer, but now have to be expressed
11310         relative to the frame pointer.
11311         (aarch64_output_mi_thunk): Pass extra temporary registers to the
11312         functions above.
11313         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
11314         IP0 and IP1 values for SVE frames.
11315         (aarch64_expand_vec_series): New function.
11316         (aarch64_expand_sve_widened_duplicate): Likewise.
11317         (aarch64_expand_sve_const_vector): Likewise.
11318         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
11319         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
11320         into the register, rather than emitting a SET directly.
11321         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
11322         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
11323         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
11324         (offset_9bit_signed_scaled_p): New functions.
11325         (aarch64_replicate_bitmask_imm): New function.
11326         (aarch64_bitmask_imm): Use it.
11327         (aarch64_cannot_force_const_mem): Reject expressions involving
11328         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
11329         (aarch64_classify_index): Handle SVE indices, by requiring
11330         a plain register index with a scale that matches the element size.
11331         (aarch64_classify_address): Handle SVE addresses.  Assert that
11332         the mode of the address is VOIDmode or an integer mode.
11333         Update call to aarch64_classify_symbol.
11334         (aarch64_classify_symbolic_expression): Update call to
11335         aarch64_classify_symbol.
11336         (aarch64_const_vec_all_in_range_p): New function.
11337         (aarch64_print_vector_float_operand): Likewise.
11338         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
11339         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
11340         and the FP immediates 1.0 and 0.5.
11341         (aarch64_print_address_internal): Handle SVE addresses.
11342         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
11343         (aarch64_regno_regclass): Handle predicate registers.
11344         (aarch64_secondary_reload): Handle big-endian reloads of SVE
11345         data modes.
11346         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
11347         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
11348         (aarch64_convert_sve_vector_bits): New function.
11349         (aarch64_override_options): Use it to handle -msve-vector-bits=.
11350         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11351         rather than an rtx.
11352         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
11353         Handle SVE vector and predicate modes.  Accept VL-based constants
11354         that need only one temporary register, and VL offsets that require
11355         no temporary registers.
11356         (aarch64_conditional_register_usage): Mark the predicate registers
11357         as fixed if SVE isn't available.
11358         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11359         Return true for SVE vector and predicate modes.
11360         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11361         rather than an unsigned int.  Handle SVE modes.
11362         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
11363         SVE modes.
11364         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11365         if SVE is enabled.
11366         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11367         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11368         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11369         (aarch64_sve_float_mul_immediate_p): New functions.
11370         (aarch64_sve_valid_immediate): New function.
11371         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11372         Explicitly reject structure modes.  Check for INDEX constants.
11373         Handle PTRUE and PFALSE constants.
11374         (aarch64_check_zero_based_sve_index_immediate): New function.
11375         (aarch64_simd_imm_zero_p): Delete.
11376         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11377         vector modes.  Accept constants in the range of CNT[BHWD].
11378         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11379         ask for an Advanced SIMD mode.
11380         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11381         (aarch64_simd_vector_alignment): Handle SVE predicates.
11382         (aarch64_vectorize_preferred_vector_alignment): New function.
11383         (aarch64_simd_vector_alignment_reachable): Use it instead of
11384         the vector size.
11385         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11386         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11387         functions.
11388         (MAX_VECT_LEN): Delete.
11389         (expand_vec_perm_d): Add a vec_flags field.
11390         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11391         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11392         (aarch64_evpc_ext): Don't apply a big-endian lane correction
11393         for SVE modes.
11394         (aarch64_evpc_rev): Rename to...
11395         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
11396         (aarch64_evpc_rev_global): New function.
11397         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11398         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11399         MAX_VECT_LEN.
11400         (aarch64_evpc_sve_tbl): New function.
11401         (aarch64_expand_vec_perm_const_1): Update after rename of
11402         aarch64_evpc_rev.  Handle SVE permutes too, trying
11403         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11404         than aarch64_evpc_tbl.
11405         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11406         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11407         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11408         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11409         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11410         (aarch64_expand_sve_vcond): New functions.
11411         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11412         of aarch64_vector_mode_p.
11413         (aarch64_dwarf_poly_indeterminate_value): New function.
11414         (aarch64_compute_pressure_classes): Likewise.
11415         (aarch64_can_change_mode_class): Likewise.
11416         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11417         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11418         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11419         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11420         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11421         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11422         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11423         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11424         constraints.
11425         (Dn, Dl, Dr): Accept const as well as const_vector.
11426         (Dz): Likewise.  Compare against CONST0_RTX.
11427         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11428         of "vector" where appropriate.
11429         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11430         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11431         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11432         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11433         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11434         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11435         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11436         (v_int_equiv): Extend to SVE modes.
11437         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11438         mode attributes.
11439         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11440         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11441         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11442         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11443         (SVE_COND_FP_CMP): New int iterators.
11444         (perm_hilo): Handle the new unpack unspecs.
11445         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11446         attributes.
11447         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11448         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11449         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11450         (aarch64_equality_operator, aarch64_constant_vector_operand)
11451         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11452         (aarch64_sve_nonimmediate_operand): Likewise.
11453         (aarch64_sve_general_operand): Likewise.
11454         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11455         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11456         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11457         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11458         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11459         (aarch64_sve_float_arith_immediate): Likewise.
11460         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11461         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11462         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11463         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11464         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11465         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11466         (aarch64_sve_float_arith_operand): Likewise.
11467         (aarch64_sve_float_arith_with_sub_operand): Likewise.
11468         (aarch64_sve_float_mul_operand): Likewise.
11469         (aarch64_sve_vec_perm_operand): Likewise.
11470         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11471         (aarch64_mov_operand): Accept const_poly_int and const_vector.
11472         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11473         as well as const_vector.
11474         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11475         in file.  Use CONST0_RTX and CONSTM1_RTX.
11476         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11477         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11478         Use aarch64_simd_imm_zero.
11479         * config/aarch64/aarch64-sve.md: New file.
11480         * config/aarch64/aarch64.md: Include it.
11481         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11482         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11483         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11484         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11485         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11486         (sve): New attribute.
11487         (enabled): Disable instructions with the sve attribute unless
11488         TARGET_SVE.
11489         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11490         aarch64_expand_mov_immediate.
11491         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11492         CNT[BHSD] immediates.
11493         (movti): Split CONST_POLY_INT moves into two halves.
11494         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11495         Split additions that need a temporary here if the destination
11496         is the stack pointer.
11497         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11498         (*add<mode>3_poly_1): New instruction.
11499         (set_clobber_cc): New expander.
11501 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11503         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11504         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11505         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11506         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11507         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11508         Change innermode from fixed_mode_size to machine_mode.
11509         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11510         subreg of a variable-length CONST_VECTOR.
11512 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11513             Alan Hayward  <alan.hayward@arm.com>
11514             David Sherwood  <david.sherwood@arm.com>
11516         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11517         (add_offset_to_base): New function, split out from...
11518         (create_mem_ref): ...here.  When handling a scale other than 1,
11519         check first whether the address is valid without the offset.
11520         Add it into the base if so, leaving the index and scale as-is.
11522 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11524         PR c++/83778
11525         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11526         fold_for_warn before checking if arg2 is INTEGER_CST.
11528 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11530         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11531         (store_multiple_operation): Delete.
11532         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11533         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11534         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11535         guarded by TARGET_STRING.
11536         (rs6000_output_load_multiple): Delete.
11537         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11538         OPTION_MASK_STRING / TARGET_STRING handling.
11539         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11540         (const rs6000_opt_masks) <"string">: Change mask to 0.
11541         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11542         (MASK_STRING): Delete.
11543         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11544         parts.  Simplify.
11545         (load_multiple): Delete.
11546         (*ldmsi8): Delete.
11547         (*ldmsi7): Delete.
11548         (*ldmsi6): Delete.
11549         (*ldmsi5): Delete.
11550         (*ldmsi4): Delete.
11551         (*ldmsi3): Delete.
11552         (store_multiple): Delete.
11553         (*stmsi8): Delete.
11554         (*stmsi7): Delete.
11555         (*stmsi6): Delete.
11556         (*stmsi5): Delete.
11557         (*stmsi4): Delete.
11558         (*stmsi3): Delete.
11559         (movmemsi_8reg): Delete.
11560         (corresponding unnamed define_insn): Delete.
11561         (movmemsi_6reg): Delete.
11562         (corresponding unnamed define_insn): Delete.
11563         (movmemsi_4reg): Delete.
11564         (corresponding unnamed define_insn): Delete.
11565         (movmemsi_2reg): Delete.
11566         (corresponding unnamed define_insn): Delete.
11567         (movmemsi_1reg): Delete.
11568         (corresponding unnamed define_insn): Delete.
11569         * config/rs6000/rs6000.opt (mno-string): New.
11570         (mstring): Replace by deprecation warning stub.
11571         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11573 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11575         * regrename.c (regrename_do_replace): If replacing the same
11576         reg multiple times, try to reuse last created gen_raw_REG.
11578         PR debug/81155
11579         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11580         main to workaround a bug in GDB.
11582 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11584         PR target/83737
11585         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11587 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11589         PR rtl-optimization/80481
11590         * ira-color.c (get_cap_member): New function.
11591         (allocnos_conflict_by_live_ranges_p): Use it.
11592         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11593         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11595 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11597         PR target/83628
11598         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11599         (*saddl_se_1): Ditto.
11600         (*ssubsi_1): Ditto.
11601         (*ssubl_se_1): Ditto.
11603 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11605         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11606         rather than wi::to_widest for DR_INITs.
11607         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11608         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11609         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11610         INTEGER_CSTs.
11611         (vect_analyze_group_access_1): Note that here.
11613 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11615         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11616         polynomial type sizes.
11618 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11620         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11621         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11622         (gimple_add_tmp_var): Likewise.
11624 2018-01-12  Martin Liska  <mliska@suse.cz>
11626         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11627         (gimple_alloc_sizes): Likewise.
11628         (dump_gimple_statistics): Use PRIu64 in printf format.
11629         * gimple.h: Change uint64_t to int.
11631 2018-01-12  Martin Liska  <mliska@suse.cz>
11633         * tree-core.h: Use uint64_t instead of int.
11634         * tree.c (tree_node_counts): Likewise.
11635         (tree_node_sizes): Likewise.
11636         (dump_tree_statistics): Use PRIu64 in printf format.
11638 2018-01-12  Martin Liska  <mliska@suse.cz>
11640         * Makefile.in: As qsort_chk is implemented in vec.c, add
11641         vec.o to linkage of gencfn-macros.
11642         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11643         passing the info to record_node_allocation_statistics.
11644         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11645         and pass the info.
11646         * ggc-common.c (struct ggc_usage): Add operator== and use
11647         it in operator< and compare function.
11648         * mem-stats.h (struct mem_usage): Likewise.
11649         * vec.c (struct vec_usage): Remove operator< and compare
11650         function. Can be simply inherited.
11652 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11654         PR target/81616
11655         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11656         * tree-ssa-math-opts.c: Include domwalk.h.
11657         (convert_mult_to_fma_1): New function.
11658         (fma_transformation_info): New type.
11659         (fma_deferring_state): Likewise.
11660         (cancel_fma_deferring): New function.
11661         (result_of_phi): Likewise.
11662         (last_fma_candidate_feeds_initial_phi): Likewise.
11663         (convert_mult_to_fma): Added deferring logic, split actual
11664         transformation to convert_mult_to_fma_1.
11665         (math_opts_dom_walker): New type.
11666         (math_opts_dom_walker::after_dom_children): New method, body moved
11667         here from pass_optimize_widening_mul::execute, added deferring logic
11668         bits.
11669         (pass_optimize_widening_mul::execute): Moved most of code to
11670         math_opts_dom_walker::after_dom_children.
11671         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11672         * config/i386/i386.c (ix86_option_override_internal): Added
11673         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11675 2018-01-12  Richard Biener  <rguenther@suse.de>
11677         PR debug/83157
11678         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11679         inline instance vars.
11681 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11683         PR target/81819
11684         * config/rx/rx.c (rx_is_restricted_memory_address):
11685         Handle SUBREG case.
11687 2018-01-12  Richard Biener  <rguenther@suse.de>
11689         PR tree-optimization/80846
11690         * target.def (split_reduction): New target hook.
11691         * targhooks.c (default_split_reduction): New function.
11692         * targhooks.h (default_split_reduction): Declare.
11693         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11694         target requests first reduce vectors by combining low and high
11695         parts.
11696         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11697         (get_vectype_for_scalar_type_and_size): Export.
11698         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11699         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11700         * doc/tm.texi: Regenerate.
11701         * config/i386/i386.c (ix86_split_reduction): Implement
11702         TARGET_VECTORIZE_SPLIT_REDUCTION.
11704 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11706         PR target/83368
11707         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11708         in PIC mode except for TARGET_VXWORKS_RTP.
11709         * config/sparc/sparc.c: Include cfgrtl.h.
11710         (TARGET_INIT_PIC_REG): Define.
11711         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11712         (sparc_pic_register_p): New predicate.
11713         (sparc_legitimate_address_p): Use it.
11714         (sparc_legitimize_pic_address): Likewise.
11715         (sparc_delegitimize_address): Likewise.
11716         (sparc_mode_dependent_address_p): Likewise.
11717         (gen_load_pcrel_sym): Remove 4th parameter.
11718         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11719         (sparc_expand_prologue): Do not call load_got_register here.
11720         (sparc_flat_expand_prologue): Likewise.
11721         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11722         (sparc_use_pseudo_pic_reg): New function.
11723         (sparc_init_pic_reg): Likewise.
11724         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11725         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11727 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11729         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11730         Add item for branch_cost.
11732 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11734         PR rtl-optimization/83565
11735         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11736         not extend the result to a larger mode for rotate operations.
11737         (num_sign_bit_copies1): Likewise.
11739 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11741         PR target/40411
11742         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11743         -symbolic.
11744         Use values-Xc.o for -pedantic.
11745         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11747 2018-01-12  Martin Liska  <mliska@suse.cz>
11749         PR ipa/83054
11750         * ipa-devirt.c (final_warning_record::grow_type_warnings):
11751         New function.
11752         (possible_polymorphic_call_targets): Use it.
11753         (ipa_devirt): Likewise.
11755 2018-01-12  Martin Liska  <mliska@suse.cz>
11757         * profile-count.h (enum profile_quality): Use 0 as invalid
11758         enum value of profile_quality.
11760 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11762         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11763         -mext-string options.
11765 2018-01-12  Richard Biener  <rguenther@suse.de>
11767         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11768         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11769         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11770         Likewise.
11771         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11773 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11775         * configure.ac (--with-long-double-format): Add support for the
11776         configuration option to change the default long double format on
11777         PowerPC systems.
11778         * config.gcc (powerpc*-linux*-*): Likewise.
11779         * configure: Regenerate.
11780         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11781         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11782         used without modification.
11784 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11786         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11787         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11788         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11789         MISC_BUILTIN_SPEC_BARRIER.
11790         (rs6000_init_builtins): Likewise.
11791         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11792         enum value.
11793         (speculation_barrier): New define_insn.
11794         * doc/extend.texi: Document __builtin_speculation_barrier.
11796 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11798         PR target/83203
11799         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
11800         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
11801         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
11802         iterators.
11803         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
11804         integral modes instead of "ss" and "sd".
11805         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
11806         vectors with 32-bit and 64-bit elements.
11807         (vecdupssescalarmodesuffix): New mode attribute.
11808         (vec_dup<mode>): Use it.
11810 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
11812         PR target/83330
11813         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
11814         frame if argument is passed on stack.
11816 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11818         PR target/82682
11819         * ree.c (combine_reaching_defs): Optimize also
11820         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
11821         reg2=any_extend(exp); reg1=reg2;, formatting fix.
11823 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11825         PR middle-end/83189
11826         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
11828 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11830         PR middle-end/83718
11831         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
11832         after they are computed.
11834 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
11836         PR tree-optimization/83695
11837         * gimple-loop-linterchange.cc
11838         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
11839         reset cached scev information after interchange.
11840         (pass_linterchange::execute): Remove call to scev_reset_htab.
11842 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11844         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
11845         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
11846         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
11847         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
11848         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
11849         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
11850         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
11851         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
11852         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
11853         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
11854         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
11855         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
11856         (V_lane_reg): Likewise.
11857         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
11858         New define_expand.
11859         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
11860         (vfmal_lane_low<mode>_intrinsic,
11861         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
11862         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
11863         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
11864         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
11865         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
11866         vfmsl_lane_high<mode>_intrinsic): New define_insns.
11868 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11870         * config/arm/arm-cpus.in (fp16fml): New feature.
11871         (ALL_SIMD): Add fp16fml.
11872         (armv8.2-a): Add fp16fml as an option.
11873         (armv8.3-a): Likewise.
11874         (armv8.4-a): Add fp16fml as part of fp16.
11875         * config/arm/arm.h (TARGET_FP16FML): Define.
11876         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
11877         when appropriate.
11878         * config/arm/arm-modes.def (V2HF): Define.
11879         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
11880         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
11881         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
11882         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
11883         vfmsl_low, vfmsl_high): New set of builtins.
11884         * config/arm/iterators.md (PLUSMINUS): New code iterator.
11885         (vfml_op): New code attribute.
11886         (VFMLHALVES): New int iterator.
11887         (VFML, VFMLSEL): New mode attributes.
11888         (V_reg): Define mapping for V2HF.
11889         (V_hi, V_lo): New mode attributes.
11890         (VF_constraint): Likewise.
11891         (vfml_half, vfml_half_selector): New int attributes.
11892         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
11893         define_expand.
11894         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
11895         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
11896         New define_insn.
11897         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
11898         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
11899         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
11900         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
11901         documentation.
11902         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
11903         Document new effective target and option set.
11905 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11907         * config/arm/arm-cpus.in (armv8_4): New feature.
11908         (ARMv8_4a): New fgroup.
11909         (armv8.4-a): New arch.
11910         * config/arm/arm-tables.opt: Regenerate.
11911         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
11912         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
11913         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
11914         Add matching rules for -march=armv8.4-a and extensions.
11915         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
11917 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
11919         PR target/81821
11920         * config/rx/rx.md (BW): New mode attribute.
11921         (sync_lock_test_and_setsi): Add mode suffix to insn output.
11923 2018-01-11  Richard Biener  <rguenther@suse.de>
11925         PR tree-optimization/83435
11926         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
11927         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
11928         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
11930 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11931             Alan Hayward  <alan.hayward@arm.com>
11932             David Sherwood  <david.sherwood@arm.com>
11934         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
11935         field.
11936         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
11937         (aarch64_print_address_internal): Use it to check for a zero offset.
11939 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11940             Alan Hayward  <alan.hayward@arm.com>
11941             David Sherwood  <david.sherwood@arm.com>
11943         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
11944         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
11945         Return a poly_int64 rather than a HOST_WIDE_INT.
11946         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
11947         rather than a HOST_WIDE_INT.
11948         * config/aarch64/aarch64.h (aarch64_frame): Protect with
11949         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
11950         hard_fp_offset, frame_size, initial_adjust, callee_offset and
11951         final_offset from HOST_WIDE_INT to poly_int64.
11952         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
11953         to_constant when getting the number of units in an Advanced SIMD
11954         mode.
11955         (aarch64_builtin_vectorized_function): Check for a constant number
11956         of units.
11957         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
11958         GET_MODE_SIZE.
11959         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
11960         attribute instead of GET_MODE_NUNITS.
11961         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
11962         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
11963         GET_MODE_SIZE for fixed-size registers.
11964         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
11965         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
11966         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
11967         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
11968         (aarch64_print_operand, aarch64_print_address_internal)
11969         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
11970         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
11971         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
11972         Handle polynomial GET_MODE_SIZE.
11973         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
11974         wider than SImode without modification.
11975         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
11976         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
11977         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
11978         passing and returning SVE modes.
11979         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
11980         rather than GEN_INT.
11981         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
11982         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
11983         (aarch64_allocate_and_probe_stack_space): Likewise.
11984         (aarch64_layout_frame): Cope with polynomial offsets.
11985         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
11986         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
11987         polynomial offsets.
11988         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
11989         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
11990         poly_int64 rather than a HOST_WIDE_INT.
11991         (aarch64_get_separate_components, aarch64_process_components)
11992         (aarch64_expand_prologue, aarch64_expand_epilogue)
11993         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
11994         (aarch64_anchor_offset): New function, split out from...
11995         (aarch64_legitimize_address): ...here.
11996         (aarch64_builtin_vectorization_cost): Handle polynomial
11997         TYPE_VECTOR_SUBPARTS.
11998         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
11999         GET_MODE_NUNITS.
12000         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
12001         number of elements from the PARALLEL rather than the mode.
12002         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
12003         rather than GET_MODE_BITSIZE.
12004         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
12005         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
12006         (aarch64_expand_vec_perm_const_1): Handle polynomial
12007         d->perm.length () and d->perm elements.
12008         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
12009         Apply to_constant to d->perm elements.
12010         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
12011         polynomial CONST_VECTOR_NUNITS.
12012         (aarch64_move_pointer): Take amount as a poly_int64 rather
12013         than an int.
12014         (aarch64_progress_pointer): Avoid temporary variable.
12015         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
12016         the mode attribute instead of GET_MODE.
12018 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12019             Alan Hayward  <alan.hayward@arm.com>
12020             David Sherwood  <david.sherwood@arm.com>
12022         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
12023         x exists before using it.
12024         (aarch64_add_constant_internal): Rename to...
12025         (aarch64_add_offset_1): ...this.  Replace regnum with separate
12026         src and dest rtxes.  Handle the case in which they're different,
12027         including when the offset is zero.  Replace scratchreg with an rtx.
12028         Use 2 additions if there is no spare register into which we can
12029         move a 16-bit constant.
12030         (aarch64_add_constant): Delete.
12031         (aarch64_add_offset): Replace reg with separate src and dest
12032         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
12033         Use aarch64_add_offset_1.
12034         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
12035         an rtx rather than an int.  Take the delta as a poly_int64
12036         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
12037         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
12038         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
12039         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
12040         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
12041         and aarch64_add_sp.
12042         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
12043         aarch64_add_constant.
12045 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12047         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
12048         Use scalar_float_mode.
12050 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12052         * config/aarch64/aarch64-simd.md
12053         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
12054         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
12055         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
12056         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
12057         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
12058         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
12059         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
12060         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
12061         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
12062         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
12064 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12066         PR target/83514
12067         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
12068         targ_options->x_arm_arch_string is non NULL.
12070 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
12072         * config/aarch64/aarch64.h
12073         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
12075 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
12077         PR target/82096
12078         * expmed.c (emit_store_flag_force): Swap if const op0
12079         and change VOIDmode to mode of op0.
12081 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12083         PR rtl-optimization/83761
12084         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
12085         than bytes to mode_for_size.
12087 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12089         PR middle-end/83189
12090         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
12091         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
12092         profile.
12094 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12096         PR middle-end/83575
12097         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
12098         when in layout mode.
12099         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
12100         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
12101         partition fixup.
12103 2018-01-10  Michael Collison  <michael.collison@arm.com>
12105         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
12106         * config/aarch64/aarch64-option-extension.def: Add
12107         AARCH64_OPT_EXTENSION of 'fp16fml'.
12108         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12109         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
12110         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
12111         * config/aarch64/constraints.md (Ui7): New constraint.
12112         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
12113         (VFMLA_SEL_W): Ditto.
12114         (f16quad): Ditto.
12115         (f16mac1): Ditto.
12116         (VFMLA16_LOW): New int iterator.
12117         (VFMLA16_HIGH): Ditto.
12118         (UNSPEC_FMLAL): New unspec.
12119         (UNSPEC_FMLSL): Ditto.
12120         (UNSPEC_FMLAL2): Ditto.
12121         (UNSPEC_FMLSL2): Ditto.
12122         (f16mac): New code attribute.
12123         * config/aarch64/aarch64-simd-builtins.def
12124         (aarch64_fmlal_lowv2sf): Ditto.
12125         (aarch64_fmlsl_lowv2sf): Ditto.
12126         (aarch64_fmlalq_lowv4sf): Ditto.
12127         (aarch64_fmlslq_lowv4sf): Ditto.
12128         (aarch64_fmlal_highv2sf): Ditto.
12129         (aarch64_fmlsl_highv2sf): Ditto.
12130         (aarch64_fmlalq_highv4sf): Ditto.
12131         (aarch64_fmlslq_highv4sf): Ditto.
12132         (aarch64_fmlal_lane_lowv2sf): Ditto.
12133         (aarch64_fmlsl_lane_lowv2sf): Ditto.
12134         (aarch64_fmlal_laneq_lowv2sf): Ditto.
12135         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
12136         (aarch64_fmlalq_lane_lowv4sf): Ditto.
12137         (aarch64_fmlsl_lane_lowv4sf): Ditto.
12138         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
12139         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
12140         (aarch64_fmlal_lane_highv2sf): Ditto.
12141         (aarch64_fmlsl_lane_highv2sf): Ditto.
12142         (aarch64_fmlal_laneq_highv2sf): Ditto.
12143         (aarch64_fmlsl_laneq_highv2sf): Ditto.
12144         (aarch64_fmlalq_lane_highv4sf): Ditto.
12145         (aarch64_fmlsl_lane_highv4sf): Ditto.
12146         (aarch64_fmlalq_laneq_highv4sf): Ditto.
12147         (aarch64_fmlsl_laneq_highv4sf): Ditto.
12148         * config/aarch64/aarch64-simd.md:
12149         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
12150         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12151         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
12152         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12153         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
12154         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
12155         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
12156         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
12157         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
12158         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
12159         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
12160         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
12161         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
12162         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
12163         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
12164         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
12165         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
12166         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
12167         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
12168         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
12169         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
12170         (vfmlsl_low_u32): Ditto.
12171         (vfmlalq_low_u32): Ditto.
12172         (vfmlslq_low_u32): Ditto.
12173         (vfmlal_high_u32): Ditto.
12174         (vfmlsl_high_u32): Ditto.
12175         (vfmlalq_high_u32): Ditto.
12176         (vfmlslq_high_u32): Ditto.
12177         (vfmlal_lane_low_u32): Ditto.
12178         (vfmlsl_lane_low_u32): Ditto.
12179         (vfmlal_laneq_low_u32): Ditto.
12180         (vfmlsl_laneq_low_u32): Ditto.
12181         (vfmlalq_lane_low_u32): Ditto.
12182         (vfmlslq_lane_low_u32): Ditto.
12183         (vfmlalq_laneq_low_u32): Ditto.
12184         (vfmlslq_laneq_low_u32): Ditto.
12185         (vfmlal_lane_high_u32): Ditto.
12186         (vfmlsl_lane_high_u32): Ditto.
12187         (vfmlal_laneq_high_u32): Ditto.
12188         (vfmlsl_laneq_high_u32): Ditto.
12189         (vfmlalq_lane_high_u32): Ditto.
12190         (vfmlslq_lane_high_u32): Ditto.
12191         (vfmlalq_laneq_high_u32): Ditto.
12192         (vfmlslq_laneq_high_u32): Ditto.
12193         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
12194         (AARCH64_FL_FOR_ARCH8_4): New.
12195         (AARCH64_ISA_F16FML): New ISA flag.
12196         (TARGET_F16FML): New feature flag for fp16fml.
12197         (doc/invoke.texi): Document new fp16fml option.
12199 2018-01-10  Michael Collison  <michael.collison@arm.com>
12201         * config/aarch64/aarch64-builtins.c:
12202         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
12203         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12204         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
12205         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
12206         (AARCH64_ISA_SHA3): New ISA flag.
12207         (TARGET_SHA3): New feature flag for sha3.
12208         * config/aarch64/iterators.md (sha512_op): New int attribute.
12209         (CRYPTO_SHA512): New int iterator.
12210         (UNSPEC_SHA512H): New unspec.
12211         (UNSPEC_SHA512H2): Ditto.
12212         (UNSPEC_SHA512SU0): Ditto.
12213         (UNSPEC_SHA512SU1): Ditto.
12214         * config/aarch64/aarch64-simd-builtins.def
12215         (aarch64_crypto_sha512hqv2di): New builtin.
12216         (aarch64_crypto_sha512h2qv2di): Ditto.
12217         (aarch64_crypto_sha512su0qv2di): Ditto.
12218         (aarch64_crypto_sha512su1qv2di): Ditto.
12219         (aarch64_eor3qv8hi): Ditto.
12220         (aarch64_rax1qv2di): Ditto.
12221         (aarch64_xarqv2di): Ditto.
12222         (aarch64_bcaxqv8hi): Ditto.
12223         * config/aarch64/aarch64-simd.md:
12224         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
12225         (aarch64_crypto_sha512su0qv2di): Ditto.
12226         (aarch64_crypto_sha512su1qv2di): Ditto.
12227         (aarch64_eor3qv8hi): Ditto.
12228         (aarch64_rax1qv2di): Ditto.
12229         (aarch64_xarqv2di): Ditto.
12230         (aarch64_bcaxqv8hi): Ditto.
12231         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
12232         (vsha512h2q_u64): Ditto.
12233         (vsha512su0q_u64): Ditto.
12234         (vsha512su1q_u64): Ditto.
12235         (veor3q_u16): Ditto.
12236         (vrax1q_u64): Ditto.
12237         (vxarq_u64): Ditto.
12238         (vbcaxq_u16): Ditto.
12239         * config/arm/types.md (crypto_sha512): New type attribute.
12240         (crypto_sha3): Ditto.
12241         (doc/invoke.texi): Document new sha3 option.
12243 2018-01-10  Michael Collison  <michael.collison@arm.com>
12245         * config/aarch64/aarch64-builtins.c:
12246         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12247         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12248         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12249         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12250         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12251         (AARCH64_ISA_SM4): New ISA flag.
12252         (TARGET_SM4): New feature flag for sm4.
12253         * config/aarch64/aarch64-simd-builtins.def
12254         (aarch64_sm3ss1qv4si): Ditto.
12255         (aarch64_sm3tt1aq4si): Ditto.
12256         (aarch64_sm3tt1bq4si): Ditto.
12257         (aarch64_sm3tt2aq4si): Ditto.
12258         (aarch64_sm3tt2bq4si): Ditto.
12259         (aarch64_sm3partw1qv4si): Ditto.
12260         (aarch64_sm3partw2qv4si): Ditto.
12261         (aarch64_sm4eqv4si): Ditto.
12262         (aarch64_sm4ekeyqv4si): Ditto.
12263         * config/aarch64/aarch64-simd.md:
12264         (aarch64_sm3ss1qv4si): Ditto.
12265         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12266         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12267         (aarch64_sm4eqv4si): Ditto.
12268         (aarch64_sm4ekeyqv4si): Ditto.
12269         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12270         (sm3part_op): Ditto.
12271         (CRYPTO_SM3TT): Ditto.
12272         (CRYPTO_SM3PART): Ditto.
12273         (UNSPEC_SM3SS1): New unspec.
12274         (UNSPEC_SM3TT1A): Ditto.
12275         (UNSPEC_SM3TT1B): Ditto.
12276         (UNSPEC_SM3TT2A): Ditto.
12277         (UNSPEC_SM3TT2B): Ditto.
12278         (UNSPEC_SM3PARTW1): Ditto.
12279         (UNSPEC_SM3PARTW2): Ditto.
12280         (UNSPEC_SM4E): Ditto.
12281         (UNSPEC_SM4EKEY): Ditto.
12282         * config/aarch64/constraints.md (Ui2): New constraint.
12283         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12284         * config/arm/types.md (crypto_sm3): New type attribute.
12285         (crypto_sm4): Ditto.
12286         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12287         (vsm3tt1aq_u32): Ditto.
12288         (vsm3tt1bq_u32): Ditto.
12289         (vsm3tt2aq_u32): Ditto.
12290         (vsm3tt2bq_u32): Ditto.
12291         (vsm3partw1q_u32): Ditto.
12292         (vsm3partw2q_u32): Ditto.
12293         (vsm4eq_u32): Ditto.
12294         (vsm4ekeyq_u32): Ditto.
12295         (doc/invoke.texi): Document new sm4 option.
12297 2018-01-10  Michael Collison  <michael.collison@arm.com>
12299         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
12300         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
12301         (AARCH64_FL_FOR_ARCH8_4): New.
12302         (AARCH64_FL_V8_4): New flag.
12303         (doc/invoke.texi): Document new armv8.4-a option.
12305 2018-01-10  Michael Collison  <michael.collison@arm.com>
12307         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12308         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
12309         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
12310         * config/aarch64/aarch64-option-extension.def: Add
12311         AARCH64_OPT_EXTENSION of 'sha2'.
12312         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
12313         (crypto): Disable sha2 and aes if crypto disabled.
12314         (crypto): Enable aes and sha2 if enabled.
12315         (simd): Disable sha2 and aes if simd disabled.
12316         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
12317         New flags.
12318         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
12319         (TARGET_SHA2): New feature flag for sha2.
12320         (TARGET_AES): New feature flag for aes.
12321         * config/aarch64/aarch64-simd.md:
12322         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
12323         conditional on TARGET_AES.
12324         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
12325         (aarch64_crypto_sha1hsi): Make pattern conditional
12326         on TARGET_SHA2.
12327         (aarch64_crypto_sha1hv4si): Ditto.
12328         (aarch64_be_crypto_sha1hv4si): Ditto.
12329         (aarch64_crypto_sha1su1v4si): Ditto.
12330         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
12331         (aarch64_crypto_sha1su0v4si): Ditto.
12332         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
12333         (aarch64_crypto_sha256su0v4si): Ditto.
12334         (aarch64_crypto_sha256su1v4si): Ditto.
12335         (doc/invoke.texi): Document new aes and sha2 options.
12337 2018-01-10  Martin Sebor  <msebor@redhat.com>
12339         PR tree-optimization/83781
12340         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
12341         as string arrays.
12343 2018-01-11  Martin Sebor  <msebor@gmail.com>
12344             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12346         PR tree-optimization/83501
12347         PR tree-optimization/81703
12349         * tree-ssa-strlen.c (get_string_cst): Rename...
12350         (get_string_len): ...to this.  Handle global constants.
12351         (handle_char_store): Adjust.
12353 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
12354             Jim Wilson  <jimw@sifive.com>
12356         * config/riscv/riscv-protos.h (riscv_output_return): New.
12357         * config/riscv/riscv.c (struct machine_function): New naked_p field.
12358         (riscv_attribute_table, riscv_output_return),
12359         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12360         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12361         (riscv_compute_frame_info): Only compute frame->mask if not a naked
12362         function.
12363         (riscv_expand_prologue): Add early return for naked function.
12364         (riscv_expand_epilogue): Likewise.
12365         (riscv_function_ok_for_sibcall): Return false for naked function.
12366         (riscv_set_current_function): New.
12367         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12368         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12369         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12370         * doc/extend.texi (RISC-V Function Attributes): New.
12372 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12374         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12375         check for 128-bit long double before checking TCmode.
12376         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12377         128-bit long doubles before checking TFmode or TCmode.
12378         (FLOAT128_IBM_P): Likewise.
12380 2018-01-10  Martin Sebor  <msebor@redhat.com>
12382         PR tree-optimization/83671
12383         * builtins.c (c_strlen): Unconditionally return zero for the empty
12384         string.
12385         Use -Warray-bounds for warnings.
12386         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12387         for non-constant array indices with COMPONENT_REF, arrays of
12388         arrays, and pointers to arrays.
12389         (gimple_fold_builtin_strlen): Determine and set length range for
12390         non-constant character arrays.
12392 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
12394         PR middle-end/81897
12395         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12396         empty blocks.
12398 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
12400         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12402 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12404         PR target/83399
12405         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12406         VECTOR_MEM_ALTIVEC_OR_VSX_P.
12407         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12408         indexed_or_indirect_operand predicate.
12409         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12410         (*vsx_le_perm_load_v8hi): Likewise.
12411         (*vsx_le_perm_load_v16qi): Likewise.
12412         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12413         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12414         (*vsx_le_perm_store_v8hi): Likewise.
12415         (*vsx_le_perm_store_v16qi): Likewise.
12416         (eight unnamed splitters): Likewise.
12418 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12420         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12421         * config/rs6000/emmintrin.h: Likewise.
12422         * config/rs6000/mmintrin.h: Likewise.
12423         * config/rs6000/xmmintrin.h: Likewise.
12425 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
12427         PR c++/43486
12428         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12429         "public_flag".
12430         * tree.c (tree_nop_conversion): Return true for location wrapper
12431         nodes.
12432         (maybe_wrap_with_location): New function.
12433         (selftest::check_strip_nops): New function.
12434         (selftest::test_location_wrappers): New function.
12435         (selftest::tree_c_tests): Call it.
12436         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12437         (maybe_wrap_with_location): New decl.
12438         (EXPR_LOCATION_WRAPPER_P): New macro.
12439         (location_wrapper_p): New inline function.
12440         (tree_strip_any_location_wrapper): New inline function.
12442 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
12444         PR target/83735
12445         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12446         stack_realign_offset for the largest alignment of stack slot
12447         actually used.
12448         (ix86_find_max_used_stack_alignment): New function.
12449         (ix86_finalize_stack_frame_flags): Use it.  Set
12450         max_used_stack_alignment if we don't realign stack.
12451         * config/i386/i386.h (machine_function): Add
12452         max_used_stack_alignment.
12454 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
12456         * config/arm/arm.opt (-mbranch-cost): New option.
12457         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12458         account.
12460 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
12462         PR target/83629
12463         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12464         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12466 2018-01-10  Richard Biener  <rguenther@suse.de>
12468         PR debug/83765
12469         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12470         early out so it also covers the case where we have a non-NULL
12471         origin.
12473 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12475         PR tree-optimization/83753
12476         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12477         for non-strided grouped accesses if the number of elements is 1.
12479 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12481         PR target/81616
12482         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12483         * i386.h (TARGET_USE_GATHER): Define.
12484         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12486 2018-01-10  Martin Liska  <mliska@suse.cz>
12488         PR bootstrap/82831
12489         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12490         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12491         partitioning.
12492         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12493         CLEANUP_NO_PARTITIONING is not set.
12495 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12497         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12498         for vectors, as a partial revert of r254296.
12499         * rtl.h (const_vec_p): Delete.
12500         (const_vec_duplicate_p): Don't test for vector CONSTs.
12501         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12502         * expmed.c (make_tree): Likewise.
12504         Revert:
12505         * common.md (E, F): Use CONSTANT_P instead of checking for
12506         CONST_VECTOR.
12507         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12508         checking for CONST_VECTOR.
12510 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12512         PR middle-end/83575
12513         * predict.c (force_edge_cold): Handle in more sane way edges
12514         with no prediction.
12516 2018-01-09  Carl Love  <cel@us.ibm.com>
12518         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12519         V4SI, V4SF types.
12520         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12521         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12522         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12523         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12524         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12525         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12526         * config/rs6000/rs6000-protos.h: Add extern defition for
12527         rs6000_generate_float2_double_code.
12528         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12529         function.
12530         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12531         (float2_v2df): Add define_expand.
12533 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12535         PR target/83628
12536         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12537         op_mode in the force_to_mode call.
12539 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12541         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12542         instead of checking each element individually.
12543         (aarch64_evpc_uzp): Likewise.
12544         (aarch64_evpc_zip): Likewise.
12545         (aarch64_evpc_ext): Likewise.
12546         (aarch64_evpc_rev): Likewise.
12547         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12548         instead of checking each element individually.  Return true without
12549         generating rtl if
12550         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12551         whether all selected elements come from the same input, instead of
12552         checking each element individually.  Remove calls to gen_rtx_REG,
12553         start_sequence and end_sequence and instead assert that no rtl is
12554         generated.
12556 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12558         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12559         order of HIGH and CONST checks.
12561 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12563         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12564         if the destination isn't an SSA_NAME.
12566 2018-01-09  Richard Biener  <rguenther@suse.de>
12568         PR tree-optimization/83668
12569         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12570         move prologue...
12571         (canonicalize_loop_form): ... here, renamed from ...
12572         (canonicalize_loop_closed_ssa_form): ... this and amended to
12573         swap successor edges for loop exit blocks to make us use
12574         the RPO order we need for initial schedule generation.
12576 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12578         PR tree-optimization/64811
12579         * match.pd: When optimizing comparisons with Inf, avoid
12580         introducing or losing exceptions from comparisons with NaN.
12582 2018-01-09  Martin Liska  <mliska@suse.cz>
12584         PR sanitizer/82517
12585         * asan.c (shadow_mem_size): Add gcc_assert.
12587 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12589         Don't save registers in main().
12591         PR target/83738
12592         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12593         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12594         * config/avr/avr.c (avr_set_current_function): Don't error if
12595         naked, OS_task or OS_main are specified at the same time.
12596         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12597         OS_main.
12598         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12599         attribute.
12600         * common/config/avr/avr-common.c (avr_option_optimization_table):
12601         Switch on -mmain-is-OS_task for optimizing compilations.
12603 2018-01-09  Richard Biener  <rguenther@suse.de>
12605         PR tree-optimization/83572
12606         * graphite.c: Include cfganal.h.
12607         (graphite_transform_loops): Connect infinite loops to exit
12608         and remove fake edges at the end.
12610 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12612         * ipa-inline.c (edge_badness): Revert accidental checkin.
12614 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12616         PR ipa/80763
12617         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12618         symbols; not inline clones.
12620 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12622         PR target/83507
12623         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12624         hard registers.  Formatting fixes.
12626         PR preprocessor/83722
12627         * gcc.c (try_generate_repro): Pass
12628         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12629         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12630         do_report_bug.
12632 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12633             Kito Cheng  <kito.cheng@gmail.com>
12635         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12636         (riscv_leaf_function_p): Delete.
12637         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12639 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12641         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12642         function.
12643         (do_ifelse): New function.
12644         (do_isel): New function.
12645         (do_sub3): New function.
12646         (do_add3): New function.
12647         (do_load_mask_compare): New function.
12648         (do_overlap_load_compare): New function.
12649         (expand_compare_loop): New function.
12650         (expand_block_compare): Call expand_compare_loop() when appropriate.
12651         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12652         option description.
12653         (-mblock-compare-inline-loop-limit): New option.
12655 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12657         PR target/83677
12658         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12659         Reverse order of second and third operands in first alternative.
12660         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12661         of first and second elements in UNSPEC_VPERMR vector.
12662         (altivec_expand_vec_perm_le): Likewise.
12664 2018-01-08  Jeff Law  <law@redhat.com>
12666         PR rtl-optimizatin/81308
12667         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12668         (process_switch): If group_case_labels makes a change, then set
12669         cfg_altered.
12670         (pass_convert_switch::execute): If a switch is converted, then
12671         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12673         PR rtl-optimization/81308
12674         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12675         splitting insns.
12677 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12679         PR target/83663 - Revert r255946
12680         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12681         generation for cases where splatting a value is not useful.
12682         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12683         across a vec_duplicate and a paradoxical subreg forming a vector
12684         mode to a vec_concat.
12686 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12688         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12689         -march=armv8.3-a variants.
12690         * config/arm/t-multilib: Likewise.
12691         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12693 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12695         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12696         to generate rtl.
12697         (cceq_ior_compare_complement): Give it a name so I can use it, and
12698         change boolean_or_operator predicate to boolean_operator so it can
12699         be used to generate a crand.
12700         (eqne): New code iterator.
12701         (bd/bd_neg): New code_attrs.
12702         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12703         a single define_insn.
12704         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12705         decrement (bdnzt/bdnzf/bdzt/bdzf).
12706         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12707         with the new names of the branch decrement patterns, and added the
12708         names of the branch decrement conditional patterns.
12710 2018-01-08  Richard Biener  <rguenther@suse.de>
12712         PR tree-optimization/83563
12713         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12714         cache.
12716 2018-01-08  Richard Biener  <rguenther@suse.de>
12718         PR middle-end/83713
12719         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12721 2018-01-08  Richard Biener  <rguenther@suse.de>
12723         PR tree-optimization/83685
12724         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12725         references to abnormals.
12727 2018-01-08  Richard Biener  <rguenther@suse.de>
12729         PR lto/83719
12730         * dwarf2out.c (output_indirect_strings): Handle empty
12731         skeleton_debug_str_hash.
12732         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12734 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12736         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12737         (emit_store_direct): Likewise.
12738         (arc_trampoline_adjust_address): Likewise.
12739         (arc_asm_trampoline_template): New function.
12740         (arc_initialize_trampoline): Use asm_trampoline_template.
12741         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12742         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12743         * config/arc/arc.md (flush_icache): Delete pattern.
12745 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12747         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12748         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12749         munaligned-access.
12751 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12753         PR target/83681
12754         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12755         by not USED_FOR_TARGET.
12756         (make_pass_resolve_sw_modes): Likewise.
12758 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12760         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12761         USED_FOR_TARGET.
12763 2018-01-08  Richard Biener  <rguenther@suse.de>
12765         PR middle-end/83580
12766         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12768 2018-01-08  Richard Biener  <rguenther@suse.de>
12770         PR middle-end/83517
12771         * match.pd ((t * 2) / 2) -> t): Add missing :c.
12773 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
12775         PR middle-end/81897
12776         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12777         basic blocks with a small number of successors.
12778         (convert_control_dep_chain_into_preds): Improve handling of
12779         forwarder blocks.
12780         (dump_predicates): Split apart into...
12781         (dump_pred_chain): ...here...
12782         (dump_pred_info): ...and here.
12783         (can_one_predicate_be_invalidated_p): Add debugging printfs.
12784         (can_chain_union_be_invalidated_p): Improve check for invalidation
12785         of paths.
12786         (uninit_uses_cannot_happen): Avoid unnecessary if
12787         convert_control_dep_chain_into_preds yielded nothing.
12789 2018-01-06  Martin Sebor  <msebor@redhat.com>
12791         PR tree-optimization/83640
12792         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
12793         subtracting negative offset from size.
12794         (builtin_access::overlap): Adjust offset bounds of the access to fall
12795         within the size of the object if possible.
12797 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
12799         PR rtl-optimization/83699
12800         * expmed.c (extract_bit_field_1): Restrict the vector usage of
12801         extract_bit_field_as_subreg to cases in which the extracted
12802         value is also a vector.
12804         * lra-constraints.c (process_alt_operands): Test for the equivalence
12805         substitutions when detecting a possible reload cycle.
12807 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
12809         PR debug/83480
12810         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
12811         by default if flag_selective_schedling{,2}.  Formatting fixes.
12813         PR rtl-optimization/83682
12814         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
12815         if it has non-VECTOR_MODE element mode.
12816         (vec_duplicate_p): Likewise.
12818         PR middle-end/83694
12819         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
12820         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
12822 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12824         PR target/83604
12825         * config/i386/i386-builtin.def
12826         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
12827         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
12828         Require also OPTION_MASK_ISA_AVX512F in addition to
12829         OPTION_MASK_ISA_GFNI.
12830         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
12831         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
12832         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
12833         to OPTION_MASK_ISA_GFNI.
12834         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
12835         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
12836         OPTION_MASK_ISA_AVX512BW.
12837         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
12838         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
12839         addition to OPTION_MASK_ISA_GFNI.
12840         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
12841         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
12842         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
12843         to OPTION_MASK_ISA_GFNI.
12844         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
12845         a requirement for all ISAs rather than any of them with a few
12846         exceptions.
12847         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
12848         processing.
12849         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
12850         bitmasks to be enabled with 3 exceptions, instead of requiring any
12851         enabled ISA with lots of exceptions.
12852         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
12853         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
12854         Change avx512bw in isa attribute to avx512f.
12855         * config/i386/sgxintrin.h: Add license boilerplate.
12856         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
12857         to __AVX512F__ and __AVX512VL to __AVX512VL__.
12858         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
12859         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
12860         defined.
12861         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
12862         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
12863         temporarily sse2 rather than sse if not enabled already.
12865         PR target/83604
12866         * config/i386/sse.md (VI248_VLBW): Rename to ...
12867         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
12868         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
12869         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
12870         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
12871         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
12872         mode iterator instead of VI248_VLBW.
12874 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
12876         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
12877         (record_modified): Skip clobbers; add debug output.
12878         (param_change_prob): Use sreal frequencies.
12880 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12882         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
12883         punt for user-aligned variables.
12885 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12887         * tree-chrec.c (chrec_contains_symbols): Return true for
12888         POLY_INT_CST.
12890 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
12892         PR target/82439
12893         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
12894         of (x|y) == x for BICS pattern.
12896 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12898         PR tree-optimization/83605
12899         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
12900         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
12901         can throw.
12903 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12905         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
12906         * config/epiphany/rtems.h: New file.
12908 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12909             Uros Bizjak  <ubizjak@gmail.com>
12911         PR target/83554
12912         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
12913         QIreg_operand instead of register_operand predicate.
12914         * config/i386/i386.c (ix86_rop_should_change_byte_p,
12915         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
12916         comments instead of -fmitigate[-_]rop.
12918 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12920         PR bootstrap/81926
12921         * cgraphunit.c (symbol_table::compile): Switch to text_section
12922         before calling assembly_start debug hook.
12923         * run-rtl-passes.c (run_rtl_passes): Likewise.
12924         Include output.h.
12926 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12928         * tree-vrp.c (extract_range_from_binary_expr_1): Check
12929         range_int_cst_p rather than !symbolic_range_p before calling
12930         extract_range_from_multiplicative_op_1.
12932 2018-01-04  Jeff Law  <law@redhat.com>
12934         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
12935         redundant test in assertion.
12937 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12939         * doc/rtl.texi: Document machine_mode wrapper classes.
12941 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12943         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
12944         using tree_to_uhwi.
12946 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12948         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
12949         the VEC_PERM_EXPR fold to fail.
12951 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12953         PR debug/83585
12954         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
12955         to switched_sections.
12957 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12959         PR target/83680
12960         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
12961         test for d.testing.
12963 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
12965         PR target/83387
12966         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
12967         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
12969 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12971         PR debug/83666
12972         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
12973         is BLKmode and bitpos not zero or mode change is needed.
12975 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12977         PR target/83675
12978         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
12979         TARGET_VIS2.
12981 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
12983         PR target/83628
12984         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
12985         instead of MULT rtx.  Update all corresponding splitters.
12986         (*saddl_se): Ditto.
12987         (*ssub<modesuffix>): Ditto.
12988         (*ssubl_se): Ditto.
12989         (*cmp_sadd_di): Update split patterns.
12990         (*cmp_sadd_si): Ditto.
12991         (*cmp_sadd_sidi): Ditto.
12992         (*cmp_ssub_di): Ditto.
12993         (*cmp_ssub_si): Ditto.
12994         (*cmp_ssub_sidi): Ditto.
12995         * config/alpha/predicates.md (const23_operand): New predicate.
12996         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
12997         Look for ASHIFT, not MULT inner operand.
12998         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
13000 2018-01-04  Martin Liska  <mliska@suse.cz>
13002         PR gcov-profile/83669
13003         * gcov.c (output_intermediate_file): Add version to intermediate
13004         gcov file.
13005         * doc/gcov.texi: Document new field 'version' in intermediate
13006         file format. Fix location of '-k' option of gcov command.
13008 2018-01-04  Martin Liska  <mliska@suse.cz>
13010         PR ipa/82352
13011         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
13013 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13015         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
13017 2018-01-03  Martin Sebor  <msebor@redhat.com>
13019         PR tree-optimization/83655
13020         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
13021         checking calls with invalid arguments.
13023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13025         * tree-vect-stmts.c (vect_get_store_rhs): New function.
13026         (vectorizable_mask_load_store): Delete.
13027         (vectorizable_call): Return false for masked loads and stores.
13028         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
13029         instead of gimple_assign_rhs1.
13030         (vectorizable_load): Handle IFN_MASK_LOAD.
13031         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
13033 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13035         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
13036         split out from..,
13037         (vectorizable_mask_load_store): ...here.
13038         (vectorizable_load): ...and here.
13040 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13042         * tree-vect-stmts.c (vect_build_all_ones_mask)
13043         (vect_build_zero_merge_argument): New functions, split out from...
13044         (vectorizable_load): ...here.
13046 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13048         * tree-vect-stmts.c (vect_check_store_rhs): New function,
13049         split out from...
13050         (vectorizable_mask_load_store): ...here.
13051         (vectorizable_store): ...and here.
13053 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13055         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
13056         split out from...
13057         (vectorizable_mask_load_store): ...here.
13059 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13061         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
13062         (vect_model_store_cost): Take a vec_load_store_type instead of a
13063         vect_def_type.
13064         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
13065         (vect_model_store_cost): Take a vec_load_store_type instead of a
13066         vect_def_type.
13067         (vectorizable_mask_load_store): Update accordingly.
13068         (vectorizable_store): Likewise.
13069         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
13071 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13073         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
13074         IFN_MASK_LOAD calls here rather than...
13075         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
13077 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13078             Alan Hayward  <alan.hayward@arm.com>
13079             David Sherwood  <david.sherwood@arm.com>
13081         * expmed.c (extract_bit_field_1): For vector extracts,
13082         fall back to extract_bit_field_as_subreg if vec_extract
13083         isn't available.
13085 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13086             Alan Hayward  <alan.hayward@arm.com>
13087             David Sherwood  <david.sherwood@arm.com>
13089         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
13090         they are variable or constant sized.
13091         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
13092         slots for constant-sized data.
13094 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13095             Alan Hayward  <alan.hayward@arm.com>
13096             David Sherwood  <david.sherwood@arm.com>
13098         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
13099         handling COND_EXPRs with boolean comparisons, try to find a better
13100         basis for the mask type than the boolean itself.
13102 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13104         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
13105         is calculated and how it can be overridden.
13106         * genmodes.c (max_bitsize_mode_any_mode): New variable.
13107         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
13108         if defined.
13109         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
13110         if nonzero.
13112 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13113             Alan Hayward  <alan.hayward@arm.com>
13114             David Sherwood  <david.sherwood@arm.com>
13116         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
13117         Remove the mode argument.
13118         (aarch64_simd_valid_immediate): Remove the mode and inverse
13119         arguments.
13120         * config/aarch64/iterators.md (bitsize): New iterator.
13121         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
13122         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
13123         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
13124         aarch64_simd_valid_immediate.
13125         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
13126         (aarch64_reg_or_bic_imm): Likewise.
13127         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
13128         with an insn_type enum and msl with a modifier_type enum.
13129         Replace element_width with a scalar_mode.  Change the shift
13130         to unsigned int.  Add constructors for scalar_float_mode and
13131         scalar_int_mode elements.
13132         (aarch64_vect_float_const_representable_p): Delete.
13133         (aarch64_can_const_movi_rtx_p)
13134         (aarch64_simd_scalar_immediate_valid_for_move)
13135         (aarch64_simd_make_constant): Update call to
13136         aarch64_simd_valid_immediate.
13137         (aarch64_advsimd_valid_immediate_hs): New function.
13138         (aarch64_advsimd_valid_immediate): Likewise.
13139         (aarch64_simd_valid_immediate): Remove mode and inverse
13140         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
13141         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
13142         and aarch64_float_const_representable_p on the result.
13143         (aarch64_output_simd_mov_immediate): Remove mode argument.
13144         Update call to aarch64_simd_valid_immediate and use of
13145         simd_immediate_info.
13146         (aarch64_output_scalar_simd_mov_immediate): Update call
13147         accordingly.
13149 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13150             Alan Hayward  <alan.hayward@arm.com>
13151             David Sherwood  <david.sherwood@arm.com>
13153         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
13154         (mode_nunits): Likewise CONST_MODE_NUNITS.
13155         * machmode.def (ADJUST_NUNITS): Document.
13156         * genmodes.c (mode_data::need_nunits_adj): New field.
13157         (blank_mode): Update accordingly.
13158         (adj_nunits): New variable.
13159         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
13160         parameter.
13161         (emit_mode_size_inline): Set need_bytesize_adj for all modes
13162         listed in adj_nunits.
13163         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
13164         listed in adj_nunits.  Don't emit case statements for such modes.
13165         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
13166         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
13167         nothing if adj_nunits is nonnull.
13168         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
13169         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
13170         (emit_mode_fbit): Update use of print_maybe_const_decl.
13171         (emit_move_size): Likewise.  Treat the array as non-const
13172         if adj_nunits.
13173         (emit_mode_adjustments): Handle adj_nunits.
13175 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13177         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
13178         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
13179         (VECTOR_MODES): Use it.
13180         (make_vector_modes): Take the prefix as an argument.
13182 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13183             Alan Hayward  <alan.hayward@arm.com>
13184             David Sherwood  <david.sherwood@arm.com>
13186         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
13187         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
13188         for MODE_VECTOR_BOOL.
13189         * machmode.def (VECTOR_BOOL_MODE): Document.
13190         * genmodes.c (VECTOR_BOOL_MODE): New macro.
13191         (make_vector_bool_mode): New function.
13192         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
13193         MODE_VECTOR_BOOL.
13194         * lto-streamer-in.c (lto_input_mode_table): Likewise.
13195         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
13196         Likewise.
13197         * stor-layout.c (int_mode_for_mode): Likewise.
13198         * tree.c (build_vector_type_for_mode): Likewise.
13199         * varasm.c (output_constant_pool_2): Likewise.
13200         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
13201         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
13202         for MODE_VECTOR_BOOL.
13203         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
13204         of mode class checks.
13205         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
13206         instead of a list of mode class checks.
13207         (expand_vector_scalar_condition): Likewise.
13208         (type_for_widest_vector_mode): Handle BImode as an inner mode.
13210 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13211             Alan Hayward  <alan.hayward@arm.com>
13212             David Sherwood  <david.sherwood@arm.com>
13214         * machmode.h (mode_size): Change from unsigned short to
13215         poly_uint16_pod.
13216         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
13217         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13218         or if measurement_type is not polynomial.
13219         (fixed_size_mode::includes_p): Check for constant-sized modes.
13220         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
13221         return a poly_uint16 rather than an unsigned short.
13222         (emit_mode_size): Change the type of mode_size from unsigned short
13223         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
13224         (emit_mode_adjustments): Cope with polynomial vector sizes.
13225         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13226         for GET_MODE_SIZE.
13227         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13228         for GET_MODE_SIZE.
13229         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
13230         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
13231         * caller-save.c (setup_save_areas): Likewise.
13232         (replace_reg_with_saved_mem): Likewise.
13233         * calls.c (emit_library_call_value_1): Likewise.
13234         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
13235         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
13236         (gen_lowpart_for_combine): Likewise.
13237         * convert.c (convert_to_integer_1): Likewise.
13238         * cse.c (equiv_constant, cse_insn): Likewise.
13239         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
13240         (cselib_subst_to_values): Likewise.
13241         * dce.c (word_dce_process_block): Likewise.
13242         * df-problems.c (df_word_lr_mark_ref): Likewise.
13243         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13244         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13245         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13246         (rtl_for_decl_location): Likewise.
13247         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13248         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13249         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13250         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13251         (expand_expr_real_1): Likewise.
13252         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13253         (pad_below): Likewise.
13254         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13255         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13256         * ira.c (get_subreg_tracking_sizes): Likewise.
13257         * ira-build.c (ira_create_allocno_objects): Likewise.
13258         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13259         (ira_sort_regnos_for_alter_reg): Likewise.
13260         * ira-costs.c (record_operand_costs): Likewise.
13261         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13262         (resolve_simple_move): Likewise.
13263         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13264         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13265         (lra_constraints): Likewise.
13266         (CONST_POOL_OK_P): Reject variable-sized modes.
13267         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13268         (add_pseudo_to_slot, lra_spill): Likewise.
13269         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13270         * optabs-query.c (get_best_extraction_insn): Likewise.
13271         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13272         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13273         (expand_mult_highpart, valid_multiword_target_p): Likewise.
13274         * recog.c (offsettable_address_addr_space_p): Likewise.
13275         * regcprop.c (maybe_mode_change): Likewise.
13276         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13277         * regrename.c (build_def_use): Likewise.
13278         * regstat.c (dump_reg_info): Likewise.
13279         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13280         (find_reloads, find_reloads_subreg_address): Likewise.
13281         * reload1.c (eliminate_regs_1): Likewise.
13282         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13283         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13284         (simplify_binary_operation_1, simplify_subreg): Likewise.
13285         * targhooks.c (default_function_arg_padding): Likewise.
13286         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13287         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13288         (verify_gimple_assign_ternary): Likewise.
13289         * tree-inline.c (estimate_move_cost): Likewise.
13290         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13291         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
13292         (get_address_cost_ainc): Likewise.
13293         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
13294         (vect_supportable_dr_alignment): Likewise.
13295         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13296         (vectorizable_reduction): Likewise.
13297         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
13298         (vectorizable_operation, vectorizable_load): Likewise.
13299         * tree.c (build_same_sized_truth_vector_type): Likewise.
13300         * valtrack.c (cleanup_auto_inc_dec): Likewise.
13301         * var-tracking.c (emit_note_insn_var_location): Likewise.
13302         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
13303         (ADDR_VEC_ALIGN): Likewise.
13305 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13306             Alan Hayward  <alan.hayward@arm.com>
13307             David Sherwood  <david.sherwood@arm.com>
13309         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
13310         unsigned short.
13311         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13312         or if measurement_type is polynomial.
13313         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
13314         * combine.c (make_extraction): Likewise.
13315         * dse.c (find_shift_sequence): Likewise.
13316         * dwarf2out.c (mem_loc_descriptor): Likewise.
13317         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
13318         (extract_bit_field, extract_low_bits): Likewise.
13319         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
13320         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
13321         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
13322         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
13323         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13324         * reload.c (find_reloads): Likewise.
13325         * reload1.c (alter_reg): Likewise.
13326         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
13327         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
13328         * tree-if-conv.c (predicate_mem_writes): Likewise.
13329         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13330         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
13331         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13332         * valtrack.c (dead_debug_insert_temp): Likewise.
13333         * varasm.c (mergeable_constant_section): Likewise.
13334         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
13336 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13337             Alan Hayward  <alan.hayward@arm.com>
13338             David Sherwood  <david.sherwood@arm.com>
13340         * expr.c (expand_assignment): Cope with polynomial mode sizes
13341         when assigning to a CONCAT.
13343 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13344             Alan Hayward  <alan.hayward@arm.com>
13345             David Sherwood  <david.sherwood@arm.com>
13347         * machmode.h (mode_precision): Change from unsigned short to
13348         poly_uint16_pod.
13349         (mode_to_precision): Return a poly_uint16 rather than an unsigned
13350         short.
13351         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
13352         or if measurement_type is not polynomial.
13353         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
13354         in which the mode is already known to be a scalar_int_mode.
13355         * genmodes.c (emit_mode_precision): Change the type of mode_precision
13356         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
13357         initializer.
13358         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13359         for GET_MODE_PRECISION.
13360         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13361         for GET_MODE_PRECISION.
13362         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13363         as polynomial.
13364         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13365         (expand_field_assignment, make_extraction): Likewise.
13366         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13367         (get_last_value): Likewise.
13368         * convert.c (convert_to_integer_1): Likewise.
13369         * cse.c (cse_insn): Likewise.
13370         * expr.c (expand_expr_real_1): Likewise.
13371         * lra-constraints.c (simplify_operand_subreg): Likewise.
13372         * optabs-query.c (can_atomic_load_p): Likewise.
13373         * optabs.c (expand_atomic_load): Likewise.
13374         (expand_atomic_store): Likewise.
13375         * ree.c (combine_reaching_defs): Likewise.
13376         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13377         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13378         * tree.h (type_has_mode_precision_p): Likewise.
13379         * ubsan.c (instrument_si_overflow): Likewise.
13381 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13382             Alan Hayward  <alan.hayward@arm.com>
13383             David Sherwood  <david.sherwood@arm.com>
13385         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13386         polynomial numbers of units.
13387         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13388         (valid_vector_subparts_p): New function.
13389         (build_vector_type): Remove temporary shim and take the number
13390         of units as a poly_uint64 rather than an int.
13391         (build_opaque_vector_type): Take the number of units as a
13392         poly_uint64 rather than an int.
13393         * tree.c (build_vector_from_ctor): Handle polynomial
13394         TYPE_VECTOR_SUBPARTS.
13395         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13396         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13397         (build_vector_from_val): If the number of units is variable,
13398         use build_vec_duplicate_cst for constant operands and
13399         VEC_DUPLICATE_EXPR otherwise.
13400         (make_vector_type): Remove temporary is_constant ().
13401         (build_vector_type, build_opaque_vector_type): Take the number of
13402         units as a poly_uint64 rather than an int.
13403         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13404         VECTOR_CST_NELTS.
13405         * cfgexpand.c (expand_debug_expr): Likewise.
13406         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13407         (store_constructor, expand_expr_real_1): Likewise.
13408         (const_scalar_mask_from_tree): Likewise.
13409         * fold-const-call.c (fold_const_reduction): Likewise.
13410         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13411         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13412         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13413         (fold_relational_const): Likewise.
13414         (native_interpret_vector): Likewise.  Change the size from an
13415         int to an unsigned int.
13416         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13417         TYPE_VECTOR_SUBPARTS.
13418         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13419         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13420         duplicating a non-constant operand into a variable-length vector.
13421         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13422         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13423         * ipa-icf.c (sem_variable::equals): Likewise.
13424         * match.pd: Likewise.
13425         * omp-simd-clone.c (simd_clone_subparts): Likewise.
13426         * print-tree.c (print_node): Likewise.
13427         * stor-layout.c (layout_type): Likewise.
13428         * targhooks.c (default_builtin_vectorization_cost): Likewise.
13429         * tree-cfg.c (verify_gimple_comparison): Likewise.
13430         (verify_gimple_assign_binary): Likewise.
13431         (verify_gimple_assign_ternary): Likewise.
13432         (verify_gimple_assign_single): Likewise.
13433         * tree-pretty-print.c (dump_generic_node): Likewise.
13434         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13435         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13436         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13437         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13438         (vect_shift_permute_load_chain): Likewise.
13439         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13440         (expand_vector_condition, optimize_vector_constructor): Likewise.
13441         (lower_vec_perm, get_compute_type): Likewise.
13442         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13443         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13444         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13445         (vect_recog_mask_conversion_pattern): Likewise.
13446         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13447         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13448         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13449         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13450         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13451         (vectorizable_shift, vectorizable_operation, vectorizable_store)
13452         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13453         (supportable_widening_operation): Likewise.
13454         (supportable_narrowing_operation): Likewise.
13455         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13456         Likewise.
13457         * varasm.c (output_constant): Likewise.
13459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13460             Alan Hayward  <alan.hayward@arm.com>
13461             David Sherwood  <david.sherwood@arm.com>
13463         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13464         so that both the length == 3 and length != 3 cases set up their
13465         own permute vectors.  Add comments explaining why we know the
13466         number of elements is constant.
13467         (vect_permute_load_chain): Likewise.
13469 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13470             Alan Hayward  <alan.hayward@arm.com>
13471             David Sherwood  <david.sherwood@arm.com>
13473         * machmode.h (mode_nunits): Change from unsigned char to
13474         poly_uint16_pod.
13475         (ONLY_FIXED_SIZE_MODES): New macro.
13476         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13477         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13478         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13479         New typedefs.
13480         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13481         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13482         or if measurement_type is not polynomial.
13483         * genmodes.c (ZERO_COEFFS): New macro.
13484         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13485         poly_uint16.
13486         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13487         Use ZERO_COEFFS when emitting initializers.
13488         * data-streamer.h (bp_pack_poly_value): New function.
13489         (bp_unpack_poly_value): Likewise.
13490         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13491         for GET_MODE_NUNITS.
13492         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13493         for GET_MODE_NUNITS.
13494         * tree.c (make_vector_type): Remove temporary shim and make
13495         the real function take the number of units as a poly_uint64
13496         rather than an int.
13497         (build_vector_type_for_mode): Handle polynomial nunits.
13498         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13499         * emit-rtl.c (const_vec_series_p_1): Likewise.
13500         (gen_rtx_CONST_VECTOR): Likewise.
13501         * fold-const.c (test_vec_duplicate_folding): Likewise.
13502         * genrecog.c (validate_pattern): Likewise.
13503         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13504         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13505         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13506         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13507         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13508         * rtlanal.c (subreg_get_info): Likewise.
13509         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13510         (vect_grouped_load_supported): Likewise.
13511         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13512         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13513         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13514         (simplify_const_unary_operation, simplify_binary_operation_1)
13515         (simplify_const_binary_operation, simplify_ternary_operation)
13516         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13517         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13518         instead of CONST_VECTOR_NUNITS.
13519         * varasm.c (output_constant_pool_2): Likewise.
13520         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13521         explicit-encoded elements in the XVEC for variable-length vectors.
13523 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13525         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13527 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13528             Alan Hayward  <alan.hayward@arm.com>
13529             David Sherwood  <david.sherwood@arm.com>
13531         * coretypes.h (fixed_size_mode): Declare.
13532         (fixed_size_mode_pod): New typedef.
13533         * builtins.h (target_builtins::x_apply_args_mode)
13534         (target_builtins::x_apply_result_mode): Change type to
13535         fixed_size_mode_pod.
13536         * builtins.c (apply_args_size, apply_result_size, result_vector)
13537         (expand_builtin_apply_args_1, expand_builtin_apply)
13538         (expand_builtin_return): Update accordingly.
13540 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13542         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13543         * cselib.c (cselib_hash_rtx): Likewise.
13544         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13545         CONST_VECTOR encoding.
13547 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13548             Jeff Law  <law@redhat.com>
13550         PR target/83641
13551         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13552         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13553         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13554         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13556         PR target/83641
13557         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13558         explicitly probe *sp in a noreturn function if there were any callee
13559         register saves or frame pointer is needed.
13561 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13563         PR debug/83621
13564         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13565         BLKmode for ternary, binary or unary expressions.
13567         PR debug/83645
13568         * var-tracking.c (delete_vta_debug_insn): New inline function.
13569         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13570         insns from get_insns () to NULL instead of each bb separately.
13571         Use delete_vta_debug_insn.  No longer static.
13572         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13573         delete_vta_debug_insns callers.
13574         * rtl.h (delete_vta_debug_insns): Declare.
13575         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13576         instead of variable_tracking_main.
13578 2018-01-03  Martin Sebor  <msebor@redhat.com>
13580         PR tree-optimization/83603
13581         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13582         arguments past the endof the argument list in functions declared
13583         without a prototype.
13584         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13585         Avoid checking when arguments are null.
13587 2018-01-03  Martin Sebor  <msebor@redhat.com>
13589         PR c/83559
13590         * doc/extend.texi (attribute const): Fix a typo.
13591         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13592         issuing -Wsuggest-attribute for void functions.
13594 2018-01-03  Martin Sebor  <msebor@redhat.com>
13596         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13597         offset_int::from instead of wide_int::to_shwi.
13598         (maybe_diag_overlap): Remove assertion.
13599         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13600         * gimple-ssa-sprintf.c (format_directive): Same.
13601         (parse_directive): Same.
13602         (sprintf_dom_walker::compute_format_length): Same.
13603         (try_substitute_return_value): Same.
13605 2018-01-03  Jeff Law  <law@redhat.com>
13607         PR middle-end/83654
13608         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13609         non-constant residual for zero at runtime and avoid probing in
13610         that case.  Reorganize code for trailing problem to mirror handling
13611         of the residual.
13613 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13615         PR tree-optimization/83501
13616         * tree-ssa-strlen.c (get_string_cst): New.
13617         (handle_char_store): Call get_string_cst.
13619 2018-01-03  Martin Liska  <mliska@suse.cz>
13621         PR tree-optimization/83593
13622         * tree-ssa-strlen.c: Include tree-cfg.h.
13623         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13624         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13625         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13626         to false.
13627         (strlen_dom_walker::before_dom_children): Call
13628         gimple_purge_dead_eh_edges. Dump tranformation with details
13629         dump flags.
13630         (strlen_dom_walker::before_dom_children): Update call by adding
13631         new argument cleanup_eh.
13632         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13634 2018-01-03  Martin Liska  <mliska@suse.cz>
13636         PR ipa/83549
13637         * cif-code.def (VARIADIC_THUNK): New enum value.
13638         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13639         thunks.
13641 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13643         * sse.md (mov<mode>_internal): Tighten condition for when to use
13644         vmovdqu<ssescalarsize> for TI and OI modes.
13646 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13648         Update copyright years.
13650 2018-01-03  Martin Liska  <mliska@suse.cz>
13652         PR ipa/83594
13653         * ipa-visibility.c (function_and_variable_visibility): Skip
13654         functions with noipa attribure.
13656 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13658         * gcc.c (process_command): Update copyright notice dates.
13659         * gcov-dump.c (print_version): Ditto.
13660         * gcov.c (print_version): Ditto.
13661         * gcov-tool.c (print_version): Ditto.
13662         * gengtype.c (create_file): Ditto.
13663         * doc/cpp.texi: Bump @copying's copyright year.
13664         * doc/cppinternals.texi: Ditto.
13665         * doc/gcc.texi: Ditto.
13666         * doc/gccint.texi: Ditto.
13667         * doc/gcov.texi: Ditto.
13668         * doc/install.texi: Ditto.
13669         * doc/invoke.texi: Ditto.
13671 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13673         * vector-builder.h (vector_builder::m_full_nelts): Change from
13674         unsigned int to poly_uint64.
13675         (vector_builder::full_nelts): Update prototype accordingly.
13676         (vector_builder::new_vector): Likewise.
13677         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13678         (vector_builder::operator ==): Likewise.
13679         (vector_builder::finalize): Likewise.
13680         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13681         Take the number of elements as a poly_uint64 rather than an
13682         unsigned int.
13683         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13684         from unsigned int to poly_uint64.
13685         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13686         (vec_perm_indices::new_vector): Likewise.
13687         (vec_perm_indices::length): Likewise.
13688         (vec_perm_indices::nelts_per_input): Likewise.
13689         (vec_perm_indices::input_nelts): Likewise.
13690         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13691         number of elements per input as a poly_uint64 rather than an
13692         unsigned int.  Use the original encoding for variable-length
13693         vectors, rather than clamping each individual element.
13694         For the second and subsequent elements in each pattern,
13695         clamp the step and base before clamping their sum.
13696         (vec_perm_indices::series_p): Handle polynomial element counts.
13697         (vec_perm_indices::all_in_range_p): Likewise.
13698         (vec_perm_indices_to_tree): Likewise.
13699         (vec_perm_indices_to_rtx): Likewise.
13700         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13701         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13702         (tree_vector_builder::new_binary_operation): Handle polynomial
13703         element counts.  Return false if we need to know the number
13704         of elements at compile time.
13705         * fold-const.c (fold_vec_perm): Punt if the number of elements
13706         isn't known at compile time.
13708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13710         * vec-perm-indices.h (vec_perm_builder): Change element type
13711         from HOST_WIDE_INT to poly_int64.
13712         (vec_perm_indices::element_type): Update accordingly.
13713         (vec_perm_indices::clamp): Handle polynomial element_types.
13714         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13715         (vec_perm_indices::all_in_range_p): Likewise.
13716         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13717         than shwi trees.
13718         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13719         polynomial vec_perm_indices element types.
13720         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13721         * fold-const.c (fold_vec_perm): Likewise.
13722         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13723         * tree-vect-generic.c (lower_vec_perm): Likewise.
13724         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13725         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13726         element type to HOST_WIDE_INT.
13728 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13729             Alan Hayward  <alan.hayward@arm.com>
13730             David Sherwood  <david.sherwood@arm.com>
13732         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13733         rather than an int.  Use plus_constant.
13734         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13735         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13737 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13738             Alan Hayward  <alan.hayward@arm.com>
13739             David Sherwood  <david.sherwood@arm.com>
13741         * calls.c (emit_call_1, expand_call): Change struct_value_size from
13742         a HOST_WIDE_INT to a poly_int64.
13744 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13745             Alan Hayward  <alan.hayward@arm.com>
13746             David Sherwood  <david.sherwood@arm.com>
13748         * calls.c (load_register_parameters): Cope with polynomial
13749         mode sizes.  Require a constant size for BLKmode parameters
13750         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
13751         forces a parameter to be padded at the lsb end in order to
13752         fill a complete number of words, require the parameter size
13753         to be ordered wrt UNITS_PER_WORD.
13755 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13756             Alan Hayward  <alan.hayward@arm.com>
13757             David Sherwood  <david.sherwood@arm.com>
13759         * reload1.c (spill_stack_slot_width): Change element type
13760         from unsigned int to poly_uint64_pod.
13761         (alter_reg): Treat mode sizes as polynomial.
13763 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13764             Alan Hayward  <alan.hayward@arm.com>
13765             David Sherwood  <david.sherwood@arm.com>
13767         * reload.c (complex_word_subreg_p): New function.
13768         (reload_inner_reg_of_subreg, push_reload): Use it.
13770 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13771             Alan Hayward  <alan.hayward@arm.com>
13772             David Sherwood  <david.sherwood@arm.com>
13774         * lra-constraints.c (process_alt_operands): Reject matched
13775         operands whose sizes aren't ordered.
13776         (match_reload): Refer to this check here.
13778 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13779             Alan Hayward  <alan.hayward@arm.com>
13780             David Sherwood  <david.sherwood@arm.com>
13782         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13783         that the mode size is in the set {1, 2, 4, 8, 16}.
13785 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13786             Alan Hayward  <alan.hayward@arm.com>
13787             David Sherwood  <david.sherwood@arm.com>
13789         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13790         Use plus_constant instead of gen_rtx_PLUS.
13792 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13793             Alan Hayward  <alan.hayward@arm.com>
13794             David Sherwood  <david.sherwood@arm.com>
13796         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
13797         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
13798         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
13799         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
13800         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
13801         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
13802         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
13803         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
13804         * config/i386/i386.c (ix86_push_rounding): ...this new function.
13805         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
13806         a poly_int64.
13807         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
13808         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
13809         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
13810         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
13811         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
13812         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
13813         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
13814         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
13815         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
13816         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
13817         function.
13818         * expr.c (emit_move_resolve_push): Treat the input and result
13819         of PUSH_ROUNDING as a poly_int64.
13820         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
13821         (emit_push_insn): Likewise.
13822         * lra-eliminations.c (mark_not_eliminable): Likewise.
13823         * recog.c (push_operand): Likewise.
13824         * reload1.c (elimination_effects): Likewise.
13825         * rtlanal.c (nonzero_bits1): Likewise.
13826         * calls.c (store_one_arg): Likewise.  Require the padding to be
13827         known at compile time.
13829 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13830             Alan Hayward  <alan.hayward@arm.com>
13831             David Sherwood  <david.sherwood@arm.com>
13833         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
13834         Use plus_constant instead of gen_rtx_PLUS.
13836 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13837             Alan Hayward  <alan.hayward@arm.com>
13838             David Sherwood  <david.sherwood@arm.com>
13840         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
13841         rather than an int.
13843 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13844             Alan Hayward  <alan.hayward@arm.com>
13845             David Sherwood  <david.sherwood@arm.com>
13847         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
13848         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
13849         via stack temporaries.  Treat the mode size as polynomial too.
13851 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13852             Alan Hayward  <alan.hayward@arm.com>
13853             David Sherwood  <david.sherwood@arm.com>
13855         * expr.c (expand_expr_real_2): When handling conversions involving
13856         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
13857         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
13858         as a poly_uint64 too.
13860 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13861             Alan Hayward  <alan.hayward@arm.com>
13862             David Sherwood  <david.sherwood@arm.com>
13864         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
13866 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13867             Alan Hayward  <alan.hayward@arm.com>
13868             David Sherwood  <david.sherwood@arm.com>
13870         * combine.c (can_change_dest_mode): Handle polynomial
13871         REGMODE_NATURAL_SIZE.
13872         * expmed.c (store_bit_field_1): Likewise.
13873         * expr.c (store_constructor): Likewise.
13874         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
13875         and polynomial REGMODE_NATURAL_SIZE.
13876         (gen_lowpart_common): Likewise.
13877         * reginfo.c (record_subregs_of_mode): Likewise.
13878         * rtlanal.c (read_modify_subreg_p): Likewise.
13880 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13881             Alan Hayward  <alan.hayward@arm.com>
13882             David Sherwood  <david.sherwood@arm.com>
13884         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
13885         numbers of elements.
13887 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13888             Alan Hayward  <alan.hayward@arm.com>
13889             David Sherwood  <david.sherwood@arm.com>
13891         * match.pd: Cope with polynomial numbers of vector elements.
13893 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13894             Alan Hayward  <alan.hayward@arm.com>
13895             David Sherwood  <david.sherwood@arm.com>
13897         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
13898         in a POINTER_PLUS_EXPR.
13900 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13901             Alan Hayward  <alan.hayward@arm.com>
13902             David Sherwood  <david.sherwood@arm.com>
13904         * omp-simd-clone.c (simd_clone_subparts): New function.
13905         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
13906         (ipa_simd_modify_function_body): Likewise.
13908 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13909             Alan Hayward  <alan.hayward@arm.com>
13910             David Sherwood  <david.sherwood@arm.com>
13912         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
13913         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
13914         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
13915         (expand_vector_condition, vector_element): Likewise.
13916         (subparts_gt): New function.
13917         (get_compute_type): Use subparts_gt.
13918         (count_type_subparts): Delete.
13919         (expand_vector_operations_1): Use subparts_gt instead of
13920         count_type_subparts.
13922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13923             Alan Hayward  <alan.hayward@arm.com>
13924             David Sherwood  <david.sherwood@arm.com>
13926         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
13927         (vect_compile_time_alias): ...this new function.  Do the calculation
13928         on poly_ints rather than trees.
13929         (vect_prune_runtime_alias_test_list): Update call accordingly.
13931 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13932             Alan Hayward  <alan.hayward@arm.com>
13933             David Sherwood  <david.sherwood@arm.com>
13935         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
13936         numbers of units.
13937         (vect_schedule_slp_instance): Likewise.
13939 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13940             Alan Hayward  <alan.hayward@arm.com>
13941             David Sherwood  <david.sherwood@arm.com>
13943         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
13944         constant and extern definitions for variable-length vectors.
13945         (vect_get_constant_vectors): Note that the number of units
13946         is known to be constant.
13948 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13949             Alan Hayward  <alan.hayward@arm.com>
13950             David Sherwood  <david.sherwood@arm.com>
13952         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
13953         of units as polynomial.  Choose between WIDE and NARROW based
13954         on multiple_p.
13956 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13957             Alan Hayward  <alan.hayward@arm.com>
13958             David Sherwood  <david.sherwood@arm.com>
13960         * tree-vect-stmts.c (simd_clone_subparts): New function.
13961         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
13963 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13964             Alan Hayward  <alan.hayward@arm.com>
13965             David Sherwood  <david.sherwood@arm.com>
13967         * tree-vect-stmts.c (vectorizable_call): Treat the number of
13968         vectors as polynomial.  Use build_index_vector for
13969         IFN_GOMP_SIMD_LANE.
13971 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13972             Alan Hayward  <alan.hayward@arm.com>
13973             David Sherwood  <david.sherwood@arm.com>
13975         * tree-vect-stmts.c (get_load_store_type): Treat the number of
13976         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
13977         for variable-length vectors.
13978         (vectorizable_mask_load_store): Treat the number of units as
13979         polynomial, asserting that it is constant if the condition has
13980         already been enforced.
13981         (vectorizable_store, vectorizable_load): Likewise.
13983 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13984             Alan Hayward  <alan.hayward@arm.com>
13985             David Sherwood  <david.sherwood@arm.com>
13987         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
13988         of units as polynomial.  Punt if we can't tell at compile time
13989         which vector contains the final result.
13991 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13992             Alan Hayward  <alan.hayward@arm.com>
13993             David Sherwood  <david.sherwood@arm.com>
13995         * tree-vect-loop.c (vectorizable_induction): Treat the number
13996         of units as polynomial.  Punt on SLP inductions.  Use an integer
13997         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
13998         cast of such a series for variable-length floating-point
13999         reductions.
14001 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14002             Alan Hayward  <alan.hayward@arm.com>
14003             David Sherwood  <david.sherwood@arm.com>
14005         * tree.h (build_index_vector): Declare.
14006         * tree.c (build_index_vector): New function.
14007         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
14008         of units as polynomial, forcibly converting it to a constant if
14009         vectorizable_reduction has already enforced the condition.
14010         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
14011         to create a {1,2,3,...} vector.
14012         (vectorizable_reduction): Treat the number of units as polynomial.
14013         Choose vectype_in based on the largest scalar element size rather
14014         than the smallest number of units.  Enforce the restrictions
14015         relied on above.
14017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14018             Alan Hayward  <alan.hayward@arm.com>
14019             David Sherwood  <david.sherwood@arm.com>
14021         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
14022         number of units as polynomial.
14024 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14025             Alan Hayward  <alan.hayward@arm.com>
14026             David Sherwood  <david.sherwood@arm.com>
14028         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
14029         * target.def (autovectorize_vector_sizes): Return the vector sizes
14030         by pointer, using vector_sizes rather than a bitmask.
14031         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
14032         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
14033         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
14034         Likewise.
14035         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
14036         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
14037         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
14038         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
14039         * omp-general.c (omp_max_vf): Likewise.
14040         * omp-low.c (omp_clause_aligned_alignment): Likewise.
14041         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
14042         * tree-vect-loop.c (vect_analyze_loop): Likewise.
14043         * tree-vect-slp.c (vect_slp_bb): Likewise.
14044         * doc/tm.texi: Regenerate.
14045         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
14046         to a poly_uint64.
14047         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
14048         the vector size as a poly_uint64 rather than an unsigned int.
14049         (current_vector_size): Change from an unsigned int to a poly_uint64.
14050         (get_vectype_for_scalar_type): Update accordingly.
14051         * tree.h (build_truth_vector_type): Take the size and number of
14052         units as a poly_uint64 rather than an unsigned int.
14053         (build_vector_type): Add a temporary overload that takes
14054         the number of units as a poly_uint64 rather than an unsigned int.
14055         * tree.c (make_vector_type): Likewise.
14056         (build_truth_vector_type): Take the number of units as a poly_uint64
14057         rather than an unsigned int.
14059 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14060             Alan Hayward  <alan.hayward@arm.com>
14061             David Sherwood  <david.sherwood@arm.com>
14063         * target.def (get_mask_mode): Take the number of units and length
14064         as poly_uint64s rather than unsigned ints.
14065         * targhooks.h (default_get_mask_mode): Update accordingly.
14066         * targhooks.c (default_get_mask_mode): Likewise.
14067         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14068         * doc/tm.texi: Regenerate.
14070 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14071             Alan Hayward  <alan.hayward@arm.com>
14072             David Sherwood  <david.sherwood@arm.com>
14074         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
14075         * omp-general.c (omp_max_vf): Likewise.
14076         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
14077         (expand_omp_simd): Handle polynomial safelen.
14078         * omp-low.c (omplow_simd_context): Add a default constructor.
14079         (omplow_simd_context::max_vf): Change from int to poly_uint64.
14080         (lower_rec_simd_input_clauses): Update accordingly.
14081         (lower_rec_input_clauses): Likewise.
14083 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14084             Alan Hayward  <alan.hayward@arm.com>
14085             David Sherwood  <david.sherwood@arm.com>
14087         * tree-vectorizer.h (vect_nunits_for_cost): New function.
14088         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
14089         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
14090         (vect_analyze_slp_cost): Likewise.
14091         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
14092         (vect_model_load_cost): Likewise.
14094 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14095             Alan Hayward  <alan.hayward@arm.com>
14096             David Sherwood  <david.sherwood@arm.com>
14098         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
14099         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
14100         from an unsigned int * to a poly_uint64_pod *.
14101         (calculate_unrolling_factor): New function.
14102         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
14104 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14105             Alan Hayward  <alan.hayward@arm.com>
14106             David Sherwood  <david.sherwood@arm.com>
14108         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
14109         from an unsigned int to a poly_uint64.
14110         (_loop_vec_info::slp_unrolling_factor): Likewise.
14111         (_loop_vec_info::vectorization_factor): Change from an int
14112         to a poly_uint64.
14113         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
14114         (vect_get_num_vectors): New function.
14115         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
14116         (vect_get_num_copies): Use vect_get_num_vectors.
14117         (vect_analyze_data_ref_dependences): Change max_vf from an int *
14118         to an unsigned int *.
14119         (vect_analyze_data_refs): Change min_vf from an int * to a
14120         poly_uint64 *.
14121         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14122         than an unsigned HOST_WIDE_INT.
14123         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14124         (vect_analyze_data_ref_dependence): Change max_vf from an int *
14125         to an unsigned int *.
14126         (vect_analyze_data_ref_dependences): Likewise.
14127         (vect_compute_data_ref_alignment): Handle polynomial vf.
14128         (vect_enhance_data_refs_alignment): Likewise.
14129         (vect_prune_runtime_alias_test_list): Likewise.
14130         (vect_shift_permute_load_chain): Likewise.
14131         (vect_supportable_dr_alignment): Likewise.
14132         (dependence_distance_ge_vf): Take the vectorization factor as a
14133         poly_uint64 rather than an unsigned HOST_WIDE_INT.
14134         (vect_analyze_data_refs): Change min_vf from an int * to a
14135         poly_uint64 *.
14136         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
14137         vfm1 as a poly_uint64 rather than an int.  Make the same change
14138         for the returned bound_scalar.
14139         (vect_gen_vector_loop_niters): Handle polynomial vf.
14140         (vect_do_peeling): Likewise.  Update call to
14141         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
14142         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
14143         be constant.
14144         * tree-vect-loop.c (vect_determine_vectorization_factor)
14145         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
14146         (vect_get_known_peeling_cost): Likewise.
14147         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
14148         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
14149         (vect_transform_loop): Likewise.  Use the lowest possible VF when
14150         updating the upper bounds of the loop.
14151         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
14152         rather than an int.
14153         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
14154         polynomial unroll factors.
14155         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
14156         (vect_make_slp_decision): Likewise.
14157         (vect_supported_load_permutation_p): Likewise, and polynomial
14158         vf too.
14159         (vect_analyze_slp_cost): Handle polynomial vf.
14160         (vect_slp_analyze_node_operations): Likewise.
14161         (vect_slp_analyze_bb_1): Likewise.
14162         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14163         than an unsigned HOST_WIDE_INT.
14164         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
14165         (vectorizable_load): Handle polynomial vf.
14166         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
14167         a poly_uint64.
14168         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
14170 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14171             Alan Hayward  <alan.hayward@arm.com>
14172             David Sherwood  <david.sherwood@arm.com>
14174         * match.pd: Handle bit operations involving three constants
14175         and try to fold one pair.
14177 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14179         * tree-vect-loop-manip.c: Include gimple-fold.h.
14180         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
14181         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
14182         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
14183         Add a path that uses a step of VF instead of 1, but disable it
14184         for now.
14185         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
14186         and niters_no_overflow parameters.  Update calls to
14187         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
14188         Create a new SSA name if the latter choses to use a ste other
14189         than zero, and return it via niters_vector_mult_vf_var.
14190         * tree-vect-loop.c (vect_transform_loop): Update calls to
14191         vect_do_peeling, vect_gen_vector_loop_niters and
14192         slpeel_make_loop_iterate_ntimes.
14193         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
14194         (vect_gen_vector_loop_niters): Update declarations after above changes.
14196 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
14198         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
14199         128-bit round to integer instructions.
14200         (ceil<mode>2): Likewise.
14201         (btrunc<mode>2): Likewise.
14202         (round<mode>2): Likewise.
14204 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14206         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
14207         unaligned VSX load/store on P8/P9.
14208         (expand_block_clear): Allow the use of unaligned VSX
14209         load/store on P8/P9.
14211 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14213         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
14214         New function.
14215         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
14216         swap associated with both a load and a store.
14218 2018-01-02  Andrew Waterman  <andrew@sifive.com>
14220         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
14221         * config/riscv/riscv.md (clear_cache): Use it.
14223 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
14225         * web.c: Remove out-of-date comment.
14227 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14229         * expr.c (fixup_args_size_notes): Check that any existing
14230         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
14231         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
14232         (emit_single_push_insn): ...here.
14234 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14236         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
14237         (const_vector_encoded_nelts): New function.
14238         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
14239         (const_vector_int_elt, const_vector_elt): Declare.
14240         * emit-rtl.c (const_vector_int_elt_1): New function.
14241         (const_vector_elt): Likewise.
14242         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14243         of CONST_VECTOR_ELT.
14245 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14247         * expr.c: Include rtx-vector-builder.h.
14248         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14249         directly on the tree encoding.
14250         (const_vector_from_tree): Likewise.
14251         * optabs.c: Include rtx-vector-builder.h.
14252         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14253         sequence of "u" values.
14254         * vec-perm-indices.c: Include rtx-vector-builder.h.
14255         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14256         directly on the vec_perm_indices encoding.
14258 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14260         * doc/rtl.texi (const_vector): Describe new encoding scheme.
14261         * Makefile.in (OBJS): Add rtx-vector-builder.o.
14262         * rtx-vector-builder.h: New file.
14263         * rtx-vector-builder.c: Likewise.
14264         * rtl.h (rtx_def::u2): Add a const_vector field.
14265         (CONST_VECTOR_NPATTERNS): New macro.
14266         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14267         (CONST_VECTOR_DUPLICATE_P): Likewise.
14268         (CONST_VECTOR_STEPPED_P): Likewise.
14269         (CONST_VECTOR_ENCODED_ELT): Likewise.
14270         (const_vec_duplicate_p): Check for a duplicated vector encoding.
14271         (unwrap_const_vec_duplicate): Likewise.
14272         (const_vec_series_p): Check for a non-duplicated vector encoding.
14273         Say that the function only returns true for integer vectors.
14274         * emit-rtl.c: Include rtx-vector-builder.h.
14275         (gen_const_vec_duplicate_1): Delete.
14276         (gen_const_vector): Call gen_const_vec_duplicate instead of
14277         gen_const_vec_duplicate_1.
14278         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14279         (gen_const_vec_duplicate): Use rtx_vector_builder.
14280         (gen_const_vec_series): Likewise.
14281         (gen_rtx_CONST_VECTOR): Likewise.
14282         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
14283         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14284         Build a new vector rather than modifying a CONST_VECTOR in-place.
14285         (handle_special_swappables): Update call accordingly.
14286         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14287         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14288         Build a new vector rather than modifying a CONST_VECTOR in-place.
14289         (handle_special_swappables): Update call accordingly.
14291 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14293         * simplify-rtx.c (simplify_const_binary_operation): Use
14294         CONST_VECTOR_ELT instead of XVECEXP.
14296 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14298         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
14299         the selector elements to be different from the data elements
14300         if the selector is a VECTOR_CST.
14301         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
14302         ssizetype for the selector.
14304 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14306         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
14307         before testing each element individually.
14308         * tree-vect-generic.c (lower_vec_perm): Likewise.
14310 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14312         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
14313         * selftest-run-tests.c (selftest::run_tests): Call it.
14314         * vector-builder.h (vector_builder::operator ==): New function.
14315         (vector_builder::operator !=): Likewise.
14316         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
14317         (vec_perm_indices::all_from_input_p): New function.
14318         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14319         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
14320         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
14321         instead of reading the VECTOR_CST directly.  Detect whether both
14322         vector inputs are the same before constructing the vec_perm_indices,
14323         and update the number of inputs argument accordingly.  Use the
14324         utility functions added above.  Only construct sel2 if we need to.
14326 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14328         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
14329         the broadcast of the low byte.
14330         (expand_mult_highpart): Use an explicit encoding for the permutes.
14331         * optabs-query.c (can_mult_highpart_p): Likewise.
14332         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14333         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14334         (vectorizable_bswap): Likewise.
14335         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
14336         explicit encoding for the power-of-2 permutes.
14337         (vect_permute_store_chain): Likewise.
14338         (vect_grouped_load_supported): Likewise.
14339         (vect_permute_load_chain): Likewise.
14341 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14343         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
14344         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
14345         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
14346         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14347         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14348         (vect_gen_perm_mask_any): Likewise.
14350 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14352         * int-vector-builder.h: New file.
14353         * vec-perm-indices.h: Include int-vector-builder.h.
14354         (vec_perm_indices): Redefine as an int_vector_builder.
14355         (auto_vec_perm_indices): Delete.
14356         (vec_perm_builder): Redefine as a stand-alone class.
14357         (vec_perm_indices::vec_perm_indices): New function.
14358         (vec_perm_indices::clamp): Likewise.
14359         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14360         (vec_perm_indices::new_vector): New function.
14361         (vec_perm_indices::new_expanded_vector): Update for new
14362         vec_perm_indices class.
14363         (vec_perm_indices::rotate_inputs): New function.
14364         (vec_perm_indices::all_in_range_p): Operate directly on the
14365         encoded form, without computing elided elements.
14366         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14367         encoding.  Update for new vec_perm_indices class.
14368         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14369         the given vec_perm_builder.
14370         (expand_vec_perm_var): Update vec_perm_builder constructor.
14371         (expand_mult_highpart): Use vec_perm_builder instead of
14372         auto_vec_perm_indices.
14373         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14374         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
14375         or double series encoding as appropriate.
14376         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14377         vec_perm_indices instead of auto_vec_perm_indices.
14378         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14379         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14380         (vect_permute_store_chain): Likewise.
14381         (vect_grouped_load_supported): Likewise.
14382         (vect_permute_load_chain): Likewise.
14383         (vect_shift_permute_load_chain): Likewise.
14384         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14385         (vect_transform_slp_perm_load): Likewise.
14386         (vect_schedule_slp_instance): Likewise.
14387         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14388         (vectorizable_mask_load_store): Likewise.
14389         (vectorizable_bswap): Likewise.
14390         (vectorizable_store): Likewise.
14391         (vectorizable_load): Likewise.
14392         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14393         vec_perm_indices instead of auto_vec_perm_indices.  Use
14394         tree_to_vec_perm_builder to read the vector from a tree.
14395         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14396         vec_perm_builder instead of a vec_perm_indices.
14397         (have_whole_vector_shift): Use vec_perm_builder and
14398         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
14399         truncation to calc_vec_perm_mask_for_shift.
14400         (vect_create_epilog_for_reduction): Likewise.
14401         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14402         from auto_vec_perm_indices to vec_perm_indices.
14403         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14404         instead of changing individual elements.
14405         (aarch64_vectorize_vec_perm_const): Use new_vector to install
14406         the vector in d.perm.
14407         * config/arm/arm.c (expand_vec_perm_d::perm): Change
14408         from auto_vec_perm_indices to vec_perm_indices.
14409         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14410         instead of changing individual elements.
14411         (arm_vectorize_vec_perm_const): Use new_vector to install
14412         the vector in d.perm.
14413         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14414         Update vec_perm_builder constructor.
14415         (rs6000_expand_interleave): Likewise.
14416         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14417         (rs6000_expand_interleave): Likewise.
14419 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14421         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14422         to qimode could truncate the indices.
14423         * optabs.c (expand_vec_perm_var): Likewise.
14425 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14427         * Makefile.in (OBJS): Add vec-perm-indices.o.
14428         * vec-perm-indices.h: New file.
14429         * vec-perm-indices.c: Likewise.
14430         * target.h (vec_perm_indices): Replace with a forward class
14431         declaration.
14432         (auto_vec_perm_indices): Move to vec-perm-indices.h.
14433         * optabs.h: Include vec-perm-indices.h.
14434         (expand_vec_perm): Delete.
14435         (selector_fits_mode_p, expand_vec_perm_var): Declare.
14436         (expand_vec_perm_const): Declare.
14437         * target.def (vec_perm_const_ok): Replace with...
14438         (vec_perm_const): ...this new hook.
14439         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14440         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14441         * doc/tm.texi: Regenerate.
14442         * optabs.def (vec_perm_const): Delete.
14443         * doc/md.texi (vec_perm_const): Likewise.
14444         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14445         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14446         expand_vec_perm for constant permutation vectors.  Assert that
14447         the mode of variable permutation vectors is the integer equivalent
14448         of the mode that is being permuted.
14449         * optabs-query.h (selector_fits_mode_p): Declare.
14450         * optabs-query.c: Include vec-perm-indices.h.
14451         (selector_fits_mode_p): New function.
14452         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14453         is defined, instead of checking whether the vec_perm_const_optab
14454         exists.  Use targetm.vectorize.vec_perm_const instead of
14455         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
14456         fit in the vector mode before using a variable permute.
14457         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14458         vec_perm_indices instead of an rtx.
14459         (expand_vec_perm): Replace with...
14460         (expand_vec_perm_const): ...this new function.  Take the selector
14461         as a vec_perm_indices rather than an rtx.  Also take the mode of
14462         the selector.  Update call to shift_amt_for_vec_perm_mask.
14463         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14464         Use vec_perm_indices::new_expanded_vector to expand the original
14465         selector into bytes.  Check whether the indices fit in the vector
14466         mode before using a variable permute.
14467         (expand_vec_perm_var): Make global.
14468         (expand_mult_highpart): Use expand_vec_perm_const.
14469         * fold-const.c: Includes vec-perm-indices.h.
14470         * tree-ssa-forwprop.c: Likewise.
14471         * tree-vect-data-refs.c: Likewise.
14472         * tree-vect-generic.c: Likewise.
14473         * tree-vect-loop.c: Likewise.
14474         * tree-vect-slp.c: Likewise.
14475         * tree-vect-stmts.c: Likewise.
14476         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14477         Delete.
14478         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14479         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14480         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14481         (aarch64_vectorize_vec_perm_const): ...this new function.
14482         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14483         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14484         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14485         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14486         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14487         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14488         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14489         into...
14490         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14491         check for NEON modes.
14492         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14493         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14494         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14495         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14496         into...
14497         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14498         the old VEC_PERM_CONST conditions.
14499         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14500         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14501         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14502         (ia64_vectorize_vec_perm_const_ok): Merge into...
14503         (ia64_vectorize_vec_perm_const): ...this new function.
14504         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14505         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14506         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14507         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14508         * config/mips/mips.c (mips_expand_vec_perm_const)
14509         (mips_vectorize_vec_perm_const_ok): Merge into...
14510         (mips_vectorize_vec_perm_const): ...this new function.
14511         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14512         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14513         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14514         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14515         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14516         (rs6000_expand_vec_perm_const): Delete.
14517         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14518         Delete.
14519         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14520         (altivec_expand_vec_perm_const_le): Take each operand individually.
14521         Operate on constant selectors rather than rtxes.
14522         (altivec_expand_vec_perm_const): Likewise.  Update call to
14523         altivec_expand_vec_perm_const_le.
14524         (rs6000_expand_vec_perm_const): Delete.
14525         (rs6000_vectorize_vec_perm_const_ok): Delete.
14526         (rs6000_vectorize_vec_perm_const): New function.
14527         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14528         an element count and rtx array.
14529         (rs6000_expand_extract_even): Update call accordingly.
14530         (rs6000_expand_interleave): Likewise.
14531         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14532         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14533         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14534         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14535         (rs6000_expand_vec_perm_const): Delete.
14536         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14537         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14538         (altivec_expand_vec_perm_const_le): Take each operand individually.
14539         Operate on constant selectors rather than rtxes.
14540         (altivec_expand_vec_perm_const): Likewise.  Update call to
14541         altivec_expand_vec_perm_const_le.
14542         (rs6000_expand_vec_perm_const): Delete.
14543         (rs6000_vectorize_vec_perm_const_ok): Delete.
14544         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14545         reference to the SPE evmerge intructions.
14546         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14547         an element count and rtx array.
14548         (rs6000_expand_extract_even): Update call accordingly.
14549         (rs6000_expand_interleave): Likewise.
14550         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14551         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14552         new function.
14553         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14555 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14557         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14558         vector mode and that that mode matches the mode of the data
14559         being permuted.
14560         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14561         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14562         directly using expand_vec_perm_1 when forcing selectors into
14563         registers.
14564         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14566 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14568         * optabs-query.h (can_vec_perm_p): Delete.
14569         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14570         * optabs-query.c (can_vec_perm_p): Split into...
14571         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14572         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14573         particular selector is valid.
14574         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14575         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14576         (vect_grouped_load_supported): Likewise.
14577         (vect_shift_permute_load_chain): Likewise.
14578         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14579         (vect_transform_slp_perm_load): Likewise.
14580         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14581         (vectorizable_bswap): Likewise.
14582         (vect_gen_perm_mask_checked): Likewise.
14583         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14584         implementations of variable permutation vectors into account
14585         when deciding which selector to use.
14586         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14587         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14588         with a false third argument.
14589         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14590         to test whether the constant selector is valid and can_vec_perm_var_p
14591         to test whether a variable selector is valid.
14593 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14595         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14596         * optabs-query.c (can_vec_perm_p): Likewise.
14597         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14598         instead of vec_perm_indices.
14599         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14600         (vect_gen_perm_mask_checked): Likewise,
14601         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14602         (vect_gen_perm_mask_checked): Likewise,
14604 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14606         * optabs-query.h (qimode_for_vec_perm): Declare.
14607         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14608         (qimode_for_vec_perm): ...this new function.
14609         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14611 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14613         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14614         does not have a conditional at the top.
14616 2018-01-02  Richard Biener  <rguenther@suse.de>
14618         * ipa-inline.c (big_speedup_p): Fix expression.
14620 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14622         PR target/81616
14623         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14624         for generic 4->6.
14626 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14628         PR target/81616
14629         Generic tuning.
14630         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14631         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14632         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14633         cond_taken_branch_cost 3->4.
14635 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14637         PR tree-optimization/83581
14638         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14639         TODO_cleanup_cfg if any changes have been made.
14641         PR middle-end/83608
14642         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14643         convert_modes if target mode has the right side, but different mode
14644         class.
14646         PR middle-end/83609
14647         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14648         last argument when extracting from CONCAT.  If either from_real or
14649         from_imag is NULL, use expansion through memory.  If result is not
14650         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14651         the parts directly to inner mode, if even that fails, use expansion
14652         through memory.
14654         PR middle-end/83623
14655         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14656         check for bswap in mode rather than HImode and use that in expand_unop
14657         too.
14659 Copyright (C) 2018 Free Software Foundation, Inc.
14661 Copying and distribution of this file, with or without modification,
14662 are permitted in any medium without royalty provided the copyright
14663 notice and this notice are preserved.