2018-05-30 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blobff61ca585f7b13b4bb7f491b44e3dbee4182e550
1 2018-05-30  Richard Biener  <rguenther@suse.de>
3         PR tree-optimization/85964
4         * tracer.c (better_p): Drop initialized count check, we only
5         call the function with initialized counts now.
6         (find_best_successor): Do find a best edge if one
7         has uninitialized count.
8         (find_best_predecessor): Likewise.  Do BB frequency check only
9         if count is initialized.
11 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
13         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
14         (aarch64_ldrstr_offset_compare): New.
15         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
16         load/store orderings.
17         (aarch64_gen_adjusted_ldpstp): Likewise.
19 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
21         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
22         Check for subset of GENERAL_REGS and FP_REGS.
23         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
24         r=w alternative.
26 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
28         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
29         and wi::to_poly_offset.  Add the current offset and then check
30         whether the sum fits, rather than using an unchecked addition of
31         a checked term.  Check for a shwi rather than a uhwi.
32         * expr.c (get_bit_range): Use tree_to_poly_uint64.
33         (store_constructor): Use poly_int_tree_p.
34         (expand_expr_real_1): Likewise.
35         * function.c (assign_temp): Likewise.
36         * fold-const.c (const_binop): Use poly_int_tree_p and
37         wi::to_poly_offset.
38         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
39         division.
40         * ipa-icf-gimple.c (func_checker::compare_operand): Use
41         to_poly_offset for MEM offsets.
42         * ipa-icf.c (sem_variable::equals): Likewise.
43         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
44         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
45         wi::to_poly_offset for BIT_FIELD_REF offsets.
46         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
47         wi::to_poly_offset.
48         * var-tracking.c (emit_note_insn_var_location): Use
49         tree_to_poly_uint64.
51 2018-05-29  Jim Wilson  <jimw@sifive.com>
53         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
55 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
57         PR target/85950
58         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
59         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
60         sequence.
61         (sse4_1_round<mode>2): Use nonimmediate_operand
62         for operand 1 predicate.
64 2018-05-29  Martin Sebor  <msebor@redhat.com>
65             Richard Biener  <rguenther@suse.de>
67         PR testsuite/85888
68         * calls.c (get_size_range): Call determine_value_range instead
69         of get_value_range..
70         * tree-vrp.h (determine_value_range): Declared new function.
71         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
73 2018-05-29  Richard Biener  <rguenther@suse.de>
75         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
76         sure to use non-pattern stmts for get_earlier_stmt arguments.
77         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
78         called on pattern stmts.
79         (get_later_stmt): Likewise.
81 2018-05-29  Martin Liska  <mliska@suse.cz>
83         PR gcov-profile/85759
84         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
85         env variables.
87 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
89         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
90         VEC_UNPACK_*_EXPR.
91         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
92         VEC_PACK_*_EXPR.
94         PR target/85918
95         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
96         VEC_PACK_FLOAT_EXPR): New tree codes.
97         * tree-pretty-print.c (op_code_prio): Handle
98         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
99         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
100         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
101         * tree-inline.c (estimate_operator_cost): Likewise.
102         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
103         * fold-const.c (const_binop): Likewise.
104         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
105         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
106         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
107         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
108         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
109         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
110         * expr.c (expand_expr_real_2): Likewise.
111         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
112         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
113         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
114         optabs.
115         * optabs.c (expand_widen_pattern_expr): For
116         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
117         sign from result type rather than operand's type.
118         (expand_binop_directly): For vec_packu_float_optab and
119         vec_packs_float_optab allow result type to be different from operand's
120         type.
121         * optabs-tree.c (optab_for_tree_code): Handle
122         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
123         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
124         * tree-vect-generic.c (expand_vector_operations_1):  Handle
125         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
126         VEC_PACK_FLOAT_EXPR.
127         * tree-vect-stmts.c (supportable_widening_operation): Handle
128         FIX_TRUNC_EXPR.
129         (supportable_narrowing_operation): Handle FLOAT_EXPR.
130         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
131         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
132         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
133         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
134         mode attributes.
135         (vec_pack<floatprefix>_float_<mode>): New expander.
136         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
137         attributes.
138         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
139         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
140         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
141         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
142         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
143         Document.
144         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
145         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
146         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
147         VEC_PACK_FLOAT_EXPR): Document.
149 2018-05-29  Richard Biener  <rguenther@suse.de>
151         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
152         member.
153         (stmt_vec_info_vec): Make pointer.
154         (init_stmt_vec_info_vec): Remove.
155         (free_stmt_vec_info_vec): Likewise.
156         (set_stmt_vec_info_vec): New function.
157         (free_stmt_vec_infos): Likewise.
158         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
159         (set_vinfo_for_stmt): Likewise.
160         (get_earlier_stmt): Likewise.
161         (get_later_stmt): Likewise.
162         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
163         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
164         (vec_info::~vec_info): Free stmt_vec_infos.
165         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
166         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
167         (pass_slp_vectorize::execute): Likewise.
168         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
169         (free_stmt_vec_info_vec): Likewise.
170         (set_stmt_vec_info_vec): New function.
171         (free_stmt_vec_infos): Likewise.
172         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
173         the global stmt_vec_info_vec.
174         * tree-parloops.c (gather_scalar_reductions): Use
175         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
176         vector.
178 2018-05-29  Richard Biener  <rguenther@suse.de>
180         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
182 2018-05-29  Martin Liska  <mliska@suse.cz>
183             David Malcolm  <dmalcolm@redhat.com>
185         * vec.c (test_reverse): New.
186         (vec_c_tests): Add new test.
187         * vec.h (vl_ptr>::reverse): New function.
189 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
191         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
193         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
194         and later.
196 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
198         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
200 2018-05-28  Richard Biener  <rguenther@suse.de>
202         PR tree-optimization/85933
203         * tree-vect-data-refs.c (vect_record_base_alignments): Only
204         look at stmts marked as vectorizable.
206 2018-05-28  Richard Biener  <rguenther@suse.de>
208         PR tree-optimization/85934
209         * tree-vect-generic.c (expand_vector_operations_1): Hoist
210         vector boolean check before scalar optimization.
212 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
214         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
215         for armv5te.
217 2018-05-28  Mark Wielaard  <mark@klomp.org>
219         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
220         if it is an expression containing a minus sign.
222 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
224         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
226 2018-05-27  Paul Koning  <ni1d@arrl.net>
228         * config/pdp11/pdp11.md (truncsihi2): Remove.
230 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
231             Chung-Ju Wu  <jasonwucj@gmail.com>
233         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
234         implementation.
235         (unaligned_store_dw): Ditto.
236         * config/nds32/nds32-memory-manipulation.c
237         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
238         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
239         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
240         (emit_setmem_word_loop): Rename to ...
241         (emit_setmem_doubleword_loop): ... this.
242         (nds32_gen_dup_4_byte_to_word_value): New function.
243         (nds32_gen_dup_8_byte_to_double_word_value): New function.
244         (nds32_expand_setmem_loop): Refine implementation.
245         (nds32_expand_setmem_loop_v3m): Ditto.
246         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
247         pattern.
249 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
251         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
253 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
255         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
256         (nds32_init_machine_status): Initialize machine->attr_naked_p and
257         machine->attr_no_prologue_p.
258         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
259         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
260         (nds32_expand_epilogue): Consider attr_naked_p.
261         (nds32_expand_epilogue_v3pop): Likewise.
262         (nds32_can_use_return_insn): Likewise.
263         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
264         attr_no_prologue_p fields.
265         * config/nds32/nds32.opt (mret-in-naked-func): New option.
267 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
269         PR target/85918
270         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
271         attributes.
272         * config/i386/sse.md
273         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
274         Rename to ...
275         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
276         ... this.
277         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
278         Rename to ...
279         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
280         ... this.
281         (*<floatsuffix>floatv2div2sf2): Rename to ...
282         (*float<floatunssuffix>v2div2sf2): ... this.
283         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
284         (float<floatunssuffix>v2div2sf2_mask): ... this.
285         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
286         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
287         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
288         to ...
289         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
290         ... this.
291         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
292         Rename to ...
293         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
294         ... this.
295         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
296         Rename to ...
297         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
298         ... this.
299         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
300         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
301         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
302         gen_ufix_truncv8dfv8si2.
303         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
304         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
305         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
306         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
307         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
308         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
309         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
310         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
312 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
314         PR target/85900
315         PR target/85345
316         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
318 2018-05-25  Jim Wilson  <jimw@sifive.com>
320         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
321         * config/riscv/riscv.c (struct machine_function): Add
322         interrupt_handler_p and attribute_checked_p fields.
323         (riscv_attribute_table): Add interrupt.
324         (riscv_interrupt_type_p): New.
325         (riscv_save_reg_p): Save extra regs for interrupt handler.
326         (riscv_use_save_libcall): Return false  for interrupt handler.
327         (riscv_first_stack_step): Add forward declaration.
328         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
329         for interrupt handler with large frame.  Use it for saved reg list.
330         (riscv_expand_prologue): Move flag_stack_usage_info support to
331         eliminate duplication.
332         (riscv_expand_epilogue): Generate mret for interrupt handler.
333         (riscv_epilogue_uses): New.
334         (riscv_can_use_return_insn): Return false for interrupt handler.
335         (riscv_function_ok_for_sibcall): Likewise.
336         (riscv_set_current_function): Add interrupt handler support.
337         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
338         * config/riscv/riscv.md (UNSPECV_MRET): New.
339         (GP_REGNUM): New.
340         (riscv_frflags, riscv_fsflags): Use tab after opcode.
341         (riscv_mret): New.
342         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
344 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
346         PR tree-optimization/85712
347         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
348         this candidate has already been replaced in-situ by a copy.
350 2018-05-25  Jason Merrill  <jason@redhat.com>
352         PR c++/80485 - inline function non-zero address.
353         * symtab.c (nonzero_address): Check DECL_COMDAT.
355 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
357         PR target/83628
358         * config/alpha/alpha.md (ashlsi3): New insn pattern.
359         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
360         extension of SImode operation.  Use const123_operand predicate.
361         (*saddsi_1): Remove.
362         (*saddl_se_1): Ditto.
363         (*ssubsi_1): Ditto.
364         (*ssubl_se_1): Ditto.
365         * config/alpha/predicates.md (const123_operand): New predicate.
366         * config/alpha/constraints.md (P): Use IN_RANGE.
368 2018-05-25  Richard Biener  <rguenther@suse.de>
370         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
371         defaulted to true.
372         (ref_maybe_used_by_stmt_p): Likewise.
373         (stmt_may_clobber_ref_p): Likewise.
374         (stmt_may_clobber_ref_p_1): Likewise.
375         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
376         and pass it along.
377         (ref_maybe_used_by_stmt_p): Likewise.
378         (stmt_may_clobber_ref_p): Likewise.
379         (stmt_may_clobber_ref_p_1): Likewise.
380         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
381         the alias oracle to disambiguate DRs with stmts DR analysis
382         couldn't handle.
383         (vect_analyze_data_refs): Do not give up on not analyzable
384         DRs for BB vectorization.  Remove code truncating the dataref
385         vector.
387 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
389         PR target/85832
390         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
391         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
392         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
394 2018-05-25  Richard Biener  <rguenther@suse.de>
396         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
397         function, combining stmt data ref gathering and fatal analysis
398         parts.
399         (vect_analyze_data_refs): Remove now redudnant code and simplify.
400         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
401         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
402         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
403         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
405 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
407         PR tree-optimization/85720
408         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
409         SCC if all partitions are builtins.
410         (version_loop_by_alias_check): New parameter.  Generate cancelable
411         runtime alias check if all partitions are builtins.
412         (distribute_loop): Update call to above function.
414 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
416         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
417         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.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         (remove_ssa_form): Refactor call to init_var_map here.
423         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
424         computation for loop region.
425         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
426         (register_default_def): Delete.
427         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
428         (parm_default_def_partition_arg): Ditto.
429         (set_parm_default_def_partition): Ditto.
430         (get_parm_default_def_partitions): Ditto and make it static.
431         (get_undefined_value_partitions): Ditto and make it static.
432         (coalesce_with_default, coalesce_with_default): Update comment.
433         (create_coalesce_list_for_region): New func factored out from
434         create_outofssa_var_map.
435         (populate_coalesce_list_for_outofssa): New func factored out from
436         create_outofssa_var_map and coalesce_ssa_name.
437         (create_outofssa_var_map): Delete.
438         (coalesce_ssa_name): Refactor to support live range computation.
439         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
440         (get_parm_default_def_partitions): Delete.
441         (get_undefined_value_partitions): Ditto.
442         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
443         computation for loop region.
444         (new_tree_live_info, loe_visit_block): Ditto.
445         (live_worklist, set_var_live_on_entry): Ditto.
446         (calculate_live_on_exit, verify_live_on_entry): Ditto.
447         * tree-ssa-live.h (struct _var_map): New fields.
448         (init_var_map): Change decl.
449         (region_contains_p): New.
451 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
453         * tree-ssa-live.h (live_merge_and_clear): Delete.
455 2018-05-25  Richard Biener  <rguenther@suse.de>
457         PR c++/85912
458         * tree-dump.c (dequeue_and_dump): Remove access to removed
459         operand 2 of a SWITCH_EXPR.
461 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
463         * doc/sourcebuild.texi (vect_double_cond_arith): Include
464         multiplication and division.
465         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
466         (cond_udiv@var{m}, cond_umod@var{m}): Document.
467         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
468         (cond_udiv_optab, cond_umod_optab): New optabs.
469         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
470         (IFN_COND_RDIV): New internal functions.
471         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
472         TRUNC_MOD_EXPR and RDIV_EXPR.
473         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
474         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
475         New unspecs.
476         (SVE_INT_BINARY): Include mult.
477         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
478         (optab, sve_int_op): Handle mult.
479         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
480         UNSPEC_COND_DIV.
481         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
482         for SVE_INT_BINARY_SD.
484 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
486         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
487         (optab, sve_int_op): Handle div and udiv.
488         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
489         for SVE_INT_BINARY_SD.
490         (*<optab><mode>3): New insn for the same.
492 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
494         * tree-vect-patterns.c: Include predict.h.
495         (vect_recog_divmod_pattern): Restrict check for division support
496         to when optimizing for size.
498 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
500         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
501         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
502         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
503         (gimple_match_op::set_op): Likewise.
504         (gimple_resimplify4): Declare.
505         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
506         (expr::gen_transform): Likewise.
507         (decision_tree::gen): Generate a simplification routine for 4 operands.
508         * gimple-match-head.c (gimple_simplify): Add an overload for
509         4 operands.  In the top-level function, handle up to 4 call
510         arguments and call gimple_resimplify4.
511         (gimple_resimplify4): New function.
512         (build_call_internal): Pass a fourth operand.
513         (maybe_push_to_seq): Likewise.
514         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
515         Fold VEC_COND_EXPRs of an operation and a default value into
516         an IFN_COND_* function if possible.
517         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
518         New unspecs.
519         (SVE_COND_FP_BINARY): Include them.
520         (optab, sve_fp_op): Handle them.
521         (SVE_INT_BINARY_REV): New code iterator.
522         (SVE_COND_FP_BINARY_REV): New int iterator.
523         (commutative): New int attribute.
524         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
525         Declare.
526         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
527         function.
528         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
529         (*cond_<optab><mode>): New patterns for reversed operands.
531 2018-05-25  Richard Biener  <rguenther@suse.de>
533         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
534         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
535         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
536         (STMT_VINFO_GROUPED_ACCESS): Adjust.
537         * tree-vect-data-refs.c (everywhere): Adjust users.
538         * tree-vect-loop.c (everywhere): Likewise.
539         * tree-vect-slp.c (everywhere): Likewise.
540         * tree-vect-stmts.c (everywhere): Likewise.
541         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
543 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
545         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
546         Rename to...
547         (gcc_cv_as_section_exclude): ... this.
548         Try Solaris as #exclude syntax.
549         * configure: Regenerate.
550         * config.in: Regenerate.
551         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
552         SECTION_EXCLUDE.
553         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
554         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
556         * varasm.c (default_elf_asm_named_section): Don't check if
557         HAVE_GAS_SECTION_EXCLUDE is defined.
559 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
561         * doc/md.texi: Update the documentation of the cond_* optabs
562         to mention the new final operand.  Fix GET_MODE_NUNITS call.
563         Describe the scalar case too.
564         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
565         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
566         instead of 2.
567         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
568         (get_conditional_internal_fn): Update comment.
569         * tree-vect-loop.c (vectorizable_reduction): Pass the original
570         accumulator value as a final argument to conditional functions.
571         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
572         a define_expand and add an "else" operand.  Assert for now that
573         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
574         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
575         (*cond_<optab><mode>): New patterns.
576         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
577         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
578         (UNSPEC_COND_EOR): Delete.
579         (optab): Remove associated mappings.
580         (SVE_INT_BINARY): New code iterator.
581         (sve_int_op): Remove int attribute and add "minus" to the code
582         attribute.
583         (SVE_COND_INT_OP): Delete.
584         (SVE_COND_FP_OP): Rename to...
585         (SVE_COND_FP_BINARY): ...this.
587 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
589         * optabs.c (can_reuse_operands_p): New function.
590         (maybe_legitimize_operands): Try to reuse the results for
591         earlier operands.
593 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
595         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
596         Add {q} suffix to insn mnemonic.
598 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
600         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
601         (msp430_warn_func_return): New.
603 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
605         * fold-const.c (tree_nonzero_bits): New function.
606         * fold-const.h (tree_nonzero_bits): Likewise.
607         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
608         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
610 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
612         PR target/85900
613         PR target/85345
614         * varasm.c (assemble_alias): Check ifunc_resolver only on
615         FUNCTION_DECL.
617 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
619         PR target/85903
620         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
621         when memory input operand is handled.
623 2018-05-24  Luis Machado  <luis.machado@linaro.org>
625         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
626         global.
627         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
629 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
631         * match.pd: Delay FMA folds until after vectorization.
633 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
635         PR target/83009
636         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
637         address check not strict.
639 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
641         * gimple-match.h (gimple_match_op): New class.
642         (mprts_hook): Replace parameters with a gimple_match_op *.
643         (maybe_build_generic_op): Likewise.
644         (gimple_simplified_result_is_gimple_val): Replace parameters with
645         a const gimple_match_op *.
646         (gimple_simplify): Replace code_helper * and tree * parameters with
647         a gimple_match_op * parameter.
648         (gimple_resimplify1): Replace code_helper *, tree and tree *
649         parameters with a gimple_match_op * parameter.
650         (gimple_resimplify2): Likewise.
651         (gimple_resimplify3): Likewise.
652         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
653         parameters with a gimple_match_op * parameter.
654         * gimple-match-head.c (gimple_simplify): Change prototypes of
655         auto-generated functions to take a gimple_match_op * instead of
656         separate code_helper * and tree * parameters.  Make the same
657         change in the top-level overload and update calls to the
658         gimple_resimplify routines.  Update calls to the auto-generated
659         functions and to maybe_push_res_to_seq in the publicly-facing
660         operation-specific gimple_simplify overloads.
661         (gimple_match_op::MAX_NUM_OPS): Define.
662         (gimple_resimplify1): Replace rcode and ops with a single res_op
663         parameter.  Update call to gimple_simplify.
664         (gimple_resimplify2): Likewise.
665         (gimple_resimplify3): Likewise.
666         (mprts_hook): Replace parameters with a gimple_match_op *.
667         (maybe_build_generic_op): Likewise.
668         (build_call_internal): Replace type, nargs and ops with
669         a gimple_match_op *.
670         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
671         with a single gimple_match_op *.  Update calls to mprts_hook,
672         build_call_internal and gimple_simplified_result_is_gimple_val.
673         Factor out code that is common to the tree_code and combined_fn cases.
674         * genmatch.c (expr::gen_transform): Replace tem_code and
675         tem_ops with a gimple_match_op called tem_op.  Update calls
676         to the gimple_resimplify functions and maybe_push_res_to_seq.
677         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
678         res_ops.  Update call to the gimple_resimplify functions.
679         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
680         (decision_tree::gen): Make the functions take a gimple_match_op *
681         called res_op instead of separate res_code and res_ops parameters.
682         Update call accordingly.
683         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
684         and ops with a single res_op parameter.  Update calls to
685         maybe_build_generic_op and maybe_push_res_to_seq.
686         (fold_stmt_1): Update calls to gimple_simplify and
687         replace_stmt_with_simplification.
688         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
689         and gimple_simplified_result_is_gimple_val.
690         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
691         gimple_simplify.
692         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
693         with a gimple_match_op *.
694         (vn_nary_build_or_lookup): Likewise.  Update call to
695         vn_nary_build_or_lookup_1.
696         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
697         gimple_match_op *.  Update calls to the gimple_resimplify routines
698         and to gimple_simplified_result_is_gimple_val.
699         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
700         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
701         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
702         (visit_nary_op): Likewise.
703         (visit_reference_op_load): Likewise.
705 2018-05-23  Luis Machado  <luis.machado@linaro.org>
707         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
708         modifier for printing the step amount.
710 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
712         PR target/78849
713         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
714         types.
716 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
718         * doc/sourcebuild.texi (Endianness): New subsubsection.
720 2018-05-23  Luis Machado  <luis.machado@linaro.org>
722         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
723         <prefetch_dynamic_strides>: New const bool field.
724         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
725         prefetch_dynamic_strides.
726         (exynosm1_prefetch_tune): Likewise.
727         (thunderxt88_prefetch_tune): Likewise.
728         (thunderx_prefetch_tune): Likewise.
729         (thunderx2t99_prefetch_tune): Likewise.
730         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
731         false.
732         (aarch64_override_options_internal): Update to set
733         PARAM_PREFETCH_DYNAMIC_STRIDES.
734         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
735         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
736         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
737         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
738         prefetch-dynamic-strides setting.
740 2018-05-23  Luis Machado  <luis.machado@linaro.org>
742         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
743         <minimum_stride>: New const int field.
744         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
745         minimum_stride field defaulting to -1.
746         (exynosm1_prefetch_tune): Likewise.
747         (thunderxt88_prefetch_tune): Likewise.
748         (thunderx_prefetch_tune): Likewise.
749         (thunderx2t99_prefetch_tune): Likewise.
750         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
751         <default_opt_level>: Set to 3.
752         (aarch64_override_options_internal): Update to set
753         PARAM_PREFETCH_MINIMUM_STRIDE.
754         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
755         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
756         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
757         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
758         stride is constant and is below the minimum stride threshold.
760 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
762         * config/arm/arm-cpus.in (mode26): Delete.
763         (armv4): Delete mode26 reference.
764         * config/arm/arm.c (arm_configure_build_target): Delete use of
765         isa_bit_mode26.
767 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
769         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
770         New insn pattern.
771         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
772         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
773         for non-SSE modes.
774         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
775         (floatunsdidf2): Ditto.
777 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
779         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
780         (fixuns_trunc<mode>si2_avx512f): Ditto.
781         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
782         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
783         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
785 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
787         PR rtl-optimization/79985
788         * df-scan.c (df_insn_refs_collect): Remove special case for
789         global registers and asm statements.
791 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
793         * extend.texi (Global Register Variables): Rewrite the bullet list.
794         Note that the register is available for allocation. Note that access
795         via inline asm must use constraints. Add note about async-signal
796         handlers. Remove paragraph about automagic register selection.
798 2018-05-23  Richard Biener  <rguenther@suse.de>
800         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
801         of fixed offset from memset VN.
803 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
805         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
806         first_interp field.
807         (alloc_cand_and_find_basis): Initialize first_interp field.
808         (slsr_process_mul): Modify first_interp field.
809         (slsr_process_add): Likewise.
810         (slsr_process_cast): Modify first_interp field for each new
811         interpretation.
812         (slsr_process_copy): Likewise.
813         (dump_candidate): Dump first_interp field.
814         (replace_mult_candidate): Process all interpretations, not just
815         subsequent ones.
816         (replace_rhs_if_not_dup): Likewise.
817         (replace_one_candidate): Likewise.
819 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
821         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
822         Add new boolean.
823         (aarch64_needs_frame_chain): New function.
824         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
826 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
828         PR target/84882
829         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
830         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
831         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
832         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
833         as true for strict-align.
834         (aarch64_can_inline_p): Perform checks even when callee has no
835         attributes to check for strict alignment.
836         * doc/extend.texi (AArch64 Function Attributes): Document
837         no-strict-align.
838         * doc/invoke.texi: (AArch64 Options): Likewise.
840 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
842         PR tree-optimization/85853
843         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
844         the handling of the root of the node to...
845         (vect_slp_analyze_node_operations_1): ...this new function,
846         and run the whole thing with the child nodes' def types
847         set according to their SLP node's def type.
849 2018-05-23  Richard Biener  <rguenther@suse.de>
851         PR middle-end/85874
852         * tree-data-ref.c (create_runtime_alias_checks): Defer
853         and ignore overflow warnings.
855 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
857         PR tree-optimization/85822
858         * tree-vrp.c (is_masked_range_test): Fix handling of negative
859         constants.
861 2018-05-23  Richard Biener  <rguenther@suse.de>
863         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
864         memset constants via native_interpret_expr.
866 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
868         PR target/85345
869         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
870         attribute.
871         (cgraph_node::create_alias): Likewise.
872         (cgraph_node::get_availability): Check ifunc_resolver instead
873         of looking up ifunc attribute.
874         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
875         * varasm.c (do_assemble_alias): Likewise.
876         (assemble_alias): Likewise.
877         (default_binds_local_p_3): Likewise.
878         * cgraph.h (cgraph_node): Add ifunc_resolver.
879         (cgraph_node::only_called_directly_or_aliased_p): Return false
880         for IFUNC resolver.
881         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
882         attribute.
883         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
884         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
885         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
886         instead of looking up ifunc attribute.
888 2018-05-22  Luis Machado  <luis.machado@linaro.org>
890         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
892 2018-05-22  Martin Sebor  <msebor@redhat.com>
894         PR middle-end/85359
895         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
896         only when expasion succeeds.
897         (expand_builtin_strcmp): Same.
898         (expand_builtin_strncmp): Same.
900 2018-05-22  Martin Sebor  <msebor@redhat.com>
902         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
904 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
905             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
907         * config/aarch64/aarch64-ldpstp.md: Replace uses of
908         aarch64_mem_pair_operand with memory_operand and delete operand swapping
909         code.
910         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
911         Add check for legitimate_address.
912         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
913         (aarch64_swap_ldrstr_operands): New.
914         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
915         Define prototype.
917 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
918             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
920         * config/aarch64/aarch64.md: New patterns to generate stp
921         and ldp.
922         (store_pair_sw, store_pair_dw): New patterns to generate stp for
923         single words and double words.
924         (load_pair_sw, load_pair_dw): Likewise.
925         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
926         Delete.
927         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
928         Delete.
929         * config/aarch64/aarch64-ldpstp.md: Modify peephole
930         for different mode ldpstp and add peephole for merged zero stores.
931         Likewise for loads.
932         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
933         Add size check.
934         (aarch64_gen_store_pair): Rename calls to match new patterns.
935         (aarch64_gen_load_pair): Rename calls to match new patterns.
936         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
937         (load_pair<DREG:mode><DREG2:mode>): ... This.
938         (store_pair<mode>): Rename to...
939         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
940         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
941         New mode iterators.
942         (V_INT_EQUIV): Handle SImode.
943         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
944         New predicate.
946 2018-05-22  Martin Sebor  <msebor@redhat.com>
948         PR c/85623
949         * calls.c (maybe_warn_nonstring_arg): Use string length to set
950         or ajust the presumed bound on an operation to avoid unnecessary
951         warnings.
953 2018-05-22  Martin Sebor  <msebor@redhat.com>
955         PR tree-optimization/85826
956         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
957         assuming that a DECL necesarily has a constant size.
959 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
961         PR middle-end/85862
962         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
964 2018-05-22  Richard Biener  <rguenther@suse.de>
966         PR tree-optimization/85834
967         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
968         non-constant and non-zero memset arguments.
970 2018-05-22  Martin Liska  <mliska@suse.cz>
972         PR ipa/85607
973         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
975 2018-05-22  Richard Biener  <rguenther@suse.de>
977         PR tree-optimization/85863
978         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
979         comparisons when vectype is specified.
980         (vectorizable_condition): Do not specify vectype for
981         vect_is_simple_cond when SLP vectorizing.
983 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
985         PR target/85657
986         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
987         define __ibm128 as long double.
988         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
989         as a distinct type when IEEE 128-bit support is enabled.
990         (init_float128_ieee): Fix up conversions between IFmode and IEEE
991         128-bit types to use the correct functions.
992         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
993         convert between 128-bit floating point types that have different
994         modes but the same representation, instead of using gen_lowpart to
995         makean alias.
996         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
997         KFmode.
998         (IFKF_reg): New attributes to give the register constraints for
999         IFmode and KFmode.
1000         (extend<mode>tf2_internal): New insns to mark an explicit
1001         conversion between 128-bit floating point types that have a
1002         different mode but share the same representation.
1004 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
1006         PR tree-optimization/85814
1007         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
1008         a null return from get_strinfo when unsharing the next
1009         strinfo in the chain.
1011 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
1013         PR gcc/84923
1014         * varasm.c (weak_finish): Clean up weak_decls.
1016 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1018         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
1019         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
1020         UNSPEC_UADALP values.
1021         * config/aarch64/iterators.md (ABAL): New int iterator.
1022         (ABDL2): Likewise.
1023         (ADALP): Likewise.
1024         (sur): Add mappings for the above.
1025         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
1026         New define_insn.
1027         (aarch64_<sur>abal<mode>_4): Likewise.
1028         (aarch64_<sur>adalp<mode>_3): Likewise.
1029         (<sur>sadv16qi): New define_expand.
1031 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
1033         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
1034         (*movdf_internal): Ditto.
1035         (*rcpsf2_sse): Ditto.
1036         (*rsqrtsf2_sse): Ditto.
1037         (*sqrt<mode>2_sse): Ditto.
1039 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
1041         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
1042         eor3q<mode>4.
1043         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
1044         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
1045         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
1046         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
1047         vbcaxq_s64): New.
1048         * config/aarch64/arm_neon.h: Likewise.
1049         * config/aarch64/iterators.md (VQ_I): New.
1051 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
1053         * config.gcc: Add arc/t-multilib-linux to tmake_file for
1054         arc*-*-linux*.
1055         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
1056         MULTILIB_DIRNAMES
1058 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1060         * config/nds32/constraints.md (S): New constraint.
1061         * config/nds32/nds32.md (call_internal): Use constraint S.
1062         (call_value_internal): Likewise.
1063         (sibcall_internal): Likewise.
1064         (sibcall_value_internal): Likewise.
1066 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1067             Chung-Ju Wu  <jasonwucj@gmail.com>
1069         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
1070         into consideration.
1072 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1073             Chung-Ju Wu  <jasonwucj@gmail.com>
1075         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
1076         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
1077         (nds32_rtx_costs_impl): Simplify.
1078         (nds32_address_cost_impl): Simplify.
1079         (nds32_init_rtx_costs): New function.
1080         (nds32_rtx_costs_speed_prefer): Likewise.
1081         (nds32_rtx_costs_size_prefer): Likewise.
1082         (nds32_address_cost_speed_prefer): Likewise.
1083         (nds32_address_cost_speed_fwprop): Likewise.
1084         (nds32_address_cost_size_prefer): Likewise.
1085         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
1086         * config/nds32/nds32.c (nds32_option_override): Use
1087         nds32_init_rtx_costs function.
1089 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1091         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
1092         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
1093         (TARGET_PIPELINE_N8): Likewise.
1094         (TARGET_PIPELINE_N10): Likewise.
1095         (TARGET_PIPELINE_N13): Likewise.
1096         (TARGET_PIPELINE_GRAYWOLF): Likewise.
1098 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
1100         * config/nds32/nds32-fpu.md: Update copyright year.
1102 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1104         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
1106 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1108         * config/nds32/nds32.c
1109         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
1110         * config/nds32/nds32.opt (minline-asm-r15): New option.
1112 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1114         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
1115         MASK_HW_ABS.
1116         * config/nds32/nds32.md (abssi2): New pattern.
1118 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
1120         * config/i386/i386.md (rex64namesuffix): New mode attribute.
1121         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
1122         Merge insn pattern from sse_cvtsi2ss<round_name> and
1123         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
1124         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
1125         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
1126         using SWI48 mode iterator.
1127         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
1128         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
1129         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
1130         pattern from sse_cvttss2si<round_saeonly_name>
1131         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
1132         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
1133         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
1134         using SWI48 mode iterator.
1135         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
1136         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
1137         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
1138         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
1139         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
1140         using SWI48 mode iterator.
1141         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
1142         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
1143         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
1144         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
1145         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
1146         SWI48 mode iterator.
1147         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
1148         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
1149         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
1150         pattern from sse_cvttsd2si<round_saeonly_name>
1151         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
1153 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1155         * config/nds32/nds32-md-auxiliary.c
1156         (nds32_valid_smw_lwm_base_p): Refine.
1157         (nds32_output_smw_single_word): Refine.
1158         (nds32_output_smw_double_word): New.
1159         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
1161 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1163         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
1164         (nds32_output_stack_pop): Refine.
1165         (nds32_expand_unaligned_load): Refine.
1166         (nds32_expand_unaligned_store): Refine.
1168 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1169             Chung-Ju Wu  <jasonwucj@gmail.com>
1171         * config/nds32/constants.md: Add TP_REGNUM constant.
1172         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
1173         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
1174         UNSPEC_ADD32.
1175         * config/nds32/nds32-doubleword.md: Consider flag_pic.
1176         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
1177         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
1178         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
1179         and PIC code generation.
1180         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
1181         code generation.
1182         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
1183         optimization.
1184         * config/nds32/nds32.md: Support TLS and PIC.
1185         * config/nds32/nds32.c: Support TLS and PIC.
1186         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
1187         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
1188         predicate.
1190 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1192         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
1193         mode with E_ prefix.
1195 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1196             Chung-Ju Wu  <jasonwucj@gmail.com>
1198         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
1199         * config/nds32/nds32-md-auxiliary.c
1200         (symbolic_reference_mentioned_p): New.
1201         (nds32_legitimize_ict_address): New.
1202         (nds32_expand_ict_move): New.
1203         (nds32_indirect_call_referenced_p): New.
1204         (nds32_symbol_binds_local_p): Delete.
1205         (nds32_long_call_p): Modify.
1206         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
1207         * config/nds32/nds32-protos.h
1208         (symbolic_reference_mentioned_p): Declare.
1209         (nds32_legitimize_ict_address): Declare.
1210         (nds32_expand_ict_move): Declare.
1211         (nds32_indirect_call_referenced_p): Declare.
1212         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
1213         (nds32_relax_group): Use nds32_ict_const_p as condition.
1214         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
1215         (nds32_asm_file_start): Output ict_model directive in asm code.
1216         (nds32_legitimate_address_p): Consider indirect call.
1217         (nds32_print_operand): Consider indirect call.
1218         (nds32_print_operand_address): Consider indirect call.
1219         (nds32_insert_attributes): Handle "indirect_call" attribute.
1220         (TARGET_LEGITIMATE_ADDRESS_P): Define.
1221         (TARGET_LEGITIMATE_CONSTANT_P): Define.
1222         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1223         (TARGET_DELEGITIMIZE_ADDRESS): Define.
1224         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
1225         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
1226         (TARGET_ICT_MODEL_SMALL): Define.
1227         (TARGET_ICT_MODEL_LARGE): Define.
1228         * config/nds32/nds32.md (movsi): Consider ict model.
1229         (call, call_value): Consider ict model.
1230         (sibcall, sibcall_value): Consider ict model.
1231         * config/nds32/nds32.opt (mict-model): New option.
1232         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
1233         model.
1235 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
1236             Monk Chiang  <sh.chiang04@gmail.com>
1237             Jim Wilson <jimw@sifive.com>
1239         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
1240         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
1241         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
1242         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
1243         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
1244         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
1245         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
1246         compute save_libcall_adjustment properly.
1247         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
1248         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
1249         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
1250         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
1251         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1252         (ABI_SPEC): Handle mabi=ilp32e.
1253         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1254         (RVE): Add RVE mask.
1255         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1256         <-march>: Add rv32e as an example.
1258 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
1260         PR c++/82899
1261         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1262         (intra_create_variable_infos): Handle C++ constructors.
1264 2018-05-18  Martin Liska  <mliska@suse.cz>
1266         * passes.def: Remove a redundant pass.
1268 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
1270         PR bootstrap/85838
1271         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1273 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1275         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1276         (ARMv4): Update.
1277         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1278         (ARMv6m): Update.
1279         (armv2, armv2a, armv3, armv3m): Delete architectures.
1280         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1281         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1282         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1283         Delete cpus.
1284         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1285         (*mulsidi3adddi): Likewise.
1286         (mulsidi3): Likewise.
1287         (*mulsidi3_nov6): Likewise.
1288         (umulsidi3): Likewise.
1289         (umulsidi3_nov6): Likewise.
1290         (umaddsidi4): Likewise.
1291         (*umulsidi3adddi): Likewise.
1292         (smulsi3_highpart): Likewise.
1293         (*smulsi3_highpart_nov6): Likewise.
1294         (umulsi3_highpart): Likewise.
1295         (*umulsi3_highpart_nov6): Likewise.
1296         * config/arm/arm.h (arm_arch3m): Delete.
1297         * config/arm/arm.c (arm_arch3m): Delete.
1298         (arm_option_override_internal): Update armv3-related comment.
1299         (arm_configure_build_target): Delete use of isa_bit_mode32.
1300         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1301         (arm_rtx_costs_internal): Delete check of arm_arch3m.
1302         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1303         (mulsa3): Likewise.
1304         (mulusa3): Likewise.
1305         * config/arm/arm-protos.h (arm_arch3m): Delete.
1306         * config/arm/arm-tables.opt: Regenerate.
1307         * config/arm/arm-tune.md: Likewise.
1308         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
1309         deleted architectures.
1311 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1313         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
1314         (armv5t, armv5te): New features.
1315         (ARMv5, ARMv5e): Delete fgroups.
1316         (ARMv5t, ARMv5te): Adjust for above changes.
1317         (ARMv6m): Likewise.
1318         (armv5, armv5e): Delete arches.
1319         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
1320         arm_arch5.
1321         (*call_reg_arm): Likewise.
1322         (*call_value_reg_armv5): Likewise.
1323         (*call_value_reg_arm): Likewise.
1324         (*call_symbol): Likewise.
1325         (*call_value_symbol): Likewise.
1326         (*sibcall_insn): Likewise.
1327         (*sibcall_value_insn): Likewise.
1328         (clzsi2): Likewise.
1329         (prefetch): Likewise.
1330         (define_split and define_peephole2 dependent on arm_arch5):
1331         Likewise.
1332         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
1333         arm_arch5e.
1334         (TARGET_ARM_QBIT): Likewise.
1335         (TARGET_DSP_MULTIPLY): Likewise.
1336         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
1337         (arm_arch5, arm_arch5e): Delete.
1338         (arm_arch5t, arm_arch5te): Declare.
1339         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
1340         (arm_arch5t): Declare.
1341         (arm_option_reconfigure_globals): Update for the above.
1342         (arm_options_perform_arch_sanity_checks): Update comment, replace
1343         use of arm_arch5 with arm_arch5t.
1344         (use_return_insn): Likewise.
1345         (arm_emit_call_insn): Likewise.
1346         (output_return_instruction): Likewise.
1347         (arm_final_prescan_insn): Likewise.
1348         (arm_coproc_builtin_available): Likewise.
1349         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
1350         arm_arch5e with arm_arch5t and arm_arch5te.
1351         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
1352         (arm_arch5t, arm_arch5te): Declare.
1353         * config/arm/arm-tables.opt: Regenerate.
1354         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
1355         * config/arm/t-multilib: Likewise.
1356         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
1357         instead of arm_arch5.
1358         (*call_reg_thumb1): Likewise.
1359         (*call_value_reg_thumb1_v5): Likewise.
1360         (*call_value_reg_thumb1): Likewise.
1361         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
1362         unreachable path.
1363         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
1365 2018-05-18  Martin Liska  <mliska@suse.cz>
1367         PR gcov-profile/84846
1368         * doc/gcov.texi: Document -t option of gcov tool.
1370 2018-05-18  Martin Liska  <mliska@suse.cz>
1372         PR gcov-profile/84846
1373         * gcov.c (print_usage): Add new -t option.
1374         (process_args): Handle the option.
1375         (generate_results): Use stdout as output when requested by
1376         the option.
1378 2018-05-18  Martin Liska  <mliska@suse.cz>
1380         PR gcov-profile/84846
1381         * coverage.c (coverage_init): Write PWD to .gcno file.
1382         * doc/gcov.texi: Document how working directory is printed.
1383         * gcov-dump.c (dump_gcov_file): Print PWD.
1384         * gcov.c (output_intermediate_file): Likewise.
1385         (read_graph_file): Read PWD string.
1386         (output_lines): Print PWD.
1388 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1390         PR middle-end/85817
1391         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1392         for retval and return false if all args to phi are zero.        
1394 2018-05-18  Richard Biener  <rguenther@suse.de>
1396         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1397         method.
1398         (evrp_dom_walker::before_dom_children): Call it.
1400 2018-05-18  Richard Biener  <rguenther@suse.de>
1402         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1403         results when processing array refs with variable index.
1405 2018-05-18  Toon Moene  <toon@moene.org>
1407         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1408         directly after that of -floop-interchange. Indicate that both
1409         options are enabled by default when specifying -O3. 
1411 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1413         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1414         iterator.  Delete separate integer-mode vec_set<mode> expander.
1415         (aarch64_simd_vec_setv2di): Delete.
1416         (vec_setv2di): Delete.
1417         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1418         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
1419         the "w, r" alternative.
1421 2018-05-18  Martin Liska  <mliska@suse.cz>
1423         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1424         * tree-pass.h (make_pass_lower_switch_O0): New function.
1425         * tree-switch-conversion.c (node_has_low_bound): Remove.
1426         (node_has_high_bound): Likewise.
1427         (node_is_bounded): Likewise.
1428         (class pass_lower_switch): Make it a template type and create
1429         two instances.
1430         (pass_lower_switch::execute): Add template argument.
1431         (make_pass_lower_switch): New function.
1432         (make_pass_lower_switch_O0): New function.
1433         (do_jump_if_equal): Remove.
1434         (emit_case_nodes): Simplify to just handle all 3 cases and leave
1435         all the hard work to tree optimization passes.
1437 2018-05-18  Martin Liska  <mliska@suse.cz>
1439         * dbgcnt.c (limit_low): Renamed from limit.
1440         (limit_high): New variable.
1441         (dbg_cnt_is_enabled): Check for upper limit.
1442         (dbg_cnt): Adjust dumping.
1443         (dbg_cnt_set_limit_by_index): Add new argument for high
1444         value.
1445         (dbg_cnt_set_limit_by_name): Likewise.
1446         (dbg_cnt_process_single_pair): Parse new format.
1447         (dbg_cnt_process_opt): Use strtok.
1448         (dbg_cnt_list_all_counters): Remove 'value' and add
1449         'limit_high'.
1450         * doc/invoke.texi: Document changes.
1452 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
1454         * doc/sourcebuild.texi (scalar_all_fma): Document.
1455         * tree.def (FMA_EXPR): Delete.
1456         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1457         * internal-fn.c (ternary_direct): New macro.
1458         (expand_ternary_optab_fn): Likewise.
1459         (direct_ternary_optab_supported_p): Likewise.
1460         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1461         * builtins.c (fold_builtin_fma): Delete.
1462         (fold_builtin_3): Don't call it.
1463         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1464         * expr.c (expand_expr_real_2): Likewise.
1465         * fold-const.c (operand_equal_p): Likewise.
1466         (fold_ternary_loc): Likewise.
1467         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1468         * gimple.c (DEFTREECODE): Likewise.
1469         * gimplify.c (gimplify_expr): Likewise.
1470         * optabs-tree.c (optab_for_tree_code): Likewise.
1471         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1472         * tree-eh.c (operation_could_trap_p): Likewise.
1473         (stmt_could_throw_1_p): Likewise.
1474         * tree-inline.c (estimate_operator_cost): Likewise.
1475         * tree-pretty-print.c (dump_generic_node): Likewise.
1476         (op_code_prio): Likewise.
1477         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1478         * tree-ssa-operands.c (get_expr_operands): Likewise.
1479         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1480         * fold-const-call.h (fold_fma): Delete.
1481         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1482         CFN_FNMA and CFN_FNMS.
1483         (fold_fma): Delete.
1484         * genmatch.c (combined_fn): New enum.
1485         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1486         (commutative_op): New function.
1487         (commutate): Use it.  Handle more than 2 operands.
1488         (dt_operand::gen_gimple_expr): Use commutative_op.
1489         (parser::parse_expr): Allow :c to be used with non-binary
1490         operators if the commutative operand is known.
1491         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1492         CFN_FMS, CFN_FNMA and CFN_FNMS.
1493         (backprop::process_assign_use): Remove FMA_EXPR handling.
1494         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1495         (gen_hsa_fma): New function.
1496         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1497         IFN_FNMA and IFN_FNMS.
1498         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1499         * gimple-fold.h (follow_all_ssa_edges): Declare.
1500         * gimple-fold.c (follow_all_ssa_edges): New function.
1501         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1502         gimple_build interface and use follow_all_ssa_edges to fold the result.
1503         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1504         instead of checking for optabs directly.
1505         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1506         rather than FMA_EXPRs.
1507         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1508         call to IFN_FMA instead of an FMA_EXPR.
1510 2018-05-17  Jim Wilson  <jimw@sifive.com>
1512         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1513         sign extended promoted subreg, and the range does not have the sign bit
1514         set, then do a sign extend.
1516         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1517         test, check for sign extended subreg and/or constant operands, and
1518         do a sign extend in that case.
1520 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1522         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1523         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1524         Add untyped.
1525         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1526         Change logics_shift_reg to logics_shift_imm.
1527         (thunderx2t99_fp_loadpair_basic): Delete.
1528         (thunderx2t99_fp_storepair_basic): Delete.
1529         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1530         (thunderx2t99_asimd_polynomial): Delete.
1531         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1532         and neon_fp_mul_d_scalar_q.
1533         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1534         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1535         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1536         (thunderx2t99_asimd_lut): Add missing tbl types.
1537         (thunderx2t99_asimd_ext): Delete.
1538         (thunderx2t99_asimd_load1_1_mult): Delete.
1539         (thunderx2t99_asimd_load1_2_mult): Delete.
1540         (thunderx2t99_asimd_load1_ldp): New.
1541         (thunderx2t99_asimd_load1): New.
1542         (thunderx2t99_asimd_load2): Add missing *load2* types.
1543         (thunderx2t99_asimd_load3): New.
1544         (thunderx2t99_asimd_load4): New.
1545         (thunderx2t99_asimd_store1_1_mult): Delete.
1546         (thunderx2t99_asimd_store1_2_mult): Delete.
1547         (thunderx2t99_asimd_store2_mult): Delete.
1548         (thunderx2t99_asimd_store2_onelane): Delete.
1549         (thunderx2t99_asimd_store_stp): New.
1550         (thunderx2t99_asimd_store1): New.
1551         (thunderx2t99_asimd_store2): New.
1552         (thunderx2t99_asimd_store3): New.
1553         (thunderx2t99_asimd_store4): New.
1555 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1557         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1558         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1560 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1561             Segher Boessenkool  <segher@kernel.crashing.org>
1563         PR target/85698
1564         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1565         operand.
1567 2018-05-17  Richard Biener  <rguenther@suse.de>
1569         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1570         for pruning loop and prune defs feeding only already visited PHIs.
1572 2018-05-17  Richard Biener  <rguenther@suse.de>
1574         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1576 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1577             Richard Biener  <rguenther@suse.de>
1579         PR tree-optimization/85793
1580         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1581         for VMAT_ELEMENTWISE.
1583 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1585         * internal-fn.h (lookup_internal_fn): Declare
1586         * internal-fn.c (lookup_internal_fn): New function.
1587         * gimple.c (gimple_build_call_from_tree): Handle calls to
1588         internal functions.
1589         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1590         internal function names.
1591         * tree-pretty-print.c (dump_generic_node): Likewise.
1592         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1594 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1596         * gimple-fold.h (gimple_build): Make the function forms take
1597         combined_fn rather than built_in_function.
1598         (gimple_simplify): Likewise.
1599         * gimple-match-head.c (gimple_simplify): Likewise.
1600         * gimple-fold.c (gimple_build): Likewise.
1601         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1602         rather than gimple_build_call_internal.
1603         (get_initial_defs_for_reduction): Likewise.
1604         (vect_create_epilog_for_reduction): Likewise.
1605         (vectorizable_live_operation): Likewise.
1607 2018-05-17  Martin Liska  <mliska@suse.cz>
1609         * gimple-ssa-sprintf.c (format_directive): Do not use
1610         space in between 'G_' and '('.
1612 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1614         PR target/85323
1615         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1616         even if the mask is not all ones.
1618         PR target/85323
1619         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1620         vector.
1621         (ix86_gimple_fold_builtin): Likewise.
1623         PR target/85323
1624         * config/i386/i386.c: Include tree-vector-builder.h.
1625         (ix86_vector_shift_count): New function.
1626         (ix86_fold_builtin): Fold shift builtins by scalar count.
1627         (ix86_gimple_fold_builtin): Likewise.
1629         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1630         _mm512_setzero): New intrinsics.
1632 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1633             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1635         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1636         code generation for cases where splatting a value is not useful.
1637         * simplify-rtx.c (simplify_ternary_operation): Simplify
1638         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1639         mode to a vec_concat.
1641 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1643         * config.gcc: Support "goldmont-plus".
1644         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1645         "goldmont-plus".
1646         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1647         PROCESSOR_GOLDMONT_PLUS.
1648         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1649         (processor_target_table): Add "goldmont-plus".
1650         (PTA_GOLDMONT_PLUS): Define.
1651         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1652         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1653         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1654         (fold_builtin_cpu): Add "goldmont-plus".
1655         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1656         (ix86_option_override_internal): Add "goldmont-plus".
1657         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1658         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1659         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1660         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1662 2018-05-17  Richard Biener  <rguenther@suse.de>
1664         PR tree-optimization/85757
1665         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1666         remove defs that only feed that PHI from further processing.
1668 2018-05-16  Jim Wilson  <jimw@sifive.com>
1670         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1671         asterisk to name.
1672         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1674 2018-05-16  Mark Wielaard  <mark@klomp.org>
1676         * dwarf2out.c (count_index_strings): New function.
1677         (output_indirect_strings): Call count_index_strings and generate
1678         header for dwarf_version >= 5.
1680 2018-05-16  Mark Wielaard  <mark@klomp.org>
1682         * dwarf2out.c (dwarf_FORM): New function.
1683         (set_indirect_string): Use dwarf_FORM.
1684         (reset_indirect_string): Likewise.
1685         (size_of_die): Likewise.
1686         (value_format): Likewise.
1687         (output_die): Likewise.
1688         (add_skeleton_AT_string): Likewise.
1689         (output_macinfo_op): Likewise.
1690         (index_string): Likewise.
1691         (output_index_string_offset): Likewise.
1692         (output_index_string): Likewise.
1693         (count_index_strings): Likewise.
1695 2018-05-16  Carl Love  <cel@us.ibm.com>
1697         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1698         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1700 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1702         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1703         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1705 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1707         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1708         (fnma<mode>4): Likewise.
1709         (fms<mode>4): Likewise.
1710         (fnms<mode>4): Likewise.
1711         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1712         (aarch64_fnma<mode>4): Likewise.
1713         (aarch64_fms<mode>4): Likewise.
1714         (aarch64_fnms<mode>4): Likewise.
1715         (aarch64_fnmadd<mode>4): Likewise.
1717 2018-05-16  Jason Merrill  <jason@redhat.com>
1719         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1721 2018-05-16  Richard Biener  <rguenther@suse.de>
1723         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1724         (dump_stmt_cost): Declare.
1725         (add_stmt_cost): Dump cost we add.
1726         (add_stmt_costs): New function.
1727         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1728         No longer exported.
1729         (vect_analyze_stmt): Adjust prototype.
1730         (vectorizable_condition): Likewise.
1731         (vectorizable_live_operation): Likewise.
1732         (vectorizable_reduction): Likewise.
1733         (vectorizable_induction): Likewise.
1734         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1735         cost vector to pass to vectorizable_ and record afterwards.
1736         (vect_model_reduction_cost): Take cost vector argument and adjust.
1737         (vect_model_induction_cost): Likewise.
1738         (vectorizable_reduction): Likewise.
1739         (vectorizable_induction): Likewise.
1740         (vectorizable_live_operation): Likewise.
1741         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1742         SLP_TREE_NUMBER_OF_VEC_STMTS.
1743         (vect_analyze_slp_cost_1): Remove.
1744         (vect_analyze_slp_cost): Likewise.
1745         (vect_slp_analyze_node_operations): Take visited args and
1746         a target cost vector.  Avoid processing already visited stmt sets.
1747         (vect_slp_analyze_operations): Use a local cost vector to gather
1748         costs and register those of non-discarded instances.
1749         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1750         (vect_schedule_slp_instance): Remove copying of
1751         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
1752         zero.
1753         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1754         adding cost.  Record cost entry location.
1755         (vect_prologue_cost_for_slp_op): Function to compute cost of
1756         a constant or invariant generated for SLP vect in the prologue,
1757         split out from vect_analyze_slp_cost_1.
1758         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
1759         (vect_model_promotion_demotion_cost): Likewise.
1760         (vect_model_store_cost): Likewise, make static.
1761         (vect_model_load_cost): Likewise.
1762         (vectorizable_bswap): Add cost vector arg and adjust.
1763         (vectorizable_call): Likewise.
1764         (vectorizable_simd_clone_call): Likewise.
1765         (vectorizable_conversion): Likewise.
1766         (vectorizable_assignment): Likewise.
1767         (vectorizable_shift): Likewise.
1768         (vectorizable_operation): Likewise.
1769         (vectorizable_store): Likewise.
1770         (vectorizable_load): Likewise.
1771         (vectorizable_condition): Likewise.
1772         (vectorizable_comparison): Likewise.
1773         (can_vectorize_live_stmts): Likewise.
1774         (vect_analyze_stmt): Likewise.
1775         (vect_transform_stmt): Adjust calls to vectorizable_*.
1776         * tree-vectorizer.c: Include gimple-pretty-print.h.
1777         (dump_stmt_cost): New function.
1779 2018-05-16  Richard Biener  <rguenther@suse.de>
1781         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1782         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1783         * tree-ssa-dse.c: Include tree-ssa-loop.h.
1784         (check_name): New callback.
1785         (dse_classify_store): Track cycles via a visited bitmap of PHI
1786         defs and simplify handling of in-loop and across loop dead stores
1787         and properly fail for loop-variant refs.  Handle byte-tracking with
1788         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1789         limiting the walk.
1791 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
1793         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1794         (vect_get_mask_type_for_stmt): Likewise.
1795         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1796         split out from...
1797         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
1798         to determine the statement's vector type and the vector type that
1799         should be used for calculating nunits.  Deal with cases in which
1800         the type has to be deferred.
1801         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1802         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
1803         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
1804         (vect_determine_vf_for_stmt): New functions, split out from...
1805         (vect_determine_vectorization_factor): ...here.
1806         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
1807         (vect_get_mask_type_for_stmt): New functions, split out from
1808         vect_determine_vectorization_factor.
1810 2018-05-16  Richard Biener  <rguenther@suse.de>
1812         * tree-cfg.c (verify_gimple_assign_ternary): Properly
1813         verify the [VEC_]COND_EXPR embedded comparison.
1815 2018-05-15  Martin Sebor  <msebor@redhat.com>
1817         PR tree-optimization/85753
1818         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
1819         RECORD_TYPE in addition to ARRAY_TYPE.
1821 2018-05-15  Martin Sebor  <msebor@redhat.com>
1823         PR middle-end/85643
1824         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
1826 2018-05-15  Richard Biener  <rguenther@suse.de>
1828         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
1829         add by_clobber_p one.  Change algorithm to collect all defs
1830         representing uses we need to walk and try reducing them to
1831         a single one before failing.
1832         (dse_dom_walker::dse_optimize_stmt): Adjust.
1834 2018-05-13  Mark Wielaard  <mark@klomp.org>
1836         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
1837         (size_of_loc_descr): Likewise.
1838         (output_loc_operands): Likewise.
1839         (output_loc_operands_raw): Likewise.
1840         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
1841         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
1842         (hash_loc_operands): Likewise.
1843         (compare_loc_operands): Likewise.
1845 2018-05-14  Mark Wielaard  <mark@klomp.org>
1847         * dwarf2out.c (count_index_addrs): New function.
1848         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
1850 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1852         PR tree-optimization/83648
1853         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
1854         return value as malloc candidate.
1856 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1858         PR ipa/85734
1859         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
1860         as true in call to suggest_attribute.
1862 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
1864         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
1865         -mreadonly-in-sdata.
1867 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1869         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
1870         New pattern.
1871         (aarch64_crypto_aesd_fused): Likewise.
1873 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
1875         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
1876         (movsi_aarch64): Likewise.
1877         (load_pairsi): Likewise.
1878         (load_pairdi): Likewise.
1879         (store_pairsi): Likewise.
1880         (store_pairdi): Likewise.
1881         (load_pairsf): Likewise.
1882         (load_pairdf): Likewise.
1883         (store_pairsf): Likewise.
1884         (store_pairdf): Likewise.
1885         (zero_extend): Likewise.
1886         (trunc): Swap alternatives.
1887         (fcvt_target): Add '?' to prefer w over r.
1889 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
1891         PR target/85756
1892         * config/i386/i386.md: Disallow non-commutative arithmetics in
1893         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
1894         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
1895         in the peephole2 before it.
1897 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
1899         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
1900         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
1901         (ix86_handle_option): Handle -mcldemote.
1902         * config.gcc: New header.
1903         * config/i386/cldemoteintrin.h: New file.
1904         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
1905         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1906         -mcldemote.
1907         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1908         OPTION_MASK_ISA_CLDEMOTE.
1909         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
1910         (ix86_valid_target_attribute_inner_p): Ditto.
1911         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
1912         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
1913         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
1914         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
1915         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
1916         (cldemote): New.
1917         * config/i386/i386.opt: Add -mcldemote.
1918         * config/i386/x86intrin.h: New header.
1919         * doc/invoke.texi: Add -mcldemote.
1921 2018-05-14  Richard Biener  <rguenther@suse.de>
1923         * doc/match-and-simplify.texi: Adjust :s documentation.
1925 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
1927         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
1928         intended memcpy size.
1929         (REORDER_45): Likewise.
1931 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
1933         * sort.cc: New file.
1934         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
1935         * vec.c (qsort_chk): Use gcc_qsort.
1936         * Makefile.in (OBJS-libcommon): Add sort.o.
1937         (build/sort.o): New target.  Use it...
1938         (BUILD_RTL): ... here, and...
1939         (build/gencfn-macros): ... here, and...
1940         (build/genmatch): ... here.
1942 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1943             Chung-Ju Wu  <jasonwucj@gmail.com>
1945         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
1946         * config/nds32/nds32-graywolf.md: New file.
1947         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
1948         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
1949         pipeline.
1950         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
1951         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
1952         * config/nds32/nds32.md (pipeline_model): Add graywolf.
1953         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
1954         * config/nds32/pipelines.md: Include n15 settings.
1956 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1957             Chung-Ju Wu  <jasonwucj@gmail.com>
1959         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
1960         * config/nds32/nds32-n13.md: New file.
1961         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
1962         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
1963         pipeline.
1964         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
1965         * config/nds32/nds32.md (pipeline_model): Add n13.
1966         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
1967         * config/nds32/pipelines.md: Include n13 settings.
1969 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
1970             Chung-Ju Wu  <jasonwucj@gmail.com>
1972         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
1973         * config/nds32/nds32-n10.md: New file.
1974         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
1975         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
1976         pipeline.
1977         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
1978         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
1979         * config/nds32/nds32.md (pipeline_model): Add n10.
1980         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
1981         * config/nds32/pipelines.md: Include n10 settings.
1983 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
1984             Kito Cheng  <kito.cheng@gmail.com>
1985             Chung-Ju Wu  <jasonwucj@gmail.com>
1987         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
1988         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
1989         Add enum values for DSP extension instructions.
1990         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
1991         New constraints.
1992         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
1993         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
1994         New code iterators.
1995         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
1996         * config/nds32/nds32-dspext.md: New file for DSP implementation.
1997         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
1998         * config/nds32/nds32-intrinsic.md: Likewise.
1999         * config/nds32/nds32_intrinsic.h: Likewise.
2000         * config/nds32/nds32-md-auxiliary.c: Likewise.
2001         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
2002         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
2003         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
2004         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
2005         * config/nds32/nds32-protos.h: New declarations for DSP extension.
2006         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
2007         TYPE_DMAC in switch statement.
2008         * config/nds32/nds32.c: New checking and implementation for DSP
2009         extension instructions.
2010         * config/nds32/nds32.h: Likewise.
2011         * config/nds32/nds32.md: Likewise.
2012         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
2013         * config/nds32/predicates.md: Implement new predicates for DSP
2014         extension.
2016 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
2018         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
2019         Reformat alternatives and attributes so it is easier to identify
2020         which constraints/attributes go with which instruction.
2021         (mov<mode>_hardfloat32, FMOVE64): Likewise.
2022         (mov<mode>_softfloat32, FMOVE64): Likewise.
2023         (mov<mode>_hardfloat64, FMOVE64): Likewise.
2024         (mov<mode>_softfloat64, FMOVE64): Likewise.
2026 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2028         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2029         subsection.
2030         (Basic PowerPC Built-in Functions): The new name of the
2031         subsection previously known as "PowerPC Built-in Functions".
2032         (Basic PowerPC Built-in Functions Available on all Configurations):
2033         New subsubsection.
2034         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
2035         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
2036         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
2037         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
2039 2018-05-11  Martin Jambor  <mjambor@suse.cz>
2041         PR ipa/85655
2042         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
2043         single const.
2045 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2047         PR target/85733
2048         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
2050 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
2052         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
2053         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
2054         (ix86_handle_option): Handle -mwaitpkg.
2055         * config.gcc: New header.
2056         * config/i386/cpuid.h (bit_WAITPKG): New bit.
2057         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
2058         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
2059         function type.
2060         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2061         OPTION_MASK_ISA_WAITPKG.
2062         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
2063         (ix86_option_override_internal): Add PTA_WAITPKG.
2064         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
2065         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
2066         IX86_BUILTIN_TPAUSE.
2067         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
2068         __builtin_ia32_umwait and __builtin_ia32_tpause.
2069         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
2070         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
2071         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
2072         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
2073         UNSPECV_TPAUSE): New.
2074         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
2075         * config/i386/i386.opt: Add -mwaitpkg.
2076         * config/i386/waitpkgintrin.h: New file.
2077         * config/i386/x86intrin.h: New header.
2078         * doc/invoke.texi: Add -mwaitpkg.
2080 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2082         PR target/85606
2083         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
2084         equivalent.
2085         (cortex-m0): Use armv6s-m isa.
2086         (cortex-m0plus): Likewise.
2087         (cortex-m1): Likewise.
2088         (cortex-m0.small-multiply): Likewise.
2089         (cortex-m0plus.small-multiply): Likewise.
2090         (cortex-m1.small-multiply): Likewise.
2092 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2093             Jakub Jelinek  <jakub@redhat.com>
2095         PR tree-optimization/85692
2096         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
2097         source permute as well.
2099 2018-05-11  Martin Liska  <mliska@suse.cz>
2101         PR sanitizer/85556
2102         * doc/extend.texi: Document LLVM style format for no_sanitize
2103         attribute.
2105 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
2107         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
2108         mode_supports_vsx_dform_quad to mode_supports_dq_form.
2109         (mode_supports_vsx_dform_quad): Likewise.
2110         (mode_supports_vmx_dform): Move these functions to be next to the
2111         other mode_supports functions.
2112         (mode_supports_dq_form): Likewise.
2113         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
2114         mode_supports_dq_form.
2115         (reg_offset_addressing_ok_p): Likewise.
2116         (offsettable_ok_by_alignment): Likewise.
2117         (rs6000_legitimate_offset_address_p): Likewise.
2118         (legitimate_lo_sum_address_p): Likewise.
2119         (rs6000_legitimize_address): Likewise.
2120         (rs6000_legitimize_reload_address): Likewise.
2121         (rs6000_secondary_reload_inner): Likewise.
2122         (rs6000_preferred_reload_class): Likewise.
2123         (rs6000_output_move_128bit): Likewise.
2125 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2127         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
2128         Generate SImode target register for null target.
2129         <case IX86_BUILTIN_XGETBV>: Ditto.
2130         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
2131         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
2133 2018-05-10  Carl Love  <cel@us.ibm.com>
2135         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
2136         dcbtt and dcbtstt if operands[2] is 0.
2138 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2140         PR target/85693
2141         * config/i386/sse.md (usadv64qi): New expander.
2143 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
2145         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
2146         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
2147         -maltivec=be support.
2148         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
2149         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
2150         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
2151         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
2152         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
2153         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
2154         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
2155         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
2156         altivec_vsumsws): Adjust.
2157         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
2158         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
2159         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
2160         support.
2161         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
2162         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
2163         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
2164         (altivec_lve<VI_char>x): Delete expand.
2165         (*altivec_lve<VI_char>x_internal): Rename to...
2166         (altivec_lve<VI_char>x): ... this.
2167         (altivec_lvxl_<mode>): Delete expand.
2168         (*altivec_lvxl_<mode>_internal): Rename to ...
2169         (altivec_lvxl_<mode>): ... this.
2170         (altivec_stvxl_<mode>): Delete expand.
2171         (*altivec_stvxl_<mode>_internal): Rename to ...
2172         (altivec_stvxl_<mode>): ... this.
2173         (altivec_stve<VI_char>x): Delete expand.
2174         (*altivec_stve<VI_char>x_internal): Rename to ...
2175         (altivec_stve<VI_char>x): ... this.
2176         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
2177         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
2178         reduc_plus_scal_<mode>): Adjust.
2179         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
2180         comment.
2181         (rs6000_cpu_cpp_builtins): Adjust.
2182         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
2183         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
2184         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
2185         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
2186         -maltivec=be support.
2187         (rs6000_split_vec_extract_var): Adjust.
2188         (rs6000_split_v4si_init): Adjust.
2189         (swap_selector_for_mode): Delete.
2190         (altivec_expand_lvx_be, altivec_expand_stvx_be,
2191         altivec_expand_stvex_be): Delete.
2192         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
2193         -maltivec=be support.
2194         (rs6000_gimple_fold_builtin): Ditto.
2195         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
2196         Adjust.
2197         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
2198         (TARGET_DIRECT_MOVE_64BIT): Adjust.
2199         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
2200         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
2201         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
2202         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
2203         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
2204         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
2205         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
2206         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
2207         anonymous split): Adjust.
2208         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
2209         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
2211 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
2213         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
2214         when --with-gxx-include-dir is also specified.
2215         * configure: Regenerate.
2217 2018-05-09  Jim Wilson  <jimw@sifive.com>
2219         PR target/84797
2220         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
2221         * config/riscv/t-withmultilib: New.
2222         * config/riscv/withmultilib.h: New.
2223         * doc/install.texi: Document RISC-V --with-multilib-list support.
2225 2018-05-09  Richard Biener  <rguenther@suse.de>
2227         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
2228         vector.
2229         (vect_bb_vectorization_profitable_p): Adjust.  Compute
2230         actual scalar cost using the cost vector and the add_stmt_cost
2231         machinery.
2233 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2235         PR rtl-optimization/85645
2236         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
2237         in the REG_CFA_REGISTER note for LR, don't leave it empty.
2239 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2241         PR rtl-optimization/85645
2242         * shrink-wrap.c (spread_components): Return a boolean saying if
2243         anything was changed.
2244         (try_shrink_wrapping_separate): Iterate spread_components until
2245         nothing changes anymore.
2247 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2249         PR rtl-optimization/85645
2250         * regrename.c (build_def_use): Also kill the chains that include the
2251         destination of a REG_CFA_REGISTER note.
2253 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2255         PR rtl-optimization/85645
2256         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2257         insn that has a REG_CFA_REGISTER note.
2259 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
2261         * cfgexpand.c (expand_clobber): New function.
2262         (expand_gimple_stmt_1): Use it.
2263         * tree-vect-stmts.c (vect_clobber_variable): New function,
2264         split out from...
2265         (vectorizable_simd_clone_call): ...here.
2266         (vectorizable_store): Emit a clobber either side of an
2267         IFN_STORE_LANES sequence.
2268         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2270 2018-05-09  Tom de Vries  <tom@codesourcery.com>
2272         PR target/85626
2273         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2274         (define_insn "trap_if_false"): Add exit after trap.
2276 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2278         PR rtl-optimization/85638
2279         * bb-reorder.c: Include common/common-target.h.
2280         (create_forwarder_block): New function extracted from...
2281         (fix_up_crossing_landing_pad): ...here.  Rename into...
2282         (dw2_fix_up_crossing_landing_pad): ...this.
2283         (sjlj_fix_up_crossing_landing_pad): New function.
2284         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2285         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2286         from both partitions and exit the loop after one iteration.
2288 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2290         Revert:
2291         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2292         subsection.
2293         (Basic PowerPC Built-in Functions): The new name of the
2294         subsection previously known as "PowerPC Built-in Functions".
2295         (Basic PowerPC Built-in Functions Available on all Configurations):
2296         New subsubsection.
2297         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2298         subsubsection.
2299         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2300         subsubsection.
2301         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2302         subsubsection.
2303         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2304         subsubsection.
2306 2018-05-08  Jim Wilson  <jimw@sifive.com>
2308         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
2309         (LD_EMUL_SUFFIX): New.
2310         (LINK_SPEC): Use it.
2312 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2314         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2315         subsection.
2316         (Basic PowerPC Built-in Functions): The new name of the
2317         subsection previously known as "PowerPC Built-in Functions".
2318         (Basic PowerPC Built-in Functions Available on all Configurations):
2319         New subsubsection.
2320         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2321         subsubsection.
2322         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2323         subsubsection.
2324         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2325         subsubsection.
2326         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2327         subsubsection.
2329 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2331         PR target/85683
2332         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
2333         after cmpelim optimization.
2335 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
2337         * config.gcc: Support "goldmont".
2338         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
2339         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2340         PROCESSOR_GOLDMONT.
2341         * config/i386/i386.c (m_GOLDMONT): Define.
2342         (processor_target_table): Add "goldmont".
2343         (PTA_GOLDMONT): Define.
2344         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
2345         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
2346         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
2347         (fold_builtin_cpu): Add "goldmont".
2348         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
2349         (ix86_option_override_internal): Add "goldmont".
2350         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
2351         (processor_type): Add PROCESSOR_GOLDMONT.
2352         * config/i386/i386.md: Add CPU "glm".
2353         * config/i386/glm.md: New file.
2354         * config/i386/x86-tune.def: Add m_GOLDMONT.
2355         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2357 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2359         PR target/85572
2360         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
2361         E_V4DImode.
2362         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
2363         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
2364         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
2366         PR target/85317
2367         * config/i386/i386.c (ix86_fold_builtin): Handle
2368         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2370         PR target/85480
2371         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2372         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2374 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
2376         PR target/85658
2377         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2378         (check_arch): Likewise.
2379         (check_fpu): Return the result rather than printing it.
2380         (end arch): Fix operator precedence.
2381         (end cpu): Likewise.
2382         (END): Print the result from check_fpu.
2384 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2385             Alan Hayward  <alan.hayward@arm.com>
2386             David Sherwood  <david.sherwood@arm.com>
2388         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2389         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2390         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2391         (*fcmuo<mode>_and): New patterns.
2393 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2395         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2396         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2397         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2398         (cmp_op, sve_imm_con): New code attributes.
2399         (SVE_COND_INT_CMP, imm_con): Delete.
2400         (cmp_op): Remove above unspecs from int attribute.
2401         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2402         to...
2403         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
2404         comparison-specific unspecs.
2405         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2406         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2407         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2408         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2409         (*vec_fcm<cmp_op><mode>): Rename to...
2410         (*fcm<cmp_op><mode>): ...this and adjust likewise.
2411         (*vec_fcmuo<mode>): Rename to...
2412         (*fcmuo<mode>): ...this and adjust likewise.
2413         (*pred_fcm<cmp_op><mode>): New pattern.
2414         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2415         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2416         functions.
2417         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2418         and UNORDERED.
2419         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2420         (aarch64_emit_sve_predicated_cond): New function.
2421         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2422         (aarch64_emit_unspec_cond_or): Replace with...
2423         (aarch64_emit_sve_or_conds): ...this new function.  Use
2424         aarch64_emit_sve_ptrue_op for the individual comparisons and
2425         aarch64_emit_binop to OR them together.
2426         (aarch64_emit_inverted_unspec_cond): Replace with...
2427         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
2428         aarch64_emit_sve_ptrue_op for the comparison and
2429         aarch64_emit_unop to invert the result.
2430         (aarch64_expand_sve_vec_cmp_float): Update after the above
2431         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
2433 2018-05-07  Nathan Sidwell  <nathan@acm.org>
2435         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2436         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2437         (Backwards Compatibility): Likewise.
2439 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2441         PR bootstrap/85681
2442         Revert:
2443         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2445         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2446         <prefetch_dynamic_strides>: New const bool field.
2447         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2448         prefetch_dynamic_strides.
2449         (exynosm1_prefetch_tune): Likewise.
2450         (thunderxt88_prefetch_tune): Likewise.
2451         (thunderx_prefetch_tune): Likewise.
2452         (thunderx2t99_prefetch_tune): Likewise.
2453         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2454         (aarch64_override_options_internal): Update to set
2455         PARAM_PREFETCH_DYNAMIC_STRIDES.
2456         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2457         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2458         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2459         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2460         prefetch-dynamic-strides setting.
2462         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2464         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2465         <minimum_stride>: New const int field.
2466         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2467         minimum_stride field.
2468         (exynosm1_prefetch_tune): Likewise.
2469         (thunderxt88_prefetch_tune): Likewise.
2470         (thunderx_prefetch_tune): Likewise.
2471         (thunderx2t99_prefetch_tune): Likewise.
2472         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2473         (aarch64_override_options_internal): Update to set
2474         PARAM_PREFETCH_MINIMUM_STRIDE.
2475         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2476         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2477         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2478         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2479         stride is constant and is below the minimum stride threshold.
2481 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2483         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2484         to 512.
2486 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2488         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2489         <prefetch_dynamic_strides>: New const bool field.
2490         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2491         prefetch_dynamic_strides.
2492         (exynosm1_prefetch_tune): Likewise.
2493         (thunderxt88_prefetch_tune): Likewise.
2494         (thunderx_prefetch_tune): Likewise.
2495         (thunderx2t99_prefetch_tune): Likewise.
2496         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2497         (aarch64_override_options_internal): Update to set
2498         PARAM_PREFETCH_DYNAMIC_STRIDES.
2499         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2500         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2501         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2502         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2503         prefetch-dynamic-strides setting.
2505 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2507         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2508         <minimum_stride>: New const int field.
2509         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2510         minimum_stride field.
2511         (exynosm1_prefetch_tune): Likewise.
2512         (thunderxt88_prefetch_tune): Likewise.
2513         (thunderx_prefetch_tune): Likewise.
2514         (thunderx2t99_prefetch_tune): Likewise.
2515         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2516         (aarch64_override_options_internal): Update to set
2517         PARAM_PREFETCH_MINIMUM_STRIDE.
2518         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2519         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2520         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2521         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2522         stride is constant and is below the minimum stride threshold.
2524 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2526         PR c++/85659
2527         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2528         the type is addressable.  Don't force op into register if it has
2529         BLKmode.
2531 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2533         PR other/77609
2534         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2535         any section for which we don't know a specific type it should have,
2536         regardless of name.  Previously this was done only for the exact
2537         names ".init_array", ".fini_array", and ".preinit_array".
2538         (default_elf_asm_named_section): Add comment about
2539         relationship with default_section_type_flags and SECTION_NOTYPE.
2540         (get_section): Don't consider it a type conflict if one side has
2541         SECTION_NOTYPE and the other doesn't, as long as neither has the
2542         SECTION_BSS et al used in the default_section_type_flags logic.
2544 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2546         PR target/85653
2547         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2548         (workaround_barsyncs): New function.
2549         (nvptx_reorg): Use workaround_barsyncs.
2550         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2551         (define_expand "nvptx_membar_cta"): New define_expand.
2552         (define_insn "*nvptx_membar_cta"): New insn.
2554 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2556         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2557         To improve optimization opportunities.
2558         * builtin-types.def: The new needed builtin types for the above.
2560 2018-05-04  Richard Biener  <rguenther@suse.de>
2562         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2563         * gimple-ssa-store-merging.c
2564         (imm_store_chain_info::output_merged_store): Remove redundant create,
2565         release split_store vector contents on failure.
2566         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2567         scalar stmt vector on cache hit.
2569 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2571         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2572         Xilinx FP support.
2573         * config.gcc (powerpc-xilinx-eabi*): Remove.
2574         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2575         support.
2576         (fusion_addis_mem_combo_load): Ditto.
2577         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2578         FP support.
2579         (rs6000_cpu_cpp_builtins): Ditto.
2580         * config/rs6000/rs6000-linux.c
2581         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2582         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2583         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2584         support.
2585         (rs6000_setup_reg_addr_masks): Ditto.
2586         (rs6000_init_hard_regno_mode_ok): Ditto.
2587         (rs6000_option_override_internal): Ditto.
2588         (legitimate_lo_sum_address_p): Ditto.
2589         (rs6000_legitimize_address): Ditto.
2590         (rs6000_legitimize_reload_address): Ditto.
2591         (rs6000_legitimate_address_p): Ditto.
2592         (abi_v4_pass_in_fpr): Ditto.
2593         (setup_incoming_varargs): Ditto.
2594         (rs6000_gimplify_va_arg): Ditto.
2595         (rs6000_split_multireg_move): Ditto.
2596         (rs6000_savres_strategy): Ditto.
2597         (rs6000_emit_prologue_components): Ditto.
2598         (rs6000_emit_epilogue_components): Ditto.
2599         (rs6000_emit_prologue): Ditto.
2600         (rs6000_emit_epilogue): Ditto.
2601         (rs6000_elf_file_end): Ditto.
2602         (rs6000_function_value): Ditto.
2603         (rs6000_libcall_value): Ditto.
2604         * config/rs6000/rs6000.h: Ditto.
2605         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2606         (TARGET_MINMAX): ... this.  New.
2607         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2608         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2609         (*movsi_internal1_single): Delete.
2610         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2611         mfpu=, mxilinx-fpu): Delete.
2612         * config/rs6000/singlefp.h: Delete.
2613         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2614         * config/rs6000/t-rs6000: Ditto.
2615         * config/rs6000/t-xilinx: Delete.
2616         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2617         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2618         (VStype_simple): Delete.
2619         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2620         * config/rs6000/xfpu.h: Delete.
2621         * config/rs6000/xfpu.md: Delete.
2622         * config/rs6000/xilinx.h: Delete.
2623         * config/rs6000/xilinx.opt: Delete.
2624         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2625         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2627 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2629         PR libgomp/85639
2630         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2631         if ignore == 0.
2633 2018-05-04  Richard Biener  <rguenther@suse.de>
2635         PR middle-end/85627
2636         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2637         (expand_complex_div_wide): Likewise.
2638         (expand_complex_operations_1): Likewise.
2639         (expand_complex_libcall): Preserve EH info of the original stmt.
2640         (tree_lower_complex): Handle removed blocks.
2641         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2642         on complex multiplication and division libcall builtins.
2644 2018-05-04  Richard Biener  <rguenther@suse.de>
2646         PR middle-end/85574
2647         * fold-const.c (negate_expr_p): Restrict negation of operand
2648         zero of a division to when we know that can happen without
2649         overflow.
2650         (fold_negate_expr_1): Likewise.
2652 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2654         PR libstdc++/85466
2655         * real.h (real_nextafter): Declare.
2656         * real.c (real_nextafter): New function.
2657         * fold-const-call.c (fold_const_nextafter): New function.
2658         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2659         CASE_CFN_NEXTTOWARD.
2660         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2661         even when arg1_mode is different from arg0_mode.
2663 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2665         * doc/extend.texi (Deprecated Features): Remove
2666         -ffriend-injection.
2667         (Backwards Compatibility): Likewise.
2668         * doc/invoke.texi (C++ Language Options): Likewise.
2669         (C++ Dialect Options): Likewise.
2671 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2673         PR target/85530
2674         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2675         _mm512_mask_mullox_epi64): New intrinsics.
2677 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2679         PR testsuite/85106
2680         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2681         dump files): Add offload-tree.
2683 2018-05-03  Richard Biener  <rguenther@suse.de>
2685         PR tree-optimization/85615
2686         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2687         to loops not nested in BBs loop father to avoid creating multi-entry
2688         loops.
2690 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2692         PR tree-optimization/70291
2693         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2694         arguments.  Change return type to tree.  Emit libcall as a new
2695         statement rather than replacing existing one when inplace_p is true.
2696         (expand_complex_multiplication_components): New function.
2697         (expand_complex_multiplication): Expand floating-point complex
2698         multiplication using the above.
2699         (expand_complex_division): Rename inner_type parameter to type.
2700         Update expand_complex_libcall call-site.
2701         (expand_complex_operations_1): Update expand_complex_multiplication
2702         and expand_complex_division call-sites.
2704 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2706         PR target/85582
2707         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2708         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2709         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2710         the highest significant bit of the shift count mask is clear.  In
2711         check whether and[sq]i3 is needed verify that all significant bits
2712         of the shift count other than the highest are set.
2714 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2716         PR libgomp/82428
2717         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2718         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2719         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2720         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2721         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2722         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2723         __builtin_goacc_parlevel_size.
2725 2018-05-02  Richard Biener  <rguenther@suse.de>
2727         PR tree-optimization/85597
2728         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2729         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2730         directly.
2732 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2734         PR testsuite/85106
2735         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2736         dump files): Add ltrans-tree.
2738 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2740         PR testsuite/85106
2741         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2742         dump files): Add wpa-ipa.
2744 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2746         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
2747         powerpc*-*-linux*paired* target.
2748         * config/rs6000/750cl.h: Delete.
2749         * config/rs6000/paired.h: Delete.
2750         * config/rs6000/paired.md: Delete.
2751         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2752         float support.
2753         * config/rs6000/rs6000-builtin.def: Remove paired float support.
2754         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2755         comment.  Remove paired float support.
2756         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2757         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2758         VECTOR_PAIRED.
2759         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2760         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2761         declarations.
2762         * config/rs6000/rs6000.c: Remove paired float support.
2763         (paired_expand_vector_init, paired_expand_vector_move,
2764         paired_emit_vector_compare, paired_emit_vector_cond_expr,
2765         (paired_expand_lv_builtin, paired_expand_stv_builtin,
2766         paired_expand_builtin, paired_expand_predicate_builtin,
2767         paired_init_builtins): Delete.
2768         * config/rs6000/rs6000.h: Remove paired float support.
2769         * config/rs6000/rs6000.md: Remove paired float support.
2770         (move_from_CR_ov_bit): Delete.
2771         * config/rs6000/rs6000.opt (mpaired): Delete.
2772         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2773         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2775 2018-05-02  Richard Biener  <rguenther@suse.de>
2777         PR middle-end/85567
2778         * gimplify.c (gimplify_save_expr): When in SSA form allow
2779         SAVE_EXPRs to compute to SSA vars.
2781 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2783         PR target/85582
2784         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2785         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2786         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2787         clobber operands[2], instead use a new pseudo.  Formatting fixes.
2789 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
2791         PR tree-optimization/85586
2792         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2793         exit early for statements in the same group if the accesses are
2794         not strided.
2796 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2798         PR lto/85451
2799         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2800         error message.
2802 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
2804         PR tree-optimization/85143
2805         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2807 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2809         PR lto/85451
2810         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
2811         not found" error message.
2813 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2815         PR other/83786
2816         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
2817         * vec.c (test_ordered_remove_if): New function.
2818         (vec_c_tests): Call test_ordered_remove_if.
2819         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
2820         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
2821         * tree-vect-patterns.c (vect_pattern_recog_1): Use
2822         VEC_ORDERED_REMOVE_IF.
2824 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2826         PR tree-optimization/82665
2827         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
2828         pointer subtraction where arguments come from a memchr call.
2830 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
2832         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
2833         --push-state --as-needed and --pop-state instead of --as-needed and
2834         --no-as-needed if ld supports it.
2835         * configure: Regenerated.
2837         PR web/85578
2838         * doc/install.texi2html: Replace _002d with - and _002a with * in
2839         generated html files using sed.
2841 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2843         PR c++/85523
2844         * gcc-rich-location.c (blank_line_before_p): New function.
2845         (use_new_line): New function.
2846         (gcc_rich_location::add_fixit_insert_formatted): New function.
2847         * gcc-rich-location.h
2848         (gcc_rich_location::add_fixit_insert_formatted): New function.
2850 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2852         * selftest.c (assert_streq): Rename "expected" and "actual" to
2853         "val1" and "val2".  Extend NULL-handling to cover both inputs
2854         symmetrically, while still requiring both to be non-NULL for a pass.
2855         * selftest.h (assert_streq): Rename "expected" and "actual" to
2856         "val1" and "val2".
2857         (ASSERT_EQ): Likewise.
2858         (ASSERT_EQ_AT): Likewise.
2859         (ASSERT_KNOWN_EQ): Likewise.
2860         (ASSERT_KNOWN_EQ_AT): Likewise.
2861         (ASSERT_NE): Likewise.
2862         (ASSERT_MAYBE_NE): Likewise.
2863         (ASSERT_MAYBE_NE_AT): Likewise.
2864         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
2865         the assertion to pass.
2866         (ASSERT_STREQ_AT): Likewise.
2868 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
2870         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
2871         interaction with -pie.
2873 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2875         * selftest.h: Fix alphabetization of per-source-file selftest
2876         declarations.
2878 2018-04-30  Jason Merrill  <jason@redhat.com>
2880         PR c++/61982 - dead stores to destroyed objects.
2881         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
2882         of clobber.
2884 2018-04-30  Jason Merrill  <jason@redhat.com>
2886         * tree.c (build_clobber): New.
2887         * tree.h: Declare it.
2888         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
2890 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2892         * diagnostic-show-locus.c (layout::layout): Update for
2893         location_get_source_line returning a char_span.
2894         (struct char_span): Move to input.h.
2895         (struct correction): Update for fields in char_span becoming
2896         private.
2897         (struct source_line): Update for location_get_source_line
2898         returning a char_span.
2899         (layout::print_line): Likewise.
2900         * edit-context.c (edited_file::print_content): Likewise.
2901         (edited_file::print_diff_hunk): Likewise.
2902         (edited_file::print_run_of_changed_lines): Likewise.
2903         (edited_file::get_num_lines): Likewise.
2904         (edited_line::edited_line): Likewise.
2905         * final.c (asm_show_source): Likewise.
2906         * input.c (location_get_source_line): Convert return type
2907         from const char * to char_span, losing the final "line_len"
2908         param.
2909         (dump_location_info): Update for the above.
2910         (get_substring_ranges_for_loc): Likewise.  Use a char_span
2911         when handling the literal within the line.
2912         (test_reading_source_line): Update for location_get_source_line
2913         returning a char_span.
2914         * input.h (class char_span): Move here from
2915         diagnostic-show-locus.c, converting from a struct to a class.
2916         Make data members private.
2917         (char_span::operator bool): New.
2918         (char_span::length): New.
2919         (char_span::get_buffer): New.
2920         (char_span::operator[]): New.
2921         (char_span::subspan): Make const.
2922         (char_span::xstrdup): New.
2923         (location_get_source_line): Convert return type from const char *
2924         to char_span, losing the final "line_size" param.
2926 2018-04-30  Jan Hubicka  <jh@suse.cz>
2928         * lto-wrapper.c (ltrans_priorities): New static var.
2929         (cmp_priority): New.
2930         (run_gcc): Read priorities and if doing parallel build order
2931         the Makefile by them.
2933 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
2935         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2937 2018-04-30  Richard Biener  <rguenther@suse.de>
2939         * tree-cfg.c (verify_address): Remove base argument, add
2940         flag whether to check TREE_ADDRESSABLE and do that.
2941         (verify_expr): Remove.
2942         (verify_types_in_gimple_reference): Add pieces from verify_expr.
2943         (verify_gimple_assign_single): Likewise.
2944         (verify_gimple_switch): Likewise.
2945         (verify_expr_location_1): Dereference tp once.  Add (disabled)
2946         piece from verify_expr.
2947         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
2949 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2951         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2953 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2955         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
2956         (small_data_pattern): Likewise.
2957         (arc_rewrite_small_data): Likewise.
2958         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
2959         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
2960         (get_symbol_alignment): New function.
2961         (legitimate_small_data_address_p): Likewise.
2962         (legitimate_scaled_address): Update, call
2963         legitimate_small_data_address_p.
2964         (output_sdata): New static variable.
2965         (arc_print_operand): Update how we handle small data operands.
2966         (arc_print_operand_address): Likewise.
2967         (arc_legitimate_address_p): Update, use
2968         legitimate_small_data_address_p.
2969         (arc_rewrite_small_data_p): Remove.
2970         (arc_rewrite_small_data_1): Likewise.
2971         (arc_rewrite_small_data): Likewise.
2972         (small_data_pattern): Likewise.
2973         (compact_sda_memory_operand): Update to use
2974         legitimate_small_data_address_p and get_symbol_alignment.
2975         (prepare_move_operands): Don't rewite sdata pattern.
2976         (prepare_extend_operands): Remove.
2977         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
2978         pattern.
2979         (zero_extendqisi2): Likewise.
2980         (zero_extendhisi2): Likewise.
2981         (extendqihi2): Likewise.
2982         (extendqisi2): Likewise.
2983         (extendhisi2): Likewise.
2984         (addsi3): Likewise.
2985         (subsi3): Likewise.
2986         (andsi3): Likewise.
2987         * config/arc/constraints.md (Usd): Change it to memory constraint.
2989 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
2991         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
2992         as source of std instructions.
2993         * config/arc/arc.md (movsi_insn): Update pattern predicate to
2994         allow 6-bit constants as source for store instructions.
2995         (movdi_insn): Update instruction pattern to allow 6-bit constants
2996         as source for store instructions.
2998 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
3000         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
3002 2018-04-30  Nathan Sidwell  <nathan@acm.org>
3003             Sandra Loosemore <sandra@codesourcery.com>
3005         * dumpfile.c (dump_open): Allow '-' for stdout.
3006         * doc/invoke.texi (Developer Options): Document dump filename
3007         determination early.  Document stdin/stdout selection.
3009 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
3011         Microblaze Target: PIC data text relative
3013         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
3014         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
3015         Add declaration.
3016         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
3017         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
3018         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
3019         New addressing mode for data-text relative position indepenedent code.
3020         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
3021         'ADDRESS_SYMBOLIC_TXT_REL'.
3022         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
3023         (microblaze_legitimate_pic_operand): Exclude function calls from
3024         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
3025         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
3026         addresses cases.
3027         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3028         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3029         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
3030         for 'address + offset'.
3031         (microblaze_expand_prologue): Add new function prologue call for
3032         'r20' assignation.
3033         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
3034         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
3035         table in case of TARGET_PIC_DATA_TEXT_REL.
3036         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
3037         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
3038         Add new macros 'UNSPEC_TEXT',
3039         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
3040         + exclude function calls from 'UNSPEC_PLT' in case of data text
3041         relative mode.
3042         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3043         new target hook for generating address diff vector tables in case of
3044         flag_pic.
3045         * doc/tm.texi : Regenerate.
3046         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
3047         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
3048         of addr diff vector generation.
3049         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3050         target hook definition.
3051         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
3052         Add default function for generate_pic_addr_diff_vec -> flag_pic.
3053         * doc/invoke.texi (Add new pic option): Add new microblaze pic
3054         option for data text relative.
3056 2018-04-30  Richard Biener  <rguenther@suse.de>
3058         * tree-chrec.h (evolution_function_is_constant_p): Remove
3059         redundant check.
3060         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
3062 2018-04-30  Richard Biener  <rguenther@suse.de>
3064         PR bootstrap/85571
3065         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
3067 2018-04-30  Richard Biener  <rguenther@suse.de>
3069         PR tree-optimization/28364
3070         PR tree-optimization/85275
3071         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
3072         copying first exit test.
3074 2018-04-28  Mark Wielaard  <mark@klomp.org>
3076         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
3077         dwarf_version >= 5.
3078         (dwarf_AT): Handle DW_AT_addr_base.
3079         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
3081 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
3083         PR target/84431
3084         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
3085         (*ashl<dwi>3_doubleword_mask_1): Ditto.
3086         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
3087         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
3089 2018-04-28  Richard Biener  <rguenther@suse.de>
3091         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
3092         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
3093         to reflect use.  Only add interesting stmts.
3095 2018-04-27  Martin Jambor  <mjambor@suse.cz>
3097         PR ipa/85549
3098         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
3099         the jump function allows for passing through aggregate values.
3101 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
3103         * input.h (in_system_header_at): Convert from macro to inline
3104         function.
3105         (from_macro_expansion_at): Likewise.
3106         (from_macro_definition_at): Likewise.
3108 2018-04-27  Jeff Law  <law@redhat.com>
3110         * config.gcc: Mark tile* targets as deprecated/obsolete.
3112 2018-04-27  Richard Biener  <rguenther@suse.de>
3114         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
3115         fix for ILP32.
3117 2018-04-27  Richard Biener  <rguenther@suse.de>
3119         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
3121 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
3123         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
3124         with Yd constraint. Set "preferred_for_speed" attribute from
3125         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
3126         with Yd constraint.
3127         (*movdi_internal): Ditto.
3128         (movti_interunit splitters): Remove
3129         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
3130         (movdi_interunit splitters): Ditto.
3131         * config/i386/constraints.md (Ye): Remove.
3132         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
3134 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3136         PR target/85512
3137         * config/aarch64/constraints.md (Usg): Limit to 31.
3138         (Usj): Limit to 63.
3140 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
3142         PR tree-optimization/85529
3143         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
3144         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
3145         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
3146         zero extension or masking of the MSB bit.
3147         (optimize_range_tests): Add FIRST_BB argument, pass it through
3148         to optimize_range_tests_var_bound.
3149         (maybe_optimize_range_tests, reassociate_bb): Adjust
3150         optimize_range_tests callers.
3152 2018-04-26  Richard Biener  <rguenther@suse.de>
3153             Jakub Jelinek  <jakub@redhat.com>
3155         * cgraph.h (symbol_table): Just declare debug method here.
3156         * symtab.c (symbol_table::debug): Define.
3158 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
3160         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
3162 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
3164         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
3165         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
3166         (*movdi_internal): Substitute Yi and Yj constraint with x
3167         and Ym and Yn constraint with y constraint.  Update "isa"
3168         attribute and set "preferred_for_speed" attribute from
3169         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
3170         (*movsi_internal): Ditto.
3171         (*movdf_internal): Ditto.
3172         (*movsf_internal): Ditto.
3173         (*zero_extendsidi2): Ditto.
3174         * config/i386/sse.md (vec_set<mode>_0): Ditto.
3175         (sse2_loadld): Ditto.
3176         (*vec_extract<ssevecmodelower>_0): Ditto.
3177         (*vec_extractv4si_0_zext_sse4): Ditto.
3178         (vec_concatv2di): Ditto.
3179         (*vec_dup<mode>): Ditto.
3180         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
3181         * config/i386/constraints.md (Yi): Remove.
3182         (Yj): Remove.
3183         (Ym): Remove.
3184         (Yn): Remove.
3186 2018-04-26  Nathan Sidwell  <nathan@acm.org>
3188         * dumpfile.c (dump_open): New.
3189         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
3190         (dump_finish): Detect stdio/stderr by value not name.
3192 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
3194         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
3196 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3198         PR target/84952
3199         * config/nvptx/nvptx.c (verify_neutering_jumps)
3200         (verify_neutering_labels): New function
3201         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
3203 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3205         PR target/84025
3206         * config/nvptx/nvptx.c (needs_neutering_p): New function.
3207         (nvptx_single): Use needs_neutering_p to skip over insns that do not
3208         need neutering.
3210 2018-04-26  Richard Biener <rguenther@suse.de>
3211             Tom de Vries  <tom@codesourcery.com>
3213         PR lto/85422
3214         * lto-streamer-out.c (output_function): Fixup loops if required to match
3215         discovery done in the reader.
3217 2018-04-26  Richard Biener  <rguenther@suse.de>
3219         PR tree-optimization/85116
3220         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
3221         have a loop exit from the single latch predecessor.  Remove
3222         case of header with just condition.
3223         (ch_base::copy_headers): Exclude infinite loops from any
3224         processing.
3225         (pass_ch::execute): Record exits.
3227 2018-04-26  Richard Biener  <rguenther@suse.de>
3229         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
3230         prologue cost vector and pass it to vect_get_load_cost.
3231         (vect_get_peeling_costs_all_drs): Likewise.
3232         (vect_peeling_hash_get_lowest_cost): Likewise.
3233         (vect_enhance_data_refs_alignment): Likewise.
3235 2018-04-26  Richard Biener  <rguenther@suse.de>
3237         PR middle-end/85450
3238         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
3239         checking of integer<->pointer conversions.
3240         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
3241         sign-/zero-extending pointer types.
3242         (expand_omp_for_static_chunk): Likewise.
3244 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
3245             Jean Lee  <xiaoyur347@gmail.com>
3247         * config/mips/mips.c (mips_asan_shadow_offset): New function.
3248         (TARGET_ASAN_SHADOW_OFFSET): Define.
3249         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
3250         true for -fsanitize=address.
3252 2018-04-25  Mark Wielaard  <mark@klomp.org>
3254         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3255         shorter ones.
3257 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3259         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3260         than "alu", remove explicit "memory" and "imm_disp" attributes.
3261         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3263         PR middle-end/85414
3264         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3265         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3266         gen_lowpart_no_emit.
3268 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
3270         PR target/85473
3271         * config/i386/i386.c (ix86_expand_builtin): Change memory
3272         operand to XI, extend p0 to Pmode.
3273         * config/i386/i386.md: Change unspec volatile and operand
3274         1 mode to XI, change operand 0 mode to P.
3276 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3278         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3279         GET_MODE_MASK before any checking.
3280         (nds32_can_use_bset_p): Likewise.
3281         (nds32_can_use_btgl_p): Likewise.
3283 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3285         * config/nds32/nds32-doubleword.md: New define_split pattern for
3286         illegal register number.
3288 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3290         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3292 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3294         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3296 2018-04-25  Richard Biener  <rguenther@suse.de>
3298         * lto-streamer.h (LTO_major_version): Bump to 8.
3300 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3302         * BASE-VER: Set to 9.0.0.
3304 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
3306         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
3307         in __abskf2 and __powikf2.
3309 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3311         PR target/85512
3312         * config/aarch64/constraints.md (Usg, Usj): New constraints.
3313         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
3314         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
3315         Use the above on operand 2.  Reindent.
3316         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
3318 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3320         PR target/85485
3321         * common/config/i386/i386-common.c (ix86_handle_option): Don't
3322         handle OPT_mcet.
3323         * config/i386/i386.opt (mcet): Removed.
3324         * doc/install.texi: Remove -mcet documentation.
3325         * doc/invoke.texi: Likewise.
3327 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3329         PR target/85485
3330         * doc/install.texi: Remove -mcet from bootstrap-cet.
3332 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3334         PR target/85511
3335         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
3336         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
3337         if TARGET_64BIT.
3339         PR target/85503
3340         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
3341         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
3342         containing a CONST_VECTOR.
3344 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
3346         * doc/install.texi: Update newlib dependency for nvptx.
3348 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3350         PR target/85508
3351         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
3352         instead of INTVAL when shifting x left.
3354 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
3356         PR tree-optimization/85478
3357         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
3358         vect_grouped_store_supported for single element vectors.
3360 2018-04-24  Richard Biener  <rguenther@suse.de>
3362         PR target/85491
3363         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
3364         load cost increase to the case of non-constant step.
3366 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3368         PR target/84828
3369         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3370         destination if any_malformed_asm.
3372 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
3374         PR middle-end/85496
3375         * expr.c (store_field): In the bitfield case, if the value comes from
3376         a function call and is returned in registers by means of a PARALLEL,
3377         do not change the mode of the temporary unless BLKmode and VOIDmode.
3379 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
3381         PR rtl-optimization/85423
3382         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3383         dependencies to debug insns when the previous insn is non-debug.
3385 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3387         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3388         enums into a single definition.
3389         (fls): Fix predicates and printing.
3390         (seti): Likewise.
3392 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3394         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3395         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3396         and short u6 immediate.
3397         (check_if_valid_sleep_operand): Remove.
3398         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3400 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3402         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3403         flag_always_save_lp condition.
3404         * config/nds32/nds32.opt (malways-save-lp): New option.
3406 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3408         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3409         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3410         * config/nds32/nds32.h
3411         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3412         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3414 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3416         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3417         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3419 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3420             Chung-Ju Wu  <jasonwucj@gmail.com>
3422         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3423         Declare.
3424         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3425         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3427 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3429         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3431 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3433         * config/nds32/nds32-protos.h (nds32_data_alignment,
3434         nds32_local_alignment): Declare.
3435         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3436         nds32_local_alignment): New functions.
3437         (TARGET_CONSTANT_ALIGNMENT): Define.
3438         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3440 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3442         * config/nds32/nds32.c
3443         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3444         (TARGET_MODES_TIEABLE_P): Likewise.
3446 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3448         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3449         level Ofast and Og.
3451 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
3452             Chung-Ju Wu  <jasonwucj@gmail.com>
3454         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3455         for unaligned access.
3456         * config/nds32/nds32-intrinsic.c: Implementation of expanding
3457         unaligned access.
3458         * config/nds32/nds32-intrinsic.md: Likewise.
3459         * config/nds32/nds32_intrinsic.h: Likewise.
3460         * config/nds32/nds32.h (nds32_builtins): Likewise.
3461         * config/nds32/nds32.opt (munaligned-access): New option.
3462         * config/nds32/nds32.c (nds32_asm_file_start): Display
3463         flag_unaligned_access status.
3465 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3467         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3468         -mno-relax is present.
3469         * config/riscv/linux.h (LINK_SPEC): Ditto.
3471 2018-04-20  Martin Sebor  <msebor@redhat.com>
3473         PR c/85365
3474         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3475         for null pointers.
3476         (gimple_fold_builtin_stxcpy_chk): Same.
3477         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3479 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
3481         PR target/85456
3482         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3483         __powikf2 when long double is IEEE 128-bit.
3485 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3487         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3488         step to make sure stack always aligned.
3490 2018-04-20  Carl Love  <cel@us.ibm.com>
3492         PR target/83402
3493         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3494         size check for arg0.
3496 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3497             Tom de Vries  <tom@codesourcery.com>
3499         PR target/85445
3500         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3501         Emit insns for calls too.
3502         (nvptx_find_par): Always look for worker-level predecessor insn.
3503         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3504         calls.
3505         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3506         (nvptx_process_pars): Propagate frames for calls.
3508 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3510         PR target/85469
3511         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3512         Removed.
3513         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3514         (ix86_handle_option): Don't handle OPT_mibt.
3515         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3516         __SHSTK__.
3517         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3518         has_ibt and ibt.
3519         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3520         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3521         (ix86_target_macros): Define __CET__ with flag_cf_protection
3522         for -fcf-protection.
3523         * config/i386/i386.c (isa2_opts): Remove -mibt.
3524         * config/i386/i386.h (TARGET_IBT): Removed.
3525         (TARGET_IBT_P): Likewise.
3526         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3527         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3528         * config/i386/i386.opt (mcet): Update help message.
3529         (mshstk): Likewise.
3530         (mibt): Removed.
3531         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3532         -mcet as an alias for -mshstk.
3534 2018-04-20  Richard Biener <rguenther@suse.de>
3536         PR middle-end/85475
3537         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3538         complexity by forcing a single use of the multiply operand.
3540 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3542         ipa/85449
3543         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3544         recursion dependency to only apply to non-clones.
3546 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3548         ipa/85447
3549         * ipa-cp.c (create_specialized_node): Check that clones of
3550         self-recursive edges exist during IPA-CP.
3552 2018-04-19  Toon Moene  <toon@moene.org>
3554         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3555         by -O3. 
3557 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3559         PR tree-optimization/85467
3560         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3561         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3562         VECTOR_CST element to type.
3564 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3566         PR target/85397
3567         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3568         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3569         (builtin_longjmp): Likewise.
3570         (save_stack_nonlocal): New pattern.
3571         (restore_stack_nonlocal): Likewise.
3573 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3575         PR target/85404
3576         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3577         Replace ASM_OUTPUT_LABEL with fprintf.
3579 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3581         PR target/85417
3582         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3583         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3584         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3585         define __IBT__ and __SHSTK__ for -fcf-protection.
3586         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3587         TARGET_IBT.
3588         (ix86_trampoline_init): Likewise.
3589         (x86_output_mi_thunk): Likewise.
3590         (ix86_notrack_prefixed_insn_p): Likewise.
3591         (ix86_option_override_internal): Don't disallow -fcf-protection.
3592         * config/i386/i386.md (rdssp<mode>): Also enable for
3593         -fcf-protection.
3594         (incssp<mode>): Likewise.
3595         (nop_endbr): Likewise.
3596         * config/i386/i386.opt (mcet): Change help message to built-in
3597         functions only.
3598         (mibt): Likewise.
3599         (mshstk): Likewise.
3600         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3601         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3602         enable CET built-in functions.
3604 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3606         * common/config/i386/i386-common.c 
3607         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3608         OPTION_MASK_ISA_MOVDIRI_UNSET,
3609         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3610         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3611         * config.gcc (movdirintrin.h): New header.
3612         * config/i386/cpuid.h (bit_MOVDIRI,
3613         bit_MOVDIR64B): New bits.
3614         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3615         and -mmvodir64b.
3616         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3617         (VOID, PVOID, PCVOID)): New function types.
3618         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3619         __builtin_ia32_directstoreu_u64,
3620          __builtin_ia32_movdir64b): New builtins.
3621         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3622         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3623         and -mmovdiri.
3624         (ix86_valid_target_attribute_inner_p): Ditto.
3625         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3626         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3627         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3628         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3629         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3630         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3631         (movdiri<mode>, movdir64b_<mode>): New.
3632         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3633         * config/i386/immintrin.h: Include movdirintrin.h.
3634         * config/i386/movdirintrin.h: New file.
3635         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3637 2018-04-19  Richard Biener  <rguenther@suse.de>
3639         PR middle-end/85455
3640         * cfg.c (clear_bb_flags): When loop state says we have
3641         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3643 2018-04-19  Richard Biener  <rguenther@suse.de>
3645         PR tree-optimization/84737
3646         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3647         copying restrict info.
3648         (vect_setup_realignment): Use it.
3649         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3650         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3651         the first DR to all generated stores.
3652         (vectorizable_load): Likewise for loads.
3654 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3656         PR tree-optimization/85446
3657         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3658         the integral and pointer types to have the same precision.
3660         * doc/install.texi: Document --disable-cet being the default and
3661         --enable-cet=auto.
3663 2018-04-18  Martin Liska  <mliska@suse.cz>
3665         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3666         style.
3668 2018-04-18  Martin Liska  <mliska@suse.cz>
3670         Revert
3671         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3673         PR ipa/83983
3674         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3675         arguments if they are comparable.
3677 2018-04-18  Martin Liska  <mliska@suse.cz>
3679         Revert
3680         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3682         PR lto/84805
3683         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3684         incomplete types.
3686 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3688         PR target/85388
3689         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3690         ENDBR after calling __morestack.
3692 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3694         PR jit/85384
3695         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3696         by using gcc_base_ver to generate a gcc_driver_version, and use
3697         it when generating GCC_DRIVER_NAME.
3698         * configure: Regenerate.
3700 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3702         PR target/81084
3703         * config.gcc: Obsolete powerpc*-*-*spe*.
3705 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3707         PR debug/84637
3708         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3709         (stabstr_D): Change type of unum from unsigned int to
3710         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3711         type.
3713 2018-04-17  Jim Wilson  <jimw@sifive.com>
3715         PR 84856
3716         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3717         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3718         Set arg_pointer_offset after using pretend_args_size.
3720 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3722         PR rtl-optimization/85431
3723         * dse.c (record_store): Ignore zero width stores.
3725         PR sanitizer/85230
3726         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3727         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3728         __builtin_stack_restore rather than after it.
3729         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3730         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3731         argument instead of virtual_dynamic_stack_rtx.
3733 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3735         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3736         New prototype.
3737         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3738         Add note to error message to explain internal mapping of overloaded
3739         built-in function name to non-overloaded built-in function name.
3740         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3741         function.
3743 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3745         PR target/85424
3746         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3747         where the inputs overlap with the output.
3749 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3751         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3752         (=v, v) alternative and explicit "memory" attribute.
3753         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
3754         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3755         attributes.
3756         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3757         "sselog1" type instead of "sselog".
3758         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3759         "sselog".  Remove explicit "memory" attribute.
3760         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3761         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3762         attributes.
3763         (vec_extract_hi_v32hi): Merge all alternatives into one, use
3764         "sselog1" type instead of "sselog".  Remove explicit "memory"
3765         attribute.
3766         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3767         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3768         attribute.
3769         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3770         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3771         attributes.
3772         (vec_extract_hi_v64qi): Merge all alternatives into one, use
3773         "sselog1" type instead of "sselog".  Remove explicit "memory"
3774         attribute.
3775         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3776         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3777         attribute.
3779         PR target/85430
3780         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3782         PR middle-end/85414
3783         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3784         on a SUBREG.
3786 2018-04-17  Martin Jambor  <mjambor@suse.cz>
3788         PR ipa/85421
3789         * ipa-cp.c (create_specialized_node): Call
3790         expand_all_artificial_thunks if necessary.
3792 2018-04-17  Martin Liska  <mliska@suse.cz>
3794         PR lto/85405
3795         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3796         in message, remote space in between '_G' and '('.
3798 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3800         PR target/85281
3801         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3802         avx512f_vmcmp<mode>3<round_saeonly_name>,
3803         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
3804         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
3805         avx512f_rndscale<mode><round_saeonly_name>,
3806         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
3807         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
3808         Use %<iptr>2 instead of %2 for -masm=intel.
3809         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
3810         avx512f_vcvttss2usi<round_saeonly_name>,
3811         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
3812         -masm=intel.
3813         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
3814         avx512f_vcvttsd2usi<round_saeonly_name>,
3815         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
3816         Use %q1 instead of %1 for -masm=intel.
3817         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
3818         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
3819         of %3 for -masm=intel.
3820         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
3821         -masm=intel.
3822         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
3823         -masm=intel.
3824         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
3825         -masm=intel.
3826         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
3827         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
3828         %g1.
3829         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
3830         -masm=intel.
3831         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
3832         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
3833         %g1 and one with %0 and %1.
3834         (avx512er_vmrcp28<mode><round_saeonly_name>,
3835         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
3836         %1 for -masm=intel.
3837         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
3838         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
3839         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
3840         of %0 and %{%4%} for -masm=intel.
3841         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
3842         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
3843         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
3844         order of %0 and %{%5%}%{z%} for -masm=intel.
3846 2018-04-17  Jan Hubicka  <jh@suse.cz>
3848         PR lto/85405
3849         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
3851 2018-04-17  Martin Liska  <mliska@suse.cz>
3853         PR ipa/85329
3854         * multiple_target.c (create_dispatcher_calls): Set apostrophes
3855         for target_clone error message.  Make default implementation
3856         clone to be a local declaration.
3857         (separate_attrs): Add new argument and check for an empty
3858         string.
3859         (expand_target_clones): Handle it.
3860         (ipa_target_clone): Make redirection just for target_clones
3861         functions.
3863 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
3864             Tom de Vries  <tom@codesourcery.com>
3866         PR middle-end/84955
3867         * omp-expand.c (expand_oacc_for): Add dummy false branch for
3868         tiled basic blocks without omp continue statements.
3870 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
3872         PR target/83660
3873         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
3874         vec_extract expression as having side effects to make sure it gets
3875         a cleanup point.
3877 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
3879         PR target/85403
3880         * config/i386/i386.c (get_builtin_code_for_version): Check
3881         error_mark_node.
3883 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
3885         PR target/84331
3886         * gcc/config.gcc: Support "skylake".
3887         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
3888         PROCESSOR_SKYLAKE.
3889         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
3890         (processor_target_table): Add "skylake".
3891         (ix86_option_override_internal): Add "skylake".
3892         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
3893         PROCESSOR_CANNONLAKE.
3894         (get_builtin_code_for_version): Fix priority for
3895         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
3896         PROCESSOR_SKYLAKE-AVX512.
3897         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
3898         (processor_type): Add PROCESSOR_SKYLAKE.
3900 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
3901             Jason Merrill  <jason@redhat.com>
3903         PR c++/85112
3904         * convert.c (convert_to_integer_1): Use direct recursion for
3905         enumeral types and types with a precision less than the number
3906         of bits in their mode.
3908 2018-04-16  Julia Koval  <julia.koval@intel.com>
3910         PR target/84413
3911         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
3912         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
3914 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
3916         PR target/85293
3917         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
3918         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
3919         and -mno-direct-move.
3921 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
3923         PR target/83402
3924         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
3925         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
3926         Ensure negative shifts result in {0}.
3928 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
3930         PR rtl-optimization/79916
3931         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
3932         regs (if any) to define how to gnerate SD moves when LRA is in
3933         progress.
3935 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
3937         PR rtl-optimization/85393
3938         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
3939         * except.c (expand_dw2_landing_pad_for_region): Make static.
3940         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
3941         a label and unconditional jump to old_bb, rather than
3942         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
3943         basic block.
3945         PR rtl-optimization/85376
3946         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
3947         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
3948         instead of a specific value.
3950 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3951             Bin Cheng  <bin.cheng@arm.com>
3953         PR tree-optimization/82965
3954         PR tree-optimization/83991
3955         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
3956         by_profile_only parameter.
3957         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
3958         information if the loop was predicted to iterate too many times.
3959         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
3961 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
3963         PR lto/71991
3964         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
3965         always inline.
3967 2018-04-13  Martin Liska  <mliska@suse.cz>
3968             Jakub Jelinek  <jakub@redhat.com>
3970         PR middle-end/81657
3971         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
3972         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
3973         * builtins.c (expand_builtin_memory_copy_args): Use
3974         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
3975         handle dest_addr == pc_rtx.
3977 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
3979         PR target/85291
3980         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
3981         asked to not generate direct moves.
3982         (fix_trunc<mode>si2_stfiwx): Similar.
3983         (fix_trunc<mode>si2_internal): Similar.
3985 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
3987         PR debug/83157
3988         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
3989         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
3990         lookup if dest in some wider mode is known to be const0_rtx and
3991         if so, record permanent equivalence for it to be ZERO_EXTEND of
3992         the narrower mode destination.
3994 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
3996         * lto-streamer-out.c (output_function): Revert 259346.
3997         * omp-expand.c (expand_oacc_for): Likewise.
3999 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
4001         PR rtl-optimization/85354
4002         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
4003         * sel-sched.c (sel_global_init): ... here.
4005 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
4007         PR target/85238
4008         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
4009         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4010         mode for PE-COFF targets.
4011         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
4012         (i386_pe_asm_lto_end): Likewise.
4013         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
4014         (TARGET_ASM_LTO_END): Likewise.
4015         * config/i386/winnt.c (saved_debug_info_level): New static variable.
4016         (i386_pe_asm_lto_start): New function.
4017         (i386_pe_asm_lto_end): Likewise.
4019 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4020             Richard Biener  <rguenther@suse.de>
4022         PR middle-end/84955
4023         * lto-streamer-out.c (output_function): Fix CFG loop state before
4024         streaming out.
4025         * omp-expand.c (expand_oacc_for): Handle calls to internal
4026         functions like regular functions.
4028 2018-04-12  Richard Biener  <rguenther@suse.de>
4030         PR lto/85371
4031         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
4032         for the early LTO debug to properly generate references to it
4033         during DIE emission.  Do not re-use that for the skeleton for
4034         split-dwarf.
4035         (dwarf2out_early_finish): Likewise.
4037 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4039         PR target/85328
4040         * config/i386/sse.md
4041         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
4042         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
4043         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
4044         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
4045         and output is a reg, avoid creating invalid lowpart subreg, but
4046         instead split into a 512-bit move.  Don't split if not AVX512VL,
4047         input is xmm16+ reg and output is a mem.
4048         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
4049         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
4050         xmm16+ reg and output is a mem.
4052 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4054         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
4055         also for flag_dwarf2_cfi_asm.
4057 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4059         PR rtl-optimization/85342
4060         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
4061         a bool scalar var inside of the loop instead.  Don't try to update
4062         recog_data.operand after failed apply_change_group.
4064 2018-04-12  Tom de Vries  <tom@codesourcery.com>
4066         PR target/85296
4067         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
4068         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
4069         array with flexible array member as array without given dimension.
4070         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
4071         argument for undefined param to true.
4073 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
4075         PR target/85321
4076         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4077         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
4078         from PowerPC section.
4079         * config/rs6000/sysv4.opt (mcall-): Improve help text.
4080         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
4081         help text that is too long.
4082         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
4083         help text that is too long.
4084         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
4085         help text that is too long.
4087 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
4089         * config/alpha/alpha.md (stack_probe_internal): Rename
4090         from "probe_stack".  Update all callers.
4092 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4094         PR rtl-optimization/84566
4095         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
4096         sched_macro_fuse_insns.
4098 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4100         PR target/84301
4101         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
4102         (compute_block_dependences): ... from here.
4104 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4106         PR tree-optimization/85331
4107         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
4108         from int to HOST_WIDE_INT.
4110 2018-04-11  Martin Jambor  <mjambor@suse.cz>
4112         PR ipa/84149
4113         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
4114         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
4115         not the same as the source val.
4116         (cgraph_edge_brings_value_p): New parameter.
4117         (gather_edges_for_value): Pass destination value to
4118         cgraph_edge_brings_value_p.
4119         (perhaps_add_new_callers): Likewise.
4120         (get_info_about_necessary_edges): Likewise and exclude values brought
4121         only by self-recursive edges.
4122         (create_specialized_node): Redirect only clones of self-calling edges.
4123         (+self_recursive_pass_through_p): New function.
4124         (find_more_scalar_values_for_callers_subset): Use it.
4125         (find_aggregate_values_for_callers_subset): Likewise.
4126         (known_aggs_to_agg_replacement_list): Removed.
4127         (decide_whether_version_node): Re-calculate known constants for all
4128         remaining context clones.
4130 2018-04-11  Richard Biener  <rguenther@suse.de>
4132         PR lto/85339
4133         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
4134         from early DWARF output.
4135         (dwarf2out_early_finish): Output line info unconditionally into
4136         early DWARF and add reference to it.
4138 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4140         PR target/85281
4141         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
4142         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
4143         other than V2DFmode using iptr mode attribute.
4144         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
4146 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4148         PR rtl-optimization/84659
4149         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
4151 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4153         PR debug/85302
4154         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
4155         SIZEP is NULL.
4156         (output_loc_list): Pass address of a dummy size variable even in the
4157         locview handling loop.
4158         (index_location_lists): Add comment on why skip_loc_list_entry can't
4159         call size_of_locs.
4161 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4163         PR target/85261
4164         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
4165         into register.
4167 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
4169         PR target/85321
4170         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4171         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
4172         and -mstring-compare-inline-limit.
4174 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4176         PR target/85287
4177         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
4178         for stack clash protection in a register whenever we need it to be in
4179         a register.
4181 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4183         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
4184         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
4186 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4188         PR target/85321
4189         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
4190         the help text.
4191         (mlong-double-): Ditto.
4192         * config/rs6000/sysv4.opt (msdata=): Ditto.
4193         (mtls-size=): Ditto.
4195 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4197         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4198         erroneous entries for
4199         "vector int vec_ldl (int, long int *)", and
4200         "vector unsigned int vec_ldl (int, unsigned long int *)".
4201         Add comments and entries for
4202         "vector bool char vec_ldl (int, bool char *)",
4203         "vector bool short vec_ldl (int, bool short *)",
4204         "vector bool int vec_ldl (int, bool int *)",
4205         "vector bool long long vec_ldl (int, bool long long *)",
4206         "vector pixel vec_ldl (int, pixel *)",
4207         "vector long long vec_ldl (int, long long *)",
4208         "vector unsigned long long vec_ldl (int, unsigned long long *)".
4209         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
4210         type tree bool_long_long_type_node and correct definition of
4211         bool_V2DI_type_node to make reference to this new type tree.
4212         (rs6000_mangle_type): Replace erroneous reference to
4213         bool_long_type_node with bool_long_long_type_node.
4214         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
4215         comments to emphasize sign distinctions for char and int types and
4216         replace RS6000_BTI_bool_long constant with
4217         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
4218         use of RS6000_BTI_pixel.
4219         (bool_long_type_node): Remove this macro definition.
4220         (bool_long_long_type_node): New macro definition
4222 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4224         PR rtl-optimization/85300
4225         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
4226         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
4227         simplify_unary_operation fails.
4229 2018-04-10  Martin Liska  <mliska@suse.cz>
4231         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
4232         cgraph_edge and ipa_ref.
4234 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4236         PR target/85177
4237         PR target/85255
4238         * config/i386/sse.md
4239         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
4240         computation of the VEC_MERGE selector from mask.
4241         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
4242         Fix decoding of the VEC_MERGE selector into mask.
4244 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4246         PR tree-optimization/85286
4247         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
4249 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4251         * final.c (final_1): Set insn_last_address as well as
4252         insn_current_address.
4254 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4256         PR target/85173
4257         * explow.c (emit_stack_probe): Call validize_mem on memory location
4258         before passing it to gen_probe_stack.  Create address operand and
4259         legitimize it for the probe_stack_address case.
4261 2018-04-09  Jan Hubicka  <jh@suse.cz>
4263         PR lto/85078
4264         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4265         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4266         * tree.c (free_lang_data_in_type): Fix handling of binfos;
4267         walk basetypes.
4268         (free_lang_data): Rebuild type inheritance graph.
4270 2018-04-09  Martin Sebor  <msebor@redhat.com>
4272         * invoke.texi (-finline-small-functions): Mention other optimization
4273         options.
4274         (-findirect-inlining, -fpartial-inlining): Same.
4275         (-finline-functions-called-once): Same.
4276         (-freorder-blocks-and-partition): Same.
4278 2018-04-09  Jan Hubicka  <jh@suse.cz>
4280         PR rtl/84058
4281         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4282         jumps; choose last target that matches the criteria (i.e.
4283         no partition changes for non-crossing jumps).
4284         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4285         support for redirecting crossing jumps to non-crossing.
4287 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
4289         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4290         also for naked functions.
4292 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
4294         * config/arc/arc.md (add_shift): New pattern.
4295         (add_shift2): Likewise.
4296         (sub_shift): Likewise.
4297         (sub_shift_cmp0_noout): Likewise.
4298         (compare_si_ashiftsi): Likewise.
4299         (xbfu_cmp0_noout): New combine pattern.
4300         (xbfu_cmp0"): Likewise.
4301         (movsi_set_cc_insn): Place the predicable variant first.
4302         (commutative_binary_cmp0_noout): Remove clobber.
4303         (commutative_binary_cmp0): New pattern.
4304         (noncommutative_binary_cmp0): Likewise.
4305         (noncommutative_binary_cmp0_noout): Likewise.
4306         (noncommutative_binary_comparison_result_used): Removed.
4307         (rsub_cmp0): New pattern.
4308         (rsub_cmp0_noout): Likewise.
4309         (extzvsi): Changed, keep only meaningful variants.
4310         (SQH, SEZ): New iterators.
4311         (SQH_postfix): New mode attribute.
4312         (SEZ_prefix): New code attribute.
4313         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
4314         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
4315         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
4316         of numerical value.
4317         (noncommutative_operator): Check the availability of barrel
4318         shifter option.
4320 2018-04-09  Richard Biener  <rguenther@suse.de>
4322         PR tree-optimization/85284
4323         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
4324         Only use the niter constraining form of simple_iv when the exit
4325         is always executed.
4327 2018-04-09  Tom de Vries  <tom@codesourcery.com>
4329         PR target/84041
4330         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4331         (define_expand "*memory_barrier"): New define_expand.
4332         (define_insn "memory_barrier"): New insn.
4334 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4336         PR rtl-optimization/80463
4337         PR rtl-optimization/83972
4338         PR rtl-optimization/83480
4340         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
4341         correct producer for the insn.
4342         (tidy_control_flow): Fixup seqnos in case of debug insns.
4344 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4346         PR rtl-optimization/83913
4348         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
4349         different sched-times when merging exprs.
4351 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4353         PR rtl-optimization/83962
4355         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
4356         tidy_fallthru_edge and tidy_control_flow.
4358 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4360         PR rtl-optimization/83530
4362         * sel-sched.c (force_next_insn): New global variable.
4363         (remove_insn_for_debug): When force_next_insn is true, also leave only
4364         next insn in the ready list.
4365         (sel_sched_region): When the region wasn't scheduled, make another pass
4366         over it with force_next_insn set to 1.
4368 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4370         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4371         into tm_file.
4372         * config/nds32/constants.md (unspec_volatile_element): Add enum values
4373         for interrupt control.
4374         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4375         functions for interrupt control.
4376         * config/nds32/nds32-intrinsic.md: Likewise.
4377         * config/nds32/nds32_intrinsic.h: Likewise.
4378         * config/nds32/nds32.h (nds32_builtins): Likewise.
4380 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4382         * config/nds32/nds32.c (nds32_init_machine_status,
4383         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4384         strict_aligned_p field.
4385         (nds32_expand_to_rtl_hook): New function.
4386         (TARGET_EXPAND_TO_RTL_HOOK): Define.
4387         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4389 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4390             Chung-Ju Wu  <jasonwucj@gmail.com>
4392         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4393         * config/nds32/nds32-n7.md: New file.
4394         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4395         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4396         pipeline.
4397         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4398         * config/nds32/nds32.md (pipeline_model): Add n7.
4399         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4400         * config/nds32/pipelines.md: Include n7 settings.
4402 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4403             Chung-Ju Wu  <jasonwucj@gmail.com>
4405         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4406         * config/nds32/nds32-e8.md: New file.
4407         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4408         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4409         pipeline.
4410         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4411         * config/nds32/nds32.md (pipeline_model): Add e8.
4412         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4413         * config/nds32/pipelines.md: Include e8 settings.
4415 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4416             Chung-Ju Wu  <jasonwucj@gmail.com>
4418         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4419         * config/nds32/nds32-n8.md: New file.
4420         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4421         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4422         pipeline.
4423         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4424         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4425         * config/nds32/nds32.md (pipeline_model): Add n8.
4426         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4427         * config/nds32/pipelines.md: Include n8 settings.
4429 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4430             Chung-Ju Wu  <jasonwucj@gmail.com>
4432         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4433         * config/nds32/nds32-n9-2r1w.md: New file.
4434         * config/nds32/nds32-n9-3r2w.md: New file.
4435         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4436         nds32_register_ports): New or modify for cpu n9.
4437         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4438         pipeline.
4439         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4440         * config/nds32/nds32-utils.c: New file.
4441         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4442         TARGET_MUL_SLOW): Define.
4443         * config/nds32/nds32.md (pipeline_model): New attribute.
4444         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4445         New options that support cpu n9.
4446         * config/nds32/pipelines.md: Include n9 settings.
4447         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4449 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4451         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4452         information if necessary.
4453         (output_cond_branch_compare_zero): Likewise.
4454         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4455         (nds32_target_alignment): Refine for alignment.
4456         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4457         (FUNCTION_BOUNDARY): Modify.
4458         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4459         align case.
4460         * config/nds32/nds32.opt (malways-align, malign-functions): New.
4462 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4464         * config/nds32/constants.md (unspec_volatile_element): Add values for
4465         TLB operation and data prefetch.
4466         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4467         functions for TLB operation and data prefetch.
4468         * config/nds32/nds32-intrinsic.md: Likewise.
4469         * config/nds32/nds32_intrinsic.h: Likewise.
4470         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4471         (nds32_print_operand): Likewise.
4472         * config/nds32/nds32.h (nds32_builtins): Likewise.
4474 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4475         Andrew Pinski <pinsika@gcc.gnu.org>
4477         PR middle-end/82976
4478         * match.pd: Use constant_boolean_node of correct type instead of
4479         boolean_true_node or boolean_false_node for simplifying
4480         pointer comparisons to zero.
4482 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4484         PR tree-optimization/80021
4485         * tree.c (verify_type_variant): Make error call in verify_variant_match
4486         translatable and remove final full stop.
4488 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4490         * config/nds32/constants.md (unspec_volatile_element): Add
4491         UNSPEC_VOLATILE_EH_RETURN.
4492         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4493         nds32_output_stack_pop): Support dwarf exception handling process.
4494         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4495         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4496         exception handling process.
4497         (nds32_compute_stack_frame): Likewise.
4498         (nds32_return_addr_rtx): Likewise.
4499         (nds32_initial_elimination_offset): Likewise.
4500         (nds32_expand_prologue): Likewise.
4501         (nds32_expand_epilogue): Likewise.
4502         (nds32_dynamic_chain_address): New function.
4503         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4504         exception handling.
4505         (DYNAMIC_CHAIN_ADDRESS): Define.
4506         (EH_RETURN_DATA_REGNO): Define.
4507         (EH_RETURN_STACKADJ_RTX): Define.
4508         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4509         patterns for dwarf exception handling.
4511 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4513         * config/nds32/nds32.h: Clean up obsolete macros.
4515 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4517         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4518         Add enum values for particular instructions.
4519         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4520         particular intrinsic functions.
4521         * config/nds32/nds32-intrinsic.md: Likewise.
4522         * config/nds32/nds32_intrinsic.h: Likewise.
4523         * config/nds32/nds32.h (nds32_builtins): Likewise.
4524         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4525         (btst, ave): New patterns for particular instructions.
4527 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4529         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4530         Add enum values for atomic load/store and memory sync.
4531         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4532         and memory sync.
4533         * config/nds32/nds32-intrinsic.md: Likewise.
4534         * config/nds32/nds32_intrinsic.h: Likewise.
4535         * config/nds32/nds32.h (nds32_builtins): Likewise.
4537 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4539         PR tree-optimization/85257
4540         * fold-const.c (native_encode_vector): If not all elts could fit
4541         and off is -1, return 0 rather than offset.
4542         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4543         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4544         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4545         adjust buffer in native_interpret_expr call.
4547 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4549         * config/nds32/constants.md (unspec_volatile_element): Add cache
4550         control enum values.
4551         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4552         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4553         * config/nds32/nds32.c (nds32_cctl_names): New.
4554         (nds32_print_operand): Handle cache control register names.
4555         * config/nds32/nds32.h (nds32_builtins): New enum values.
4556         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4557         macros.
4558         * config/nds32/nds32.md (type): Add mmu.
4559         * config/nds32/pipelines.md (simple_insn): Add mmu.
4561 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4563         * config/nds32/nds32.md (type): Remove call.
4564         * config/nds32/pipelines.md (simple_insn): Likewise.
4566 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4568         * config/nds32/constants.md (unspec_volatile_element): Add
4569         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4570         UNSPEC_VOLATILE_FMFCFG.
4571         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4572         description for fmfcfg and fmfcsr.
4573         (bdesc_1arg): Add fmtcsr.
4574         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4575         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4576         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4577         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4578         unspec_fmfcfg): New patterns.
4579         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4580         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4581         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4582         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4583         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4584         __nds32__fmfcfg): Define.
4586 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4588         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4589         intrinsic register names.
4590         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4591         intrinsic register enum values and macros.
4593 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4595         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4596         for load/store addressing form.
4597         (nds32_print_operand_address): Likewise.
4599 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4601         PR target/85196
4602         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4603         based on LABEL_REF.  Remove useless assertion.
4604         (pic_address_needs_scratch): Fix formatting.
4605         (sparc_legitimize_pic_address): Minor tweaks.
4606         (sparc_delegitimize_address): Adjust assertion accordingly.
4607         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4608         into symbolic_operand.
4609         (movsi_high_pic_label_ref): Likewise.
4610         (movsi_lo_sum_pic_label_ref): Likewise.
4611         (movdi_pic_label_ref): Likewise.
4612         (movdi_high_pic_label_ref): Likewise.
4613         (movdi_lo_sum_pic_label_ref): Likewise.
4615 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4617         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4618         custom LIB_SPEC setup.
4620 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4621             Kito Cheng  <kito.cheng@gmail.com>
4623         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4624         * config/riscv/freebsd.h: New.
4626 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4628         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4629         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4630         file.
4632 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4633             Kito Cheng  <kito.cheng@gmail.com>
4635         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4636         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4637         * config/nds32/nds32-protos.h (nds32_output_call,
4638         nds32_output_return): Declare.
4639         * config/nds32/nds32.md: Refine all the call and return patterns.
4641 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4643         PR debug/85252
4644         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4645         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4647         PR rtl-optimization/84872
4648         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4649         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4650         EDGE_CROSSING edge.
4652 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4654         * expr.c (copy_blkmode_to_reg): Revert 254862.
4655         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4657 2018-04-06  Richard Biener  <rguenther@suse.de>
4659         PR middle-end/85244
4660         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4661         after seeing a component reference with an adjacent field.  Treat
4662         refs to arrays at struct end of external decls similar to
4663         refs to unconstrained commons.
4665 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4667         PR sanitizer/85213
4668         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4669         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4670         recursive calls.
4671         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4672         save_p here.
4674 2018-04-06  Richard Biener  <rguenther@suse.de>
4676         PR middle-end/85180
4677         * alias.c (find_base_term): New wrapper around find_base_term
4678         unwinding CSELIB_VAL_PTR changes.
4679         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4680         recursion.
4682 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4684         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4685         instructions.
4686         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4687         constant definitions.
4688         ("nop"): lr 0,0 -> nopr r0
4689         ("nop_lr0", "nop_lr1"): New insn definitions.
4691 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4693         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4694         NDS32_V3PUSH_AVAILABLE_P macro.
4696 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4697             Chung-Ju Wu  <jasonwucj@gmail.com>
4699         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4700         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4701         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4702         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4703         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4704         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4705         * config/nds32/constraints.md: New constraints and checking for hard
4706         float configuration.
4707         * config/nds32/iterators.md: New mode iterator and attribute for hard
4708         float configuration.
4709         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4710         patterns.
4711         * config/nds32/nds32-fpu.md: New file.
4712         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4713         deal with hard float code generation.
4714         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4715         ARCH_V3S.
4716         (abi_type, float_reg_number): New enum type.
4717         * config/nds32/nds32-predicates.c: New predicates for hard float.
4718         * config/nds32/nds32-protos.h: Declare functions for hard float.
4719         * config/nds32/nds32.c: Implementation for hard float configuration.
4720         * config/nds32/nds32.h: Definitions for hard float configuration.
4721         * config/nds32/nds32.md: Include hard float machine description and
4722         modify patterns for hard float configuration.
4723         * config/nds32/nds32.opt: New options for hard float configuration.
4724         * config/nds32/predicates.md: New predicates for hard float
4725         configuration.
4727 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4729         * common/config/nds32/nds32-common.c
4730         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4732 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4734         PR middle-end/85195
4735         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4736         CONSTRUCTOR_ELT (ctor, ...)->value.
4738 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4740         PR target/85193
4741         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4743 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4745         PR target/85204
4746         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4747         cond jump.
4749 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4750             Kito Cheng  <kito.cheng@gmail.com>
4752         * config/nds32/constraints.md (U33): Fine-tune checking condition.
4753         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4754         * config/nds32/nds32.h (nds32_16bit_address_type): Add
4755         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4757 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4758             Kito Cheng  <kito.cheng@gmail.com>
4760         * config/nds32/constraints.md (Ufe): New memory constraint.
4761         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4762         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4763         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4764         operands.
4765         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4766         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4768 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4770         * config/nds32/nds32.md: Use optimize_size in the condition for
4771         alu-shift instructions.
4773 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4775         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4777 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4779         * config/nds32/nds32.md (negsi2): Refine pattern.
4781 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4782             Chung-Ju Wu  <jasonwucj@gmail.com>
4784         * config/nds32/iterators.md (shift_rotate): New code iterator.
4785         (shift): New code attribute.
4786         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4787         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4788         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4789         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4790         bit-wise operations.
4791         (andsi3, *andsi3): Ditto.
4792         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4793         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4794         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4795         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4796         nds32_ior_operand, nds32_xor_operand): New predicates.
4798 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4800         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4801         (addsi3, subsi3): ... this.
4803 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4805         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
4807 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4809         * config/nds32/nds32.md: Adjust indention.
4811 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4813         * config/nds32/nds32.md (feature): New attribute.
4815 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4817         * config/nds32/nds32.md (subtype): New attribute.
4819 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4821         PR target/85203
4822         * config/arm/arm-builtins.c (arm_expand_builtin): Change
4823         expansion to perform a bitwise AND of the argument followed by a
4824         boolean negation of the result.
4826 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
4828         PR rtl-optimization/84878
4829         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
4830         the basic block.  Assert the use reference is not artificial and that
4831         it has an associated insn.
4833 2018-04-04  Michael Matz  <matz@suse.de>
4835         * builtins.c (compute_objsize): Pass correct operand
4836         to array_at_struct_end_p.
4838 2018-04-04  Richard Biener  <rguenther@suse.de>
4840         PR lto/85176
4841         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
4842         from contexts for DINFO_LEVEL_TERSE and below.
4844 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4846         * config/nds32/nds32-doubleword.md (move_<mode>): Require
4847         resiter_operand condition.
4848         * config/nds32/nds32.md (*move<mode>): Ditto.
4850 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4851             Monk Chiang  <sh.chiang04@gmail.com>
4853         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
4855 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4857         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
4859 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4860             Kito Cheng  <kito.cheng@gmail.com>
4862         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
4863         nds32_cond_code_str, output_cond_branch,
4864         output_cond_branch_compare_zero, nds32_expand_cbranch,
4865         nds32_expand_cstore, nds32_expand_movcc,
4866         nds32_output_cbranchsi4_equality_zero,
4867         nds32_output_cbranchsi4_equality_reg,
4868         nds32_output_cbranchsi4_equality_reg_or_const_int,
4869         nds32_output_cbranchsi4_greater_less_zero: New functions.
4870         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
4871         nds32_expand_cstore, nds32_expand_movcc,
4872         nds32_output_cbranchsi4_equality_zero,
4873         nds32_output_cbranchsi4_equality_reg,
4874         nds32_output_cbranchsi4_equality_reg_or_const_int,
4875         nds32_output_cbranchsi4_greater_less_zero): Declare.
4876         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
4877         nds32_rimm11s_operand): New predicates.
4878         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
4879         * config/nds32/nds32.md: Rewrite all the branch and conditional move
4880         patterns.
4882 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
4884         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
4885         * config/nds32/nds32.md: Ditto.
4886         * config/nds32/pipelines.md: Ditto.
4888 2018-04-04  Richard Biener  <rguenther@suse.de>
4890         PR tree-optimization/85168
4891         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
4892         propagating abnormals.
4894 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4896         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
4898 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
4899             Kito Cheng  <kito.cheng@gmail.com>
4901         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
4902         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
4903         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
4904         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
4905         * config/nds32/nds32.md (sibcall_internal): New.
4906         (sibcall_register): Remove.
4907         (sibcall_immediate): Remove.
4908         (sibcall_value_internal): New.
4909         (sibcall_value_register): Remove.
4910         (sibcall_value_immediate): Remove.
4911         * config/nds32/predicates.md (nds32_general_register_operand): New.
4912         (nds32_call_address_operand): New.
4914 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4916         PR rtl-optimization/85167
4917         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
4918         bb_defs if *split_p, instead preinitialize it to NULL.
4920         PR tree-optimization/85156
4921         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
4922         evaluating the argument multiple times.
4924 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
4926         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
4927         than vector.
4928         (_mm_cvtpd_ps): Likewise.
4929         (_mm_cvttpd_epi32): Likewise.
4930         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
4931         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
4932         vector, pixel, and bool following altivec.h include.
4934 2018-04-03  Martin Sebor  <msebor@redhat.com>
4936         * doc/extend.texi (Common Function Attributes): Clarify.
4937         (const attribute): Likewise.
4938         (pure attribute): Likewise.
4940 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
4942         PR target/85169
4943         * config/i386/i386.c (ix86_expand_vector_set): Use
4944         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
4946 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
4948         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
4949         instructions when changing rounding bits to preserve precision bits
4950         in the x87 control word.
4952 2018-04-03  Martin Liska  <mliska@suse.cz>
4954         PR tree-optimization/82491
4955         * rtl.h (strip_offset_and_add): Replace += suboffset with
4956         poly_uint64 () + suboffset.
4958 2018-03-29  Martin Liska  <mliska@suse.cz>
4959             Martin Jambor  <mjambor@suse.cz>
4961         PR ipa/84947
4962         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
4963         param_type is not an integral or pointer type.
4965 2018-04-03  Richard Biener  <rguenther@suse.de>
4967         * sese.h (recompute_all_dominators): Remove.
4969 2018-04-02  Martin Sebor  <msebor@redhat.com>
4971         * doc/invoke.texi (-Wrestrict): Fix typos.
4973 2018-04-02  Jim Wilson  <jimw@sifive.com>
4975         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
4976         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
4977         (<optab>di3, <optab>si3_extend): Likewise.
4978         (<optab>si3_mask, <optab>si3_mask_1): New.
4979         (<optab>di3_mask, <optab>di3_mask_1): New.
4980         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
4981         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
4982         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
4984 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
4986         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
4987         example.
4989 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4991         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
4992         (nds32_canonicalize_comparison): New function.
4994 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
4995             Kito Cheng  <kito.cheng@gmail.com>
4996             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4998         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
4999         * config/nds32/constants.md (unspec_volatile_element): Add
5000         UNSPEC_VOLATILE_RELAX_GROUP.
5001         * config/nds32/nds32-relax-opt.c: New file.
5002         * config/nds32/nds32-predicates.c
5003         (nds32_symbol_load_store_p): New function.
5004         * config/nds32/nds32-protos.h
5005         (nds32_symbol_load_store_p): Declare function.
5006         (make_pass_nds32_relax_opt): Declare new rtl pass function.
5007         * config/nds32/nds32.c
5008         (nds32_register_pass): New function to register pass.
5009         (nds32_register_passes): New function to register passes.
5010         * config/nds32/nds32.md (relax_group): New pattern.
5011         * config/nds32/nds32.opt (mrelax-hint): New option.
5012         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
5014 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
5016         * config/nds32/t-nds32: Modify files dependency.
5018 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5020         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
5021         (PROFILE_HOOK): Define its implementation.
5023 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5025         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
5026         type and 32-bit size.
5028 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
5030         PR middle-end/85090
5031         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
5032         (V_128_256): New mode iterator.
5033         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
5034         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
5035         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
5036         of V.
5037         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
5038         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
5040 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
5042         PR target/83315
5043         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
5044         NaN inputs correctly.
5046 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
5048         PR target/80546
5049         * config/rs6000/vsx.md (??r): New mode attribute.
5050         (*vsx_mov<mode>_64bit): Use it.
5051         (*vsx_mov<mode>_32bit): Likewise.
5053 2018-03-30  Martin Sebor  <msebor@redhat.com>
5055         PR tree-optimization/84818
5056         * builtins.c (check_access): Use warning_n.
5058 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5060         PR target/83822
5061         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
5062         condition.
5063         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
5064         condition.
5066 2018-03-30  Julia Koval  <julia.koval@intel.com>
5068         PR target/84413
5069         * x86-tune.def (movx, partial_reg_dependency): Enable for
5070         m_SKYLAKE_AVX512.
5072 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
5074         PR inline-asm/84985
5075         * lra-constraints.c (process_alt_operands): Move setting
5076         this_alternative_matches below.
5078 2018-03-29  Martin Liska  <mliska@suse.cz>
5080         PR lto/84995.
5081         * doc/invoke.texi: Document how LTO works with debug info.
5082         Describe auto-load support of binutils.  Mention 'x86-64'
5083         as valid option value of -march option.
5085 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
5087         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
5089         PR c/85094
5090         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
5091         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
5092         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
5093         checking.
5095 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5097         PR target/84912
5098         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
5099         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
5100         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
5101         for RS6000_BTM_POWERPC64.
5102         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
5103         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
5104         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
5105         definition.
5106         (DIVDE): Use it.
5107         (DIVDEU): Likewise.
5109 2018-03-28 Carl Love  <cel@us.ibm.com>
5111         Revert
5112         2017-09-27  Carl Love  <cel@us.ibm.com>
5114         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
5115         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
5116         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
5117         fctiw instruction.
5119 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5121         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
5122         instead of __vector bool.
5123         (_mm_max_pu8): Likewise.
5124         (_mm_min_pi16): Likewise.
5126 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5128         PR target/84912
5129         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
5130         (DIVWEUO): Likewise.
5131         (DIVDEO): Likewise.
5132         (DIVDEUO): Likewise.
5133         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
5134         DIVWEUO and DIVDEUO.
5135         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
5136         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
5137         (div_extend): Likewise.
5138         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
5139         builtin function.
5140         (__builtin_divweuo): Likewise.
5141         (__builtin_divdeo): Likewise.
5142         (__builtin_divdeuo): Likewise.
5144 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5146         PR target/85095
5147         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
5148         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
5150         PR tree-optimization/82004
5151         * gimple-match-head.c (optimize_pow_to_exp): New function.
5152         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
5153         Don't fold to exp if optimize_pow_to_exp is false.
5155 2018-03-28  Martin Liska  <mliska@suse.cz>
5157         PR other/84819
5158         * calls.c (initialize_argument_information): Fix trailing space.
5159         * common.opt: Fix typo and provide better explanation for
5160         -fsanitize-coverage option.
5161         * config/i386/i386.opt: Fix typo.
5163 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5164             Martin Liska  <mliska@suse.cz>
5166         PR sanitizer/85081
5167         * gimplify.c (asan_poison_variable): Don't do the check for
5168         gimplify_omp_ctxp here.
5169         (gimplify_decl_expr): Do it here.
5170         (gimplify_target_expr): Likewise.
5172 2018-03-28  Martin Liska  <mliska@suse.cz>
5174         PR target/84988
5175         * config/i386/i386.c (ix86_function_arg_advance): Do not call
5176         chkp_type_bounds_count if MPX is not enabled.
5178 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5180         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
5182 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
5184         PR target/84914
5185         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
5186         function to create the function decl for complex long double
5187         multiply and divide for -mabi=ieeelongdouble.
5188         (init_float128_ieee): Call it.
5190 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
5192         PR target/85044
5193         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
5194         -fcf-protection=branch -mibt.
5195         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
5197 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5199         PR target/81863
5200         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
5202 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
5204         PR target/85056
5205         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
5206         extern array declarations.
5208 2018-03-27  Richard Biener  <rguenther@suse.de>
5210         PR middle-end/84067
5211         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
5212         explicit single_use checks.
5214 2018-03-27  Richard Biener  <rguenther@suse.de>
5216         PR tree-optimization/85082
5217         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
5218         Valueize the VUSE.
5220 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5222         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
5223         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
5224         Turn on fasynchronous-unwind-tables and funwind-tables.
5226 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
5228         PR target/85073
5229         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
5230         (*bmi_blsr_<mode>_ccz): Ditto.
5232 2018-03-26  Tom de Vries  <tom@codesourcery.com>
5234         PR tree-optimization/85063
5235         * omp-general.c (offloading_function_p): New function.  Factor out
5236         of ...
5237         * omp-offload.c (pass_omp_target_link::gate): ... here.
5238         * omp-general.h (offloading_function_p): Declare.
5239         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
5240         with attribute omp declare target for offloading functions.
5242 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
5244         PR tree-optimization/84005
5245         * tree-data-ref.h (get_base_for_alignment): Declare.
5246         * tree-data-ref.c (get_base_for_alignment_1): New function.
5247         (get_base_for_alignment): Likewise.
5248         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
5249         get_base_for_alignment to find a suitable base object, instead
5250         of always using drb->base_address.
5252 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5254         PR inline-asm/85022
5255         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5256         known size by default.
5258 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
5260         PR inline-asm/85030
5261         * lra-constraints.c (process_alt_operands): Don't match BLKmode
5262         and non BLKmode operands.
5264 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5266         PR target/85026
5267         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5268         Clean up attributes.
5270 2018-03-23  Richard Biener  <rguenther@suse.de>
5272         PR debug/85020
5273         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5274         we are going to emit early debug for LTO.
5276 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5278         PR inline-asm/85034
5279         * function.c (match_asm_constraints_1): Don't optimize if input
5280         doesn't satisfy general_operand predicate for output's mode.
5282         PR inline-asm/85022
5283         * alias.c (write_dependence_p): Don't require for x_canonicalized
5284         non-VOIDmode if x has VOIDmode.
5286         PR sanitizer/85029
5287         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5288         just don't try to optimize it rather than assert it never happens.
5290 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5292         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5293         macro expansions for definition of ST_INTERNAL_<mode> and
5294         LD_INTERNAL_<mode> builtins.
5295         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5296         Remove prototype.
5297         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5298         function.
5299         (altivec_expand_st_builtin): Likewise.
5300         (altivec_expand_builtin): Remove calls to deleted functions.
5301         (rs6000_address_for_altivec): Delete this function.
5302         * config/rs6000/vector.md: Remove expands for
5303         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
5305 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
5307         PR target/84826
5308         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
5309         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
5310         re-computing once computed.
5311         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
5312         (arm_init_machine_status): Initialize
5313         machine->static_chain_stack_bytes.
5315 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5317         PR target/84760
5318         * doc/extend.texi: Add four new prototypes for vec_ld.
5319         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
5320         definitions for more logical presentation.
5321         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
5322         entries for V1TI variants of __builtin_altivec_ld builtin.
5323         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
5324         handling of V1TI variant of LVX icode pattern.
5325         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
5326         (rs6000_gimple_fold_builtin): Likewise.
5327         (altivec_init_builtins): Add code to define
5328         __builtin_altivec_lvx_v1ti function.
5330 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5332         PR inline-asm/84941
5333         * function.c (match_asm_constraints_1): Don't do the optimization
5334         if input isn't a REG, SUBREG, MEM or constant.
5336 2018-03-22  Tom de Vries  <tom@codesourcery.com>
5338         PR tree-optimization/84956
5339         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
5340         bb_has_abnormal_pred.
5342 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5344         PR sanitizer/85018
5345         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
5346         DECL_INITIAL (decl) to decl at the end.
5347         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
5348         adjust the comment.
5350 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
5352         * doc/extend.texi (__builtin_tgmath): Document when complex
5353         integer types are treated as _Complex _Float64.
5355 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5357         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
5359 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5361         PR tree-optimization/84960
5362         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
5363         if it is ENTRY block, move them into single succ of ENTRY in that case.
5365 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
5367         PR tree-optimization/84811
5368         * poly-int.h (poly_span_traits): Remove the T3 parameter and
5369         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5370         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5371         (known_subrange_p): Update accordingly.  Cast each value involved
5372         in the size comparison, rather than casting the result of the
5373         subtraction.
5375 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5377         PR tree-optimization/84982
5378         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5379         by flipping the least significant bit rather than all bits from
5380         bitpos to bitpos + bitsize - 1.
5382 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5384         * doc/extend.texi (Deprecated Features): Remove mention of
5385         long-deleted deprecations.
5387 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5389         PR jit/84288
5390         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5391         * configure: Regenerate.
5393 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5395         PR tree-optimization/83126
5396         * tree-parloops.c (num_phis): New function.
5397         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5399 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5401         * doc/extend.texi (Deprecated Features): Update deprecated flags,
5402         mention anon-struct/union members and trailing attributes.
5404 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
5406         PR tree-optimization/84969
5407         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5408         builtin memset partitions if they set different rhs values.
5410 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5412         PR rtl-optimization/84989
5413         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5414         VEC_DUPLICATE with scalar result mode.
5416 2018-03-21  Martin Liska  <mliska@suse.cz>
5418         PR ipa/84963
5419         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5420         not intended return statement.
5422 2018-03-21  Martin Liska  <mliska@suse.cz>
5424         PR target/84988
5425         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5426         (chkp_find_bound_slots_1): Limit number of iterations.
5428 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
5430         PR target/84838
5431         * Minor grammar fixes for x86 options.
5433 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5435         PR debug/84875
5436         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5437         holding REG_CFA_RESTORE notes, instead turn them into a USE.
5439 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
5441         PR target/83789
5442         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5443         (altivec_lvx_<mode>_1op): Likewise.
5444         (altivec_stvx_<mode>_2op): Likewise.
5445         (altivec_stvx_<mode>_1op): Likewise.
5446         (altivec_lvx_<VM2:mode>): New define_expand.
5447         (altivec_stvx_<VM2:mode>): Likewise.
5448         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5449         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5450         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5451         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5452         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5453         (rs6000_gen_lvx): Likewise.
5454         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5455         (altivec_expand_stv_builtin): Likewise.
5456         (altivec_expand_builtin): Likewise.
5457         * config/rs6000/vector.md: Likewise.
5459 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5461         PR target/82518
5462         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5463         BYTES_BIG_ENDIAN.
5465 2018-03-20  Richard Biener  <rguenther@suse.de>
5467         PR target/84986
5468         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5469         sign-conversions as zero, fall back to standard scalar_stmt
5470         cost for the rest.
5472 2018-03-20  Martin Liska  <mliska@suse.cz>
5474         PR ipa/84825
5475         * predict.c (rebuild_frequencies): Handle case when we have
5476         PROFILE_ABSENT, but flag_guess_branch_prob is false.
5478 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5480         PR target/84990
5481         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5482         flag_section_anchors.
5483         * varasm.c (use_blocks_for_decl_p): Remove hack for
5484         dw2_force_const_mem.
5486         PR target/84845
5487         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5488         to ...
5489         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5490         be created, use lowpart_subreg of operands[0] rather than operands[0]
5491         itself.
5492         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5493         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5494         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5495         and n constraint instead of aarch64_shift_imm_di and Usd.
5496         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5497         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5499 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5501         PR target/82989
5502         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5503         to favor GPR over NEON registers.
5504         (<shift>di3_neon): Likewise.
5506 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5508         PR target/84952
5509         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5510         (nvptx_process_pars): Emit bar.sync asap and alap.
5512 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5514         PR target/84954
5515         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5516         seen_label if seen_label is already set.
5518 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5520         PR target/84945
5521         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5522         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5523         Use 1U instead of 1.  Formatting fixes.
5525         PR c/84953
5526         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5527         instead of TREE_TYPE (s1) for the return value.
5529 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5531         PR tree-optimization/84946
5532         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5533         bitsize + bitsize in poly_uint64 rather than poly_int64.
5535         PR sanitizer/78651
5536         * dwarf2asm.c: Include fold-const.c.
5537         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5538         of decl rather than decl itself.
5540         PR rtl-optimization/84643
5541         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5543 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5545         PR sanitizer/78651
5546         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5547         calling assemble_variable.
5549 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5551         PR target/81647
5552         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5553         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5555 2018-03-19  Jim Wilson  <jimw@sifive.com>
5557         PR bootstrap/84856
5558         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5559         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5560         (riscv_first_stack_step): Likewise.
5561         (riscv_option_override): Use STACK_BOUNDARY instead of
5562         MIN_STACK_BOUNDARY.
5563         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5564         MIN_STACK_BOUNDARY.
5565         (BIGGEST_ALIGNMENT): Set to 128.
5566         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5567         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5568         STACK_BOUNDARY.
5570 2018-03-19  Richard Biener  <rguenther@suse.de>
5572         PR tree-optimization/84933
5573         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5574         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5576 2018-03-19  Richard Biener  <rguenther@suse.de>
5578         PR tree-optimization/84859
5579         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5580         (cond_if_else_store_replacement): Perform sinking operation on
5581         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5582         Generalize what a BB with a single eligible store is.
5584 2018-03-19  Richard Biener  <rguenther@suse.de>
5586         PR tree-optimization/84929
5587         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5588         chrec_is_positive against non-chrec arg.
5590 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5592         PR target/84711
5593         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5595 2018-03-18  Martin Liska  <mliska@suse.cz>
5597         PR rtl-optimization/84635
5598         * regrename.c (build_def_use): Use matches_mode only when
5599         matches >= 0.
5601 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5603         PR tree-optimization/84913
5604         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5605         vectorize chains of COND_EXPRs.
5607 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5609         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5611 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5613         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5615 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5617         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5619 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5620             Kito Cheng  <kito.cheng@gmail.com>
5622         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5623         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5624         (nds32_adjust_reg_alloc_order): New function.
5625         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5627 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5629         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5630         nds32_print_operand, nds32_print_operand_address): Use
5631         HOST_WIDE_INT_PRINT_DEC instead.
5633 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5635         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5637 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5639         PR target/84902
5640         * config/i386/i386.c (initial_ix86_tune_features,
5641         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5642         unsigned long long.
5643         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5644         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5645         rather than 1u << ix86_tune.  Formatting fix.
5646         (ix86_option_override_internal): Change ix86_arch_mask from
5647         unsigned int to unsigned HOST_WIDE_INT, initialize to
5648         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5649         (ix86_function_specific_restore): Likewise.
5651 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5653         PR target/84899
5654         * postreload.c (reload_combine_recognize_pattern): Perform
5655         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5656         truncate_int_for_mode the result for the destination's mode.
5658         PR c/84909
5659         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5660         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5661         Likewise.
5662         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5663         Likewise.
5665 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5667         PR target/84876
5668         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5669         regno_allocno_class_array and sorted_pseudos.
5670         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5671         insns where regno is used.
5673 2018-03-16  Martin Liska  <mliska@suse.cz>
5675         PR ipa/84833
5676         * multiple_target.c (create_dispatcher_calls): Redirect
5677         reference in the symbol table.
5679 2018-03-16  Martin Liska  <mliska@suse.cz>
5681         PR ipa/84722
5682         * multiple_target.c (create_dispatcher_calls): Redirect also
5683         an alias.
5685 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5687         PR c++/79937
5688         PR c++/82410
5689         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5690         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5691         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5693 2018-03-16  Julia Koval  <julia.koval@intel.com>
5695         * doc/invoke.texi (Skylake Server): Add CLWB.
5696         Cannonlake): Remove CLWB.
5698 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5700         PR tree-optimization/84841
5701         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5702         1 << 3.
5703         (FLOAT_ONE_CONST_TYPE): Define.
5704         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5705         (sort_by_operand_rank): Put entries with higher constant_type last
5706         rather than first to match comments.
5708 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5710         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5711         split predicate.
5713 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5715         PR c++/79085
5716         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5717         check and use address of target always.
5719 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5721         PR target/84574
5722         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5723         (indirect_thunk_bnd_needed): Likewise.
5724         (indirect_thunks_used): Likewise.
5725         (indirect_thunks_bnd_used): Likewise.
5726         (indirect_return_needed): New.
5727         (indirect_return_bnd_needed): Likewise.
5728         (output_indirect_thunk_function): Add a bool argument for
5729         function return.
5730         (output_indirect_thunk_function): Don't generate alias for
5731         function return thunk.
5732         (ix86_code_end): Call output_indirect_thunk_function to generate
5733         function return thunks.
5734         (ix86_output_function_return): Set indirect_return_bnd_needed
5735         and indirect_return_needed instead of indirect_thunk_bnd_needed
5736         and indirect_thunk_needed.
5738 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5740         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5741         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5742         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5744 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5745             Paul Hua <paul.hua.gm@gmail.com>
5747         PR c/84852
5748         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5750 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
5752         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5753         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5754         resp. SFmode cases.
5756 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
5758         PR target/84711
5759         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5760         instead of GET_MODE_SIZE when comparing Units.
5762 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5764         PR target/68256
5765         * varasm.c (hash_section): Return an unchangeble hash value
5766         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5767         Return !aarch64_can_use_per_function_literal_pools_p ().
5769 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5771         PR target/84860
5772         * optabs.c (emit_conditional_move): Pass address of cmode's copy
5773         rather than address of cmode as last argument to prepare_cmp_insn.
5775 2018-03-15  Julia Koval  <julia.koval@intel.com>
5777         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5778         F_AVX512VNNI, F_AVX512BITALG): New.
5780 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
5782         PR target/83451
5783         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
5784         insn for floating-point loads and stores.
5786 2018-03-14  Carl Love  <cel@us.ibm.com>
5788         * config/rs6000/rs6000-c.c: Add macro definitions for
5789         ALTIVEC_BUILTIN_VEC_PERMXOR.
5790         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5791         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5792         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5793         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5794         UNSPEC_VPERMXOR.
5795         * config/doc/extend.texi: Add prototypes for vec_permxor.
5797 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
5799         PR c/84852
5800         * diagnostic-show-locus.c (class layout_point): Convert m_line
5801         from int to linenum_type.
5802         (line_span::comparator): Use linenum "compare" function when
5803         comparing line numbers.
5804         (test_line_span): New function.
5805         (layout_range::contains_point): Convert param "row" from int to
5806         linenum_type.
5807         (layout_range::intersects_line_p): Likewise.
5808         (layout::will_show_line_p): Likewise.
5809         (layout::print_source_line): Likewise.
5810         (layout::should_print_annotation_line_p): Likewise.
5811         (layout::print_annotation_line): Likewise.
5812         (layout::print_leading_fixits): Likewise.
5813         (layout::annotation_line_showed_range_p): Likewise.
5814         (struct line_corrections): Likewise for field m_row.
5815         (line_corrections::line_corrections): Likewise for param "row".
5816         (layout::print_trailing_fixits): Likewise.
5817         (layout::get_state_at_point): Likewise.
5818         (layout::get_x_bound_for_row): Likewise.
5819         (layout::print_line): Likewise.
5820         (diagnostic_show_locus): Likewise for locals "last_line" and
5821         "row".
5822         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
5823         * input.c (selftest::test_linenum_comparisons): New function.
5824         (selftest::input_c_tests): Call it.
5825         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
5826         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
5827         * selftest.h (ASSERT_GT): New macro.
5828         (ASSERT_GT_AT): New macro.
5829         (ASSERT_LT): New macro.
5830         (ASSERT_LT_AT): New macro.
5832 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
5834         PR rtl-optimization/84780
5835         * combine.c (distribute_links): Don't make a link based on pc_rtx.
5837 2018-03-14  Martin Liska  <mliska@suse.cz>
5839         * tree.c (record_node_allocation_statistics): Use
5840         get_stats_node_kind.
5841         (get_stats_node_kind): New function extracted from
5842         record_node_allocation_statistics.
5843         (free_node): Use get_stats_node_kind.
5845 2018-03-14  Richard Biener  <rguenther@suse.de>
5847         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
5848         that the value-set of ANTIC_IN doesn't grow.
5850         Revert
5851         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5852         member.
5853         (BB_VISITED_WITH_VISITED_SUCCS): New define.
5854         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5856 2018-03-14  Julia Koval  <julia.koval@intel.com>
5858         * config.gcc (icelake-client, icelake-server): New.
5859         (icelake): Remove.
5860         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
5861         (initial_ix86_arch_features): Ditto.
5862         (PTA_SKYLAKE): Add SGX.
5863         (PTA_ICELAKE): Remove.
5864         (PTA_ICELAKE_CLIENT): New.
5865         (PTA_ICELAKE_SERVER): New.
5866         (ix86_option_override_internal): Split up icelake on icelake client and
5867         icelake server.
5868         (get_builtin_code_for_version): Ditto.
5869         (fold_builtin_cpu): Ditto.
5870         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
5871         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
5872         * config/i386/i386.h (processor_type): Ditto.
5873         * doc/invoke.texi: Ditto.
5875 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
5877         PR sanitizer/83392
5878         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
5879         INTEGER_CST offset, add it together with bitpos / 8 and
5880         sign extend based on POINTER_SIZE.
5882         PR target/84844
5883         Revert
5884         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
5886         PR target/78090
5887         * config/i386/constraints.md (Yc): New register constraint.
5888         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
5889         Use Yc constraint for alternative 2 of operand 0.  Remove
5890         preferred_for_speed attribute.
5892 2018-03-14  Richard Biener  <rguenther@suse.de>
5894         PR tree-optimization/84830
5895         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
5896         with the old one to avoid oscillations.
5898 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
5900         PR target/83712
5901         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
5902         pseudos.
5903         (assign_by_spills): Return a flag of reload assignment failure.
5904         Do not process the reload assignment failures.  Do not spill other
5905         reload pseudos if they has the same reg class.  Update n if
5906         necessary.
5907         (lra_assign): Add a return arg.  Set up from the result of
5908         assign_by_spills call.
5909         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5910         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
5911         usage_insns if it is not NULL.
5912         (spill_hard_reg_in_range): New function.
5913         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5914         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5915         function prototypes.
5916         (lra_assign): Change prototype.
5917         * lra.c (lra): Add code to deal with fails by splitting hard reg
5918         live ranges.
5920 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
5922         * config/riscv/riscv.opt (mrelax): New option.
5923         * config/riscv/riscv.c (riscv_file_start): Emit ".option
5924         "norelax" when riscv_mrelax is disabled.
5925         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
5927 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5929         PR target/84743
5930         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
5931         reassociation for int modes.
5933 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5935         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
5936         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
5937         for big-endian.
5938         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
5939         * config/aarch64/aarch64-sve.md
5940         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
5941         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
5942         (*extend<mode><Vwide>2): Rename to...
5943         (aarch64_sve_extend<mode><Vwide>2): ...this.
5944         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
5945         renaming the old pattern to...
5946         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
5947         unsigned packs.
5948         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
5949         define_expand, renaming the old pattern to...
5950         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
5951         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
5952         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
5953         account when deciding which SVE instruction the optab should use.
5954         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
5956 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5958         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
5959         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
5960         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
5961         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
5962         (tlsdesc_small_<mode>): Turn a define_expand and use
5963         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
5964         (tlsdesc_small_advsimd_<mode>): ...this.
5965         (tlsdesc_small_sve_<mode>): New pattern.
5967 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
5969         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
5970         (UNSPEC_UMUL_HIGHPART): New constants.
5971         (MUL_HIGHPART): New int iteraor.
5972         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
5973         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
5974         define_expand.
5975         (*<su>mul<mode>3_highpart): New define_insn.
5977 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
5979         PR lto/84805
5980         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
5981         incomplete types.
5983 2018-03-13  Martin Liska  <mliska@suse.cz>
5985         PR ipa/84658.
5986         * (sem_item_optimizer::sem_item_optimizer): Initialize new
5987         vector.
5988         (sem_item_optimizer::~sem_item_optimizer): Release it.
5989         (sem_item_optimizer::merge_classes): Register variable aliases.
5990         (sem_item_optimizer::fixup_pt_set): New function.
5991         (sem_item_optimizer::fixup_points_to_sets): Likewise.
5992         * ipa-icf.h: Declare new variables and functions.
5994 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
5996         PR middle-end/84834
5997         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
5998         integer_pow2p@2 and test integer_pow2p in condition.
5999         (A < 0 ? C : 0): Similarly for @1.
6001         PR middle-end/84831
6002         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
6003         characters starting at p contain '\0' character, don't look beyond
6004         that.
6006         PR target/84827
6007         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
6008         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
6010         PR target/84828
6011         * reg-stack.c (change_stack): Change update_end var from int to
6012         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
6013         also call set_block_for_insn on the newly added insns and rescan.
6015         PR target/84786
6016         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
6017         on the last operand.
6019         PR c++/84704
6020         * tree.c (stabilize_reference_1): Return save_expr (e) for
6021         STATEMENT_LIST even if it doesn't have side-effects.
6023 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
6025         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
6027 2018-03-12  Renlin Li  <renlin.li@arm.com>
6029         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
6030         aarch64_output_scalar_simd_mov_immediate.
6032 2018-03-12  Martin Sebor  <msebor@redhat.com>
6034         PR tree-optimization/83456
6035         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
6036         for perfectly overlapping calls to memcpy.
6037         (gimple_fold_builtin_memory_chk): Same.
6038         (gimple_fold_builtin_strcpy): Handle no-warning.
6039         (gimple_fold_builtin_stxcpy_chk): Same.
6040         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
6042 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6044         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
6045         parameter.  Use it for SFmode.
6046         (rs6000_function_arg_advance_1): Adjust.
6047         (rs6000_function_arg): Adjust.
6048         (rs6000_gimplify_va_arg): Pass false for that new parameter.
6050 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6052         PR rtl-optimization/84169
6053         PR rtl-optimization/84780
6054         * combine.c (can_combine_p): Check for a 2-insn combination whether
6055         the destination register is used between the two insns, too.
6057 2018-03-12  Richard Biener  <rguenther@suse.de>
6059         PR tree-optimization/84803
6060         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
6061         for refs DR analysis didn't process.
6063 2018-03-12  Richard Biener  <rguenther@suse.de>
6065         PR tree-optimization/84777
6066         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
6067         force-vectorize loops ignore whether we are optimizing for size.
6069 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6071         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
6072         (TARGET_MD_ASM_ADJUST): Define.
6074 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
6075             Kito Cheng  <kito.cheng@gmail.com>
6076             Chung-Ju Wu  <jasonwucj@gmail.com>
6078         * config/nds32/nds32.c (nds32_compute_stack_frame,
6079         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
6080         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
6081         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
6082         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
6083         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
6084         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
6085         * config/nds32/nds32.md (prologue, epilogue): Use macro
6086         NDS32_V3PUSH_AVAILABLE_P to do checking.
6088 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
6090         PR debug/58150
6091         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
6092         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
6093         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
6094         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
6095         addition of most attributes on !orig_type_die or the attribute not
6096         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
6098 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6099             Chung-Ju Wu  <jasonwucj@gmail.com>
6101         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
6102         __NDS32_VH__ macro.
6103         * config/nds32/nds32.opt (mvh): New option.
6105 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6106             Chung-Ju Wu  <jasonwucj@gmail.com>
6108         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
6109         function.
6110         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
6111         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
6112         definition.
6114 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6115             Chung-Ju Wu  <jasonwucj@gmail.com>
6117         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
6118         function.
6119         * config/nds32/nds32-multiple.md (strlensi): New pattern.
6120         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
6122 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
6123             Kito Cheng  <kito.cheng@gmail.com>
6124             Chung-Ju Wu  <jasonwucj@gmail.com>
6126         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
6127         UNSPEC_FFMISM and UNSPEC_FLMISM.
6128         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
6129         for ffb, ffmism and flmism.
6130         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
6131         (unspec_ffmism): Ditto.
6132         (unspec_flmism): Ditto.
6133         (nds32_expand_builtin_impl): Check if string extension is available.
6134         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
6135         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
6137 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
6139         Reverting patch:
6140         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6142         PR target/83712
6143         * lra-assigns.c (assign_by_spills): Return a flag of reload
6144         assignment failure.  Do not process the reload assignment
6145         failures.  Do not spill other reload pseudos if they has the same
6146         reg class.
6147         (lra_assign): Add a return arg.  Set up from the result of
6148         assign_by_spills call.
6149         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6150         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6151         usage_insns if it is not NULL.
6152         (spill_hard_reg_in_range): New function.
6153         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6154         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6155         function prototypes.
6156         (lra_assign): Change prototype.
6157         * lra.c (lra): Add code to deal with fails by splitting hard reg
6158         live ranges.
6160 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
6162         PR target/84807
6163         * config/i386/i386.opt: Replace Enforcment with Enforcement.
6165 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
6167         PR debug/84620
6168         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
6169         (dw_val_node): Add val_symbolic_view.
6170         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
6171         (symview_upper_bound): New.
6172         (new_line_info_table): Initialize symviews_since_reset.
6173         (dwarf2out_source_line): Count symviews_since_reset and set
6174         symview_upper_bound.
6175         (dw_val_equal_p): Handle symview.
6176         (add_AT_symview): New.
6177         (print_dw_val): Handle symview.
6178         (attr_checksum, attr_checksum_ordered): Likewise.
6179         (same_dw_val_p, size_of_die): Likewise.
6180         (value_format, output_die): Likewise.
6181         (add_high_low_attributes): Use add_AT_symview for entry_view.
6182         (dwarf2out_finish): Reset symview_upper_bound, clear
6183         zero_view_p.
6185 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
6187         PR target/83969
6188         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
6189         Add strict argument and use it.
6190         (rs6000_split_multireg_move): Update for new strict argument.
6191         (mem_operand_gpr): Disallow all non-offsettable addresses.
6192         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
6194 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
6196         PR target/84772
6197         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
6198         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
6199         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
6201         PR c++/84767
6202         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
6203         decl, use remap_type if we want to use the type.
6205 2018-03-09  Martin Sebor  <msebor@redhat.com>
6207         PR tree-optimization/84526
6208         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6209         Remove dead code.
6210         (builtin_access::generic_overlap): Be prepared to handle non-array
6211         base objects.
6213 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
6215         PR rtl-optimization/84682
6216         * lra-constraints.c (process_address_1): Check is_address flag
6217         for address constraints.
6218         (process_alt_operands): Likewise.
6219         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
6220         preprocess_constraints.
6221         * recog.h (preprocess_constraints): Add oploc parameter.
6222         Adjust callers.
6223         * recog.c (preprocess_constraints): Test address_operand for
6224         CT_ADDRESS constraints.
6226 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6228         PR target/83712
6229         * lra-assigns.c (assign_by_spills): Return a flag of reload
6230         assignment failure.  Do not process the reload assignment
6231         failures.  Do not spill other reload pseudos if they has the same
6232         reg class.
6233         (lra_assign): Add a return arg.  Set up from the result of
6234         assign_by_spills call.
6235         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6236         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6237         usage_insns if it is not NULL.
6238         (spill_hard_reg_in_range): New function.
6239         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6240         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6241         function prototypes.
6242         (lra_assign): Change prototype.
6243         * lra.c (lra): Add code to deal with fails by splitting hard reg
6244         live ranges.
6246 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6248         PR target/83193
6249         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
6250         Accept complain bool parameter.  Only emit errors if it is true.
6251         (arm_parse_cpu_option_name): Likewise.
6252         (arm_target_thumb_only): Adjust callers of the above.
6253         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6254         prototype to take a default true bool parameter.
6255         (arm_parse_arch_option_name): Likewise.
6257 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
6258             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
6260         PR jit/64089
6261         PR jit/84288
6262         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6263         * configure: Regenerate.
6264         * configure.ac ("linker --version-script option"): New.
6265         ("linker soname option"): New.
6267 2018-03-09  Richard Biener  <rguenther@suse.de>
6269         PR tree-optimization/84775
6270         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6271         immediate uses of predicate stmts and mark them modified.
6273         Revert
6274         PR tree-optimization/84178
6275         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6276         to caller.
6277         (version_loop_for_if_conversion): Delay update_ssa call.
6278         (tree_if_conversion): Delay update_ssa until after predicate
6279         insertion.
6281 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
6283         PR target/84763
6284         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6285         when the function accesses prior frames.
6287 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6289         PR debug/84456
6290         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6291         gen_llsym, otherwise call maybe_gen_llsym.
6293         PR inline-asm/84742
6294         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6295         has ',' character inside of it.
6297 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6299         PR target/84748
6300         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6301         as clobbering CC_REGNUM.
6303 2018-03-08  Richard Biener  <rguenther@suse.de>
6305         PR middle-end/84552
6306         * tree-scalar-evolution.c: Include tree-into-ssa.h.
6307         (follow_copies_to_constant): Do not follow SSA names registered
6308         for update.
6310 2018-03-08  Richard Biener  <rguenther@suse.de>
6312         PR tree-optimization/84178
6313         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6314         to caller.
6315         (version_loop_for_if_conversion): Delay update_ssa call.
6316         (tree_if_conversion): Delay update_ssa until after predicate
6317         insertion.
6319 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
6321         PR tree-optimization/84178
6322         * tree-if-conv.c (release_bb_predicate): Remove the
6323         the assertion that the stmts have NULL use_ops.
6324         Discard the statements, asserting that they haven't
6325         yet been added to a BB.
6327 2018-03-08  Richard Biener  <rguenther@suse.de>
6329         PR tree-optimization/84746
6330         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
6331         (phi_translate): Pass in destination ANTIC_OUT set.
6332         (phi_translate_1): Likewise.  For a simplified result lookup
6333         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
6334         (phi_translate_set): Adjust.
6335         (do_pre_regular_insertion): Likewise.
6336         (do_pre_partial_partial_insertion): Likewise.
6338 2018-03-08  Martin Liska  <mliska@suse.cz>
6340         PR gcov-profile/84735
6341         * doc/gcov.texi: Document usage of profile files.
6342         * gcov-io.h: Document changes in the format.
6344 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
6346         PR debug/84404
6347         PR debug/84408
6348         * dwarf2out.c (struct dw_line_info_table): Update comments for
6349         view == -1.
6350         (FORCE_RESET_NEXT_VIEW): New.
6351         (FORCE_RESETTING_VIEW_P): New.
6352         (RESETTING_VIEW_P): Check for -1 too.
6353         (ZERO_VIEW_P): Likewise.
6354         (new_line_info_table): Force-reset next view.
6355         (dwarf2out_begin_function): Likewise.
6356         (dwarf2out_source_line): Simplify zero_view_p initialization.
6357         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
6358         view directly.  Omit view when omitting .loc at line 0.
6360 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6362         PR tree-optimization/84740
6363         * tree-switch-conversion.c (process_switch): Call build_constructors
6364         only if info.phi_count is non-zero.
6366         PR tree-optimization/84739
6367         * tree-tailcall.c (find_tail_calls): Check call arguments against
6368         DECL_ARGUMENTS (current_function_decl) rather than
6369         DECL_ARGUMENTS (func) when checking for tail recursion.
6371 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6373         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6374         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6375         Volker Reichelt's entry and add entries for people that perform
6376         GCC fuzzy testing and report numerous bugs.
6378 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
6380         PR target/82411
6381         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6382         readonly data in sdata, if that is disabled.
6383         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6384         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6385         -mreadonly-in-sdata option.
6387 2018-03-07  Martin Sebor  <msebor@redhat.com>
6389         PR tree-optimization/84468
6390         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6391         basic block when looking for nul assignment.
6393 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
6395         PR target/84277
6396         * except.h (output_function_exception_table): Adjust prototype.
6397         * except.c (output_function_exception_table): Remove FNNAME parameter
6398         and add SECTION parameter.  Ouput one part of the table at a time.
6399         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6400         the first part of the exception table and emit unwind directives.
6401         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6402         (i386_pe_seh_cold_init): Likewise.
6403         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6404         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6405         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6406         (ix86_output_call_insn): Emit a nop in one more case for SEH.
6407         * config/i386/winnt.c: Include except.h.
6408         (struct seh_frame_state): Add reg_offset, after_prologue and
6409         in_cold_section fields.
6410         (i386_pe_seh_end_prologue): Set seh->after_prologue.
6411         (i386_pe_seh_cold_init): New function.
6412         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6413         to seh->in_cold_section.
6414         (seh_emit_push): Record the offset of the push.
6415         (seh_emit_save): Record the offet of the save.
6416         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6417         Test seh->after_prologue to disregard the epilogue.
6418         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6419         (i386_pe_end_cold_function): New function.
6421 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6423         PR fortran/84565
6424         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6425         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6427         PR c++/84704
6428         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6429         on tmp_var.
6430         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6431         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6433         PR middle-end/84723
6434         * multiple_target.c: Include tree-inline.h and intl.h.
6435         (expand_target_clones): Diagnose and fail if node->definition and
6436         !tree_versionable_function_p (node->decl).
6438 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
6440         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6441         sprint_ul.
6442         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6443         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6444         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6446 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6448         PR target/84710
6449         * combine.c (try_combine): Use reg_or_subregno instead of handling
6450         just paradoxical SUBREGs and REGs.
6452 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
6454          * config/arc/arc.c (arc_finalize_pic): Remove function.
6455          (arc_must_save_register): We use single base PIC register, remove
6456          checks to save/restore the PIC register.
6457          (arc_expand_prologue): Likewise.
6458          * config/arc/arc-protos.h (arc_set_default_type_attributes):
6459          Remove.
6460          (arc_verify_short): Likewise.
6461          (arc_attr_type): Likewise.
6462          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6463          (walk_stores): Likewise.
6464          (arc_address_cost): Make it static.
6465          (arc_verify_short): Likewise.
6466          (branch_dest): Likewise.
6467          (arc_attr_type): Likewise.
6468          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6469          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6470          (arc_final_prescan_insn): Remove inserting the nops due to
6471          hardware hazards.  It is done in reorg step.
6472          (insn_length_variant_t): Remove.
6473          (insn_length_parameters_t): Likewise.
6474          (arc_insn_length_parameters): Likewise.
6475          (arc_get_insn_variants): Likewise.
6476          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6478 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6480         PR inline-asm/84683
6481         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6482         assertion failure.
6484         PR tree-optimization/84687
6485         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6486         on new_node->decl.
6487         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6489 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6491         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6492         Rename to ppc_speculation_barrier.
6493         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6494         __builtin_ppc_speculation_barrier.
6496 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6498         PR target/84700
6499         * combine.c (combine_simplify_rtx): Don't try to simplify if
6500         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6501         are equal to x.
6503 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6505         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6506         to 32 bytes when compiling for POWER9.
6508 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6510         PR target/84564
6511         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6512         regparm >= 3 with no arg reg available also for calls with
6513         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6515         PR target/84524
6516         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6517         orig,vex.
6518         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6520 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6522         PR target/84264
6523         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6525 2018-03-05  Richard Biener  <rguenther@suse.de>
6527         PR tree-optimization/84486
6528         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6529         When inserting a __builtin_assume_aligned call set the LHS
6530         SSA name alignment info accordingly.
6532 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6534         PR tree-optimization/84114
6535         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6536         Avoid reassociation of FLOAT_MODE addition.
6538 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6540         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6541         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6542         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6543         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6544         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6545         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6546         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6547         and -mwbnoinvd.
6548         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6549         __builtin_ia32_wbinvd): New builtins.
6550         (SPECIAL_ARGS2): New.
6551         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6552         (SPECIAL_ARGS2): New.
6553         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6554         (ix86_valid_target_attribute_inner_p): Ditto.
6555         (ix86_init_mmx_sse_builtins): Add special_args2.
6556         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6557         TARGET_WBNOINVD_P): New.
6558         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6559         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6560         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6561         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6562         * config/i386/pconfigintrin.h: New file.
6563         * config/i386/wbnoinvdintrin.h: Ditto.
6564         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6565         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6567 2018-03-05  Richard Biener  <rguenther@suse.de>
6569         PR tree-optimization/84670
6570         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6571         member.
6572         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6573         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6574         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6575         doesn't grow if all successors (recursively) were visited at least
6576         once.
6578 2018-03-05  Richard Biener  <rguenther@suse.de>
6580         PR tree-optimization/84650
6581         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6582         if executed in the loop pipeline.
6584 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6586         * doc/configfiles.texi (Configuration Files): Move info about
6587         conditionalizing $target-protos.h to...
6588         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6589         differs from $target-protos.h.
6591 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6592             Chung-Ju Wu  <jasonwucj@gmail.com>
6594         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6595         * config/nds32/nds32-multiple.md (setmemsi): Define.
6596         * config/nds32/nds32-memory-manipulation.c
6597         (nds32_gen_dup_4_byte_to_word_value): New.
6598         (emit_setmem_word_loop): New.
6599         (emit_setmem_byte_loop): New.
6600         (nds32_expand_setmem_loop): New.
6601         (nds32_expand_setmem_loop_v3m): New.
6602         (nds32_expand_setmem_unroll): New.
6603         (nds32_expand_setmem): New.
6605 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6606             Chung-Ju Wu  <jasonwucj@gmail.com>
6608         * config/nds32/nds32-memory-manipulation.c
6609         (nds32_emit_load_store): New.
6610         (nds32_emit_post_inc_load_store): New.
6611         (nds32_emit_mem_move): New.
6612         (nds32_emit_mem_move_block): New.
6613         (nds32_expand_movmemsi_loop_unknown_size): New.
6614         (nds32_expand_movmemsi_loop_known_size): New.
6615         (nds32_expand_movmemsi_loop): New.
6616         (nds32_expand_movmemsi_unroll): New.
6617         (nds32_expand_movmemqi): Rename ...
6618         (nds32_expand_movmemsi): ... to this.
6619         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6620         (movmemsi): ... to this.
6621         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6622         (nds32_expand_movmemsi): ... to this.
6624 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6625             Monk Chiang  <sh.chiang04@gmail.com>
6626             Chung-Ju Wu  <jasonwucj@gmail.com>
6628         * config/nds32/nds32-protos.h
6629         (nds32_expand_load_multiple): New arguments.
6630         (nds32_expand_store_multiple): Ditto.
6631         (nds32_valid_multiple_load_store): Rename ...
6632         (nds32_valid_multiple_load_store_p): ... to this.
6633         * config/nds32/nds32-memory-manipulation.c
6634         (nds32_expand_load_multiple): Refine implementation.
6635         (nds32_expand_store_multiple): Ditto.
6636         * config/nds32/nds32-multiple.md
6637         (load_multiple): Update nds32_expand_load_multiple interface.
6638         (store_multiple): Update nds32_expand_store_multiple interface.
6639         * config/nds32/nds32-predicates.c
6640         (nds32_valid_multiple_load_store): Rename ...
6641         (nds32_valid_multiple_load_store_p): ... to this and refine
6642         implementation.
6643         * config/nds32/predicates.md
6644         (nds32_load_multiple_and_update_address_operation): New predicate.
6645         (nds32_store_multiple_and_update_address_operation): New predicate.
6647 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6648             Chung-Ju Wu  <jasonwucj@gmail.com>
6650         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6651         (combo): New attribute.
6652         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6654 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6656         * config/nds32/nds32.opt: Change -mcmodel= default value.
6658 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6659             Monk Chiang  <sh.chiang04@gmail.com>
6660             Chung-Ju Wu  <jasonwucj@gmail.com>
6662         * config/nds32/constants.md (unspec_element): New enum.
6663         * config/nds32/constraints.md (Umw): New constraint.
6664         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6665         * config/nds32/nds32-intrinsic.md: Likewise.
6666         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6667         (nds32_valid_smw_lwm_base_p): New.
6668         (nds32_output_smw_single_word): New.
6669         (nds32_output_lmw_single_word): New.
6670         (nds32_expand_unaligned_load): New.
6671         (nds32_expand_unaligned_store): New.
6672         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6673         (nds32_output_smw_single_word): Declare.
6674         (nds32_output_lmw_single_word): Declare.
6675         (nds32_expand_unaligned_load): Declare.
6676         (nds32_expand_unaligned_store): Declare.
6677         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6678         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6679         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6680         NDS32_BUILTIN_UASTORE_DW.
6681         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6682         predicate.
6684 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6685             Kito Cheng  <kito.cheng@gmail.com>
6686             Chung-Ju Wu  <jasonwucj@gmail.com>
6688         * config/nds32/nds32-intrinsic.c
6689         (nds32_expand_builtin_null_ftype_reg): Delete.
6690         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6691         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6692         (nds32_read_argument): New.
6693         (nds32_legitimize_target): Ditto.
6694         (nds32_legitimize_argument): Ditto.
6695         (nds32_check_constant_argument): Ditto.
6696         (nds32_expand_unop_builtin): Ditto.
6697         (nds32_expand_unopimm_builtin): Ditto.
6698         (nds32_expand_binop_builtin): Ditto.
6699         (nds32_builtin_decl_impl): Ditto.
6700         (builtin_description): Ditto.
6701         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6702         (nds32_init_builtins_impl): Ditto.
6703         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6704         (nds32_builtin_decl): New.
6705         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6706         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6708 2018-03-02  Jeff Law  <law@redhat.com>
6710         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6711         (redundant_insn, fill_simple_delay_slots): Likewise.
6712         (fill_slots_from_thread): Likewise.
6713         * resource.c (mark_referenced_resources): Likewise.
6714         (mark_set_resources, find_dead_or_set_registers): Likewise.
6716 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6718         * substring-locations.h (format_warning_va): Formatting fix for
6719         ATTRIBUTE_GCC_DIAG.
6720         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6721         argument.
6722         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6723         * substring-locations.c: Include intl.h.
6724         (format_warning_va): Turned into small wrapper around
6725         format_warning_n_va, renamed to ...
6726         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6727         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6728         use ngettext.
6729         (format_warning_at_substring_n): New function.
6730         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6731         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6732         format_warning_at_substring with just a shorter name instead of
6733         const function pointer.
6734         (fmtwarn_n): New function.
6735         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6736         appropriate, get rid of all the fmtstr temporaries, move conditionals
6737         with G_() wrapped string literals directly into fmtwarn arguments,
6738         cast dir.len to (int), formatting fixes.
6740 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6742         * doc/invoke.texi: Remove "Cilk Plus" references.
6744 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6745             Richard Biener  <rguenther@suse.de>
6747         PR ipa/84628
6748         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6749         for error or warning attributes if CALL_FROM_THUNK_P is set.
6750         Formatting fixes.
6752 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6754         PR target/56540
6755         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6756         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6758         PR target/56540
6759         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6760         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6762         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6763         instead of -1U in last predictors element's probability member.
6765 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6767         PR ipa/83983
6768         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6769         arguments if they are comparable.
6771 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6773         PR tree-optimization/84634
6774         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6775         masks and masked_loop_p with a single loop_masks, making sure it's
6776         null for bb vectorization.
6778 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6780         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6781         (vect_analyze_data_ref_access): Use loop->safe_len rather than
6782         loop->force_vectorize to check whether there is no alias.
6784 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6786         PR target/84614
6787         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6788         prototypes.
6789         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6790         comments.
6791         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6792         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6793         instead of a loop around prev_real_insn.
6794         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6795         prev_real_insn.
6797         PR inline-asm/84625
6798         * config/i386/i386.c (ix86_print_operand): Use conditional
6799         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6800         zero vector.
6802 2018-03-02  Richard Biener  <rguenther@suse.de>
6804         PR tree-optimization/84427
6805         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
6806         (bitmap_set_subtract_values): Rewrite to handle multiple
6807         exprs per value.
6808         (clean): Likewise.
6809         (prune_clobbered_mems): Likewise.
6810         (phi_translate): Take edge instead of pred/phiblock.
6811         (phi_translate_1): Likewise.
6812         (phi_translate_set): Likewise.  Insert all translated
6813         exprs for a value into the set, keeping possibly multiple
6814         expressions per value.
6815         (compute_antic_aux): Adjust for phi_translate changes.
6816         When intersecting union the expressions and prune those
6817         not in the final value set, keeping possibly multiple
6818         expressions per value.  Do not use value-insertion
6819         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
6820         all expressions.  Add verification that the value-sets
6821         only shrink during iteration.
6822         (compute_partial_antic_aux): Adjust for the phi_translate changes.
6823         (do_pre_regular_insertion): Likewise.
6824         (do_pre_partial_partial_insertion): Likewise.
6826 2018-03-02  Richard Biener  <rguenther@suse.de>
6828         PR target/82005
6829         * config/darwin.c (saved_debug_info_level): New static global.
6830         (darwin_asm_lto_start): Disable debug info generation for LTO out.
6831         (darwin_asm_lto_end): Restore debug info generation settings.
6833 2018-03-01  Martin Liska  <mliska@suse.cz>
6835         PR sanitizer/82484
6836         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6837         volatile arguments.
6839 2018-03-01  Richard Biener  <rguenther@suse.de>
6841         PR debug/84645
6842         * dwarf2out.c (gen_variable_die): Properly handle late VLA
6843         type annotation with LTO when debug was disabled at compile-time.
6845 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
6847         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
6848         XINT with INTVAL.
6849         (mips_final_postscan_insn): Likewise.
6851 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
6853         PR rtl-optimization/84528
6854         * alias.c (init_alias_target): Add commentary.
6855         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
6856         a unique base value if the frame pointer is not eliminated
6857         to the stack pointer.
6859 2018-03-01  Tom de Vries  <tom@codesourcery.com>
6861         PR rtl-optimization/83327
6862         * lra-int.h (hard_regs_spilled_into): Declare.
6863         * lra.c (hard_regs_spilled_into): Define.
6864         (init_reg_info): Init hard_regs_spilled_into.
6865         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
6866         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
6867         (process_bb_lives): Handle hard_regs_spilled_into.
6868         (lra_create_live_ranges_1): Before doing liveness propagation, clear
6869         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
6871 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
6873         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
6874         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
6875         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
6876         * config/rs6000/aix72.h: New file.
6878 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
6880         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
6881         instead of warning_at with conditional singular and plural messages
6882         where possible.
6884         PR target/52991
6885         * stor-layout.c (update_alignment_for_field): For
6886         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
6887         && !DECL_PACKED (field), do the alignment update, just use
6888         only desired_align instead of MAX (type_align, desired_align)
6889         as the alignment.
6890         (place_field): Don't do known_align < desired_align handling
6891         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
6892         is non-NULL, instead do it after rli->prev_field handling and
6893         only if not within a bitfield word.  For DECL_PACKED (field)
6894         use type_align of BITS_PER_UNIT.
6896 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
6898         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
6899         superfluous parentheses and trailing spaces.
6901 2018-02-28  Richard Biener  <rguenther@suse.de>
6903         PR tree-optimization/84584
6904         * graphite-scop-detection.c (scop_detection::add_scop): Discard
6905         SCoPs with fake exit edge.
6907 2018-02-28  Martin Liska  <mliska@suse.cz>
6909         PR testsuite/84597
6910         * timevar.c (timer::print): Fix format to properly print 100%
6911         values.
6913 2018-02-28  Richard Biener  <rguenther@suse.de>
6915         PR middle-end/84607
6916         * genmatch.c (capture_info::walk_match): Do not mark
6917         captured expressions without operands as expr_p given
6918         they act more like predicates and should be subject to
6919         "lost tail" side-effect preserving.
6921 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
6923         PR rtl-optimization/81611
6924         * auto-inc-dec.c (attempt_change): Move dead note from
6925         mem_insn if it's the next use of regno
6926         (find_address): Take address use of reg holding
6927         non-incremented value.  Add parm to limit search to the named
6928         reg only.
6929         (merge_in_block): Attempt to use a mem insn that is the next
6930         use of the original regno.
6932 2018-02-27  Martin Sebor  <msebor@redhat.com>
6934         PR c++/83871
6935         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
6936         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
6938 2018-02-27  Martin Sebor  <msebor@redhat.com>
6940         PR translation/84207
6941         * diagnostic-core.h (warning_n, error_n, inform_n): Change
6942         n argument to unsigned HOST_WIDE_INT.
6943         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
6944         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
6945         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
6946         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
6948 2018-02-27  Richard Biener  <rguenther@suse.de>
6950         PR tree-optimization/84512
6951         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6952         Do not use the estimate returned from record_stmt_cost for
6953         the scalar iteration cost but sum properly using add_stmt_cost.
6955 2018-02-27  Richard Biener  <rguenther@suse.de>
6957         PR tree-optimization/84466
6958         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6959         Adjust last change to less strictly validate use operands.
6961 2018-02-27  Martin Liska  <mliska@suse.cz>
6963         PR gcov-profile/84548
6964         * gcov.c (process_file): Allow partial overlap and consider it
6965         also as group functions.
6966         (output_lines): Properly calculate range of lines for a group.
6968 2018-02-27  Martin Liska  <mliska@suse.cz>
6970         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
6971         'ggc' suffixes.  Change first column width.
6972         (timer::print): Fix formatting of the column.
6974 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
6976         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
6977         preserve inline entry blocks for the sake of debug inline
6978         entry point markers alone.
6979         (remove_unused_locals): Suggest in comments a better place to
6980         force the preservation of inline entry blocks that are
6981         otherwise unused, but do not preserve them.
6983 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6985         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
6987 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6989         PR target/84039
6990         * config/i386/constraints.md (Bs): Replace
6991         ix86_indirect_branch_register with
6992         TARGET_INDIRECT_BRANCH_REGISTER.
6993         (Bw): Likewise.
6994         * config/i386/i386.md (indirect_jump): Likewise.
6995         (tablejump): Likewise.
6996         (*sibcall_memory): Likewise.
6997         (*sibcall_value_memory): Likewise.
6998         Peepholes of indirect call and jump via memory: Likewise.
6999         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
7000         (*sibcall_value_GOT_32): Likewise.
7001         * config/i386/predicates.md (indirect_branch_operand): Likewise.
7002         (GOT_memory_operand): Likewise.
7003         (call_insn_operand): Likewise.
7004         (sibcall_insn_operand): Likewise.
7005         (GOT32_symbol_operand): Likewise.
7006         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
7008 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7010         PR rtl-optimization/83496
7011         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
7012         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
7013         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
7014         redundant insn, if any.
7015         (relax_delay_slots): Likewise.
7016         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
7018 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
7020         PR tree-optimization/83965
7021         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
7022         that grouped statements are part of a reduction chain.  Return
7023         true if the statement is not marked as a reduction itself but
7024         is part of a group.
7025         (vect_recog_dot_prod_pattern): Don't check whether the statement
7026         is part of a group here.
7027         (vect_recog_sad_pattern): Likewise.
7028         (vect_recog_widen_sum_pattern): Likewise.
7030 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7032         PR debug/84545
7033         * final.c (rest_of_clean_state): Also look for calls inside sequences.
7035 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7037         PR target/84530
7038         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
7039         the bool argument.
7040         (ix86_output_indirect_function_return): New prototype.
7041         (ix86_split_simple_return_pop_internal): Likewise.
7042         * config/i386/i386.c (indirect_return_via_cx): New.
7043         (indirect_return_via_cx_bnd): Likewise.
7044         (indirect_thunk_name): Handle return va CX_REG.
7045         (output_indirect_thunk_function): Create alias for
7046         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
7047         (ix86_output_indirect_jmp): Remove the bool argument.
7048         (ix86_output_indirect_function_return): New function.
7049         (ix86_split_simple_return_pop_internal): Likewise.
7050         * config/i386/i386.md (*indirect_jump): Don't pass false
7051         to ix86_output_indirect_jmp.
7052         (*tablejump_1): Likewise.
7053         (simple_return_pop_internal): Change it to define_insn_and_split.
7054         Call ix86_split_simple_return_pop_internal to split it for
7055         -mfunction-return=.
7056         (simple_return_indirect_internal): Call
7057         ix86_output_indirect_function_return instead of
7058         ix86_output_indirect_jmp.
7060 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
7062         PR bootstrap/84405
7063         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
7064         memset and value initialization afterwards.
7066 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
7068         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
7070 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7072         PR target/84521
7073         * common/config/aarch64/aarch64-common.c
7074         (aarch_option_optimization_table[]): Switch
7075         off fomit-frame-pointer
7077 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7078             Chung-Ju Wu  <jasonwucj@gmail.com>
7080         * config/nds32/nds32-multiple.md (load_multiple): Disallow
7081         volatile memory.
7082         (store_multiple): Ditto.
7084 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7086         * config.gcc: Add --with-cpu support for nds32 target.
7087         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
7088         * config/nds32/nds32.opt: Add -mcpu= option.
7090 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
7092         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
7093         isel=yes): Warn for these deprecated options.
7095 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
7097         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
7098         ISA_2_5_MASKS_EMBEDDED.
7100 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
7102         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
7103         p->max as pointers rather than using iterative_hash_expr.
7105 2018-02-23  Carl Love  <cel@us.ibm.com>
7107         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
7108         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
7109         BU_P8V_OVERLOAD_2.
7110         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
7111         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
7112         P8V_BUILTIN_VEC_VUNSIGNED2.
7114 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
7116         PR target/81572
7117         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
7118         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
7119         LRA_UNKNOWN_ALT.
7120         * lra-constraints.c (curr_insn_transform): Set up
7121         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
7122         LRA_UNKNOWN_ALT.
7123         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
7124         * lra-eliminations.c (spill_pseudos): Ditto.
7125         (process_insn_for_elimination): Ditto.
7126         * lra-lives.c (reg_early_clobber_p): Use the new macros.
7127         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
7128         LRA_NON_CLOBBERED_ALT.
7130 2018-02-22  Martin Sebor  <msebor@redhat.com>
7132         PR tree-optimization/84480
7133         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
7134         to maybe_diag_stxncpy_trunc.  Call it.
7135         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
7136         from gimple_fold_builtin_strcpy.  Print inlining stack.
7137         (handle_builtin_stxncpy): Print inlining stack.
7138         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
7140 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
7142         PR target/84176
7143         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
7144         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
7145         and -fcheck-pointer-bounds are used together.
7146         (indirect_thunk_prefix): New enum.
7147         (indirect_thunk_need_prefix): New function.
7148         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
7149         "_nt" instead of "_bnd" for NOTRACK prefix.
7150         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
7151         (output_indirect_thunk_function): Likewise.
7152         (): Likewise.
7153         (ix86_code_end): Update output_indirect_thunk_function calls.
7154         (ix86_output_indirect_branch_via_reg): Replace
7155         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
7156         (ix86_output_indirect_branch_via_push): Likewise.
7157         (ix86_output_function_return): Likewise.
7158         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
7159         incompatible with -fcf-protection=branch and
7160         -fcheck-pointer-bounds.
7162 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7164         PR target/83335
7165         * config/aarch64/aarch64.c (aarch64_print_address_internal):
7166         Change gcc_assert call to output_operand_lossage.
7168 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7170         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
7172 2018-02-22  DJ Delorie  <dj@redhat.com>
7173             Sebastian Perta  <sebastian.perta@renesas.com>
7174             Oleg Endo  <olegendo@gcc.gnu.org>
7176         * config/rx/rx.c (rx_rtx_costs): New function.
7177         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
7179 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7181         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
7183 2018-02-22  Martin Liska  <mliska@suse.cz>
7185         PR driver/83193
7186         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
7187         Add "native" as a possible value.
7189 2018-02-22  Martin Liska  <mliska@suse.cz>
7191         PR driver/83193
7192         * config/i386/i386.c (ix86_option_override_internal):
7193         Add "native" as a possible value for -march and -mtune.
7195 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
7197         PR target/84502
7198         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
7199         to all type variants.
7201         PR tree-optimization/84503
7202         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
7203         width as info->bitpos + info->bitsize - start.
7204         (merged_store_group::merge_overlapping): Simplify width computation.
7205         (check_no_overlap): New function.
7206         (imm_store_chain_info::try_coalesce_bswap): Compute expected
7207         start + width and last_order of the group, fail if check_no_overlap
7208         fails.
7209         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
7210         to group if check_no_overlap fails.
7212 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7214         * config/rs6000/altivec.md: Delete contraint arguments to
7215         define_expand, define_split, and define_peephole2, and in
7216         define_insn_and_split if always unused.
7217         * config/rs6000/darwin.md: Ditto.
7218         * config/rs6000/dfp.md: Ditto.
7219         * config/rs6000/rs6000.md: Ditto.
7220         * config/rs6000/sync.md: Ditto.
7221         * config/rs6000/vector.md: Ditto.
7222         * config/rs6000/vsx.md: Ditto.
7224 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7226         * config/rs6000/altivec.md: Write output control strings as braced
7227         blocks instead of double-quoted strings.
7228         * config/rs6000/darwin.md: Ditto.
7229         * config/rs6000/rs6000.md: Ditto.
7230         * config/rs6000/vector.md: Ditto.
7231         * config/rs6000/vsx.md: Ditto.
7233 2018-02-21  Jason Merrill  <jason@redhat.com>
7235         PR c++/84314 - ICE with templates and fastcall attribute.
7236         * attribs.c (build_type_attribute_qual_variant): Remove assert.
7238 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7240         * ipa-cp.c (determine_versionability): Fix comment typos.
7242 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7244         PR c/84229
7245         * ipa-cp.c (determine_versionability): Do not version functions caling
7246         va_arg_pack.
7248 2018-02-21  Martin Liska  <mliska@suse.cz>
7250         PR driver/83193
7251         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7252         Add "native" as a possible value.
7253         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
7254         the macro when native cpu detection is available.
7256 2018-02-21  Martin Liska  <mliska@suse.cz>
7258         PR driver/83193
7259         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7260         Add "native" as a possible value.
7261         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7262         when native cpu detection is available.
7264 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
7265             Martin Sebor  <msebor@redhat.com>
7267         PR tree-optimization/84478
7268         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7269         false.
7270         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7271         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7272         support which is conservatively correct, for 2 only stay conservative
7273         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
7274         argument to the 2 argument get_range_strlen, adjust 6 arg
7275         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7276         false.
7277         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7278         (gimple_fold_builtin_strlen): Pass true as last argument to
7279         get_range_strlen.
7281 2018-02-20  Martin Sebor  <msebor@redhat.com>
7283         PR middle-end/84095
7284         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7285         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
7286         (builtin_memref::builtin_memref): Factor out parts into
7287         set_base_and_offset and call it.
7289 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7291         PR middle-end/84406
7292         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7293         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7294         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
7295         search at the associated MODE_INT.
7297 2018-02-20  Jeff Law  <law@redhat.com>
7299         PR middle-end/82123
7300         PR tree-optimization/81592
7301         PR middle-end/79257
7302         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
7303         for range data rather than using global data.
7304         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
7305         range data rather than using global data.
7306         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
7307         pass it to children as needed.
7308         (struct directive::fmtresult): Similarly.
7309         (struct directive::set_width): Similarly.
7310         (struct directive::set_precision): Similarly.
7311         (format_integer, format_directive, parse_directive): Similarly.
7312         (format_none): Accept unnamed vr_values parameter.
7313         (format_percent, format_floating, format_character): Similarly.
7314         (format_string, format_plain): Similarly.
7315         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
7316         the EVRP range analyzer for range data rather than using global data.
7317         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
7318         gimple-ssa-evrp-analyze.h
7319         (class sprintf_dom_walker): Add after_dom_children member function.
7320         Add evrp_range_analyzer member.
7321         (sprintf_dom_walker::before_dom_children): Call into the EVRP
7322         range analyzer as needed.
7323         (sprintf_dom_walker::after_dom_children): New member function.
7324         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
7325         if not optimizing.
7326         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
7327         (evrp_range_analyzer::pop_to_marker): Likewise.
7329 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7331         PR tree-optimization/84419
7332         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
7333         with the required type if its current type is compatible but
7334         different.
7336 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
7338         PR middle-end/82004
7339         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
7340         after vectorization.
7342 2018-02-20  Martin Liska  <mliska@suse.cz>
7344         PR driver/83193
7345         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
7346         possible values if we don't have a hint.
7348 2018-02-20  Martin Liska  <mliska@suse.cz>
7350         PR c/84310
7351         PR target/79747
7352         * final.c (shorten_branches): Build align_tab array with one
7353         more element.
7354         * opts.c (finish_options): Add alignment option limit check.
7355         (MAX_CODE_ALIGN): Likewise.
7356         (MAX_CODE_ALIGN_VALUE): Likewise.
7357         * doc/invoke.texi: Document maximum allowed option value for
7358         all -falign-* options.
7360 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
7362         PR target/84146
7363         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
7364         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
7365         * var-tracking.c (emit_note_insn_var_location): Remove all references
7366         to NOTE_INSN_CALL_ARG_LOCATION.
7367         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7368         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7369         Use copy_rtx_if_shared.
7370         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7371         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7372         (dwarf2out_var_location): Remove handling of
7373         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7374         on call_insn.
7375         * final.c (final_scan_insn): Remove all references to
7376         NOTE_INSN_CALL_ARG_LOCATION.
7377         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
7378         before dumping final insns.
7379         * except.c (emit_note_eh_region_end): Remove all references to
7380         NOTE_INSN_CALL_ARG_LOCATION.
7381         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7382         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7383         * config/arc/arc.c (hwloop_optimize): Likewise.
7384         * config/arm/arm.c (create_fix_barrier): Likewise.
7385         * config/s390/s390.c (s390_chunkify_start): Likewise.
7386         * config/sh/sh.c (find_barrier): Likewise.
7387         * config/i386/i386.c (rest_of_insert_endbranch,
7388         ix86_seh_fixup_eh_fallthru): Likewise.
7389         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7390         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7391         * config/frv/frv.c (frv_function_prologue): Likewise.
7392         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
7393         reg note.
7394         (note_outside_basic_block_p): Remove all references to
7395         NOTE_INSN_CALL_ARG_LOCATION.
7396         * gengtype.c (adjust_field_rtx_def): Likewise.
7397         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7398         Likewise.
7399         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7400         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7402         PR c++/84444
7403         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7404         is ADDR_EXPR.
7406         PR tree-optimization/84452
7407         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7408         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7409         is NULL.
7411 2018-02-19  Martin Liska  <mliska@suse.cz>
7413         PR sanitizer/82183
7414         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7416 2018-02-19  Martin Liska  <mliska@suse.cz>
7417             Richard Sandiford  <richard.sandiford@linaro.org>
7419         PR tree-optimization/82491
7420         * gimple-fold.c (get_base_constructor): Make earlier bail out
7421         to prevent ubsan.
7423 2018-02-19  Carl Love  <cel@us.ibm.com>
7425         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7426         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7427         BU_P8V_OVERLOAD_1.
7428         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7429         P8V_BUILTIN_VEC_NEG.
7431 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
7433         * config/rl78/rl78.md (movdf): New define expand.
7435 2018-02-19  Martin Liska  <mliska@suse.cz>
7437         PR other/80589
7438         * doc/invoke.texi: Fix typo.
7439         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7441 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
7443         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7444         handle rs6000_single_float and rs6000_double_float specially for
7445         e500 family CPUs.
7447 2018-02-16  Jeff Law  <law@redhat.com>
7449         * config/rx/rx.c (add_pop_cfi_notes): New function.;
7450         (pop_regs): Use it.
7452 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7454         PR ipa/84425
7455         * ipa-inline.c (inline_small_functions): Fix a typo.
7457 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7459         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7461 2018-02-16  Carl Love  <cel@us.ibm.com>
7463         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7464         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7465         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7466         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7467         expansion to P8V_BUILTIN_VEC_FLOAT2.
7469 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
7471         PR rtl-optimization/70023
7472         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7473         src_regno into account.
7475 2018-02-16  Carl Love  <cel@us.ibm.com>
7477         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7478         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7479         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7480         * config/rs6000/rs6000.c: Remove case statements for
7481         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7482         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7483         and P9V_BUILTIN_VEC_VINSERT4B.
7484         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7485         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7486         * config/rs6000/vsx.md:
7487         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7488         vec_insert4b.
7490 2018-02-16  Carl Love  <cel@us.ibm.com>
7492         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7493         vec_insert4b.
7494         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7495         definitions.
7496         * config/rs6000/rs6000-c.c: Add the definitions for
7497         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7498         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7499         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7500         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7501         definition for insert4b and define insn *insert3b_internal.
7502         * doc/extend.texi: Add documentation for vec_extract4b.
7504 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7506         * doc/extend.texi (Backwards Compatibility): Mention friend
7507         injection.  Note for-scope is deprecated.
7508         * doc/invoke.texi (-ffriend-injection): Deprecate.
7510 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7512         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7513         that moved to I2, also allow destinations that are a paradoxical
7514         subreg (instead of a normal reg).
7516 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7518         PR target/83831
7519         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7520         to QImode.
7522 2018-02-16  Richard Biener  <rguenther@suse.de>
7524         PR tree-optimization/84037
7525         PR tree-optimization/84016
7526         PR target/82862
7527         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7528         Adjust vec_construct for the fact we need additional higher latency
7529         128bit inserts for AVX256 and AVX512 vector builds.
7530         (ix86_add_stmt_cost): Scale vector construction cost for
7531         elementwise loads.
7533 2018-02-16  Richard Biener  <rguenther@suse.de>
7535         PR tree-optimization/84417
7536         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7537         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7538         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7540 2018-02-16  Martin Liska  <mliska@suse.cz>
7542         PR sanitizer/84307
7543         * internal-fn.def (ASAN_CHECK): Set proper flags.
7544         (ASAN_MARK): Likewise.
7546 2018-02-16  Julia Koval  <julia.koval@intel.com>
7548         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7549         from PTA_CANNONLAKE.
7551 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7553         PR target/84272
7554         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7555         Use ++iter rather than iter++ for std::list iterators.
7556         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7557         defer deleting them until all nodes in the forest are processed.  Do
7558         free even leaf nodes.  Change to_process into auto_vec.
7560         PR bootstrap/84405
7561         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7562         * vec.h (vec_default_construct): Use memset instead of placement new
7563         if BROKEN_VALUE_INITIALIZATION is defined.
7564         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7565         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7566         is defined.
7568         PR rtl-optimization/83723
7569         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7570         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7571         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7572         recursive calls.
7573         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7574         callers.
7575         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7577 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7579         PR rtl-optimization/81443
7580         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7581         from inner REGs to paradoxical SUBREGs.
7583 2018-02-16  Richard Biener  <rguenther@suse.de>
7585         PR tree-optimization/84399
7586         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7587         For operands we can analyze at their definition make sure we can
7588         analyze them at each use as well.
7590 2018-02-16  Richard Biener  <rguenther@suse.de>
7592         PR tree-optimization/84190
7593         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7594         volatile accesses if the decl isn't volatile.
7596 2018-02-15  Jason Merrill  <jason@redhat.com>
7598         PR c++/84314 - ICE with templates and fastcall attribute.
7599         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7600         TYPE_CANONICAL on an existing type.
7602 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7604         PR tree-optimization/84383
7605         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7606         dstoff nor call operand_equal_p if dstbase is NULL.
7608         PR tree-optimization/84334
7609         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7610         also a CONSTANT_CLASS_P, punt.
7612 2018-02-14  Jim Wilson  <jimw@sifive.com>
7614         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7615         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7616         to where locals are set.  Add TARGET_RVC support.
7617         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7619 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7621         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7623 2018-02-14  Martin Sebor  <msebor@redhat.com>
7625         PR tree-optimization/83698
7626         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7627         arrays constrain the offset range to their bounds.
7628         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7629         (builtin_access::overlap): Avoid setting the size of overlap if it's
7630         already been set.
7631         (maybe_diag_overlap): Also consider arrays when deciding what values
7632         of offsets to include in diagnostics.
7634 2018-02-14  Martin Sebor  <msebor@redhat.com>
7636         PR c/84108
7637         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7638         that correspond to the kind of a declaration.
7640 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7642         PR target/83984
7643         * config/pa/pa.md: Load address of PIC label using the linkage table
7644         if the label is nonlocal.
7646 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7648         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7649         warning message if user requests -maltivec=be.
7650         * doc/invoke.texi: Document deprecation of -maltivec=be.
7652 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7654         PR target/84220
7655         * config/rs6000/rs6000-c.c: Update definitions for
7656         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7657         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7659 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7661         PR target/84239
7662         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7663         add _get_ssp intrinsics. Remove argument from
7664         __builtin_ia32_rdssp[d|q].
7665         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7666         * config/i386/i386-builtin.def: Remove argument from
7667         __builtin_ia32_rdssp[d|q].
7668         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7669         ix86_expand_special_args_builtin for _rdssp[d|q].
7670         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7671         Clear register before usage.
7672         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7673         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7675 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7677         PR tree-optimization/84357
7678         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7679         operand 1 of an ARRAY_REF too.
7681 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7683         PR target/83831
7684         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7685         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7686         declarations.
7687         (set_of_reg): New struct.
7688         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7689         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7690         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7691         functions.
7692         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7693         Split into bitclr, bitset, bitinvert patterns if appropriate.
7694         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7695         use rx_fuse_in_memory_bitop.
7696         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7697         to named insn, correct maximum insn length.
7699 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7701         PR target/79242
7702         * machmode.def: Define a complex mode for PARTIAL_INT.
7703         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7704         MODE_PARTIAL_INT.
7705         * doc/rtl.texi: Document CSPImode.
7706         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7707         handling.
7708         (msp430_hard_regno_nregs_with_padding): Likewise.
7710 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7712         PR target/84279
7713         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7715 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7717         PR rtl-optimization/84169
7718         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7719         we generated a parallel as new i3 and we split that to new i2 and i3
7720         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7721         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7722         those to i2, not i1.  Partially rewrite this scan code.
7724 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7726         PR c/82210
7727         * stor-layout.c (place_field): For variable length fields, adjust
7728         offset_align afterwards not just based on the field's alignment,
7729         but also on the size.
7731         PR middle-end/84309
7732         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7733         of exps and logs in the use_exp2 case.
7735 2018-02-13  Jeff Law  <law@redhat.com>
7737         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7738         entry for "vector".
7740         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7741         ARGS as unused.
7743 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7745         PR debug/84342
7746         PR debug/84319
7747         * common.opt (gas-loc-support, gas-locview-support): New.
7748         (ginline-points, ginternal-reset-location-views): New.
7749         * doc/invoke.texi: Document them.  Use @itemx where intended.
7750         (gvariable-location-views): Adjust.
7751         * target.def (reset_location_view): New.
7752         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7753         (TARGET_RESET_LOCATION_VIEW): New.
7754         * doc/tm.texi: Rebuilt.
7755         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7756         (dwarf2out_default_as_locview_support): New.
7757         (output_asm_line_debug_info): Use option variables.
7758         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7759         (output_loc_list): Likewise.
7760         (add_high_low_attributes): Check option variables.
7761         Don't output entry view attribute in strict mode.
7762         (gen_inlined_subroutine_die): Check option variables.
7763         (dwarf2out_inline_entry): Likewise.
7764         (init_sections_and_labels): Likewise.
7765         (dwarf2out_early_finish): Likewise.
7766         (maybe_reset_location_view): New, from...
7767         (dwarf2out_var_location): ... here.  Call it.
7768         * debug.h (dwarf2out_default_as_loc_support): Declare.
7769         (dwarf2out_default_as_locview_support): Declare.
7770         * hooks.c (hook_int_rtx_insn_0): New.
7771         * hooks.h (hook_int_rtx_insn_0): Declare.
7772         * toplev.c (process_options): Take -gas-loc-support and
7773         -gas-locview-support from dwarf2out.  Enable
7774         -gvariable-location-views by default only with locview
7775         assembler support.  Enable -ginternal-reset-location-views by
7776         default only if the target defines the corresponding hook.
7777         Enable -ginline-points by default if location views are
7778         enabled; force it disabled if statement frontiers are
7779         disabled.
7780         * tree-inline.c (expand_call_inline): Check option variables.
7781         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7783 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
7785         PR tree-optimization/84321
7786         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7787         handling.  Also check whether the anti-range contains any values
7788         that satisfy the mask; switch to a VR_RANGE if not.
7790 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
7792         PR sanitizer/84340
7793         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7795 2018-02-13  Martin Jambor  <mjambor@suse.cz>
7797         PR c++/83990
7798         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7799         of call statements, also set location of a load to a temporary.
7801 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
7803         * config/rl78/rl78.c (add_vector_labels): New function.
7804         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
7805         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
7806         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
7807         which checks that no arguments are passed.
7808         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
7809         * doc/extend.texi: Documentation for the new attribute.
7811 2018-02-13  Andreas Schwab  <schwab@suse.de>
7813         * config/riscv/linux.h (CPP_SPEC): Define.
7815 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7817         PR target/84335
7818         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
7819         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
7820         OPTION_MASK_ISA_AES as first argument to def_builtin_const
7821         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
7822         instead of OPTION_MASK_ISA_PCLMUL as first argument to
7823         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
7824         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
7825         temporarily for AES and PCLMUL builtins.
7827         PR tree-optimization/84339
7828         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
7829         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
7830         Formatting fixes.
7832         PR middle-end/84309
7833         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
7834         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
7835         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
7836         inline function.
7837         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
7838         inline function.
7839         * omp-simd-clone.h: New file.
7840         * omp-simd-clone.c: Include omp-simd-clone.h.
7841         (expand_simd_clones): No longer static.
7842         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
7843         cgraph.h and omp-simd-clone.h.
7844         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
7845         (vect_recog_widen_shift_pattern): Formatting fix.
7846         (vect_pattern_recog_1): Don't check optab for calls.
7848         PR target/84336
7849         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
7850         operands[2] into a REG before using gen_lowpart on it.
7852 2018-02-12  Jeff Law  <law@redhat.com>
7854         PR target/83760
7855         * config/sh/sh.c (find_barrier): Consider a sibling call
7856         a barrier as well.
7858         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
7859         successfully back substituting a reg.
7861 2018-02-12  Richard Biener  <rguenther@suse.de>
7863         PR tree-optimization/84037
7864         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
7865         parameter, move visited init to caller.
7866         (vect_slp_analyze_operations): Separate cost from validity
7867         check, initialize visited once for all instances.
7868         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
7869         for all instances.
7870         * tree-vect-stmts.c (vect_model_simple_cost): Make early
7871         out an assert.
7872         (vect_model_promotion_demotion_cost): Likewise.
7873         (vectorizable_bswap): Guard cost modeling with !slp_node
7874         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
7875         SLP stmts.
7876         (vectorizable_call): Likewise.
7877         (vectorizable_conversion): Likewise.
7878         (vectorizable_assignment): Likewise.
7879         (vectorizable_shift): Likewise.
7880         (vectorizable_operation): Likewise.
7881         (vectorizable_store): Likewise.
7882         (vectorizable_load): Likewise.
7883         (vectorizable_condition): Likewise.
7884         (vectorizable_comparison): Likewise.
7886 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
7888         PR sanitizer/84307
7889         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
7890         (ASAN_MARK): Fix fnspec to account for return value, change pointer
7891         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
7893 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
7895         PR middle-end/83665
7896         * params.def (inline-min-speedup): Increase from 8 to 15.
7897         (max-inline-insns-auto): Decrease from 40 to 30.
7898         * ipa-split.c (consider_split): Add some buffer for function to
7899         be considered inlining candidate.
7900         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
7901         default values.
7903 2018-02-12  Richard Biener  <rguenther@suse.de>
7905         PR tree-optimization/84037
7906         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
7907         matched stmts if we cannot swap the non-matched ones.
7909 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7911         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
7912         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
7913         _mm_maskz_scalef_round_ss): New intrinsics.
7914         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
7915         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
7916         __builtin_ia32_scalefss_round): Remove.
7917         (__builtin_ia32_scalefsd_mask_round,
7918         __builtin_ia32_scalefss_mask_round): New intrinsics.
7919         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
7920         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
7921         ((match_operand:VF_128 2 "<round_nimm_predicate>"
7922         "<round_constraint>")): Changed to ...
7923         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
7924         "<round_scalar_constraint>")): ... this.
7925         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
7926         %0, %1, %2<round_op3>}"): Changed to ...
7927         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
7928         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
7929         %2<round_scalar_mask_op3>}"): ... this.
7930         * config/i386/subst.md (round_scalar_nimm_predicate): New.
7932 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
7934         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
7935         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
7936         (_mm_maskz_sqrt_round_ss): New intrinsics.
7937         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
7938         (__builtin_ia32_sqrtsd_mask_round)
7939         (__builtin_ia32_sqrtss_mask_round): New builtins.
7940         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
7941         (__builtin_ia32_sqrtss_round): Remove.
7942         (__builtin_ia32_sqrtsd_mask_round)
7943         (__builtin_ia32_sqrtss_mask_round): New builtins.
7944         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
7945         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
7946         ((match_operand:VF_128 1 "vector_operand"
7947         "xBm,<round_constraint>")): Changed to ...
7948         ((match_operand:VF_128 1 "vector_operand"
7949         "xBm,<round_scalar_constraint>")): ... this.
7950         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
7951         %0, %2, %<iptr>1<round_op3>}): Changed to ...
7952         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
7953         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
7954         %<iptr>1<round_scalar_mask_op3>}): ... this.
7955         ((set_attr "prefix" "<round_prefix>")): Changed to ...
7956         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
7958 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
7960         PR target/84266
7961         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
7962         Cast vec_cmpeq result to correct type.
7963         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
7964         Cast vec_cmpgt result to correct type.
7966 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
7968         * final.c (final_scan_insn_1): Renamed from...
7969         (final_scan_insn): ... this.  New wrapper, to recover
7970         seen from the outermost call in recursive ones.
7971         * config/sparc/sparc.c (output_return): Drop seen from call.
7972         (output_sibcall): Likewise.
7973         * config/visium/visium.c (output_branch): Likewise.
7975 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
7977         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
7978         function label.
7980 2018-02-10  Alan Modra  <amodra@gmail.com>
7982         PR target/84300
7983         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
7984         Specify LR as an input.
7986 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
7988         PR sanitizer/83987
7989         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
7990         remove_member_access_dummy_vars): New functions.
7991         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
7992         lower_omp_1, execute_lower_omp): Use them.
7994         PR rtl-optimization/84308
7995         * shrink-wrap.c (spread_components): Release todo vector.
7997 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
7999         PR rtl-optimization/57193
8000         * ira-color.c (struct allocno_color_data): Add member
8001         conflict_allocno_hard_prefs.
8002         (update_conflict_allocno_hard_prefs): New.
8003         (bucket_allocno_compare_func): Add a preference based on
8004         conflict_allocno_hard_prefs.
8005         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
8006         (color_allocnos): Remove a dead code.  Initiate
8007         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
8009 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8011         PR target/84226
8012         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
8013         constraint from =wa to wa.  Avoid a subreg on the output operand,
8014         instead use a pseudo and subreg it in a move.
8015         (p9_xxbrd_<mode>): Changed to ...
8016         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
8017         (p9_xxbrd_v2df): New expander.
8018         (p9_xxbrw_<mode>): Changed to ...
8019         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
8020         (p9_xxbrw_v4sf): New expander.
8022 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8024         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
8026 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
8028         PR target/83926
8029         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
8030         multiply in 32-bit mode.
8031         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
8032         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
8033         mode.
8035 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8037         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
8038         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
8039         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
8040         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
8042 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
8044         PR lto/84213
8045         * dwarf2out.c (is_trivial_indirect_ref): New function.
8046         (dwarf2out_late_global_decl): Do not generate a location
8047         attribute for variables that have a non-trivial DECL_VALUE_EXPR
8048         and that are not defined in the current unit.
8050 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8052         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
8053         instead of a libcall for UNORDERED.
8055 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
8057         PR target/82641
8058         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
8059         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
8061 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8063         PR target/PR84295
8064         * config/s390/s390.c (s390_set_current_function): Invoke
8065         s390_indirect_branch_settings also if fndecl didn't change.
8067 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8069         * config/rs6000/rs6000.md (blockage): Set length to zero.
8071 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8073         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
8075 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8077         PR sanitizer/84285
8078         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
8079         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
8080         -static-lib*san.
8082         PR debug/84252
8083         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
8084         PARALLEL incoming that failed vt_get_decl_and_offset check.
8086         PR middle-end/84237
8087         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
8088         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
8089         TREE_READONLY bit.
8090         (get_variable_section): For decls in named .bss* sections pass true as
8091         second argument to bss_initializer_p.
8093 2018-02-09  Marek Polacek  <polacek@redhat.com>
8094             Jakub Jelinek  <jakub@redhat.com>
8096         PR c++/83659
8097         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
8098         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
8099         Sync some changes from cxx_fold_indirect_ref.
8101 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8103         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
8104         markers.
8105         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
8106         (BLOCK_INLINE_ENTRY_LABEL): New.
8107         (dwarf2out_var_location): Disregard inline entry markers.
8108         (inline_entry_data): New struct.
8109         (inline_entry_data_hasher): New hashtable type.
8110         (inline_entry_data_hasher::hash): New.
8111         (inline_entry_data_hasher::equal): New.
8112         (inline_entry_data_table): New variable.
8113         (add_high_low_attributes): Add DW_AT_entry_pc and
8114         DW_AT_GNU_entry_view attributes if a pending entry is found
8115         in inline_entry_data_table.  Add old entry_pc attribute only
8116         if debug nonbinding markers are disabled.
8117         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
8118         markers are enabled.
8119         (block_within_block_p, dwarf2out_inline_entry): New.
8120         (dwarf2out_finish): Check that no entries remained in
8121         inline_entry_data_table.
8122         * final.c (reemit_insn_block_notes): Handle inline entry notes.
8123         (final_scan_insn, notice_source_line): Likewise.
8124         (rest_of_clean_state): Skip inline entry markers.
8125         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
8126         markers.
8127         * gimple.c (gimple_build_debug_inline_entry): New.
8128         * gimple.h (enum gimple_debug_subcode): Add
8129         GIMPLE_DEBUG_INLINE_ENTRY.
8130         (gimple_build_debug_inline_entry): Declare.
8131         (gimple_debug_inline_entry_p): New.
8132         (gimple_debug_nonbind_marker_p): Adjust.
8133         * insn-notes.def (INLINE_ENTRY): New.
8134         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
8135         inline entry marker notes.
8136         (print_insn): Likewise.
8137         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
8138         (INSN_DEBUG_MARKER_KIND): Likewise.
8139         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
8140         * tree-inline.c (expand_call_inline): Build and insert
8141         debug_inline_entry stmt.
8142         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
8143         inline entry blocks early, if nonbind markers are enabled.
8144         (dump_scope_block): Dump fragment info.
8145         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
8146         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
8147         (gimple_build_debug_inline_entry): New.
8148         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
8149         Enable/disable inline entry points too.
8150         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
8151         (DEBUG_INSN): Describe inline entry markers.
8153         * common.opt (gvariable-location-views): New.
8154         (gvariable-location-views=incompat5): New.
8155         * config.in: Rebuilt.
8156         * configure: Rebuilt.
8157         * configure.ac: Test assembler for view support.
8158         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
8159         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
8160         * dwarf2out.c (var_loc_view): New typedef.
8161         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
8162         (dwarf2out_locviews_in_attribute): New.
8163         (dwarf2out_locviews_in_loclist): New.
8164         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
8165         (enum dw_line_info_opcode): Add LI_adv_address.
8166         (struct dw_line_info_table): Add view.
8167         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
8168         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
8169         (zero_view_p): New variable.
8170         (ZERO_VIEW_P): New macro.
8171         (output_asm_line_debug_info): New.
8172         (struct var_loc_node): Add view.
8173         (add_AT_view_list, AT_loc_list): New.
8174         (add_var_loc_to_decl): Add view param.  Test it against last.
8175         (new_loc_list): Add view params.  Record them.
8176         (AT_loc_list_ptr): Handle loc and view lists.
8177         (view_list_to_loc_list_val_node): New.
8178         (print_dw_val): Handle dw_val_class_view_list.
8179         (size_of_die): Likewise.
8180         (value_format): Likewise.
8181         (loc_list_has_views): New.
8182         (gen_llsym): Set vl_symbol too.
8183         (maybe_gen_llsym, skip_loc_list_entry): New.
8184         (dwarf2out_maybe_output_loclist_view_pair): New.
8185         (output_loc_list): Output view list or entries too.
8186         (output_view_list_offset): New.
8187         (output_die): Handle dw_val_class_view_list.
8188         (output_dwarf_version): New.
8189         (output_compilation_unit_header): Use it.
8190         (output_skeleton_debug_sections): Likewise.
8191         (output_rnglists, output_line_info): Likewise.
8192         (output_pubnames, output_aranges): Update version comments.
8193         (output_one_line_info_table): Output view numbers in asm comments.
8194         (dw_loc_list): Determine current endview, pass it to new_loc_list.
8195         Call maybe_gen_llsym.
8196         (loc_list_from_tree_1): Adjust.
8197         (add_AT_location_description): Create view list attribute if
8198         needed, check it's absent otherwise.
8199         (convert_cfa_to_fb_loc_list): Adjust.
8200         (maybe_emit_file): Call output_asm_line_debug_info for test.
8201         (dwarf2out_var_location): Reset views as needed.  Precompute
8202         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
8203         attribute.  Set view.
8204         (new_line_info_table): Reset next view.
8205         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
8206         (dwarf2out_source_line): Likewise.  Output view resets and labels to
8207         the assembler, or select appropriate line info opcodes.
8208         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
8209         (optimize_string_length): Catch it.  Adjust.
8210         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
8211         dw_val_class_view_list, and remove it if no longer needed.
8212         (hash_loc_list): Hash view numbers.
8213         (loc_list_hasher::equal): Compare them.
8214         (optimize_location_lists): Check whether a view list symbol is
8215         needed, and whether the locview attribute is present, and
8216         whether they match.  Remove the locview attribute if no longer
8217         needed.
8218         (index_location_lists): Call skip_loc_list_entry for test.
8219         (dwarf2out_finish): Call output_asm_line_debug_info for test.
8220         Use output_dwarf_version.
8221         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
8222         (struct dw_val_node): Add val_view_list.
8223         * final.c (SEEN_NEXT_VIEW): New.
8224         (set_next_view_needed): New.
8225         (clear_next_view_needed): New.
8226         (maybe_output_next_view): New.
8227         (final_start_function): Rename to...
8228         (final_start_function_1): ... this.  Take pointer to FIRST,
8229         add SEEN parameter.  Emit param bindings in the initial view.
8230         (final_start_function): Reintroduce SEEN-less interface.
8231         (final): Rename to...
8232         (final_1): ... this.  Take SEEN parameter.  Output final pending
8233         next view at the end.
8234         (final): Reintroduce seen-less interface.
8235         (final_scan_insn): Output pending next view before switching
8236         sections or ending a block.  Mark the next view as needed when
8237         outputting variable locations.  Notify debug backend of section
8238         changes, and of location view changes.
8239         (rest_of_handle_final): Adjust.
8240         * toplev.c (process_options): Autodetect value for debug variable
8241         location views option.  Warn on incompat5 without -gdwarf-5.
8242         * doc/invoke.texi (gvariable-location-views): New.
8243         (gvariable-location-views=incompat5): New.
8244         (gno-variable-location-views): New.
8246 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
8248         PR tree-optimization/84136
8249         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
8250         that the result of find_edge is non-NULL.
8252 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8254         PR target/83008
8255         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8256         storing integer register in SImode.  Fix cost of 256 and 512
8257         byte aligned SSE register store.
8259 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8261         * config/i386/i386.c (ix86_multiplication_cost): Fix
8262         multiplication cost for TARGET_AVX512DQ.
8264 2018-02-08  Marek Polacek  <polacek@redhat.com>
8266         PR tree-optimization/84238
8267         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8268         get_range_strlen.
8270 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8272         PR tree-optimization/84265
8273         * tree-vect-stmts.c (vectorizable_store): Don't treat
8274         VMAT_CONTIGUOUS accesses as grouped.
8275         (vectorizable_load): Likewise.
8277 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8279         PR tree-optimization/81635
8280         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8281         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8282         (test_round_for_mask): New functions.
8283         (wide_int_cc_tests): Call test_round_for_mask.
8284         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8285         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8286         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8287         range returned by get_range_info.
8289 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8291         PR ipa/81360
8292         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8293         * symtab.c: Include builtins.h
8294         (symtab_node::output_to_lto_symbol_table_p): Move here
8295         from lto-streamer-out.c:output_symbol_p.
8296         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8297         (output_symbol_p): Move all logic to symtab.c
8298         (produce_symtab): Update.
8300 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8302         * config/s390/s390-opts.h (enum indirect_branch): Define.
8303         * config/s390/s390-protos.h (s390_return_addr_from_memory)
8304         (s390_indirect_branch_via_thunk)
8305         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
8306         (enum s390_indirect_branch_type): Define.
8307         * config/s390/s390.c (struct s390_frame_layout, struct
8308         machine_function): Remove.
8309         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
8310         (indirect_branch_table_label_no, indirect_branch_table_name):
8311         Define variables.
8312         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
8313         (enum s390_indirect_branch_option): Define.
8314         (s390_return_addr_from_memory): New function.
8315         (s390_handle_string_attribute): New function.
8316         (s390_attribute_table): Add new attribute handler.
8317         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
8318         (s390_indirect_branch_via_thunk): New function.
8319         (s390_indirect_branch_via_inline_thunk): New function.
8320         (s390_function_ok_for_sibcall): When jumping via thunk disallow
8321         sibling call optimization for non z10 compiles.
8322         (s390_emit_call): Force indirect branch target to be a single
8323         register.  Add r1 clobber for non-z10 compiles.
8324         (s390_emit_epilogue): Emit return jump via return_use expander.
8325         (s390_reorg): Handle JUMP_INSNs as execute targets.
8326         (s390_option_override_internal): Perform validity checks for the
8327         new command line options.
8328         (s390_indirect_branch_attrvalue): New function.
8329         (s390_indirect_branch_settings): New function.
8330         (s390_set_current_function): Invoke s390_indirect_branch_settings.
8331         (s390_output_indirect_thunk_function):  New function.
8332         (s390_code_end): Implement target hook.
8333         (s390_case_values_threshold): Implement target hook.
8334         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
8335         macros.
8336         * config/s390/s390.h (struct s390_frame_layout)
8337         (struct machine_function): Move here from s390.c.
8338         (TARGET_INDIRECT_BRANCH_NOBP_RET)
8339         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
8340         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
8341         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
8342         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
8343         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
8344         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
8345         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
8346         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
8347         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
8348         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
8349         (mnemonic attribute): Add values which aren't recognized
8350         automatically.
8351         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
8352         pattern for branch conversion.  Fix mnemonic attribute.
8353         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
8354         indirect branch via thunk if requested.
8355         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
8356         ("*indirect_jump"): Disable for branch conversion using out of
8357         line thunks.
8358         ("indirect_jump_via_thunk<mode>_z10")
8359         ("indirect_jump_via_thunk<mode>")
8360         ("indirect_jump_via_inlinethunk<mode>_z10")
8361         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
8362         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
8363         ("casesi_jump_via_inlinethunk<mode>_z10")
8364         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
8365         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
8366         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8367         ("*indirect2_jump"): Disable for branch conversion.
8368         ("casesi_jump"): Turn into expander and expand patterns for branch
8369         conversion.
8370         ("return_use"): New expander.
8371         ("*return"): Emit return via thunk and rename it to ...
8372         ("*return<mode>"): ... this one.
8373         * config/s390/s390.opt: Add new options and and enum for the
8374         option values.
8376 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8378         * lra-constraints.c (match_reload): Unconditionally use
8379         gen_lowpart_SUBREG, rather than selecting between that
8380         and equivalent gen_rtx_SUBREG code.
8382 2018-02-08  Richard Biener  <rguenther@suse.de>
8384         PR tree-optimization/84233
8385         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8386         changed flag instead of boguously re-using phi_inserted.
8388 2018-02-08  Martin Jambor  <mjambor@suse.cz>
8390         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8391         static local variables.
8393 2018-02-08  Richard Biener  <rguenther@suse.de>
8395         PR tree-optimization/84278
8396         * tree-vect-stmts.c (vectorizable_store): When looking for
8397         smaller vector types to perform grouped strided loads/stores
8398         make sure the mode is supported by the target.
8399         (vectorizable_load): Likewise.
8401 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8403         * config/aarch64/aarch64.c (aarch64_components_for_bb):
8404         Increase LDP/STP opportunities by adding adjacent callee-saves.
8406 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8408         PR rtl-optimization/84068
8409         PR rtl-optimization/83459
8410         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8412 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
8414         PR tree-optimization/84224
8415         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8416         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8417         non-zero arguments.
8419 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
8421         PR target/84113
8422         * config/rs6000/altivec.md (*restore_world): Remove LR use.
8423         * config/rs6000/predicates.md (restore_world_operation): Adjust op
8424         count, remove one USE.
8426 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
8428         * doc/install.texi (Configuration): Document the
8429         --with-long-double-format={ibm,ieee} PowerPC configuration
8430         options.
8432         PR target/84154
8433         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8434         Convert from define_expand to be define_insn_and_split.  Rework
8435         float/double/_Float128 conversions to QI/HI/SImode to work with
8436         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
8437         conversions to QI/HImode types did a store and then a load to
8438         truncate the value.  For conversions to VSX registers, don't split
8439         the insn, instead emit the code directly.  Use the code iterator
8440         any_fix to combine signed and unsigned conversions.
8441         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8442         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8443         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8444         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8445         (fix_<mode>di2_hw): Likewise.
8446         (fixuns_<mode>di2_hw): Likewise.
8447         (fix_<mode>si2_hw): Likewise.
8448         (fixuns_<mode>si2_hw): Likewise.
8449         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8450         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8451         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8452         fix<uns>_trunc<SFDF:mode>si2_p8.
8453         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8454         used.
8455         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8456         (fix<uns>_<mode>_mem): Likewise.
8457         (fctiw<u>z_<mode>_mem): Likewise.
8458         (fix<uns>_<mode>_mem): Likewise.
8459         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8460         the register allocator from doing a direct move to the GPRs to do
8461         a store, and instead use the ISA 3.0 store byte/half-word from
8462         vector register instruction.  For IEEE 128-bit floating point,
8463         also optimize stores of 32-bit ints.
8464         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8466 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
8468         * genextract.c (push_pathstr_operand): New function to support
8469         [a-zA-Z].
8470         (walk_rtx): Call push_pathstr_operand.
8471         (print_path): Support [a-zA-Z].
8473 2018-02-07  Richard Biener  <rguenther@suse.de>
8475         PR tree-optimization/84037
8476         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8477         (cse_and_gimplify_to_preheader): Declare.
8478         (vect_get_place_in_interleaving_chain): Likewise.
8479         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8480         ivexpr_map.
8481         (_loop_vec_info::~_loop_vec_info): Delete it.
8482         (cse_and_gimplify_to_preheader): New function.
8483         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8484         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8485         (vectorizable_load): Likewise.  For grouped stores always base
8486         the IV on the first element.
8487         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8488         condition before gimplifying.
8490 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8492         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8493         *DIV_EXPR and *MOD_EXPR.
8495 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8497         PR target/84248
8498         * config/i386/i386.c (ix86_option_override_internal): Mask out
8499         the CF_SET bit when checking -fcf-protection.
8501 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8503         PR libgomp/84217
8504         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8505         enough.
8507 2018-02-07  Richard Biener  <rguenther@suse.de>
8509         PR tree-optimization/84204
8510         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8511         this place.
8513         PR tree-optimization/84205
8514         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8515         special-case isl_ast_op_zdiv_r.
8517         PR tree-optimization/84223
8518         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8519         Only add conditions from within the region.
8520         (gather_bbs::after_dom_children): Adjust.
8522 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8524         PR target/84209
8525         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8526         * config/avr/avr.md: Only post-reload split REG-REG moves if
8527         either register is GENERAL_REG_P.
8529 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8531         PR tree-optimization/84235
8532         * tree-ssa-scopedtables.c
8533         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8534         if the subtraction is performed in floating point type where NaNs are
8535         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8536         build 1.  Formatting fix.
8538 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8540         PR target/84146
8541         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8542         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8543         and skip it regardless of bb boundaries.  Use CALL_P macro,
8544         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8545         unnecessarily, formatting fix.
8547 2018-02-06  Michael Collison  <michael.collison@arm.com>
8549         * config/arm/thumb2.md:
8550         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8551         (*thumb_mov_notscc): Ditto.
8553 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8555         PR target/84154
8556         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8557         unsigned_fix, not "s".
8559 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8561         * configure.ac (gcc_fn_eh_frame_ro): New function.
8562         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8563         correct .eh_frame permissions.
8564         * configure: Regenerate.
8566 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8568         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8569         irrelevant options.
8571 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8573         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8574         Display warning message for -mno-speculate-indirect-jumps.
8576 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8578         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8579         Undocumented.
8580         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8582 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8584         PR tree-optimization/84225
8585         * tree-eh.c (find_trapping_overflow): Only call
8586         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8588 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8590         PR target/84145
8591         * config/i386/i386.c: Reimplement the check of possible options
8592         -mibt/-mshstk conbination. Change error messages.
8593         * doc/invoke.texi: Fix a typo: remove extra '='.
8595 2018-02-06  Marek Polacek  <polacek@redhat.com>
8597         PR tree-optimization/84228
8598         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8600 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8602         PR target/82641
8603         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8604         emitted arch directives.
8605         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8606         __ARM_FEATURE_COPROC before changing architectures.
8608 2018-02-06  Richard Biener  <rguenther@suse.de>
8610         * config/i386/i386.c (print_reg): Fix typo.
8611         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8613 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8615         * configure: Regenerate.
8617 2018-02-05  Martin Sebor  <msebor@redhat.com>
8619         PR tree-optimization/83369
8620         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8621         inlining context.
8623 2018-02-05  Martin Liska  <mliska@suse.cz>
8625         * doc/invoke.texi: Cherry-pick upstream r323995.
8627 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8629         * ira.c (ira_init_register_move_cost): Adjust comment.
8631 2018-02-05  Martin Liska  <mliska@suse.cz>
8633         PR gcov-profile/84137
8634         * doc/gcov.texi: Fix typo in documentation.
8636 2018-02-05  Martin Liska  <mliska@suse.cz>
8638         PR gcov-profile/83879
8639         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8640         using dlopen functionality.
8642 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8644         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8645         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8646         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8647         _mm_maskz_range_round_ss): New intrinsics.
8648         (__builtin_ia32_rangesd128_round)
8649         (__builtin_ia32_rangess128_round): Remove.
8650         (__builtin_ia32_rangesd128_mask_round,
8651         __builtin_ia32_rangess128_mask_round): New builtins.
8652         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8653         __builtin_ia32_rangess128_round): Remove.
8654         (__builtin_ia32_rangesd128_mask_round,
8655         __builtin_ia32_rangess128_mask_round): New builtins.
8656         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8657         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8658         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8659         "<round_saeonly_constraint>")): Changed to ...
8660         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8661         "<round_saeonly_scalar_constraint>")): ... this.
8662         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8663         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8664         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8665         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8666         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8668 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8670         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8671         options.
8672         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8673         Remove all values except native, 8540 and 8548.
8675 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8677         * config/i386/i386.c (ix86_output_function_return): Pass
8678         INVALID_REGNUM, instead of -1, as invalid register number to
8679         indirect_thunk_name and output_indirect_thunk.
8681 2018-02-02  Julia Koval  <julia.koval@intel.com>
8683         * config.gcc: Add -march=icelake.
8684         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8685         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8686         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8687         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8688         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8689         (processor_target_table): Add icelake.
8690         (ix86_option_override_internal): Handle new PTAs.
8691         (get_builtin_code_for_version): Handle icelake.
8692         (M_INTEL_COREI7_ICELAKE): New.
8693         (fold_builtin_cpu): Handle icelake.
8694         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8695         * doc/invoke.texi: Add -march=icelake.
8697 2018-02-02  Julia Koval  <julia.koval@intel.com>
8699         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8700         to wide_int_bitmask.
8701         * wide-int-bitmask.h: New.
8703 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8705         PR target/84066
8706         * config/i386/i386.md: Replace Pmode with word_mode in
8707         builtin_setjmp_setup and builtin_longjmp to support x32.
8709 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8711         PR target/56010
8712         PR target/83743
8713         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8714         #include "opts.h".
8715         (rs6000_supported_cpu_names): New static variable.
8716         (linux_cpu_translation_table): Likewise.
8717         (elf_platform) <cpu>: Define new static variable and use it.
8718         Translate kernel AT_PLATFORM name to canonical name if needed.
8719         Error if platform name is unknown.
8721 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8723         PR target/84089
8724         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8726 2018-02-01  Jeff Law  <law@redhat.com>
8728         PR target/84128
8729         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8730         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8731         the scratch if RELEASE_VIA_POP is false.
8732         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8733         If we have to save a temporary register, decrement SIZE appropriately.
8734         Pass new arguments to release_scratch_register_on_entry.
8735         (ix86_adjust_stack_and_probe): Likewise.
8736         (ix86_emit_probe_stack_range): Pass new arguments to
8737         release_scratch_register_on_entry.
8739 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8741         PR rtl-optimization/84157
8742         * combine.c (change_zero_ext): Use REG_P predicate in
8743         front of HARD_REGISTER_P predicate.
8745 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
8747         * config/avr/avr.c (avr_option_override): Move disabling of
8748         -fdelete-null-pointer-checks to...
8749         * common/config/avr/avr-common.c (avr_option_optimization_table):
8750         ...here.
8752 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8754         PR tree-optimization/81635
8755         * tree-data-ref.c (split_constant_offset_1): For types that
8756         wrap on overflow, try to use range info to prove that wrapping
8757         cannot occur.
8759 2018-02-01  Renlin Li  <renlin.li@arm.com>
8761         PR target/83370
8762         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8763         TAILCALL_ADDR_REGS.
8764         (aarch64_register_move_cost): Likewise.
8765         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8766         TAILCALL_ADDR_REGS.
8767         (REG_CLASS_NAMES): Likewise.
8768         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8769         TAILCALL_ADDR_REGS. Remove IP registers.
8770         * config/aarch64/aarch64.md (Ucs): Update register constraint.
8772 2018-02-01  Richard Biener  <rguenther@suse.de>
8774         * domwalk.h (dom_walker::dom_walker): Add additional constructor
8775         for specifying RPO order and allow NULL for that.
8776         * domwalk.c (dom_walker::dom_walker): Likewise.
8777         (dom_walker::walk): Handle NULL RPO order.
8778         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8779         in RPO order.
8780         (rewrite_update_dom_walker): Likewise.
8781         (mark_def_dom_walker): Likewise.
8783 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8785         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8786         (aarch64_maybe_expand_sve_subreg_move): Declare.
8787         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8788         * config/aarch64/predicates.md (aarch64_any_register_operand): New
8789         predicate.
8790         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8791         that are semantically a reverse operation.
8792         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8793         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8794         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8795         functions.
8796         (aarch64_can_change_mode_class): For big-endian, forbid changes
8797         between two SVE modes if they have different element sizes.
8799 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8801         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8802         the TImode handling for big-endian targets.
8804 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8806         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
8807         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
8808         not just bytes.
8809         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
8810         Remove BSWAP handing for big-endian targets and use the form of
8811         LD1RQ appropariate for the mode.
8813 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8815         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
8816         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
8817         duplicated element.
8819 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8821         PR tearget/83845
8822         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
8823         check for operands that need to go through aarch64_sve_reload_be.
8825 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
8827         PR tree-optimization/81661
8828         PR tree-optimization/84117
8829         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
8830         * tree-eh.c: Include gimplify.h.
8831         (find_trapping_overflow, replace_trapping_overflow,
8832         rewrite_to_non_trapping_overflow): New functions.
8833         * tree-vect-loop.c: Include tree-eh.h.
8834         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
8835         * tree-data-ref.c: Include tree-eh.h.
8836         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
8838 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
8840         PR rtl-optimization/84123
8841         * combine.c (change_zero_ext): Check if hard register satisfies
8842         can_change_dest_mode before calling gen_lowpart_SUBREG.
8844 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
8846         PR target/82444
8847         * ira.c (ira_init_register_move_cost): Remove assert.
8849 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8851         PR rtl-optimization/84071
8852         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
8853         * doc/tm.texi: Regenerate.
8855 2018-01-31  Richard Biener  <rguenther@suse.de>
8857         PR tree-optimization/84132
8858         * tree-data-ref.c (analyze_miv_subscript): Properly
8859         check whether evolution_function_is_affine_multivariate_p
8860         before calling gcd_of_steps_may_divide_p.
8862 2018-01-31  Julia Koval  <julia.koval@intel.com>
8864         PR target/83618
8865         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
8866         * config/i386/i386.md (rdpid_rex64) New.
8867         (rdpid): Make 32bit only.
8869 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
8871         PR lto/84105
8872         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
8873         an IDENTIFIER_NODE for FUNCTION_TYPE's.
8875 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8877         Revert
8878         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
8880         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
8882 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
8884         PR rtl-optimization/84071
8885         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
8886         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
8888 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8890         * config/arc/arc.c (arc_handle_aux_attribute): New function.
8891         (arc_attribute_table): Add 'aux' attribute.
8892         (arc_in_small_data_p): Consider aux like variables.
8893         (arc_is_aux_reg_p): New function.
8894         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
8895         (arc_get_aux_arg): New function.
8896         (prepare_move_operands): Handle aux-register access.
8897         (arc_handle_aux_attribute): New function.
8898         * doc/extend.texi (ARC Variable attributes): Add subsection.
8900 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
8902         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
8903         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
8904         (arc_attribute_table): Add 'uncached' attribute.
8905         (arc_print_operand): Print '.di' flag for uncached memory
8906         accesses.
8907         (arc_in_small_data_p): Do not consider for small data the uncached
8908         types.
8909         (arc_is_uncached_mem_p): New function.
8910         * config/arc/predicates.md (compact_store_memory_operand): Check
8911         for uncached memory accesses.
8912         (nonvol_nonimm_operand): Likewise.
8913         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
8915 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
8917         PR c/84100
8918         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
8919         falign-loops=): Add Optimization flag.
8921 2018-01-30  Jeff Law  <law@redhat.com>
8923         PR target/84064
8924         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
8925         INT_REGISTERS_SAVED.  Check it prior to calling
8926         get_scratch_register_on_entry.
8927         (ix86_adjust_stack_and_probe): Similarly.
8928         (ix86_emit_probe_stack_range): Similarly.
8929         (ix86_expand_prologue): Corresponding changes.
8931 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8933         PR target/40411
8934         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
8935         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
8937 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
8939         PR target/84112
8940         * lra-constraints.c (curr_insn_transform): Process AND in the
8941         address.
8943 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
8945         PR rtl-optimization/83986
8946         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
8947         dependence against last_pending_memory_flush in addition to
8948         pending_jump_insns.
8950 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
8952         PR tree-optimization/81611
8953         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
8954         copies.
8956 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8958         PR target/83758
8959         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
8960         a reg rtx.
8962 2018-01-30  Richard Biener  <rguenther@suse.de>
8963             Jakub Jelinek  <jakub@redhat.com>
8965         PR tree-optimization/84111
8966         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
8967         inner loops added during recursion, as they don't have up-to-date
8968         SSA form.
8970 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8972         PR ipa/81360
8973         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
8974         (can_inline_edge_by_limits_p): ... here.
8975         (can_early_inline_edge_p, check_callers,
8976         update_caller_keys, update_callee_keys, recursive_inlining,
8977         add_new_edges_to_heap, speculation_useful_p,
8978         inline_small_functions,
8979         inline_small_functions, flatten_function,
8980         inline_to_all_callers_1): Update.
8982 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
8984         * profile-count.c (profile_count::combine_with_ipa_count): Handle
8985         zeros correctly.
8987 2018-01-30  Richard Biener  <rguenther@suse.de>
8989         PR tree-optimization/83008
8990         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
8991         invariant and constant vector uses in stmts when they need
8992         more than one stmt.
8994 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8996         PR bootstrap/84017
8997         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
8998         * configure: Regenerate.
9000 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9002         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
9003         pattern.
9004         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
9005         Use gen_rtx_REG rather than gen_lowpart.
9007 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9009         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
9010         rather than 0 when creating partial subregs.
9012 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9014         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
9015         of usage.
9017 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
9019         PR target/81550
9020         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
9021         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
9022         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
9023         flags.  This restores the settings used before the 2017-07-24.
9024         Turning off pre increment/decrement/modify allows IVOPTS to
9025         optimize DF/SF loops where the index is an int.
9027 2018-01-29  Richard Biener  <rguenther@suse.de>
9028             Kelvin Nilsen  <kelvin@gcc.gnu.org>
9030         PR bootstrap/80867
9031         * tree-vect-stmts.c (vectorizable_call): Don't call
9032         targetm.vectorize_builtin_md_vectorized_function if callee is
9033         NULL.
9035 2018-01-22  Carl Love  <cel@us.ibm.com>
9037         * doc/extend.tex: Fix typo in second arg in
9038         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
9040 2018-01-29  Richard Biener  <rguenther@suse.de>
9042         PR tree-optimization/84086
9043         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
9044         (flush_ssaname_freelist): When SSA names were released reset
9045         the SCEV hash table.
9047 2018-01-29  Richard Biener  <rguenther@suse.de>
9049         PR tree-optimization/84057
9050         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
9051         removed paths when removing edges.
9053 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
9055         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
9056         -mfunction-return=@var{choice}.
9058 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9060         PR diagnostic/84034
9061         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
9062         Handle CR like TAB.
9063         (layout::print_source_line): Likewise.
9064         (test_get_line_width_without_trailing_whitespace): Add test cases.
9066 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
9068         PR middle-end/84040
9069         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
9070         debug insns.
9072 2018-01-26  Jim Wilson  <jimw@sifive.com>
9074         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
9076         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
9077         specified.
9079 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9081         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
9082         and CMP + SUB-immediate -> SUBS.
9084 2018-01-26  Martin Sebor  <msebor@redhat.com>
9086         PR tree-optimization/83896
9087         * tree-ssa-strlen.c (get_string_len): Rename...
9088         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
9089         Avoid assuming length is constant.
9090         (handle_char_store): Use HOST_WIDE_INT for string length.
9092 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
9094         PR target/81763
9095         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
9096         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
9098 2018-01-26  Richard Biener  <rguenther@suse.de>
9100         PR rtl-optimization/84003
9101         * dse.c (record_store): Only record redundant stores when
9102         the earlier store aliases at least all accesses the later one does.
9104 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
9106         PR rtl-optimization/83985
9107         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
9108         REG_CFA_RESTORE insns.
9109         (delete_unmarked_insns): Don't ignore separate shrink wrapping
9110         REG_CFA_RESTORE insns here.
9112         PR c/83989
9113         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
9114         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
9116 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9118         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
9119         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
9120         (arc_init): Likewise.
9121         (arc_override_options): Likewise.
9122         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
9123         value.
9124         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
9125         support.
9126         * config/arc/arc.h (TARGET_DBNZ): Define.
9127         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
9128         properly set the tune attribute.
9129         (dbnz): Use TARGET_DBNZ guard.
9130         * config/arc/arc.opt (mtune): Add core3 option.
9132 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9134         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
9135         recognize new pic like addresses.
9136         (arc_delegitimize_address): Clean up.
9138 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9140         * config/arc/arc-arches.def: Option mrf16 valid for all
9141         architectures.
9142         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
9143         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
9144         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
9145         * config/arc/arc-tables.opt: Regenerate.
9146         * config/arc/arc.c (arc_conditional_register_usage): Handle
9147         reduced register file case.
9148         (arc_file_start): Set must have build attributes.
9149         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
9150         mrf16 option value.
9151         * config/arc/arc.opt (mrf16): Add new option.
9152         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
9153         * config/arc/genmultilib.awk: Handle new mrf16 option.
9154         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
9155         * config/arc/t-multilib: Regenerate.
9156         * doc/invoke.texi (ARC Options): Document mrf16 option.
9158 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9160         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
9161         * config/arc/arc.c (arc_handle_secure_attribute): New function.
9162         (arc_attribute_table): Add 'secure_call' attribute.
9163         (arc_print_operand): Print secure call operand.
9164         (arc_function_ok_for_sibcall): Don't optimize tail calls when
9165         secure.
9166         (arc_is_secure_call_p): New function.  * config/arc/arc.md
9167         (call_i): Add support for sjli instruction.
9168         (call_value_i): Likewise.
9169         * config/arc/constraints.md (Csc): New constraint.
9171 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9172             John Eric Martin  <John.Martin@emmicro-us.com>
9174         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
9175         * config/arc/arc.c (_arc_jli_section): New struct.
9176         (arc_jli_section): New type.
9177         (rc_jli_sections): New static variable.
9178         (arc_handle_jli_attribute): New function.
9179         (arc_attribute_table): Add jli_always and jli_fixed attribute.
9180         (arc_file_end): New function.
9181         (TARGET_ASM_FILE_END): Define.
9182         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
9183         (arc_add_jli_section): New function.
9184         (jli_call_scan): Likewise.
9185         (arc_reorg): Call jli_call_scan.
9186         (arc_output_addsi): Remove 'S' from printing asm operand.
9187         (arc_is_jli_call_p): New function.
9188         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
9189         operand.
9190         (movhi_insn): Likewise.
9191         (movsi_insn): Likewise.
9192         (movsi_set_cc_insn): Likewise.
9193         (loadqi_update): Likewise.
9194         (load_zeroextendqisi_update): Likewise.
9195         (load_signextendqisi_update): Likewise.
9196         (loadhi_update): Likewise.
9197         (load_zeroextendhisi_update): Likewise.
9198         (load_signextendhisi_update): Likewise.
9199         (loadsi_update): Likewise.
9200         (loadsf_update): Likewise.
9201         (movsicc_insn): Likewise.
9202         (bset_insn): Likewise.
9203         (bxor_insn): Likewise.
9204         (bclr_insn): Likewise.
9205         (bmsk_insn): Likewise.
9206         (bicsi3_insn): Likewise.
9207         (cmpsi_cc_c_insn): Likewise.
9208         (movsi_ne): Likewise.
9209         (movsi_cond_exec): Likewise.
9210         (clrsbsi2): Likewise.
9211         (norm_f): Likewise.
9212         (normw): Likewise.
9213         (swap): Likewise.
9214         (divaw): Likewise.
9215         (flag): Likewise.
9216         (sr): Likewise.
9217         (kflag): Likewise.
9218         (ffs): Likewise.
9219         (ffs_f): Likewise.
9220         (fls): Likewise.
9221         (call_i): Remove 'S' asm letter, add jli instruction.
9222         (call_value_i): Likewise.
9223         * config/arc/arc.op (mjli-always): New option.
9224         * config/arc/constraints.md (Cji): New constraint.
9225         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
9226         operand.
9227         (subsf3_fpx): Likewise.
9228         (mulsf3_fpx): Likewise.
9229         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
9230         asm operand.
9231         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
9232         function attrbutes.
9233         * doc/invoke.texi (ARC): Document mjli-always option.
9235 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
9237         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
9238         avoid addition with 0 and use incw and decw where possible.
9240 2018-01-26  Richard Biener  <rguenther@suse.de>
9242         PR tree-optimization/81082
9243         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
9244         association if it requires casting to unsigned.
9245         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
9246         from fold_plusminus_mult_expr to catch important cases late when
9247         range info is available.
9249 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9251         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9252         * configure.ac (hidden_linkonce): New test.
9253         * configure: Regenerate.
9254         * config.in: Regenerate.
9256 2018-01-26  Julia Koval  <julia.koval@intel.com>
9258         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9259         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9260         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9261         _mm_mask_bitshuffle_epi64_mask): Fix type.
9262         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9263         USI_FTYPE_V4DI_V4DI_USI): Remove.
9264         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9265         __builtin_ia32_vpshufbitqmb256_mask,
9266         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9267         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9268         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9270 2018-01-26  Alan Modra  <amodra@gmail.com>
9272         PR target/84033
9273         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9274         UNSPEC_VBPERMQ.  Sort other unspecs.
9276 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
9278         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9280 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
9282         PR middle-end/83055
9283         * predict.c (drop_profile): Do not push/pop cfun; update also
9284         node->count.
9285         (handle_missing_profiles): Fix logic looking for zero profiles.
9287 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
9289         PR middle-end/83977
9290         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9291         on functions with #pragma omp declare simd or functions with simd
9292         attribute.
9293         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9294         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9295         Remove trailing \n from warning_at calls.
9297 2018-01-25  Tom de Vries  <tom@codesourcery.com>
9299         PR target/84028
9300         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9301         for neutered workers.
9303 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
9305         PR target/68467
9306         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
9307         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
9309 2018-01-24  Jeff Law  <law@redhat.com>
9311         PR target/83994
9312         * i386.c (get_probe_interval): Move to earlier point.
9313         (ix86_compute_frame_layout): If -fstack-clash-protection and
9314         the frame is larger than the probe interval, then use pushes
9315         to save registers rather than reg->mem moves.
9316         (ix86_expand_prologue): Remove conditional for int_registers_saved
9317         assertion.
9319 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
9321         PR target/84014
9322         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
9323         min/max for never referenced object.
9325 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
9327         PR middle-end/83977
9328         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
9329         here.
9330         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
9331         attributes from DECL_ATTRIBUTES (decl) without affecting
9332         DECL_ATTRIBUTES (current_function_decl).
9333         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
9334         functions with non-NULL DECL_ABSTRACT_ORIGIN.
9336 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
9338         PR tree-optimization/83979
9339         * fold-const.c (fold_comparison): Use constant_boolean_node
9340         instead of boolean_{true,false}_node.
9342 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
9344         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
9345         with zero counts.
9347 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9349         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9350         Simplify the clause that sets the length attribute.
9351         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9352         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
9353         clause that sets the length attribute.
9354         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9356 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9358         PR target/83589
9359         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
9360         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
9361         Add strict parameter.
9362         (prevent_branch_around_nothing): Insert dummy insn between branch to
9363         label and label with no ptx insn inbetween.
9364         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
9366 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9368         PR target/81352
9369         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9370         for neutered threads in warp.
9371         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9373 2018-01-24  Richard Biener  <rguenther@suse.de>
9375         PR tree-optimization/83176
9376         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9377         operands.
9379 2018-01-24  Richard Biener  <rguenther@suse.de>
9381         PR tree-optimization/82819
9382         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9383         code generating pluses that are no-ops in the target precision.
9385 2018-01-24  Richard Biener  <rguenther@suse.de>
9387         PR middle-end/84000
9388         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9390 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9392         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9393         to merge probabilities.
9394         * predict.c (probably_never_executed): Also mark as cold functions
9395         with global 0 profile and guessed local profile.
9396         * profile-count.c (profile_probability::combine_with_count): New
9397         member function.
9398         * profile-count.h (profile_probability::operator*,
9399         profile_probability::operator*=, profile_probability::operator/,
9400         profile_probability::operator/=): Reduce precision to adjusted
9401         and set value to guessed on contradictory divisions.
9402         (profile_probability::combine_with_freq): Remove.
9403         (profile_probability::combine_wiht_count): Declare.
9404         (profile_count::force_nonzero):: Set to adjusted.
9405         (profile_count::probability_in):: Set quality to adjusted.
9406         * tree-ssa-tail-merge.c (replace_block_by): Use
9407         combine_with_count.
9409 2018-01-23  Andrew Waterman  <andrew@sifive.com>
9410             Jim Wilson  <jimw@sifive.com>
9412         * config/riscv/riscv.c (riscv_stack_boundary): New.
9413         (riscv_option_override): Set riscv_stack_boundary.  Handle
9414         riscv_preferred_stack_boundary_arg.
9415         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9416         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9417         (STACK_BOUNDARY): Set to riscv_stack_boundary.
9418         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9419         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9420         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9422 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
9424         PR target/83905
9425         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9426         of struct ix86_frame.
9427         (ix86_expand_epilogue): Likewise.  Add a local variable for
9428         the reg_save_offset field in struct ix86_frame.
9430 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
9432         PR tree-optimization/82604
9433         * tree-loop-distribution.c (enum partition_kind): New enum item
9434         PKIND_PARTIAL_MEMSET.
9435         (partition_builtin_p): Support above new enum item.
9436         (generate_code_for_partition): Ditto.
9437         (compute_access_range): Differentiate cases that equality can be
9438         proven at all loops, the innermost loops or no loops.
9439         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9440         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
9441         (finalize_partitions, distribute_loop): Don't fuse partition of
9442         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9443         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9444         parloop is enabled.
9446 2018-01-23  Martin Liska  <mliska@suse.cz>
9448         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9449         order to ignore the predictor.
9450         (PRED_POLYMORPHIC_CALL): Likewise.
9451         (PRED_RECURSIVE_CALL): Likewise.
9453 2018-01-23  Martin Liska  <mliska@suse.cz>
9455         * tree-profile.c (tree_profiling): Print function header to
9456         aware reader which function we are working on.
9457         * value-prof.c (gimple_find_values_to_profile): Do not print
9458         not interesting value histograms.
9460 2018-01-23  Martin Liska  <mliska@suse.cz>
9462         * profile-count.h (enum profile_quality): Add
9463         profile_uninitialized as the first value. Do not number values
9464         as they are zero based.
9465         (profile_count::verify): Update sanity check.
9466         (profile_probability::verify): Likewise.
9468 2018-01-23  Nathan Sidwell  <nathan@acm.org>
9470         * doc/invoke.texi (ffor-scope): Deprecate.
9472 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9474         PR tree-optimization/83510
9475         * domwalk.c (set_all_edges_as_executable): New function.
9476         (dom_walker::dom_walker): Convert bool param
9477         "skip_unreachable_blocks" to enum reachability.  Move setup of
9478         edge flags to set_all_edges_as_executable and only do it when
9479         reachability is REACHABLE_BLOCKS.
9480         * domwalk.h (enum dom_walker::reachability): New enum.
9481         (dom_walker::dom_walker): Convert bool param
9482         "skip_unreachable_blocks" to enum reachability.
9483         (set_all_edges_as_executable): New decl.
9484         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9485         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9486         "reachability".
9487         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9488         but converting true to REACHABLE_BLOCKS.
9489         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9490         * tree-vrp.c
9491         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9492         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9493         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9494         REACHABLE_BLOCKS.
9495         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9496         if check_all_array_refs will be called.
9498 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9500         * tree.c (selftest::test_location_wrappers): Add more test
9501         coverage.
9503 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9505         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9506         (selftest::test_bit_in_range): Likewise.
9508 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9510         PR testsuite/83888
9511         * doc/sourcebuild.texi (vect_float): Say that the selector
9512         only describes the situation when -funsafe-math-optimizations is on.
9513         (vect_float_strict): Document.
9515 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9517         PR tree-optimization/83965
9518         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9519         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9520         instead of checking only for a reduction.
9521         (vect_recog_widen_sum_pattern): Likewise.
9523 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9525         * predict.c (probably_never_executed): Only use precise profile info.
9526         (compute_function_frequency): Skip after inlining hack since we now
9527         have quality checking.
9529 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9531         * profile-count.h (profile_probability::very_unlikely,
9532         profile_probability::unlikely, profile_probability::even): Set
9533         precision to guessed.
9535 2018-01-23  Richard Biener  <rguenther@suse.de>
9537         PR tree-optimization/83963
9538         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9539         Properly terminate dominator walk when crossing the exit edge not
9540         when visiting its source block.
9542 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9544         PR c++/83918
9545         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9546         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9548 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9550         PR tree-optimization/83957
9551         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9552         semicolon after for body surrounded by braces.
9554         PR tree-optimization/83081
9555         * profile-count.h (profile_probability::split): New method.
9556         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9557         Use profile_probability::split.
9558         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9559         when splitting a single conditional jump into 2.
9561 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9563         PR tree-optimization/69452
9564         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9565         decl.
9567 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9569         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9570         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9571         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9573 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9575         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9576         * config/rl78/rl78.md (movdi): New define_expand.
9577         * config/rl78/rl78.c (rl78_split_movdi): New function.
9579 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9581         PR target/83862
9582         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9583         no longer used.
9584         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9585         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9586         128-bit to produce an UNSPEC move to get the double word with the
9587         signbit and then a shift directly to do signbit.
9588         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9589         implementation with a new version that just does either a direct
9590         move or a regular move.  Move memory interface to separate insns.
9591         Move insns so they are next to the expander.
9592         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9593         with signbit move.  Split big and little endian case.
9594         (signbit<mode>2_dm_mem_le): Likewise.
9595         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9596         (signbit<mode>2_dm2): Likewise.
9598 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9600         * config/rl78/rl78.md (anddi3): New define_expand.
9602 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9604         * config/rl78/rl78.md (umindi3): New define_expand.
9606 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9608         * config/rl78/rl78.md (smindi3): New define_expand.
9610 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9612         * config/rl78/rl78.md (smaxdi3): New define_expand.
9614 2018-01-22  Carl Love  <cel@us.ibm.com>
9616         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9617         LVX_V1TI): Add macro expansion.
9618         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9619         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9620         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9621         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9622         Change check to determine if the instruction is a byte reversing
9623         entry.  Fix typo in comment.
9624         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9625         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9626         Add def_builtin calls for new builtins.
9627         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9628         Add define_insn expansion.
9630 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9632         * config/rl78/rl78.md (umaxdi3): New define_expand.
9634 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9636         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9637         for non-QImode registers.
9639 2018-01-22  Richard Biener  <rguenther@suse.de>
9641         PR tree-optimization/83963
9642         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9643         including the loop exit block.
9644         (scop_detection::merge_sese): Likewise.
9645         (scop_detection::add_scop): Do it here instead.
9647 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9649         * doc/sourcebuild.texi (arm_softfloat): Document.
9651 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9653         PR gcc/77734
9654         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9655         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9656         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9658 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9659             David Edelsohn  <dje.gcc@gmail.com>
9661         PR target/83946
9662         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9663         Change "crset eq" to "crset 2".
9664         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9665         (*call_indirect_aix<mode>_nospec): Likewise.
9666         (*call_value_indirect_aix<mode>_nospec): Likewise.
9667         (*call_indirect_elfv2<mode>_nospec): Likewise.
9668         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9669         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9670         change assembly output from . to $.
9671         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9672         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9673         (*tablejump<mode>_internal1_nospec): Likewise.
9675 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9677         PR target/80870
9678         * config/sh/sh_optimize_sett_clrt.cc:
9679         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9681 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9683         PR tree-optimization/83940
9684         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9685         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9686         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9687         use it to pass back the definition type.
9688         (vect_check_store_rhs): Likewise rhs_dt_out.
9689         (vect_build_gather_load_calls): Add a mask_dt argument and use
9690         it instead of a call to vect_is_simple_use.
9691         (vectorizable_store): Update calls to vect_check_load_store_mask
9692         and vect_check_store_rhs.  Use the dt returned by the latter instead
9693         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9694         instead of calls to vect_is_simple_use.  Pass the scalar rather
9695         than the vector operand to vect_is_simple_use when handling
9696         second and subsequent copies of an rhs value.
9697         (vectorizable_load): Update calls to vect_check_load_store_mask
9698         and vect_build_gather_load_calls.  Use the cached mask_dt and
9699         gs_info.offset_dt instead of calls to vect_is_simple_use.
9701 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9703         PR middle-end/83945
9704         * tree-emutls.c: Include gimplify.h.
9705         (lower_emutls_2): New function.
9706         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9707         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9708         it before further processing.
9710         PR target/83930
9711         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9712         UINTVAL (trueop1) instead of INTVAL (op1).
9714 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9716         PR debug/81570
9717         PR debug/83728
9718         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9719         INCOMING_FRAME_SP_OFFSET if not defined.
9720         (scan_trace): Add ENTRY argument.  If true and
9721         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9722         emit a note to adjust the CFA offset.
9723         (create_cfi_notes): Adjust scan_trace callers.
9724         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9725         INCOMING_FRAME_SP_OFFSET in the CIE.
9726         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9727         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9728         Likewise.
9729         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9730         * doc/tm.texi: Regenerated.
9732 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9734         PR rtl-optimization/83147
9735         * lra-constraints.c (remove_inheritance_pseudos): Use
9736         lra_substitute_pseudo_within_insn.
9738 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9739             Cesar Philippidis  <cesar@codesourcery.com>
9741         PR target/83920
9742         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9744 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9746         PR target/83790
9747         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9748         spaces for function labels.
9750 2018-01-19  Martin Liska  <mliska@suse.cz>
9752         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9753         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9754         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9755         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9756         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9757         (PRED_CONST_RETURN): Change from 69 to 65.
9758         (PRED_NULL_RETURN): Change from 91 to 71.
9759         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9760         (PRED_LOOP_GUARD): Change from 66 to 73.
9762 2018-01-19  Martin Liska  <mliska@suse.cz>
9764         * predict.c (predict_insn_def): Add new assert.
9765         (struct branch_predictor): Change type to signed integer.
9766         (test_prediction_value_range): Amend test to cover
9767         PROB_UNINITIALIZED.
9768         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9769         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9770         (PRED_LOOP_ITERATIONS_MAX): Likewise.
9771         (PRED_LOOP_IV_COMPARE): Likewise.
9772         * predict.h (PROB_UNINITIALIZED): Define new constant.
9774 2018-01-19  Martin Liska  <mliska@suse.cz>
9776         * predict.c (dump_prediction): Add new format for
9777         analyze_brprob.py script which is enabled with -details
9778         suboption.
9779         * profile-count.h (precise_p): New function.
9781 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9783         PR tree-optimization/83922
9784         * tree-vect-loop.c (vect_verify_full_masking): Return false if
9785         there are no statements that need masking.
9786         (vect_active_double_reduction_p): New function.
9787         (vect_analyze_loop_operations): Use it when handling phis that
9788         are not in the loop header.
9790 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9792         PR tree-optimization/83914
9793         * tree-vect-loop.c (vectorizable_induction): Don't convert
9794         init_expr or apply the peeling adjustment for inductions
9795         that are nested within the vectorized loop.
9797 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9799         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9800         instead of NEG.
9802 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9804         PR sanitizer/81715
9805         PR testsuite/83882
9806         * function.h (gimplify_parameters): Add gimple_seq * argument.
9807         * function.c: Include gimple.h and options.h.
9808         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
9809         for the added local temporaries if needed.
9810         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
9811         if there are any parameter cleanups, wrap whole body into a
9812         try/finally with the cleanups.
9814 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
9816         PR target/82964
9817         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
9818         Use GET_MODE_CLASS for scalar floating point.
9820 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9822         PR ipa/82256
9823         patch by PaX Team
9824         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
9825         Fix call of call_cgraph_insertion_hooks.
9827 2018-01-18  Martin Sebor  <msebor@redhat.com>
9829         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
9831 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
9833         PR ipa/83619
9834         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
9835         frequencies.
9837 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
9839         PR other/70268
9840         * common.opt: (-ffile-prefix-map): New option.
9841         * opts.c (common_handle_option): Defer it.
9842         * opts-global.c (handle_common_deferred_options): Handle it.
9843         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
9844         * file-prefix-map.h: New file.
9845         (remap_debug_filename, add_debug_prefix_map): ...here.
9846         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
9847         * final.c (debug_prefix_map, add_debug_prefix_map
9848         remap_debug_filename): Move to...
9849         * file-prefix-map.c: New file.
9850         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
9851         generalize, get rid of alloca(), use strrchr() instead of strchr().
9852         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
9853         Implement in terms of add_prefix_map().
9854         (remap_macro_filename, remap_debug_filename): Implement in term of
9855         remap_filename().
9856         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
9857         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
9858         * dbxout.c: Include file-prefix-map.h.
9859         * varasm.c: Likewise.
9860         * vmsdbgout.c: Likewise.
9861         * xcoffout.c: Likewise.
9862         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
9863         * doc/cppopts.texi (-fmacro-prefix-map): Document.
9864         * doc/invoke.texi (-ffile-prefix-map): Document.
9865         (-fdebug-prefix-map): Update description.
9867 2018-01-18  Martin Liska  <mliska@suse.cz>
9869         * config/i386/i386.c (indirect_thunk_name): Document that also
9870         lfence is emitted.
9871         (output_indirect_thunk): Document why both instructions
9872         (pause and lfence) are generated.
9874 2018-01-18  Richard Biener  <rguenther@suse.de>
9876         PR tree-optimization/83887
9877         * graphite-scop-detection.c
9878         (scop_detection::get_nearest_dom_with_single_entry): Remove.
9879         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
9880         (scop_detection::merge_sese): Re-implement with a flood-fill
9881         algorithm that properly finds a SESE region if it exists.
9883 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9885         PR c/61240
9886         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
9887         pointer_diff optimizations use view_convert instead of convert.
9889 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9891         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9892         Generate different code for -mno-speculate-indirect-jumps.
9893         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9894         (*call_indirect_aix<mode>): Disable for
9895         -mno-speculate-indirect-jumps.
9896         (*call_indirect_aix<mode>_nospec): New define_insn.
9897         (*call_value_indirect_aix<mode>): Disable for
9898         -mno-speculate-indirect-jumps.
9899         (*call_value_indirect_aix<mode>_nospec): New define_insn.
9900         (*sibcall_nonlocal_sysv<mode>): Generate different code for
9901         -mno-speculate-indirect-jumps.
9902         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9904 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
9906         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
9907         long double type, set the flags for noting the default long double
9908         type, even if we don't pass or return a long double type.
9910 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
9912         PR ipa/83051
9913         * ipa-inline.c (flatten_function): Do not overwrite final inlining
9914         failure.
9916 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
9918         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
9919         support for merge[hl].
9920         (fold_mergehl_helper): New helper function.
9921         (tree-vector-builder.h): New #include for tree_vector_builder usage.
9922         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
9923         (altivec_vmrglw_direct): Add xxmrglw insn.
9925 2018-01-17  Andrew Waterman  <andrew@sifive.com>
9927         * config/riscv/riscv.c (riscv_conditional_register_usage): If
9928         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
9930 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
9932         PR lto/83121
9933         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
9934         call the lto_location_cache before reading the
9935         DECL_SOURCE_LOCATION of the types.
9937 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
9938             Richard Sandiford  <richard.sandiford@linaro.org>
9940         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
9941         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
9942         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
9943         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
9944         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
9945         Add declaration.
9946         * config/aarch64/constraints.md (aarch64_movti_operand):
9947         Limit immediates.
9948         * config/aarch64/predicates.md (Uti): Add new constraint.
9950 2018-01-17 Carl Love  <cel@us.ibm.com>
9952         * config/rs6000/vsx.md (define_expand xl_len_r,
9953         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
9954         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
9955         lxvll.
9956         (define_expand, define_insn): Move the shift left from  the
9957         define_insn to the define_expand for lxvl and stxvl instructions.
9958         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
9959         and XL_LEN_R definitions to PURE.
9961 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
9963         * config/i386/i386.c (indirect_thunk_name): Declare regno
9964         as unsigned int.  Compare regno with INVALID_REGNUM.
9965         (output_indirect_thunk): Ditto.
9966         (output_indirect_thunk_function): Ditto.
9967         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
9968         in the call to output_indirect_thunk_function.
9970 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
9972         PR middle-end/83884
9973         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
9974         rather than the size of inner_type to determine the stack slot size
9975         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
9977 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
9979         PR target/83546
9980         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
9981         to PTA_SILVERMONT.
9983 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
9985         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
9986         endian Linux systems to optionally enable multilibs for selecting
9987         the long double type if the user configured an explicit type.
9988         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
9989         have no long double multilibs if not defined.
9990         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
9991         warn if the user used -mabi={ieee,ibm}longdouble and we built
9992         multilibs for long double.
9993         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
9994         appropriate multilib option.
9995         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
9996         multilib options.
9997         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
9998         for building long double multilibs.
9999         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
10001 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
10003         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
10004         copies.
10006         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
10007         64 bits.
10008         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
10009         128 bits.
10011         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
10012         variables.
10014         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
10015         return value.
10017 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10019         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
10020         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
10022 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10024         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
10025         different rtl trees depending on TARGET_64BIT.
10026         (rs6000_gen_lvx): Likewise.
10028 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10030         * config/visium/visium.md (nop): Tweak comment.
10031         (hazard_nop): Likewise.
10033 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10035         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
10036         -mspeculate-indirect-jumps.
10037         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
10038         for -mno-speculate-indirect-jumps.
10039         (*call_indirect_elfv2<mode>_nospec): New define_insn.
10040         (*call_value_indirect_elfv2<mode>): Disable for
10041         -mno-speculate-indirect-jumps.
10042         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
10043         (indirect_jump): Emit different RTL for
10044         -mno-speculate-indirect-jumps.
10045         (*indirect_jump<mode>): Disable for
10046         -mno-speculate-indirect-jumps.
10047         (*indirect_jump<mode>_nospec): New define_insn.
10048         (tablejump): Emit different RTL for
10049         -mno-speculate-indirect-jumps.
10050         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
10051         (tablejumpsi_nospec): New define_expand.
10052         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
10053         (tablejumpdi_nospec): New define_expand.
10054         (*tablejump<mode>_internal1): Disable for
10055         -mno-speculate-indirect-jumps.
10056         (*tablejump<mode>_internal1_nospec): New define_insn.
10057         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
10058         option.
10060 2018-01-16  Artyom Skrobov tyomitch@gmail.com
10062         * caller-save.c (insert_save): Drop unnecessary parameter.  All
10063         callers updated.
10065 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10066             Richard Biener  <rguenth@suse.de>
10068         PR libgomp/83590
10069         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
10070         return early, inline manually is_gimple_sizepos.  Make sure if we
10071         call gimplify_expr we don't end up with a gimple constant.
10072         * tree.c (variably_modified_type_p): Don't return true for
10073         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
10074         * gimplify.h (is_gimple_sizepos): Remove.
10076 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10078         PR tree-optimization/83857
10079         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
10080         vectorizable_live_operation for pure SLP statements.
10081         (vectorizable_live_operation): Handle PHIs.
10083 2018-01-16  Richard Biener  <rguenther@suse.de>
10085         PR tree-optimization/83867
10086         * tree-vect-stmts.c (vect_transform_stmt): Precompute
10087         nested_in_vect_loop_p since the scalar stmt may get invalidated.
10089 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10091         PR c/83844
10092         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
10093         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
10094         If off is not INTEGER_CST, issue a may not be aligned warning
10095         rather than isn't aligned.  Use isn%'t rather than isn't.
10096         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
10097         into MULT_EXPR.
10098         <case MULT_EXPR>: Improve the case when bottom and one of the
10099         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
10100         operand, in that case check if the other operand is multiple of
10101         bottom divided by the INTEGER_CST operand.
10103 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10105         PR target/83858
10106         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
10107         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
10108         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
10109         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
10110         * config/pa/pa.c (pa_function_arg_advance): Likewise.
10111         (pa_function_arg, pa_arg_partial_bytes): Likewise.
10112         (pa_function_arg_size): New function.
10114 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10116         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
10117         in a separate statement.
10119 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10121         PR tree-optimization/83847
10122         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
10123         group gathers and scatters.
10125 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10127         PR rtl-optimization/86620
10128         * params.def (max-sched-ready-insns): Bump minimum value to 1.
10130         PR rtl-optimization/83213
10131         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
10132         to last if both are JUMP_INSNs.
10134         PR tree-optimization/83843
10135         * gimple-ssa-store-merging.c
10136         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
10137         store_immediate_info for bswap/nop orig_stores.
10139 2018-01-15  Andrew Waterman  <andrew@sifive.com>
10141         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
10142         !TARGET_MUL.
10143         <UDIV>: Increase cost if !TARGET_DIV.
10145 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
10147         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
10148         (define_attr "cr_logical_3op"): New.
10149         (cceq_ior_compare): Adjust.
10150         (cceq_ior_compare_complement): Adjust.
10151         (*cceq_rev_compare): Adjust.
10152         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
10153         (is_cracked_insn): Adjust.
10154         (insn_must_be_first_in_group): Adjust.
10155         * config/rs6000/40x.md: Adjust.
10156         * config/rs6000/440.md: Adjust.
10157         * config/rs6000/476.md: Adjust.
10158         * config/rs6000/601.md: Adjust.
10159         * config/rs6000/603.md: Adjust.
10160         * config/rs6000/6xx.md: Adjust.
10161         * config/rs6000/7450.md: Adjust.
10162         * config/rs6000/7xx.md: Adjust.
10163         * config/rs6000/8540.md: Adjust.
10164         * config/rs6000/cell.md: Adjust.
10165         * config/rs6000/e300c2c3.md: Adjust.
10166         * config/rs6000/e500mc.md: Adjust.
10167         * config/rs6000/e500mc64.md: Adjust.
10168         * config/rs6000/e5500.md: Adjust.
10169         * config/rs6000/e6500.md: Adjust.
10170         * config/rs6000/mpc.md: Adjust.
10171         * config/rs6000/power4.md: Adjust.
10172         * config/rs6000/power5.md: Adjust.
10173         * config/rs6000/power6.md: Adjust.
10174         * config/rs6000/power7.md: Adjust.
10175         * config/rs6000/power8.md: Adjust.
10176         * config/rs6000/power9.md: Adjust.
10177         * config/rs6000/rs64.md: Adjust.
10178         * config/rs6000/titan.md: Adjust.
10180 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10182         * config/i386/predicates.md (indirect_branch_operand): Rewrite
10183         ix86_indirect_branch_register logic.
10185 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10187         * config/i386/constraints.md (Bs): Update
10188         ix86_indirect_branch_register check.  Don't check
10189         ix86_indirect_branch_register with GOT_memory_operand.
10190         (Bw): Likewise.
10191         * config/i386/predicates.md (GOT_memory_operand): Don't check
10192         ix86_indirect_branch_register here.
10193         (GOT32_symbol_operand): Likewise.
10195 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10197         * config/i386/predicates.md (constant_call_address_operand):
10198         Rewrite ix86_indirect_branch_register logic.
10199         (sibcall_insn_operand): Likewise.
10201 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10203         * config/i386/constraints.md (Bs): Replace
10204         ix86_indirect_branch_thunk_register with
10205         ix86_indirect_branch_register.
10206         (Bw): Likewise.
10207         * config/i386/i386.md (indirect_jump): Likewise.
10208         (tablejump): Likewise.
10209         (*sibcall_memory): Likewise.
10210         (*sibcall_value_memory): Likewise.
10211         Peepholes of indirect call and jump via memory: Likewise.
10212         * config/i386/i386.opt: Likewise.
10213         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10214         (GOT_memory_operand): Likewise.
10215         (call_insn_operand): Likewise.
10216         (sibcall_insn_operand): Likewise.
10217         (GOT32_symbol_operand): Likewise.
10219 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10221         PR middle-end/83837
10222         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
10223         type rather than type addr's type points to.
10224         (expand_omp_atomic_mutex): Likewise.
10225         (expand_omp_atomic): Likewise.
10227 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10229         PR target/83839
10230         * config/i386/i386.c (output_indirect_thunk_function): Use
10231         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
10232         for  __x86_return_thunk.
10234 2018-01-15  Richard Biener  <rguenther@suse.de>
10236         PR middle-end/83850
10237         * expmed.c (extract_bit_field_1): Fix typo.
10239 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10241         PR target/83687
10242         * config/arm/iterators.md (VF): New mode iterator.
10243         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
10244         Remove integer-related logic from pattern.
10245         (neon_vabd<mode>_3): Likewise.
10247 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10249         PR middle-end/82694
10250         * common.opt (fstrict-overflow): No longer an alias.
10251         (fwrapv-pointer): New option.
10252         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10253         also for pointer types based on flag_wrapv_pointer.
10254         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10255         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10256         opts->x_flag_wrapv got set.
10257         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10258         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10259         POINTER_TYPE_OVERFLOW_UNDEFINED.
10260         * match.pd: Likewise in address comparison pattern.
10261         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10263 2018-01-15  Richard Biener  <rguenther@suse.de>
10265         PR lto/83804
10266         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10267         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
10268         Reset type names to their identifier if their TYPE_DECL doesn't
10269         have linkage (and thus is used for ODR and devirt).
10270         (save_debug_info_for_decl): Remove.
10271         (save_debug_info_for_type): Likewise.
10272         (add_tree_to_fld_list): Adjust.
10273         * tree-pretty-print.c (dump_generic_node): Make dumping of
10274         type names more robust.
10276 2018-01-15  Richard Biener  <rguenther@suse.de>
10278         * BASE-VER: Bump to 8.0.1.
10280 2018-01-14  Martin Sebor  <msebor@redhat.com>
10282         PR other/83508
10283         * builtins.c (check_access): Avoid warning when the no-warning bit
10284         is set.
10286 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
10288         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10289         * ira-color (allocno_hard_regs_compare): Likewise.
10291 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
10293         PR target/83013
10294         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10295         Use .pushsection/.popsection.
10297 2018-01-14  Martin Sebor  <msebor@redhat.com>
10299         PR c++/81327
10300         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10302 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
10304         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
10305         entry from extra_headers.
10306         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
10307         extra_headers, make the list bitwise identical to the i?86-*-* one.
10309 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10311         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
10312         -mcmodel=large with -mindirect-branch=thunk,
10313         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
10314         -mfunction-return=thunk-extern.
10315         * doc/invoke.texi: Document -mcmodel=large is incompatible with
10316         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
10317         -mfunction-return=thunk and -mfunction-return=thunk-extern.
10319 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10321         * config/i386/i386.c (print_reg): Print the name of the full
10322         integer register without '%'.
10323         (ix86_print_operand): Handle 'V'.
10324          * doc/extend.texi: Document 'V' modifier.
10326 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10328         * config/i386/constraints.md (Bs): Disallow memory operand for
10329         -mindirect-branch-register.
10330         (Bw): Likewise.
10331         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10332         (GOT_memory_operand): Likewise.
10333         (call_insn_operand): Likewise.
10334         (sibcall_insn_operand): Likewise.
10335         (GOT32_symbol_operand): Likewise.
10336         * config/i386/i386.md (indirect_jump): Call convert_memory_address
10337         for -mindirect-branch-register.
10338         (tablejump): Likewise.
10339         (*sibcall_memory): Likewise.
10340         (*sibcall_value_memory): Likewise.
10341         Disallow peepholes of indirect call and jump via memory for
10342         -mindirect-branch-register.
10343         (*call_pop): Replace m with Bw.
10344         (*call_value_pop): Likewise.
10345         (*sibcall_pop_memory): Replace m with Bs.
10346         * config/i386/i386.opt (mindirect-branch-register): New option.
10347         * doc/invoke.texi: Document -mindirect-branch-register option.
10349 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10351         * config/i386/i386-protos.h (ix86_output_function_return): New.
10352         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
10353         set function_return_type.
10354         (indirect_thunk_name): Add ret_p to indicate thunk for function
10355         return.
10356         (output_indirect_thunk_function): Pass false to
10357         indirect_thunk_name.
10358         (ix86_output_indirect_branch_via_reg): Likewise.
10359         (ix86_output_indirect_branch_via_push): Likewise.
10360         (output_indirect_thunk_function): Create alias for function
10361         return thunk if regno < 0.
10362         (ix86_output_function_return): New function.
10363         (ix86_handle_fndecl_attribute): Handle function_return.
10364         (ix86_attribute_table): Add function_return.
10365         * config/i386/i386.h (machine_function): Add
10366         function_return_type.
10367         * config/i386/i386.md (simple_return_internal): Use
10368         ix86_output_function_return.
10369         (simple_return_internal_long): Likewise.
10370         * config/i386/i386.opt (mfunction-return=): New option.
10371         (indirect_branch): Mention -mfunction-return=.
10372         * doc/extend.texi: Document function_return function attribute.
10373         * doc/invoke.texi: Document -mfunction-return= option.
10375 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10377         * config/i386/i386-opts.h (indirect_branch): New.
10378         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10379         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10380         with local indirect jump when converting indirect call and jump.
10381         (ix86_set_indirect_branch_type): New.
10382         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10383         (indirectlabelno): New.
10384         (indirect_thunk_needed): Likewise.
10385         (indirect_thunk_bnd_needed): Likewise.
10386         (indirect_thunks_used): Likewise.
10387         (indirect_thunks_bnd_used): Likewise.
10388         (INDIRECT_LABEL): Likewise.
10389         (indirect_thunk_name): Likewise.
10390         (output_indirect_thunk): Likewise.
10391         (output_indirect_thunk_function): Likewise.
10392         (ix86_output_indirect_branch_via_reg): Likewise.
10393         (ix86_output_indirect_branch_via_push): Likewise.
10394         (ix86_output_indirect_branch): Likewise.
10395         (ix86_output_indirect_jmp): Likewise.
10396         (ix86_code_end): Call output_indirect_thunk_function if needed.
10397         (ix86_output_call_insn): Call ix86_output_indirect_branch if
10398         needed.
10399         (ix86_handle_fndecl_attribute): Handle indirect_branch.
10400         (ix86_attribute_table): Add indirect_branch.
10401         * config/i386/i386.h (machine_function): Add indirect_branch_type
10402         and has_local_indirect_jump.
10403         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10404         to true.
10405         (tablejump): Likewise.
10406         (*indirect_jump): Use ix86_output_indirect_jmp.
10407         (*tablejump_1): Likewise.
10408         (simple_return_indirect_internal): Likewise.
10409         * config/i386/i386.opt (mindirect-branch=): New option.
10410         (indirect_branch): New.
10411         (keep): Likewise.
10412         (thunk): Likewise.
10413         (thunk-inline): Likewise.
10414         (thunk-extern): Likewise.
10415         * doc/extend.texi: Document indirect_branch function attribute.
10416         * doc/invoke.texi: Document -mindirect-branch= option.
10418 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
10420         PR ipa/83051
10421         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10423 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
10425         * ipa-inline.c (want_inline_small_function_p): Return false if
10426         inlining has already failed with CIF_FINAL_ERROR.
10427         (update_caller_keys): Call want_inline_small_function_p before
10428         can_inline_edge_p.
10429         (update_callee_keys): Likewise.
10431 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10433         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10434         New function.
10435         (rs6000_quadword_masked_address_p): Likewise.
10436         (quad_aligned_load_p): Likewise.
10437         (quad_aligned_store_p): Likewise.
10438         (const_load_sequence_p): Add comment to describe the outer-most loop.
10439         (mimic_memory_attributes_and_flags): New function.
10440         (rs6000_gen_stvx): Likewise.
10441         (replace_swapped_aligned_store): Likewise.
10442         (rs6000_gen_lvx): Likewise.
10443         (replace_swapped_aligned_load): Likewise.
10444         (replace_swapped_load_constant): Capitalize argument name in
10445         comment describing this function.
10446         (rs6000_analyze_swaps): Add a third pass to search for vector loads
10447         and stores that access quad-word aligned addresses and replace
10448         with stvx or lvx instructions when appropriate.
10449         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10450         New function prototype.
10451         (rs6000_quadword_masked_address_p): Likewise.
10452         (rs6000_gen_lvx): Likewise.
10453         (rs6000_gen_stvx): Likewise.
10454         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10455         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10456         when memory address is aligned.
10457         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10458         this split to select lvx instruction when memory address is aligned.
10459         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10460         instruction when memory address is aligned.
10461         (*vsx_le_perm_load_v16qi): Likewise.
10462         (four unnamed splitters): Modify to select the stvx instruction
10463         when memory is aligned.
10465 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
10467         * predict.c (determine_unlikely_bbs): Handle correctly BBs
10468         which appears in the queue multiple times.
10470 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10471             Alan Hayward  <alan.hayward@arm.com>
10472             David Sherwood  <david.sherwood@arm.com>
10474         * tree-vectorizer.h (vec_lower_bound): New structure.
10475         (_loop_vec_info): Add check_nonzero and lower_bounds.
10476         (LOOP_VINFO_CHECK_NONZERO): New macro.
10477         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10478         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10479         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10480         fields.  Make seg_len the distance travelled, not including the
10481         access size.
10482         (dr_direction_indicator): Declare.
10483         (dr_zero_step_indicator): Likewise.
10484         (dr_known_forward_stride_p): Likewise.
10485         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10486         tree-ssanames.h.
10487         (runtime_alias_check_p): Allow runtime alias checks with
10488         variable strides.
10489         (operator ==): Compare access_size and align.
10490         (prune_runtime_alias_test_list): Rework for new distinction between
10491         the access_size and seg_len.
10492         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10493         segment lengths.
10494         (get_segment_min_max): New function.
10495         (create_intersect_range_checks): Use it.
10496         (dr_step_indicator): New function.
10497         (dr_direction_indicator): Likewise.
10498         (dr_zero_step_indicator): Likewise.
10499         (dr_known_forward_stride_p): Likewise.
10500         * tree-loop-distribution.c (data_ref_segment_size): Return
10501         DR_STEP * (niters - 1).
10502         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10503         constructor.
10504         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10505         (vect_preserves_scalar_order_p): New function, split out from...
10506         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10507         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10508         (vect_vfa_access_size): New function.
10509         (vect_vfa_align): Likewise.
10510         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10511         (dump_lower_bound): New function.
10512         (vect_check_lower_bound): Likewise.
10513         (vect_small_gap_p): Likewise.
10514         (vectorizable_with_step_bound_p): Likewise.
10515         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10516         depencies if the vectorization factor is 1.  Convert the checks
10517         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10518         a bunds check for variable steps if the minimum required step is
10519         relatively small. Update calls to the dr_with_seg_len
10520         constructor and to vect_compile_time_alias.
10521         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10522         function.
10523         (vect_loop_versioning): Call it.
10524         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10525         when retrying.
10526         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10528 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10529             Alan Hayward  <alan.hayward@arm.com>
10530             David Sherwood  <david.sherwood@arm.com>
10532         * doc/sourcebuild.texi (vect_scatter_store): Document.
10533         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10534         optabs.
10535         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10536         Document.
10537         * genopinit.c (main): Add supports_vec_scatter_store and
10538         supports_vec_scatter_store_cached to target_optabs.
10539         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10540         IFN_MASK_SCATTER_STORE.
10541         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10542         functions.
10543         * internal-fn.h (internal_store_fn_p): Declare.
10544         (internal_fn_stored_value_index): Likewise.
10545         * internal-fn.c (scatter_store_direct): New macro.
10546         (expand_scatter_store_optab_fn): New function.
10547         (direct_scatter_store_optab_supported_p): New macro.
10548         (internal_store_fn_p): New function.
10549         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10550         IFN_MASK_SCATTER_STORE.
10551         (internal_fn_mask_index): Likewise.
10552         (internal_fn_stored_value_index): New function.
10553         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10554         for scatter stores.
10555         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10556         * optabs-query.c (supports_vec_scatter_store_p): New function.
10557         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10558         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10559         true for scatter stores.
10560         (vect_gather_scatter_fn_p): Handle scatter stores too.
10561         (vect_check_gather_scatter): Consider using scatter stores if
10562         supports_vec_scatter_store_p.
10563         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10564         scatter stores too.
10565         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10566         internal_fn_stored_value_index.
10567         (check_load_store_masking): Handle scatter stores too.
10568         (vect_get_store_rhs): Make public.
10569         (vectorizable_call): Use internal_store_fn_p.
10570         (vectorizable_store): Handle scatter store internal functions.
10571         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10572         when deciding whether the end of the group has been reached.
10573         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10574         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10575         (mask_scatter_store<mode>): New insns.
10577 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10578             Alan Hayward  <alan.hayward@arm.com>
10579             David Sherwood  <david.sherwood@arm.com>
10581         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10582         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10583         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10584         function.
10585         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10586         Use vect_truncate_gather_scatter_offset if we can't treat the
10587         operation as a normal gather load or scatter store.
10588         (get_group_load_store_type): Take the gather_scatter_info
10589         as argument.  Try using a gather load or scatter store for
10590         single-element groups.
10591         (get_load_store_type): Update calls to get_group_load_store_type
10592         and vect_use_strided_gather_scatters_p.
10594 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10595             Alan Hayward  <alan.hayward@arm.com>
10596             David Sherwood  <david.sherwood@arm.com>
10598         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10599         optional tree argument.
10600         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10601         null target hooks.
10602         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10603         but continue to use the current value as a fallback.
10604         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10605         to compare the updates.
10606         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10607         (get_load_store_type): Use it when handling a strided access.
10608         (vect_get_strided_load_store_ops): New function.
10609         (vect_get_data_ptr_increment): Likewise.
10610         (vectorizable_load): Handle strided gather loads.  Always pass
10611         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10613 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10614             Alan Hayward  <alan.hayward@arm.com>
10615             David Sherwood  <david.sherwood@arm.com>
10617         * doc/md.texi (gather_load@var{m}): Document.
10618         (mask_gather_load@var{m}): Likewise.
10619         * genopinit.c (main): Add supports_vec_gather_load and
10620         supports_vec_gather_load_cached to target_optabs.
10621         * optabs-tree.c (init_tree_optimization_optabs): Use
10622         ggc_cleared_alloc to allocate target_optabs.
10623         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10624         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10625         functions.
10626         * internal-fn.h (internal_load_fn_p): Declare.
10627         (internal_gather_scatter_fn_p): Likewise.
10628         (internal_fn_mask_index): Likewise.
10629         (internal_gather_scatter_fn_supported_p): Likewise.
10630         * internal-fn.c (gather_load_direct): New macro.
10631         (expand_gather_load_optab_fn): New function.
10632         (direct_gather_load_optab_supported_p): New macro.
10633         (direct_internal_fn_optab): New function.
10634         (internal_load_fn_p): Likewise.
10635         (internal_gather_scatter_fn_p): Likewise.
10636         (internal_fn_mask_index): Likewise.
10637         (internal_gather_scatter_fn_supported_p): Likewise.
10638         * optabs-query.c (supports_at_least_one_mode_p): New function.
10639         (supports_vec_gather_load_p): Likewise.
10640         * optabs-query.h (supports_vec_gather_load_p): Declare.
10641         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10642         and memory_type field.
10643         (NUM_PATTERNS): Bump to 15.
10644         * tree-vect-data-refs.c: Include internal-fn.h.
10645         (vect_gather_scatter_fn_p): New function.
10646         (vect_describe_gather_scatter_call): Likewise.
10647         (vect_check_gather_scatter): Try using internal functions for
10648         gather loads.  Recognize existing calls to a gather load function.
10649         (vect_analyze_data_refs): Consider using gather loads if
10650         supports_vec_gather_load_p.
10651         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10652         (vect_get_gather_scatter_offset_type): Likewise.
10653         (vect_convert_mask_for_vectype): Likewise.
10654         (vect_add_conversion_to_patterm): Likewise.
10655         (vect_try_gather_scatter_pattern): Likewise.
10656         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10657         (vect_vect_recog_func_ptrs): Add it.
10658         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10659         internal_fn_mask_index and internal_gather_scatter_fn_p.
10660         (check_load_store_masking): Take the gather_scatter_info as an
10661         argument and handle gather loads.
10662         (vect_get_gather_scatter_ops): New function.
10663         (vectorizable_call): Check internal_load_fn_p.
10664         (vectorizable_load): Likewise.  Handle gather load internal
10665         functions.
10666         (vectorizable_store): Update call to check_load_store_masking.
10667         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10668         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10669         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10670         (aarch64_gather_scale_operand_d): New predicates.
10671         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10672         (mask_gather_load<mode>): New insns.
10674 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10675             Alan Hayward  <alan.hayward@arm.com>
10676             David Sherwood  <david.sherwood@arm.com>
10678         * optabs.def (fold_left_plus_optab): New optab.
10679         * doc/md.texi (fold_left_plus_@var{m}): Document.
10680         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10681         * internal-fn.c (fold_left_direct): Define.
10682         (expand_fold_left_optab_fn): Likewise.
10683         (direct_fold_left_optab_supported_p): Likewise.
10684         * fold-const-call.c (fold_const_fold_left): New function.
10685         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10686         * tree-parloops.c (valid_reduction_p): New function.
10687         (gather_scalar_reductions): Use it.
10688         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10689         (vect_finish_replace_stmt): Declare.
10690         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10691         (needs_fold_left_reduction_p): New function, split out from...
10692         (vect_is_simple_reduction): ...here.  Accept reductions that
10693         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10694         (vect_force_simple_reduction): Also store the reduction type in
10695         the assignment's STMT_VINFO_REDUC_TYPE.
10696         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10697         (merge_with_identity): New function.
10698         (vect_expand_fold_left): Likewise.
10699         (vectorize_fold_left_reduction): Likewise.
10700         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10701         scalar phi in place for it.  Check for target support and reject
10702         cases that would reassociate the operation.  Defer the transform
10703         phase to vectorize_fold_left_reduction.
10704         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10705         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10706         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10708 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10710         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10711         call to ifc_temp_var.
10713 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10714             Alan Hayward  <alan.hayward@arm.com>
10715             David Sherwood  <david.sherwood@arm.com>
10717         * target.def (legitimize_address_displacement): Take the original
10718         offset as a poly_int.
10719         * targhooks.h (default_legitimize_address_displacement): Update
10720         accordingly.
10721         * targhooks.c (default_legitimize_address_displacement): Likewise.
10722         * doc/tm.texi: Regenerate.
10723         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10724         as an argument, moving assert of ad->disp == ad->disp_term to...
10725         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10726         Try calling targetm.legitimize_address_displacement before expanding
10727         the address rather than afterwards, and adjust for the new interface.
10728         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10729         Match the new hook interface.  Handle SVE addresses.
10730         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10731         new hook interface.
10733 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10735         * Makefile.in (OBJS): Add early-remat.o.
10736         * target.def (select_early_remat_modes): New hook.
10737         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10738         * doc/tm.texi: Regenerate.
10739         * targhooks.h (default_select_early_remat_modes): Declare.
10740         * targhooks.c (default_select_early_remat_modes): New function.
10741         * timevar.def (TV_EARLY_REMAT): New timevar.
10742         * passes.def (pass_early_remat): New pass.
10743         * tree-pass.h (make_pass_early_remat): Declare.
10744         * early-remat.c: New file.
10745         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10746         function.
10747         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10749 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10750             Alan Hayward  <alan.hayward@arm.com>
10751             David Sherwood  <david.sherwood@arm.com>
10753         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10754         vfm1 with a bound_epilog parameter.
10755         (vect_do_peeling): Update calls accordingly, and move the prologue
10756         call earlier in the function.  Treat the base bound_epilog as 0 for
10757         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
10758         this base when peeling for gaps.
10759         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10760         with fully-masked loops.
10761         (vect_estimate_min_profitable_iters): Handle the single peeled
10762         iteration in that case.
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         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10769         single-element interleaving even if the size is not a power of 2.
10770         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10771         accesses for single-element interleaving if the group size is
10772         not a power of 2.
10774 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10775             Alan Hayward  <alan.hayward@arm.com>
10776             David Sherwood  <david.sherwood@arm.com>
10778         * doc/md.texi (fold_extract_last_@var{m}): Document.
10779         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10780         * optabs.def (fold_extract_last_optab): New optab.
10781         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10782         * internal-fn.c (fold_extract_direct): New macro.
10783         (expand_fold_extract_optab_fn): Likewise.
10784         (direct_fold_extract_optab_supported_p): Likewise.
10785         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10786         * tree-vect-loop.c (vect_model_reduction_cost): Handle
10787         EXTRACT_LAST_REDUCTION.
10788         (get_initial_def_for_reduction): Do not create an initial vector
10789         for EXTRACT_LAST_REDUCTION reductions.
10790         (vectorizable_reduction): Leave the scalar phi in place for
10791         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
10792         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
10793         epilogue code for EXTRACT_LAST_REDUCTION and defer the
10794         transform phase to vectorizable_condition.
10795         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10796         split out from...
10797         (vect_finish_stmt_generation): ...here.
10798         (vect_finish_replace_stmt): New function.
10799         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10800         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10801         pattern.
10802         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
10804 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10805             Alan Hayward  <alan.hayward@arm.com>
10806             David Sherwood  <david.sherwood@arm.com>
10808         * doc/md.texi (extract_last_@var{m}): Document.
10809         * optabs.def (extract_last_optab): New optab.
10810         * internal-fn.def (EXTRACT_LAST): New internal function.
10811         * internal-fn.c (cond_unary_direct): New macro.
10812         (expand_cond_unary_optab_fn): Likewise.
10813         (direct_cond_unary_optab_supported_p): Likewise.
10814         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
10815         loops using EXTRACT_LAST.
10816         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
10817         (extract_last_<mode>): ...this optab.
10818         (vec_extract<mode><Vel>): Update accordingly.
10820 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10821             Alan Hayward  <alan.hayward@arm.com>
10822             David Sherwood  <david.sherwood@arm.com>
10824         * target.def (empty_mask_is_expensive): New hook.
10825         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
10826         * doc/tm.texi: Regenerate.
10827         * targhooks.h (default_empty_mask_is_expensive): Declare.
10828         * targhooks.c (default_empty_mask_is_expensive): New function.
10829         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
10830         if the target says that empty masks are expensive.
10831         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
10832         New function.
10833         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
10835 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10836             Alan Hayward  <alan.hayward@arm.com>
10837             David Sherwood  <david.sherwood@arm.com>
10839         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
10840         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
10841         (vect_use_loop_mask_for_alignment_p): New function.
10842         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
10843         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
10844         niters_skip argument.  Make sure that the first niters_skip elements
10845         of the first iteration are inactive.
10846         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
10847         Update call to vect_set_loop_masks_directly.
10848         (get_misalign_in_elems): New function, split out from...
10849         (vect_gen_prolog_loop_niters): ...here.
10850         (vect_update_init_of_dr): Take a code argument that specifies whether
10851         the adjustment should be added or subtracted.
10852         (vect_update_init_of_drs): Likewise.
10853         (vect_prepare_for_masked_peels): New function.
10854         (vect_do_peeling): Skip prologue peeling if we're using a mask
10855         instead.  Update call to vect_update_inits_of_drs.
10856         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10857         mask_skip_niters.
10858         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
10859         alignment.  Do not include the number of peeled iterations in
10860         the minimum threshold in that case.
10861         (vectorizable_induction): Adjust the start value down by
10862         LOOP_VINFO_MASK_SKIP_NITERS iterations.
10863         (vect_transform_loop): Call vect_prepare_for_masked_peels.
10864         Take the number of skipped iterations into account when calculating
10865         the loop bounds.
10866         * tree-vect-stmts.c (vect_gen_while_not): New function.
10868 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10869             Alan Hayward  <alan.hayward@arm.com>
10870             David Sherwood  <david.sherwood@arm.com>
10872         * doc/sourcebuild.texi (vect_fully_masked): Document.
10873         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
10874         default value to 0.
10875         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
10876         split out from...
10877         (vect_analyze_loop_2): ...here. Don't check the vectorization
10878         factor against the number of loop iterations if the loop is
10879         fully-masked.
10881 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10882             Alan Hayward  <alan.hayward@arm.com>
10883             David Sherwood  <david.sherwood@arm.com>
10885         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
10886         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
10887         (dump_groups): Update accordingly.
10888         (iv_use::mem_type): New member variable.
10889         (address_p): New function.
10890         (record_use): Add a mem_type argument and initialize the new
10891         mem_type field.
10892         (record_group_use): Add a mem_type argument.  Use address_p.
10893         Remove obsolete null checks of base_object.  Update call to record_use.
10894         (find_interesting_uses_op): Update call to record_group_use.
10895         (find_interesting_uses_cond): Likewise.
10896         (find_interesting_uses_address): Likewise.
10897         (get_mem_type_for_internal_fn): New function.
10898         (find_address_like_use): Likewise.
10899         (find_interesting_uses_stmt): Try find_address_like_use before
10900         calling find_interesting_uses_op.
10901         (addr_offset_valid_p): Use the iv mem_type field as the type
10902         of the addressed memory.
10903         (add_autoinc_candidates): Likewise.
10904         (get_address_cost): Likewise.
10905         (split_small_address_groups_p): Use address_p.
10906         (split_address_groups): Likewise.
10907         (add_iv_candidate_for_use): Likewise.
10908         (autoinc_possible_for_pair): Likewise.
10909         (rewrite_groups): Likewise.
10910         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
10911         (determine_group_iv_cost): Update after split of USE_ADDRESS.
10912         (get_alias_ptr_type_for_ptr_address): New function.
10913         (rewrite_use_address): Rewrite address uses in calls that were
10914         identified by find_address_like_use.
10916 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10917             Alan Hayward  <alan.hayward@arm.com>
10918             David Sherwood  <david.sherwood@arm.com>
10920         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
10921         TARGET_MEM_REFs.
10922         * gimple-expr.h (is_gimple_addressable: Likewise.
10923         * gimple-expr.c (is_gimple_address): Likewise.
10924         * internal-fn.c (expand_call_mem_ref): New function.
10925         (expand_mask_load_optab_fn): Use it.
10926         (expand_mask_store_optab_fn): Likewise.
10928 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10929             Alan Hayward  <alan.hayward@arm.com>
10930             David Sherwood  <david.sherwood@arm.com>
10932         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
10933         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
10934         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
10935         (cond_umax@var{mode}): Document.
10936         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
10937         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
10938         (cond_umin_optab, cond_umax_optab): New optabs.
10939         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
10940         (COND_IOR, COND_XOR): New internal functions.
10941         * internal-fn.h (get_conditional_internal_fn): Declare.
10942         * internal-fn.c (cond_binary_direct): New macro.
10943         (expand_cond_binary_optab_fn): Likewise.
10944         (direct_cond_binary_optab_supported_p): Likewise.
10945         (get_conditional_internal_fn): New function.
10946         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
10947         Cope with reduction statements that are vectorized as calls rather
10948         than assignments.
10949         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
10950         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
10951         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
10952         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
10953         (UNSPEC_COND_EOR): New unspecs.
10954         (optab): Add mappings for them.
10955         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
10956         (sve_int_op, sve_fp_op): New int attributes.
10958 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10959             Alan Hayward  <alan.hayward@arm.com>
10960             David Sherwood  <david.sherwood@arm.com>
10962         * optabs.def (while_ult_optab): New optab.
10963         * doc/md.texi (while_ult@var{m}@var{n}): Document.
10964         * internal-fn.def (WHILE_ULT): New internal function.
10965         * internal-fn.h (direct_internal_fn_supported_p): New override
10966         that takes two types as argument.
10967         * internal-fn.c (while_direct): New macro.
10968         (expand_while_optab_fn): New function.
10969         (convert_optab_supported_p): Likewise.
10970         (direct_while_optab_supported_p): New macro.
10971         * wide-int.h (wi::udiv_ceil): New function.
10972         * tree-vectorizer.h (rgroup_masks): New structure.
10973         (vec_loop_masks): New typedef.
10974         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
10975         and fully_masked_p.
10976         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
10977         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
10978         (vect_max_vf): New function.
10979         (slpeel_make_loop_iterate_ntimes): Delete.
10980         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
10981         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
10982         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
10983         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
10984         internal-fn.h, stor-layout.h and optabs-query.h.
10985         (vect_set_loop_mask): New function.
10986         (add_preheader_seq): Likewise.
10987         (add_header_seq): Likewise.
10988         (interleave_supported_p): Likewise.
10989         (vect_maybe_permute_loop_masks): Likewise.
10990         (vect_set_loop_masks_directly): Likewise.
10991         (vect_set_loop_condition_masked): Likewise.
10992         (vect_set_loop_condition_unmasked): New function, split out from
10993         slpeel_make_loop_iterate_ntimes.
10994         (slpeel_make_loop_iterate_ntimes): Rename to..
10995         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
10996         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
10997         (vect_do_peeling): Update call accordingly.
10998         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
10999         loops.
11000         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11001         mask_compare_type, can_fully_mask_p and fully_masked_p.
11002         (release_vec_loop_masks): New function.
11003         (_loop_vec_info): Use it to free the loop masks.
11004         (can_produce_all_loop_masks_p): New function.
11005         (vect_get_max_nscalars_per_iter): Likewise.
11006         (vect_verify_full_masking): Likewise.
11007         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
11008         retries, and free the mask rgroups before retrying.  Check loop-wide
11009         reasons for disallowing fully-masked loops.  Make the final decision
11010         about whether use a fully-masked loop or not.
11011         (vect_estimate_min_profitable_iters): Do not assume that peeling
11012         for the number of iterations will be needed for fully-masked loops.
11013         (vectorizable_reduction): Disable fully-masked loops.
11014         (vectorizable_live_operation): Likewise.
11015         (vect_halve_mask_nunits): New function.
11016         (vect_double_mask_nunits): Likewise.
11017         (vect_record_loop_mask): Likewise.
11018         (vect_get_loop_mask): Likewise.
11019         (vect_transform_loop): Handle the case in which the final loop
11020         iteration might handle a partial vector.  Call vect_set_loop_condition
11021         instead of slpeel_make_loop_iterate_ntimes.
11022         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
11023         (check_load_store_masking): New function.
11024         (prepare_load_store_mask): Likewise.
11025         (vectorizable_store): Handle fully-masked loops.
11026         (vectorizable_load): Likewise.
11027         (supportable_widening_operation): Use vect_halve_mask_nunits for
11028         booleans.
11029         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
11030         (vect_gen_while): New function.
11031         * config/aarch64/aarch64.md (umax<mode>3): New expander.
11032         (aarch64_uqdec<mode>): New insn.
11034 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11035             Alan Hayward  <alan.hayward@arm.com>
11036             David Sherwood  <david.sherwood@arm.com>
11038         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
11039         (reduc_xor_scal_optab): New optabs.
11040         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
11041         (reduc_xor_scal_@var{m}): Document.
11042         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
11043         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
11044         internal functions.
11045         * fold-const-call.c (fold_const_call): Handle them.
11046         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
11047         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
11048         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
11049         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
11050         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
11051         (UNSPEC_XORV): New unspecs.
11052         (optab): Add entries for them.
11053         (BITWISEV): New int iterator.
11054         (bit_reduc_op): New int attributes.
11056 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11057             Alan Hayward  <alan.hayward@arm.com>
11058             David Sherwood  <david.sherwood@arm.com>
11060         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
11061         * internal-fn.def (VEC_SHL_INSERT): New internal function.
11062         * optabs.def (vec_shl_insert_optab): New optab.
11063         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
11064         (duplicate_and_interleave): Likewise.
11065         * tree-vect-loop.c: Include internal-fn.h.
11066         (neutral_op_for_slp_reduction): New function, split out from
11067         get_initial_defs_for_reduction.
11068         (get_initial_def_for_reduction): Handle option 2 for variable-length
11069         vectors by loading the neutral value into a vector and then shifting
11070         the initial value into element 0.
11071         (get_initial_defs_for_reduction): Replace the code argument with
11072         the neutral value calculated by neutral_op_for_slp_reduction.
11073         Use gimple_build_vector for constant-length vectors.
11074         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
11075         but the first group_size elements have a neutral value.
11076         Use duplicate_and_interleave otherwise.
11077         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
11078         Update call to get_initial_defs_for_reduction.  Handle SLP
11079         reductions for variable-length vectors by creating one vector
11080         result for each scalar result, with the elements associated
11081         with other scalar results stubbed out with the neutral value.
11082         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
11083         Require IFN_VEC_SHL_INSERT for double reductions on
11084         variable-length vectors, or SLP reductions that have
11085         a neutral value.  Require can_duplicate_and_interleave_p
11086         support for variable-length unchained SLP reductions if there
11087         is no neutral value, such as for MIN/MAX reductions.  Also require
11088         the number of vector elements to be a multiple of the number of
11089         SLP statements when doing variable-length unchained SLP reductions.
11090         Update call to vect_create_epilog_for_reduction.
11091         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
11092         and remove initial values.
11093         (duplicate_and_interleave): Make public.
11094         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
11095         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
11097 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11098             Alan Hayward  <alan.hayward@arm.com>
11099             David Sherwood  <david.sherwood@arm.com>
11101         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
11102         (can_duplicate_and_interleave_p): New function.
11103         (vect_get_and_check_slp_defs): Take the vector of statements
11104         rather than just the current one.  Remove excess parentheses.
11105         Restriction rejectinon of vect_constant_def and vect_external_def
11106         for variable-length vectors to boolean types, or types for which
11107         can_duplicate_and_interleave_p is false.
11108         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
11109         (duplicate_and_interleave): New function.
11110         (vect_get_constant_vectors): Use gimple_build_vector for
11111         constant-length vectors and suitable variable-length constant
11112         vectors.  Use duplicate_and_interleave for other variable-length
11113         vectors.  Don't defer the update when inserting new statements.
11115 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11116             Alan Hayward  <alan.hayward@arm.com>
11117             David Sherwood  <david.sherwood@arm.com>
11119         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
11120         min_profitable_iters doesn't go negative.
11122 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11123             Alan Hayward  <alan.hayward@arm.com>
11124             David Sherwood  <david.sherwood@arm.com>
11126         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
11127         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
11128         * optabs.def (vec_mask_load_lanes_optab): New optab.
11129         (vec_mask_store_lanes_optab): Likewise.
11130         * internal-fn.def (MASK_LOAD_LANES): New internal function.
11131         (MASK_STORE_LANES): Likewise.
11132         * internal-fn.c (mask_load_lanes_direct): New macro.
11133         (mask_store_lanes_direct): Likewise.
11134         (expand_mask_load_optab_fn): Handle masked operations.
11135         (expand_mask_load_lanes_optab_fn): New macro.
11136         (expand_mask_store_optab_fn): Handle masked operations.
11137         (expand_mask_store_lanes_optab_fn): New macro.
11138         (direct_mask_load_lanes_optab_supported_p): Likewise.
11139         (direct_mask_store_lanes_optab_supported_p): Likewise.
11140         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
11141         parameter.
11142         (vect_load_lanes_supported): Likewise.
11143         * tree-vect-data-refs.c (strip_conversion): New function.
11144         (can_group_stmts_p): Likewise.
11145         (vect_analyze_data_ref_accesses): Use it instead of checking
11146         for a pair of assignments.
11147         (vect_store_lanes_supported): Take a masked_p parameter.
11148         (vect_load_lanes_supported): Likewise.
11149         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
11150         vect_store_lanes_supported and vect_load_lanes_supported.
11151         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11152         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
11153         parameter.  Don't allow gaps for masked accesses.
11154         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
11155         and vect_load_lanes_supported.
11156         (get_load_store_type): Take a masked_p parameter and update
11157         call to get_group_load_store_type.
11158         (vectorizable_store): Update call to get_load_store_type.
11159         Handle IFN_MASK_STORE_LANES.
11160         (vectorizable_load): Update call to get_load_store_type.
11161         Handle IFN_MASK_LOAD_LANES.
11163 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11164             Alan Hayward  <alan.hayward@arm.com>
11165             David Sherwood  <david.sherwood@arm.com>
11167         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
11168         modes for SVE.
11169         * config/aarch64/aarch64-protos.h
11170         (aarch64_sve_struct_memory_operand_p): Declare.
11171         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
11172         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
11173         (VPRED, vpred): Handle SVE structure modes.
11174         * config/aarch64/constraints.md (Utx): New constraint.
11175         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
11176         (aarch64_sve_struct_nonimmediate_operand): New predicates.
11177         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
11178         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
11179         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
11180         structure modes.  Split into pieces after RA.
11181         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
11182         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
11183         New patterns.
11184         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
11185         SVE structure modes.
11186         (aarch64_classify_address): Likewise.
11187         (sizetochar): Move earlier in file.
11188         (aarch64_print_operand): Handle SVE register lists.
11189         (aarch64_array_mode): New function.
11190         (aarch64_sve_struct_memory_operand_p): Likewise.
11191         (TARGET_ARRAY_MODE): Redefine.
11193 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11194             Alan Hayward  <alan.hayward@arm.com>
11195             David Sherwood  <david.sherwood@arm.com>
11197         * target.def (array_mode): New target hook.
11198         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
11199         * doc/tm.texi: Regenerate.
11200         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
11201         * hooks.c (hook_optmode_mode_uhwi_none): New function.
11202         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
11203         targetm.array_mode.
11204         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
11205         type sizes.
11207 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11208             Alan Hayward  <alan.hayward@arm.com>
11209             David Sherwood  <david.sherwood@arm.com>
11211         * fold-const.c (fold_binary_loc): Check the argument types
11212         rather than the result type when testing for a vector operation.
11214 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11216         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
11217         * doc/tm.texi: Regenerate.
11219 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11220             Alan Hayward  <alan.hayward@arm.com>
11221             David Sherwood  <david.sherwood@arm.com>
11223         * doc/invoke.texi (-msve-vector-bits=): Document new option.
11224         (sve): Document new AArch64 extension.
11225         * doc/md.texi (w): Extend the description of the AArch64
11226         constraint to include SVE vectors.
11227         (Upl, Upa): Document new AArch64 predicate constraints.
11228         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
11229         enum.
11230         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
11231         (msve-vector-bits=): New option.
11232         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
11233         SVE when these are disabled.
11234         (sve): New extension.
11235         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
11236         modes.  Adjust their number of units based on aarch64_sve_vg.
11237         (MAX_BITSIZE_MODE_ANY_MODE): Define.
11238         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
11239         aarch64_addr_query_type.
11240         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
11241         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
11242         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
11243         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
11244         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
11245         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
11246         (aarch64_simd_imm_zero_p): Delete.
11247         (aarch64_check_zero_based_sve_index_immediate): Declare.
11248         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11249         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11250         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11251         (aarch64_sve_float_mul_immediate_p): Likewise.
11252         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11253         rather than an rtx.
11254         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11255         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11256         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11257         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11258         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11259         (aarch64_regmode_natural_size): Likewise.
11260         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11261         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11262         left one place.
11263         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11264         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11265         for VG and the SVE predicate registers.
11266         (V_ALIASES): Add a "z"-prefixed alias.
11267         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11268         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11269         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11270         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11271         (REG_CLASS_NAMES): Add entries for them.
11272         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
11273         and the predicate registers.
11274         (aarch64_sve_vg): Declare.
11275         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11276         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11277         (REGMODE_NATURAL_SIZE): Define.
11278         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11279         SVE macros.
11280         * config/aarch64/aarch64.c: Include cfgrtl.h.
11281         (simd_immediate_info): Add a constructor for series vectors,
11282         and an associated step field.
11283         (aarch64_sve_vg): New variable.
11284         (aarch64_dbx_register_number): Handle VG and the predicate registers.
11285         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11286         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11287         (VEC_ANY_DATA, VEC_STRUCT): New constants.
11288         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11289         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11290         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11291         (aarch64_get_mask_mode): New functions.
11292         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11293         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11294         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
11295         predicate modes and predicate registers.  Explicitly restrict
11296         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
11297         to store a vector mode if it is recognized by
11298         aarch64_classify_vector_mode.
11299         (aarch64_regmode_natural_size): New function.
11300         (aarch64_hard_regno_caller_save_mode): Return the original mode
11301         for predicates.
11302         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
11303         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
11304         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
11305         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
11306         functions.
11307         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
11308         does not overlap dest if the function is frame-related.  Handle
11309         SVE constants.
11310         (aarch64_split_add_offset): New function.
11311         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
11312         them aarch64_add_offset.
11313         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
11314         and update call to aarch64_sub_sp.
11315         (aarch64_add_cfa_expression): New function.
11316         (aarch64_expand_prologue): Pass extra temporary registers to the
11317         functions above.  Handle the case in which we need to emit new
11318         DW_CFA_expressions for registers that were originally saved
11319         relative to the stack pointer, but now have to be expressed
11320         relative to the frame pointer.
11321         (aarch64_output_mi_thunk): Pass extra temporary registers to the
11322         functions above.
11323         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
11324         IP0 and IP1 values for SVE frames.
11325         (aarch64_expand_vec_series): New function.
11326         (aarch64_expand_sve_widened_duplicate): Likewise.
11327         (aarch64_expand_sve_const_vector): Likewise.
11328         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
11329         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
11330         into the register, rather than emitting a SET directly.
11331         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
11332         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
11333         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
11334         (offset_9bit_signed_scaled_p): New functions.
11335         (aarch64_replicate_bitmask_imm): New function.
11336         (aarch64_bitmask_imm): Use it.
11337         (aarch64_cannot_force_const_mem): Reject expressions involving
11338         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
11339         (aarch64_classify_index): Handle SVE indices, by requiring
11340         a plain register index with a scale that matches the element size.
11341         (aarch64_classify_address): Handle SVE addresses.  Assert that
11342         the mode of the address is VOIDmode or an integer mode.
11343         Update call to aarch64_classify_symbol.
11344         (aarch64_classify_symbolic_expression): Update call to
11345         aarch64_classify_symbol.
11346         (aarch64_const_vec_all_in_range_p): New function.
11347         (aarch64_print_vector_float_operand): Likewise.
11348         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
11349         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
11350         and the FP immediates 1.0 and 0.5.
11351         (aarch64_print_address_internal): Handle SVE addresses.
11352         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
11353         (aarch64_regno_regclass): Handle predicate registers.
11354         (aarch64_secondary_reload): Handle big-endian reloads of SVE
11355         data modes.
11356         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
11357         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
11358         (aarch64_convert_sve_vector_bits): New function.
11359         (aarch64_override_options): Use it to handle -msve-vector-bits=.
11360         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11361         rather than an rtx.
11362         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
11363         Handle SVE vector and predicate modes.  Accept VL-based constants
11364         that need only one temporary register, and VL offsets that require
11365         no temporary registers.
11366         (aarch64_conditional_register_usage): Mark the predicate registers
11367         as fixed if SVE isn't available.
11368         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11369         Return true for SVE vector and predicate modes.
11370         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11371         rather than an unsigned int.  Handle SVE modes.
11372         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
11373         SVE modes.
11374         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11375         if SVE is enabled.
11376         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11377         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11378         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11379         (aarch64_sve_float_mul_immediate_p): New functions.
11380         (aarch64_sve_valid_immediate): New function.
11381         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11382         Explicitly reject structure modes.  Check for INDEX constants.
11383         Handle PTRUE and PFALSE constants.
11384         (aarch64_check_zero_based_sve_index_immediate): New function.
11385         (aarch64_simd_imm_zero_p): Delete.
11386         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11387         vector modes.  Accept constants in the range of CNT[BHWD].
11388         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11389         ask for an Advanced SIMD mode.
11390         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11391         (aarch64_simd_vector_alignment): Handle SVE predicates.
11392         (aarch64_vectorize_preferred_vector_alignment): New function.
11393         (aarch64_simd_vector_alignment_reachable): Use it instead of
11394         the vector size.
11395         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11396         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11397         functions.
11398         (MAX_VECT_LEN): Delete.
11399         (expand_vec_perm_d): Add a vec_flags field.
11400         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11401         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11402         (aarch64_evpc_ext): Don't apply a big-endian lane correction
11403         for SVE modes.
11404         (aarch64_evpc_rev): Rename to...
11405         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
11406         (aarch64_evpc_rev_global): New function.
11407         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11408         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11409         MAX_VECT_LEN.
11410         (aarch64_evpc_sve_tbl): New function.
11411         (aarch64_expand_vec_perm_const_1): Update after rename of
11412         aarch64_evpc_rev.  Handle SVE permutes too, trying
11413         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11414         than aarch64_evpc_tbl.
11415         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11416         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11417         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11418         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11419         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11420         (aarch64_expand_sve_vcond): New functions.
11421         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11422         of aarch64_vector_mode_p.
11423         (aarch64_dwarf_poly_indeterminate_value): New function.
11424         (aarch64_compute_pressure_classes): Likewise.
11425         (aarch64_can_change_mode_class): Likewise.
11426         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11427         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11428         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11429         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11430         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11431         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11432         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11433         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11434         constraints.
11435         (Dn, Dl, Dr): Accept const as well as const_vector.
11436         (Dz): Likewise.  Compare against CONST0_RTX.
11437         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11438         of "vector" where appropriate.
11439         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11440         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11441         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11442         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11443         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11444         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11445         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11446         (v_int_equiv): Extend to SVE modes.
11447         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11448         mode attributes.
11449         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11450         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11451         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11452         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11453         (SVE_COND_FP_CMP): New int iterators.
11454         (perm_hilo): Handle the new unpack unspecs.
11455         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11456         attributes.
11457         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11458         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11459         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11460         (aarch64_equality_operator, aarch64_constant_vector_operand)
11461         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11462         (aarch64_sve_nonimmediate_operand): Likewise.
11463         (aarch64_sve_general_operand): Likewise.
11464         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11465         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11466         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11467         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11468         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11469         (aarch64_sve_float_arith_immediate): Likewise.
11470         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11471         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11472         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11473         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11474         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11475         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11476         (aarch64_sve_float_arith_operand): Likewise.
11477         (aarch64_sve_float_arith_with_sub_operand): Likewise.
11478         (aarch64_sve_float_mul_operand): Likewise.
11479         (aarch64_sve_vec_perm_operand): Likewise.
11480         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11481         (aarch64_mov_operand): Accept const_poly_int and const_vector.
11482         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11483         as well as const_vector.
11484         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11485         in file.  Use CONST0_RTX and CONSTM1_RTX.
11486         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11487         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11488         Use aarch64_simd_imm_zero.
11489         * config/aarch64/aarch64-sve.md: New file.
11490         * config/aarch64/aarch64.md: Include it.
11491         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11492         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11493         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11494         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11495         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11496         (sve): New attribute.
11497         (enabled): Disable instructions with the sve attribute unless
11498         TARGET_SVE.
11499         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11500         aarch64_expand_mov_immediate.
11501         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11502         CNT[BHSD] immediates.
11503         (movti): Split CONST_POLY_INT moves into two halves.
11504         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11505         Split additions that need a temporary here if the destination
11506         is the stack pointer.
11507         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11508         (*add<mode>3_poly_1): New instruction.
11509         (set_clobber_cc): New expander.
11511 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11513         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11514         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11515         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11516         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11517         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11518         Change innermode from fixed_mode_size to machine_mode.
11519         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11520         subreg of a variable-length CONST_VECTOR.
11522 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11523             Alan Hayward  <alan.hayward@arm.com>
11524             David Sherwood  <david.sherwood@arm.com>
11526         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11527         (add_offset_to_base): New function, split out from...
11528         (create_mem_ref): ...here.  When handling a scale other than 1,
11529         check first whether the address is valid without the offset.
11530         Add it into the base if so, leaving the index and scale as-is.
11532 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11534         PR c++/83778
11535         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11536         fold_for_warn before checking if arg2 is INTEGER_CST.
11538 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11540         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11541         (store_multiple_operation): Delete.
11542         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11543         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11544         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11545         guarded by TARGET_STRING.
11546         (rs6000_output_load_multiple): Delete.
11547         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11548         OPTION_MASK_STRING / TARGET_STRING handling.
11549         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11550         (const rs6000_opt_masks) <"string">: Change mask to 0.
11551         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11552         (MASK_STRING): Delete.
11553         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11554         parts.  Simplify.
11555         (load_multiple): Delete.
11556         (*ldmsi8): Delete.
11557         (*ldmsi7): Delete.
11558         (*ldmsi6): Delete.
11559         (*ldmsi5): Delete.
11560         (*ldmsi4): Delete.
11561         (*ldmsi3): Delete.
11562         (store_multiple): Delete.
11563         (*stmsi8): Delete.
11564         (*stmsi7): Delete.
11565         (*stmsi6): Delete.
11566         (*stmsi5): Delete.
11567         (*stmsi4): Delete.
11568         (*stmsi3): Delete.
11569         (movmemsi_8reg): Delete.
11570         (corresponding unnamed define_insn): Delete.
11571         (movmemsi_6reg): Delete.
11572         (corresponding unnamed define_insn): Delete.
11573         (movmemsi_4reg): Delete.
11574         (corresponding unnamed define_insn): Delete.
11575         (movmemsi_2reg): Delete.
11576         (corresponding unnamed define_insn): Delete.
11577         (movmemsi_1reg): Delete.
11578         (corresponding unnamed define_insn): Delete.
11579         * config/rs6000/rs6000.opt (mno-string): New.
11580         (mstring): Replace by deprecation warning stub.
11581         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11583 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11585         * regrename.c (regrename_do_replace): If replacing the same
11586         reg multiple times, try to reuse last created gen_raw_REG.
11588         PR debug/81155
11589         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11590         main to workaround a bug in GDB.
11592 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11594         PR target/83737
11595         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11597 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11599         PR rtl-optimization/80481
11600         * ira-color.c (get_cap_member): New function.
11601         (allocnos_conflict_by_live_ranges_p): Use it.
11602         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11603         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11605 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11607         PR target/83628
11608         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11609         (*saddl_se_1): Ditto.
11610         (*ssubsi_1): Ditto.
11611         (*ssubl_se_1): Ditto.
11613 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11615         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11616         rather than wi::to_widest for DR_INITs.
11617         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11618         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11619         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11620         INTEGER_CSTs.
11621         (vect_analyze_group_access_1): Note that here.
11623 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11625         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11626         polynomial type sizes.
11628 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11630         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11631         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11632         (gimple_add_tmp_var): Likewise.
11634 2018-01-12  Martin Liska  <mliska@suse.cz>
11636         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11637         (gimple_alloc_sizes): Likewise.
11638         (dump_gimple_statistics): Use PRIu64 in printf format.
11639         * gimple.h: Change uint64_t to int.
11641 2018-01-12  Martin Liska  <mliska@suse.cz>
11643         * tree-core.h: Use uint64_t instead of int.
11644         * tree.c (tree_node_counts): Likewise.
11645         (tree_node_sizes): Likewise.
11646         (dump_tree_statistics): Use PRIu64 in printf format.
11648 2018-01-12  Martin Liska  <mliska@suse.cz>
11650         * Makefile.in: As qsort_chk is implemented in vec.c, add
11651         vec.o to linkage of gencfn-macros.
11652         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11653         passing the info to record_node_allocation_statistics.
11654         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11655         and pass the info.
11656         * ggc-common.c (struct ggc_usage): Add operator== and use
11657         it in operator< and compare function.
11658         * mem-stats.h (struct mem_usage): Likewise.
11659         * vec.c (struct vec_usage): Remove operator< and compare
11660         function. Can be simply inherited.
11662 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11664         PR target/81616
11665         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11666         * tree-ssa-math-opts.c: Include domwalk.h.
11667         (convert_mult_to_fma_1): New function.
11668         (fma_transformation_info): New type.
11669         (fma_deferring_state): Likewise.
11670         (cancel_fma_deferring): New function.
11671         (result_of_phi): Likewise.
11672         (last_fma_candidate_feeds_initial_phi): Likewise.
11673         (convert_mult_to_fma): Added deferring logic, split actual
11674         transformation to convert_mult_to_fma_1.
11675         (math_opts_dom_walker): New type.
11676         (math_opts_dom_walker::after_dom_children): New method, body moved
11677         here from pass_optimize_widening_mul::execute, added deferring logic
11678         bits.
11679         (pass_optimize_widening_mul::execute): Moved most of code to
11680         math_opts_dom_walker::after_dom_children.
11681         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11682         * config/i386/i386.c (ix86_option_override_internal): Added
11683         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11685 2018-01-12  Richard Biener  <rguenther@suse.de>
11687         PR debug/83157
11688         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11689         inline instance vars.
11691 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11693         PR target/81819
11694         * config/rx/rx.c (rx_is_restricted_memory_address):
11695         Handle SUBREG case.
11697 2018-01-12  Richard Biener  <rguenther@suse.de>
11699         PR tree-optimization/80846
11700         * target.def (split_reduction): New target hook.
11701         * targhooks.c (default_split_reduction): New function.
11702         * targhooks.h (default_split_reduction): Declare.
11703         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11704         target requests first reduce vectors by combining low and high
11705         parts.
11706         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11707         (get_vectype_for_scalar_type_and_size): Export.
11708         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11709         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11710         * doc/tm.texi: Regenerate.
11711         * config/i386/i386.c (ix86_split_reduction): Implement
11712         TARGET_VECTORIZE_SPLIT_REDUCTION.
11714 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11716         PR target/83368
11717         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11718         in PIC mode except for TARGET_VXWORKS_RTP.
11719         * config/sparc/sparc.c: Include cfgrtl.h.
11720         (TARGET_INIT_PIC_REG): Define.
11721         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11722         (sparc_pic_register_p): New predicate.
11723         (sparc_legitimate_address_p): Use it.
11724         (sparc_legitimize_pic_address): Likewise.
11725         (sparc_delegitimize_address): Likewise.
11726         (sparc_mode_dependent_address_p): Likewise.
11727         (gen_load_pcrel_sym): Remove 4th parameter.
11728         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11729         (sparc_expand_prologue): Do not call load_got_register here.
11730         (sparc_flat_expand_prologue): Likewise.
11731         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11732         (sparc_use_pseudo_pic_reg): New function.
11733         (sparc_init_pic_reg): Likewise.
11734         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11735         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11737 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11739         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11740         Add item for branch_cost.
11742 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11744         PR rtl-optimization/83565
11745         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11746         not extend the result to a larger mode for rotate operations.
11747         (num_sign_bit_copies1): Likewise.
11749 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11751         PR target/40411
11752         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11753         -symbolic.
11754         Use values-Xc.o for -pedantic.
11755         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11757 2018-01-12  Martin Liska  <mliska@suse.cz>
11759         PR ipa/83054
11760         * ipa-devirt.c (final_warning_record::grow_type_warnings):
11761         New function.
11762         (possible_polymorphic_call_targets): Use it.
11763         (ipa_devirt): Likewise.
11765 2018-01-12  Martin Liska  <mliska@suse.cz>
11767         * profile-count.h (enum profile_quality): Use 0 as invalid
11768         enum value of profile_quality.
11770 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11772         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11773         -mext-string options.
11775 2018-01-12  Richard Biener  <rguenther@suse.de>
11777         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11778         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11779         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11780         Likewise.
11781         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11783 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11785         * configure.ac (--with-long-double-format): Add support for the
11786         configuration option to change the default long double format on
11787         PowerPC systems.
11788         * config.gcc (powerpc*-linux*-*): Likewise.
11789         * configure: Regenerate.
11790         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11791         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11792         used without modification.
11794 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11796         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11797         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11798         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11799         MISC_BUILTIN_SPEC_BARRIER.
11800         (rs6000_init_builtins): Likewise.
11801         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11802         enum value.
11803         (speculation_barrier): New define_insn.
11804         * doc/extend.texi: Document __builtin_speculation_barrier.
11806 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11808         PR target/83203
11809         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
11810         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
11811         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
11812         iterators.
11813         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
11814         integral modes instead of "ss" and "sd".
11815         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
11816         vectors with 32-bit and 64-bit elements.
11817         (vecdupssescalarmodesuffix): New mode attribute.
11818         (vec_dup<mode>): Use it.
11820 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
11822         PR target/83330
11823         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
11824         frame if argument is passed on stack.
11826 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11828         PR target/82682
11829         * ree.c (combine_reaching_defs): Optimize also
11830         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
11831         reg2=any_extend(exp); reg1=reg2;, formatting fix.
11833 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11835         PR middle-end/83189
11836         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
11838 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
11840         PR middle-end/83718
11841         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
11842         after they are computed.
11844 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
11846         PR tree-optimization/83695
11847         * gimple-loop-linterchange.cc
11848         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
11849         reset cached scev information after interchange.
11850         (pass_linterchange::execute): Remove call to scev_reset_htab.
11852 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11854         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
11855         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
11856         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
11857         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
11858         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
11859         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
11860         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
11861         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
11862         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
11863         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
11864         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
11865         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
11866         (V_lane_reg): Likewise.
11867         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
11868         New define_expand.
11869         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
11870         (vfmal_lane_low<mode>_intrinsic,
11871         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
11872         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
11873         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
11874         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
11875         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
11876         vfmsl_lane_high<mode>_intrinsic): New define_insns.
11878 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11880         * config/arm/arm-cpus.in (fp16fml): New feature.
11881         (ALL_SIMD): Add fp16fml.
11882         (armv8.2-a): Add fp16fml as an option.
11883         (armv8.3-a): Likewise.
11884         (armv8.4-a): Add fp16fml as part of fp16.
11885         * config/arm/arm.h (TARGET_FP16FML): Define.
11886         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
11887         when appropriate.
11888         * config/arm/arm-modes.def (V2HF): Define.
11889         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
11890         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
11891         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
11892         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
11893         vfmsl_low, vfmsl_high): New set of builtins.
11894         * config/arm/iterators.md (PLUSMINUS): New code iterator.
11895         (vfml_op): New code attribute.
11896         (VFMLHALVES): New int iterator.
11897         (VFML, VFMLSEL): New mode attributes.
11898         (V_reg): Define mapping for V2HF.
11899         (V_hi, V_lo): New mode attributes.
11900         (VF_constraint): Likewise.
11901         (vfml_half, vfml_half_selector): New int attributes.
11902         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
11903         define_expand.
11904         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
11905         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
11906         New define_insn.
11907         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
11908         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
11909         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
11910         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
11911         documentation.
11912         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
11913         Document new effective target and option set.
11915 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11917         * config/arm/arm-cpus.in (armv8_4): New feature.
11918         (ARMv8_4a): New fgroup.
11919         (armv8.4-a): New arch.
11920         * config/arm/arm-tables.opt: Regenerate.
11921         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
11922         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
11923         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
11924         Add matching rules for -march=armv8.4-a and extensions.
11925         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
11927 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
11929         PR target/81821
11930         * config/rx/rx.md (BW): New mode attribute.
11931         (sync_lock_test_and_setsi): Add mode suffix to insn output.
11933 2018-01-11  Richard Biener  <rguenther@suse.de>
11935         PR tree-optimization/83435
11936         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
11937         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
11938         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
11940 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11941             Alan Hayward  <alan.hayward@arm.com>
11942             David Sherwood  <david.sherwood@arm.com>
11944         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
11945         field.
11946         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
11947         (aarch64_print_address_internal): Use it to check for a zero offset.
11949 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
11950             Alan Hayward  <alan.hayward@arm.com>
11951             David Sherwood  <david.sherwood@arm.com>
11953         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
11954         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
11955         Return a poly_int64 rather than a HOST_WIDE_INT.
11956         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
11957         rather than a HOST_WIDE_INT.
11958         * config/aarch64/aarch64.h (aarch64_frame): Protect with
11959         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
11960         hard_fp_offset, frame_size, initial_adjust, callee_offset and
11961         final_offset from HOST_WIDE_INT to poly_int64.
11962         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
11963         to_constant when getting the number of units in an Advanced SIMD
11964         mode.
11965         (aarch64_builtin_vectorized_function): Check for a constant number
11966         of units.
11967         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
11968         GET_MODE_SIZE.
11969         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
11970         attribute instead of GET_MODE_NUNITS.
11971         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
11972         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
11973         GET_MODE_SIZE for fixed-size registers.
11974         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
11975         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
11976         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
11977         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
11978         (aarch64_print_operand, aarch64_print_address_internal)
11979         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
11980         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
11981         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
11982         Handle polynomial GET_MODE_SIZE.
11983         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
11984         wider than SImode without modification.
11985         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
11986         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
11987         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
11988         passing and returning SVE modes.
11989         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
11990         rather than GEN_INT.
11991         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
11992         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
11993         (aarch64_allocate_and_probe_stack_space): Likewise.
11994         (aarch64_layout_frame): Cope with polynomial offsets.
11995         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
11996         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
11997         polynomial offsets.
11998         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
11999         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
12000         poly_int64 rather than a HOST_WIDE_INT.
12001         (aarch64_get_separate_components, aarch64_process_components)
12002         (aarch64_expand_prologue, aarch64_expand_epilogue)
12003         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
12004         (aarch64_anchor_offset): New function, split out from...
12005         (aarch64_legitimize_address): ...here.
12006         (aarch64_builtin_vectorization_cost): Handle polynomial
12007         TYPE_VECTOR_SUBPARTS.
12008         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
12009         GET_MODE_NUNITS.
12010         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
12011         number of elements from the PARALLEL rather than the mode.
12012         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
12013         rather than GET_MODE_BITSIZE.
12014         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
12015         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
12016         (aarch64_expand_vec_perm_const_1): Handle polynomial
12017         d->perm.length () and d->perm elements.
12018         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
12019         Apply to_constant to d->perm elements.
12020         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
12021         polynomial CONST_VECTOR_NUNITS.
12022         (aarch64_move_pointer): Take amount as a poly_int64 rather
12023         than an int.
12024         (aarch64_progress_pointer): Avoid temporary variable.
12025         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
12026         the mode attribute instead of GET_MODE.
12028 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12029             Alan Hayward  <alan.hayward@arm.com>
12030             David Sherwood  <david.sherwood@arm.com>
12032         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
12033         x exists before using it.
12034         (aarch64_add_constant_internal): Rename to...
12035         (aarch64_add_offset_1): ...this.  Replace regnum with separate
12036         src and dest rtxes.  Handle the case in which they're different,
12037         including when the offset is zero.  Replace scratchreg with an rtx.
12038         Use 2 additions if there is no spare register into which we can
12039         move a 16-bit constant.
12040         (aarch64_add_constant): Delete.
12041         (aarch64_add_offset): Replace reg with separate src and dest
12042         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
12043         Use aarch64_add_offset_1.
12044         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
12045         an rtx rather than an int.  Take the delta as a poly_int64
12046         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
12047         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
12048         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
12049         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
12050         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
12051         and aarch64_add_sp.
12052         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
12053         aarch64_add_constant.
12055 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12057         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
12058         Use scalar_float_mode.
12060 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12062         * config/aarch64/aarch64-simd.md
12063         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
12064         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
12065         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
12066         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
12067         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
12068         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
12069         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
12070         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
12071         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
12072         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
12074 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12076         PR target/83514
12077         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
12078         targ_options->x_arm_arch_string is non NULL.
12080 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
12082         * config/aarch64/aarch64.h
12083         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
12085 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
12087         PR target/82096
12088         * expmed.c (emit_store_flag_force): Swap if const op0
12089         and change VOIDmode to mode of op0.
12091 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12093         PR rtl-optimization/83761
12094         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
12095         than bytes to mode_for_size.
12097 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12099         PR middle-end/83189
12100         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
12101         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
12102         profile.
12104 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12106         PR middle-end/83575
12107         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
12108         when in layout mode.
12109         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
12110         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
12111         partition fixup.
12113 2018-01-10  Michael Collison  <michael.collison@arm.com>
12115         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
12116         * config/aarch64/aarch64-option-extension.def: Add
12117         AARCH64_OPT_EXTENSION of 'fp16fml'.
12118         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12119         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
12120         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
12121         * config/aarch64/constraints.md (Ui7): New constraint.
12122         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
12123         (VFMLA_SEL_W): Ditto.
12124         (f16quad): Ditto.
12125         (f16mac1): Ditto.
12126         (VFMLA16_LOW): New int iterator.
12127         (VFMLA16_HIGH): Ditto.
12128         (UNSPEC_FMLAL): New unspec.
12129         (UNSPEC_FMLSL): Ditto.
12130         (UNSPEC_FMLAL2): Ditto.
12131         (UNSPEC_FMLSL2): Ditto.
12132         (f16mac): New code attribute.
12133         * config/aarch64/aarch64-simd-builtins.def
12134         (aarch64_fmlal_lowv2sf): Ditto.
12135         (aarch64_fmlsl_lowv2sf): Ditto.
12136         (aarch64_fmlalq_lowv4sf): Ditto.
12137         (aarch64_fmlslq_lowv4sf): Ditto.
12138         (aarch64_fmlal_highv2sf): Ditto.
12139         (aarch64_fmlsl_highv2sf): Ditto.
12140         (aarch64_fmlalq_highv4sf): Ditto.
12141         (aarch64_fmlslq_highv4sf): Ditto.
12142         (aarch64_fmlal_lane_lowv2sf): Ditto.
12143         (aarch64_fmlsl_lane_lowv2sf): Ditto.
12144         (aarch64_fmlal_laneq_lowv2sf): Ditto.
12145         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
12146         (aarch64_fmlalq_lane_lowv4sf): Ditto.
12147         (aarch64_fmlsl_lane_lowv4sf): Ditto.
12148         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
12149         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
12150         (aarch64_fmlal_lane_highv2sf): Ditto.
12151         (aarch64_fmlsl_lane_highv2sf): Ditto.
12152         (aarch64_fmlal_laneq_highv2sf): Ditto.
12153         (aarch64_fmlsl_laneq_highv2sf): Ditto.
12154         (aarch64_fmlalq_lane_highv4sf): Ditto.
12155         (aarch64_fmlsl_lane_highv4sf): Ditto.
12156         (aarch64_fmlalq_laneq_highv4sf): Ditto.
12157         (aarch64_fmlsl_laneq_highv4sf): Ditto.
12158         * config/aarch64/aarch64-simd.md:
12159         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
12160         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12161         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
12162         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12163         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
12164         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
12165         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
12166         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
12167         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
12168         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
12169         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
12170         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
12171         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
12172         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
12173         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
12174         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
12175         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
12176         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
12177         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
12178         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
12179         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
12180         (vfmlsl_low_u32): Ditto.
12181         (vfmlalq_low_u32): Ditto.
12182         (vfmlslq_low_u32): Ditto.
12183         (vfmlal_high_u32): Ditto.
12184         (vfmlsl_high_u32): Ditto.
12185         (vfmlalq_high_u32): Ditto.
12186         (vfmlslq_high_u32): Ditto.
12187         (vfmlal_lane_low_u32): Ditto.
12188         (vfmlsl_lane_low_u32): Ditto.
12189         (vfmlal_laneq_low_u32): Ditto.
12190         (vfmlsl_laneq_low_u32): Ditto.
12191         (vfmlalq_lane_low_u32): Ditto.
12192         (vfmlslq_lane_low_u32): Ditto.
12193         (vfmlalq_laneq_low_u32): Ditto.
12194         (vfmlslq_laneq_low_u32): Ditto.
12195         (vfmlal_lane_high_u32): Ditto.
12196         (vfmlsl_lane_high_u32): Ditto.
12197         (vfmlal_laneq_high_u32): Ditto.
12198         (vfmlsl_laneq_high_u32): Ditto.
12199         (vfmlalq_lane_high_u32): Ditto.
12200         (vfmlslq_lane_high_u32): Ditto.
12201         (vfmlalq_laneq_high_u32): Ditto.
12202         (vfmlslq_laneq_high_u32): Ditto.
12203         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
12204         (AARCH64_FL_FOR_ARCH8_4): New.
12205         (AARCH64_ISA_F16FML): New ISA flag.
12206         (TARGET_F16FML): New feature flag for fp16fml.
12207         (doc/invoke.texi): Document new fp16fml option.
12209 2018-01-10  Michael Collison  <michael.collison@arm.com>
12211         * config/aarch64/aarch64-builtins.c:
12212         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
12213         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12214         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
12215         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
12216         (AARCH64_ISA_SHA3): New ISA flag.
12217         (TARGET_SHA3): New feature flag for sha3.
12218         * config/aarch64/iterators.md (sha512_op): New int attribute.
12219         (CRYPTO_SHA512): New int iterator.
12220         (UNSPEC_SHA512H): New unspec.
12221         (UNSPEC_SHA512H2): Ditto.
12222         (UNSPEC_SHA512SU0): Ditto.
12223         (UNSPEC_SHA512SU1): Ditto.
12224         * config/aarch64/aarch64-simd-builtins.def
12225         (aarch64_crypto_sha512hqv2di): New builtin.
12226         (aarch64_crypto_sha512h2qv2di): Ditto.
12227         (aarch64_crypto_sha512su0qv2di): Ditto.
12228         (aarch64_crypto_sha512su1qv2di): Ditto.
12229         (aarch64_eor3qv8hi): Ditto.
12230         (aarch64_rax1qv2di): Ditto.
12231         (aarch64_xarqv2di): Ditto.
12232         (aarch64_bcaxqv8hi): Ditto.
12233         * config/aarch64/aarch64-simd.md:
12234         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
12235         (aarch64_crypto_sha512su0qv2di): Ditto.
12236         (aarch64_crypto_sha512su1qv2di): Ditto.
12237         (aarch64_eor3qv8hi): Ditto.
12238         (aarch64_rax1qv2di): Ditto.
12239         (aarch64_xarqv2di): Ditto.
12240         (aarch64_bcaxqv8hi): Ditto.
12241         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
12242         (vsha512h2q_u64): Ditto.
12243         (vsha512su0q_u64): Ditto.
12244         (vsha512su1q_u64): Ditto.
12245         (veor3q_u16): Ditto.
12246         (vrax1q_u64): Ditto.
12247         (vxarq_u64): Ditto.
12248         (vbcaxq_u16): Ditto.
12249         * config/arm/types.md (crypto_sha512): New type attribute.
12250         (crypto_sha3): Ditto.
12251         (doc/invoke.texi): Document new sha3 option.
12253 2018-01-10  Michael Collison  <michael.collison@arm.com>
12255         * config/aarch64/aarch64-builtins.c:
12256         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12257         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12258         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12259         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12260         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12261         (AARCH64_ISA_SM4): New ISA flag.
12262         (TARGET_SM4): New feature flag for sm4.
12263         * config/aarch64/aarch64-simd-builtins.def
12264         (aarch64_sm3ss1qv4si): Ditto.
12265         (aarch64_sm3tt1aq4si): Ditto.
12266         (aarch64_sm3tt1bq4si): Ditto.
12267         (aarch64_sm3tt2aq4si): Ditto.
12268         (aarch64_sm3tt2bq4si): Ditto.
12269         (aarch64_sm3partw1qv4si): Ditto.
12270         (aarch64_sm3partw2qv4si): Ditto.
12271         (aarch64_sm4eqv4si): Ditto.
12272         (aarch64_sm4ekeyqv4si): Ditto.
12273         * config/aarch64/aarch64-simd.md:
12274         (aarch64_sm3ss1qv4si): Ditto.
12275         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12276         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12277         (aarch64_sm4eqv4si): Ditto.
12278         (aarch64_sm4ekeyqv4si): Ditto.
12279         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12280         (sm3part_op): Ditto.
12281         (CRYPTO_SM3TT): Ditto.
12282         (CRYPTO_SM3PART): Ditto.
12283         (UNSPEC_SM3SS1): New unspec.
12284         (UNSPEC_SM3TT1A): Ditto.
12285         (UNSPEC_SM3TT1B): Ditto.
12286         (UNSPEC_SM3TT2A): Ditto.
12287         (UNSPEC_SM3TT2B): Ditto.
12288         (UNSPEC_SM3PARTW1): Ditto.
12289         (UNSPEC_SM3PARTW2): Ditto.
12290         (UNSPEC_SM4E): Ditto.
12291         (UNSPEC_SM4EKEY): Ditto.
12292         * config/aarch64/constraints.md (Ui2): New constraint.
12293         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12294         * config/arm/types.md (crypto_sm3): New type attribute.
12295         (crypto_sm4): Ditto.
12296         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12297         (vsm3tt1aq_u32): Ditto.
12298         (vsm3tt1bq_u32): Ditto.
12299         (vsm3tt2aq_u32): Ditto.
12300         (vsm3tt2bq_u32): Ditto.
12301         (vsm3partw1q_u32): Ditto.
12302         (vsm3partw2q_u32): Ditto.
12303         (vsm4eq_u32): Ditto.
12304         (vsm4ekeyq_u32): Ditto.
12305         (doc/invoke.texi): Document new sm4 option.
12307 2018-01-10  Michael Collison  <michael.collison@arm.com>
12309         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
12310         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
12311         (AARCH64_FL_FOR_ARCH8_4): New.
12312         (AARCH64_FL_V8_4): New flag.
12313         (doc/invoke.texi): Document new armv8.4-a option.
12315 2018-01-10  Michael Collison  <michael.collison@arm.com>
12317         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12318         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
12319         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
12320         * config/aarch64/aarch64-option-extension.def: Add
12321         AARCH64_OPT_EXTENSION of 'sha2'.
12322         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
12323         (crypto): Disable sha2 and aes if crypto disabled.
12324         (crypto): Enable aes and sha2 if enabled.
12325         (simd): Disable sha2 and aes if simd disabled.
12326         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
12327         New flags.
12328         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
12329         (TARGET_SHA2): New feature flag for sha2.
12330         (TARGET_AES): New feature flag for aes.
12331         * config/aarch64/aarch64-simd.md:
12332         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
12333         conditional on TARGET_AES.
12334         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
12335         (aarch64_crypto_sha1hsi): Make pattern conditional
12336         on TARGET_SHA2.
12337         (aarch64_crypto_sha1hv4si): Ditto.
12338         (aarch64_be_crypto_sha1hv4si): Ditto.
12339         (aarch64_crypto_sha1su1v4si): Ditto.
12340         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
12341         (aarch64_crypto_sha1su0v4si): Ditto.
12342         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
12343         (aarch64_crypto_sha256su0v4si): Ditto.
12344         (aarch64_crypto_sha256su1v4si): Ditto.
12345         (doc/invoke.texi): Document new aes and sha2 options.
12347 2018-01-10  Martin Sebor  <msebor@redhat.com>
12349         PR tree-optimization/83781
12350         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
12351         as string arrays.
12353 2018-01-11  Martin Sebor  <msebor@gmail.com>
12354             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12356         PR tree-optimization/83501
12357         PR tree-optimization/81703
12359         * tree-ssa-strlen.c (get_string_cst): Rename...
12360         (get_string_len): ...to this.  Handle global constants.
12361         (handle_char_store): Adjust.
12363 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
12364             Jim Wilson  <jimw@sifive.com>
12366         * config/riscv/riscv-protos.h (riscv_output_return): New.
12367         * config/riscv/riscv.c (struct machine_function): New naked_p field.
12368         (riscv_attribute_table, riscv_output_return),
12369         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12370         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12371         (riscv_compute_frame_info): Only compute frame->mask if not a naked
12372         function.
12373         (riscv_expand_prologue): Add early return for naked function.
12374         (riscv_expand_epilogue): Likewise.
12375         (riscv_function_ok_for_sibcall): Return false for naked function.
12376         (riscv_set_current_function): New.
12377         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12378         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12379         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12380         * doc/extend.texi (RISC-V Function Attributes): New.
12382 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12384         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12385         check for 128-bit long double before checking TCmode.
12386         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12387         128-bit long doubles before checking TFmode or TCmode.
12388         (FLOAT128_IBM_P): Likewise.
12390 2018-01-10  Martin Sebor  <msebor@redhat.com>
12392         PR tree-optimization/83671
12393         * builtins.c (c_strlen): Unconditionally return zero for the empty
12394         string.
12395         Use -Warray-bounds for warnings.
12396         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12397         for non-constant array indices with COMPONENT_REF, arrays of
12398         arrays, and pointers to arrays.
12399         (gimple_fold_builtin_strlen): Determine and set length range for
12400         non-constant character arrays.
12402 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
12404         PR middle-end/81897
12405         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12406         empty blocks.
12408 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
12410         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12412 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12414         PR target/83399
12415         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12416         VECTOR_MEM_ALTIVEC_OR_VSX_P.
12417         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12418         indexed_or_indirect_operand predicate.
12419         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12420         (*vsx_le_perm_load_v8hi): Likewise.
12421         (*vsx_le_perm_load_v16qi): Likewise.
12422         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12423         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12424         (*vsx_le_perm_store_v8hi): Likewise.
12425         (*vsx_le_perm_store_v16qi): Likewise.
12426         (eight unnamed splitters): Likewise.
12428 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12430         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12431         * config/rs6000/emmintrin.h: Likewise.
12432         * config/rs6000/mmintrin.h: Likewise.
12433         * config/rs6000/xmmintrin.h: Likewise.
12435 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
12437         PR c++/43486
12438         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12439         "public_flag".
12440         * tree.c (tree_nop_conversion): Return true for location wrapper
12441         nodes.
12442         (maybe_wrap_with_location): New function.
12443         (selftest::check_strip_nops): New function.
12444         (selftest::test_location_wrappers): New function.
12445         (selftest::tree_c_tests): Call it.
12446         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12447         (maybe_wrap_with_location): New decl.
12448         (EXPR_LOCATION_WRAPPER_P): New macro.
12449         (location_wrapper_p): New inline function.
12450         (tree_strip_any_location_wrapper): New inline function.
12452 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
12454         PR target/83735
12455         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12456         stack_realign_offset for the largest alignment of stack slot
12457         actually used.
12458         (ix86_find_max_used_stack_alignment): New function.
12459         (ix86_finalize_stack_frame_flags): Use it.  Set
12460         max_used_stack_alignment if we don't realign stack.
12461         * config/i386/i386.h (machine_function): Add
12462         max_used_stack_alignment.
12464 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
12466         * config/arm/arm.opt (-mbranch-cost): New option.
12467         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12468         account.
12470 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
12472         PR target/83629
12473         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12474         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12476 2018-01-10  Richard Biener  <rguenther@suse.de>
12478         PR debug/83765
12479         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12480         early out so it also covers the case where we have a non-NULL
12481         origin.
12483 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12485         PR tree-optimization/83753
12486         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12487         for non-strided grouped accesses if the number of elements is 1.
12489 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12491         PR target/81616
12492         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12493         * i386.h (TARGET_USE_GATHER): Define.
12494         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12496 2018-01-10  Martin Liska  <mliska@suse.cz>
12498         PR bootstrap/82831
12499         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12500         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12501         partitioning.
12502         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12503         CLEANUP_NO_PARTITIONING is not set.
12505 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12507         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12508         for vectors, as a partial revert of r254296.
12509         * rtl.h (const_vec_p): Delete.
12510         (const_vec_duplicate_p): Don't test for vector CONSTs.
12511         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12512         * expmed.c (make_tree): Likewise.
12514         Revert:
12515         * common.md (E, F): Use CONSTANT_P instead of checking for
12516         CONST_VECTOR.
12517         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12518         checking for CONST_VECTOR.
12520 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12522         PR middle-end/83575
12523         * predict.c (force_edge_cold): Handle in more sane way edges
12524         with no prediction.
12526 2018-01-09  Carl Love  <cel@us.ibm.com>
12528         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12529         V4SI, V4SF types.
12530         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12531         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12532         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12533         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12534         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12535         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12536         * config/rs6000/rs6000-protos.h: Add extern defition for
12537         rs6000_generate_float2_double_code.
12538         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12539         function.
12540         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12541         (float2_v2df): Add define_expand.
12543 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12545         PR target/83628
12546         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12547         op_mode in the force_to_mode call.
12549 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12551         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12552         instead of checking each element individually.
12553         (aarch64_evpc_uzp): Likewise.
12554         (aarch64_evpc_zip): Likewise.
12555         (aarch64_evpc_ext): Likewise.
12556         (aarch64_evpc_rev): Likewise.
12557         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12558         instead of checking each element individually.  Return true without
12559         generating rtl if
12560         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12561         whether all selected elements come from the same input, instead of
12562         checking each element individually.  Remove calls to gen_rtx_REG,
12563         start_sequence and end_sequence and instead assert that no rtl is
12564         generated.
12566 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12568         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12569         order of HIGH and CONST checks.
12571 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12573         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12574         if the destination isn't an SSA_NAME.
12576 2018-01-09  Richard Biener  <rguenther@suse.de>
12578         PR tree-optimization/83668
12579         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12580         move prologue...
12581         (canonicalize_loop_form): ... here, renamed from ...
12582         (canonicalize_loop_closed_ssa_form): ... this and amended to
12583         swap successor edges for loop exit blocks to make us use
12584         the RPO order we need for initial schedule generation.
12586 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12588         PR tree-optimization/64811
12589         * match.pd: When optimizing comparisons with Inf, avoid
12590         introducing or losing exceptions from comparisons with NaN.
12592 2018-01-09  Martin Liska  <mliska@suse.cz>
12594         PR sanitizer/82517
12595         * asan.c (shadow_mem_size): Add gcc_assert.
12597 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12599         Don't save registers in main().
12601         PR target/83738
12602         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12603         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12604         * config/avr/avr.c (avr_set_current_function): Don't error if
12605         naked, OS_task or OS_main are specified at the same time.
12606         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12607         OS_main.
12608         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12609         attribute.
12610         * common/config/avr/avr-common.c (avr_option_optimization_table):
12611         Switch on -mmain-is-OS_task for optimizing compilations.
12613 2018-01-09  Richard Biener  <rguenther@suse.de>
12615         PR tree-optimization/83572
12616         * graphite.c: Include cfganal.h.
12617         (graphite_transform_loops): Connect infinite loops to exit
12618         and remove fake edges at the end.
12620 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12622         * ipa-inline.c (edge_badness): Revert accidental checkin.
12624 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12626         PR ipa/80763
12627         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12628         symbols; not inline clones.
12630 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12632         PR target/83507
12633         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12634         hard registers.  Formatting fixes.
12636         PR preprocessor/83722
12637         * gcc.c (try_generate_repro): Pass
12638         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12639         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12640         do_report_bug.
12642 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12643             Kito Cheng  <kito.cheng@gmail.com>
12645         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12646         (riscv_leaf_function_p): Delete.
12647         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12649 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12651         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12652         function.
12653         (do_ifelse): New function.
12654         (do_isel): New function.
12655         (do_sub3): New function.
12656         (do_add3): New function.
12657         (do_load_mask_compare): New function.
12658         (do_overlap_load_compare): New function.
12659         (expand_compare_loop): New function.
12660         (expand_block_compare): Call expand_compare_loop() when appropriate.
12661         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12662         option description.
12663         (-mblock-compare-inline-loop-limit): New option.
12665 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12667         PR target/83677
12668         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12669         Reverse order of second and third operands in first alternative.
12670         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12671         of first and second elements in UNSPEC_VPERMR vector.
12672         (altivec_expand_vec_perm_le): Likewise.
12674 2018-01-08  Jeff Law  <law@redhat.com>
12676         PR rtl-optimizatin/81308
12677         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12678         (process_switch): If group_case_labels makes a change, then set
12679         cfg_altered.
12680         (pass_convert_switch::execute): If a switch is converted, then
12681         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12683         PR rtl-optimization/81308
12684         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12685         splitting insns.
12687 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12689         PR target/83663 - Revert r255946
12690         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12691         generation for cases where splatting a value is not useful.
12692         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12693         across a vec_duplicate and a paradoxical subreg forming a vector
12694         mode to a vec_concat.
12696 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12698         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12699         -march=armv8.3-a variants.
12700         * config/arm/t-multilib: Likewise.
12701         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12703 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12705         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12706         to generate rtl.
12707         (cceq_ior_compare_complement): Give it a name so I can use it, and
12708         change boolean_or_operator predicate to boolean_operator so it can
12709         be used to generate a crand.
12710         (eqne): New code iterator.
12711         (bd/bd_neg): New code_attrs.
12712         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12713         a single define_insn.
12714         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12715         decrement (bdnzt/bdnzf/bdzt/bdzf).
12716         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12717         with the new names of the branch decrement patterns, and added the
12718         names of the branch decrement conditional patterns.
12720 2018-01-08  Richard Biener  <rguenther@suse.de>
12722         PR tree-optimization/83563
12723         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12724         cache.
12726 2018-01-08  Richard Biener  <rguenther@suse.de>
12728         PR middle-end/83713
12729         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12731 2018-01-08  Richard Biener  <rguenther@suse.de>
12733         PR tree-optimization/83685
12734         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12735         references to abnormals.
12737 2018-01-08  Richard Biener  <rguenther@suse.de>
12739         PR lto/83719
12740         * dwarf2out.c (output_indirect_strings): Handle empty
12741         skeleton_debug_str_hash.
12742         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12744 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12746         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12747         (emit_store_direct): Likewise.
12748         (arc_trampoline_adjust_address): Likewise.
12749         (arc_asm_trampoline_template): New function.
12750         (arc_initialize_trampoline): Use asm_trampoline_template.
12751         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12752         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12753         * config/arc/arc.md (flush_icache): Delete pattern.
12755 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12757         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12758         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12759         munaligned-access.
12761 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12763         PR target/83681
12764         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12765         by not USED_FOR_TARGET.
12766         (make_pass_resolve_sw_modes): Likewise.
12768 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12770         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12771         USED_FOR_TARGET.
12773 2018-01-08  Richard Biener  <rguenther@suse.de>
12775         PR middle-end/83580
12776         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12778 2018-01-08  Richard Biener  <rguenther@suse.de>
12780         PR middle-end/83517
12781         * match.pd ((t * 2) / 2) -> t): Add missing :c.
12783 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
12785         PR middle-end/81897
12786         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12787         basic blocks with a small number of successors.
12788         (convert_control_dep_chain_into_preds): Improve handling of
12789         forwarder blocks.
12790         (dump_predicates): Split apart into...
12791         (dump_pred_chain): ...here...
12792         (dump_pred_info): ...and here.
12793         (can_one_predicate_be_invalidated_p): Add debugging printfs.
12794         (can_chain_union_be_invalidated_p): Improve check for invalidation
12795         of paths.
12796         (uninit_uses_cannot_happen): Avoid unnecessary if
12797         convert_control_dep_chain_into_preds yielded nothing.
12799 2018-01-06  Martin Sebor  <msebor@redhat.com>
12801         PR tree-optimization/83640
12802         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
12803         subtracting negative offset from size.
12804         (builtin_access::overlap): Adjust offset bounds of the access to fall
12805         within the size of the object if possible.
12807 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
12809         PR rtl-optimization/83699
12810         * expmed.c (extract_bit_field_1): Restrict the vector usage of
12811         extract_bit_field_as_subreg to cases in which the extracted
12812         value is also a vector.
12814         * lra-constraints.c (process_alt_operands): Test for the equivalence
12815         substitutions when detecting a possible reload cycle.
12817 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
12819         PR debug/83480
12820         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
12821         by default if flag_selective_schedling{,2}.  Formatting fixes.
12823         PR rtl-optimization/83682
12824         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
12825         if it has non-VECTOR_MODE element mode.
12826         (vec_duplicate_p): Likewise.
12828         PR middle-end/83694
12829         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
12830         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
12832 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12834         PR target/83604
12835         * config/i386/i386-builtin.def
12836         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
12837         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
12838         Require also OPTION_MASK_ISA_AVX512F in addition to
12839         OPTION_MASK_ISA_GFNI.
12840         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
12841         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
12842         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
12843         to OPTION_MASK_ISA_GFNI.
12844         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
12845         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
12846         OPTION_MASK_ISA_AVX512BW.
12847         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
12848         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
12849         addition to OPTION_MASK_ISA_GFNI.
12850         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
12851         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
12852         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
12853         to OPTION_MASK_ISA_GFNI.
12854         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
12855         a requirement for all ISAs rather than any of them with a few
12856         exceptions.
12857         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
12858         processing.
12859         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
12860         bitmasks to be enabled with 3 exceptions, instead of requiring any
12861         enabled ISA with lots of exceptions.
12862         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
12863         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
12864         Change avx512bw in isa attribute to avx512f.
12865         * config/i386/sgxintrin.h: Add license boilerplate.
12866         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
12867         to __AVX512F__ and __AVX512VL to __AVX512VL__.
12868         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
12869         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
12870         defined.
12871         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
12872         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
12873         temporarily sse2 rather than sse if not enabled already.
12875         PR target/83604
12876         * config/i386/sse.md (VI248_VLBW): Rename to ...
12877         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
12878         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
12879         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
12880         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
12881         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
12882         mode iterator instead of VI248_VLBW.
12884 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
12886         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
12887         (record_modified): Skip clobbers; add debug output.
12888         (param_change_prob): Use sreal frequencies.
12890 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12892         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
12893         punt for user-aligned variables.
12895 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
12897         * tree-chrec.c (chrec_contains_symbols): Return true for
12898         POLY_INT_CST.
12900 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
12902         PR target/82439
12903         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
12904         of (x|y) == x for BICS pattern.
12906 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
12908         PR tree-optimization/83605
12909         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
12910         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
12911         can throw.
12913 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12915         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
12916         * config/epiphany/rtems.h: New file.
12918 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12919             Uros Bizjak  <ubizjak@gmail.com>
12921         PR target/83554
12922         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
12923         QIreg_operand instead of register_operand predicate.
12924         * config/i386/i386.c (ix86_rop_should_change_byte_p,
12925         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
12926         comments instead of -fmitigate[-_]rop.
12928 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12930         PR bootstrap/81926
12931         * cgraphunit.c (symbol_table::compile): Switch to text_section
12932         before calling assembly_start debug hook.
12933         * run-rtl-passes.c (run_rtl_passes): Likewise.
12934         Include output.h.
12936 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12938         * tree-vrp.c (extract_range_from_binary_expr_1): Check
12939         range_int_cst_p rather than !symbolic_range_p before calling
12940         extract_range_from_multiplicative_op_1.
12942 2018-01-04  Jeff Law  <law@redhat.com>
12944         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
12945         redundant test in assertion.
12947 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12949         * doc/rtl.texi: Document machine_mode wrapper classes.
12951 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12953         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
12954         using tree_to_uhwi.
12956 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12958         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
12959         the VEC_PERM_EXPR fold to fail.
12961 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12963         PR debug/83585
12964         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
12965         to switched_sections.
12967 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12969         PR target/83680
12970         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
12971         test for d.testing.
12973 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
12975         PR target/83387
12976         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
12977         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
12979 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
12981         PR debug/83666
12982         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
12983         is BLKmode and bitpos not zero or mode change is needed.
12985 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
12987         PR target/83675
12988         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
12989         TARGET_VIS2.
12991 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
12993         PR target/83628
12994         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
12995         instead of MULT rtx.  Update all corresponding splitters.
12996         (*saddl_se): Ditto.
12997         (*ssub<modesuffix>): Ditto.
12998         (*ssubl_se): Ditto.
12999         (*cmp_sadd_di): Update split patterns.
13000         (*cmp_sadd_si): Ditto.
13001         (*cmp_sadd_sidi): Ditto.
13002         (*cmp_ssub_di): Ditto.
13003         (*cmp_ssub_si): Ditto.
13004         (*cmp_ssub_sidi): Ditto.
13005         * config/alpha/predicates.md (const23_operand): New predicate.
13006         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
13007         Look for ASHIFT, not MULT inner operand.
13008         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
13010 2018-01-04  Martin Liska  <mliska@suse.cz>
13012         PR gcov-profile/83669
13013         * gcov.c (output_intermediate_file): Add version to intermediate
13014         gcov file.
13015         * doc/gcov.texi: Document new field 'version' in intermediate
13016         file format. Fix location of '-k' option of gcov command.
13018 2018-01-04  Martin Liska  <mliska@suse.cz>
13020         PR ipa/82352
13021         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
13023 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13025         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
13027 2018-01-03  Martin Sebor  <msebor@redhat.com>
13029         PR tree-optimization/83655
13030         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
13031         checking calls with invalid arguments.
13033 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13035         * tree-vect-stmts.c (vect_get_store_rhs): New function.
13036         (vectorizable_mask_load_store): Delete.
13037         (vectorizable_call): Return false for masked loads and stores.
13038         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
13039         instead of gimple_assign_rhs1.
13040         (vectorizable_load): Handle IFN_MASK_LOAD.
13041         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
13043 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13045         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
13046         split out from..,
13047         (vectorizable_mask_load_store): ...here.
13048         (vectorizable_load): ...and here.
13050 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13052         * tree-vect-stmts.c (vect_build_all_ones_mask)
13053         (vect_build_zero_merge_argument): New functions, split out from...
13054         (vectorizable_load): ...here.
13056 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13058         * tree-vect-stmts.c (vect_check_store_rhs): New function,
13059         split out from...
13060         (vectorizable_mask_load_store): ...here.
13061         (vectorizable_store): ...and here.
13063 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13065         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
13066         split out from...
13067         (vectorizable_mask_load_store): ...here.
13069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13071         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
13072         (vect_model_store_cost): Take a vec_load_store_type instead of a
13073         vect_def_type.
13074         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
13075         (vect_model_store_cost): Take a vec_load_store_type instead of a
13076         vect_def_type.
13077         (vectorizable_mask_load_store): Update accordingly.
13078         (vectorizable_store): Likewise.
13079         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
13081 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13083         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
13084         IFN_MASK_LOAD calls here rather than...
13085         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
13087 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13088             Alan Hayward  <alan.hayward@arm.com>
13089             David Sherwood  <david.sherwood@arm.com>
13091         * expmed.c (extract_bit_field_1): For vector extracts,
13092         fall back to extract_bit_field_as_subreg if vec_extract
13093         isn't available.
13095 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13096             Alan Hayward  <alan.hayward@arm.com>
13097             David Sherwood  <david.sherwood@arm.com>
13099         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
13100         they are variable or constant sized.
13101         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
13102         slots for constant-sized data.
13104 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13105             Alan Hayward  <alan.hayward@arm.com>
13106             David Sherwood  <david.sherwood@arm.com>
13108         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
13109         handling COND_EXPRs with boolean comparisons, try to find a better
13110         basis for the mask type than the boolean itself.
13112 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13114         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
13115         is calculated and how it can be overridden.
13116         * genmodes.c (max_bitsize_mode_any_mode): New variable.
13117         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
13118         if defined.
13119         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
13120         if nonzero.
13122 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13123             Alan Hayward  <alan.hayward@arm.com>
13124             David Sherwood  <david.sherwood@arm.com>
13126         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
13127         Remove the mode argument.
13128         (aarch64_simd_valid_immediate): Remove the mode and inverse
13129         arguments.
13130         * config/aarch64/iterators.md (bitsize): New iterator.
13131         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
13132         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
13133         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
13134         aarch64_simd_valid_immediate.
13135         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
13136         (aarch64_reg_or_bic_imm): Likewise.
13137         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
13138         with an insn_type enum and msl with a modifier_type enum.
13139         Replace element_width with a scalar_mode.  Change the shift
13140         to unsigned int.  Add constructors for scalar_float_mode and
13141         scalar_int_mode elements.
13142         (aarch64_vect_float_const_representable_p): Delete.
13143         (aarch64_can_const_movi_rtx_p)
13144         (aarch64_simd_scalar_immediate_valid_for_move)
13145         (aarch64_simd_make_constant): Update call to
13146         aarch64_simd_valid_immediate.
13147         (aarch64_advsimd_valid_immediate_hs): New function.
13148         (aarch64_advsimd_valid_immediate): Likewise.
13149         (aarch64_simd_valid_immediate): Remove mode and inverse
13150         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
13151         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
13152         and aarch64_float_const_representable_p on the result.
13153         (aarch64_output_simd_mov_immediate): Remove mode argument.
13154         Update call to aarch64_simd_valid_immediate and use of
13155         simd_immediate_info.
13156         (aarch64_output_scalar_simd_mov_immediate): Update call
13157         accordingly.
13159 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13160             Alan Hayward  <alan.hayward@arm.com>
13161             David Sherwood  <david.sherwood@arm.com>
13163         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
13164         (mode_nunits): Likewise CONST_MODE_NUNITS.
13165         * machmode.def (ADJUST_NUNITS): Document.
13166         * genmodes.c (mode_data::need_nunits_adj): New field.
13167         (blank_mode): Update accordingly.
13168         (adj_nunits): New variable.
13169         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
13170         parameter.
13171         (emit_mode_size_inline): Set need_bytesize_adj for all modes
13172         listed in adj_nunits.
13173         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
13174         listed in adj_nunits.  Don't emit case statements for such modes.
13175         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
13176         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
13177         nothing if adj_nunits is nonnull.
13178         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
13179         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
13180         (emit_mode_fbit): Update use of print_maybe_const_decl.
13181         (emit_move_size): Likewise.  Treat the array as non-const
13182         if adj_nunits.
13183         (emit_mode_adjustments): Handle adj_nunits.
13185 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13187         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
13188         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
13189         (VECTOR_MODES): Use it.
13190         (make_vector_modes): Take the prefix as an argument.
13192 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13193             Alan Hayward  <alan.hayward@arm.com>
13194             David Sherwood  <david.sherwood@arm.com>
13196         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
13197         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
13198         for MODE_VECTOR_BOOL.
13199         * machmode.def (VECTOR_BOOL_MODE): Document.
13200         * genmodes.c (VECTOR_BOOL_MODE): New macro.
13201         (make_vector_bool_mode): New function.
13202         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
13203         MODE_VECTOR_BOOL.
13204         * lto-streamer-in.c (lto_input_mode_table): Likewise.
13205         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
13206         Likewise.
13207         * stor-layout.c (int_mode_for_mode): Likewise.
13208         * tree.c (build_vector_type_for_mode): Likewise.
13209         * varasm.c (output_constant_pool_2): Likewise.
13210         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
13211         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
13212         for MODE_VECTOR_BOOL.
13213         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
13214         of mode class checks.
13215         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
13216         instead of a list of mode class checks.
13217         (expand_vector_scalar_condition): Likewise.
13218         (type_for_widest_vector_mode): Handle BImode as an inner mode.
13220 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13221             Alan Hayward  <alan.hayward@arm.com>
13222             David Sherwood  <david.sherwood@arm.com>
13224         * machmode.h (mode_size): Change from unsigned short to
13225         poly_uint16_pod.
13226         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
13227         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13228         or if measurement_type is not polynomial.
13229         (fixed_size_mode::includes_p): Check for constant-sized modes.
13230         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
13231         return a poly_uint16 rather than an unsigned short.
13232         (emit_mode_size): Change the type of mode_size from unsigned short
13233         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
13234         (emit_mode_adjustments): Cope with polynomial vector sizes.
13235         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13236         for GET_MODE_SIZE.
13237         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13238         for GET_MODE_SIZE.
13239         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
13240         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
13241         * caller-save.c (setup_save_areas): Likewise.
13242         (replace_reg_with_saved_mem): Likewise.
13243         * calls.c (emit_library_call_value_1): Likewise.
13244         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
13245         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
13246         (gen_lowpart_for_combine): Likewise.
13247         * convert.c (convert_to_integer_1): Likewise.
13248         * cse.c (equiv_constant, cse_insn): Likewise.
13249         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
13250         (cselib_subst_to_values): Likewise.
13251         * dce.c (word_dce_process_block): Likewise.
13252         * df-problems.c (df_word_lr_mark_ref): Likewise.
13253         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13254         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13255         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13256         (rtl_for_decl_location): Likewise.
13257         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13258         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13259         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13260         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13261         (expand_expr_real_1): Likewise.
13262         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13263         (pad_below): Likewise.
13264         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13265         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13266         * ira.c (get_subreg_tracking_sizes): Likewise.
13267         * ira-build.c (ira_create_allocno_objects): Likewise.
13268         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13269         (ira_sort_regnos_for_alter_reg): Likewise.
13270         * ira-costs.c (record_operand_costs): Likewise.
13271         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13272         (resolve_simple_move): Likewise.
13273         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13274         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13275         (lra_constraints): Likewise.
13276         (CONST_POOL_OK_P): Reject variable-sized modes.
13277         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13278         (add_pseudo_to_slot, lra_spill): Likewise.
13279         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13280         * optabs-query.c (get_best_extraction_insn): Likewise.
13281         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13282         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13283         (expand_mult_highpart, valid_multiword_target_p): Likewise.
13284         * recog.c (offsettable_address_addr_space_p): Likewise.
13285         * regcprop.c (maybe_mode_change): Likewise.
13286         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13287         * regrename.c (build_def_use): Likewise.
13288         * regstat.c (dump_reg_info): Likewise.
13289         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13290         (find_reloads, find_reloads_subreg_address): Likewise.
13291         * reload1.c (eliminate_regs_1): Likewise.
13292         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13293         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13294         (simplify_binary_operation_1, simplify_subreg): Likewise.
13295         * targhooks.c (default_function_arg_padding): Likewise.
13296         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13297         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13298         (verify_gimple_assign_ternary): Likewise.
13299         * tree-inline.c (estimate_move_cost): Likewise.
13300         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13301         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
13302         (get_address_cost_ainc): Likewise.
13303         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
13304         (vect_supportable_dr_alignment): Likewise.
13305         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13306         (vectorizable_reduction): Likewise.
13307         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
13308         (vectorizable_operation, vectorizable_load): Likewise.
13309         * tree.c (build_same_sized_truth_vector_type): Likewise.
13310         * valtrack.c (cleanup_auto_inc_dec): Likewise.
13311         * var-tracking.c (emit_note_insn_var_location): Likewise.
13312         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
13313         (ADDR_VEC_ALIGN): Likewise.
13315 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13316             Alan Hayward  <alan.hayward@arm.com>
13317             David Sherwood  <david.sherwood@arm.com>
13319         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
13320         unsigned short.
13321         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13322         or if measurement_type is polynomial.
13323         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
13324         * combine.c (make_extraction): Likewise.
13325         * dse.c (find_shift_sequence): Likewise.
13326         * dwarf2out.c (mem_loc_descriptor): Likewise.
13327         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
13328         (extract_bit_field, extract_low_bits): Likewise.
13329         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
13330         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
13331         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
13332         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
13333         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13334         * reload.c (find_reloads): Likewise.
13335         * reload1.c (alter_reg): Likewise.
13336         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
13337         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
13338         * tree-if-conv.c (predicate_mem_writes): Likewise.
13339         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13340         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
13341         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13342         * valtrack.c (dead_debug_insert_temp): Likewise.
13343         * varasm.c (mergeable_constant_section): Likewise.
13344         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
13346 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13347             Alan Hayward  <alan.hayward@arm.com>
13348             David Sherwood  <david.sherwood@arm.com>
13350         * expr.c (expand_assignment): Cope with polynomial mode sizes
13351         when assigning to a CONCAT.
13353 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13354             Alan Hayward  <alan.hayward@arm.com>
13355             David Sherwood  <david.sherwood@arm.com>
13357         * machmode.h (mode_precision): Change from unsigned short to
13358         poly_uint16_pod.
13359         (mode_to_precision): Return a poly_uint16 rather than an unsigned
13360         short.
13361         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
13362         or if measurement_type is not polynomial.
13363         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
13364         in which the mode is already known to be a scalar_int_mode.
13365         * genmodes.c (emit_mode_precision): Change the type of mode_precision
13366         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
13367         initializer.
13368         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13369         for GET_MODE_PRECISION.
13370         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13371         for GET_MODE_PRECISION.
13372         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13373         as polynomial.
13374         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13375         (expand_field_assignment, make_extraction): Likewise.
13376         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13377         (get_last_value): Likewise.
13378         * convert.c (convert_to_integer_1): Likewise.
13379         * cse.c (cse_insn): Likewise.
13380         * expr.c (expand_expr_real_1): Likewise.
13381         * lra-constraints.c (simplify_operand_subreg): Likewise.
13382         * optabs-query.c (can_atomic_load_p): Likewise.
13383         * optabs.c (expand_atomic_load): Likewise.
13384         (expand_atomic_store): Likewise.
13385         * ree.c (combine_reaching_defs): Likewise.
13386         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13387         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13388         * tree.h (type_has_mode_precision_p): Likewise.
13389         * ubsan.c (instrument_si_overflow): Likewise.
13391 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13392             Alan Hayward  <alan.hayward@arm.com>
13393             David Sherwood  <david.sherwood@arm.com>
13395         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13396         polynomial numbers of units.
13397         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13398         (valid_vector_subparts_p): New function.
13399         (build_vector_type): Remove temporary shim and take the number
13400         of units as a poly_uint64 rather than an int.
13401         (build_opaque_vector_type): Take the number of units as a
13402         poly_uint64 rather than an int.
13403         * tree.c (build_vector_from_ctor): Handle polynomial
13404         TYPE_VECTOR_SUBPARTS.
13405         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13406         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13407         (build_vector_from_val): If the number of units is variable,
13408         use build_vec_duplicate_cst for constant operands and
13409         VEC_DUPLICATE_EXPR otherwise.
13410         (make_vector_type): Remove temporary is_constant ().
13411         (build_vector_type, build_opaque_vector_type): Take the number of
13412         units as a poly_uint64 rather than an int.
13413         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13414         VECTOR_CST_NELTS.
13415         * cfgexpand.c (expand_debug_expr): Likewise.
13416         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13417         (store_constructor, expand_expr_real_1): Likewise.
13418         (const_scalar_mask_from_tree): Likewise.
13419         * fold-const-call.c (fold_const_reduction): Likewise.
13420         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13421         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13422         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13423         (fold_relational_const): Likewise.
13424         (native_interpret_vector): Likewise.  Change the size from an
13425         int to an unsigned int.
13426         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13427         TYPE_VECTOR_SUBPARTS.
13428         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13429         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13430         duplicating a non-constant operand into a variable-length vector.
13431         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13432         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13433         * ipa-icf.c (sem_variable::equals): Likewise.
13434         * match.pd: Likewise.
13435         * omp-simd-clone.c (simd_clone_subparts): Likewise.
13436         * print-tree.c (print_node): Likewise.
13437         * stor-layout.c (layout_type): Likewise.
13438         * targhooks.c (default_builtin_vectorization_cost): Likewise.
13439         * tree-cfg.c (verify_gimple_comparison): Likewise.
13440         (verify_gimple_assign_binary): Likewise.
13441         (verify_gimple_assign_ternary): Likewise.
13442         (verify_gimple_assign_single): Likewise.
13443         * tree-pretty-print.c (dump_generic_node): Likewise.
13444         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13445         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13446         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13447         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13448         (vect_shift_permute_load_chain): Likewise.
13449         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13450         (expand_vector_condition, optimize_vector_constructor): Likewise.
13451         (lower_vec_perm, get_compute_type): Likewise.
13452         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13453         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13454         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13455         (vect_recog_mask_conversion_pattern): Likewise.
13456         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13457         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13458         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13459         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13460         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13461         (vectorizable_shift, vectorizable_operation, vectorizable_store)
13462         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13463         (supportable_widening_operation): Likewise.
13464         (supportable_narrowing_operation): Likewise.
13465         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13466         Likewise.
13467         * varasm.c (output_constant): 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         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13474         so that both the length == 3 and length != 3 cases set up their
13475         own permute vectors.  Add comments explaining why we know the
13476         number of elements is constant.
13477         (vect_permute_load_chain): Likewise.
13479 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13480             Alan Hayward  <alan.hayward@arm.com>
13481             David Sherwood  <david.sherwood@arm.com>
13483         * machmode.h (mode_nunits): Change from unsigned char to
13484         poly_uint16_pod.
13485         (ONLY_FIXED_SIZE_MODES): New macro.
13486         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13487         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13488         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13489         New typedefs.
13490         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13491         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13492         or if measurement_type is not polynomial.
13493         * genmodes.c (ZERO_COEFFS): New macro.
13494         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13495         poly_uint16.
13496         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13497         Use ZERO_COEFFS when emitting initializers.
13498         * data-streamer.h (bp_pack_poly_value): New function.
13499         (bp_unpack_poly_value): Likewise.
13500         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13501         for GET_MODE_NUNITS.
13502         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13503         for GET_MODE_NUNITS.
13504         * tree.c (make_vector_type): Remove temporary shim and make
13505         the real function take the number of units as a poly_uint64
13506         rather than an int.
13507         (build_vector_type_for_mode): Handle polynomial nunits.
13508         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13509         * emit-rtl.c (const_vec_series_p_1): Likewise.
13510         (gen_rtx_CONST_VECTOR): Likewise.
13511         * fold-const.c (test_vec_duplicate_folding): Likewise.
13512         * genrecog.c (validate_pattern): Likewise.
13513         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13514         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13515         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13516         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13517         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13518         * rtlanal.c (subreg_get_info): Likewise.
13519         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13520         (vect_grouped_load_supported): Likewise.
13521         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13522         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13523         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13524         (simplify_const_unary_operation, simplify_binary_operation_1)
13525         (simplify_const_binary_operation, simplify_ternary_operation)
13526         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13527         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13528         instead of CONST_VECTOR_NUNITS.
13529         * varasm.c (output_constant_pool_2): Likewise.
13530         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13531         explicit-encoded elements in the XVEC for variable-length vectors.
13533 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13535         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13537 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13538             Alan Hayward  <alan.hayward@arm.com>
13539             David Sherwood  <david.sherwood@arm.com>
13541         * coretypes.h (fixed_size_mode): Declare.
13542         (fixed_size_mode_pod): New typedef.
13543         * builtins.h (target_builtins::x_apply_args_mode)
13544         (target_builtins::x_apply_result_mode): Change type to
13545         fixed_size_mode_pod.
13546         * builtins.c (apply_args_size, apply_result_size, result_vector)
13547         (expand_builtin_apply_args_1, expand_builtin_apply)
13548         (expand_builtin_return): Update accordingly.
13550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13552         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13553         * cselib.c (cselib_hash_rtx): Likewise.
13554         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13555         CONST_VECTOR encoding.
13557 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13558             Jeff Law  <law@redhat.com>
13560         PR target/83641
13561         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13562         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13563         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13564         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13566         PR target/83641
13567         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13568         explicitly probe *sp in a noreturn function if there were any callee
13569         register saves or frame pointer is needed.
13571 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13573         PR debug/83621
13574         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13575         BLKmode for ternary, binary or unary expressions.
13577         PR debug/83645
13578         * var-tracking.c (delete_vta_debug_insn): New inline function.
13579         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13580         insns from get_insns () to NULL instead of each bb separately.
13581         Use delete_vta_debug_insn.  No longer static.
13582         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13583         delete_vta_debug_insns callers.
13584         * rtl.h (delete_vta_debug_insns): Declare.
13585         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13586         instead of variable_tracking_main.
13588 2018-01-03  Martin Sebor  <msebor@redhat.com>
13590         PR tree-optimization/83603
13591         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13592         arguments past the endof the argument list in functions declared
13593         without a prototype.
13594         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13595         Avoid checking when arguments are null.
13597 2018-01-03  Martin Sebor  <msebor@redhat.com>
13599         PR c/83559
13600         * doc/extend.texi (attribute const): Fix a typo.
13601         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13602         issuing -Wsuggest-attribute for void functions.
13604 2018-01-03  Martin Sebor  <msebor@redhat.com>
13606         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13607         offset_int::from instead of wide_int::to_shwi.
13608         (maybe_diag_overlap): Remove assertion.
13609         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13610         * gimple-ssa-sprintf.c (format_directive): Same.
13611         (parse_directive): Same.
13612         (sprintf_dom_walker::compute_format_length): Same.
13613         (try_substitute_return_value): Same.
13615 2018-01-03  Jeff Law  <law@redhat.com>
13617         PR middle-end/83654
13618         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13619         non-constant residual for zero at runtime and avoid probing in
13620         that case.  Reorganize code for trailing problem to mirror handling
13621         of the residual.
13623 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13625         PR tree-optimization/83501
13626         * tree-ssa-strlen.c (get_string_cst): New.
13627         (handle_char_store): Call get_string_cst.
13629 2018-01-03  Martin Liska  <mliska@suse.cz>
13631         PR tree-optimization/83593
13632         * tree-ssa-strlen.c: Include tree-cfg.h.
13633         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13634         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13635         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13636         to false.
13637         (strlen_dom_walker::before_dom_children): Call
13638         gimple_purge_dead_eh_edges. Dump tranformation with details
13639         dump flags.
13640         (strlen_dom_walker::before_dom_children): Update call by adding
13641         new argument cleanup_eh.
13642         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13644 2018-01-03  Martin Liska  <mliska@suse.cz>
13646         PR ipa/83549
13647         * cif-code.def (VARIADIC_THUNK): New enum value.
13648         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13649         thunks.
13651 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13653         * sse.md (mov<mode>_internal): Tighten condition for when to use
13654         vmovdqu<ssescalarsize> for TI and OI modes.
13656 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13658         Update copyright years.
13660 2018-01-03  Martin Liska  <mliska@suse.cz>
13662         PR ipa/83594
13663         * ipa-visibility.c (function_and_variable_visibility): Skip
13664         functions with noipa attribure.
13666 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13668         * gcc.c (process_command): Update copyright notice dates.
13669         * gcov-dump.c (print_version): Ditto.
13670         * gcov.c (print_version): Ditto.
13671         * gcov-tool.c (print_version): Ditto.
13672         * gengtype.c (create_file): Ditto.
13673         * doc/cpp.texi: Bump @copying's copyright year.
13674         * doc/cppinternals.texi: Ditto.
13675         * doc/gcc.texi: Ditto.
13676         * doc/gccint.texi: Ditto.
13677         * doc/gcov.texi: Ditto.
13678         * doc/install.texi: Ditto.
13679         * doc/invoke.texi: Ditto.
13681 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13683         * vector-builder.h (vector_builder::m_full_nelts): Change from
13684         unsigned int to poly_uint64.
13685         (vector_builder::full_nelts): Update prototype accordingly.
13686         (vector_builder::new_vector): Likewise.
13687         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13688         (vector_builder::operator ==): Likewise.
13689         (vector_builder::finalize): Likewise.
13690         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13691         Take the number of elements as a poly_uint64 rather than an
13692         unsigned int.
13693         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13694         from unsigned int to poly_uint64.
13695         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13696         (vec_perm_indices::new_vector): Likewise.
13697         (vec_perm_indices::length): Likewise.
13698         (vec_perm_indices::nelts_per_input): Likewise.
13699         (vec_perm_indices::input_nelts): Likewise.
13700         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13701         number of elements per input as a poly_uint64 rather than an
13702         unsigned int.  Use the original encoding for variable-length
13703         vectors, rather than clamping each individual element.
13704         For the second and subsequent elements in each pattern,
13705         clamp the step and base before clamping their sum.
13706         (vec_perm_indices::series_p): Handle polynomial element counts.
13707         (vec_perm_indices::all_in_range_p): Likewise.
13708         (vec_perm_indices_to_tree): Likewise.
13709         (vec_perm_indices_to_rtx): Likewise.
13710         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13711         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13712         (tree_vector_builder::new_binary_operation): Handle polynomial
13713         element counts.  Return false if we need to know the number
13714         of elements at compile time.
13715         * fold-const.c (fold_vec_perm): Punt if the number of elements
13716         isn't known at compile time.
13718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13720         * vec-perm-indices.h (vec_perm_builder): Change element type
13721         from HOST_WIDE_INT to poly_int64.
13722         (vec_perm_indices::element_type): Update accordingly.
13723         (vec_perm_indices::clamp): Handle polynomial element_types.
13724         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13725         (vec_perm_indices::all_in_range_p): Likewise.
13726         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13727         than shwi trees.
13728         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13729         polynomial vec_perm_indices element types.
13730         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13731         * fold-const.c (fold_vec_perm): Likewise.
13732         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13733         * tree-vect-generic.c (lower_vec_perm): Likewise.
13734         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13735         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13736         element type to HOST_WIDE_INT.
13738 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13739             Alan Hayward  <alan.hayward@arm.com>
13740             David Sherwood  <david.sherwood@arm.com>
13742         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13743         rather than an int.  Use plus_constant.
13744         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13745         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13747 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13748             Alan Hayward  <alan.hayward@arm.com>
13749             David Sherwood  <david.sherwood@arm.com>
13751         * calls.c (emit_call_1, expand_call): Change struct_value_size from
13752         a HOST_WIDE_INT to a poly_int64.
13754 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13755             Alan Hayward  <alan.hayward@arm.com>
13756             David Sherwood  <david.sherwood@arm.com>
13758         * calls.c (load_register_parameters): Cope with polynomial
13759         mode sizes.  Require a constant size for BLKmode parameters
13760         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
13761         forces a parameter to be padded at the lsb end in order to
13762         fill a complete number of words, require the parameter size
13763         to be ordered wrt UNITS_PER_WORD.
13765 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13766             Alan Hayward  <alan.hayward@arm.com>
13767             David Sherwood  <david.sherwood@arm.com>
13769         * reload1.c (spill_stack_slot_width): Change element type
13770         from unsigned int to poly_uint64_pod.
13771         (alter_reg): Treat mode sizes as polynomial.
13773 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13774             Alan Hayward  <alan.hayward@arm.com>
13775             David Sherwood  <david.sherwood@arm.com>
13777         * reload.c (complex_word_subreg_p): New function.
13778         (reload_inner_reg_of_subreg, push_reload): Use it.
13780 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13781             Alan Hayward  <alan.hayward@arm.com>
13782             David Sherwood  <david.sherwood@arm.com>
13784         * lra-constraints.c (process_alt_operands): Reject matched
13785         operands whose sizes aren't ordered.
13786         (match_reload): Refer to this check here.
13788 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13789             Alan Hayward  <alan.hayward@arm.com>
13790             David Sherwood  <david.sherwood@arm.com>
13792         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13793         that the mode size is in the set {1, 2, 4, 8, 16}.
13795 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13796             Alan Hayward  <alan.hayward@arm.com>
13797             David Sherwood  <david.sherwood@arm.com>
13799         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13800         Use plus_constant instead of gen_rtx_PLUS.
13802 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13803             Alan Hayward  <alan.hayward@arm.com>
13804             David Sherwood  <david.sherwood@arm.com>
13806         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
13807         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
13808         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
13809         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
13810         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
13811         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
13812         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
13813         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
13814         * config/i386/i386.c (ix86_push_rounding): ...this new function.
13815         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
13816         a poly_int64.
13817         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
13818         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
13819         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
13820         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
13821         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
13822         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
13823         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
13824         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
13825         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
13826         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
13827         function.
13828         * expr.c (emit_move_resolve_push): Treat the input and result
13829         of PUSH_ROUNDING as a poly_int64.
13830         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
13831         (emit_push_insn): Likewise.
13832         * lra-eliminations.c (mark_not_eliminable): Likewise.
13833         * recog.c (push_operand): Likewise.
13834         * reload1.c (elimination_effects): Likewise.
13835         * rtlanal.c (nonzero_bits1): Likewise.
13836         * calls.c (store_one_arg): Likewise.  Require the padding to be
13837         known at compile time.
13839 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13840             Alan Hayward  <alan.hayward@arm.com>
13841             David Sherwood  <david.sherwood@arm.com>
13843         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
13844         Use plus_constant instead of gen_rtx_PLUS.
13846 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13847             Alan Hayward  <alan.hayward@arm.com>
13848             David Sherwood  <david.sherwood@arm.com>
13850         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
13851         rather than an int.
13853 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13854             Alan Hayward  <alan.hayward@arm.com>
13855             David Sherwood  <david.sherwood@arm.com>
13857         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
13858         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
13859         via stack temporaries.  Treat the mode size as polynomial too.
13861 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13862             Alan Hayward  <alan.hayward@arm.com>
13863             David Sherwood  <david.sherwood@arm.com>
13865         * expr.c (expand_expr_real_2): When handling conversions involving
13866         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
13867         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
13868         as a poly_uint64 too.
13870 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13871             Alan Hayward  <alan.hayward@arm.com>
13872             David Sherwood  <david.sherwood@arm.com>
13874         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
13876 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13877             Alan Hayward  <alan.hayward@arm.com>
13878             David Sherwood  <david.sherwood@arm.com>
13880         * combine.c (can_change_dest_mode): Handle polynomial
13881         REGMODE_NATURAL_SIZE.
13882         * expmed.c (store_bit_field_1): Likewise.
13883         * expr.c (store_constructor): Likewise.
13884         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
13885         and polynomial REGMODE_NATURAL_SIZE.
13886         (gen_lowpart_common): Likewise.
13887         * reginfo.c (record_subregs_of_mode): Likewise.
13888         * rtlanal.c (read_modify_subreg_p): Likewise.
13890 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13891             Alan Hayward  <alan.hayward@arm.com>
13892             David Sherwood  <david.sherwood@arm.com>
13894         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
13895         numbers of elements.
13897 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13898             Alan Hayward  <alan.hayward@arm.com>
13899             David Sherwood  <david.sherwood@arm.com>
13901         * match.pd: Cope with polynomial numbers of vector elements.
13903 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13904             Alan Hayward  <alan.hayward@arm.com>
13905             David Sherwood  <david.sherwood@arm.com>
13907         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
13908         in a POINTER_PLUS_EXPR.
13910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13911             Alan Hayward  <alan.hayward@arm.com>
13912             David Sherwood  <david.sherwood@arm.com>
13914         * omp-simd-clone.c (simd_clone_subparts): New function.
13915         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
13916         (ipa_simd_modify_function_body): Likewise.
13918 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13919             Alan Hayward  <alan.hayward@arm.com>
13920             David Sherwood  <david.sherwood@arm.com>
13922         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
13923         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
13924         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
13925         (expand_vector_condition, vector_element): Likewise.
13926         (subparts_gt): New function.
13927         (get_compute_type): Use subparts_gt.
13928         (count_type_subparts): Delete.
13929         (expand_vector_operations_1): Use subparts_gt instead of
13930         count_type_subparts.
13932 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13933             Alan Hayward  <alan.hayward@arm.com>
13934             David Sherwood  <david.sherwood@arm.com>
13936         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
13937         (vect_compile_time_alias): ...this new function.  Do the calculation
13938         on poly_ints rather than trees.
13939         (vect_prune_runtime_alias_test_list): Update call accordingly.
13941 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13942             Alan Hayward  <alan.hayward@arm.com>
13943             David Sherwood  <david.sherwood@arm.com>
13945         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
13946         numbers of units.
13947         (vect_schedule_slp_instance): Likewise.
13949 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13950             Alan Hayward  <alan.hayward@arm.com>
13951             David Sherwood  <david.sherwood@arm.com>
13953         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
13954         constant and extern definitions for variable-length vectors.
13955         (vect_get_constant_vectors): Note that the number of units
13956         is known to be constant.
13958 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13959             Alan Hayward  <alan.hayward@arm.com>
13960             David Sherwood  <david.sherwood@arm.com>
13962         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
13963         of units as polynomial.  Choose between WIDE and NARROW based
13964         on multiple_p.
13966 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13967             Alan Hayward  <alan.hayward@arm.com>
13968             David Sherwood  <david.sherwood@arm.com>
13970         * tree-vect-stmts.c (simd_clone_subparts): New function.
13971         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
13973 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13974             Alan Hayward  <alan.hayward@arm.com>
13975             David Sherwood  <david.sherwood@arm.com>
13977         * tree-vect-stmts.c (vectorizable_call): Treat the number of
13978         vectors as polynomial.  Use build_index_vector for
13979         IFN_GOMP_SIMD_LANE.
13981 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13982             Alan Hayward  <alan.hayward@arm.com>
13983             David Sherwood  <david.sherwood@arm.com>
13985         * tree-vect-stmts.c (get_load_store_type): Treat the number of
13986         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
13987         for variable-length vectors.
13988         (vectorizable_mask_load_store): Treat the number of units as
13989         polynomial, asserting that it is constant if the condition has
13990         already been enforced.
13991         (vectorizable_store, vectorizable_load): Likewise.
13993 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13994             Alan Hayward  <alan.hayward@arm.com>
13995             David Sherwood  <david.sherwood@arm.com>
13997         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
13998         of units as polynomial.  Punt if we can't tell at compile time
13999         which vector contains the final result.
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-vect-loop.c (vectorizable_induction): Treat the number
14006         of units as polynomial.  Punt on SLP inductions.  Use an integer
14007         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
14008         cast of such a series for variable-length floating-point
14009         reductions.
14011 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14012             Alan Hayward  <alan.hayward@arm.com>
14013             David Sherwood  <david.sherwood@arm.com>
14015         * tree.h (build_index_vector): Declare.
14016         * tree.c (build_index_vector): New function.
14017         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
14018         of units as polynomial, forcibly converting it to a constant if
14019         vectorizable_reduction has already enforced the condition.
14020         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
14021         to create a {1,2,3,...} vector.
14022         (vectorizable_reduction): Treat the number of units as polynomial.
14023         Choose vectype_in based on the largest scalar element size rather
14024         than the smallest number of units.  Enforce the restrictions
14025         relied on above.
14027 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14028             Alan Hayward  <alan.hayward@arm.com>
14029             David Sherwood  <david.sherwood@arm.com>
14031         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
14032         number of units as polynomial.
14034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14035             Alan Hayward  <alan.hayward@arm.com>
14036             David Sherwood  <david.sherwood@arm.com>
14038         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
14039         * target.def (autovectorize_vector_sizes): Return the vector sizes
14040         by pointer, using vector_sizes rather than a bitmask.
14041         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
14042         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
14043         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
14044         Likewise.
14045         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
14046         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
14047         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
14048         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
14049         * omp-general.c (omp_max_vf): Likewise.
14050         * omp-low.c (omp_clause_aligned_alignment): Likewise.
14051         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
14052         * tree-vect-loop.c (vect_analyze_loop): Likewise.
14053         * tree-vect-slp.c (vect_slp_bb): Likewise.
14054         * doc/tm.texi: Regenerate.
14055         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
14056         to a poly_uint64.
14057         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
14058         the vector size as a poly_uint64 rather than an unsigned int.
14059         (current_vector_size): Change from an unsigned int to a poly_uint64.
14060         (get_vectype_for_scalar_type): Update accordingly.
14061         * tree.h (build_truth_vector_type): Take the size and number of
14062         units as a poly_uint64 rather than an unsigned int.
14063         (build_vector_type): Add a temporary overload that takes
14064         the number of units as a poly_uint64 rather than an unsigned int.
14065         * tree.c (make_vector_type): Likewise.
14066         (build_truth_vector_type): Take the number of units as a poly_uint64
14067         rather than an unsigned int.
14069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14070             Alan Hayward  <alan.hayward@arm.com>
14071             David Sherwood  <david.sherwood@arm.com>
14073         * target.def (get_mask_mode): Take the number of units and length
14074         as poly_uint64s rather than unsigned ints.
14075         * targhooks.h (default_get_mask_mode): Update accordingly.
14076         * targhooks.c (default_get_mask_mode): Likewise.
14077         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14078         * doc/tm.texi: Regenerate.
14080 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14081             Alan Hayward  <alan.hayward@arm.com>
14082             David Sherwood  <david.sherwood@arm.com>
14084         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
14085         * omp-general.c (omp_max_vf): Likewise.
14086         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
14087         (expand_omp_simd): Handle polynomial safelen.
14088         * omp-low.c (omplow_simd_context): Add a default constructor.
14089         (omplow_simd_context::max_vf): Change from int to poly_uint64.
14090         (lower_rec_simd_input_clauses): Update accordingly.
14091         (lower_rec_input_clauses): Likewise.
14093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14094             Alan Hayward  <alan.hayward@arm.com>
14095             David Sherwood  <david.sherwood@arm.com>
14097         * tree-vectorizer.h (vect_nunits_for_cost): New function.
14098         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
14099         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
14100         (vect_analyze_slp_cost): Likewise.
14101         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
14102         (vect_model_load_cost): Likewise.
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-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
14109         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
14110         from an unsigned int * to a poly_uint64_pod *.
14111         (calculate_unrolling_factor): New function.
14112         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
14114 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14115             Alan Hayward  <alan.hayward@arm.com>
14116             David Sherwood  <david.sherwood@arm.com>
14118         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
14119         from an unsigned int to a poly_uint64.
14120         (_loop_vec_info::slp_unrolling_factor): Likewise.
14121         (_loop_vec_info::vectorization_factor): Change from an int
14122         to a poly_uint64.
14123         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
14124         (vect_get_num_vectors): New function.
14125         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
14126         (vect_get_num_copies): Use vect_get_num_vectors.
14127         (vect_analyze_data_ref_dependences): Change max_vf from an int *
14128         to an unsigned int *.
14129         (vect_analyze_data_refs): Change min_vf from an int * to a
14130         poly_uint64 *.
14131         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14132         than an unsigned HOST_WIDE_INT.
14133         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14134         (vect_analyze_data_ref_dependence): Change max_vf from an int *
14135         to an unsigned int *.
14136         (vect_analyze_data_ref_dependences): Likewise.
14137         (vect_compute_data_ref_alignment): Handle polynomial vf.
14138         (vect_enhance_data_refs_alignment): Likewise.
14139         (vect_prune_runtime_alias_test_list): Likewise.
14140         (vect_shift_permute_load_chain): Likewise.
14141         (vect_supportable_dr_alignment): Likewise.
14142         (dependence_distance_ge_vf): Take the vectorization factor as a
14143         poly_uint64 rather than an unsigned HOST_WIDE_INT.
14144         (vect_analyze_data_refs): Change min_vf from an int * to a
14145         poly_uint64 *.
14146         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
14147         vfm1 as a poly_uint64 rather than an int.  Make the same change
14148         for the returned bound_scalar.
14149         (vect_gen_vector_loop_niters): Handle polynomial vf.
14150         (vect_do_peeling): Likewise.  Update call to
14151         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
14152         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
14153         be constant.
14154         * tree-vect-loop.c (vect_determine_vectorization_factor)
14155         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
14156         (vect_get_known_peeling_cost): Likewise.
14157         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
14158         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
14159         (vect_transform_loop): Likewise.  Use the lowest possible VF when
14160         updating the upper bounds of the loop.
14161         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
14162         rather than an int.
14163         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
14164         polynomial unroll factors.
14165         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
14166         (vect_make_slp_decision): Likewise.
14167         (vect_supported_load_permutation_p): Likewise, and polynomial
14168         vf too.
14169         (vect_analyze_slp_cost): Handle polynomial vf.
14170         (vect_slp_analyze_node_operations): Likewise.
14171         (vect_slp_analyze_bb_1): Likewise.
14172         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14173         than an unsigned HOST_WIDE_INT.
14174         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
14175         (vectorizable_load): Handle polynomial vf.
14176         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
14177         a poly_uint64.
14178         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
14180 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14181             Alan Hayward  <alan.hayward@arm.com>
14182             David Sherwood  <david.sherwood@arm.com>
14184         * match.pd: Handle bit operations involving three constants
14185         and try to fold one pair.
14187 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14189         * tree-vect-loop-manip.c: Include gimple-fold.h.
14190         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
14191         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
14192         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
14193         Add a path that uses a step of VF instead of 1, but disable it
14194         for now.
14195         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
14196         and niters_no_overflow parameters.  Update calls to
14197         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
14198         Create a new SSA name if the latter choses to use a ste other
14199         than zero, and return it via niters_vector_mult_vf_var.
14200         * tree-vect-loop.c (vect_transform_loop): Update calls to
14201         vect_do_peeling, vect_gen_vector_loop_niters and
14202         slpeel_make_loop_iterate_ntimes.
14203         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
14204         (vect_gen_vector_loop_niters): Update declarations after above changes.
14206 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
14208         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
14209         128-bit round to integer instructions.
14210         (ceil<mode>2): Likewise.
14211         (btrunc<mode>2): Likewise.
14212         (round<mode>2): Likewise.
14214 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14216         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
14217         unaligned VSX load/store on P8/P9.
14218         (expand_block_clear): Allow the use of unaligned VSX
14219         load/store on P8/P9.
14221 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14223         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
14224         New function.
14225         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
14226         swap associated with both a load and a store.
14228 2018-01-02  Andrew Waterman  <andrew@sifive.com>
14230         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
14231         * config/riscv/riscv.md (clear_cache): Use it.
14233 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
14235         * web.c: Remove out-of-date comment.
14237 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14239         * expr.c (fixup_args_size_notes): Check that any existing
14240         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
14241         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
14242         (emit_single_push_insn): ...here.
14244 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14246         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
14247         (const_vector_encoded_nelts): New function.
14248         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
14249         (const_vector_int_elt, const_vector_elt): Declare.
14250         * emit-rtl.c (const_vector_int_elt_1): New function.
14251         (const_vector_elt): Likewise.
14252         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14253         of CONST_VECTOR_ELT.
14255 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14257         * expr.c: Include rtx-vector-builder.h.
14258         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14259         directly on the tree encoding.
14260         (const_vector_from_tree): Likewise.
14261         * optabs.c: Include rtx-vector-builder.h.
14262         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14263         sequence of "u" values.
14264         * vec-perm-indices.c: Include rtx-vector-builder.h.
14265         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14266         directly on the vec_perm_indices encoding.
14268 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14270         * doc/rtl.texi (const_vector): Describe new encoding scheme.
14271         * Makefile.in (OBJS): Add rtx-vector-builder.o.
14272         * rtx-vector-builder.h: New file.
14273         * rtx-vector-builder.c: Likewise.
14274         * rtl.h (rtx_def::u2): Add a const_vector field.
14275         (CONST_VECTOR_NPATTERNS): New macro.
14276         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14277         (CONST_VECTOR_DUPLICATE_P): Likewise.
14278         (CONST_VECTOR_STEPPED_P): Likewise.
14279         (CONST_VECTOR_ENCODED_ELT): Likewise.
14280         (const_vec_duplicate_p): Check for a duplicated vector encoding.
14281         (unwrap_const_vec_duplicate): Likewise.
14282         (const_vec_series_p): Check for a non-duplicated vector encoding.
14283         Say that the function only returns true for integer vectors.
14284         * emit-rtl.c: Include rtx-vector-builder.h.
14285         (gen_const_vec_duplicate_1): Delete.
14286         (gen_const_vector): Call gen_const_vec_duplicate instead of
14287         gen_const_vec_duplicate_1.
14288         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14289         (gen_const_vec_duplicate): Use rtx_vector_builder.
14290         (gen_const_vec_series): Likewise.
14291         (gen_rtx_CONST_VECTOR): Likewise.
14292         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
14293         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14294         Build a new vector rather than modifying a CONST_VECTOR in-place.
14295         (handle_special_swappables): Update call accordingly.
14296         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14297         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14298         Build a new vector rather than modifying a CONST_VECTOR in-place.
14299         (handle_special_swappables): Update call accordingly.
14301 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14303         * simplify-rtx.c (simplify_const_binary_operation): Use
14304         CONST_VECTOR_ELT instead of XVECEXP.
14306 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14308         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
14309         the selector elements to be different from the data elements
14310         if the selector is a VECTOR_CST.
14311         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
14312         ssizetype for the selector.
14314 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14316         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
14317         before testing each element individually.
14318         * tree-vect-generic.c (lower_vec_perm): Likewise.
14320 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14322         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
14323         * selftest-run-tests.c (selftest::run_tests): Call it.
14324         * vector-builder.h (vector_builder::operator ==): New function.
14325         (vector_builder::operator !=): Likewise.
14326         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
14327         (vec_perm_indices::all_from_input_p): New function.
14328         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14329         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
14330         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
14331         instead of reading the VECTOR_CST directly.  Detect whether both
14332         vector inputs are the same before constructing the vec_perm_indices,
14333         and update the number of inputs argument accordingly.  Use the
14334         utility functions added above.  Only construct sel2 if we need to.
14336 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14338         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
14339         the broadcast of the low byte.
14340         (expand_mult_highpart): Use an explicit encoding for the permutes.
14341         * optabs-query.c (can_mult_highpart_p): Likewise.
14342         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14343         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14344         (vectorizable_bswap): Likewise.
14345         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
14346         explicit encoding for the power-of-2 permutes.
14347         (vect_permute_store_chain): Likewise.
14348         (vect_grouped_load_supported): Likewise.
14349         (vect_permute_load_chain): Likewise.
14351 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14353         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
14354         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
14355         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
14356         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14357         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14358         (vect_gen_perm_mask_any): Likewise.
14360 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14362         * int-vector-builder.h: New file.
14363         * vec-perm-indices.h: Include int-vector-builder.h.
14364         (vec_perm_indices): Redefine as an int_vector_builder.
14365         (auto_vec_perm_indices): Delete.
14366         (vec_perm_builder): Redefine as a stand-alone class.
14367         (vec_perm_indices::vec_perm_indices): New function.
14368         (vec_perm_indices::clamp): Likewise.
14369         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14370         (vec_perm_indices::new_vector): New function.
14371         (vec_perm_indices::new_expanded_vector): Update for new
14372         vec_perm_indices class.
14373         (vec_perm_indices::rotate_inputs): New function.
14374         (vec_perm_indices::all_in_range_p): Operate directly on the
14375         encoded form, without computing elided elements.
14376         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14377         encoding.  Update for new vec_perm_indices class.
14378         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14379         the given vec_perm_builder.
14380         (expand_vec_perm_var): Update vec_perm_builder constructor.
14381         (expand_mult_highpart): Use vec_perm_builder instead of
14382         auto_vec_perm_indices.
14383         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14384         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
14385         or double series encoding as appropriate.
14386         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14387         vec_perm_indices instead of auto_vec_perm_indices.
14388         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14389         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14390         (vect_permute_store_chain): Likewise.
14391         (vect_grouped_load_supported): Likewise.
14392         (vect_permute_load_chain): Likewise.
14393         (vect_shift_permute_load_chain): Likewise.
14394         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14395         (vect_transform_slp_perm_load): Likewise.
14396         (vect_schedule_slp_instance): Likewise.
14397         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14398         (vectorizable_mask_load_store): Likewise.
14399         (vectorizable_bswap): Likewise.
14400         (vectorizable_store): Likewise.
14401         (vectorizable_load): Likewise.
14402         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14403         vec_perm_indices instead of auto_vec_perm_indices.  Use
14404         tree_to_vec_perm_builder to read the vector from a tree.
14405         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14406         vec_perm_builder instead of a vec_perm_indices.
14407         (have_whole_vector_shift): Use vec_perm_builder and
14408         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
14409         truncation to calc_vec_perm_mask_for_shift.
14410         (vect_create_epilog_for_reduction): Likewise.
14411         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14412         from auto_vec_perm_indices to vec_perm_indices.
14413         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14414         instead of changing individual elements.
14415         (aarch64_vectorize_vec_perm_const): Use new_vector to install
14416         the vector in d.perm.
14417         * config/arm/arm.c (expand_vec_perm_d::perm): Change
14418         from auto_vec_perm_indices to vec_perm_indices.
14419         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14420         instead of changing individual elements.
14421         (arm_vectorize_vec_perm_const): Use new_vector to install
14422         the vector in d.perm.
14423         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14424         Update vec_perm_builder constructor.
14425         (rs6000_expand_interleave): Likewise.
14426         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14427         (rs6000_expand_interleave): Likewise.
14429 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14431         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14432         to qimode could truncate the indices.
14433         * optabs.c (expand_vec_perm_var): Likewise.
14435 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14437         * Makefile.in (OBJS): Add vec-perm-indices.o.
14438         * vec-perm-indices.h: New file.
14439         * vec-perm-indices.c: Likewise.
14440         * target.h (vec_perm_indices): Replace with a forward class
14441         declaration.
14442         (auto_vec_perm_indices): Move to vec-perm-indices.h.
14443         * optabs.h: Include vec-perm-indices.h.
14444         (expand_vec_perm): Delete.
14445         (selector_fits_mode_p, expand_vec_perm_var): Declare.
14446         (expand_vec_perm_const): Declare.
14447         * target.def (vec_perm_const_ok): Replace with...
14448         (vec_perm_const): ...this new hook.
14449         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14450         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14451         * doc/tm.texi: Regenerate.
14452         * optabs.def (vec_perm_const): Delete.
14453         * doc/md.texi (vec_perm_const): Likewise.
14454         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14455         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14456         expand_vec_perm for constant permutation vectors.  Assert that
14457         the mode of variable permutation vectors is the integer equivalent
14458         of the mode that is being permuted.
14459         * optabs-query.h (selector_fits_mode_p): Declare.
14460         * optabs-query.c: Include vec-perm-indices.h.
14461         (selector_fits_mode_p): New function.
14462         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14463         is defined, instead of checking whether the vec_perm_const_optab
14464         exists.  Use targetm.vectorize.vec_perm_const instead of
14465         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
14466         fit in the vector mode before using a variable permute.
14467         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14468         vec_perm_indices instead of an rtx.
14469         (expand_vec_perm): Replace with...
14470         (expand_vec_perm_const): ...this new function.  Take the selector
14471         as a vec_perm_indices rather than an rtx.  Also take the mode of
14472         the selector.  Update call to shift_amt_for_vec_perm_mask.
14473         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14474         Use vec_perm_indices::new_expanded_vector to expand the original
14475         selector into bytes.  Check whether the indices fit in the vector
14476         mode before using a variable permute.
14477         (expand_vec_perm_var): Make global.
14478         (expand_mult_highpart): Use expand_vec_perm_const.
14479         * fold-const.c: Includes vec-perm-indices.h.
14480         * tree-ssa-forwprop.c: Likewise.
14481         * tree-vect-data-refs.c: Likewise.
14482         * tree-vect-generic.c: Likewise.
14483         * tree-vect-loop.c: Likewise.
14484         * tree-vect-slp.c: Likewise.
14485         * tree-vect-stmts.c: Likewise.
14486         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14487         Delete.
14488         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14489         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14490         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14491         (aarch64_vectorize_vec_perm_const): ...this new function.
14492         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14493         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14494         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14495         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14496         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14497         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14498         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14499         into...
14500         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14501         check for NEON modes.
14502         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14503         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14504         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14505         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14506         into...
14507         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14508         the old VEC_PERM_CONST conditions.
14509         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14510         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14511         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14512         (ia64_vectorize_vec_perm_const_ok): Merge into...
14513         (ia64_vectorize_vec_perm_const): ...this new function.
14514         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14515         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14516         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14517         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14518         * config/mips/mips.c (mips_expand_vec_perm_const)
14519         (mips_vectorize_vec_perm_const_ok): Merge into...
14520         (mips_vectorize_vec_perm_const): ...this new function.
14521         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14522         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14523         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14524         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14525         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14526         (rs6000_expand_vec_perm_const): Delete.
14527         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14528         Delete.
14529         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14530         (altivec_expand_vec_perm_const_le): Take each operand individually.
14531         Operate on constant selectors rather than rtxes.
14532         (altivec_expand_vec_perm_const): Likewise.  Update call to
14533         altivec_expand_vec_perm_const_le.
14534         (rs6000_expand_vec_perm_const): Delete.
14535         (rs6000_vectorize_vec_perm_const_ok): Delete.
14536         (rs6000_vectorize_vec_perm_const): New function.
14537         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14538         an element count and rtx array.
14539         (rs6000_expand_extract_even): Update call accordingly.
14540         (rs6000_expand_interleave): Likewise.
14541         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14542         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14543         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14544         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14545         (rs6000_expand_vec_perm_const): Delete.
14546         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14547         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14548         (altivec_expand_vec_perm_const_le): Take each operand individually.
14549         Operate on constant selectors rather than rtxes.
14550         (altivec_expand_vec_perm_const): Likewise.  Update call to
14551         altivec_expand_vec_perm_const_le.
14552         (rs6000_expand_vec_perm_const): Delete.
14553         (rs6000_vectorize_vec_perm_const_ok): Delete.
14554         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14555         reference to the SPE evmerge intructions.
14556         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14557         an element count and rtx array.
14558         (rs6000_expand_extract_even): Update call accordingly.
14559         (rs6000_expand_interleave): Likewise.
14560         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14561         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14562         new function.
14563         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14565 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14567         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14568         vector mode and that that mode matches the mode of the data
14569         being permuted.
14570         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14571         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14572         directly using expand_vec_perm_1 when forcing selectors into
14573         registers.
14574         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14576 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14578         * optabs-query.h (can_vec_perm_p): Delete.
14579         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14580         * optabs-query.c (can_vec_perm_p): Split into...
14581         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14582         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14583         particular selector is valid.
14584         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14585         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14586         (vect_grouped_load_supported): Likewise.
14587         (vect_shift_permute_load_chain): Likewise.
14588         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14589         (vect_transform_slp_perm_load): Likewise.
14590         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14591         (vectorizable_bswap): Likewise.
14592         (vect_gen_perm_mask_checked): Likewise.
14593         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14594         implementations of variable permutation vectors into account
14595         when deciding which selector to use.
14596         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14597         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14598         with a false third argument.
14599         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14600         to test whether the constant selector is valid and can_vec_perm_var_p
14601         to test whether a variable selector is valid.
14603 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14605         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14606         * optabs-query.c (can_vec_perm_p): Likewise.
14607         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14608         instead of vec_perm_indices.
14609         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14610         (vect_gen_perm_mask_checked): Likewise,
14611         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14612         (vect_gen_perm_mask_checked): Likewise,
14614 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14616         * optabs-query.h (qimode_for_vec_perm): Declare.
14617         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14618         (qimode_for_vec_perm): ...this new function.
14619         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14621 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14623         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14624         does not have a conditional at the top.
14626 2018-01-02  Richard Biener  <rguenther@suse.de>
14628         * ipa-inline.c (big_speedup_p): Fix expression.
14630 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14632         PR target/81616
14633         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14634         for generic 4->6.
14636 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14638         PR target/81616
14639         Generic tuning.
14640         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14641         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14642         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14643         cond_taken_branch_cost 3->4.
14645 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14647         PR tree-optimization/83581
14648         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14649         TODO_cleanup_cfg if any changes have been made.
14651         PR middle-end/83608
14652         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14653         convert_modes if target mode has the right side, but different mode
14654         class.
14656         PR middle-end/83609
14657         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14658         last argument when extracting from CONCAT.  If either from_real or
14659         from_imag is NULL, use expansion through memory.  If result is not
14660         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14661         the parts directly to inner mode, if even that fails, use expansion
14662         through memory.
14664         PR middle-end/83623
14665         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14666         check for bswap in mode rather than HImode and use that in expand_unop
14667         too.
14669 Copyright (C) 2018 Free Software Foundation, Inc.
14671 Copying and distribution of this file, with or without modification,
14672 are permitted in any medium without royalty provided the copyright
14673 notice and this notice are preserved.