PR c/82063 - issues with arguments enabled by -Wall
[official-gcc.git] / gcc / ChangeLog
blob2bdf916284061436a9484b11bc81502e319224d8
1 2018-05-31  Martin Sebor  <msebor@redhat.com>
3         PR c/82063
4         * calls.c (alloc_max_size): Correct a logic error/typo.
5         Treat excessive arguments as infinite.  Warn for invalid arguments.
6         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
10         PR target/85829
11         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
12         and movx for Haswell.
14 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
15             Cesar Philippidis  <cesar@codesourcery.com>
17         PR middle-end/85879
18         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
19         when emitting error on private/firstprivate reductions.
20         * omp-low.c (lower_omp_target): Avoid reference-type processing
21         on pointers for firstprivate clause.
23 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
25         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
26         (st1x2): Likewise.
27         (st1x3): Likewise.
28         * config/aarch64/aarch64-simd.md
29         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
30         (aarch64_ld1_x3_<mode>): Likewise
31         (aarch64_st1x2<VALLDIF:mode>): Likewise
32         (aarch64_st1_x2_<mode>): Likewise
33         (aarch64_st1x3<VALLDIF:mode>): Likewise
34         (aarch64_st1_x3_<mode>): Likewise
35         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
36         (vld1_s8_x3): Likewise.
37         (vld1_u16_x3): Likewise.
38         (vld1_s16_x3): Likewise.
39         (vld1_u32_x3): Likewise.
40         (vld1_s32_x3): Likewise.
41         (vld1_u64_x3): Likewise.
42         (vld1_s64_x3): Likewise.
43         (vld1_f16_x3): Likewise.
44         (vld1_f32_x3): Likewise.
45         (vld1_f64_x3): Likewise.
46         (vld1_p8_x3): Likewise.
47         (vld1_p16_x3): Likewise.
48         (vld1_p64_x3): Likewise.
49         (vld1q_u8_x3): Likewise.
50         (vld1q_s8_x3): Likewise.
51         (vld1q_u16_x3): Likewise.
52         (vld1q_s16_x3): Likewise.
53         (vld1q_u32_x3): Likewise.
54         (vld1q_s32_x3): Likewise.
55         (vld1q_u64_x3): Likewise.
56         (vld1q_s64_x3): Likewise.
57         (vld1q_f16_x3): Likewise.
58         (vld1q_f32_x3): Likewise.
59         (vld1q_f64_x3): Likewise.
60         (vld1q_p8_x3): Likewise.
61         (vld1q_p16_x3): Likewise.
62         (vld1q_p64_x3): Likewise.
63         (vst1_s64_x2): Likewise.
64         (vst1_u64_x2): Likewise.
65         (vst1_f64_x2): Likewise.
66         (vst1_s8_x2): Likewise.
67         (vst1_p8_x2): Likewise.
68         (vst1_s16_x2): Likewise.
69         (vst1_p16_x2): Likewise.
70         (vst1_s32_x2): Likewise.
71         (vst1_u8_x2): Likewise.
72         (vst1_u16_x2): Likewise.
73         (vst1_u32_x2): Likewise.
74         (vst1_f16_x2): Likewise.
75         (vst1_f32_x2): Likewise.
76         (vst1_p64_x2): Likewise.
77         (vst1q_s8_x2): Likewise.
78         (vst1q_p8_x2): Likewise.
79         (vst1q_s16_x2): Likewise.
80         (vst1q_p16_x2): Likewise.
81         (vst1q_s32_x2): Likewise.
82         (vst1q_s64_x2): Likewise.
83         (vst1q_u8_x2): Likewise.
84         (vst1q_u16_x2): Likewise.
85         (vst1q_u32_x2): Likewise.
86         (vst1q_u64_x2): Likewise.
87         (vst1q_f16_x2): Likewise.
88         (vst1q_f32_x2): Likewise.
89         (vst1q_f64_x2): Likewise.
90         (vst1q_p64_x2): Likewise.
91         (vst1_s64_x3): Likewise.
92         (vst1_u64_x3): Likewise.
93         (vst1_f64_x3): Likewise.
94         (vst1_s8_x3): Likewise.
95         (vst1_p8_x3): Likewise.
96         (vst1_s16_x3): Likewise.
97         (vst1_p16_x3): Likewise.
98         (vst1_s32_x3): Likewise.
99         (vst1_u8_x3): Likewise.
100         (vst1_u16_x3): Likewise.
101         (vst1_u32_x3): Likewise.
102         (vst1_f16_x3): Likewise.
103         (vst1_f32_x3): Likewise.
104         (vst1_p64_x3): Likewise.
105         (vst1q_s8_x3): Likewise.
106         (vst1q_p8_x3): Likewise.
107         (vst1q_s16_x3): Likewise.
108         (vst1q_p16_x3): Likewise.
109         (vst1q_s32_x3): Likewise.
110         (vst1q_s64_x3): Likewise.
111         (vst1q_u8_x3): Likewise.
112         (vst1q_u16_x3): Likewise.
113         (vst1q_u32_x3): Likewise.
114         (vst1q_u64_x3): Likewise.
115         (vst1q_f16_x3): Likewise.
116         (vst1q_f32_x3): Likewise.
117         (vst1q_f64_x3): Likewise.
118         (vst1q_p64_x3): Likewise.
120 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
122         * config/msp430/msp430.c (msp430_output_labelref): Prepend
123         user_label_prefix to name.
125         * tree-core.h: Update comment about the format of NAME string
126         passed to handler in attribute_spec.
128         * config/msp430/msp430.md: Remove erroneous subreg expression from
129         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
130         zero_extend{q,h}isi2.
132 2018-05-30  Borislav Petkov  <bp@suse.de>
134         * doc/extend.texi: Document some architecture specific
135         constraints and sort entries.
137 2018-05-30  Martin Sebor  <msebor@redhat.com>
139         PR middle-end/85369
140         * builtins.c (expand_builtin_stpcpy_1): New function.
141         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
142         only if the former succeeds.
144 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
146         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
147         in saphira.
149 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
151         * doc/invoke.texi (-flinker-output): Document
153 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
155         * passes.c (ipa_write_summaries): Only modify statements if body
156         is in memory.
157         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
158         incrementally linking.
159         (ipa_passes): Likewise.
160         * lto-cgraph.c (lto_output_node): When incrementally linking do not
161         pass down resolution info.
162         * common.opt (flag_incremental_link): Update info.
163         * gcc.c (plugin specs): Turn flinker-output=* to
164         -plugin-opt=-linker-output-known
165         * toplev.c (compile_file): Also cut compilation when doing incremental
166         link.
167         * flag-types. (enum lto_partition_model): Add
168         LTO_LINKER_OUTPUT_NOLTOREL.
169         (invoke.texi): Add -flinker-output docs.
170         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
171         link same way as WPA; do not stream in dead initializers.
173         * dwarf2out.c (dwarf2out_die_ref_for_decl,
174         darf2out_register_external_decl): Support incremental link.
176 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
178         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
180 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
182         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
183         it down to simple_object_copy_lto_debug_sections.
184         (run_gcc): Determine incremental LTO link time and configure
185         lto1 into non-wpa mode, disable renaming of debug sections.
187 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
189         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
190         descriptions of various incorrectly documented functions.
192 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
194         Revert:
195         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
196         address check not strict.
198 2018-05-30  Richard Biener  <rguenther@suse.de>
200         PR tree-optimization/85964
201         * tracer.c (better_p): Drop initialized count check, we only
202         call the function with initialized counts now.
203         (find_best_successor): Do find a best edge if one
204         has uninitialized count.
205         (find_best_predecessor): Likewise.  Do BB frequency check only
206         if count is initialized.
208 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
210         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
211         (aarch64_ldrstr_offset_compare): New.
212         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
213         load/store orderings.
214         (aarch64_gen_adjusted_ldpstp): Likewise.
216 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
218         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
219         Check for subset of GENERAL_REGS and FP_REGS.
220         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
221         r=w alternative.
223 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
225         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
226         and wi::to_poly_offset.  Add the current offset and then check
227         whether the sum fits, rather than using an unchecked addition of
228         a checked term.  Check for a shwi rather than a uhwi.
229         * expr.c (get_bit_range): Use tree_to_poly_uint64.
230         (store_constructor): Use poly_int_tree_p.
231         (expand_expr_real_1): Likewise.
232         * function.c (assign_temp): Likewise.
233         * fold-const.c (const_binop): Use poly_int_tree_p and
234         wi::to_poly_offset.
235         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
236         division.
237         * ipa-icf-gimple.c (func_checker::compare_operand): Use
238         to_poly_offset for MEM offsets.
239         * ipa-icf.c (sem_variable::equals): Likewise.
240         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
241         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
242         wi::to_poly_offset for BIT_FIELD_REF offsets.
243         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
244         wi::to_poly_offset.
245         * var-tracking.c (emit_note_insn_var_location): Use
246         tree_to_poly_uint64.
248 2018-05-29  Jim Wilson  <jimw@sifive.com>
250         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
252 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
254         PR target/85950
255         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
256         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
257         sequence.
258         (sse4_1_round<mode>2): Use nonimmediate_operand
259         for operand 1 predicate.
261 2018-05-29  Martin Sebor  <msebor@redhat.com>
262             Richard Biener  <rguenther@suse.de>
264         PR testsuite/85888
265         * calls.c (get_size_range): Call determine_value_range instead
266         of get_value_range..
267         * tree-vrp.h (determine_value_range): Declared new function.
268         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
270 2018-05-29  Richard Biener  <rguenther@suse.de>
272         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
273         sure to use non-pattern stmts for get_earlier_stmt arguments.
274         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
275         called on pattern stmts.
276         (get_later_stmt): Likewise.
278 2018-05-29  Martin Liska  <mliska@suse.cz>
280         PR gcov-profile/85759
281         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
282         env variables.
284 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
286         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
287         VEC_UNPACK_*_EXPR.
288         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
289         VEC_PACK_*_EXPR.
291         PR target/85918
292         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
293         VEC_PACK_FLOAT_EXPR): New tree codes.
294         * tree-pretty-print.c (op_code_prio): Handle
295         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
296         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
297         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
298         * tree-inline.c (estimate_operator_cost): Likewise.
299         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
300         * fold-const.c (const_binop): Likewise.
301         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
302         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
303         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
304         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
305         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
306         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
307         * expr.c (expand_expr_real_2): Likewise.
308         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
309         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
310         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
311         optabs.
312         * optabs.c (expand_widen_pattern_expr): For
313         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
314         sign from result type rather than operand's type.
315         (expand_binop_directly): For vec_packu_float_optab and
316         vec_packs_float_optab allow result type to be different from operand's
317         type.
318         * optabs-tree.c (optab_for_tree_code): Handle
319         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
320         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
321         * tree-vect-generic.c (expand_vector_operations_1):  Handle
322         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
323         VEC_PACK_FLOAT_EXPR.
324         * tree-vect-stmts.c (supportable_widening_operation): Handle
325         FIX_TRUNC_EXPR.
326         (supportable_narrowing_operation): Handle FLOAT_EXPR.
327         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
328         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
329         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
330         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
331         mode attributes.
332         (vec_pack<floatprefix>_float_<mode>): New expander.
333         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
334         attributes.
335         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
336         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
337         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
338         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
339         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
340         Document.
341         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
342         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
343         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
344         VEC_PACK_FLOAT_EXPR): Document.
346 2018-05-29  Richard Biener  <rguenther@suse.de>
348         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
349         member.
350         (stmt_vec_info_vec): Make pointer.
351         (init_stmt_vec_info_vec): Remove.
352         (free_stmt_vec_info_vec): Likewise.
353         (set_stmt_vec_info_vec): New function.
354         (free_stmt_vec_infos): Likewise.
355         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
356         (set_vinfo_for_stmt): Likewise.
357         (get_earlier_stmt): Likewise.
358         (get_later_stmt): Likewise.
359         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
360         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
361         (vec_info::~vec_info): Free stmt_vec_infos.
362         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
363         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
364         (pass_slp_vectorize::execute): Likewise.
365         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
366         (free_stmt_vec_info_vec): Likewise.
367         (set_stmt_vec_info_vec): New function.
368         (free_stmt_vec_infos): Likewise.
369         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
370         the global stmt_vec_info_vec.
371         * tree-parloops.c (gather_scalar_reductions): Use
372         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
373         vector.
375 2018-05-29  Richard Biener  <rguenther@suse.de>
377         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
379 2018-05-29  Martin Liska  <mliska@suse.cz>
380             David Malcolm  <dmalcolm@redhat.com>
382         * vec.c (test_reverse): New.
383         (vec_c_tests): Add new test.
384         * vec.h (vl_ptr>::reverse): New function.
386 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
388         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
390         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
391         and later.
393 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
395         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
397 2018-05-28  Richard Biener  <rguenther@suse.de>
399         PR tree-optimization/85933
400         * tree-vect-data-refs.c (vect_record_base_alignments): Only
401         look at stmts marked as vectorizable.
403 2018-05-28  Richard Biener  <rguenther@suse.de>
405         PR tree-optimization/85934
406         * tree-vect-generic.c (expand_vector_operations_1): Hoist
407         vector boolean check before scalar optimization.
409 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
411         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
412         for armv5te.
414 2018-05-28  Mark Wielaard  <mark@klomp.org>
416         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
417         if it is an expression containing a minus sign.
419 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
421         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
423 2018-05-27  Paul Koning  <ni1d@arrl.net>
425         * config/pdp11/pdp11.md (truncsihi2): Remove.
427 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
428             Chung-Ju Wu  <jasonwucj@gmail.com>
430         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
431         implementation.
432         (unaligned_store_dw): Ditto.
433         * config/nds32/nds32-memory-manipulation.c
434         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
435         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
436         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
437         (emit_setmem_word_loop): Rename to ...
438         (emit_setmem_doubleword_loop): ... this.
439         (nds32_gen_dup_4_byte_to_word_value): New function.
440         (nds32_gen_dup_8_byte_to_double_word_value): New function.
441         (nds32_expand_setmem_loop): Refine implementation.
442         (nds32_expand_setmem_loop_v3m): Ditto.
443         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
444         pattern.
446 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
448         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
450 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
452         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
453         (nds32_init_machine_status): Initialize machine->attr_naked_p and
454         machine->attr_no_prologue_p.
455         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
456         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
457         (nds32_expand_epilogue): Consider attr_naked_p.
458         (nds32_expand_epilogue_v3pop): Likewise.
459         (nds32_can_use_return_insn): Likewise.
460         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
461         attr_no_prologue_p fields.
462         * config/nds32/nds32.opt (mret-in-naked-func): New option.
464 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
466         PR target/85918
467         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
468         attributes.
469         * config/i386/sse.md
470         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
471         Rename to ...
472         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
473         ... this.
474         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
475         Rename to ...
476         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
477         ... this.
478         (*<floatsuffix>floatv2div2sf2): Rename to ...
479         (*float<floatunssuffix>v2div2sf2): ... this.
480         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
481         (float<floatunssuffix>v2div2sf2_mask): ... this.
482         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
483         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
484         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
485         to ...
486         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
487         ... this.
488         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
489         Rename to ...
490         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
491         ... this.
492         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
493         Rename to ...
494         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
495         ... this.
496         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
497         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
498         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
499         gen_ufix_truncv8dfv8si2.
500         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
501         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
502         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
503         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
504         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
505         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
506         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
507         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
509 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
511         PR target/85900
512         PR target/85345
513         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
515 2018-05-25  Jim Wilson  <jimw@sifive.com>
517         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
518         * config/riscv/riscv.c (struct machine_function): Add
519         interrupt_handler_p and attribute_checked_p fields.
520         (riscv_attribute_table): Add interrupt.
521         (riscv_interrupt_type_p): New.
522         (riscv_save_reg_p): Save extra regs for interrupt handler.
523         (riscv_use_save_libcall): Return false  for interrupt handler.
524         (riscv_first_stack_step): Add forward declaration.
525         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
526         for interrupt handler with large frame.  Use it for saved reg list.
527         (riscv_expand_prologue): Move flag_stack_usage_info support to
528         eliminate duplication.
529         (riscv_expand_epilogue): Generate mret for interrupt handler.
530         (riscv_epilogue_uses): New.
531         (riscv_can_use_return_insn): Return false for interrupt handler.
532         (riscv_function_ok_for_sibcall): Likewise.
533         (riscv_set_current_function): Add interrupt handler support.
534         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
535         * config/riscv/riscv.md (UNSPECV_MRET): New.
536         (GP_REGNUM): New.
537         (riscv_frflags, riscv_fsflags): Use tab after opcode.
538         (riscv_mret): New.
539         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
541 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
543         PR tree-optimization/85712
544         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
545         this candidate has already been replaced in-situ by a copy.
547 2018-05-25  Jason Merrill  <jason@redhat.com>
549         PR c++/80485 - inline function non-zero address.
550         * symtab.c (nonzero_address): Check DECL_COMDAT.
552 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
554         PR target/83628
555         * config/alpha/alpha.md (ashlsi3): New insn pattern.
556         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
557         extension of SImode operation.  Use const123_operand predicate.
558         (*saddsi_1): Remove.
559         (*saddl_se_1): Ditto.
560         (*ssubsi_1): Ditto.
561         (*ssubl_se_1): Ditto.
562         * config/alpha/predicates.md (const123_operand): New predicate.
563         * config/alpha/constraints.md (P): Use IN_RANGE.
565 2018-05-25  Richard Biener  <rguenther@suse.de>
567         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
568         defaulted to true.
569         (ref_maybe_used_by_stmt_p): Likewise.
570         (stmt_may_clobber_ref_p): Likewise.
571         (stmt_may_clobber_ref_p_1): Likewise.
572         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
573         and pass it along.
574         (ref_maybe_used_by_stmt_p): Likewise.
575         (stmt_may_clobber_ref_p): Likewise.
576         (stmt_may_clobber_ref_p_1): Likewise.
577         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
578         the alias oracle to disambiguate DRs with stmts DR analysis
579         couldn't handle.
580         (vect_analyze_data_refs): Do not give up on not analyzable
581         DRs for BB vectorization.  Remove code truncating the dataref
582         vector.
584 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
586         PR target/85832
587         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
588         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
589         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
591 2018-05-25  Richard Biener  <rguenther@suse.de>
593         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
594         function, combining stmt data ref gathering and fatal analysis
595         parts.
596         (vect_analyze_data_refs): Remove now redudnant code and simplify.
597         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
598         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
599         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
600         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
602 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
604         PR tree-optimization/85720
605         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
606         SCC if all partitions are builtins.
607         (version_loop_by_alias_check): New parameter.  Generate cancelable
608         runtime alias check if all partitions are builtins.
609         (distribute_loop): Update call to above function.
611 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
613         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
614         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
615         (parm_default_def_partition_arg): Ditto.
616         (set_parm_default_def_partition): Ditto.
617         (get_parm_default_def_partitions): Ditto and make it static.
618         (get_undefined_value_partitions): Ditto and make it static.
619         (remove_ssa_form): Refactor call to init_var_map here.
620         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
621         computation for loop region.
622         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
623         (register_default_def): Delete.
624         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
625         (parm_default_def_partition_arg): Ditto.
626         (set_parm_default_def_partition): Ditto.
627         (get_parm_default_def_partitions): Ditto and make it static.
628         (get_undefined_value_partitions): Ditto and make it static.
629         (coalesce_with_default, coalesce_with_default): Update comment.
630         (create_coalesce_list_for_region): New func factored out from
631         create_outofssa_var_map.
632         (populate_coalesce_list_for_outofssa): New func factored out from
633         create_outofssa_var_map and coalesce_ssa_name.
634         (create_outofssa_var_map): Delete.
635         (coalesce_ssa_name): Refactor to support live range computation.
636         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
637         (get_parm_default_def_partitions): Delete.
638         (get_undefined_value_partitions): Ditto.
639         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
640         computation for loop region.
641         (new_tree_live_info, loe_visit_block): Ditto.
642         (live_worklist, set_var_live_on_entry): Ditto.
643         (calculate_live_on_exit, verify_live_on_entry): Ditto.
644         * tree-ssa-live.h (struct _var_map): New fields.
645         (init_var_map): Change decl.
646         (region_contains_p): New.
648 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
650         * tree-ssa-live.h (live_merge_and_clear): Delete.
652 2018-05-25  Richard Biener  <rguenther@suse.de>
654         PR c++/85912
655         * tree-dump.c (dequeue_and_dump): Remove access to removed
656         operand 2 of a SWITCH_EXPR.
658 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
660         * doc/sourcebuild.texi (vect_double_cond_arith): Include
661         multiplication and division.
662         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
663         (cond_udiv@var{m}, cond_umod@var{m}): Document.
664         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
665         (cond_udiv_optab, cond_umod_optab): New optabs.
666         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
667         (IFN_COND_RDIV): New internal functions.
668         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
669         TRUNC_MOD_EXPR and RDIV_EXPR.
670         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
671         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
672         New unspecs.
673         (SVE_INT_BINARY): Include mult.
674         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
675         (optab, sve_int_op): Handle mult.
676         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
677         UNSPEC_COND_DIV.
678         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
679         for SVE_INT_BINARY_SD.
681 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
683         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
684         (optab, sve_int_op): Handle div and udiv.
685         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
686         for SVE_INT_BINARY_SD.
687         (*<optab><mode>3): New insn for the same.
689 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
691         * tree-vect-patterns.c: Include predict.h.
692         (vect_recog_divmod_pattern): Restrict check for division support
693         to when optimizing for size.
695 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
697         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
698         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
699         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
700         (gimple_match_op::set_op): Likewise.
701         (gimple_resimplify4): Declare.
702         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
703         (expr::gen_transform): Likewise.
704         (decision_tree::gen): Generate a simplification routine for 4 operands.
705         * gimple-match-head.c (gimple_simplify): Add an overload for
706         4 operands.  In the top-level function, handle up to 4 call
707         arguments and call gimple_resimplify4.
708         (gimple_resimplify4): New function.
709         (build_call_internal): Pass a fourth operand.
710         (maybe_push_to_seq): Likewise.
711         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
712         Fold VEC_COND_EXPRs of an operation and a default value into
713         an IFN_COND_* function if possible.
714         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
715         New unspecs.
716         (SVE_COND_FP_BINARY): Include them.
717         (optab, sve_fp_op): Handle them.
718         (SVE_INT_BINARY_REV): New code iterator.
719         (SVE_COND_FP_BINARY_REV): New int iterator.
720         (commutative): New int attribute.
721         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
722         Declare.
723         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
724         function.
725         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
726         (*cond_<optab><mode>): New patterns for reversed operands.
728 2018-05-25  Richard Biener  <rguenther@suse.de>
730         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
731         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
732         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
733         (STMT_VINFO_GROUPED_ACCESS): Adjust.
734         * tree-vect-data-refs.c (everywhere): Adjust users.
735         * tree-vect-loop.c (everywhere): Likewise.
736         * tree-vect-slp.c (everywhere): Likewise.
737         * tree-vect-stmts.c (everywhere): Likewise.
738         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
740 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
742         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
743         Rename to...
744         (gcc_cv_as_section_exclude): ... this.
745         Try Solaris as #exclude syntax.
746         * configure: Regenerate.
747         * config.in: Regenerate.
748         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
749         SECTION_EXCLUDE.
750         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
751         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
753         * varasm.c (default_elf_asm_named_section): Don't check if
754         HAVE_GAS_SECTION_EXCLUDE is defined.
756 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
758         * doc/md.texi: Update the documentation of the cond_* optabs
759         to mention the new final operand.  Fix GET_MODE_NUNITS call.
760         Describe the scalar case too.
761         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
762         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
763         instead of 2.
764         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
765         (get_conditional_internal_fn): Update comment.
766         * tree-vect-loop.c (vectorizable_reduction): Pass the original
767         accumulator value as a final argument to conditional functions.
768         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
769         a define_expand and add an "else" operand.  Assert for now that
770         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
771         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
772         (*cond_<optab><mode>): New patterns.
773         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
774         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
775         (UNSPEC_COND_EOR): Delete.
776         (optab): Remove associated mappings.
777         (SVE_INT_BINARY): New code iterator.
778         (sve_int_op): Remove int attribute and add "minus" to the code
779         attribute.
780         (SVE_COND_INT_OP): Delete.
781         (SVE_COND_FP_OP): Rename to...
782         (SVE_COND_FP_BINARY): ...this.
784 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
786         * optabs.c (can_reuse_operands_p): New function.
787         (maybe_legitimize_operands): Try to reuse the results for
788         earlier operands.
790 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
792         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
793         Add {q} suffix to insn mnemonic.
795 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
797         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
798         (msp430_warn_func_return): New.
800 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
802         * fold-const.c (tree_nonzero_bits): New function.
803         * fold-const.h (tree_nonzero_bits): Likewise.
804         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
805         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
807 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
809         PR target/85900
810         PR target/85345
811         * varasm.c (assemble_alias): Check ifunc_resolver only on
812         FUNCTION_DECL.
814 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
816         PR target/85903
817         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
818         when memory input operand is handled.
820 2018-05-24  Luis Machado  <luis.machado@linaro.org>
822         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
823         global.
824         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
826 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
828         * match.pd: Delay FMA folds until after vectorization.
830 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
832         PR target/83009
833         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
834         address check not strict.
836 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
838         * gimple-match.h (gimple_match_op): New class.
839         (mprts_hook): Replace parameters with a gimple_match_op *.
840         (maybe_build_generic_op): Likewise.
841         (gimple_simplified_result_is_gimple_val): Replace parameters with
842         a const gimple_match_op *.
843         (gimple_simplify): Replace code_helper * and tree * parameters with
844         a gimple_match_op * parameter.
845         (gimple_resimplify1): Replace code_helper *, tree and tree *
846         parameters with a gimple_match_op * parameter.
847         (gimple_resimplify2): Likewise.
848         (gimple_resimplify3): Likewise.
849         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
850         parameters with a gimple_match_op * parameter.
851         * gimple-match-head.c (gimple_simplify): Change prototypes of
852         auto-generated functions to take a gimple_match_op * instead of
853         separate code_helper * and tree * parameters.  Make the same
854         change in the top-level overload and update calls to the
855         gimple_resimplify routines.  Update calls to the auto-generated
856         functions and to maybe_push_res_to_seq in the publicly-facing
857         operation-specific gimple_simplify overloads.
858         (gimple_match_op::MAX_NUM_OPS): Define.
859         (gimple_resimplify1): Replace rcode and ops with a single res_op
860         parameter.  Update call to gimple_simplify.
861         (gimple_resimplify2): Likewise.
862         (gimple_resimplify3): Likewise.
863         (mprts_hook): Replace parameters with a gimple_match_op *.
864         (maybe_build_generic_op): Likewise.
865         (build_call_internal): Replace type, nargs and ops with
866         a gimple_match_op *.
867         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
868         with a single gimple_match_op *.  Update calls to mprts_hook,
869         build_call_internal and gimple_simplified_result_is_gimple_val.
870         Factor out code that is common to the tree_code and combined_fn cases.
871         * genmatch.c (expr::gen_transform): Replace tem_code and
872         tem_ops with a gimple_match_op called tem_op.  Update calls
873         to the gimple_resimplify functions and maybe_push_res_to_seq.
874         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
875         res_ops.  Update call to the gimple_resimplify functions.
876         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
877         (decision_tree::gen): Make the functions take a gimple_match_op *
878         called res_op instead of separate res_code and res_ops parameters.
879         Update call accordingly.
880         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
881         and ops with a single res_op parameter.  Update calls to
882         maybe_build_generic_op and maybe_push_res_to_seq.
883         (fold_stmt_1): Update calls to gimple_simplify and
884         replace_stmt_with_simplification.
885         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
886         and gimple_simplified_result_is_gimple_val.
887         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
888         gimple_simplify.
889         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
890         with a gimple_match_op *.
891         (vn_nary_build_or_lookup): Likewise.  Update call to
892         vn_nary_build_or_lookup_1.
893         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
894         gimple_match_op *.  Update calls to the gimple_resimplify routines
895         and to gimple_simplified_result_is_gimple_val.
896         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
897         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
898         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
899         (visit_nary_op): Likewise.
900         (visit_reference_op_load): Likewise.
902 2018-05-23  Luis Machado  <luis.machado@linaro.org>
904         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
905         modifier for printing the step amount.
907 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
909         PR target/78849
910         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
911         types.
913 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
915         * doc/sourcebuild.texi (Endianness): New subsubsection.
917 2018-05-23  Luis Machado  <luis.machado@linaro.org>
919         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
920         <prefetch_dynamic_strides>: New const bool field.
921         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
922         prefetch_dynamic_strides.
923         (exynosm1_prefetch_tune): Likewise.
924         (thunderxt88_prefetch_tune): Likewise.
925         (thunderx_prefetch_tune): Likewise.
926         (thunderx2t99_prefetch_tune): Likewise.
927         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
928         false.
929         (aarch64_override_options_internal): Update to set
930         PARAM_PREFETCH_DYNAMIC_STRIDES.
931         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
932         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
933         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
934         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
935         prefetch-dynamic-strides setting.
937 2018-05-23  Luis Machado  <luis.machado@linaro.org>
939         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
940         <minimum_stride>: New const int field.
941         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
942         minimum_stride field defaulting to -1.
943         (exynosm1_prefetch_tune): Likewise.
944         (thunderxt88_prefetch_tune): Likewise.
945         (thunderx_prefetch_tune): Likewise.
946         (thunderx2t99_prefetch_tune): Likewise.
947         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
948         <default_opt_level>: Set to 3.
949         (aarch64_override_options_internal): Update to set
950         PARAM_PREFETCH_MINIMUM_STRIDE.
951         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
952         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
953         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
954         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
955         stride is constant and is below the minimum stride threshold.
957 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
959         * config/arm/arm-cpus.in (mode26): Delete.
960         (armv4): Delete mode26 reference.
961         * config/arm/arm.c (arm_configure_build_target): Delete use of
962         isa_bit_mode26.
964 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
966         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
967         New insn pattern.
968         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
969         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
970         for non-SSE modes.
971         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
972         (floatunsdidf2): Ditto.
974 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
976         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
977         (fixuns_trunc<mode>si2_avx512f): Ditto.
978         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
979         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
980         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
982 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
984         PR rtl-optimization/79985
985         * df-scan.c (df_insn_refs_collect): Remove special case for
986         global registers and asm statements.
988 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
990         * extend.texi (Global Register Variables): Rewrite the bullet list.
991         Note that the register is available for allocation. Note that access
992         via inline asm must use constraints. Add note about async-signal
993         handlers. Remove paragraph about automagic register selection.
995 2018-05-23  Richard Biener  <rguenther@suse.de>
997         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
998         of fixed offset from memset VN.
1000 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
1002         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
1003         first_interp field.
1004         (alloc_cand_and_find_basis): Initialize first_interp field.
1005         (slsr_process_mul): Modify first_interp field.
1006         (slsr_process_add): Likewise.
1007         (slsr_process_cast): Modify first_interp field for each new
1008         interpretation.
1009         (slsr_process_copy): Likewise.
1010         (dump_candidate): Dump first_interp field.
1011         (replace_mult_candidate): Process all interpretations, not just
1012         subsequent ones.
1013         (replace_rhs_if_not_dup): Likewise.
1014         (replace_one_candidate): Likewise.
1016 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
1018         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
1019         Add new boolean.
1020         (aarch64_needs_frame_chain): New function.
1021         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
1023 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
1025         PR target/84882
1026         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
1027         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
1028         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
1029         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
1030         as true for strict-align.
1031         (aarch64_can_inline_p): Perform checks even when callee has no
1032         attributes to check for strict alignment.
1033         * doc/extend.texi (AArch64 Function Attributes): Document
1034         no-strict-align.
1035         * doc/invoke.texi: (AArch64 Options): Likewise.
1037 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
1039         PR tree-optimization/85853
1040         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
1041         the handling of the root of the node to...
1042         (vect_slp_analyze_node_operations_1): ...this new function,
1043         and run the whole thing with the child nodes' def types
1044         set according to their SLP node's def type.
1046 2018-05-23  Richard Biener  <rguenther@suse.de>
1048         PR middle-end/85874
1049         * tree-data-ref.c (create_runtime_alias_checks): Defer
1050         and ignore overflow warnings.
1052 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
1054         PR tree-optimization/85822
1055         * tree-vrp.c (is_masked_range_test): Fix handling of negative
1056         constants.
1058 2018-05-23  Richard Biener  <rguenther@suse.de>
1060         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
1061         memset constants via native_interpret_expr.
1063 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
1065         PR target/85345
1066         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
1067         attribute.
1068         (cgraph_node::create_alias): Likewise.
1069         (cgraph_node::get_availability): Check ifunc_resolver instead
1070         of looking up ifunc attribute.
1071         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1072         * varasm.c (do_assemble_alias): Likewise.
1073         (assemble_alias): Likewise.
1074         (default_binds_local_p_3): Likewise.
1075         * cgraph.h (cgraph_node): Add ifunc_resolver.
1076         (cgraph_node::only_called_directly_or_aliased_p): Return false
1077         for IFUNC resolver.
1078         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
1079         attribute.
1080         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
1081         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
1082         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
1083         instead of looking up ifunc attribute.
1085 2018-05-22  Luis Machado  <luis.machado@linaro.org>
1087         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
1089 2018-05-22  Martin Sebor  <msebor@redhat.com>
1091         PR middle-end/85359
1092         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
1093         only when expasion succeeds.
1094         (expand_builtin_strcmp): Same.
1095         (expand_builtin_strncmp): Same.
1097 2018-05-22  Martin Sebor  <msebor@redhat.com>
1099         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
1101 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
1102             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1104         * config/aarch64/aarch64-ldpstp.md: Replace uses of
1105         aarch64_mem_pair_operand with memory_operand and delete operand swapping
1106         code.
1107         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1108         Add check for legitimate_address.
1109         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
1110         (aarch64_swap_ldrstr_operands): New.
1111         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
1112         Define prototype.
1114 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
1115             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1117         * config/aarch64/aarch64.md: New patterns to generate stp
1118         and ldp.
1119         (store_pair_sw, store_pair_dw): New patterns to generate stp for
1120         single words and double words.
1121         (load_pair_sw, load_pair_dw): Likewise.
1122         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
1123         Delete.
1124         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
1125         Delete.
1126         * config/aarch64/aarch64-ldpstp.md: Modify peephole
1127         for different mode ldpstp and add peephole for merged zero stores.
1128         Likewise for loads.
1129         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1130         Add size check.
1131         (aarch64_gen_store_pair): Rename calls to match new patterns.
1132         (aarch64_gen_load_pair): Rename calls to match new patterns.
1133         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
1134         (load_pair<DREG:mode><DREG2:mode>): ... This.
1135         (store_pair<mode>): Rename to...
1136         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
1137         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
1138         New mode iterators.
1139         (V_INT_EQUIV): Handle SImode.
1140         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
1141         New predicate.
1143 2018-05-22  Martin Sebor  <msebor@redhat.com>
1145         PR c/85623
1146         * calls.c (maybe_warn_nonstring_arg): Use string length to set
1147         or ajust the presumed bound on an operation to avoid unnecessary
1148         warnings.
1150 2018-05-22  Martin Sebor  <msebor@redhat.com>
1152         PR tree-optimization/85826
1153         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
1154         assuming that a DECL necesarily has a constant size.
1156 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
1158         PR middle-end/85862
1159         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
1161 2018-05-22  Richard Biener  <rguenther@suse.de>
1163         PR tree-optimization/85834
1164         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
1165         non-constant and non-zero memset arguments.
1167 2018-05-22  Martin Liska  <mliska@suse.cz>
1169         PR ipa/85607
1170         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
1172 2018-05-22  Richard Biener  <rguenther@suse.de>
1174         PR tree-optimization/85863
1175         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
1176         comparisons when vectype is specified.
1177         (vectorizable_condition): Do not specify vectype for
1178         vect_is_simple_cond when SLP vectorizing.
1180 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
1182         PR target/85657
1183         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
1184         define __ibm128 as long double.
1185         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
1186         as a distinct type when IEEE 128-bit support is enabled.
1187         (init_float128_ieee): Fix up conversions between IFmode and IEEE
1188         128-bit types to use the correct functions.
1189         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
1190         convert between 128-bit floating point types that have different
1191         modes but the same representation, instead of using gen_lowpart to
1192         makean alias.
1193         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
1194         KFmode.
1195         (IFKF_reg): New attributes to give the register constraints for
1196         IFmode and KFmode.
1197         (extend<mode>tf2_internal): New insns to mark an explicit
1198         conversion between 128-bit floating point types that have a
1199         different mode but share the same representation.
1201 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
1203         PR tree-optimization/85814
1204         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
1205         a null return from get_strinfo when unsharing the next
1206         strinfo in the chain.
1208 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
1210         PR gcc/84923
1211         * varasm.c (weak_finish): Clean up weak_decls.
1213 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1215         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
1216         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
1217         UNSPEC_UADALP values.
1218         * config/aarch64/iterators.md (ABAL): New int iterator.
1219         (ABDL2): Likewise.
1220         (ADALP): Likewise.
1221         (sur): Add mappings for the above.
1222         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
1223         New define_insn.
1224         (aarch64_<sur>abal<mode>_4): Likewise.
1225         (aarch64_<sur>adalp<mode>_3): Likewise.
1226         (<sur>sadv16qi): New define_expand.
1228 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
1230         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
1231         (*movdf_internal): Ditto.
1232         (*rcpsf2_sse): Ditto.
1233         (*rsqrtsf2_sse): Ditto.
1234         (*sqrt<mode>2_sse): Ditto.
1236 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
1238         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
1239         eor3q<mode>4.
1240         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
1241         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
1242         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
1243         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
1244         vbcaxq_s64): New.
1245         * config/aarch64/arm_neon.h: Likewise.
1246         * config/aarch64/iterators.md (VQ_I): New.
1248 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
1250         * config.gcc: Add arc/t-multilib-linux to tmake_file for
1251         arc*-*-linux*.
1252         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
1253         MULTILIB_DIRNAMES
1255 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1257         * config/nds32/constraints.md (S): New constraint.
1258         * config/nds32/nds32.md (call_internal): Use constraint S.
1259         (call_value_internal): Likewise.
1260         (sibcall_internal): Likewise.
1261         (sibcall_value_internal): Likewise.
1263 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1264             Chung-Ju Wu  <jasonwucj@gmail.com>
1266         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
1267         into consideration.
1269 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1270             Chung-Ju Wu  <jasonwucj@gmail.com>
1272         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
1273         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
1274         (nds32_rtx_costs_impl): Simplify.
1275         (nds32_address_cost_impl): Simplify.
1276         (nds32_init_rtx_costs): New function.
1277         (nds32_rtx_costs_speed_prefer): Likewise.
1278         (nds32_rtx_costs_size_prefer): Likewise.
1279         (nds32_address_cost_speed_prefer): Likewise.
1280         (nds32_address_cost_speed_fwprop): Likewise.
1281         (nds32_address_cost_size_prefer): Likewise.
1282         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
1283         * config/nds32/nds32.c (nds32_option_override): Use
1284         nds32_init_rtx_costs function.
1286 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1288         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
1289         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
1290         (TARGET_PIPELINE_N8): Likewise.
1291         (TARGET_PIPELINE_N10): Likewise.
1292         (TARGET_PIPELINE_N13): Likewise.
1293         (TARGET_PIPELINE_GRAYWOLF): Likewise.
1295 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
1297         * config/nds32/nds32-fpu.md: Update copyright year.
1299 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1301         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
1303 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1305         * config/nds32/nds32.c
1306         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
1307         * config/nds32/nds32.opt (minline-asm-r15): New option.
1309 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1311         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
1312         MASK_HW_ABS.
1313         * config/nds32/nds32.md (abssi2): New pattern.
1315 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
1317         * config/i386/i386.md (rex64namesuffix): New mode attribute.
1318         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
1319         Merge insn pattern from sse_cvtsi2ss<round_name> and
1320         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
1321         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
1322         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
1323         using SWI48 mode iterator.
1324         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
1325         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
1326         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
1327         pattern from sse_cvttss2si<round_saeonly_name>
1328         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
1329         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
1330         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
1331         using SWI48 mode iterator.
1332         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
1333         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
1334         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
1335         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
1336         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
1337         using SWI48 mode iterator.
1338         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
1339         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
1340         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
1341         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
1342         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
1343         SWI48 mode iterator.
1344         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
1345         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
1346         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
1347         pattern from sse_cvttsd2si<round_saeonly_name>
1348         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
1350 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1352         * config/nds32/nds32-md-auxiliary.c
1353         (nds32_valid_smw_lwm_base_p): Refine.
1354         (nds32_output_smw_single_word): Refine.
1355         (nds32_output_smw_double_word): New.
1356         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
1358 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1360         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
1361         (nds32_output_stack_pop): Refine.
1362         (nds32_expand_unaligned_load): Refine.
1363         (nds32_expand_unaligned_store): Refine.
1365 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1366             Chung-Ju Wu  <jasonwucj@gmail.com>
1368         * config/nds32/constants.md: Add TP_REGNUM constant.
1369         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
1370         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
1371         UNSPEC_ADD32.
1372         * config/nds32/nds32-doubleword.md: Consider flag_pic.
1373         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
1374         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
1375         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
1376         and PIC code generation.
1377         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
1378         code generation.
1379         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
1380         optimization.
1381         * config/nds32/nds32.md: Support TLS and PIC.
1382         * config/nds32/nds32.c: Support TLS and PIC.
1383         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
1384         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
1385         predicate.
1387 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1389         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
1390         mode with E_ prefix.
1392 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1393             Chung-Ju Wu  <jasonwucj@gmail.com>
1395         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
1396         * config/nds32/nds32-md-auxiliary.c
1397         (symbolic_reference_mentioned_p): New.
1398         (nds32_legitimize_ict_address): New.
1399         (nds32_expand_ict_move): New.
1400         (nds32_indirect_call_referenced_p): New.
1401         (nds32_symbol_binds_local_p): Delete.
1402         (nds32_long_call_p): Modify.
1403         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
1404         * config/nds32/nds32-protos.h
1405         (symbolic_reference_mentioned_p): Declare.
1406         (nds32_legitimize_ict_address): Declare.
1407         (nds32_expand_ict_move): Declare.
1408         (nds32_indirect_call_referenced_p): Declare.
1409         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
1410         (nds32_relax_group): Use nds32_ict_const_p as condition.
1411         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
1412         (nds32_asm_file_start): Output ict_model directive in asm code.
1413         (nds32_legitimate_address_p): Consider indirect call.
1414         (nds32_print_operand): Consider indirect call.
1415         (nds32_print_operand_address): Consider indirect call.
1416         (nds32_insert_attributes): Handle "indirect_call" attribute.
1417         (TARGET_LEGITIMATE_ADDRESS_P): Define.
1418         (TARGET_LEGITIMATE_CONSTANT_P): Define.
1419         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1420         (TARGET_DELEGITIMIZE_ADDRESS): Define.
1421         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
1422         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
1423         (TARGET_ICT_MODEL_SMALL): Define.
1424         (TARGET_ICT_MODEL_LARGE): Define.
1425         * config/nds32/nds32.md (movsi): Consider ict model.
1426         (call, call_value): Consider ict model.
1427         (sibcall, sibcall_value): Consider ict model.
1428         * config/nds32/nds32.opt (mict-model): New option.
1429         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
1430         model.
1432 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
1433             Monk Chiang  <sh.chiang04@gmail.com>
1434             Jim Wilson <jimw@sifive.com>
1436         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
1437         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
1438         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
1439         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
1440         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
1441         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
1442         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
1443         compute save_libcall_adjustment properly.
1444         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
1445         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
1446         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
1447         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
1448         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1449         (ABI_SPEC): Handle mabi=ilp32e.
1450         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1451         (RVE): Add RVE mask.
1452         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1453         <-march>: Add rv32e as an example.
1455 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
1457         PR c++/82899
1458         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1459         (intra_create_variable_infos): Handle C++ constructors.
1461 2018-05-18  Martin Liska  <mliska@suse.cz>
1463         * passes.def: Remove a redundant pass.
1465 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
1467         PR bootstrap/85838
1468         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1470 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1472         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1473         (ARMv4): Update.
1474         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1475         (ARMv6m): Update.
1476         (armv2, armv2a, armv3, armv3m): Delete architectures.
1477         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1478         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1479         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1480         Delete cpus.
1481         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1482         (*mulsidi3adddi): Likewise.
1483         (mulsidi3): Likewise.
1484         (*mulsidi3_nov6): Likewise.
1485         (umulsidi3): Likewise.
1486         (umulsidi3_nov6): Likewise.
1487         (umaddsidi4): Likewise.
1488         (*umulsidi3adddi): Likewise.
1489         (smulsi3_highpart): Likewise.
1490         (*smulsi3_highpart_nov6): Likewise.
1491         (umulsi3_highpart): Likewise.
1492         (*umulsi3_highpart_nov6): Likewise.
1493         * config/arm/arm.h (arm_arch3m): Delete.
1494         * config/arm/arm.c (arm_arch3m): Delete.
1495         (arm_option_override_internal): Update armv3-related comment.
1496         (arm_configure_build_target): Delete use of isa_bit_mode32.
1497         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1498         (arm_rtx_costs_internal): Delete check of arm_arch3m.
1499         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1500         (mulsa3): Likewise.
1501         (mulusa3): Likewise.
1502         * config/arm/arm-protos.h (arm_arch3m): Delete.
1503         * config/arm/arm-tables.opt: Regenerate.
1504         * config/arm/arm-tune.md: Likewise.
1505         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
1506         deleted architectures.
1508 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1510         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
1511         (armv5t, armv5te): New features.
1512         (ARMv5, ARMv5e): Delete fgroups.
1513         (ARMv5t, ARMv5te): Adjust for above changes.
1514         (ARMv6m): Likewise.
1515         (armv5, armv5e): Delete arches.
1516         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
1517         arm_arch5.
1518         (*call_reg_arm): Likewise.
1519         (*call_value_reg_armv5): Likewise.
1520         (*call_value_reg_arm): Likewise.
1521         (*call_symbol): Likewise.
1522         (*call_value_symbol): Likewise.
1523         (*sibcall_insn): Likewise.
1524         (*sibcall_value_insn): Likewise.
1525         (clzsi2): Likewise.
1526         (prefetch): Likewise.
1527         (define_split and define_peephole2 dependent on arm_arch5):
1528         Likewise.
1529         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
1530         arm_arch5e.
1531         (TARGET_ARM_QBIT): Likewise.
1532         (TARGET_DSP_MULTIPLY): Likewise.
1533         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
1534         (arm_arch5, arm_arch5e): Delete.
1535         (arm_arch5t, arm_arch5te): Declare.
1536         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
1537         (arm_arch5t): Declare.
1538         (arm_option_reconfigure_globals): Update for the above.
1539         (arm_options_perform_arch_sanity_checks): Update comment, replace
1540         use of arm_arch5 with arm_arch5t.
1541         (use_return_insn): Likewise.
1542         (arm_emit_call_insn): Likewise.
1543         (output_return_instruction): Likewise.
1544         (arm_final_prescan_insn): Likewise.
1545         (arm_coproc_builtin_available): Likewise.
1546         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
1547         arm_arch5e with arm_arch5t and arm_arch5te.
1548         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
1549         (arm_arch5t, arm_arch5te): Declare.
1550         * config/arm/arm-tables.opt: Regenerate.
1551         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
1552         * config/arm/t-multilib: Likewise.
1553         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
1554         instead of arm_arch5.
1555         (*call_reg_thumb1): Likewise.
1556         (*call_value_reg_thumb1_v5): Likewise.
1557         (*call_value_reg_thumb1): Likewise.
1558         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
1559         unreachable path.
1560         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
1562 2018-05-18  Martin Liska  <mliska@suse.cz>
1564         PR gcov-profile/84846
1565         * doc/gcov.texi: Document -t option of gcov tool.
1567 2018-05-18  Martin Liska  <mliska@suse.cz>
1569         PR gcov-profile/84846
1570         * gcov.c (print_usage): Add new -t option.
1571         (process_args): Handle the option.
1572         (generate_results): Use stdout as output when requested by
1573         the option.
1575 2018-05-18  Martin Liska  <mliska@suse.cz>
1577         PR gcov-profile/84846
1578         * coverage.c (coverage_init): Write PWD to .gcno file.
1579         * doc/gcov.texi: Document how working directory is printed.
1580         * gcov-dump.c (dump_gcov_file): Print PWD.
1581         * gcov.c (output_intermediate_file): Likewise.
1582         (read_graph_file): Read PWD string.
1583         (output_lines): Print PWD.
1585 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1587         PR middle-end/85817
1588         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1589         for retval and return false if all args to phi are zero.        
1591 2018-05-18  Richard Biener  <rguenther@suse.de>
1593         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1594         method.
1595         (evrp_dom_walker::before_dom_children): Call it.
1597 2018-05-18  Richard Biener  <rguenther@suse.de>
1599         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1600         results when processing array refs with variable index.
1602 2018-05-18  Toon Moene  <toon@moene.org>
1604         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1605         directly after that of -floop-interchange. Indicate that both
1606         options are enabled by default when specifying -O3. 
1608 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1610         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1611         iterator.  Delete separate integer-mode vec_set<mode> expander.
1612         (aarch64_simd_vec_setv2di): Delete.
1613         (vec_setv2di): Delete.
1614         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1615         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
1616         the "w, r" alternative.
1618 2018-05-18  Martin Liska  <mliska@suse.cz>
1620         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1621         * tree-pass.h (make_pass_lower_switch_O0): New function.
1622         * tree-switch-conversion.c (node_has_low_bound): Remove.
1623         (node_has_high_bound): Likewise.
1624         (node_is_bounded): Likewise.
1625         (class pass_lower_switch): Make it a template type and create
1626         two instances.
1627         (pass_lower_switch::execute): Add template argument.
1628         (make_pass_lower_switch): New function.
1629         (make_pass_lower_switch_O0): New function.
1630         (do_jump_if_equal): Remove.
1631         (emit_case_nodes): Simplify to just handle all 3 cases and leave
1632         all the hard work to tree optimization passes.
1634 2018-05-18  Martin Liska  <mliska@suse.cz>
1636         * dbgcnt.c (limit_low): Renamed from limit.
1637         (limit_high): New variable.
1638         (dbg_cnt_is_enabled): Check for upper limit.
1639         (dbg_cnt): Adjust dumping.
1640         (dbg_cnt_set_limit_by_index): Add new argument for high
1641         value.
1642         (dbg_cnt_set_limit_by_name): Likewise.
1643         (dbg_cnt_process_single_pair): Parse new format.
1644         (dbg_cnt_process_opt): Use strtok.
1645         (dbg_cnt_list_all_counters): Remove 'value' and add
1646         'limit_high'.
1647         * doc/invoke.texi: Document changes.
1649 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
1651         * doc/sourcebuild.texi (scalar_all_fma): Document.
1652         * tree.def (FMA_EXPR): Delete.
1653         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1654         * internal-fn.c (ternary_direct): New macro.
1655         (expand_ternary_optab_fn): Likewise.
1656         (direct_ternary_optab_supported_p): Likewise.
1657         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1658         * builtins.c (fold_builtin_fma): Delete.
1659         (fold_builtin_3): Don't call it.
1660         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1661         * expr.c (expand_expr_real_2): Likewise.
1662         * fold-const.c (operand_equal_p): Likewise.
1663         (fold_ternary_loc): Likewise.
1664         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1665         * gimple.c (DEFTREECODE): Likewise.
1666         * gimplify.c (gimplify_expr): Likewise.
1667         * optabs-tree.c (optab_for_tree_code): Likewise.
1668         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1669         * tree-eh.c (operation_could_trap_p): Likewise.
1670         (stmt_could_throw_1_p): Likewise.
1671         * tree-inline.c (estimate_operator_cost): Likewise.
1672         * tree-pretty-print.c (dump_generic_node): Likewise.
1673         (op_code_prio): Likewise.
1674         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1675         * tree-ssa-operands.c (get_expr_operands): Likewise.
1676         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1677         * fold-const-call.h (fold_fma): Delete.
1678         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1679         CFN_FNMA and CFN_FNMS.
1680         (fold_fma): Delete.
1681         * genmatch.c (combined_fn): New enum.
1682         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1683         (commutative_op): New function.
1684         (commutate): Use it.  Handle more than 2 operands.
1685         (dt_operand::gen_gimple_expr): Use commutative_op.
1686         (parser::parse_expr): Allow :c to be used with non-binary
1687         operators if the commutative operand is known.
1688         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1689         CFN_FMS, CFN_FNMA and CFN_FNMS.
1690         (backprop::process_assign_use): Remove FMA_EXPR handling.
1691         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1692         (gen_hsa_fma): New function.
1693         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1694         IFN_FNMA and IFN_FNMS.
1695         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1696         * gimple-fold.h (follow_all_ssa_edges): Declare.
1697         * gimple-fold.c (follow_all_ssa_edges): New function.
1698         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1699         gimple_build interface and use follow_all_ssa_edges to fold the result.
1700         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1701         instead of checking for optabs directly.
1702         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1703         rather than FMA_EXPRs.
1704         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1705         call to IFN_FMA instead of an FMA_EXPR.
1707 2018-05-17  Jim Wilson  <jimw@sifive.com>
1709         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1710         sign extended promoted subreg, and the range does not have the sign bit
1711         set, then do a sign extend.
1713         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1714         test, check for sign extended subreg and/or constant operands, and
1715         do a sign extend in that case.
1717 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1719         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1720         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1721         Add untyped.
1722         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1723         Change logics_shift_reg to logics_shift_imm.
1724         (thunderx2t99_fp_loadpair_basic): Delete.
1725         (thunderx2t99_fp_storepair_basic): Delete.
1726         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1727         (thunderx2t99_asimd_polynomial): Delete.
1728         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1729         and neon_fp_mul_d_scalar_q.
1730         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1731         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1732         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1733         (thunderx2t99_asimd_lut): Add missing tbl types.
1734         (thunderx2t99_asimd_ext): Delete.
1735         (thunderx2t99_asimd_load1_1_mult): Delete.
1736         (thunderx2t99_asimd_load1_2_mult): Delete.
1737         (thunderx2t99_asimd_load1_ldp): New.
1738         (thunderx2t99_asimd_load1): New.
1739         (thunderx2t99_asimd_load2): Add missing *load2* types.
1740         (thunderx2t99_asimd_load3): New.
1741         (thunderx2t99_asimd_load4): New.
1742         (thunderx2t99_asimd_store1_1_mult): Delete.
1743         (thunderx2t99_asimd_store1_2_mult): Delete.
1744         (thunderx2t99_asimd_store2_mult): Delete.
1745         (thunderx2t99_asimd_store2_onelane): Delete.
1746         (thunderx2t99_asimd_store_stp): New.
1747         (thunderx2t99_asimd_store1): New.
1748         (thunderx2t99_asimd_store2): New.
1749         (thunderx2t99_asimd_store3): New.
1750         (thunderx2t99_asimd_store4): New.
1752 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1754         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1755         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1757 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1758             Segher Boessenkool  <segher@kernel.crashing.org>
1760         PR target/85698
1761         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1762         operand.
1764 2018-05-17  Richard Biener  <rguenther@suse.de>
1766         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1767         for pruning loop and prune defs feeding only already visited PHIs.
1769 2018-05-17  Richard Biener  <rguenther@suse.de>
1771         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1773 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1774             Richard Biener  <rguenther@suse.de>
1776         PR tree-optimization/85793
1777         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1778         for VMAT_ELEMENTWISE.
1780 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1782         * internal-fn.h (lookup_internal_fn): Declare
1783         * internal-fn.c (lookup_internal_fn): New function.
1784         * gimple.c (gimple_build_call_from_tree): Handle calls to
1785         internal functions.
1786         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1787         internal function names.
1788         * tree-pretty-print.c (dump_generic_node): Likewise.
1789         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1791 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1793         * gimple-fold.h (gimple_build): Make the function forms take
1794         combined_fn rather than built_in_function.
1795         (gimple_simplify): Likewise.
1796         * gimple-match-head.c (gimple_simplify): Likewise.
1797         * gimple-fold.c (gimple_build): Likewise.
1798         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1799         rather than gimple_build_call_internal.
1800         (get_initial_defs_for_reduction): Likewise.
1801         (vect_create_epilog_for_reduction): Likewise.
1802         (vectorizable_live_operation): Likewise.
1804 2018-05-17  Martin Liska  <mliska@suse.cz>
1806         * gimple-ssa-sprintf.c (format_directive): Do not use
1807         space in between 'G_' and '('.
1809 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1811         PR target/85323
1812         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1813         even if the mask is not all ones.
1815         PR target/85323
1816         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1817         vector.
1818         (ix86_gimple_fold_builtin): Likewise.
1820         PR target/85323
1821         * config/i386/i386.c: Include tree-vector-builder.h.
1822         (ix86_vector_shift_count): New function.
1823         (ix86_fold_builtin): Fold shift builtins by scalar count.
1824         (ix86_gimple_fold_builtin): Likewise.
1826         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1827         _mm512_setzero): New intrinsics.
1829 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1830             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1832         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1833         code generation for cases where splatting a value is not useful.
1834         * simplify-rtx.c (simplify_ternary_operation): Simplify
1835         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1836         mode to a vec_concat.
1838 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1840         * config.gcc: Support "goldmont-plus".
1841         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1842         "goldmont-plus".
1843         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1844         PROCESSOR_GOLDMONT_PLUS.
1845         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1846         (processor_target_table): Add "goldmont-plus".
1847         (PTA_GOLDMONT_PLUS): Define.
1848         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1849         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1850         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1851         (fold_builtin_cpu): Add "goldmont-plus".
1852         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1853         (ix86_option_override_internal): Add "goldmont-plus".
1854         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1855         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1856         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1857         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1859 2018-05-17  Richard Biener  <rguenther@suse.de>
1861         PR tree-optimization/85757
1862         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1863         remove defs that only feed that PHI from further processing.
1865 2018-05-16  Jim Wilson  <jimw@sifive.com>
1867         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1868         asterisk to name.
1869         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1871 2018-05-16  Mark Wielaard  <mark@klomp.org>
1873         * dwarf2out.c (count_index_strings): New function.
1874         (output_indirect_strings): Call count_index_strings and generate
1875         header for dwarf_version >= 5.
1877 2018-05-16  Mark Wielaard  <mark@klomp.org>
1879         * dwarf2out.c (dwarf_FORM): New function.
1880         (set_indirect_string): Use dwarf_FORM.
1881         (reset_indirect_string): Likewise.
1882         (size_of_die): Likewise.
1883         (value_format): Likewise.
1884         (output_die): Likewise.
1885         (add_skeleton_AT_string): Likewise.
1886         (output_macinfo_op): Likewise.
1887         (index_string): Likewise.
1888         (output_index_string_offset): Likewise.
1889         (output_index_string): Likewise.
1890         (count_index_strings): Likewise.
1892 2018-05-16  Carl Love  <cel@us.ibm.com>
1894         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1895         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1897 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1899         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1900         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1902 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1904         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1905         (fnma<mode>4): Likewise.
1906         (fms<mode>4): Likewise.
1907         (fnms<mode>4): Likewise.
1908         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1909         (aarch64_fnma<mode>4): Likewise.
1910         (aarch64_fms<mode>4): Likewise.
1911         (aarch64_fnms<mode>4): Likewise.
1912         (aarch64_fnmadd<mode>4): Likewise.
1914 2018-05-16  Jason Merrill  <jason@redhat.com>
1916         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1918 2018-05-16  Richard Biener  <rguenther@suse.de>
1920         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1921         (dump_stmt_cost): Declare.
1922         (add_stmt_cost): Dump cost we add.
1923         (add_stmt_costs): New function.
1924         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1925         No longer exported.
1926         (vect_analyze_stmt): Adjust prototype.
1927         (vectorizable_condition): Likewise.
1928         (vectorizable_live_operation): Likewise.
1929         (vectorizable_reduction): Likewise.
1930         (vectorizable_induction): Likewise.
1931         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1932         cost vector to pass to vectorizable_ and record afterwards.
1933         (vect_model_reduction_cost): Take cost vector argument and adjust.
1934         (vect_model_induction_cost): Likewise.
1935         (vectorizable_reduction): Likewise.
1936         (vectorizable_induction): Likewise.
1937         (vectorizable_live_operation): Likewise.
1938         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1939         SLP_TREE_NUMBER_OF_VEC_STMTS.
1940         (vect_analyze_slp_cost_1): Remove.
1941         (vect_analyze_slp_cost): Likewise.
1942         (vect_slp_analyze_node_operations): Take visited args and
1943         a target cost vector.  Avoid processing already visited stmt sets.
1944         (vect_slp_analyze_operations): Use a local cost vector to gather
1945         costs and register those of non-discarded instances.
1946         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1947         (vect_schedule_slp_instance): Remove copying of
1948         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
1949         zero.
1950         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1951         adding cost.  Record cost entry location.
1952         (vect_prologue_cost_for_slp_op): Function to compute cost of
1953         a constant or invariant generated for SLP vect in the prologue,
1954         split out from vect_analyze_slp_cost_1.
1955         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
1956         (vect_model_promotion_demotion_cost): Likewise.
1957         (vect_model_store_cost): Likewise, make static.
1958         (vect_model_load_cost): Likewise.
1959         (vectorizable_bswap): Add cost vector arg and adjust.
1960         (vectorizable_call): Likewise.
1961         (vectorizable_simd_clone_call): Likewise.
1962         (vectorizable_conversion): Likewise.
1963         (vectorizable_assignment): Likewise.
1964         (vectorizable_shift): Likewise.
1965         (vectorizable_operation): Likewise.
1966         (vectorizable_store): Likewise.
1967         (vectorizable_load): Likewise.
1968         (vectorizable_condition): Likewise.
1969         (vectorizable_comparison): Likewise.
1970         (can_vectorize_live_stmts): Likewise.
1971         (vect_analyze_stmt): Likewise.
1972         (vect_transform_stmt): Adjust calls to vectorizable_*.
1973         * tree-vectorizer.c: Include gimple-pretty-print.h.
1974         (dump_stmt_cost): New function.
1976 2018-05-16  Richard Biener  <rguenther@suse.de>
1978         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1979         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1980         * tree-ssa-dse.c: Include tree-ssa-loop.h.
1981         (check_name): New callback.
1982         (dse_classify_store): Track cycles via a visited bitmap of PHI
1983         defs and simplify handling of in-loop and across loop dead stores
1984         and properly fail for loop-variant refs.  Handle byte-tracking with
1985         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1986         limiting the walk.
1988 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
1990         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1991         (vect_get_mask_type_for_stmt): Likewise.
1992         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1993         split out from...
1994         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
1995         to determine the statement's vector type and the vector type that
1996         should be used for calculating nunits.  Deal with cases in which
1997         the type has to be deferred.
1998         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1999         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
2000         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
2001         (vect_determine_vf_for_stmt): New functions, split out from...
2002         (vect_determine_vectorization_factor): ...here.
2003         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
2004         (vect_get_mask_type_for_stmt): New functions, split out from
2005         vect_determine_vectorization_factor.
2007 2018-05-16  Richard Biener  <rguenther@suse.de>
2009         * tree-cfg.c (verify_gimple_assign_ternary): Properly
2010         verify the [VEC_]COND_EXPR embedded comparison.
2012 2018-05-15  Martin Sebor  <msebor@redhat.com>
2014         PR tree-optimization/85753
2015         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
2016         RECORD_TYPE in addition to ARRAY_TYPE.
2018 2018-05-15  Martin Sebor  <msebor@redhat.com>
2020         PR middle-end/85643
2021         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
2023 2018-05-15  Richard Biener  <rguenther@suse.de>
2025         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
2026         add by_clobber_p one.  Change algorithm to collect all defs
2027         representing uses we need to walk and try reducing them to
2028         a single one before failing.
2029         (dse_dom_walker::dse_optimize_stmt): Adjust.
2031 2018-05-13  Mark Wielaard  <mark@klomp.org>
2033         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
2034         (size_of_loc_descr): Likewise.
2035         (output_loc_operands): Likewise.
2036         (output_loc_operands_raw): Likewise.
2037         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
2038         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
2039         (hash_loc_operands): Likewise.
2040         (compare_loc_operands): Likewise.
2042 2018-05-14  Mark Wielaard  <mark@klomp.org>
2044         * dwarf2out.c (count_index_addrs): New function.
2045         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
2047 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2049         PR tree-optimization/83648
2050         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
2051         return value as malloc candidate.
2053 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2055         PR ipa/85734
2056         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
2057         as true in call to suggest_attribute.
2059 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
2061         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
2062         -mreadonly-in-sdata.
2064 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2066         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
2067         New pattern.
2068         (aarch64_crypto_aesd_fused): Likewise.
2070 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
2072         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
2073         (movsi_aarch64): Likewise.
2074         (load_pairsi): Likewise.
2075         (load_pairdi): Likewise.
2076         (store_pairsi): Likewise.
2077         (store_pairdi): Likewise.
2078         (load_pairsf): Likewise.
2079         (load_pairdf): Likewise.
2080         (store_pairsf): Likewise.
2081         (store_pairdf): Likewise.
2082         (zero_extend): Likewise.
2083         (trunc): Swap alternatives.
2084         (fcvt_target): Add '?' to prefer w over r.
2086 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
2088         PR target/85756
2089         * config/i386/i386.md: Disallow non-commutative arithmetics in
2090         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
2091         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
2092         in the peephole2 before it.
2094 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
2096         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
2097         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
2098         (ix86_handle_option): Handle -mcldemote.
2099         * config.gcc: New header.
2100         * config/i386/cldemoteintrin.h: New file.
2101         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
2102         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
2103         -mcldemote.
2104         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2105         OPTION_MASK_ISA_CLDEMOTE.
2106         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
2107         (ix86_valid_target_attribute_inner_p): Ditto.
2108         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
2109         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
2110         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
2111         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
2112         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
2113         (cldemote): New.
2114         * config/i386/i386.opt: Add -mcldemote.
2115         * config/i386/x86intrin.h: New header.
2116         * doc/invoke.texi: Add -mcldemote.
2118 2018-05-14  Richard Biener  <rguenther@suse.de>
2120         * doc/match-and-simplify.texi: Adjust :s documentation.
2122 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
2124         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
2125         intended memcpy size.
2126         (REORDER_45): Likewise.
2128 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
2130         * sort.cc: New file.
2131         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
2132         * vec.c (qsort_chk): Use gcc_qsort.
2133         * Makefile.in (OBJS-libcommon): Add sort.o.
2134         (build/sort.o): New target.  Use it...
2135         (BUILD_RTL): ... here, and...
2136         (build/gencfn-macros): ... here, and...
2137         (build/genmatch): ... here.
2139 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
2140             Chung-Ju Wu  <jasonwucj@gmail.com>
2142         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
2143         * config/nds32/nds32-graywolf.md: New file.
2144         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
2145         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
2146         pipeline.
2147         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
2148         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
2149         * config/nds32/nds32.md (pipeline_model): Add graywolf.
2150         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
2151         * config/nds32/pipelines.md: Include n15 settings.
2153 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
2154             Chung-Ju Wu  <jasonwucj@gmail.com>
2156         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
2157         * config/nds32/nds32-n13.md: New file.
2158         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
2159         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
2160         pipeline.
2161         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
2162         * config/nds32/nds32.md (pipeline_model): Add n13.
2163         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
2164         * config/nds32/pipelines.md: Include n13 settings.
2166 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
2167             Chung-Ju Wu  <jasonwucj@gmail.com>
2169         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
2170         * config/nds32/nds32-n10.md: New file.
2171         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
2172         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
2173         pipeline.
2174         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
2175         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
2176         * config/nds32/nds32.md (pipeline_model): Add n10.
2177         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
2178         * config/nds32/pipelines.md: Include n10 settings.
2180 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
2181             Kito Cheng  <kito.cheng@gmail.com>
2182             Chung-Ju Wu  <jasonwucj@gmail.com>
2184         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
2185         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2186         Add enum values for DSP extension instructions.
2187         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
2188         New constraints.
2189         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
2190         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
2191         New code iterators.
2192         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
2193         * config/nds32/nds32-dspext.md: New file for DSP implementation.
2194         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
2195         * config/nds32/nds32-intrinsic.md: Likewise.
2196         * config/nds32/nds32_intrinsic.h: Likewise.
2197         * config/nds32/nds32-md-auxiliary.c: Likewise.
2198         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
2199         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
2200         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
2201         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
2202         * config/nds32/nds32-protos.h: New declarations for DSP extension.
2203         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
2204         TYPE_DMAC in switch statement.
2205         * config/nds32/nds32.c: New checking and implementation for DSP
2206         extension instructions.
2207         * config/nds32/nds32.h: Likewise.
2208         * config/nds32/nds32.md: Likewise.
2209         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
2210         * config/nds32/predicates.md: Implement new predicates for DSP
2211         extension.
2213 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
2215         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
2216         Reformat alternatives and attributes so it is easier to identify
2217         which constraints/attributes go with which instruction.
2218         (mov<mode>_hardfloat32, FMOVE64): Likewise.
2219         (mov<mode>_softfloat32, FMOVE64): Likewise.
2220         (mov<mode>_hardfloat64, FMOVE64): Likewise.
2221         (mov<mode>_softfloat64, FMOVE64): Likewise.
2223 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2225         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2226         subsection.
2227         (Basic PowerPC Built-in Functions): The new name of the
2228         subsection previously known as "PowerPC Built-in Functions".
2229         (Basic PowerPC Built-in Functions Available on all Configurations):
2230         New subsubsection.
2231         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
2232         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
2233         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
2234         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
2236 2018-05-11  Martin Jambor  <mjambor@suse.cz>
2238         PR ipa/85655
2239         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
2240         single const.
2242 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2244         PR target/85733
2245         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
2247 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
2249         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
2250         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
2251         (ix86_handle_option): Handle -mwaitpkg.
2252         * config.gcc: New header.
2253         * config/i386/cpuid.h (bit_WAITPKG): New bit.
2254         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
2255         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
2256         function type.
2257         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2258         OPTION_MASK_ISA_WAITPKG.
2259         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
2260         (ix86_option_override_internal): Add PTA_WAITPKG.
2261         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
2262         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
2263         IX86_BUILTIN_TPAUSE.
2264         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
2265         __builtin_ia32_umwait and __builtin_ia32_tpause.
2266         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
2267         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
2268         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
2269         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
2270         UNSPECV_TPAUSE): New.
2271         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
2272         * config/i386/i386.opt: Add -mwaitpkg.
2273         * config/i386/waitpkgintrin.h: New file.
2274         * config/i386/x86intrin.h: New header.
2275         * doc/invoke.texi: Add -mwaitpkg.
2277 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2279         PR target/85606
2280         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
2281         equivalent.
2282         (cortex-m0): Use armv6s-m isa.
2283         (cortex-m0plus): Likewise.
2284         (cortex-m1): Likewise.
2285         (cortex-m0.small-multiply): Likewise.
2286         (cortex-m0plus.small-multiply): Likewise.
2287         (cortex-m1.small-multiply): Likewise.
2289 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2290             Jakub Jelinek  <jakub@redhat.com>
2292         PR tree-optimization/85692
2293         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
2294         source permute as well.
2296 2018-05-11  Martin Liska  <mliska@suse.cz>
2298         PR sanitizer/85556
2299         * doc/extend.texi: Document LLVM style format for no_sanitize
2300         attribute.
2302 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
2304         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
2305         mode_supports_vsx_dform_quad to mode_supports_dq_form.
2306         (mode_supports_vsx_dform_quad): Likewise.
2307         (mode_supports_vmx_dform): Move these functions to be next to the
2308         other mode_supports functions.
2309         (mode_supports_dq_form): Likewise.
2310         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
2311         mode_supports_dq_form.
2312         (reg_offset_addressing_ok_p): Likewise.
2313         (offsettable_ok_by_alignment): Likewise.
2314         (rs6000_legitimate_offset_address_p): Likewise.
2315         (legitimate_lo_sum_address_p): Likewise.
2316         (rs6000_legitimize_address): Likewise.
2317         (rs6000_legitimize_reload_address): Likewise.
2318         (rs6000_secondary_reload_inner): Likewise.
2319         (rs6000_preferred_reload_class): Likewise.
2320         (rs6000_output_move_128bit): Likewise.
2322 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2324         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
2325         Generate SImode target register for null target.
2326         <case IX86_BUILTIN_XGETBV>: Ditto.
2327         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
2328         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
2330 2018-05-10  Carl Love  <cel@us.ibm.com>
2332         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
2333         dcbtt and dcbtstt if operands[2] is 0.
2335 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2337         PR target/85693
2338         * config/i386/sse.md (usadv64qi): New expander.
2340 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
2342         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
2343         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
2344         -maltivec=be support.
2345         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
2346         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
2347         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
2348         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
2349         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
2350         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
2351         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
2352         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
2353         altivec_vsumsws): Adjust.
2354         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
2355         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
2356         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
2357         support.
2358         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
2359         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
2360         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
2361         (altivec_lve<VI_char>x): Delete expand.
2362         (*altivec_lve<VI_char>x_internal): Rename to...
2363         (altivec_lve<VI_char>x): ... this.
2364         (altivec_lvxl_<mode>): Delete expand.
2365         (*altivec_lvxl_<mode>_internal): Rename to ...
2366         (altivec_lvxl_<mode>): ... this.
2367         (altivec_stvxl_<mode>): Delete expand.
2368         (*altivec_stvxl_<mode>_internal): Rename to ...
2369         (altivec_stvxl_<mode>): ... this.
2370         (altivec_stve<VI_char>x): Delete expand.
2371         (*altivec_stve<VI_char>x_internal): Rename to ...
2372         (altivec_stve<VI_char>x): ... this.
2373         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
2374         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
2375         reduc_plus_scal_<mode>): Adjust.
2376         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
2377         comment.
2378         (rs6000_cpu_cpp_builtins): Adjust.
2379         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
2380         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
2381         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
2382         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
2383         -maltivec=be support.
2384         (rs6000_split_vec_extract_var): Adjust.
2385         (rs6000_split_v4si_init): Adjust.
2386         (swap_selector_for_mode): Delete.
2387         (altivec_expand_lvx_be, altivec_expand_stvx_be,
2388         altivec_expand_stvex_be): Delete.
2389         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
2390         -maltivec=be support.
2391         (rs6000_gimple_fold_builtin): Ditto.
2392         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
2393         Adjust.
2394         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
2395         (TARGET_DIRECT_MOVE_64BIT): Adjust.
2396         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
2397         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
2398         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
2399         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
2400         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
2401         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
2402         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
2403         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
2404         anonymous split): Adjust.
2405         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
2406         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
2408 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
2410         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
2411         when --with-gxx-include-dir is also specified.
2412         * configure: Regenerate.
2414 2018-05-09  Jim Wilson  <jimw@sifive.com>
2416         PR target/84797
2417         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
2418         * config/riscv/t-withmultilib: New.
2419         * config/riscv/withmultilib.h: New.
2420         * doc/install.texi: Document RISC-V --with-multilib-list support.
2422 2018-05-09  Richard Biener  <rguenther@suse.de>
2424         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
2425         vector.
2426         (vect_bb_vectorization_profitable_p): Adjust.  Compute
2427         actual scalar cost using the cost vector and the add_stmt_cost
2428         machinery.
2430 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2432         PR rtl-optimization/85645
2433         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
2434         in the REG_CFA_REGISTER note for LR, don't leave it empty.
2436 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2438         PR rtl-optimization/85645
2439         * shrink-wrap.c (spread_components): Return a boolean saying if
2440         anything was changed.
2441         (try_shrink_wrapping_separate): Iterate spread_components until
2442         nothing changes anymore.
2444 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2446         PR rtl-optimization/85645
2447         * regrename.c (build_def_use): Also kill the chains that include the
2448         destination of a REG_CFA_REGISTER note.
2450 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2452         PR rtl-optimization/85645
2453         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2454         insn that has a REG_CFA_REGISTER note.
2456 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
2458         * cfgexpand.c (expand_clobber): New function.
2459         (expand_gimple_stmt_1): Use it.
2460         * tree-vect-stmts.c (vect_clobber_variable): New function,
2461         split out from...
2462         (vectorizable_simd_clone_call): ...here.
2463         (vectorizable_store): Emit a clobber either side of an
2464         IFN_STORE_LANES sequence.
2465         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2467 2018-05-09  Tom de Vries  <tom@codesourcery.com>
2469         PR target/85626
2470         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2471         (define_insn "trap_if_false"): Add exit after trap.
2473 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2475         PR rtl-optimization/85638
2476         * bb-reorder.c: Include common/common-target.h.
2477         (create_forwarder_block): New function extracted from...
2478         (fix_up_crossing_landing_pad): ...here.  Rename into...
2479         (dw2_fix_up_crossing_landing_pad): ...this.
2480         (sjlj_fix_up_crossing_landing_pad): New function.
2481         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2482         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2483         from both partitions and exit the loop after one iteration.
2485 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2487         Revert:
2488         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2489         subsection.
2490         (Basic PowerPC Built-in Functions): The new name of the
2491         subsection previously known as "PowerPC Built-in Functions".
2492         (Basic PowerPC Built-in Functions Available on all Configurations):
2493         New subsubsection.
2494         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2495         subsubsection.
2496         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2497         subsubsection.
2498         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2499         subsubsection.
2500         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2501         subsubsection.
2503 2018-05-08  Jim Wilson  <jimw@sifive.com>
2505         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
2506         (LD_EMUL_SUFFIX): New.
2507         (LINK_SPEC): Use it.
2509 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2511         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2512         subsection.
2513         (Basic PowerPC Built-in Functions): The new name of the
2514         subsection previously known as "PowerPC Built-in Functions".
2515         (Basic PowerPC Built-in Functions Available on all Configurations):
2516         New subsubsection.
2517         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2518         subsubsection.
2519         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2520         subsubsection.
2521         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2522         subsubsection.
2523         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2524         subsubsection.
2526 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2528         PR target/85683
2529         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
2530         after cmpelim optimization.
2532 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
2534         * config.gcc: Support "goldmont".
2535         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
2536         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2537         PROCESSOR_GOLDMONT.
2538         * config/i386/i386.c (m_GOLDMONT): Define.
2539         (processor_target_table): Add "goldmont".
2540         (PTA_GOLDMONT): Define.
2541         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
2542         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
2543         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
2544         (fold_builtin_cpu): Add "goldmont".
2545         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
2546         (ix86_option_override_internal): Add "goldmont".
2547         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
2548         (processor_type): Add PROCESSOR_GOLDMONT.
2549         * config/i386/i386.md: Add CPU "glm".
2550         * config/i386/glm.md: New file.
2551         * config/i386/x86-tune.def: Add m_GOLDMONT.
2552         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2554 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2556         PR target/85572
2557         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
2558         E_V4DImode.
2559         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
2560         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
2561         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
2563         PR target/85317
2564         * config/i386/i386.c (ix86_fold_builtin): Handle
2565         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2567         PR target/85480
2568         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2569         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2571 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
2573         PR target/85658
2574         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2575         (check_arch): Likewise.
2576         (check_fpu): Return the result rather than printing it.
2577         (end arch): Fix operator precedence.
2578         (end cpu): Likewise.
2579         (END): Print the result from check_fpu.
2581 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2582             Alan Hayward  <alan.hayward@arm.com>
2583             David Sherwood  <david.sherwood@arm.com>
2585         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2586         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2587         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2588         (*fcmuo<mode>_and): New patterns.
2590 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2592         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2593         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2594         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2595         (cmp_op, sve_imm_con): New code attributes.
2596         (SVE_COND_INT_CMP, imm_con): Delete.
2597         (cmp_op): Remove above unspecs from int attribute.
2598         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2599         to...
2600         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
2601         comparison-specific unspecs.
2602         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2603         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2604         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2605         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2606         (*vec_fcm<cmp_op><mode>): Rename to...
2607         (*fcm<cmp_op><mode>): ...this and adjust likewise.
2608         (*vec_fcmuo<mode>): Rename to...
2609         (*fcmuo<mode>): ...this and adjust likewise.
2610         (*pred_fcm<cmp_op><mode>): New pattern.
2611         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2612         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2613         functions.
2614         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2615         and UNORDERED.
2616         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2617         (aarch64_emit_sve_predicated_cond): New function.
2618         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2619         (aarch64_emit_unspec_cond_or): Replace with...
2620         (aarch64_emit_sve_or_conds): ...this new function.  Use
2621         aarch64_emit_sve_ptrue_op for the individual comparisons and
2622         aarch64_emit_binop to OR them together.
2623         (aarch64_emit_inverted_unspec_cond): Replace with...
2624         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
2625         aarch64_emit_sve_ptrue_op for the comparison and
2626         aarch64_emit_unop to invert the result.
2627         (aarch64_expand_sve_vec_cmp_float): Update after the above
2628         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
2630 2018-05-07  Nathan Sidwell  <nathan@acm.org>
2632         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2633         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2634         (Backwards Compatibility): Likewise.
2636 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2638         PR bootstrap/85681
2639         Revert:
2640         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2642         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2643         <prefetch_dynamic_strides>: New const bool field.
2644         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2645         prefetch_dynamic_strides.
2646         (exynosm1_prefetch_tune): Likewise.
2647         (thunderxt88_prefetch_tune): Likewise.
2648         (thunderx_prefetch_tune): Likewise.
2649         (thunderx2t99_prefetch_tune): Likewise.
2650         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2651         (aarch64_override_options_internal): Update to set
2652         PARAM_PREFETCH_DYNAMIC_STRIDES.
2653         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2654         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2655         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2656         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2657         prefetch-dynamic-strides setting.
2659         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2661         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2662         <minimum_stride>: New const int field.
2663         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2664         minimum_stride field.
2665         (exynosm1_prefetch_tune): Likewise.
2666         (thunderxt88_prefetch_tune): Likewise.
2667         (thunderx_prefetch_tune): Likewise.
2668         (thunderx2t99_prefetch_tune): Likewise.
2669         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2670         (aarch64_override_options_internal): Update to set
2671         PARAM_PREFETCH_MINIMUM_STRIDE.
2672         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2673         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2674         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2675         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2676         stride is constant and is below the minimum stride threshold.
2678 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2680         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2681         to 512.
2683 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2685         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2686         <prefetch_dynamic_strides>: New const bool field.
2687         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2688         prefetch_dynamic_strides.
2689         (exynosm1_prefetch_tune): Likewise.
2690         (thunderxt88_prefetch_tune): Likewise.
2691         (thunderx_prefetch_tune): Likewise.
2692         (thunderx2t99_prefetch_tune): Likewise.
2693         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2694         (aarch64_override_options_internal): Update to set
2695         PARAM_PREFETCH_DYNAMIC_STRIDES.
2696         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2697         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2698         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2699         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2700         prefetch-dynamic-strides setting.
2702 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2704         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2705         <minimum_stride>: New const int field.
2706         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2707         minimum_stride field.
2708         (exynosm1_prefetch_tune): Likewise.
2709         (thunderxt88_prefetch_tune): Likewise.
2710         (thunderx_prefetch_tune): Likewise.
2711         (thunderx2t99_prefetch_tune): Likewise.
2712         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2713         (aarch64_override_options_internal): Update to set
2714         PARAM_PREFETCH_MINIMUM_STRIDE.
2715         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2716         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2717         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2718         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2719         stride is constant and is below the minimum stride threshold.
2721 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2723         PR c++/85659
2724         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2725         the type is addressable.  Don't force op into register if it has
2726         BLKmode.
2728 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2730         PR other/77609
2731         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2732         any section for which we don't know a specific type it should have,
2733         regardless of name.  Previously this was done only for the exact
2734         names ".init_array", ".fini_array", and ".preinit_array".
2735         (default_elf_asm_named_section): Add comment about
2736         relationship with default_section_type_flags and SECTION_NOTYPE.
2737         (get_section): Don't consider it a type conflict if one side has
2738         SECTION_NOTYPE and the other doesn't, as long as neither has the
2739         SECTION_BSS et al used in the default_section_type_flags logic.
2741 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2743         PR target/85653
2744         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2745         (workaround_barsyncs): New function.
2746         (nvptx_reorg): Use workaround_barsyncs.
2747         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2748         (define_expand "nvptx_membar_cta"): New define_expand.
2749         (define_insn "*nvptx_membar_cta"): New insn.
2751 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2753         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2754         To improve optimization opportunities.
2755         * builtin-types.def: The new needed builtin types for the above.
2757 2018-05-04  Richard Biener  <rguenther@suse.de>
2759         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2760         * gimple-ssa-store-merging.c
2761         (imm_store_chain_info::output_merged_store): Remove redundant create,
2762         release split_store vector contents on failure.
2763         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2764         scalar stmt vector on cache hit.
2766 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2768         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2769         Xilinx FP support.
2770         * config.gcc (powerpc-xilinx-eabi*): Remove.
2771         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2772         support.
2773         (fusion_addis_mem_combo_load): Ditto.
2774         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2775         FP support.
2776         (rs6000_cpu_cpp_builtins): Ditto.
2777         * config/rs6000/rs6000-linux.c
2778         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2779         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2780         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2781         support.
2782         (rs6000_setup_reg_addr_masks): Ditto.
2783         (rs6000_init_hard_regno_mode_ok): Ditto.
2784         (rs6000_option_override_internal): Ditto.
2785         (legitimate_lo_sum_address_p): Ditto.
2786         (rs6000_legitimize_address): Ditto.
2787         (rs6000_legitimize_reload_address): Ditto.
2788         (rs6000_legitimate_address_p): Ditto.
2789         (abi_v4_pass_in_fpr): Ditto.
2790         (setup_incoming_varargs): Ditto.
2791         (rs6000_gimplify_va_arg): Ditto.
2792         (rs6000_split_multireg_move): Ditto.
2793         (rs6000_savres_strategy): Ditto.
2794         (rs6000_emit_prologue_components): Ditto.
2795         (rs6000_emit_epilogue_components): Ditto.
2796         (rs6000_emit_prologue): Ditto.
2797         (rs6000_emit_epilogue): Ditto.
2798         (rs6000_elf_file_end): Ditto.
2799         (rs6000_function_value): Ditto.
2800         (rs6000_libcall_value): Ditto.
2801         * config/rs6000/rs6000.h: Ditto.
2802         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2803         (TARGET_MINMAX): ... this.  New.
2804         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2805         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2806         (*movsi_internal1_single): Delete.
2807         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2808         mfpu=, mxilinx-fpu): Delete.
2809         * config/rs6000/singlefp.h: Delete.
2810         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2811         * config/rs6000/t-rs6000: Ditto.
2812         * config/rs6000/t-xilinx: Delete.
2813         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2814         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2815         (VStype_simple): Delete.
2816         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2817         * config/rs6000/xfpu.h: Delete.
2818         * config/rs6000/xfpu.md: Delete.
2819         * config/rs6000/xilinx.h: Delete.
2820         * config/rs6000/xilinx.opt: Delete.
2821         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2822         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2824 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2826         PR libgomp/85639
2827         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2828         if ignore == 0.
2830 2018-05-04  Richard Biener  <rguenther@suse.de>
2832         PR middle-end/85627
2833         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2834         (expand_complex_div_wide): Likewise.
2835         (expand_complex_operations_1): Likewise.
2836         (expand_complex_libcall): Preserve EH info of the original stmt.
2837         (tree_lower_complex): Handle removed blocks.
2838         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2839         on complex multiplication and division libcall builtins.
2841 2018-05-04  Richard Biener  <rguenther@suse.de>
2843         PR middle-end/85574
2844         * fold-const.c (negate_expr_p): Restrict negation of operand
2845         zero of a division to when we know that can happen without
2846         overflow.
2847         (fold_negate_expr_1): Likewise.
2849 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2851         PR libstdc++/85466
2852         * real.h (real_nextafter): Declare.
2853         * real.c (real_nextafter): New function.
2854         * fold-const-call.c (fold_const_nextafter): New function.
2855         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2856         CASE_CFN_NEXTTOWARD.
2857         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2858         even when arg1_mode is different from arg0_mode.
2860 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2862         * doc/extend.texi (Deprecated Features): Remove
2863         -ffriend-injection.
2864         (Backwards Compatibility): Likewise.
2865         * doc/invoke.texi (C++ Language Options): Likewise.
2866         (C++ Dialect Options): Likewise.
2868 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2870         PR target/85530
2871         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2872         _mm512_mask_mullox_epi64): New intrinsics.
2874 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2876         PR testsuite/85106
2877         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2878         dump files): Add offload-tree.
2880 2018-05-03  Richard Biener  <rguenther@suse.de>
2882         PR tree-optimization/85615
2883         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2884         to loops not nested in BBs loop father to avoid creating multi-entry
2885         loops.
2887 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2889         PR tree-optimization/70291
2890         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2891         arguments.  Change return type to tree.  Emit libcall as a new
2892         statement rather than replacing existing one when inplace_p is true.
2893         (expand_complex_multiplication_components): New function.
2894         (expand_complex_multiplication): Expand floating-point complex
2895         multiplication using the above.
2896         (expand_complex_division): Rename inner_type parameter to type.
2897         Update expand_complex_libcall call-site.
2898         (expand_complex_operations_1): Update expand_complex_multiplication
2899         and expand_complex_division call-sites.
2901 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2903         PR target/85582
2904         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2905         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2906         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2907         the highest significant bit of the shift count mask is clear.  In
2908         check whether and[sq]i3 is needed verify that all significant bits
2909         of the shift count other than the highest are set.
2911 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2913         PR libgomp/82428
2914         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2915         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2916         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2917         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2918         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2919         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2920         __builtin_goacc_parlevel_size.
2922 2018-05-02  Richard Biener  <rguenther@suse.de>
2924         PR tree-optimization/85597
2925         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2926         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2927         directly.
2929 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2931         PR testsuite/85106
2932         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2933         dump files): Add ltrans-tree.
2935 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2937         PR testsuite/85106
2938         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2939         dump files): Add wpa-ipa.
2941 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2943         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
2944         powerpc*-*-linux*paired* target.
2945         * config/rs6000/750cl.h: Delete.
2946         * config/rs6000/paired.h: Delete.
2947         * config/rs6000/paired.md: Delete.
2948         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2949         float support.
2950         * config/rs6000/rs6000-builtin.def: Remove paired float support.
2951         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2952         comment.  Remove paired float support.
2953         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2954         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2955         VECTOR_PAIRED.
2956         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2957         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2958         declarations.
2959         * config/rs6000/rs6000.c: Remove paired float support.
2960         (paired_expand_vector_init, paired_expand_vector_move,
2961         paired_emit_vector_compare, paired_emit_vector_cond_expr,
2962         (paired_expand_lv_builtin, paired_expand_stv_builtin,
2963         paired_expand_builtin, paired_expand_predicate_builtin,
2964         paired_init_builtins): Delete.
2965         * config/rs6000/rs6000.h: Remove paired float support.
2966         * config/rs6000/rs6000.md: Remove paired float support.
2967         (move_from_CR_ov_bit): Delete.
2968         * config/rs6000/rs6000.opt (mpaired): Delete.
2969         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2970         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2972 2018-05-02  Richard Biener  <rguenther@suse.de>
2974         PR middle-end/85567
2975         * gimplify.c (gimplify_save_expr): When in SSA form allow
2976         SAVE_EXPRs to compute to SSA vars.
2978 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2980         PR target/85582
2981         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2982         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2983         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2984         clobber operands[2], instead use a new pseudo.  Formatting fixes.
2986 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
2988         PR tree-optimization/85586
2989         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2990         exit early for statements in the same group if the accesses are
2991         not strided.
2993 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2995         PR lto/85451
2996         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2997         error message.
2999 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
3001         PR tree-optimization/85143
3002         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
3004 2018-05-01  Tom de Vries  <tom@codesourcery.com>
3006         PR lto/85451
3007         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
3008         not found" error message.
3010 2018-05-01  Tom de Vries  <tom@codesourcery.com>
3012         PR other/83786
3013         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
3014         * vec.c (test_ordered_remove_if): New function.
3015         (vec_c_tests): Call test_ordered_remove_if.
3016         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
3017         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
3018         * tree-vect-patterns.c (vect_pattern_recog_1): Use
3019         VEC_ORDERED_REMOVE_IF.
3021 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3023         PR tree-optimization/82665
3024         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
3025         pointer subtraction where arguments come from a memchr call.
3027 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
3029         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
3030         --push-state --as-needed and --pop-state instead of --as-needed and
3031         --no-as-needed if ld supports it.
3032         * configure: Regenerated.
3034         PR web/85578
3035         * doc/install.texi2html: Replace _002d with - and _002a with * in
3036         generated html files using sed.
3038 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3040         PR c++/85523
3041         * gcc-rich-location.c (blank_line_before_p): New function.
3042         (use_new_line): New function.
3043         (gcc_rich_location::add_fixit_insert_formatted): New function.
3044         * gcc-rich-location.h
3045         (gcc_rich_location::add_fixit_insert_formatted): New function.
3047 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3049         * selftest.c (assert_streq): Rename "expected" and "actual" to
3050         "val1" and "val2".  Extend NULL-handling to cover both inputs
3051         symmetrically, while still requiring both to be non-NULL for a pass.
3052         * selftest.h (assert_streq): Rename "expected" and "actual" to
3053         "val1" and "val2".
3054         (ASSERT_EQ): Likewise.
3055         (ASSERT_EQ_AT): Likewise.
3056         (ASSERT_KNOWN_EQ): Likewise.
3057         (ASSERT_KNOWN_EQ_AT): Likewise.
3058         (ASSERT_NE): Likewise.
3059         (ASSERT_MAYBE_NE): Likewise.
3060         (ASSERT_MAYBE_NE_AT): Likewise.
3061         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
3062         the assertion to pass.
3063         (ASSERT_STREQ_AT): Likewise.
3065 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
3067         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
3068         interaction with -pie.
3070 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3072         * selftest.h: Fix alphabetization of per-source-file selftest
3073         declarations.
3075 2018-04-30  Jason Merrill  <jason@redhat.com>
3077         PR c++/61982 - dead stores to destroyed objects.
3078         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
3079         of clobber.
3081 2018-04-30  Jason Merrill  <jason@redhat.com>
3083         * tree.c (build_clobber): New.
3084         * tree.h: Declare it.
3085         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
3087 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3089         * diagnostic-show-locus.c (layout::layout): Update for
3090         location_get_source_line returning a char_span.
3091         (struct char_span): Move to input.h.
3092         (struct correction): Update for fields in char_span becoming
3093         private.
3094         (struct source_line): Update for location_get_source_line
3095         returning a char_span.
3096         (layout::print_line): Likewise.
3097         * edit-context.c (edited_file::print_content): Likewise.
3098         (edited_file::print_diff_hunk): Likewise.
3099         (edited_file::print_run_of_changed_lines): Likewise.
3100         (edited_file::get_num_lines): Likewise.
3101         (edited_line::edited_line): Likewise.
3102         * final.c (asm_show_source): Likewise.
3103         * input.c (location_get_source_line): Convert return type
3104         from const char * to char_span, losing the final "line_len"
3105         param.
3106         (dump_location_info): Update for the above.
3107         (get_substring_ranges_for_loc): Likewise.  Use a char_span
3108         when handling the literal within the line.
3109         (test_reading_source_line): Update for location_get_source_line
3110         returning a char_span.
3111         * input.h (class char_span): Move here from
3112         diagnostic-show-locus.c, converting from a struct to a class.
3113         Make data members private.
3114         (char_span::operator bool): New.
3115         (char_span::length): New.
3116         (char_span::get_buffer): New.
3117         (char_span::operator[]): New.
3118         (char_span::subspan): Make const.
3119         (char_span::xstrdup): New.
3120         (location_get_source_line): Convert return type from const char *
3121         to char_span, losing the final "line_size" param.
3123 2018-04-30  Jan Hubicka  <jh@suse.cz>
3125         * lto-wrapper.c (ltrans_priorities): New static var.
3126         (cmp_priority): New.
3127         (run_gcc): Read priorities and if doing parallel build order
3128         the Makefile by them.
3130 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3132         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
3134 2018-04-30  Richard Biener  <rguenther@suse.de>
3136         * tree-cfg.c (verify_address): Remove base argument, add
3137         flag whether to check TREE_ADDRESSABLE and do that.
3138         (verify_expr): Remove.
3139         (verify_types_in_gimple_reference): Add pieces from verify_expr.
3140         (verify_gimple_assign_single): Likewise.
3141         (verify_gimple_switch): Likewise.
3142         (verify_expr_location_1): Dereference tp once.  Add (disabled)
3143         piece from verify_expr.
3144         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
3146 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
3148         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
3150 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
3152         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
3153         (small_data_pattern): Likewise.
3154         (arc_rewrite_small_data): Likewise.
3155         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
3156         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
3157         (get_symbol_alignment): New function.
3158         (legitimate_small_data_address_p): Likewise.
3159         (legitimate_scaled_address): Update, call
3160         legitimate_small_data_address_p.
3161         (output_sdata): New static variable.
3162         (arc_print_operand): Update how we handle small data operands.
3163         (arc_print_operand_address): Likewise.
3164         (arc_legitimate_address_p): Update, use
3165         legitimate_small_data_address_p.
3166         (arc_rewrite_small_data_p): Remove.
3167         (arc_rewrite_small_data_1): Likewise.
3168         (arc_rewrite_small_data): Likewise.
3169         (small_data_pattern): Likewise.
3170         (compact_sda_memory_operand): Update to use
3171         legitimate_small_data_address_p and get_symbol_alignment.
3172         (prepare_move_operands): Don't rewite sdata pattern.
3173         (prepare_extend_operands): Remove.
3174         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
3175         pattern.
3176         (zero_extendqisi2): Likewise.
3177         (zero_extendhisi2): Likewise.
3178         (extendqihi2): Likewise.
3179         (extendqisi2): Likewise.
3180         (extendhisi2): Likewise.
3181         (addsi3): Likewise.
3182         (subsi3): Likewise.
3183         (andsi3): Likewise.
3184         * config/arc/constraints.md (Usd): Change it to memory constraint.
3186 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
3188         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
3189         as source of std instructions.
3190         * config/arc/arc.md (movsi_insn): Update pattern predicate to
3191         allow 6-bit constants as source for store instructions.
3192         (movdi_insn): Update instruction pattern to allow 6-bit constants
3193         as source for store instructions.
3195 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
3197         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
3199 2018-04-30  Nathan Sidwell  <nathan@acm.org>
3200             Sandra Loosemore <sandra@codesourcery.com>
3202         * dumpfile.c (dump_open): Allow '-' for stdout.
3203         * doc/invoke.texi (Developer Options): Document dump filename
3204         determination early.  Document stdin/stdout selection.
3206 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
3208         Microblaze Target: PIC data text relative
3210         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
3211         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
3212         Add declaration.
3213         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
3214         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
3215         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
3216         New addressing mode for data-text relative position indepenedent code.
3217         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
3218         'ADDRESS_SYMBOLIC_TXT_REL'.
3219         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
3220         (microblaze_legitimate_pic_operand): Exclude function calls from
3221         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
3222         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
3223         addresses cases.
3224         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3225         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3226         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
3227         for 'address + offset'.
3228         (microblaze_expand_prologue): Add new function prologue call for
3229         'r20' assignation.
3230         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
3231         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
3232         table in case of TARGET_PIC_DATA_TEXT_REL.
3233         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
3234         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
3235         Add new macros 'UNSPEC_TEXT',
3236         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
3237         + exclude function calls from 'UNSPEC_PLT' in case of data text
3238         relative mode.
3239         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3240         new target hook for generating address diff vector tables in case of
3241         flag_pic.
3242         * doc/tm.texi : Regenerate.
3243         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
3244         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
3245         of addr diff vector generation.
3246         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3247         target hook definition.
3248         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
3249         Add default function for generate_pic_addr_diff_vec -> flag_pic.
3250         * doc/invoke.texi (Add new pic option): Add new microblaze pic
3251         option for data text relative.
3253 2018-04-30  Richard Biener  <rguenther@suse.de>
3255         * tree-chrec.h (evolution_function_is_constant_p): Remove
3256         redundant check.
3257         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
3259 2018-04-30  Richard Biener  <rguenther@suse.de>
3261         PR bootstrap/85571
3262         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
3264 2018-04-30  Richard Biener  <rguenther@suse.de>
3266         PR tree-optimization/28364
3267         PR tree-optimization/85275
3268         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
3269         copying first exit test.
3271 2018-04-28  Mark Wielaard  <mark@klomp.org>
3273         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
3274         dwarf_version >= 5.
3275         (dwarf_AT): Handle DW_AT_addr_base.
3276         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
3278 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
3280         PR target/84431
3281         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
3282         (*ashl<dwi>3_doubleword_mask_1): Ditto.
3283         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
3284         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
3286 2018-04-28  Richard Biener  <rguenther@suse.de>
3288         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
3289         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
3290         to reflect use.  Only add interesting stmts.
3292 2018-04-27  Martin Jambor  <mjambor@suse.cz>
3294         PR ipa/85549
3295         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
3296         the jump function allows for passing through aggregate values.
3298 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
3300         * input.h (in_system_header_at): Convert from macro to inline
3301         function.
3302         (from_macro_expansion_at): Likewise.
3303         (from_macro_definition_at): Likewise.
3305 2018-04-27  Jeff Law  <law@redhat.com>
3307         * config.gcc: Mark tile* targets as deprecated/obsolete.
3309 2018-04-27  Richard Biener  <rguenther@suse.de>
3311         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
3312         fix for ILP32.
3314 2018-04-27  Richard Biener  <rguenther@suse.de>
3316         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
3318 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
3320         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
3321         with Yd constraint. Set "preferred_for_speed" attribute from
3322         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
3323         with Yd constraint.
3324         (*movdi_internal): Ditto.
3325         (movti_interunit splitters): Remove
3326         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
3327         (movdi_interunit splitters): Ditto.
3328         * config/i386/constraints.md (Ye): Remove.
3329         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
3331 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3333         PR target/85512
3334         * config/aarch64/constraints.md (Usg): Limit to 31.
3335         (Usj): Limit to 63.
3337 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
3339         PR tree-optimization/85529
3340         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
3341         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
3342         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
3343         zero extension or masking of the MSB bit.
3344         (optimize_range_tests): Add FIRST_BB argument, pass it through
3345         to optimize_range_tests_var_bound.
3346         (maybe_optimize_range_tests, reassociate_bb): Adjust
3347         optimize_range_tests callers.
3349 2018-04-26  Richard Biener  <rguenther@suse.de>
3350             Jakub Jelinek  <jakub@redhat.com>
3352         * cgraph.h (symbol_table): Just declare debug method here.
3353         * symtab.c (symbol_table::debug): Define.
3355 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
3357         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
3359 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
3361         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
3362         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
3363         (*movdi_internal): Substitute Yi and Yj constraint with x
3364         and Ym and Yn constraint with y constraint.  Update "isa"
3365         attribute and set "preferred_for_speed" attribute from
3366         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
3367         (*movsi_internal): Ditto.
3368         (*movdf_internal): Ditto.
3369         (*movsf_internal): Ditto.
3370         (*zero_extendsidi2): Ditto.
3371         * config/i386/sse.md (vec_set<mode>_0): Ditto.
3372         (sse2_loadld): Ditto.
3373         (*vec_extract<ssevecmodelower>_0): Ditto.
3374         (*vec_extractv4si_0_zext_sse4): Ditto.
3375         (vec_concatv2di): Ditto.
3376         (*vec_dup<mode>): Ditto.
3377         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
3378         * config/i386/constraints.md (Yi): Remove.
3379         (Yj): Remove.
3380         (Ym): Remove.
3381         (Yn): Remove.
3383 2018-04-26  Nathan Sidwell  <nathan@acm.org>
3385         * dumpfile.c (dump_open): New.
3386         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
3387         (dump_finish): Detect stdio/stderr by value not name.
3389 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
3391         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
3393 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3395         PR target/84952
3396         * config/nvptx/nvptx.c (verify_neutering_jumps)
3397         (verify_neutering_labels): New function
3398         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
3400 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3402         PR target/84025
3403         * config/nvptx/nvptx.c (needs_neutering_p): New function.
3404         (nvptx_single): Use needs_neutering_p to skip over insns that do not
3405         need neutering.
3407 2018-04-26  Richard Biener <rguenther@suse.de>
3408             Tom de Vries  <tom@codesourcery.com>
3410         PR lto/85422
3411         * lto-streamer-out.c (output_function): Fixup loops if required to match
3412         discovery done in the reader.
3414 2018-04-26  Richard Biener  <rguenther@suse.de>
3416         PR tree-optimization/85116
3417         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
3418         have a loop exit from the single latch predecessor.  Remove
3419         case of header with just condition.
3420         (ch_base::copy_headers): Exclude infinite loops from any
3421         processing.
3422         (pass_ch::execute): Record exits.
3424 2018-04-26  Richard Biener  <rguenther@suse.de>
3426         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
3427         prologue cost vector and pass it to vect_get_load_cost.
3428         (vect_get_peeling_costs_all_drs): Likewise.
3429         (vect_peeling_hash_get_lowest_cost): Likewise.
3430         (vect_enhance_data_refs_alignment): Likewise.
3432 2018-04-26  Richard Biener  <rguenther@suse.de>
3434         PR middle-end/85450
3435         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
3436         checking of integer<->pointer conversions.
3437         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
3438         sign-/zero-extending pointer types.
3439         (expand_omp_for_static_chunk): Likewise.
3441 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
3442             Jean Lee  <xiaoyur347@gmail.com>
3444         * config/mips/mips.c (mips_asan_shadow_offset): New function.
3445         (TARGET_ASAN_SHADOW_OFFSET): Define.
3446         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
3447         true for -fsanitize=address.
3449 2018-04-25  Mark Wielaard  <mark@klomp.org>
3451         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3452         shorter ones.
3454 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3456         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3457         than "alu", remove explicit "memory" and "imm_disp" attributes.
3458         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3460         PR middle-end/85414
3461         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3462         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3463         gen_lowpart_no_emit.
3465 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
3467         PR target/85473
3468         * config/i386/i386.c (ix86_expand_builtin): Change memory
3469         operand to XI, extend p0 to Pmode.
3470         * config/i386/i386.md: Change unspec volatile and operand
3471         1 mode to XI, change operand 0 mode to P.
3473 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3475         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3476         GET_MODE_MASK before any checking.
3477         (nds32_can_use_bset_p): Likewise.
3478         (nds32_can_use_btgl_p): Likewise.
3480 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3482         * config/nds32/nds32-doubleword.md: New define_split pattern for
3483         illegal register number.
3485 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3487         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3489 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3491         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3493 2018-04-25  Richard Biener  <rguenther@suse.de>
3495         * lto-streamer.h (LTO_major_version): Bump to 8.
3497 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3499         * BASE-VER: Set to 9.0.0.
3501 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
3503         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
3504         in __abskf2 and __powikf2.
3506 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3508         PR target/85512
3509         * config/aarch64/constraints.md (Usg, Usj): New constraints.
3510         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
3511         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
3512         Use the above on operand 2.  Reindent.
3513         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
3515 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3517         PR target/85485
3518         * common/config/i386/i386-common.c (ix86_handle_option): Don't
3519         handle OPT_mcet.
3520         * config/i386/i386.opt (mcet): Removed.
3521         * doc/install.texi: Remove -mcet documentation.
3522         * doc/invoke.texi: Likewise.
3524 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3526         PR target/85485
3527         * doc/install.texi: Remove -mcet from bootstrap-cet.
3529 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3531         PR target/85511
3532         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
3533         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
3534         if TARGET_64BIT.
3536         PR target/85503
3537         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
3538         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
3539         containing a CONST_VECTOR.
3541 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
3543         * doc/install.texi: Update newlib dependency for nvptx.
3545 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3547         PR target/85508
3548         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
3549         instead of INTVAL when shifting x left.
3551 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
3553         PR tree-optimization/85478
3554         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
3555         vect_grouped_store_supported for single element vectors.
3557 2018-04-24  Richard Biener  <rguenther@suse.de>
3559         PR target/85491
3560         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
3561         load cost increase to the case of non-constant step.
3563 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3565         PR target/84828
3566         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3567         destination if any_malformed_asm.
3569 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
3571         PR middle-end/85496
3572         * expr.c (store_field): In the bitfield case, if the value comes from
3573         a function call and is returned in registers by means of a PARALLEL,
3574         do not change the mode of the temporary unless BLKmode and VOIDmode.
3576 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
3578         PR rtl-optimization/85423
3579         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3580         dependencies to debug insns when the previous insn is non-debug.
3582 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3584         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3585         enums into a single definition.
3586         (fls): Fix predicates and printing.
3587         (seti): Likewise.
3589 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3591         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3592         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3593         and short u6 immediate.
3594         (check_if_valid_sleep_operand): Remove.
3595         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3597 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3599         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3600         flag_always_save_lp condition.
3601         * config/nds32/nds32.opt (malways-save-lp): New option.
3603 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3605         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3606         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3607         * config/nds32/nds32.h
3608         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3609         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3611 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3613         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3614         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3616 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3617             Chung-Ju Wu  <jasonwucj@gmail.com>
3619         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3620         Declare.
3621         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3622         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3624 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3626         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3628 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3630         * config/nds32/nds32-protos.h (nds32_data_alignment,
3631         nds32_local_alignment): Declare.
3632         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3633         nds32_local_alignment): New functions.
3634         (TARGET_CONSTANT_ALIGNMENT): Define.
3635         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3637 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3639         * config/nds32/nds32.c
3640         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3641         (TARGET_MODES_TIEABLE_P): Likewise.
3643 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3645         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3646         level Ofast and Og.
3648 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
3649             Chung-Ju Wu  <jasonwucj@gmail.com>
3651         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3652         for unaligned access.
3653         * config/nds32/nds32-intrinsic.c: Implementation of expanding
3654         unaligned access.
3655         * config/nds32/nds32-intrinsic.md: Likewise.
3656         * config/nds32/nds32_intrinsic.h: Likewise.
3657         * config/nds32/nds32.h (nds32_builtins): Likewise.
3658         * config/nds32/nds32.opt (munaligned-access): New option.
3659         * config/nds32/nds32.c (nds32_asm_file_start): Display
3660         flag_unaligned_access status.
3662 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3664         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3665         -mno-relax is present.
3666         * config/riscv/linux.h (LINK_SPEC): Ditto.
3668 2018-04-20  Martin Sebor  <msebor@redhat.com>
3670         PR c/85365
3671         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3672         for null pointers.
3673         (gimple_fold_builtin_stxcpy_chk): Same.
3674         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3676 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
3678         PR target/85456
3679         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3680         __powikf2 when long double is IEEE 128-bit.
3682 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3684         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3685         step to make sure stack always aligned.
3687 2018-04-20  Carl Love  <cel@us.ibm.com>
3689         PR target/83402
3690         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3691         size check for arg0.
3693 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3694             Tom de Vries  <tom@codesourcery.com>
3696         PR target/85445
3697         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3698         Emit insns for calls too.
3699         (nvptx_find_par): Always look for worker-level predecessor insn.
3700         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3701         calls.
3702         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3703         (nvptx_process_pars): Propagate frames for calls.
3705 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3707         PR target/85469
3708         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3709         Removed.
3710         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3711         (ix86_handle_option): Don't handle OPT_mibt.
3712         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3713         __SHSTK__.
3714         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3715         has_ibt and ibt.
3716         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3717         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3718         (ix86_target_macros): Define __CET__ with flag_cf_protection
3719         for -fcf-protection.
3720         * config/i386/i386.c (isa2_opts): Remove -mibt.
3721         * config/i386/i386.h (TARGET_IBT): Removed.
3722         (TARGET_IBT_P): Likewise.
3723         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3724         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3725         * config/i386/i386.opt (mcet): Update help message.
3726         (mshstk): Likewise.
3727         (mibt): Removed.
3728         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3729         -mcet as an alias for -mshstk.
3731 2018-04-20  Richard Biener <rguenther@suse.de>
3733         PR middle-end/85475
3734         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3735         complexity by forcing a single use of the multiply operand.
3737 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3739         ipa/85449
3740         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3741         recursion dependency to only apply to non-clones.
3743 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3745         ipa/85447
3746         * ipa-cp.c (create_specialized_node): Check that clones of
3747         self-recursive edges exist during IPA-CP.
3749 2018-04-19  Toon Moene  <toon@moene.org>
3751         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3752         by -O3. 
3754 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3756         PR tree-optimization/85467
3757         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3758         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3759         VECTOR_CST element to type.
3761 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3763         PR target/85397
3764         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3765         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3766         (builtin_longjmp): Likewise.
3767         (save_stack_nonlocal): New pattern.
3768         (restore_stack_nonlocal): Likewise.
3770 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3772         PR target/85404
3773         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3774         Replace ASM_OUTPUT_LABEL with fprintf.
3776 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3778         PR target/85417
3779         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3780         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3781         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3782         define __IBT__ and __SHSTK__ for -fcf-protection.
3783         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3784         TARGET_IBT.
3785         (ix86_trampoline_init): Likewise.
3786         (x86_output_mi_thunk): Likewise.
3787         (ix86_notrack_prefixed_insn_p): Likewise.
3788         (ix86_option_override_internal): Don't disallow -fcf-protection.
3789         * config/i386/i386.md (rdssp<mode>): Also enable for
3790         -fcf-protection.
3791         (incssp<mode>): Likewise.
3792         (nop_endbr): Likewise.
3793         * config/i386/i386.opt (mcet): Change help message to built-in
3794         functions only.
3795         (mibt): Likewise.
3796         (mshstk): Likewise.
3797         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3798         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3799         enable CET built-in functions.
3801 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3803         * common/config/i386/i386-common.c 
3804         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3805         OPTION_MASK_ISA_MOVDIRI_UNSET,
3806         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3807         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3808         * config.gcc (movdirintrin.h): New header.
3809         * config/i386/cpuid.h (bit_MOVDIRI,
3810         bit_MOVDIR64B): New bits.
3811         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3812         and -mmvodir64b.
3813         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3814         (VOID, PVOID, PCVOID)): New function types.
3815         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3816         __builtin_ia32_directstoreu_u64,
3817          __builtin_ia32_movdir64b): New builtins.
3818         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3819         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3820         and -mmovdiri.
3821         (ix86_valid_target_attribute_inner_p): Ditto.
3822         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3823         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3824         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3825         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3826         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3827         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3828         (movdiri<mode>, movdir64b_<mode>): New.
3829         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3830         * config/i386/immintrin.h: Include movdirintrin.h.
3831         * config/i386/movdirintrin.h: New file.
3832         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3834 2018-04-19  Richard Biener  <rguenther@suse.de>
3836         PR middle-end/85455
3837         * cfg.c (clear_bb_flags): When loop state says we have
3838         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3840 2018-04-19  Richard Biener  <rguenther@suse.de>
3842         PR tree-optimization/84737
3843         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3844         copying restrict info.
3845         (vect_setup_realignment): Use it.
3846         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3847         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3848         the first DR to all generated stores.
3849         (vectorizable_load): Likewise for loads.
3851 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3853         PR tree-optimization/85446
3854         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3855         the integral and pointer types to have the same precision.
3857         * doc/install.texi: Document --disable-cet being the default and
3858         --enable-cet=auto.
3860 2018-04-18  Martin Liska  <mliska@suse.cz>
3862         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3863         style.
3865 2018-04-18  Martin Liska  <mliska@suse.cz>
3867         Revert
3868         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3870         PR ipa/83983
3871         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3872         arguments if they are comparable.
3874 2018-04-18  Martin Liska  <mliska@suse.cz>
3876         Revert
3877         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3879         PR lto/84805
3880         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3881         incomplete types.
3883 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3885         PR target/85388
3886         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3887         ENDBR after calling __morestack.
3889 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3891         PR jit/85384
3892         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3893         by using gcc_base_ver to generate a gcc_driver_version, and use
3894         it when generating GCC_DRIVER_NAME.
3895         * configure: Regenerate.
3897 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3899         PR target/81084
3900         * config.gcc: Obsolete powerpc*-*-*spe*.
3902 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3904         PR debug/84637
3905         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3906         (stabstr_D): Change type of unum from unsigned int to
3907         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3908         type.
3910 2018-04-17  Jim Wilson  <jimw@sifive.com>
3912         PR 84856
3913         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3914         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3915         Set arg_pointer_offset after using pretend_args_size.
3917 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3919         PR rtl-optimization/85431
3920         * dse.c (record_store): Ignore zero width stores.
3922         PR sanitizer/85230
3923         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3924         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3925         __builtin_stack_restore rather than after it.
3926         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3927         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3928         argument instead of virtual_dynamic_stack_rtx.
3930 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3932         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3933         New prototype.
3934         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3935         Add note to error message to explain internal mapping of overloaded
3936         built-in function name to non-overloaded built-in function name.
3937         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3938         function.
3940 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3942         PR target/85424
3943         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3944         where the inputs overlap with the output.
3946 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3948         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3949         (=v, v) alternative and explicit "memory" attribute.
3950         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
3951         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3952         attributes.
3953         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3954         "sselog1" type instead of "sselog".
3955         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3956         "sselog".  Remove explicit "memory" attribute.
3957         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3958         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3959         attributes.
3960         (vec_extract_hi_v32hi): Merge all alternatives into one, use
3961         "sselog1" type instead of "sselog".  Remove explicit "memory"
3962         attribute.
3963         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3964         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3965         attribute.
3966         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3967         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3968         attributes.
3969         (vec_extract_hi_v64qi): Merge all alternatives into one, use
3970         "sselog1" type instead of "sselog".  Remove explicit "memory"
3971         attribute.
3972         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3973         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3974         attribute.
3976         PR target/85430
3977         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3979         PR middle-end/85414
3980         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3981         on a SUBREG.
3983 2018-04-17  Martin Jambor  <mjambor@suse.cz>
3985         PR ipa/85421
3986         * ipa-cp.c (create_specialized_node): Call
3987         expand_all_artificial_thunks if necessary.
3989 2018-04-17  Martin Liska  <mliska@suse.cz>
3991         PR lto/85405
3992         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3993         in message, remote space in between '_G' and '('.
3995 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3997         PR target/85281
3998         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3999         avx512f_vmcmp<mode>3<round_saeonly_name>,
4000         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
4001         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
4002         avx512f_rndscale<mode><round_saeonly_name>,
4003         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
4004         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
4005         Use %<iptr>2 instead of %2 for -masm=intel.
4006         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
4007         avx512f_vcvttss2usi<round_saeonly_name>,
4008         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
4009         -masm=intel.
4010         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
4011         avx512f_vcvttsd2usi<round_saeonly_name>,
4012         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
4013         Use %q1 instead of %1 for -masm=intel.
4014         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
4015         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
4016         of %3 for -masm=intel.
4017         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
4018         -masm=intel.
4019         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
4020         -masm=intel.
4021         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
4022         -masm=intel.
4023         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
4024         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
4025         %g1.
4026         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
4027         -masm=intel.
4028         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
4029         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
4030         %g1 and one with %0 and %1.
4031         (avx512er_vmrcp28<mode><round_saeonly_name>,
4032         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
4033         %1 for -masm=intel.
4034         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
4035         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
4036         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
4037         of %0 and %{%4%} for -masm=intel.
4038         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
4039         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
4040         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
4041         order of %0 and %{%5%}%{z%} for -masm=intel.
4043 2018-04-17  Jan Hubicka  <jh@suse.cz>
4045         PR lto/85405
4046         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
4048 2018-04-17  Martin Liska  <mliska@suse.cz>
4050         PR ipa/85329
4051         * multiple_target.c (create_dispatcher_calls): Set apostrophes
4052         for target_clone error message.  Make default implementation
4053         clone to be a local declaration.
4054         (separate_attrs): Add new argument and check for an empty
4055         string.
4056         (expand_target_clones): Handle it.
4057         (ipa_target_clone): Make redirection just for target_clones
4058         functions.
4060 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
4061             Tom de Vries  <tom@codesourcery.com>
4063         PR middle-end/84955
4064         * omp-expand.c (expand_oacc_for): Add dummy false branch for
4065         tiled basic blocks without omp continue statements.
4067 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
4069         PR target/83660
4070         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
4071         vec_extract expression as having side effects to make sure it gets
4072         a cleanup point.
4074 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
4076         PR target/85403
4077         * config/i386/i386.c (get_builtin_code_for_version): Check
4078         error_mark_node.
4080 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
4082         PR target/84331
4083         * gcc/config.gcc: Support "skylake".
4084         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
4085         PROCESSOR_SKYLAKE.
4086         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
4087         (processor_target_table): Add "skylake".
4088         (ix86_option_override_internal): Add "skylake".
4089         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
4090         PROCESSOR_CANNONLAKE.
4091         (get_builtin_code_for_version): Fix priority for
4092         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
4093         PROCESSOR_SKYLAKE-AVX512.
4094         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
4095         (processor_type): Add PROCESSOR_SKYLAKE.
4097 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
4098             Jason Merrill  <jason@redhat.com>
4100         PR c++/85112
4101         * convert.c (convert_to_integer_1): Use direct recursion for
4102         enumeral types and types with a precision less than the number
4103         of bits in their mode.
4105 2018-04-16  Julia Koval  <julia.koval@intel.com>
4107         PR target/84413
4108         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
4109         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
4111 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
4113         PR target/85293
4114         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
4115         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
4116         and -mno-direct-move.
4118 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
4120         PR target/83402
4121         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
4122         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
4123         Ensure negative shifts result in {0}.
4125 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
4127         PR rtl-optimization/79916
4128         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
4129         regs (if any) to define how to gnerate SD moves when LRA is in
4130         progress.
4132 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
4134         PR rtl-optimization/85393
4135         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
4136         * except.c (expand_dw2_landing_pad_for_region): Make static.
4137         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
4138         a label and unconditional jump to old_bb, rather than
4139         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
4140         basic block.
4142         PR rtl-optimization/85376
4143         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
4144         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
4145         instead of a specific value.
4147 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
4148             Bin Cheng  <bin.cheng@arm.com>
4150         PR tree-optimization/82965
4151         PR tree-optimization/83991
4152         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
4153         by_profile_only parameter.
4154         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
4155         information if the loop was predicted to iterate too many times.
4156         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
4158 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
4160         PR lto/71991
4161         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
4162         always inline.
4164 2018-04-13  Martin Liska  <mliska@suse.cz>
4165             Jakub Jelinek  <jakub@redhat.com>
4167         PR middle-end/81657
4168         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
4169         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
4170         * builtins.c (expand_builtin_memory_copy_args): Use
4171         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
4172         handle dest_addr == pc_rtx.
4174 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
4176         PR target/85291
4177         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
4178         asked to not generate direct moves.
4179         (fix_trunc<mode>si2_stfiwx): Similar.
4180         (fix_trunc<mode>si2_internal): Similar.
4182 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4184         PR debug/83157
4185         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
4186         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
4187         lookup if dest in some wider mode is known to be const0_rtx and
4188         if so, record permanent equivalence for it to be ZERO_EXTEND of
4189         the narrower mode destination.
4191 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4193         * lto-streamer-out.c (output_function): Revert 259346.
4194         * omp-expand.c (expand_oacc_for): Likewise.
4196 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
4198         PR rtl-optimization/85354
4199         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
4200         * sel-sched.c (sel_global_init): ... here.
4202 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
4204         PR target/85238
4205         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
4206         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4207         mode for PE-COFF targets.
4208         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
4209         (i386_pe_asm_lto_end): Likewise.
4210         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
4211         (TARGET_ASM_LTO_END): Likewise.
4212         * config/i386/winnt.c (saved_debug_info_level): New static variable.
4213         (i386_pe_asm_lto_start): New function.
4214         (i386_pe_asm_lto_end): Likewise.
4216 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4217             Richard Biener  <rguenther@suse.de>
4219         PR middle-end/84955
4220         * lto-streamer-out.c (output_function): Fix CFG loop state before
4221         streaming out.
4222         * omp-expand.c (expand_oacc_for): Handle calls to internal
4223         functions like regular functions.
4225 2018-04-12  Richard Biener  <rguenther@suse.de>
4227         PR lto/85371
4228         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
4229         for the early LTO debug to properly generate references to it
4230         during DIE emission.  Do not re-use that for the skeleton for
4231         split-dwarf.
4232         (dwarf2out_early_finish): Likewise.
4234 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4236         PR target/85328
4237         * config/i386/sse.md
4238         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
4239         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
4240         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
4241         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
4242         and output is a reg, avoid creating invalid lowpart subreg, but
4243         instead split into a 512-bit move.  Don't split if not AVX512VL,
4244         input is xmm16+ reg and output is a mem.
4245         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
4246         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
4247         xmm16+ reg and output is a mem.
4249 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4251         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
4252         also for flag_dwarf2_cfi_asm.
4254 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4256         PR rtl-optimization/85342
4257         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
4258         a bool scalar var inside of the loop instead.  Don't try to update
4259         recog_data.operand after failed apply_change_group.
4261 2018-04-12  Tom de Vries  <tom@codesourcery.com>
4263         PR target/85296
4264         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
4265         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
4266         array with flexible array member as array without given dimension.
4267         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
4268         argument for undefined param to true.
4270 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
4272         PR target/85321
4273         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4274         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
4275         from PowerPC section.
4276         * config/rs6000/sysv4.opt (mcall-): Improve help text.
4277         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
4278         help text that is too long.
4279         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
4280         help text that is too long.
4281         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
4282         help text that is too long.
4284 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
4286         * config/alpha/alpha.md (stack_probe_internal): Rename
4287         from "probe_stack".  Update all callers.
4289 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4291         PR rtl-optimization/84566
4292         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
4293         sched_macro_fuse_insns.
4295 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4297         PR target/84301
4298         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
4299         (compute_block_dependences): ... from here.
4301 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4303         PR tree-optimization/85331
4304         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
4305         from int to HOST_WIDE_INT.
4307 2018-04-11  Martin Jambor  <mjambor@suse.cz>
4309         PR ipa/84149
4310         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
4311         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
4312         not the same as the source val.
4313         (cgraph_edge_brings_value_p): New parameter.
4314         (gather_edges_for_value): Pass destination value to
4315         cgraph_edge_brings_value_p.
4316         (perhaps_add_new_callers): Likewise.
4317         (get_info_about_necessary_edges): Likewise and exclude values brought
4318         only by self-recursive edges.
4319         (create_specialized_node): Redirect only clones of self-calling edges.
4320         (+self_recursive_pass_through_p): New function.
4321         (find_more_scalar_values_for_callers_subset): Use it.
4322         (find_aggregate_values_for_callers_subset): Likewise.
4323         (known_aggs_to_agg_replacement_list): Removed.
4324         (decide_whether_version_node): Re-calculate known constants for all
4325         remaining context clones.
4327 2018-04-11  Richard Biener  <rguenther@suse.de>
4329         PR lto/85339
4330         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
4331         from early DWARF output.
4332         (dwarf2out_early_finish): Output line info unconditionally into
4333         early DWARF and add reference to it.
4335 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4337         PR target/85281
4338         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
4339         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
4340         other than V2DFmode using iptr mode attribute.
4341         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
4343 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4345         PR rtl-optimization/84659
4346         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
4348 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4350         PR debug/85302
4351         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
4352         SIZEP is NULL.
4353         (output_loc_list): Pass address of a dummy size variable even in the
4354         locview handling loop.
4355         (index_location_lists): Add comment on why skip_loc_list_entry can't
4356         call size_of_locs.
4358 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4360         PR target/85261
4361         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
4362         into register.
4364 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
4366         PR target/85321
4367         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4368         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
4369         and -mstring-compare-inline-limit.
4371 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4373         PR target/85287
4374         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
4375         for stack clash protection in a register whenever we need it to be in
4376         a register.
4378 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4380         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
4381         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
4383 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4385         PR target/85321
4386         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
4387         the help text.
4388         (mlong-double-): Ditto.
4389         * config/rs6000/sysv4.opt (msdata=): Ditto.
4390         (mtls-size=): Ditto.
4392 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4394         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4395         erroneous entries for
4396         "vector int vec_ldl (int, long int *)", and
4397         "vector unsigned int vec_ldl (int, unsigned long int *)".
4398         Add comments and entries for
4399         "vector bool char vec_ldl (int, bool char *)",
4400         "vector bool short vec_ldl (int, bool short *)",
4401         "vector bool int vec_ldl (int, bool int *)",
4402         "vector bool long long vec_ldl (int, bool long long *)",
4403         "vector pixel vec_ldl (int, pixel *)",
4404         "vector long long vec_ldl (int, long long *)",
4405         "vector unsigned long long vec_ldl (int, unsigned long long *)".
4406         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
4407         type tree bool_long_long_type_node and correct definition of
4408         bool_V2DI_type_node to make reference to this new type tree.
4409         (rs6000_mangle_type): Replace erroneous reference to
4410         bool_long_type_node with bool_long_long_type_node.
4411         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
4412         comments to emphasize sign distinctions for char and int types and
4413         replace RS6000_BTI_bool_long constant with
4414         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
4415         use of RS6000_BTI_pixel.
4416         (bool_long_type_node): Remove this macro definition.
4417         (bool_long_long_type_node): New macro definition
4419 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4421         PR rtl-optimization/85300
4422         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
4423         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
4424         simplify_unary_operation fails.
4426 2018-04-10  Martin Liska  <mliska@suse.cz>
4428         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
4429         cgraph_edge and ipa_ref.
4431 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4433         PR target/85177
4434         PR target/85255
4435         * config/i386/sse.md
4436         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
4437         computation of the VEC_MERGE selector from mask.
4438         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
4439         Fix decoding of the VEC_MERGE selector into mask.
4441 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4443         PR tree-optimization/85286
4444         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
4446 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4448         * final.c (final_1): Set insn_last_address as well as
4449         insn_current_address.
4451 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4453         PR target/85173
4454         * explow.c (emit_stack_probe): Call validize_mem on memory location
4455         before passing it to gen_probe_stack.  Create address operand and
4456         legitimize it for the probe_stack_address case.
4458 2018-04-09  Jan Hubicka  <jh@suse.cz>
4460         PR lto/85078
4461         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4462         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4463         * tree.c (free_lang_data_in_type): Fix handling of binfos;
4464         walk basetypes.
4465         (free_lang_data): Rebuild type inheritance graph.
4467 2018-04-09  Martin Sebor  <msebor@redhat.com>
4469         * invoke.texi (-finline-small-functions): Mention other optimization
4470         options.
4471         (-findirect-inlining, -fpartial-inlining): Same.
4472         (-finline-functions-called-once): Same.
4473         (-freorder-blocks-and-partition): Same.
4475 2018-04-09  Jan Hubicka  <jh@suse.cz>
4477         PR rtl/84058
4478         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4479         jumps; choose last target that matches the criteria (i.e.
4480         no partition changes for non-crossing jumps).
4481         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4482         support for redirecting crossing jumps to non-crossing.
4484 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
4486         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4487         also for naked functions.
4489 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
4491         * config/arc/arc.md (add_shift): New pattern.
4492         (add_shift2): Likewise.
4493         (sub_shift): Likewise.
4494         (sub_shift_cmp0_noout): Likewise.
4495         (compare_si_ashiftsi): Likewise.
4496         (xbfu_cmp0_noout): New combine pattern.
4497         (xbfu_cmp0"): Likewise.
4498         (movsi_set_cc_insn): Place the predicable variant first.
4499         (commutative_binary_cmp0_noout): Remove clobber.
4500         (commutative_binary_cmp0): New pattern.
4501         (noncommutative_binary_cmp0): Likewise.
4502         (noncommutative_binary_cmp0_noout): Likewise.
4503         (noncommutative_binary_comparison_result_used): Removed.
4504         (rsub_cmp0): New pattern.
4505         (rsub_cmp0_noout): Likewise.
4506         (extzvsi): Changed, keep only meaningful variants.
4507         (SQH, SEZ): New iterators.
4508         (SQH_postfix): New mode attribute.
4509         (SEZ_prefix): New code attribute.
4510         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
4511         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
4512         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
4513         of numerical value.
4514         (noncommutative_operator): Check the availability of barrel
4515         shifter option.
4517 2018-04-09  Richard Biener  <rguenther@suse.de>
4519         PR tree-optimization/85284
4520         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
4521         Only use the niter constraining form of simple_iv when the exit
4522         is always executed.
4524 2018-04-09  Tom de Vries  <tom@codesourcery.com>
4526         PR target/84041
4527         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4528         (define_expand "*memory_barrier"): New define_expand.
4529         (define_insn "memory_barrier"): New insn.
4531 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4533         PR rtl-optimization/80463
4534         PR rtl-optimization/83972
4535         PR rtl-optimization/83480
4537         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
4538         correct producer for the insn.
4539         (tidy_control_flow): Fixup seqnos in case of debug insns.
4541 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4543         PR rtl-optimization/83913
4545         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
4546         different sched-times when merging exprs.
4548 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4550         PR rtl-optimization/83962
4552         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
4553         tidy_fallthru_edge and tidy_control_flow.
4555 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4557         PR rtl-optimization/83530
4559         * sel-sched.c (force_next_insn): New global variable.
4560         (remove_insn_for_debug): When force_next_insn is true, also leave only
4561         next insn in the ready list.
4562         (sel_sched_region): When the region wasn't scheduled, make another pass
4563         over it with force_next_insn set to 1.
4565 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4567         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4568         into tm_file.
4569         * config/nds32/constants.md (unspec_volatile_element): Add enum values
4570         for interrupt control.
4571         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4572         functions for interrupt control.
4573         * config/nds32/nds32-intrinsic.md: Likewise.
4574         * config/nds32/nds32_intrinsic.h: Likewise.
4575         * config/nds32/nds32.h (nds32_builtins): Likewise.
4577 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4579         * config/nds32/nds32.c (nds32_init_machine_status,
4580         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4581         strict_aligned_p field.
4582         (nds32_expand_to_rtl_hook): New function.
4583         (TARGET_EXPAND_TO_RTL_HOOK): Define.
4584         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4586 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4587             Chung-Ju Wu  <jasonwucj@gmail.com>
4589         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4590         * config/nds32/nds32-n7.md: New file.
4591         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4592         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4593         pipeline.
4594         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4595         * config/nds32/nds32.md (pipeline_model): Add n7.
4596         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4597         * config/nds32/pipelines.md: Include n7 settings.
4599 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4600             Chung-Ju Wu  <jasonwucj@gmail.com>
4602         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4603         * config/nds32/nds32-e8.md: New file.
4604         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4605         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4606         pipeline.
4607         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4608         * config/nds32/nds32.md (pipeline_model): Add e8.
4609         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4610         * config/nds32/pipelines.md: Include e8 settings.
4612 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4613             Chung-Ju Wu  <jasonwucj@gmail.com>
4615         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4616         * config/nds32/nds32-n8.md: New file.
4617         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4618         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4619         pipeline.
4620         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4621         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4622         * config/nds32/nds32.md (pipeline_model): Add n8.
4623         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4624         * config/nds32/pipelines.md: Include n8 settings.
4626 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4627             Chung-Ju Wu  <jasonwucj@gmail.com>
4629         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4630         * config/nds32/nds32-n9-2r1w.md: New file.
4631         * config/nds32/nds32-n9-3r2w.md: New file.
4632         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4633         nds32_register_ports): New or modify for cpu n9.
4634         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4635         pipeline.
4636         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4637         * config/nds32/nds32-utils.c: New file.
4638         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4639         TARGET_MUL_SLOW): Define.
4640         * config/nds32/nds32.md (pipeline_model): New attribute.
4641         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4642         New options that support cpu n9.
4643         * config/nds32/pipelines.md: Include n9 settings.
4644         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4646 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4648         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4649         information if necessary.
4650         (output_cond_branch_compare_zero): Likewise.
4651         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4652         (nds32_target_alignment): Refine for alignment.
4653         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4654         (FUNCTION_BOUNDARY): Modify.
4655         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4656         align case.
4657         * config/nds32/nds32.opt (malways-align, malign-functions): New.
4659 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4661         * config/nds32/constants.md (unspec_volatile_element): Add values for
4662         TLB operation and data prefetch.
4663         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4664         functions for TLB operation and data prefetch.
4665         * config/nds32/nds32-intrinsic.md: Likewise.
4666         * config/nds32/nds32_intrinsic.h: Likewise.
4667         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4668         (nds32_print_operand): Likewise.
4669         * config/nds32/nds32.h (nds32_builtins): Likewise.
4671 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4672         Andrew Pinski <pinsika@gcc.gnu.org>
4674         PR middle-end/82976
4675         * match.pd: Use constant_boolean_node of correct type instead of
4676         boolean_true_node or boolean_false_node for simplifying
4677         pointer comparisons to zero.
4679 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4681         PR tree-optimization/80021
4682         * tree.c (verify_type_variant): Make error call in verify_variant_match
4683         translatable and remove final full stop.
4685 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4687         * config/nds32/constants.md (unspec_volatile_element): Add
4688         UNSPEC_VOLATILE_EH_RETURN.
4689         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4690         nds32_output_stack_pop): Support dwarf exception handling process.
4691         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4692         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4693         exception handling process.
4694         (nds32_compute_stack_frame): Likewise.
4695         (nds32_return_addr_rtx): Likewise.
4696         (nds32_initial_elimination_offset): Likewise.
4697         (nds32_expand_prologue): Likewise.
4698         (nds32_expand_epilogue): Likewise.
4699         (nds32_dynamic_chain_address): New function.
4700         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4701         exception handling.
4702         (DYNAMIC_CHAIN_ADDRESS): Define.
4703         (EH_RETURN_DATA_REGNO): Define.
4704         (EH_RETURN_STACKADJ_RTX): Define.
4705         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4706         patterns for dwarf exception handling.
4708 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4710         * config/nds32/nds32.h: Clean up obsolete macros.
4712 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4714         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4715         Add enum values for particular instructions.
4716         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4717         particular intrinsic functions.
4718         * config/nds32/nds32-intrinsic.md: Likewise.
4719         * config/nds32/nds32_intrinsic.h: Likewise.
4720         * config/nds32/nds32.h (nds32_builtins): Likewise.
4721         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4722         (btst, ave): New patterns for particular instructions.
4724 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4726         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4727         Add enum values for atomic load/store and memory sync.
4728         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4729         and memory sync.
4730         * config/nds32/nds32-intrinsic.md: Likewise.
4731         * config/nds32/nds32_intrinsic.h: Likewise.
4732         * config/nds32/nds32.h (nds32_builtins): Likewise.
4734 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4736         PR tree-optimization/85257
4737         * fold-const.c (native_encode_vector): If not all elts could fit
4738         and off is -1, return 0 rather than offset.
4739         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4740         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4741         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4742         adjust buffer in native_interpret_expr call.
4744 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4746         * config/nds32/constants.md (unspec_volatile_element): Add cache
4747         control enum values.
4748         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4749         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4750         * config/nds32/nds32.c (nds32_cctl_names): New.
4751         (nds32_print_operand): Handle cache control register names.
4752         * config/nds32/nds32.h (nds32_builtins): New enum values.
4753         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4754         macros.
4755         * config/nds32/nds32.md (type): Add mmu.
4756         * config/nds32/pipelines.md (simple_insn): Add mmu.
4758 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4760         * config/nds32/nds32.md (type): Remove call.
4761         * config/nds32/pipelines.md (simple_insn): Likewise.
4763 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4765         * config/nds32/constants.md (unspec_volatile_element): Add
4766         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4767         UNSPEC_VOLATILE_FMFCFG.
4768         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4769         description for fmfcfg and fmfcsr.
4770         (bdesc_1arg): Add fmtcsr.
4771         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4772         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4773         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4774         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4775         unspec_fmfcfg): New patterns.
4776         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4777         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4778         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4779         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4780         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4781         __nds32__fmfcfg): Define.
4783 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4785         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4786         intrinsic register names.
4787         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4788         intrinsic register enum values and macros.
4790 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4792         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4793         for load/store addressing form.
4794         (nds32_print_operand_address): Likewise.
4796 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4798         PR target/85196
4799         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4800         based on LABEL_REF.  Remove useless assertion.
4801         (pic_address_needs_scratch): Fix formatting.
4802         (sparc_legitimize_pic_address): Minor tweaks.
4803         (sparc_delegitimize_address): Adjust assertion accordingly.
4804         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4805         into symbolic_operand.
4806         (movsi_high_pic_label_ref): Likewise.
4807         (movsi_lo_sum_pic_label_ref): Likewise.
4808         (movdi_pic_label_ref): Likewise.
4809         (movdi_high_pic_label_ref): Likewise.
4810         (movdi_lo_sum_pic_label_ref): Likewise.
4812 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4814         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4815         custom LIB_SPEC setup.
4817 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4818             Kito Cheng  <kito.cheng@gmail.com>
4820         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4821         * config/riscv/freebsd.h: New.
4823 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4825         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4826         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4827         file.
4829 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4830             Kito Cheng  <kito.cheng@gmail.com>
4832         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4833         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4834         * config/nds32/nds32-protos.h (nds32_output_call,
4835         nds32_output_return): Declare.
4836         * config/nds32/nds32.md: Refine all the call and return patterns.
4838 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4840         PR debug/85252
4841         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4842         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4844         PR rtl-optimization/84872
4845         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4846         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4847         EDGE_CROSSING edge.
4849 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4851         * expr.c (copy_blkmode_to_reg): Revert 254862.
4852         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4854 2018-04-06  Richard Biener  <rguenther@suse.de>
4856         PR middle-end/85244
4857         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4858         after seeing a component reference with an adjacent field.  Treat
4859         refs to arrays at struct end of external decls similar to
4860         refs to unconstrained commons.
4862 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4864         PR sanitizer/85213
4865         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4866         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4867         recursive calls.
4868         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4869         save_p here.
4871 2018-04-06  Richard Biener  <rguenther@suse.de>
4873         PR middle-end/85180
4874         * alias.c (find_base_term): New wrapper around find_base_term
4875         unwinding CSELIB_VAL_PTR changes.
4876         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4877         recursion.
4879 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4881         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4882         instructions.
4883         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4884         constant definitions.
4885         ("nop"): lr 0,0 -> nopr r0
4886         ("nop_lr0", "nop_lr1"): New insn definitions.
4888 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4890         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4891         NDS32_V3PUSH_AVAILABLE_P macro.
4893 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4894             Chung-Ju Wu  <jasonwucj@gmail.com>
4896         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4897         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4898         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4899         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4900         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4901         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4902         * config/nds32/constraints.md: New constraints and checking for hard
4903         float configuration.
4904         * config/nds32/iterators.md: New mode iterator and attribute for hard
4905         float configuration.
4906         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4907         patterns.
4908         * config/nds32/nds32-fpu.md: New file.
4909         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4910         deal with hard float code generation.
4911         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4912         ARCH_V3S.
4913         (abi_type, float_reg_number): New enum type.
4914         * config/nds32/nds32-predicates.c: New predicates for hard float.
4915         * config/nds32/nds32-protos.h: Declare functions for hard float.
4916         * config/nds32/nds32.c: Implementation for hard float configuration.
4917         * config/nds32/nds32.h: Definitions for hard float configuration.
4918         * config/nds32/nds32.md: Include hard float machine description and
4919         modify patterns for hard float configuration.
4920         * config/nds32/nds32.opt: New options for hard float configuration.
4921         * config/nds32/predicates.md: New predicates for hard float
4922         configuration.
4924 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4926         * common/config/nds32/nds32-common.c
4927         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4929 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4931         PR middle-end/85195
4932         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4933         CONSTRUCTOR_ELT (ctor, ...)->value.
4935 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4937         PR target/85193
4938         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4940 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4942         PR target/85204
4943         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4944         cond jump.
4946 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4947             Kito Cheng  <kito.cheng@gmail.com>
4949         * config/nds32/constraints.md (U33): Fine-tune checking condition.
4950         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4951         * config/nds32/nds32.h (nds32_16bit_address_type): Add
4952         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4954 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4955             Kito Cheng  <kito.cheng@gmail.com>
4957         * config/nds32/constraints.md (Ufe): New memory constraint.
4958         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4959         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4960         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4961         operands.
4962         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4963         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4965 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4967         * config/nds32/nds32.md: Use optimize_size in the condition for
4968         alu-shift instructions.
4970 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4972         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4974 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4976         * config/nds32/nds32.md (negsi2): Refine pattern.
4978 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4979             Chung-Ju Wu  <jasonwucj@gmail.com>
4981         * config/nds32/iterators.md (shift_rotate): New code iterator.
4982         (shift): New code attribute.
4983         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4984         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4985         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4986         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4987         bit-wise operations.
4988         (andsi3, *andsi3): Ditto.
4989         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4990         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4991         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4992         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4993         nds32_ior_operand, nds32_xor_operand): New predicates.
4995 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4997         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4998         (addsi3, subsi3): ... this.
5000 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5002         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
5004 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5006         * config/nds32/nds32.md: Adjust indention.
5008 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
5010         * config/nds32/nds32.md (feature): New attribute.
5012 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5014         * config/nds32/nds32.md (subtype): New attribute.
5016 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5018         PR target/85203
5019         * config/arm/arm-builtins.c (arm_expand_builtin): Change
5020         expansion to perform a bitwise AND of the argument followed by a
5021         boolean negation of the result.
5023 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
5025         PR rtl-optimization/84878
5026         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
5027         the basic block.  Assert the use reference is not artificial and that
5028         it has an associated insn.
5030 2018-04-04  Michael Matz  <matz@suse.de>
5032         * builtins.c (compute_objsize): Pass correct operand
5033         to array_at_struct_end_p.
5035 2018-04-04  Richard Biener  <rguenther@suse.de>
5037         PR lto/85176
5038         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
5039         from contexts for DINFO_LEVEL_TERSE and below.
5041 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
5043         * config/nds32/nds32-doubleword.md (move_<mode>): Require
5044         resiter_operand condition.
5045         * config/nds32/nds32.md (*move<mode>): Ditto.
5047 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
5048             Monk Chiang  <sh.chiang04@gmail.com>
5050         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
5052 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5054         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
5056 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5057             Kito Cheng  <kito.cheng@gmail.com>
5059         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
5060         nds32_cond_code_str, output_cond_branch,
5061         output_cond_branch_compare_zero, nds32_expand_cbranch,
5062         nds32_expand_cstore, nds32_expand_movcc,
5063         nds32_output_cbranchsi4_equality_zero,
5064         nds32_output_cbranchsi4_equality_reg,
5065         nds32_output_cbranchsi4_equality_reg_or_const_int,
5066         nds32_output_cbranchsi4_greater_less_zero: New functions.
5067         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
5068         nds32_expand_cstore, nds32_expand_movcc,
5069         nds32_output_cbranchsi4_equality_zero,
5070         nds32_output_cbranchsi4_equality_reg,
5071         nds32_output_cbranchsi4_equality_reg_or_const_int,
5072         nds32_output_cbranchsi4_greater_less_zero): Declare.
5073         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
5074         nds32_rimm11s_operand): New predicates.
5075         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
5076         * config/nds32/nds32.md: Rewrite all the branch and conditional move
5077         patterns.
5079 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
5081         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
5082         * config/nds32/nds32.md: Ditto.
5083         * config/nds32/pipelines.md: Ditto.
5085 2018-04-04  Richard Biener  <rguenther@suse.de>
5087         PR tree-optimization/85168
5088         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
5089         propagating abnormals.
5091 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5093         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
5095 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5096             Kito Cheng  <kito.cheng@gmail.com>
5098         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
5099         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
5100         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
5101         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
5102         * config/nds32/nds32.md (sibcall_internal): New.
5103         (sibcall_register): Remove.
5104         (sibcall_immediate): Remove.
5105         (sibcall_value_internal): New.
5106         (sibcall_value_register): Remove.
5107         (sibcall_value_immediate): Remove.
5108         * config/nds32/predicates.md (nds32_general_register_operand): New.
5109         (nds32_call_address_operand): New.
5111 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
5113         PR rtl-optimization/85167
5114         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
5115         bb_defs if *split_p, instead preinitialize it to NULL.
5117         PR tree-optimization/85156
5118         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
5119         evaluating the argument multiple times.
5121 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
5123         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
5124         than vector.
5125         (_mm_cvtpd_ps): Likewise.
5126         (_mm_cvttpd_epi32): Likewise.
5127         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
5128         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
5129         vector, pixel, and bool following altivec.h include.
5131 2018-04-03  Martin Sebor  <msebor@redhat.com>
5133         * doc/extend.texi (Common Function Attributes): Clarify.
5134         (const attribute): Likewise.
5135         (pure attribute): Likewise.
5137 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
5139         PR target/85169
5140         * config/i386/i386.c (ix86_expand_vector_set): Use
5141         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
5143 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
5145         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
5146         instructions when changing rounding bits to preserve precision bits
5147         in the x87 control word.
5149 2018-04-03  Martin Liska  <mliska@suse.cz>
5151         PR tree-optimization/82491
5152         * rtl.h (strip_offset_and_add): Replace += suboffset with
5153         poly_uint64 () + suboffset.
5155 2018-03-29  Martin Liska  <mliska@suse.cz>
5156             Martin Jambor  <mjambor@suse.cz>
5158         PR ipa/84947
5159         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
5160         param_type is not an integral or pointer type.
5162 2018-04-03  Richard Biener  <rguenther@suse.de>
5164         * sese.h (recompute_all_dominators): Remove.
5166 2018-04-02  Martin Sebor  <msebor@redhat.com>
5168         * doc/invoke.texi (-Wrestrict): Fix typos.
5170 2018-04-02  Jim Wilson  <jimw@sifive.com>
5172         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
5173         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
5174         (<optab>di3, <optab>si3_extend): Likewise.
5175         (<optab>si3_mask, <optab>si3_mask_1): New.
5176         (<optab>di3_mask, <optab>di3_mask_1): New.
5177         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
5178         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
5179         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
5181 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
5183         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
5184         example.
5186 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5188         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
5189         (nds32_canonicalize_comparison): New function.
5191 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5192             Kito Cheng  <kito.cheng@gmail.com>
5193             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
5195         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
5196         * config/nds32/constants.md (unspec_volatile_element): Add
5197         UNSPEC_VOLATILE_RELAX_GROUP.
5198         * config/nds32/nds32-relax-opt.c: New file.
5199         * config/nds32/nds32-predicates.c
5200         (nds32_symbol_load_store_p): New function.
5201         * config/nds32/nds32-protos.h
5202         (nds32_symbol_load_store_p): Declare function.
5203         (make_pass_nds32_relax_opt): Declare new rtl pass function.
5204         * config/nds32/nds32.c
5205         (nds32_register_pass): New function to register pass.
5206         (nds32_register_passes): New function to register passes.
5207         * config/nds32/nds32.md (relax_group): New pattern.
5208         * config/nds32/nds32.opt (mrelax-hint): New option.
5209         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
5211 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
5213         * config/nds32/t-nds32: Modify files dependency.
5215 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5217         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
5218         (PROFILE_HOOK): Define its implementation.
5220 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5222         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
5223         type and 32-bit size.
5225 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
5227         PR middle-end/85090
5228         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
5229         (V_128_256): New mode iterator.
5230         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
5231         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
5232         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
5233         of V.
5234         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
5235         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
5237 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
5239         PR target/83315
5240         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
5241         NaN inputs correctly.
5243 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
5245         PR target/80546
5246         * config/rs6000/vsx.md (??r): New mode attribute.
5247         (*vsx_mov<mode>_64bit): Use it.
5248         (*vsx_mov<mode>_32bit): Likewise.
5250 2018-03-30  Martin Sebor  <msebor@redhat.com>
5252         PR tree-optimization/84818
5253         * builtins.c (check_access): Use warning_n.
5255 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5257         PR target/83822
5258         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
5259         condition.
5260         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
5261         condition.
5263 2018-03-30  Julia Koval  <julia.koval@intel.com>
5265         PR target/84413
5266         * x86-tune.def (movx, partial_reg_dependency): Enable for
5267         m_SKYLAKE_AVX512.
5269 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
5271         PR inline-asm/84985
5272         * lra-constraints.c (process_alt_operands): Move setting
5273         this_alternative_matches below.
5275 2018-03-29  Martin Liska  <mliska@suse.cz>
5277         PR lto/84995.
5278         * doc/invoke.texi: Document how LTO works with debug info.
5279         Describe auto-load support of binutils.  Mention 'x86-64'
5280         as valid option value of -march option.
5282 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
5284         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
5286         PR c/85094
5287         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
5288         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
5289         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
5290         checking.
5292 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5294         PR target/84912
5295         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
5296         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
5297         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
5298         for RS6000_BTM_POWERPC64.
5299         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
5300         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
5301         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
5302         definition.
5303         (DIVDE): Use it.
5304         (DIVDEU): Likewise.
5306 2018-03-28 Carl Love  <cel@us.ibm.com>
5308         Revert
5309         2017-09-27  Carl Love  <cel@us.ibm.com>
5311         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
5312         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
5313         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
5314         fctiw instruction.
5316 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5318         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
5319         instead of __vector bool.
5320         (_mm_max_pu8): Likewise.
5321         (_mm_min_pi16): Likewise.
5323 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5325         PR target/84912
5326         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
5327         (DIVWEUO): Likewise.
5328         (DIVDEO): Likewise.
5329         (DIVDEUO): Likewise.
5330         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
5331         DIVWEUO and DIVDEUO.
5332         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
5333         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
5334         (div_extend): Likewise.
5335         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
5336         builtin function.
5337         (__builtin_divweuo): Likewise.
5338         (__builtin_divdeo): Likewise.
5339         (__builtin_divdeuo): Likewise.
5341 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5343         PR target/85095
5344         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
5345         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
5347         PR tree-optimization/82004
5348         * gimple-match-head.c (optimize_pow_to_exp): New function.
5349         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
5350         Don't fold to exp if optimize_pow_to_exp is false.
5352 2018-03-28  Martin Liska  <mliska@suse.cz>
5354         PR other/84819
5355         * calls.c (initialize_argument_information): Fix trailing space.
5356         * common.opt: Fix typo and provide better explanation for
5357         -fsanitize-coverage option.
5358         * config/i386/i386.opt: Fix typo.
5360 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5361             Martin Liska  <mliska@suse.cz>
5363         PR sanitizer/85081
5364         * gimplify.c (asan_poison_variable): Don't do the check for
5365         gimplify_omp_ctxp here.
5366         (gimplify_decl_expr): Do it here.
5367         (gimplify_target_expr): Likewise.
5369 2018-03-28  Martin Liska  <mliska@suse.cz>
5371         PR target/84988
5372         * config/i386/i386.c (ix86_function_arg_advance): Do not call
5373         chkp_type_bounds_count if MPX is not enabled.
5375 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5377         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
5379 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
5381         PR target/84914
5382         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
5383         function to create the function decl for complex long double
5384         multiply and divide for -mabi=ieeelongdouble.
5385         (init_float128_ieee): Call it.
5387 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
5389         PR target/85044
5390         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
5391         -fcf-protection=branch -mibt.
5392         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
5394 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5396         PR target/81863
5397         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
5399 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
5401         PR target/85056
5402         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
5403         extern array declarations.
5405 2018-03-27  Richard Biener  <rguenther@suse.de>
5407         PR middle-end/84067
5408         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
5409         explicit single_use checks.
5411 2018-03-27  Richard Biener  <rguenther@suse.de>
5413         PR tree-optimization/85082
5414         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
5415         Valueize the VUSE.
5417 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5419         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
5420         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
5421         Turn on fasynchronous-unwind-tables and funwind-tables.
5423 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
5425         PR target/85073
5426         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
5427         (*bmi_blsr_<mode>_ccz): Ditto.
5429 2018-03-26  Tom de Vries  <tom@codesourcery.com>
5431         PR tree-optimization/85063
5432         * omp-general.c (offloading_function_p): New function.  Factor out
5433         of ...
5434         * omp-offload.c (pass_omp_target_link::gate): ... here.
5435         * omp-general.h (offloading_function_p): Declare.
5436         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
5437         with attribute omp declare target for offloading functions.
5439 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
5441         PR tree-optimization/84005
5442         * tree-data-ref.h (get_base_for_alignment): Declare.
5443         * tree-data-ref.c (get_base_for_alignment_1): New function.
5444         (get_base_for_alignment): Likewise.
5445         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
5446         get_base_for_alignment to find a suitable base object, instead
5447         of always using drb->base_address.
5449 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5451         PR inline-asm/85022
5452         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5453         known size by default.
5455 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
5457         PR inline-asm/85030
5458         * lra-constraints.c (process_alt_operands): Don't match BLKmode
5459         and non BLKmode operands.
5461 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5463         PR target/85026
5464         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5465         Clean up attributes.
5467 2018-03-23  Richard Biener  <rguenther@suse.de>
5469         PR debug/85020
5470         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5471         we are going to emit early debug for LTO.
5473 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5475         PR inline-asm/85034
5476         * function.c (match_asm_constraints_1): Don't optimize if input
5477         doesn't satisfy general_operand predicate for output's mode.
5479         PR inline-asm/85022
5480         * alias.c (write_dependence_p): Don't require for x_canonicalized
5481         non-VOIDmode if x has VOIDmode.
5483         PR sanitizer/85029
5484         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5485         just don't try to optimize it rather than assert it never happens.
5487 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5489         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5490         macro expansions for definition of ST_INTERNAL_<mode> and
5491         LD_INTERNAL_<mode> builtins.
5492         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5493         Remove prototype.
5494         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5495         function.
5496         (altivec_expand_st_builtin): Likewise.
5497         (altivec_expand_builtin): Remove calls to deleted functions.
5498         (rs6000_address_for_altivec): Delete this function.
5499         * config/rs6000/vector.md: Remove expands for
5500         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
5502 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
5504         PR target/84826
5505         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
5506         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
5507         re-computing once computed.
5508         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
5509         (arm_init_machine_status): Initialize
5510         machine->static_chain_stack_bytes.
5512 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5514         PR target/84760
5515         * doc/extend.texi: Add four new prototypes for vec_ld.
5516         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
5517         definitions for more logical presentation.
5518         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
5519         entries for V1TI variants of __builtin_altivec_ld builtin.
5520         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
5521         handling of V1TI variant of LVX icode pattern.
5522         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
5523         (rs6000_gimple_fold_builtin): Likewise.
5524         (altivec_init_builtins): Add code to define
5525         __builtin_altivec_lvx_v1ti function.
5527 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5529         PR inline-asm/84941
5530         * function.c (match_asm_constraints_1): Don't do the optimization
5531         if input isn't a REG, SUBREG, MEM or constant.
5533 2018-03-22  Tom de Vries  <tom@codesourcery.com>
5535         PR tree-optimization/84956
5536         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
5537         bb_has_abnormal_pred.
5539 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5541         PR sanitizer/85018
5542         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
5543         DECL_INITIAL (decl) to decl at the end.
5544         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
5545         adjust the comment.
5547 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
5549         * doc/extend.texi (__builtin_tgmath): Document when complex
5550         integer types are treated as _Complex _Float64.
5552 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5554         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
5556 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5558         PR tree-optimization/84960
5559         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
5560         if it is ENTRY block, move them into single succ of ENTRY in that case.
5562 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
5564         PR tree-optimization/84811
5565         * poly-int.h (poly_span_traits): Remove the T3 parameter and
5566         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5567         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5568         (known_subrange_p): Update accordingly.  Cast each value involved
5569         in the size comparison, rather than casting the result of the
5570         subtraction.
5572 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5574         PR tree-optimization/84982
5575         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5576         by flipping the least significant bit rather than all bits from
5577         bitpos to bitpos + bitsize - 1.
5579 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5581         * doc/extend.texi (Deprecated Features): Remove mention of
5582         long-deleted deprecations.
5584 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5586         PR jit/84288
5587         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5588         * configure: Regenerate.
5590 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5592         PR tree-optimization/83126
5593         * tree-parloops.c (num_phis): New function.
5594         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5596 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5598         * doc/extend.texi (Deprecated Features): Update deprecated flags,
5599         mention anon-struct/union members and trailing attributes.
5601 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
5603         PR tree-optimization/84969
5604         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5605         builtin memset partitions if they set different rhs values.
5607 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5609         PR rtl-optimization/84989
5610         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5611         VEC_DUPLICATE with scalar result mode.
5613 2018-03-21  Martin Liska  <mliska@suse.cz>
5615         PR ipa/84963
5616         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5617         not intended return statement.
5619 2018-03-21  Martin Liska  <mliska@suse.cz>
5621         PR target/84988
5622         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5623         (chkp_find_bound_slots_1): Limit number of iterations.
5625 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
5627         PR target/84838
5628         * Minor grammar fixes for x86 options.
5630 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5632         PR debug/84875
5633         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5634         holding REG_CFA_RESTORE notes, instead turn them into a USE.
5636 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
5638         PR target/83789
5639         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5640         (altivec_lvx_<mode>_1op): Likewise.
5641         (altivec_stvx_<mode>_2op): Likewise.
5642         (altivec_stvx_<mode>_1op): Likewise.
5643         (altivec_lvx_<VM2:mode>): New define_expand.
5644         (altivec_stvx_<VM2:mode>): Likewise.
5645         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5646         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5647         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5648         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5649         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5650         (rs6000_gen_lvx): Likewise.
5651         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5652         (altivec_expand_stv_builtin): Likewise.
5653         (altivec_expand_builtin): Likewise.
5654         * config/rs6000/vector.md: Likewise.
5656 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5658         PR target/82518
5659         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5660         BYTES_BIG_ENDIAN.
5662 2018-03-20  Richard Biener  <rguenther@suse.de>
5664         PR target/84986
5665         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5666         sign-conversions as zero, fall back to standard scalar_stmt
5667         cost for the rest.
5669 2018-03-20  Martin Liska  <mliska@suse.cz>
5671         PR ipa/84825
5672         * predict.c (rebuild_frequencies): Handle case when we have
5673         PROFILE_ABSENT, but flag_guess_branch_prob is false.
5675 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5677         PR target/84990
5678         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5679         flag_section_anchors.
5680         * varasm.c (use_blocks_for_decl_p): Remove hack for
5681         dw2_force_const_mem.
5683         PR target/84845
5684         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5685         to ...
5686         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5687         be created, use lowpart_subreg of operands[0] rather than operands[0]
5688         itself.
5689         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5690         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5691         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5692         and n constraint instead of aarch64_shift_imm_di and Usd.
5693         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5694         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5696 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5698         PR target/82989
5699         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5700         to favor GPR over NEON registers.
5701         (<shift>di3_neon): Likewise.
5703 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5705         PR target/84952
5706         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5707         (nvptx_process_pars): Emit bar.sync asap and alap.
5709 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5711         PR target/84954
5712         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5713         seen_label if seen_label is already set.
5715 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5717         PR target/84945
5718         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5719         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5720         Use 1U instead of 1.  Formatting fixes.
5722         PR c/84953
5723         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5724         instead of TREE_TYPE (s1) for the return value.
5726 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5728         PR tree-optimization/84946
5729         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5730         bitsize + bitsize in poly_uint64 rather than poly_int64.
5732         PR sanitizer/78651
5733         * dwarf2asm.c: Include fold-const.c.
5734         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5735         of decl rather than decl itself.
5737         PR rtl-optimization/84643
5738         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5740 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5742         PR sanitizer/78651
5743         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5744         calling assemble_variable.
5746 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5748         PR target/81647
5749         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5750         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5752 2018-03-19  Jim Wilson  <jimw@sifive.com>
5754         PR bootstrap/84856
5755         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5756         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5757         (riscv_first_stack_step): Likewise.
5758         (riscv_option_override): Use STACK_BOUNDARY instead of
5759         MIN_STACK_BOUNDARY.
5760         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5761         MIN_STACK_BOUNDARY.
5762         (BIGGEST_ALIGNMENT): Set to 128.
5763         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5764         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5765         STACK_BOUNDARY.
5767 2018-03-19  Richard Biener  <rguenther@suse.de>
5769         PR tree-optimization/84933
5770         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5771         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5773 2018-03-19  Richard Biener  <rguenther@suse.de>
5775         PR tree-optimization/84859
5776         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5777         (cond_if_else_store_replacement): Perform sinking operation on
5778         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5779         Generalize what a BB with a single eligible store is.
5781 2018-03-19  Richard Biener  <rguenther@suse.de>
5783         PR tree-optimization/84929
5784         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5785         chrec_is_positive against non-chrec arg.
5787 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5789         PR target/84711
5790         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5792 2018-03-18  Martin Liska  <mliska@suse.cz>
5794         PR rtl-optimization/84635
5795         * regrename.c (build_def_use): Use matches_mode only when
5796         matches >= 0.
5798 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5800         PR tree-optimization/84913
5801         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5802         vectorize chains of COND_EXPRs.
5804 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5806         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5808 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5810         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5812 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5814         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5816 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5817             Kito Cheng  <kito.cheng@gmail.com>
5819         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5820         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5821         (nds32_adjust_reg_alloc_order): New function.
5822         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5824 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5826         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5827         nds32_print_operand, nds32_print_operand_address): Use
5828         HOST_WIDE_INT_PRINT_DEC instead.
5830 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5832         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5834 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5836         PR target/84902
5837         * config/i386/i386.c (initial_ix86_tune_features,
5838         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5839         unsigned long long.
5840         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5841         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5842         rather than 1u << ix86_tune.  Formatting fix.
5843         (ix86_option_override_internal): Change ix86_arch_mask from
5844         unsigned int to unsigned HOST_WIDE_INT, initialize to
5845         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5846         (ix86_function_specific_restore): Likewise.
5848 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5850         PR target/84899
5851         * postreload.c (reload_combine_recognize_pattern): Perform
5852         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5853         truncate_int_for_mode the result for the destination's mode.
5855         PR c/84909
5856         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5857         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5858         Likewise.
5859         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5860         Likewise.
5862 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5864         PR target/84876
5865         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5866         regno_allocno_class_array and sorted_pseudos.
5867         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5868         insns where regno is used.
5870 2018-03-16  Martin Liska  <mliska@suse.cz>
5872         PR ipa/84833
5873         * multiple_target.c (create_dispatcher_calls): Redirect
5874         reference in the symbol table.
5876 2018-03-16  Martin Liska  <mliska@suse.cz>
5878         PR ipa/84722
5879         * multiple_target.c (create_dispatcher_calls): Redirect also
5880         an alias.
5882 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5884         PR c++/79937
5885         PR c++/82410
5886         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5887         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5888         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5890 2018-03-16  Julia Koval  <julia.koval@intel.com>
5892         * doc/invoke.texi (Skylake Server): Add CLWB.
5893         Cannonlake): Remove CLWB.
5895 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5897         PR tree-optimization/84841
5898         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5899         1 << 3.
5900         (FLOAT_ONE_CONST_TYPE): Define.
5901         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5902         (sort_by_operand_rank): Put entries with higher constant_type last
5903         rather than first to match comments.
5905 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5907         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5908         split predicate.
5910 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5912         PR c++/79085
5913         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5914         check and use address of target always.
5916 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5918         PR target/84574
5919         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5920         (indirect_thunk_bnd_needed): Likewise.
5921         (indirect_thunks_used): Likewise.
5922         (indirect_thunks_bnd_used): Likewise.
5923         (indirect_return_needed): New.
5924         (indirect_return_bnd_needed): Likewise.
5925         (output_indirect_thunk_function): Add a bool argument for
5926         function return.
5927         (output_indirect_thunk_function): Don't generate alias for
5928         function return thunk.
5929         (ix86_code_end): Call output_indirect_thunk_function to generate
5930         function return thunks.
5931         (ix86_output_function_return): Set indirect_return_bnd_needed
5932         and indirect_return_needed instead of indirect_thunk_bnd_needed
5933         and indirect_thunk_needed.
5935 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5937         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5938         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5939         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5941 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5942             Paul Hua <paul.hua.gm@gmail.com>
5944         PR c/84852
5945         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5947 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
5949         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5950         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5951         resp. SFmode cases.
5953 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
5955         PR target/84711
5956         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5957         instead of GET_MODE_SIZE when comparing Units.
5959 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5961         PR target/68256
5962         * varasm.c (hash_section): Return an unchangeble hash value
5963         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5964         Return !aarch64_can_use_per_function_literal_pools_p ().
5966 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5968         PR target/84860
5969         * optabs.c (emit_conditional_move): Pass address of cmode's copy
5970         rather than address of cmode as last argument to prepare_cmp_insn.
5972 2018-03-15  Julia Koval  <julia.koval@intel.com>
5974         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5975         F_AVX512VNNI, F_AVX512BITALG): New.
5977 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
5979         PR target/83451
5980         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
5981         insn for floating-point loads and stores.
5983 2018-03-14  Carl Love  <cel@us.ibm.com>
5985         * config/rs6000/rs6000-c.c: Add macro definitions for
5986         ALTIVEC_BUILTIN_VEC_PERMXOR.
5987         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5988         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5989         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5990         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5991         UNSPEC_VPERMXOR.
5992         * config/doc/extend.texi: Add prototypes for vec_permxor.
5994 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
5996         PR c/84852
5997         * diagnostic-show-locus.c (class layout_point): Convert m_line
5998         from int to linenum_type.
5999         (line_span::comparator): Use linenum "compare" function when
6000         comparing line numbers.
6001         (test_line_span): New function.
6002         (layout_range::contains_point): Convert param "row" from int to
6003         linenum_type.
6004         (layout_range::intersects_line_p): Likewise.
6005         (layout::will_show_line_p): Likewise.
6006         (layout::print_source_line): Likewise.
6007         (layout::should_print_annotation_line_p): Likewise.
6008         (layout::print_annotation_line): Likewise.
6009         (layout::print_leading_fixits): Likewise.
6010         (layout::annotation_line_showed_range_p): Likewise.
6011         (struct line_corrections): Likewise for field m_row.
6012         (line_corrections::line_corrections): Likewise for param "row".
6013         (layout::print_trailing_fixits): Likewise.
6014         (layout::get_state_at_point): Likewise.
6015         (layout::get_x_bound_for_row): Likewise.
6016         (layout::print_line): Likewise.
6017         (diagnostic_show_locus): Likewise for locals "last_line" and
6018         "row".
6019         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
6020         * input.c (selftest::test_linenum_comparisons): New function.
6021         (selftest::input_c_tests): Call it.
6022         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
6023         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
6024         * selftest.h (ASSERT_GT): New macro.
6025         (ASSERT_GT_AT): New macro.
6026         (ASSERT_LT): New macro.
6027         (ASSERT_LT_AT): New macro.
6029 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
6031         PR rtl-optimization/84780
6032         * combine.c (distribute_links): Don't make a link based on pc_rtx.
6034 2018-03-14  Martin Liska  <mliska@suse.cz>
6036         * tree.c (record_node_allocation_statistics): Use
6037         get_stats_node_kind.
6038         (get_stats_node_kind): New function extracted from
6039         record_node_allocation_statistics.
6040         (free_node): Use get_stats_node_kind.
6042 2018-03-14  Richard Biener  <rguenther@suse.de>
6044         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
6045         that the value-set of ANTIC_IN doesn't grow.
6047         Revert
6048         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6049         member.
6050         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6051         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6053 2018-03-14  Julia Koval  <julia.koval@intel.com>
6055         * config.gcc (icelake-client, icelake-server): New.
6056         (icelake): Remove.
6057         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
6058         (initial_ix86_arch_features): Ditto.
6059         (PTA_SKYLAKE): Add SGX.
6060         (PTA_ICELAKE): Remove.
6061         (PTA_ICELAKE_CLIENT): New.
6062         (PTA_ICELAKE_SERVER): New.
6063         (ix86_option_override_internal): Split up icelake on icelake client and
6064         icelake server.
6065         (get_builtin_code_for_version): Ditto.
6066         (fold_builtin_cpu): Ditto.
6067         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
6068         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
6069         * config/i386/i386.h (processor_type): Ditto.
6070         * doc/invoke.texi: Ditto.
6072 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
6074         PR sanitizer/83392
6075         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
6076         INTEGER_CST offset, add it together with bitpos / 8 and
6077         sign extend based on POINTER_SIZE.
6079         PR target/84844
6080         Revert
6081         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
6083         PR target/78090
6084         * config/i386/constraints.md (Yc): New register constraint.
6085         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
6086         Use Yc constraint for alternative 2 of operand 0.  Remove
6087         preferred_for_speed attribute.
6089 2018-03-14  Richard Biener  <rguenther@suse.de>
6091         PR tree-optimization/84830
6092         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
6093         with the old one to avoid oscillations.
6095 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
6097         PR target/83712
6098         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
6099         pseudos.
6100         (assign_by_spills): Return a flag of reload assignment failure.
6101         Do not process the reload assignment failures.  Do not spill other
6102         reload pseudos if they has the same reg class.  Update n if
6103         necessary.
6104         (lra_assign): Add a return arg.  Set up from the result of
6105         assign_by_spills call.
6106         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6107         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6108         usage_insns if it is not NULL.
6109         (spill_hard_reg_in_range): New function.
6110         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6111         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6112         function prototypes.
6113         (lra_assign): Change prototype.
6114         * lra.c (lra): Add code to deal with fails by splitting hard reg
6115         live ranges.
6117 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
6119         * config/riscv/riscv.opt (mrelax): New option.
6120         * config/riscv/riscv.c (riscv_file_start): Emit ".option
6121         "norelax" when riscv_mrelax is disabled.
6122         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
6124 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
6126         PR target/84743
6127         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
6128         reassociation for int modes.
6130 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
6132         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
6133         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
6134         for big-endian.
6135         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
6136         * config/aarch64/aarch64-sve.md
6137         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
6138         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
6139         (*extend<mode><Vwide>2): Rename to...
6140         (aarch64_sve_extend<mode><Vwide>2): ...this.
6141         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
6142         renaming the old pattern to...
6143         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
6144         unsigned packs.
6145         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
6146         define_expand, renaming the old pattern to...
6147         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
6148         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
6149         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
6150         account when deciding which SVE instruction the optab should use.
6151         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
6153 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
6155         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
6156         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
6157         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
6158         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
6159         (tlsdesc_small_<mode>): Turn a define_expand and use
6160         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
6161         (tlsdesc_small_advsimd_<mode>): ...this.
6162         (tlsdesc_small_sve_<mode>): New pattern.
6164 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
6166         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
6167         (UNSPEC_UMUL_HIGHPART): New constants.
6168         (MUL_HIGHPART): New int iteraor.
6169         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
6170         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
6171         define_expand.
6172         (*<su>mul<mode>3_highpart): New define_insn.
6174 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
6176         PR lto/84805
6177         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6178         incomplete types.
6180 2018-03-13  Martin Liska  <mliska@suse.cz>
6182         PR ipa/84658.
6183         * (sem_item_optimizer::sem_item_optimizer): Initialize new
6184         vector.
6185         (sem_item_optimizer::~sem_item_optimizer): Release it.
6186         (sem_item_optimizer::merge_classes): Register variable aliases.
6187         (sem_item_optimizer::fixup_pt_set): New function.
6188         (sem_item_optimizer::fixup_points_to_sets): Likewise.
6189         * ipa-icf.h: Declare new variables and functions.
6191 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
6193         PR middle-end/84834
6194         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
6195         integer_pow2p@2 and test integer_pow2p in condition.
6196         (A < 0 ? C : 0): Similarly for @1.
6198         PR middle-end/84831
6199         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
6200         characters starting at p contain '\0' character, don't look beyond
6201         that.
6203         PR target/84827
6204         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
6205         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
6207         PR target/84828
6208         * reg-stack.c (change_stack): Change update_end var from int to
6209         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
6210         also call set_block_for_insn on the newly added insns and rescan.
6212         PR target/84786
6213         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
6214         on the last operand.
6216         PR c++/84704
6217         * tree.c (stabilize_reference_1): Return save_expr (e) for
6218         STATEMENT_LIST even if it doesn't have side-effects.
6220 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
6222         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
6224 2018-03-12  Renlin Li  <renlin.li@arm.com>
6226         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
6227         aarch64_output_scalar_simd_mov_immediate.
6229 2018-03-12  Martin Sebor  <msebor@redhat.com>
6231         PR tree-optimization/83456
6232         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
6233         for perfectly overlapping calls to memcpy.
6234         (gimple_fold_builtin_memory_chk): Same.
6235         (gimple_fold_builtin_strcpy): Handle no-warning.
6236         (gimple_fold_builtin_stxcpy_chk): Same.
6237         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
6239 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6241         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
6242         parameter.  Use it for SFmode.
6243         (rs6000_function_arg_advance_1): Adjust.
6244         (rs6000_function_arg): Adjust.
6245         (rs6000_gimplify_va_arg): Pass false for that new parameter.
6247 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6249         PR rtl-optimization/84169
6250         PR rtl-optimization/84780
6251         * combine.c (can_combine_p): Check for a 2-insn combination whether
6252         the destination register is used between the two insns, too.
6254 2018-03-12  Richard Biener  <rguenther@suse.de>
6256         PR tree-optimization/84803
6257         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
6258         for refs DR analysis didn't process.
6260 2018-03-12  Richard Biener  <rguenther@suse.de>
6262         PR tree-optimization/84777
6263         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
6264         force-vectorize loops ignore whether we are optimizing for size.
6266 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6268         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
6269         (TARGET_MD_ASM_ADJUST): Define.
6271 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
6272             Kito Cheng  <kito.cheng@gmail.com>
6273             Chung-Ju Wu  <jasonwucj@gmail.com>
6275         * config/nds32/nds32.c (nds32_compute_stack_frame,
6276         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
6277         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
6278         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
6279         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
6280         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
6281         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
6282         * config/nds32/nds32.md (prologue, epilogue): Use macro
6283         NDS32_V3PUSH_AVAILABLE_P to do checking.
6285 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
6287         PR debug/58150
6288         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
6289         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
6290         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
6291         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
6292         addition of most attributes on !orig_type_die or the attribute not
6293         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
6295 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6296             Chung-Ju Wu  <jasonwucj@gmail.com>
6298         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
6299         __NDS32_VH__ macro.
6300         * config/nds32/nds32.opt (mvh): New option.
6302 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6303             Chung-Ju Wu  <jasonwucj@gmail.com>
6305         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
6306         function.
6307         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
6308         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
6309         definition.
6311 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6312             Chung-Ju Wu  <jasonwucj@gmail.com>
6314         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
6315         function.
6316         * config/nds32/nds32-multiple.md (strlensi): New pattern.
6317         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
6319 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
6320             Kito Cheng  <kito.cheng@gmail.com>
6321             Chung-Ju Wu  <jasonwucj@gmail.com>
6323         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
6324         UNSPEC_FFMISM and UNSPEC_FLMISM.
6325         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
6326         for ffb, ffmism and flmism.
6327         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
6328         (unspec_ffmism): Ditto.
6329         (unspec_flmism): Ditto.
6330         (nds32_expand_builtin_impl): Check if string extension is available.
6331         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
6332         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
6334 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
6336         Reverting patch:
6337         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6339         PR target/83712
6340         * lra-assigns.c (assign_by_spills): Return a flag of reload
6341         assignment failure.  Do not process the reload assignment
6342         failures.  Do not spill other reload pseudos if they has the same
6343         reg class.
6344         (lra_assign): Add a return arg.  Set up from the result of
6345         assign_by_spills call.
6346         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6347         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6348         usage_insns if it is not NULL.
6349         (spill_hard_reg_in_range): New function.
6350         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6351         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6352         function prototypes.
6353         (lra_assign): Change prototype.
6354         * lra.c (lra): Add code to deal with fails by splitting hard reg
6355         live ranges.
6357 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
6359         PR target/84807
6360         * config/i386/i386.opt: Replace Enforcment with Enforcement.
6362 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
6364         PR debug/84620
6365         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
6366         (dw_val_node): Add val_symbolic_view.
6367         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
6368         (symview_upper_bound): New.
6369         (new_line_info_table): Initialize symviews_since_reset.
6370         (dwarf2out_source_line): Count symviews_since_reset and set
6371         symview_upper_bound.
6372         (dw_val_equal_p): Handle symview.
6373         (add_AT_symview): New.
6374         (print_dw_val): Handle symview.
6375         (attr_checksum, attr_checksum_ordered): Likewise.
6376         (same_dw_val_p, size_of_die): Likewise.
6377         (value_format, output_die): Likewise.
6378         (add_high_low_attributes): Use add_AT_symview for entry_view.
6379         (dwarf2out_finish): Reset symview_upper_bound, clear
6380         zero_view_p.
6382 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
6384         PR target/83969
6385         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
6386         Add strict argument and use it.
6387         (rs6000_split_multireg_move): Update for new strict argument.
6388         (mem_operand_gpr): Disallow all non-offsettable addresses.
6389         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
6391 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
6393         PR target/84772
6394         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
6395         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
6396         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
6398         PR c++/84767
6399         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
6400         decl, use remap_type if we want to use the type.
6402 2018-03-09  Martin Sebor  <msebor@redhat.com>
6404         PR tree-optimization/84526
6405         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6406         Remove dead code.
6407         (builtin_access::generic_overlap): Be prepared to handle non-array
6408         base objects.
6410 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
6412         PR rtl-optimization/84682
6413         * lra-constraints.c (process_address_1): Check is_address flag
6414         for address constraints.
6415         (process_alt_operands): Likewise.
6416         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
6417         preprocess_constraints.
6418         * recog.h (preprocess_constraints): Add oploc parameter.
6419         Adjust callers.
6420         * recog.c (preprocess_constraints): Test address_operand for
6421         CT_ADDRESS constraints.
6423 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6425         PR target/83712
6426         * lra-assigns.c (assign_by_spills): Return a flag of reload
6427         assignment failure.  Do not process the reload assignment
6428         failures.  Do not spill other reload pseudos if they has the same
6429         reg class.
6430         (lra_assign): Add a return arg.  Set up from the result of
6431         assign_by_spills call.
6432         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6433         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6434         usage_insns if it is not NULL.
6435         (spill_hard_reg_in_range): New function.
6436         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6437         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6438         function prototypes.
6439         (lra_assign): Change prototype.
6440         * lra.c (lra): Add code to deal with fails by splitting hard reg
6441         live ranges.
6443 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6445         PR target/83193
6446         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
6447         Accept complain bool parameter.  Only emit errors if it is true.
6448         (arm_parse_cpu_option_name): Likewise.
6449         (arm_target_thumb_only): Adjust callers of the above.
6450         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6451         prototype to take a default true bool parameter.
6452         (arm_parse_arch_option_name): Likewise.
6454 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
6455             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
6457         PR jit/64089
6458         PR jit/84288
6459         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6460         * configure: Regenerate.
6461         * configure.ac ("linker --version-script option"): New.
6462         ("linker soname option"): New.
6464 2018-03-09  Richard Biener  <rguenther@suse.de>
6466         PR tree-optimization/84775
6467         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6468         immediate uses of predicate stmts and mark them modified.
6470         Revert
6471         PR tree-optimization/84178
6472         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6473         to caller.
6474         (version_loop_for_if_conversion): Delay update_ssa call.
6475         (tree_if_conversion): Delay update_ssa until after predicate
6476         insertion.
6478 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
6480         PR target/84763
6481         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6482         when the function accesses prior frames.
6484 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6486         PR debug/84456
6487         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6488         gen_llsym, otherwise call maybe_gen_llsym.
6490         PR inline-asm/84742
6491         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6492         has ',' character inside of it.
6494 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6496         PR target/84748
6497         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6498         as clobbering CC_REGNUM.
6500 2018-03-08  Richard Biener  <rguenther@suse.de>
6502         PR middle-end/84552
6503         * tree-scalar-evolution.c: Include tree-into-ssa.h.
6504         (follow_copies_to_constant): Do not follow SSA names registered
6505         for update.
6507 2018-03-08  Richard Biener  <rguenther@suse.de>
6509         PR tree-optimization/84178
6510         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6511         to caller.
6512         (version_loop_for_if_conversion): Delay update_ssa call.
6513         (tree_if_conversion): Delay update_ssa until after predicate
6514         insertion.
6516 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
6518         PR tree-optimization/84178
6519         * tree-if-conv.c (release_bb_predicate): Remove the
6520         the assertion that the stmts have NULL use_ops.
6521         Discard the statements, asserting that they haven't
6522         yet been added to a BB.
6524 2018-03-08  Richard Biener  <rguenther@suse.de>
6526         PR tree-optimization/84746
6527         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
6528         (phi_translate): Pass in destination ANTIC_OUT set.
6529         (phi_translate_1): Likewise.  For a simplified result lookup
6530         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
6531         (phi_translate_set): Adjust.
6532         (do_pre_regular_insertion): Likewise.
6533         (do_pre_partial_partial_insertion): Likewise.
6535 2018-03-08  Martin Liska  <mliska@suse.cz>
6537         PR gcov-profile/84735
6538         * doc/gcov.texi: Document usage of profile files.
6539         * gcov-io.h: Document changes in the format.
6541 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
6543         PR debug/84404
6544         PR debug/84408
6545         * dwarf2out.c (struct dw_line_info_table): Update comments for
6546         view == -1.
6547         (FORCE_RESET_NEXT_VIEW): New.
6548         (FORCE_RESETTING_VIEW_P): New.
6549         (RESETTING_VIEW_P): Check for -1 too.
6550         (ZERO_VIEW_P): Likewise.
6551         (new_line_info_table): Force-reset next view.
6552         (dwarf2out_begin_function): Likewise.
6553         (dwarf2out_source_line): Simplify zero_view_p initialization.
6554         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
6555         view directly.  Omit view when omitting .loc at line 0.
6557 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6559         PR tree-optimization/84740
6560         * tree-switch-conversion.c (process_switch): Call build_constructors
6561         only if info.phi_count is non-zero.
6563         PR tree-optimization/84739
6564         * tree-tailcall.c (find_tail_calls): Check call arguments against
6565         DECL_ARGUMENTS (current_function_decl) rather than
6566         DECL_ARGUMENTS (func) when checking for tail recursion.
6568 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6570         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6571         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6572         Volker Reichelt's entry and add entries for people that perform
6573         GCC fuzzy testing and report numerous bugs.
6575 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
6577         PR target/82411
6578         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6579         readonly data in sdata, if that is disabled.
6580         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6581         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6582         -mreadonly-in-sdata option.
6584 2018-03-07  Martin Sebor  <msebor@redhat.com>
6586         PR tree-optimization/84468
6587         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6588         basic block when looking for nul assignment.
6590 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
6592         PR target/84277
6593         * except.h (output_function_exception_table): Adjust prototype.
6594         * except.c (output_function_exception_table): Remove FNNAME parameter
6595         and add SECTION parameter.  Ouput one part of the table at a time.
6596         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6597         the first part of the exception table and emit unwind directives.
6598         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6599         (i386_pe_seh_cold_init): Likewise.
6600         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6601         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6602         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6603         (ix86_output_call_insn): Emit a nop in one more case for SEH.
6604         * config/i386/winnt.c: Include except.h.
6605         (struct seh_frame_state): Add reg_offset, after_prologue and
6606         in_cold_section fields.
6607         (i386_pe_seh_end_prologue): Set seh->after_prologue.
6608         (i386_pe_seh_cold_init): New function.
6609         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6610         to seh->in_cold_section.
6611         (seh_emit_push): Record the offset of the push.
6612         (seh_emit_save): Record the offet of the save.
6613         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6614         Test seh->after_prologue to disregard the epilogue.
6615         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6616         (i386_pe_end_cold_function): New function.
6618 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6620         PR fortran/84565
6621         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6622         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6624         PR c++/84704
6625         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6626         on tmp_var.
6627         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6628         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6630         PR middle-end/84723
6631         * multiple_target.c: Include tree-inline.h and intl.h.
6632         (expand_target_clones): Diagnose and fail if node->definition and
6633         !tree_versionable_function_p (node->decl).
6635 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
6637         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6638         sprint_ul.
6639         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6640         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6641         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6643 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6645         PR target/84710
6646         * combine.c (try_combine): Use reg_or_subregno instead of handling
6647         just paradoxical SUBREGs and REGs.
6649 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
6651          * config/arc/arc.c (arc_finalize_pic): Remove function.
6652          (arc_must_save_register): We use single base PIC register, remove
6653          checks to save/restore the PIC register.
6654          (arc_expand_prologue): Likewise.
6655          * config/arc/arc-protos.h (arc_set_default_type_attributes):
6656          Remove.
6657          (arc_verify_short): Likewise.
6658          (arc_attr_type): Likewise.
6659          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6660          (walk_stores): Likewise.
6661          (arc_address_cost): Make it static.
6662          (arc_verify_short): Likewise.
6663          (branch_dest): Likewise.
6664          (arc_attr_type): Likewise.
6665          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6666          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6667          (arc_final_prescan_insn): Remove inserting the nops due to
6668          hardware hazards.  It is done in reorg step.
6669          (insn_length_variant_t): Remove.
6670          (insn_length_parameters_t): Likewise.
6671          (arc_insn_length_parameters): Likewise.
6672          (arc_get_insn_variants): Likewise.
6673          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6675 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6677         PR inline-asm/84683
6678         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6679         assertion failure.
6681         PR tree-optimization/84687
6682         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6683         on new_node->decl.
6684         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6686 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6688         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6689         Rename to ppc_speculation_barrier.
6690         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6691         __builtin_ppc_speculation_barrier.
6693 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6695         PR target/84700
6696         * combine.c (combine_simplify_rtx): Don't try to simplify if
6697         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6698         are equal to x.
6700 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6702         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6703         to 32 bytes when compiling for POWER9.
6705 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6707         PR target/84564
6708         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6709         regparm >= 3 with no arg reg available also for calls with
6710         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6712         PR target/84524
6713         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6714         orig,vex.
6715         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6717 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6719         PR target/84264
6720         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6722 2018-03-05  Richard Biener  <rguenther@suse.de>
6724         PR tree-optimization/84486
6725         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6726         When inserting a __builtin_assume_aligned call set the LHS
6727         SSA name alignment info accordingly.
6729 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6731         PR tree-optimization/84114
6732         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6733         Avoid reassociation of FLOAT_MODE addition.
6735 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6737         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6738         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6739         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6740         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6741         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6742         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6743         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6744         and -mwbnoinvd.
6745         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6746         __builtin_ia32_wbinvd): New builtins.
6747         (SPECIAL_ARGS2): New.
6748         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6749         (SPECIAL_ARGS2): New.
6750         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6751         (ix86_valid_target_attribute_inner_p): Ditto.
6752         (ix86_init_mmx_sse_builtins): Add special_args2.
6753         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6754         TARGET_WBNOINVD_P): New.
6755         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6756         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6757         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6758         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6759         * config/i386/pconfigintrin.h: New file.
6760         * config/i386/wbnoinvdintrin.h: Ditto.
6761         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6762         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6764 2018-03-05  Richard Biener  <rguenther@suse.de>
6766         PR tree-optimization/84670
6767         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6768         member.
6769         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6770         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6771         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6772         doesn't grow if all successors (recursively) were visited at least
6773         once.
6775 2018-03-05  Richard Biener  <rguenther@suse.de>
6777         PR tree-optimization/84650
6778         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6779         if executed in the loop pipeline.
6781 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6783         * doc/configfiles.texi (Configuration Files): Move info about
6784         conditionalizing $target-protos.h to...
6785         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6786         differs from $target-protos.h.
6788 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6789             Chung-Ju Wu  <jasonwucj@gmail.com>
6791         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6792         * config/nds32/nds32-multiple.md (setmemsi): Define.
6793         * config/nds32/nds32-memory-manipulation.c
6794         (nds32_gen_dup_4_byte_to_word_value): New.
6795         (emit_setmem_word_loop): New.
6796         (emit_setmem_byte_loop): New.
6797         (nds32_expand_setmem_loop): New.
6798         (nds32_expand_setmem_loop_v3m): New.
6799         (nds32_expand_setmem_unroll): New.
6800         (nds32_expand_setmem): New.
6802 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6803             Chung-Ju Wu  <jasonwucj@gmail.com>
6805         * config/nds32/nds32-memory-manipulation.c
6806         (nds32_emit_load_store): New.
6807         (nds32_emit_post_inc_load_store): New.
6808         (nds32_emit_mem_move): New.
6809         (nds32_emit_mem_move_block): New.
6810         (nds32_expand_movmemsi_loop_unknown_size): New.
6811         (nds32_expand_movmemsi_loop_known_size): New.
6812         (nds32_expand_movmemsi_loop): New.
6813         (nds32_expand_movmemsi_unroll): New.
6814         (nds32_expand_movmemqi): Rename ...
6815         (nds32_expand_movmemsi): ... to this.
6816         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6817         (movmemsi): ... to this.
6818         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6819         (nds32_expand_movmemsi): ... to this.
6821 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6822             Monk Chiang  <sh.chiang04@gmail.com>
6823             Chung-Ju Wu  <jasonwucj@gmail.com>
6825         * config/nds32/nds32-protos.h
6826         (nds32_expand_load_multiple): New arguments.
6827         (nds32_expand_store_multiple): Ditto.
6828         (nds32_valid_multiple_load_store): Rename ...
6829         (nds32_valid_multiple_load_store_p): ... to this.
6830         * config/nds32/nds32-memory-manipulation.c
6831         (nds32_expand_load_multiple): Refine implementation.
6832         (nds32_expand_store_multiple): Ditto.
6833         * config/nds32/nds32-multiple.md
6834         (load_multiple): Update nds32_expand_load_multiple interface.
6835         (store_multiple): Update nds32_expand_store_multiple interface.
6836         * config/nds32/nds32-predicates.c
6837         (nds32_valid_multiple_load_store): Rename ...
6838         (nds32_valid_multiple_load_store_p): ... to this and refine
6839         implementation.
6840         * config/nds32/predicates.md
6841         (nds32_load_multiple_and_update_address_operation): New predicate.
6842         (nds32_store_multiple_and_update_address_operation): New predicate.
6844 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6845             Chung-Ju Wu  <jasonwucj@gmail.com>
6847         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6848         (combo): New attribute.
6849         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6851 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6853         * config/nds32/nds32.opt: Change -mcmodel= default value.
6855 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6856             Monk Chiang  <sh.chiang04@gmail.com>
6857             Chung-Ju Wu  <jasonwucj@gmail.com>
6859         * config/nds32/constants.md (unspec_element): New enum.
6860         * config/nds32/constraints.md (Umw): New constraint.
6861         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6862         * config/nds32/nds32-intrinsic.md: Likewise.
6863         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6864         (nds32_valid_smw_lwm_base_p): New.
6865         (nds32_output_smw_single_word): New.
6866         (nds32_output_lmw_single_word): New.
6867         (nds32_expand_unaligned_load): New.
6868         (nds32_expand_unaligned_store): New.
6869         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6870         (nds32_output_smw_single_word): Declare.
6871         (nds32_output_lmw_single_word): Declare.
6872         (nds32_expand_unaligned_load): Declare.
6873         (nds32_expand_unaligned_store): Declare.
6874         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6875         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6876         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6877         NDS32_BUILTIN_UASTORE_DW.
6878         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6879         predicate.
6881 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6882             Kito Cheng  <kito.cheng@gmail.com>
6883             Chung-Ju Wu  <jasonwucj@gmail.com>
6885         * config/nds32/nds32-intrinsic.c
6886         (nds32_expand_builtin_null_ftype_reg): Delete.
6887         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6888         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6889         (nds32_read_argument): New.
6890         (nds32_legitimize_target): Ditto.
6891         (nds32_legitimize_argument): Ditto.
6892         (nds32_check_constant_argument): Ditto.
6893         (nds32_expand_unop_builtin): Ditto.
6894         (nds32_expand_unopimm_builtin): Ditto.
6895         (nds32_expand_binop_builtin): Ditto.
6896         (nds32_builtin_decl_impl): Ditto.
6897         (builtin_description): Ditto.
6898         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6899         (nds32_init_builtins_impl): Ditto.
6900         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6901         (nds32_builtin_decl): New.
6902         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6903         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6905 2018-03-02  Jeff Law  <law@redhat.com>
6907         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6908         (redundant_insn, fill_simple_delay_slots): Likewise.
6909         (fill_slots_from_thread): Likewise.
6910         * resource.c (mark_referenced_resources): Likewise.
6911         (mark_set_resources, find_dead_or_set_registers): Likewise.
6913 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6915         * substring-locations.h (format_warning_va): Formatting fix for
6916         ATTRIBUTE_GCC_DIAG.
6917         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6918         argument.
6919         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6920         * substring-locations.c: Include intl.h.
6921         (format_warning_va): Turned into small wrapper around
6922         format_warning_n_va, renamed to ...
6923         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6924         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6925         use ngettext.
6926         (format_warning_at_substring_n): New function.
6927         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6928         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6929         format_warning_at_substring with just a shorter name instead of
6930         const function pointer.
6931         (fmtwarn_n): New function.
6932         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6933         appropriate, get rid of all the fmtstr temporaries, move conditionals
6934         with G_() wrapped string literals directly into fmtwarn arguments,
6935         cast dir.len to (int), formatting fixes.
6937 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6939         * doc/invoke.texi: Remove "Cilk Plus" references.
6941 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6942             Richard Biener  <rguenther@suse.de>
6944         PR ipa/84628
6945         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6946         for error or warning attributes if CALL_FROM_THUNK_P is set.
6947         Formatting fixes.
6949 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6951         PR target/56540
6952         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6953         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6955         PR target/56540
6956         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6957         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6959         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6960         instead of -1U in last predictors element's probability member.
6962 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6964         PR ipa/83983
6965         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6966         arguments if they are comparable.
6968 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6970         PR tree-optimization/84634
6971         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6972         masks and masked_loop_p with a single loop_masks, making sure it's
6973         null for bb vectorization.
6975 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6977         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6978         (vect_analyze_data_ref_access): Use loop->safe_len rather than
6979         loop->force_vectorize to check whether there is no alias.
6981 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6983         PR target/84614
6984         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6985         prototypes.
6986         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6987         comments.
6988         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6989         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6990         instead of a loop around prev_real_insn.
6991         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6992         prev_real_insn.
6994         PR inline-asm/84625
6995         * config/i386/i386.c (ix86_print_operand): Use conditional
6996         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6997         zero vector.
6999 2018-03-02  Richard Biener  <rguenther@suse.de>
7001         PR tree-optimization/84427
7002         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
7003         (bitmap_set_subtract_values): Rewrite to handle multiple
7004         exprs per value.
7005         (clean): Likewise.
7006         (prune_clobbered_mems): Likewise.
7007         (phi_translate): Take edge instead of pred/phiblock.
7008         (phi_translate_1): Likewise.
7009         (phi_translate_set): Likewise.  Insert all translated
7010         exprs for a value into the set, keeping possibly multiple
7011         expressions per value.
7012         (compute_antic_aux): Adjust for phi_translate changes.
7013         When intersecting union the expressions and prune those
7014         not in the final value set, keeping possibly multiple
7015         expressions per value.  Do not use value-insertion
7016         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
7017         all expressions.  Add verification that the value-sets
7018         only shrink during iteration.
7019         (compute_partial_antic_aux): Adjust for the phi_translate changes.
7020         (do_pre_regular_insertion): Likewise.
7021         (do_pre_partial_partial_insertion): Likewise.
7023 2018-03-02  Richard Biener  <rguenther@suse.de>
7025         PR target/82005
7026         * config/darwin.c (saved_debug_info_level): New static global.
7027         (darwin_asm_lto_start): Disable debug info generation for LTO out.
7028         (darwin_asm_lto_end): Restore debug info generation settings.
7030 2018-03-01  Martin Liska  <mliska@suse.cz>
7032         PR sanitizer/82484
7033         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
7034         volatile arguments.
7036 2018-03-01  Richard Biener  <rguenther@suse.de>
7038         PR debug/84645
7039         * dwarf2out.c (gen_variable_die): Properly handle late VLA
7040         type annotation with LTO when debug was disabled at compile-time.
7042 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
7044         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
7045         XINT with INTVAL.
7046         (mips_final_postscan_insn): Likewise.
7048 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
7050         PR rtl-optimization/84528
7051         * alias.c (init_alias_target): Add commentary.
7052         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
7053         a unique base value if the frame pointer is not eliminated
7054         to the stack pointer.
7056 2018-03-01  Tom de Vries  <tom@codesourcery.com>
7058         PR rtl-optimization/83327
7059         * lra-int.h (hard_regs_spilled_into): Declare.
7060         * lra.c (hard_regs_spilled_into): Define.
7061         (init_reg_info): Init hard_regs_spilled_into.
7062         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
7063         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
7064         (process_bb_lives): Handle hard_regs_spilled_into.
7065         (lra_create_live_ranges_1): Before doing liveness propagation, clear
7066         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
7068 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
7070         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
7071         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
7072         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
7073         * config/rs6000/aix72.h: New file.
7075 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
7077         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
7078         instead of warning_at with conditional singular and plural messages
7079         where possible.
7081         PR target/52991
7082         * stor-layout.c (update_alignment_for_field): For
7083         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
7084         && !DECL_PACKED (field), do the alignment update, just use
7085         only desired_align instead of MAX (type_align, desired_align)
7086         as the alignment.
7087         (place_field): Don't do known_align < desired_align handling
7088         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
7089         is non-NULL, instead do it after rli->prev_field handling and
7090         only if not within a bitfield word.  For DECL_PACKED (field)
7091         use type_align of BITS_PER_UNIT.
7093 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
7095         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
7096         superfluous parentheses and trailing spaces.
7098 2018-02-28  Richard Biener  <rguenther@suse.de>
7100         PR tree-optimization/84584
7101         * graphite-scop-detection.c (scop_detection::add_scop): Discard
7102         SCoPs with fake exit edge.
7104 2018-02-28  Martin Liska  <mliska@suse.cz>
7106         PR testsuite/84597
7107         * timevar.c (timer::print): Fix format to properly print 100%
7108         values.
7110 2018-02-28  Richard Biener  <rguenther@suse.de>
7112         PR middle-end/84607
7113         * genmatch.c (capture_info::walk_match): Do not mark
7114         captured expressions without operands as expr_p given
7115         they act more like predicates and should be subject to
7116         "lost tail" side-effect preserving.
7118 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
7120         PR rtl-optimization/81611
7121         * auto-inc-dec.c (attempt_change): Move dead note from
7122         mem_insn if it's the next use of regno
7123         (find_address): Take address use of reg holding
7124         non-incremented value.  Add parm to limit search to the named
7125         reg only.
7126         (merge_in_block): Attempt to use a mem insn that is the next
7127         use of the original regno.
7129 2018-02-27  Martin Sebor  <msebor@redhat.com>
7131         PR c++/83871
7132         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
7133         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
7135 2018-02-27  Martin Sebor  <msebor@redhat.com>
7137         PR translation/84207
7138         * diagnostic-core.h (warning_n, error_n, inform_n): Change
7139         n argument to unsigned HOST_WIDE_INT.
7140         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
7141         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
7142         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
7143         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
7145 2018-02-27  Richard Biener  <rguenther@suse.de>
7147         PR tree-optimization/84512
7148         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7149         Do not use the estimate returned from record_stmt_cost for
7150         the scalar iteration cost but sum properly using add_stmt_cost.
7152 2018-02-27  Richard Biener  <rguenther@suse.de>
7154         PR tree-optimization/84466
7155         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7156         Adjust last change to less strictly validate use operands.
7158 2018-02-27  Martin Liska  <mliska@suse.cz>
7160         PR gcov-profile/84548
7161         * gcov.c (process_file): Allow partial overlap and consider it
7162         also as group functions.
7163         (output_lines): Properly calculate range of lines for a group.
7165 2018-02-27  Martin Liska  <mliska@suse.cz>
7167         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
7168         'ggc' suffixes.  Change first column width.
7169         (timer::print): Fix formatting of the column.
7171 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
7173         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
7174         preserve inline entry blocks for the sake of debug inline
7175         entry point markers alone.
7176         (remove_unused_locals): Suggest in comments a better place to
7177         force the preservation of inline entry blocks that are
7178         otherwise unused, but do not preserve them.
7180 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7182         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
7184 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7186         PR target/84039
7187         * config/i386/constraints.md (Bs): Replace
7188         ix86_indirect_branch_register with
7189         TARGET_INDIRECT_BRANCH_REGISTER.
7190         (Bw): Likewise.
7191         * config/i386/i386.md (indirect_jump): Likewise.
7192         (tablejump): Likewise.
7193         (*sibcall_memory): Likewise.
7194         (*sibcall_value_memory): Likewise.
7195         Peepholes of indirect call and jump via memory: Likewise.
7196         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
7197         (*sibcall_value_GOT_32): Likewise.
7198         * config/i386/predicates.md (indirect_branch_operand): Likewise.
7199         (GOT_memory_operand): Likewise.
7200         (call_insn_operand): Likewise.
7201         (sibcall_insn_operand): Likewise.
7202         (GOT32_symbol_operand): Likewise.
7203         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
7205 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7207         PR rtl-optimization/83496
7208         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
7209         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
7210         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
7211         redundant insn, if any.
7212         (relax_delay_slots): Likewise.
7213         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
7215 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
7217         PR tree-optimization/83965
7218         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
7219         that grouped statements are part of a reduction chain.  Return
7220         true if the statement is not marked as a reduction itself but
7221         is part of a group.
7222         (vect_recog_dot_prod_pattern): Don't check whether the statement
7223         is part of a group here.
7224         (vect_recog_sad_pattern): Likewise.
7225         (vect_recog_widen_sum_pattern): Likewise.
7227 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7229         PR debug/84545
7230         * final.c (rest_of_clean_state): Also look for calls inside sequences.
7232 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7234         PR target/84530
7235         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
7236         the bool argument.
7237         (ix86_output_indirect_function_return): New prototype.
7238         (ix86_split_simple_return_pop_internal): Likewise.
7239         * config/i386/i386.c (indirect_return_via_cx): New.
7240         (indirect_return_via_cx_bnd): Likewise.
7241         (indirect_thunk_name): Handle return va CX_REG.
7242         (output_indirect_thunk_function): Create alias for
7243         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
7244         (ix86_output_indirect_jmp): Remove the bool argument.
7245         (ix86_output_indirect_function_return): New function.
7246         (ix86_split_simple_return_pop_internal): Likewise.
7247         * config/i386/i386.md (*indirect_jump): Don't pass false
7248         to ix86_output_indirect_jmp.
7249         (*tablejump_1): Likewise.
7250         (simple_return_pop_internal): Change it to define_insn_and_split.
7251         Call ix86_split_simple_return_pop_internal to split it for
7252         -mfunction-return=.
7253         (simple_return_indirect_internal): Call
7254         ix86_output_indirect_function_return instead of
7255         ix86_output_indirect_jmp.
7257 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
7259         PR bootstrap/84405
7260         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
7261         memset and value initialization afterwards.
7263 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
7265         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
7267 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7269         PR target/84521
7270         * common/config/aarch64/aarch64-common.c
7271         (aarch_option_optimization_table[]): Switch
7272         off fomit-frame-pointer
7274 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7275             Chung-Ju Wu  <jasonwucj@gmail.com>
7277         * config/nds32/nds32-multiple.md (load_multiple): Disallow
7278         volatile memory.
7279         (store_multiple): Ditto.
7281 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7283         * config.gcc: Add --with-cpu support for nds32 target.
7284         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
7285         * config/nds32/nds32.opt: Add -mcpu= option.
7287 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
7289         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
7290         isel=yes): Warn for these deprecated options.
7292 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
7294         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
7295         ISA_2_5_MASKS_EMBEDDED.
7297 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
7299         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
7300         p->max as pointers rather than using iterative_hash_expr.
7302 2018-02-23  Carl Love  <cel@us.ibm.com>
7304         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
7305         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
7306         BU_P8V_OVERLOAD_2.
7307         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
7308         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
7309         P8V_BUILTIN_VEC_VUNSIGNED2.
7311 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
7313         PR target/81572
7314         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
7315         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
7316         LRA_UNKNOWN_ALT.
7317         * lra-constraints.c (curr_insn_transform): Set up
7318         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
7319         LRA_UNKNOWN_ALT.
7320         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
7321         * lra-eliminations.c (spill_pseudos): Ditto.
7322         (process_insn_for_elimination): Ditto.
7323         * lra-lives.c (reg_early_clobber_p): Use the new macros.
7324         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
7325         LRA_NON_CLOBBERED_ALT.
7327 2018-02-22  Martin Sebor  <msebor@redhat.com>
7329         PR tree-optimization/84480
7330         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
7331         to maybe_diag_stxncpy_trunc.  Call it.
7332         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
7333         from gimple_fold_builtin_strcpy.  Print inlining stack.
7334         (handle_builtin_stxncpy): Print inlining stack.
7335         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
7337 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
7339         PR target/84176
7340         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
7341         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
7342         and -fcheck-pointer-bounds are used together.
7343         (indirect_thunk_prefix): New enum.
7344         (indirect_thunk_need_prefix): New function.
7345         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
7346         "_nt" instead of "_bnd" for NOTRACK prefix.
7347         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
7348         (output_indirect_thunk_function): Likewise.
7349         (): Likewise.
7350         (ix86_code_end): Update output_indirect_thunk_function calls.
7351         (ix86_output_indirect_branch_via_reg): Replace
7352         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
7353         (ix86_output_indirect_branch_via_push): Likewise.
7354         (ix86_output_function_return): Likewise.
7355         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
7356         incompatible with -fcf-protection=branch and
7357         -fcheck-pointer-bounds.
7359 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7361         PR target/83335
7362         * config/aarch64/aarch64.c (aarch64_print_address_internal):
7363         Change gcc_assert call to output_operand_lossage.
7365 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7367         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
7369 2018-02-22  DJ Delorie  <dj@redhat.com>
7370             Sebastian Perta  <sebastian.perta@renesas.com>
7371             Oleg Endo  <olegendo@gcc.gnu.org>
7373         * config/rx/rx.c (rx_rtx_costs): New function.
7374         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
7376 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7378         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
7380 2018-02-22  Martin Liska  <mliska@suse.cz>
7382         PR driver/83193
7383         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
7384         Add "native" as a possible value.
7386 2018-02-22  Martin Liska  <mliska@suse.cz>
7388         PR driver/83193
7389         * config/i386/i386.c (ix86_option_override_internal):
7390         Add "native" as a possible value for -march and -mtune.
7392 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
7394         PR target/84502
7395         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
7396         to all type variants.
7398         PR tree-optimization/84503
7399         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
7400         width as info->bitpos + info->bitsize - start.
7401         (merged_store_group::merge_overlapping): Simplify width computation.
7402         (check_no_overlap): New function.
7403         (imm_store_chain_info::try_coalesce_bswap): Compute expected
7404         start + width and last_order of the group, fail if check_no_overlap
7405         fails.
7406         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
7407         to group if check_no_overlap fails.
7409 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7411         * config/rs6000/altivec.md: Delete contraint arguments to
7412         define_expand, define_split, and define_peephole2, and in
7413         define_insn_and_split if always unused.
7414         * config/rs6000/darwin.md: Ditto.
7415         * config/rs6000/dfp.md: Ditto.
7416         * config/rs6000/rs6000.md: Ditto.
7417         * config/rs6000/sync.md: Ditto.
7418         * config/rs6000/vector.md: Ditto.
7419         * config/rs6000/vsx.md: Ditto.
7421 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7423         * config/rs6000/altivec.md: Write output control strings as braced
7424         blocks instead of double-quoted strings.
7425         * config/rs6000/darwin.md: Ditto.
7426         * config/rs6000/rs6000.md: Ditto.
7427         * config/rs6000/vector.md: Ditto.
7428         * config/rs6000/vsx.md: Ditto.
7430 2018-02-21  Jason Merrill  <jason@redhat.com>
7432         PR c++/84314 - ICE with templates and fastcall attribute.
7433         * attribs.c (build_type_attribute_qual_variant): Remove assert.
7435 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7437         * ipa-cp.c (determine_versionability): Fix comment typos.
7439 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7441         PR c/84229
7442         * ipa-cp.c (determine_versionability): Do not version functions caling
7443         va_arg_pack.
7445 2018-02-21  Martin Liska  <mliska@suse.cz>
7447         PR driver/83193
7448         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7449         Add "native" as a possible value.
7450         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
7451         the macro when native cpu detection is available.
7453 2018-02-21  Martin Liska  <mliska@suse.cz>
7455         PR driver/83193
7456         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7457         Add "native" as a possible value.
7458         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7459         when native cpu detection is available.
7461 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
7462             Martin Sebor  <msebor@redhat.com>
7464         PR tree-optimization/84478
7465         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7466         false.
7467         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7468         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7469         support which is conservatively correct, for 2 only stay conservative
7470         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
7471         argument to the 2 argument get_range_strlen, adjust 6 arg
7472         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7473         false.
7474         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7475         (gimple_fold_builtin_strlen): Pass true as last argument to
7476         get_range_strlen.
7478 2018-02-20  Martin Sebor  <msebor@redhat.com>
7480         PR middle-end/84095
7481         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7482         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
7483         (builtin_memref::builtin_memref): Factor out parts into
7484         set_base_and_offset and call it.
7486 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7488         PR middle-end/84406
7489         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7490         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7491         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
7492         search at the associated MODE_INT.
7494 2018-02-20  Jeff Law  <law@redhat.com>
7496         PR middle-end/82123
7497         PR tree-optimization/81592
7498         PR middle-end/79257
7499         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
7500         for range data rather than using global data.
7501         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
7502         range data rather than using global data.
7503         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
7504         pass it to children as needed.
7505         (struct directive::fmtresult): Similarly.
7506         (struct directive::set_width): Similarly.
7507         (struct directive::set_precision): Similarly.
7508         (format_integer, format_directive, parse_directive): Similarly.
7509         (format_none): Accept unnamed vr_values parameter.
7510         (format_percent, format_floating, format_character): Similarly.
7511         (format_string, format_plain): Similarly.
7512         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
7513         the EVRP range analyzer for range data rather than using global data.
7514         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
7515         gimple-ssa-evrp-analyze.h
7516         (class sprintf_dom_walker): Add after_dom_children member function.
7517         Add evrp_range_analyzer member.
7518         (sprintf_dom_walker::before_dom_children): Call into the EVRP
7519         range analyzer as needed.
7520         (sprintf_dom_walker::after_dom_children): New member function.
7521         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
7522         if not optimizing.
7523         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
7524         (evrp_range_analyzer::pop_to_marker): Likewise.
7526 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7528         PR tree-optimization/84419
7529         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
7530         with the required type if its current type is compatible but
7531         different.
7533 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
7535         PR middle-end/82004
7536         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
7537         after vectorization.
7539 2018-02-20  Martin Liska  <mliska@suse.cz>
7541         PR driver/83193
7542         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
7543         possible values if we don't have a hint.
7545 2018-02-20  Martin Liska  <mliska@suse.cz>
7547         PR c/84310
7548         PR target/79747
7549         * final.c (shorten_branches): Build align_tab array with one
7550         more element.
7551         * opts.c (finish_options): Add alignment option limit check.
7552         (MAX_CODE_ALIGN): Likewise.
7553         (MAX_CODE_ALIGN_VALUE): Likewise.
7554         * doc/invoke.texi: Document maximum allowed option value for
7555         all -falign-* options.
7557 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
7559         PR target/84146
7560         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
7561         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
7562         * var-tracking.c (emit_note_insn_var_location): Remove all references
7563         to NOTE_INSN_CALL_ARG_LOCATION.
7564         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7565         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7566         Use copy_rtx_if_shared.
7567         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7568         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7569         (dwarf2out_var_location): Remove handling of
7570         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7571         on call_insn.
7572         * final.c (final_scan_insn): Remove all references to
7573         NOTE_INSN_CALL_ARG_LOCATION.
7574         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
7575         before dumping final insns.
7576         * except.c (emit_note_eh_region_end): Remove all references to
7577         NOTE_INSN_CALL_ARG_LOCATION.
7578         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7579         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7580         * config/arc/arc.c (hwloop_optimize): Likewise.
7581         * config/arm/arm.c (create_fix_barrier): Likewise.
7582         * config/s390/s390.c (s390_chunkify_start): Likewise.
7583         * config/sh/sh.c (find_barrier): Likewise.
7584         * config/i386/i386.c (rest_of_insert_endbranch,
7585         ix86_seh_fixup_eh_fallthru): Likewise.
7586         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7587         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7588         * config/frv/frv.c (frv_function_prologue): Likewise.
7589         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
7590         reg note.
7591         (note_outside_basic_block_p): Remove all references to
7592         NOTE_INSN_CALL_ARG_LOCATION.
7593         * gengtype.c (adjust_field_rtx_def): Likewise.
7594         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7595         Likewise.
7596         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7597         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7599         PR c++/84444
7600         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7601         is ADDR_EXPR.
7603         PR tree-optimization/84452
7604         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7605         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7606         is NULL.
7608 2018-02-19  Martin Liska  <mliska@suse.cz>
7610         PR sanitizer/82183
7611         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7613 2018-02-19  Martin Liska  <mliska@suse.cz>
7614             Richard Sandiford  <richard.sandiford@linaro.org>
7616         PR tree-optimization/82491
7617         * gimple-fold.c (get_base_constructor): Make earlier bail out
7618         to prevent ubsan.
7620 2018-02-19  Carl Love  <cel@us.ibm.com>
7622         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7623         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7624         BU_P8V_OVERLOAD_1.
7625         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7626         P8V_BUILTIN_VEC_NEG.
7628 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
7630         * config/rl78/rl78.md (movdf): New define expand.
7632 2018-02-19  Martin Liska  <mliska@suse.cz>
7634         PR other/80589
7635         * doc/invoke.texi: Fix typo.
7636         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7638 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
7640         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7641         handle rs6000_single_float and rs6000_double_float specially for
7642         e500 family CPUs.
7644 2018-02-16  Jeff Law  <law@redhat.com>
7646         * config/rx/rx.c (add_pop_cfi_notes): New function.;
7647         (pop_regs): Use it.
7649 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7651         PR ipa/84425
7652         * ipa-inline.c (inline_small_functions): Fix a typo.
7654 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7656         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7658 2018-02-16  Carl Love  <cel@us.ibm.com>
7660         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7661         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7662         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7663         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7664         expansion to P8V_BUILTIN_VEC_FLOAT2.
7666 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
7668         PR rtl-optimization/70023
7669         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7670         src_regno into account.
7672 2018-02-16  Carl Love  <cel@us.ibm.com>
7674         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7675         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7676         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7677         * config/rs6000/rs6000.c: Remove case statements for
7678         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7679         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7680         and P9V_BUILTIN_VEC_VINSERT4B.
7681         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7682         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7683         * config/rs6000/vsx.md:
7684         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7685         vec_insert4b.
7687 2018-02-16  Carl Love  <cel@us.ibm.com>
7689         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7690         vec_insert4b.
7691         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7692         definitions.
7693         * config/rs6000/rs6000-c.c: Add the definitions for
7694         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7695         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7696         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7697         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7698         definition for insert4b and define insn *insert3b_internal.
7699         * doc/extend.texi: Add documentation for vec_extract4b.
7701 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7703         * doc/extend.texi (Backwards Compatibility): Mention friend
7704         injection.  Note for-scope is deprecated.
7705         * doc/invoke.texi (-ffriend-injection): Deprecate.
7707 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7709         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7710         that moved to I2, also allow destinations that are a paradoxical
7711         subreg (instead of a normal reg).
7713 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7715         PR target/83831
7716         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7717         to QImode.
7719 2018-02-16  Richard Biener  <rguenther@suse.de>
7721         PR tree-optimization/84037
7722         PR tree-optimization/84016
7723         PR target/82862
7724         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7725         Adjust vec_construct for the fact we need additional higher latency
7726         128bit inserts for AVX256 and AVX512 vector builds.
7727         (ix86_add_stmt_cost): Scale vector construction cost for
7728         elementwise loads.
7730 2018-02-16  Richard Biener  <rguenther@suse.de>
7732         PR tree-optimization/84417
7733         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7734         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7735         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7737 2018-02-16  Martin Liska  <mliska@suse.cz>
7739         PR sanitizer/84307
7740         * internal-fn.def (ASAN_CHECK): Set proper flags.
7741         (ASAN_MARK): Likewise.
7743 2018-02-16  Julia Koval  <julia.koval@intel.com>
7745         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7746         from PTA_CANNONLAKE.
7748 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7750         PR target/84272
7751         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7752         Use ++iter rather than iter++ for std::list iterators.
7753         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7754         defer deleting them until all nodes in the forest are processed.  Do
7755         free even leaf nodes.  Change to_process into auto_vec.
7757         PR bootstrap/84405
7758         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7759         * vec.h (vec_default_construct): Use memset instead of placement new
7760         if BROKEN_VALUE_INITIALIZATION is defined.
7761         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7762         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7763         is defined.
7765         PR rtl-optimization/83723
7766         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7767         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7768         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7769         recursive calls.
7770         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7771         callers.
7772         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7774 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7776         PR rtl-optimization/81443
7777         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7778         from inner REGs to paradoxical SUBREGs.
7780 2018-02-16  Richard Biener  <rguenther@suse.de>
7782         PR tree-optimization/84399
7783         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7784         For operands we can analyze at their definition make sure we can
7785         analyze them at each use as well.
7787 2018-02-16  Richard Biener  <rguenther@suse.de>
7789         PR tree-optimization/84190
7790         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7791         volatile accesses if the decl isn't volatile.
7793 2018-02-15  Jason Merrill  <jason@redhat.com>
7795         PR c++/84314 - ICE with templates and fastcall attribute.
7796         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7797         TYPE_CANONICAL on an existing type.
7799 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7801         PR tree-optimization/84383
7802         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7803         dstoff nor call operand_equal_p if dstbase is NULL.
7805         PR tree-optimization/84334
7806         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7807         also a CONSTANT_CLASS_P, punt.
7809 2018-02-14  Jim Wilson  <jimw@sifive.com>
7811         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7812         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7813         to where locals are set.  Add TARGET_RVC support.
7814         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7816 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7818         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7820 2018-02-14  Martin Sebor  <msebor@redhat.com>
7822         PR tree-optimization/83698
7823         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7824         arrays constrain the offset range to their bounds.
7825         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7826         (builtin_access::overlap): Avoid setting the size of overlap if it's
7827         already been set.
7828         (maybe_diag_overlap): Also consider arrays when deciding what values
7829         of offsets to include in diagnostics.
7831 2018-02-14  Martin Sebor  <msebor@redhat.com>
7833         PR c/84108
7834         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7835         that correspond to the kind of a declaration.
7837 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7839         PR target/83984
7840         * config/pa/pa.md: Load address of PIC label using the linkage table
7841         if the label is nonlocal.
7843 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7845         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7846         warning message if user requests -maltivec=be.
7847         * doc/invoke.texi: Document deprecation of -maltivec=be.
7849 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7851         PR target/84220
7852         * config/rs6000/rs6000-c.c: Update definitions for
7853         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7854         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7856 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7858         PR target/84239
7859         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7860         add _get_ssp intrinsics. Remove argument from
7861         __builtin_ia32_rdssp[d|q].
7862         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7863         * config/i386/i386-builtin.def: Remove argument from
7864         __builtin_ia32_rdssp[d|q].
7865         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7866         ix86_expand_special_args_builtin for _rdssp[d|q].
7867         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7868         Clear register before usage.
7869         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7870         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7872 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7874         PR tree-optimization/84357
7875         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7876         operand 1 of an ARRAY_REF too.
7878 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7880         PR target/83831
7881         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7882         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7883         declarations.
7884         (set_of_reg): New struct.
7885         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7886         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7887         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7888         functions.
7889         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7890         Split into bitclr, bitset, bitinvert patterns if appropriate.
7891         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7892         use rx_fuse_in_memory_bitop.
7893         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7894         to named insn, correct maximum insn length.
7896 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7898         PR target/79242
7899         * machmode.def: Define a complex mode for PARTIAL_INT.
7900         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7901         MODE_PARTIAL_INT.
7902         * doc/rtl.texi: Document CSPImode.
7903         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7904         handling.
7905         (msp430_hard_regno_nregs_with_padding): Likewise.
7907 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7909         PR target/84279
7910         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7912 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7914         PR rtl-optimization/84169
7915         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7916         we generated a parallel as new i3 and we split that to new i2 and i3
7917         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7918         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7919         those to i2, not i1.  Partially rewrite this scan code.
7921 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7923         PR c/82210
7924         * stor-layout.c (place_field): For variable length fields, adjust
7925         offset_align afterwards not just based on the field's alignment,
7926         but also on the size.
7928         PR middle-end/84309
7929         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7930         of exps and logs in the use_exp2 case.
7932 2018-02-13  Jeff Law  <law@redhat.com>
7934         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7935         entry for "vector".
7937         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7938         ARGS as unused.
7940 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7942         PR debug/84342
7943         PR debug/84319
7944         * common.opt (gas-loc-support, gas-locview-support): New.
7945         (ginline-points, ginternal-reset-location-views): New.
7946         * doc/invoke.texi: Document them.  Use @itemx where intended.
7947         (gvariable-location-views): Adjust.
7948         * target.def (reset_location_view): New.
7949         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7950         (TARGET_RESET_LOCATION_VIEW): New.
7951         * doc/tm.texi: Rebuilt.
7952         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7953         (dwarf2out_default_as_locview_support): New.
7954         (output_asm_line_debug_info): Use option variables.
7955         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7956         (output_loc_list): Likewise.
7957         (add_high_low_attributes): Check option variables.
7958         Don't output entry view attribute in strict mode.
7959         (gen_inlined_subroutine_die): Check option variables.
7960         (dwarf2out_inline_entry): Likewise.
7961         (init_sections_and_labels): Likewise.
7962         (dwarf2out_early_finish): Likewise.
7963         (maybe_reset_location_view): New, from...
7964         (dwarf2out_var_location): ... here.  Call it.
7965         * debug.h (dwarf2out_default_as_loc_support): Declare.
7966         (dwarf2out_default_as_locview_support): Declare.
7967         * hooks.c (hook_int_rtx_insn_0): New.
7968         * hooks.h (hook_int_rtx_insn_0): Declare.
7969         * toplev.c (process_options): Take -gas-loc-support and
7970         -gas-locview-support from dwarf2out.  Enable
7971         -gvariable-location-views by default only with locview
7972         assembler support.  Enable -ginternal-reset-location-views by
7973         default only if the target defines the corresponding hook.
7974         Enable -ginline-points by default if location views are
7975         enabled; force it disabled if statement frontiers are
7976         disabled.
7977         * tree-inline.c (expand_call_inline): Check option variables.
7978         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7980 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
7982         PR tree-optimization/84321
7983         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7984         handling.  Also check whether the anti-range contains any values
7985         that satisfy the mask; switch to a VR_RANGE if not.
7987 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
7989         PR sanitizer/84340
7990         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7992 2018-02-13  Martin Jambor  <mjambor@suse.cz>
7994         PR c++/83990
7995         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7996         of call statements, also set location of a load to a temporary.
7998 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
8000         * config/rl78/rl78.c (add_vector_labels): New function.
8001         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
8002         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
8003         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
8004         which checks that no arguments are passed.
8005         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
8006         * doc/extend.texi: Documentation for the new attribute.
8008 2018-02-13  Andreas Schwab  <schwab@suse.de>
8010         * config/riscv/linux.h (CPP_SPEC): Define.
8012 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
8014         PR target/84335
8015         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
8016         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
8017         OPTION_MASK_ISA_AES as first argument to def_builtin_const
8018         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
8019         instead of OPTION_MASK_ISA_PCLMUL as first argument to
8020         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
8021         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
8022         temporarily for AES and PCLMUL builtins.
8024         PR tree-optimization/84339
8025         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
8026         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
8027         Formatting fixes.
8029         PR middle-end/84309
8030         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
8031         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
8032         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
8033         inline function.
8034         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
8035         inline function.
8036         * omp-simd-clone.h: New file.
8037         * omp-simd-clone.c: Include omp-simd-clone.h.
8038         (expand_simd_clones): No longer static.
8039         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
8040         cgraph.h and omp-simd-clone.h.
8041         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
8042         (vect_recog_widen_shift_pattern): Formatting fix.
8043         (vect_pattern_recog_1): Don't check optab for calls.
8045         PR target/84336
8046         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
8047         operands[2] into a REG before using gen_lowpart on it.
8049 2018-02-12  Jeff Law  <law@redhat.com>
8051         PR target/83760
8052         * config/sh/sh.c (find_barrier): Consider a sibling call
8053         a barrier as well.
8055         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
8056         successfully back substituting a reg.
8058 2018-02-12  Richard Biener  <rguenther@suse.de>
8060         PR tree-optimization/84037
8061         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
8062         parameter, move visited init to caller.
8063         (vect_slp_analyze_operations): Separate cost from validity
8064         check, initialize visited once for all instances.
8065         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
8066         for all instances.
8067         * tree-vect-stmts.c (vect_model_simple_cost): Make early
8068         out an assert.
8069         (vect_model_promotion_demotion_cost): Likewise.
8070         (vectorizable_bswap): Guard cost modeling with !slp_node
8071         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
8072         SLP stmts.
8073         (vectorizable_call): Likewise.
8074         (vectorizable_conversion): Likewise.
8075         (vectorizable_assignment): Likewise.
8076         (vectorizable_shift): Likewise.
8077         (vectorizable_operation): Likewise.
8078         (vectorizable_store): Likewise.
8079         (vectorizable_load): Likewise.
8080         (vectorizable_condition): Likewise.
8081         (vectorizable_comparison): Likewise.
8083 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
8085         PR sanitizer/84307
8086         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
8087         (ASAN_MARK): Fix fnspec to account for return value, change pointer
8088         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
8090 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8092         PR middle-end/83665
8093         * params.def (inline-min-speedup): Increase from 8 to 15.
8094         (max-inline-insns-auto): Decrease from 40 to 30.
8095         * ipa-split.c (consider_split): Add some buffer for function to
8096         be considered inlining candidate.
8097         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
8098         default values.
8100 2018-02-12  Richard Biener  <rguenther@suse.de>
8102         PR tree-optimization/84037
8103         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
8104         matched stmts if we cannot swap the non-matched ones.
8106 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
8108         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
8109         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
8110         _mm_maskz_scalef_round_ss): New intrinsics.
8111         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
8112         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
8113         __builtin_ia32_scalefss_round): Remove.
8114         (__builtin_ia32_scalefsd_mask_round,
8115         __builtin_ia32_scalefss_mask_round): New intrinsics.
8116         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
8117         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
8118         ((match_operand:VF_128 2 "<round_nimm_predicate>"
8119         "<round_constraint>")): Changed to ...
8120         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
8121         "<round_scalar_constraint>")): ... this.
8122         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
8123         %0, %1, %2<round_op3>}"): Changed to ...
8124         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
8125         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
8126         %2<round_scalar_mask_op3>}"): ... this.
8127         * config/i386/subst.md (round_scalar_nimm_predicate): New.
8129 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
8131         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
8132         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
8133         (_mm_maskz_sqrt_round_ss): New intrinsics.
8134         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
8135         (__builtin_ia32_sqrtsd_mask_round)
8136         (__builtin_ia32_sqrtss_mask_round): New builtins.
8137         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
8138         (__builtin_ia32_sqrtss_round): Remove.
8139         (__builtin_ia32_sqrtsd_mask_round)
8140         (__builtin_ia32_sqrtss_mask_round): New builtins.
8141         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
8142         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
8143         ((match_operand:VF_128 1 "vector_operand"
8144         "xBm,<round_constraint>")): Changed to ...
8145         ((match_operand:VF_128 1 "vector_operand"
8146         "xBm,<round_scalar_constraint>")): ... this.
8147         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
8148         %0, %2, %<iptr>1<round_op3>}): Changed to ...
8149         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
8150         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
8151         %<iptr>1<round_scalar_mask_op3>}): ... this.
8152         ((set_attr "prefix" "<round_prefix>")): Changed to ...
8153         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
8155 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
8157         PR target/84266
8158         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
8159         Cast vec_cmpeq result to correct type.
8160         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
8161         Cast vec_cmpgt result to correct type.
8163 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
8165         * final.c (final_scan_insn_1): Renamed from...
8166         (final_scan_insn): ... this.  New wrapper, to recover
8167         seen from the outermost call in recursive ones.
8168         * config/sparc/sparc.c (output_return): Drop seen from call.
8169         (output_sibcall): Likewise.
8170         * config/visium/visium.c (output_branch): Likewise.
8172 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
8174         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
8175         function label.
8177 2018-02-10  Alan Modra  <amodra@gmail.com>
8179         PR target/84300
8180         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
8181         Specify LR as an input.
8183 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
8185         PR sanitizer/83987
8186         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
8187         remove_member_access_dummy_vars): New functions.
8188         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
8189         lower_omp_1, execute_lower_omp): Use them.
8191         PR rtl-optimization/84308
8192         * shrink-wrap.c (spread_components): Release todo vector.
8194 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
8196         PR rtl-optimization/57193
8197         * ira-color.c (struct allocno_color_data): Add member
8198         conflict_allocno_hard_prefs.
8199         (update_conflict_allocno_hard_prefs): New.
8200         (bucket_allocno_compare_func): Add a preference based on
8201         conflict_allocno_hard_prefs.
8202         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
8203         (color_allocnos): Remove a dead code.  Initiate
8204         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
8206 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8208         PR target/84226
8209         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
8210         constraint from =wa to wa.  Avoid a subreg on the output operand,
8211         instead use a pseudo and subreg it in a move.
8212         (p9_xxbrd_<mode>): Changed to ...
8213         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
8214         (p9_xxbrd_v2df): New expander.
8215         (p9_xxbrw_<mode>): Changed to ...
8216         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
8217         (p9_xxbrw_v4sf): New expander.
8219 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8221         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
8223 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
8225         PR target/83926
8226         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
8227         multiply in 32-bit mode.
8228         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
8229         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
8230         mode.
8232 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8234         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
8235         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
8236         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
8237         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
8239 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
8241         PR lto/84213
8242         * dwarf2out.c (is_trivial_indirect_ref): New function.
8243         (dwarf2out_late_global_decl): Do not generate a location
8244         attribute for variables that have a non-trivial DECL_VALUE_EXPR
8245         and that are not defined in the current unit.
8247 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8249         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
8250         instead of a libcall for UNORDERED.
8252 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
8254         PR target/82641
8255         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
8256         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
8258 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8260         PR target/PR84295
8261         * config/s390/s390.c (s390_set_current_function): Invoke
8262         s390_indirect_branch_settings also if fndecl didn't change.
8264 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8266         * config/rs6000/rs6000.md (blockage): Set length to zero.
8268 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8270         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
8272 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8274         PR sanitizer/84285
8275         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
8276         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
8277         -static-lib*san.
8279         PR debug/84252
8280         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
8281         PARALLEL incoming that failed vt_get_decl_and_offset check.
8283         PR middle-end/84237
8284         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
8285         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
8286         TREE_READONLY bit.
8287         (get_variable_section): For decls in named .bss* sections pass true as
8288         second argument to bss_initializer_p.
8290 2018-02-09  Marek Polacek  <polacek@redhat.com>
8291             Jakub Jelinek  <jakub@redhat.com>
8293         PR c++/83659
8294         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
8295         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
8296         Sync some changes from cxx_fold_indirect_ref.
8298 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8300         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
8301         markers.
8302         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
8303         (BLOCK_INLINE_ENTRY_LABEL): New.
8304         (dwarf2out_var_location): Disregard inline entry markers.
8305         (inline_entry_data): New struct.
8306         (inline_entry_data_hasher): New hashtable type.
8307         (inline_entry_data_hasher::hash): New.
8308         (inline_entry_data_hasher::equal): New.
8309         (inline_entry_data_table): New variable.
8310         (add_high_low_attributes): Add DW_AT_entry_pc and
8311         DW_AT_GNU_entry_view attributes if a pending entry is found
8312         in inline_entry_data_table.  Add old entry_pc attribute only
8313         if debug nonbinding markers are disabled.
8314         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
8315         markers are enabled.
8316         (block_within_block_p, dwarf2out_inline_entry): New.
8317         (dwarf2out_finish): Check that no entries remained in
8318         inline_entry_data_table.
8319         * final.c (reemit_insn_block_notes): Handle inline entry notes.
8320         (final_scan_insn, notice_source_line): Likewise.
8321         (rest_of_clean_state): Skip inline entry markers.
8322         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
8323         markers.
8324         * gimple.c (gimple_build_debug_inline_entry): New.
8325         * gimple.h (enum gimple_debug_subcode): Add
8326         GIMPLE_DEBUG_INLINE_ENTRY.
8327         (gimple_build_debug_inline_entry): Declare.
8328         (gimple_debug_inline_entry_p): New.
8329         (gimple_debug_nonbind_marker_p): Adjust.
8330         * insn-notes.def (INLINE_ENTRY): New.
8331         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
8332         inline entry marker notes.
8333         (print_insn): Likewise.
8334         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
8335         (INSN_DEBUG_MARKER_KIND): Likewise.
8336         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
8337         * tree-inline.c (expand_call_inline): Build and insert
8338         debug_inline_entry stmt.
8339         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
8340         inline entry blocks early, if nonbind markers are enabled.
8341         (dump_scope_block): Dump fragment info.
8342         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
8343         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
8344         (gimple_build_debug_inline_entry): New.
8345         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
8346         Enable/disable inline entry points too.
8347         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
8348         (DEBUG_INSN): Describe inline entry markers.
8350         * common.opt (gvariable-location-views): New.
8351         (gvariable-location-views=incompat5): New.
8352         * config.in: Rebuilt.
8353         * configure: Rebuilt.
8354         * configure.ac: Test assembler for view support.
8355         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
8356         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
8357         * dwarf2out.c (var_loc_view): New typedef.
8358         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
8359         (dwarf2out_locviews_in_attribute): New.
8360         (dwarf2out_locviews_in_loclist): New.
8361         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
8362         (enum dw_line_info_opcode): Add LI_adv_address.
8363         (struct dw_line_info_table): Add view.
8364         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
8365         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
8366         (zero_view_p): New variable.
8367         (ZERO_VIEW_P): New macro.
8368         (output_asm_line_debug_info): New.
8369         (struct var_loc_node): Add view.
8370         (add_AT_view_list, AT_loc_list): New.
8371         (add_var_loc_to_decl): Add view param.  Test it against last.
8372         (new_loc_list): Add view params.  Record them.
8373         (AT_loc_list_ptr): Handle loc and view lists.
8374         (view_list_to_loc_list_val_node): New.
8375         (print_dw_val): Handle dw_val_class_view_list.
8376         (size_of_die): Likewise.
8377         (value_format): Likewise.
8378         (loc_list_has_views): New.
8379         (gen_llsym): Set vl_symbol too.
8380         (maybe_gen_llsym, skip_loc_list_entry): New.
8381         (dwarf2out_maybe_output_loclist_view_pair): New.
8382         (output_loc_list): Output view list or entries too.
8383         (output_view_list_offset): New.
8384         (output_die): Handle dw_val_class_view_list.
8385         (output_dwarf_version): New.
8386         (output_compilation_unit_header): Use it.
8387         (output_skeleton_debug_sections): Likewise.
8388         (output_rnglists, output_line_info): Likewise.
8389         (output_pubnames, output_aranges): Update version comments.
8390         (output_one_line_info_table): Output view numbers in asm comments.
8391         (dw_loc_list): Determine current endview, pass it to new_loc_list.
8392         Call maybe_gen_llsym.
8393         (loc_list_from_tree_1): Adjust.
8394         (add_AT_location_description): Create view list attribute if
8395         needed, check it's absent otherwise.
8396         (convert_cfa_to_fb_loc_list): Adjust.
8397         (maybe_emit_file): Call output_asm_line_debug_info for test.
8398         (dwarf2out_var_location): Reset views as needed.  Precompute
8399         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
8400         attribute.  Set view.
8401         (new_line_info_table): Reset next view.
8402         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
8403         (dwarf2out_source_line): Likewise.  Output view resets and labels to
8404         the assembler, or select appropriate line info opcodes.
8405         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
8406         (optimize_string_length): Catch it.  Adjust.
8407         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
8408         dw_val_class_view_list, and remove it if no longer needed.
8409         (hash_loc_list): Hash view numbers.
8410         (loc_list_hasher::equal): Compare them.
8411         (optimize_location_lists): Check whether a view list symbol is
8412         needed, and whether the locview attribute is present, and
8413         whether they match.  Remove the locview attribute if no longer
8414         needed.
8415         (index_location_lists): Call skip_loc_list_entry for test.
8416         (dwarf2out_finish): Call output_asm_line_debug_info for test.
8417         Use output_dwarf_version.
8418         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
8419         (struct dw_val_node): Add val_view_list.
8420         * final.c (SEEN_NEXT_VIEW): New.
8421         (set_next_view_needed): New.
8422         (clear_next_view_needed): New.
8423         (maybe_output_next_view): New.
8424         (final_start_function): Rename to...
8425         (final_start_function_1): ... this.  Take pointer to FIRST,
8426         add SEEN parameter.  Emit param bindings in the initial view.
8427         (final_start_function): Reintroduce SEEN-less interface.
8428         (final): Rename to...
8429         (final_1): ... this.  Take SEEN parameter.  Output final pending
8430         next view at the end.
8431         (final): Reintroduce seen-less interface.
8432         (final_scan_insn): Output pending next view before switching
8433         sections or ending a block.  Mark the next view as needed when
8434         outputting variable locations.  Notify debug backend of section
8435         changes, and of location view changes.
8436         (rest_of_handle_final): Adjust.
8437         * toplev.c (process_options): Autodetect value for debug variable
8438         location views option.  Warn on incompat5 without -gdwarf-5.
8439         * doc/invoke.texi (gvariable-location-views): New.
8440         (gvariable-location-views=incompat5): New.
8441         (gno-variable-location-views): New.
8443 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
8445         PR tree-optimization/84136
8446         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
8447         that the result of find_edge is non-NULL.
8449 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8451         PR target/83008
8452         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8453         storing integer register in SImode.  Fix cost of 256 and 512
8454         byte aligned SSE register store.
8456 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8458         * config/i386/i386.c (ix86_multiplication_cost): Fix
8459         multiplication cost for TARGET_AVX512DQ.
8461 2018-02-08  Marek Polacek  <polacek@redhat.com>
8463         PR tree-optimization/84238
8464         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8465         get_range_strlen.
8467 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8469         PR tree-optimization/84265
8470         * tree-vect-stmts.c (vectorizable_store): Don't treat
8471         VMAT_CONTIGUOUS accesses as grouped.
8472         (vectorizable_load): Likewise.
8474 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8476         PR tree-optimization/81635
8477         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8478         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8479         (test_round_for_mask): New functions.
8480         (wide_int_cc_tests): Call test_round_for_mask.
8481         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8482         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8483         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8484         range returned by get_range_info.
8486 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8488         PR ipa/81360
8489         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8490         * symtab.c: Include builtins.h
8491         (symtab_node::output_to_lto_symbol_table_p): Move here
8492         from lto-streamer-out.c:output_symbol_p.
8493         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8494         (output_symbol_p): Move all logic to symtab.c
8495         (produce_symtab): Update.
8497 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8499         * config/s390/s390-opts.h (enum indirect_branch): Define.
8500         * config/s390/s390-protos.h (s390_return_addr_from_memory)
8501         (s390_indirect_branch_via_thunk)
8502         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
8503         (enum s390_indirect_branch_type): Define.
8504         * config/s390/s390.c (struct s390_frame_layout, struct
8505         machine_function): Remove.
8506         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
8507         (indirect_branch_table_label_no, indirect_branch_table_name):
8508         Define variables.
8509         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
8510         (enum s390_indirect_branch_option): Define.
8511         (s390_return_addr_from_memory): New function.
8512         (s390_handle_string_attribute): New function.
8513         (s390_attribute_table): Add new attribute handler.
8514         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
8515         (s390_indirect_branch_via_thunk): New function.
8516         (s390_indirect_branch_via_inline_thunk): New function.
8517         (s390_function_ok_for_sibcall): When jumping via thunk disallow
8518         sibling call optimization for non z10 compiles.
8519         (s390_emit_call): Force indirect branch target to be a single
8520         register.  Add r1 clobber for non-z10 compiles.
8521         (s390_emit_epilogue): Emit return jump via return_use expander.
8522         (s390_reorg): Handle JUMP_INSNs as execute targets.
8523         (s390_option_override_internal): Perform validity checks for the
8524         new command line options.
8525         (s390_indirect_branch_attrvalue): New function.
8526         (s390_indirect_branch_settings): New function.
8527         (s390_set_current_function): Invoke s390_indirect_branch_settings.
8528         (s390_output_indirect_thunk_function):  New function.
8529         (s390_code_end): Implement target hook.
8530         (s390_case_values_threshold): Implement target hook.
8531         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
8532         macros.
8533         * config/s390/s390.h (struct s390_frame_layout)
8534         (struct machine_function): Move here from s390.c.
8535         (TARGET_INDIRECT_BRANCH_NOBP_RET)
8536         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
8537         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
8538         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
8539         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
8540         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
8541         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
8542         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
8543         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
8544         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
8545         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
8546         (mnemonic attribute): Add values which aren't recognized
8547         automatically.
8548         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
8549         pattern for branch conversion.  Fix mnemonic attribute.
8550         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
8551         indirect branch via thunk if requested.
8552         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
8553         ("*indirect_jump"): Disable for branch conversion using out of
8554         line thunks.
8555         ("indirect_jump_via_thunk<mode>_z10")
8556         ("indirect_jump_via_thunk<mode>")
8557         ("indirect_jump_via_inlinethunk<mode>_z10")
8558         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
8559         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
8560         ("casesi_jump_via_inlinethunk<mode>_z10")
8561         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
8562         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
8563         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8564         ("*indirect2_jump"): Disable for branch conversion.
8565         ("casesi_jump"): Turn into expander and expand patterns for branch
8566         conversion.
8567         ("return_use"): New expander.
8568         ("*return"): Emit return via thunk and rename it to ...
8569         ("*return<mode>"): ... this one.
8570         * config/s390/s390.opt: Add new options and and enum for the
8571         option values.
8573 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8575         * lra-constraints.c (match_reload): Unconditionally use
8576         gen_lowpart_SUBREG, rather than selecting between that
8577         and equivalent gen_rtx_SUBREG code.
8579 2018-02-08  Richard Biener  <rguenther@suse.de>
8581         PR tree-optimization/84233
8582         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8583         changed flag instead of boguously re-using phi_inserted.
8585 2018-02-08  Martin Jambor  <mjambor@suse.cz>
8587         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8588         static local variables.
8590 2018-02-08  Richard Biener  <rguenther@suse.de>
8592         PR tree-optimization/84278
8593         * tree-vect-stmts.c (vectorizable_store): When looking for
8594         smaller vector types to perform grouped strided loads/stores
8595         make sure the mode is supported by the target.
8596         (vectorizable_load): Likewise.
8598 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8600         * config/aarch64/aarch64.c (aarch64_components_for_bb):
8601         Increase LDP/STP opportunities by adding adjacent callee-saves.
8603 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8605         PR rtl-optimization/84068
8606         PR rtl-optimization/83459
8607         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8609 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
8611         PR tree-optimization/84224
8612         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8613         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8614         non-zero arguments.
8616 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
8618         PR target/84113
8619         * config/rs6000/altivec.md (*restore_world): Remove LR use.
8620         * config/rs6000/predicates.md (restore_world_operation): Adjust op
8621         count, remove one USE.
8623 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
8625         * doc/install.texi (Configuration): Document the
8626         --with-long-double-format={ibm,ieee} PowerPC configuration
8627         options.
8629         PR target/84154
8630         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8631         Convert from define_expand to be define_insn_and_split.  Rework
8632         float/double/_Float128 conversions to QI/HI/SImode to work with
8633         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
8634         conversions to QI/HImode types did a store and then a load to
8635         truncate the value.  For conversions to VSX registers, don't split
8636         the insn, instead emit the code directly.  Use the code iterator
8637         any_fix to combine signed and unsigned conversions.
8638         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8639         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8640         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8641         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8642         (fix_<mode>di2_hw): Likewise.
8643         (fixuns_<mode>di2_hw): Likewise.
8644         (fix_<mode>si2_hw): Likewise.
8645         (fixuns_<mode>si2_hw): Likewise.
8646         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8647         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8648         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8649         fix<uns>_trunc<SFDF:mode>si2_p8.
8650         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8651         used.
8652         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8653         (fix<uns>_<mode>_mem): Likewise.
8654         (fctiw<u>z_<mode>_mem): Likewise.
8655         (fix<uns>_<mode>_mem): Likewise.
8656         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8657         the register allocator from doing a direct move to the GPRs to do
8658         a store, and instead use the ISA 3.0 store byte/half-word from
8659         vector register instruction.  For IEEE 128-bit floating point,
8660         also optimize stores of 32-bit ints.
8661         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8663 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
8665         * genextract.c (push_pathstr_operand): New function to support
8666         [a-zA-Z].
8667         (walk_rtx): Call push_pathstr_operand.
8668         (print_path): Support [a-zA-Z].
8670 2018-02-07  Richard Biener  <rguenther@suse.de>
8672         PR tree-optimization/84037
8673         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8674         (cse_and_gimplify_to_preheader): Declare.
8675         (vect_get_place_in_interleaving_chain): Likewise.
8676         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8677         ivexpr_map.
8678         (_loop_vec_info::~_loop_vec_info): Delete it.
8679         (cse_and_gimplify_to_preheader): New function.
8680         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8681         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8682         (vectorizable_load): Likewise.  For grouped stores always base
8683         the IV on the first element.
8684         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8685         condition before gimplifying.
8687 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8689         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8690         *DIV_EXPR and *MOD_EXPR.
8692 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8694         PR target/84248
8695         * config/i386/i386.c (ix86_option_override_internal): Mask out
8696         the CF_SET bit when checking -fcf-protection.
8698 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8700         PR libgomp/84217
8701         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8702         enough.
8704 2018-02-07  Richard Biener  <rguenther@suse.de>
8706         PR tree-optimization/84204
8707         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8708         this place.
8710         PR tree-optimization/84205
8711         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8712         special-case isl_ast_op_zdiv_r.
8714         PR tree-optimization/84223
8715         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8716         Only add conditions from within the region.
8717         (gather_bbs::after_dom_children): Adjust.
8719 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8721         PR target/84209
8722         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8723         * config/avr/avr.md: Only post-reload split REG-REG moves if
8724         either register is GENERAL_REG_P.
8726 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8728         PR tree-optimization/84235
8729         * tree-ssa-scopedtables.c
8730         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8731         if the subtraction is performed in floating point type where NaNs are
8732         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8733         build 1.  Formatting fix.
8735 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8737         PR target/84146
8738         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8739         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8740         and skip it regardless of bb boundaries.  Use CALL_P macro,
8741         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8742         unnecessarily, formatting fix.
8744 2018-02-06  Michael Collison  <michael.collison@arm.com>
8746         * config/arm/thumb2.md:
8747         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8748         (*thumb_mov_notscc): Ditto.
8750 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8752         PR target/84154
8753         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8754         unsigned_fix, not "s".
8756 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8758         * configure.ac (gcc_fn_eh_frame_ro): New function.
8759         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8760         correct .eh_frame permissions.
8761         * configure: Regenerate.
8763 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8765         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8766         irrelevant options.
8768 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8770         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8771         Display warning message for -mno-speculate-indirect-jumps.
8773 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8775         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8776         Undocumented.
8777         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8779 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8781         PR tree-optimization/84225
8782         * tree-eh.c (find_trapping_overflow): Only call
8783         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8785 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8787         PR target/84145
8788         * config/i386/i386.c: Reimplement the check of possible options
8789         -mibt/-mshstk conbination. Change error messages.
8790         * doc/invoke.texi: Fix a typo: remove extra '='.
8792 2018-02-06  Marek Polacek  <polacek@redhat.com>
8794         PR tree-optimization/84228
8795         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8797 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8799         PR target/82641
8800         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8801         emitted arch directives.
8802         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8803         __ARM_FEATURE_COPROC before changing architectures.
8805 2018-02-06  Richard Biener  <rguenther@suse.de>
8807         * config/i386/i386.c (print_reg): Fix typo.
8808         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8810 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8812         * configure: Regenerate.
8814 2018-02-05  Martin Sebor  <msebor@redhat.com>
8816         PR tree-optimization/83369
8817         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8818         inlining context.
8820 2018-02-05  Martin Liska  <mliska@suse.cz>
8822         * doc/invoke.texi: Cherry-pick upstream r323995.
8824 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8826         * ira.c (ira_init_register_move_cost): Adjust comment.
8828 2018-02-05  Martin Liska  <mliska@suse.cz>
8830         PR gcov-profile/84137
8831         * doc/gcov.texi: Fix typo in documentation.
8833 2018-02-05  Martin Liska  <mliska@suse.cz>
8835         PR gcov-profile/83879
8836         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8837         using dlopen functionality.
8839 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8841         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8842         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8843         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8844         _mm_maskz_range_round_ss): New intrinsics.
8845         (__builtin_ia32_rangesd128_round)
8846         (__builtin_ia32_rangess128_round): Remove.
8847         (__builtin_ia32_rangesd128_mask_round,
8848         __builtin_ia32_rangess128_mask_round): New builtins.
8849         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8850         __builtin_ia32_rangess128_round): Remove.
8851         (__builtin_ia32_rangesd128_mask_round,
8852         __builtin_ia32_rangess128_mask_round): New builtins.
8853         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8854         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8855         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8856         "<round_saeonly_constraint>")): Changed to ...
8857         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8858         "<round_saeonly_scalar_constraint>")): ... this.
8859         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8860         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8861         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8862         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8863         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8865 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8867         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8868         options.
8869         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8870         Remove all values except native, 8540 and 8548.
8872 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8874         * config/i386/i386.c (ix86_output_function_return): Pass
8875         INVALID_REGNUM, instead of -1, as invalid register number to
8876         indirect_thunk_name and output_indirect_thunk.
8878 2018-02-02  Julia Koval  <julia.koval@intel.com>
8880         * config.gcc: Add -march=icelake.
8881         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8882         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8883         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8884         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8885         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8886         (processor_target_table): Add icelake.
8887         (ix86_option_override_internal): Handle new PTAs.
8888         (get_builtin_code_for_version): Handle icelake.
8889         (M_INTEL_COREI7_ICELAKE): New.
8890         (fold_builtin_cpu): Handle icelake.
8891         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8892         * doc/invoke.texi: Add -march=icelake.
8894 2018-02-02  Julia Koval  <julia.koval@intel.com>
8896         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8897         to wide_int_bitmask.
8898         * wide-int-bitmask.h: New.
8900 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8902         PR target/84066
8903         * config/i386/i386.md: Replace Pmode with word_mode in
8904         builtin_setjmp_setup and builtin_longjmp to support x32.
8906 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8908         PR target/56010
8909         PR target/83743
8910         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8911         #include "opts.h".
8912         (rs6000_supported_cpu_names): New static variable.
8913         (linux_cpu_translation_table): Likewise.
8914         (elf_platform) <cpu>: Define new static variable and use it.
8915         Translate kernel AT_PLATFORM name to canonical name if needed.
8916         Error if platform name is unknown.
8918 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8920         PR target/84089
8921         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8923 2018-02-01  Jeff Law  <law@redhat.com>
8925         PR target/84128
8926         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8927         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8928         the scratch if RELEASE_VIA_POP is false.
8929         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8930         If we have to save a temporary register, decrement SIZE appropriately.
8931         Pass new arguments to release_scratch_register_on_entry.
8932         (ix86_adjust_stack_and_probe): Likewise.
8933         (ix86_emit_probe_stack_range): Pass new arguments to
8934         release_scratch_register_on_entry.
8936 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8938         PR rtl-optimization/84157
8939         * combine.c (change_zero_ext): Use REG_P predicate in
8940         front of HARD_REGISTER_P predicate.
8942 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
8944         * config/avr/avr.c (avr_option_override): Move disabling of
8945         -fdelete-null-pointer-checks to...
8946         * common/config/avr/avr-common.c (avr_option_optimization_table):
8947         ...here.
8949 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8951         PR tree-optimization/81635
8952         * tree-data-ref.c (split_constant_offset_1): For types that
8953         wrap on overflow, try to use range info to prove that wrapping
8954         cannot occur.
8956 2018-02-01  Renlin Li  <renlin.li@arm.com>
8958         PR target/83370
8959         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8960         TAILCALL_ADDR_REGS.
8961         (aarch64_register_move_cost): Likewise.
8962         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8963         TAILCALL_ADDR_REGS.
8964         (REG_CLASS_NAMES): Likewise.
8965         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8966         TAILCALL_ADDR_REGS. Remove IP registers.
8967         * config/aarch64/aarch64.md (Ucs): Update register constraint.
8969 2018-02-01  Richard Biener  <rguenther@suse.de>
8971         * domwalk.h (dom_walker::dom_walker): Add additional constructor
8972         for specifying RPO order and allow NULL for that.
8973         * domwalk.c (dom_walker::dom_walker): Likewise.
8974         (dom_walker::walk): Handle NULL RPO order.
8975         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8976         in RPO order.
8977         (rewrite_update_dom_walker): Likewise.
8978         (mark_def_dom_walker): Likewise.
8980 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8982         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8983         (aarch64_maybe_expand_sve_subreg_move): Declare.
8984         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8985         * config/aarch64/predicates.md (aarch64_any_register_operand): New
8986         predicate.
8987         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8988         that are semantically a reverse operation.
8989         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8990         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8991         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8992         functions.
8993         (aarch64_can_change_mode_class): For big-endian, forbid changes
8994         between two SVE modes if they have different element sizes.
8996 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8998         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8999         the TImode handling for big-endian targets.
9001 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9003         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
9004         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
9005         not just bytes.
9006         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
9007         Remove BSWAP handing for big-endian targets and use the form of
9008         LD1RQ appropariate for the mode.
9010 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9012         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
9013         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
9014         duplicated element.
9016 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9018         PR tearget/83845
9019         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
9020         check for operands that need to go through aarch64_sve_reload_be.
9022 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
9024         PR tree-optimization/81661
9025         PR tree-optimization/84117
9026         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
9027         * tree-eh.c: Include gimplify.h.
9028         (find_trapping_overflow, replace_trapping_overflow,
9029         rewrite_to_non_trapping_overflow): New functions.
9030         * tree-vect-loop.c: Include tree-eh.h.
9031         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
9032         * tree-data-ref.c: Include tree-eh.h.
9033         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
9035 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
9037         PR rtl-optimization/84123
9038         * combine.c (change_zero_ext): Check if hard register satisfies
9039         can_change_dest_mode before calling gen_lowpart_SUBREG.
9041 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
9043         PR target/82444
9044         * ira.c (ira_init_register_move_cost): Remove assert.
9046 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
9048         PR rtl-optimization/84071
9049         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
9050         * doc/tm.texi: Regenerate.
9052 2018-01-31  Richard Biener  <rguenther@suse.de>
9054         PR tree-optimization/84132
9055         * tree-data-ref.c (analyze_miv_subscript): Properly
9056         check whether evolution_function_is_affine_multivariate_p
9057         before calling gcd_of_steps_may_divide_p.
9059 2018-01-31  Julia Koval  <julia.koval@intel.com>
9061         PR target/83618
9062         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
9063         * config/i386/i386.md (rdpid_rex64) New.
9064         (rdpid): Make 32bit only.
9066 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
9068         PR lto/84105
9069         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
9070         an IDENTIFIER_NODE for FUNCTION_TYPE's.
9072 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
9074         Revert
9075         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
9077         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
9079 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
9081         PR rtl-optimization/84071
9082         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
9083         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
9085 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
9087         * config/arc/arc.c (arc_handle_aux_attribute): New function.
9088         (arc_attribute_table): Add 'aux' attribute.
9089         (arc_in_small_data_p): Consider aux like variables.
9090         (arc_is_aux_reg_p): New function.
9091         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
9092         (arc_get_aux_arg): New function.
9093         (prepare_move_operands): Handle aux-register access.
9094         (arc_handle_aux_attribute): New function.
9095         * doc/extend.texi (ARC Variable attributes): Add subsection.
9097 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
9099         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
9100         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
9101         (arc_attribute_table): Add 'uncached' attribute.
9102         (arc_print_operand): Print '.di' flag for uncached memory
9103         accesses.
9104         (arc_in_small_data_p): Do not consider for small data the uncached
9105         types.
9106         (arc_is_uncached_mem_p): New function.
9107         * config/arc/predicates.md (compact_store_memory_operand): Check
9108         for uncached memory accesses.
9109         (nonvol_nonimm_operand): Likewise.
9110         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
9112 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
9114         PR c/84100
9115         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
9116         falign-loops=): Add Optimization flag.
9118 2018-01-30  Jeff Law  <law@redhat.com>
9120         PR target/84064
9121         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
9122         INT_REGISTERS_SAVED.  Check it prior to calling
9123         get_scratch_register_on_entry.
9124         (ix86_adjust_stack_and_probe): Similarly.
9125         (ix86_emit_probe_stack_range): Similarly.
9126         (ix86_expand_prologue): Corresponding changes.
9128 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9130         PR target/40411
9131         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
9132         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
9134 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
9136         PR target/84112
9137         * lra-constraints.c (curr_insn_transform): Process AND in the
9138         address.
9140 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
9142         PR rtl-optimization/83986
9143         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
9144         dependence against last_pending_memory_flush in addition to
9145         pending_jump_insns.
9147 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
9149         PR tree-optimization/81611
9150         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
9151         copies.
9153 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9155         PR target/83758
9156         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
9157         a reg rtx.
9159 2018-01-30  Richard Biener  <rguenther@suse.de>
9160             Jakub Jelinek  <jakub@redhat.com>
9162         PR tree-optimization/84111
9163         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
9164         inner loops added during recursion, as they don't have up-to-date
9165         SSA form.
9167 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
9169         PR ipa/81360
9170         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
9171         (can_inline_edge_by_limits_p): ... here.
9172         (can_early_inline_edge_p, check_callers,
9173         update_caller_keys, update_callee_keys, recursive_inlining,
9174         add_new_edges_to_heap, speculation_useful_p,
9175         inline_small_functions,
9176         inline_small_functions, flatten_function,
9177         inline_to_all_callers_1): Update.
9179 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
9181         * profile-count.c (profile_count::combine_with_ipa_count): Handle
9182         zeros correctly.
9184 2018-01-30  Richard Biener  <rguenther@suse.de>
9186         PR tree-optimization/83008
9187         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
9188         invariant and constant vector uses in stmts when they need
9189         more than one stmt.
9191 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9193         PR bootstrap/84017
9194         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
9195         * configure: Regenerate.
9197 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9199         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
9200         pattern.
9201         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
9202         Use gen_rtx_REG rather than gen_lowpart.
9204 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9206         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
9207         rather than 0 when creating partial subregs.
9209 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9211         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
9212         of usage.
9214 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
9216         PR target/81550
9217         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
9218         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
9219         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
9220         flags.  This restores the settings used before the 2017-07-24.
9221         Turning off pre increment/decrement/modify allows IVOPTS to
9222         optimize DF/SF loops where the index is an int.
9224 2018-01-29  Richard Biener  <rguenther@suse.de>
9225             Kelvin Nilsen  <kelvin@gcc.gnu.org>
9227         PR bootstrap/80867
9228         * tree-vect-stmts.c (vectorizable_call): Don't call
9229         targetm.vectorize_builtin_md_vectorized_function if callee is
9230         NULL.
9232 2018-01-22  Carl Love  <cel@us.ibm.com>
9234         * doc/extend.tex: Fix typo in second arg in
9235         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
9237 2018-01-29  Richard Biener  <rguenther@suse.de>
9239         PR tree-optimization/84086
9240         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
9241         (flush_ssaname_freelist): When SSA names were released reset
9242         the SCEV hash table.
9244 2018-01-29  Richard Biener  <rguenther@suse.de>
9246         PR tree-optimization/84057
9247         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
9248         removed paths when removing edges.
9250 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
9252         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
9253         -mfunction-return=@var{choice}.
9255 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9257         PR diagnostic/84034
9258         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
9259         Handle CR like TAB.
9260         (layout::print_source_line): Likewise.
9261         (test_get_line_width_without_trailing_whitespace): Add test cases.
9263 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
9265         PR middle-end/84040
9266         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
9267         debug insns.
9269 2018-01-26  Jim Wilson  <jimw@sifive.com>
9271         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
9273         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
9274         specified.
9276 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9278         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
9279         and CMP + SUB-immediate -> SUBS.
9281 2018-01-26  Martin Sebor  <msebor@redhat.com>
9283         PR tree-optimization/83896
9284         * tree-ssa-strlen.c (get_string_len): Rename...
9285         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
9286         Avoid assuming length is constant.
9287         (handle_char_store): Use HOST_WIDE_INT for string length.
9289 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
9291         PR target/81763
9292         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
9293         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
9295 2018-01-26  Richard Biener  <rguenther@suse.de>
9297         PR rtl-optimization/84003
9298         * dse.c (record_store): Only record redundant stores when
9299         the earlier store aliases at least all accesses the later one does.
9301 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
9303         PR rtl-optimization/83985
9304         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
9305         REG_CFA_RESTORE insns.
9306         (delete_unmarked_insns): Don't ignore separate shrink wrapping
9307         REG_CFA_RESTORE insns here.
9309         PR c/83989
9310         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
9311         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
9313 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9315         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
9316         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
9317         (arc_init): Likewise.
9318         (arc_override_options): Likewise.
9319         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
9320         value.
9321         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
9322         support.
9323         * config/arc/arc.h (TARGET_DBNZ): Define.
9324         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
9325         properly set the tune attribute.
9326         (dbnz): Use TARGET_DBNZ guard.
9327         * config/arc/arc.opt (mtune): Add core3 option.
9329 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9331         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
9332         recognize new pic like addresses.
9333         (arc_delegitimize_address): Clean up.
9335 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9337         * config/arc/arc-arches.def: Option mrf16 valid for all
9338         architectures.
9339         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
9340         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
9341         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
9342         * config/arc/arc-tables.opt: Regenerate.
9343         * config/arc/arc.c (arc_conditional_register_usage): Handle
9344         reduced register file case.
9345         (arc_file_start): Set must have build attributes.
9346         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
9347         mrf16 option value.
9348         * config/arc/arc.opt (mrf16): Add new option.
9349         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
9350         * config/arc/genmultilib.awk: Handle new mrf16 option.
9351         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
9352         * config/arc/t-multilib: Regenerate.
9353         * doc/invoke.texi (ARC Options): Document mrf16 option.
9355 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9357         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
9358         * config/arc/arc.c (arc_handle_secure_attribute): New function.
9359         (arc_attribute_table): Add 'secure_call' attribute.
9360         (arc_print_operand): Print secure call operand.
9361         (arc_function_ok_for_sibcall): Don't optimize tail calls when
9362         secure.
9363         (arc_is_secure_call_p): New function.  * config/arc/arc.md
9364         (call_i): Add support for sjli instruction.
9365         (call_value_i): Likewise.
9366         * config/arc/constraints.md (Csc): New constraint.
9368 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9369             John Eric Martin  <John.Martin@emmicro-us.com>
9371         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
9372         * config/arc/arc.c (_arc_jli_section): New struct.
9373         (arc_jli_section): New type.
9374         (rc_jli_sections): New static variable.
9375         (arc_handle_jli_attribute): New function.
9376         (arc_attribute_table): Add jli_always and jli_fixed attribute.
9377         (arc_file_end): New function.
9378         (TARGET_ASM_FILE_END): Define.
9379         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
9380         (arc_add_jli_section): New function.
9381         (jli_call_scan): Likewise.
9382         (arc_reorg): Call jli_call_scan.
9383         (arc_output_addsi): Remove 'S' from printing asm operand.
9384         (arc_is_jli_call_p): New function.
9385         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
9386         operand.
9387         (movhi_insn): Likewise.
9388         (movsi_insn): Likewise.
9389         (movsi_set_cc_insn): Likewise.
9390         (loadqi_update): Likewise.
9391         (load_zeroextendqisi_update): Likewise.
9392         (load_signextendqisi_update): Likewise.
9393         (loadhi_update): Likewise.
9394         (load_zeroextendhisi_update): Likewise.
9395         (load_signextendhisi_update): Likewise.
9396         (loadsi_update): Likewise.
9397         (loadsf_update): Likewise.
9398         (movsicc_insn): Likewise.
9399         (bset_insn): Likewise.
9400         (bxor_insn): Likewise.
9401         (bclr_insn): Likewise.
9402         (bmsk_insn): Likewise.
9403         (bicsi3_insn): Likewise.
9404         (cmpsi_cc_c_insn): Likewise.
9405         (movsi_ne): Likewise.
9406         (movsi_cond_exec): Likewise.
9407         (clrsbsi2): Likewise.
9408         (norm_f): Likewise.
9409         (normw): Likewise.
9410         (swap): Likewise.
9411         (divaw): Likewise.
9412         (flag): Likewise.
9413         (sr): Likewise.
9414         (kflag): Likewise.
9415         (ffs): Likewise.
9416         (ffs_f): Likewise.
9417         (fls): Likewise.
9418         (call_i): Remove 'S' asm letter, add jli instruction.
9419         (call_value_i): Likewise.
9420         * config/arc/arc.op (mjli-always): New option.
9421         * config/arc/constraints.md (Cji): New constraint.
9422         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
9423         operand.
9424         (subsf3_fpx): Likewise.
9425         (mulsf3_fpx): Likewise.
9426         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
9427         asm operand.
9428         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
9429         function attrbutes.
9430         * doc/invoke.texi (ARC): Document mjli-always option.
9432 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
9434         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
9435         avoid addition with 0 and use incw and decw where possible.
9437 2018-01-26  Richard Biener  <rguenther@suse.de>
9439         PR tree-optimization/81082
9440         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
9441         association if it requires casting to unsigned.
9442         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
9443         from fold_plusminus_mult_expr to catch important cases late when
9444         range info is available.
9446 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9448         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9449         * configure.ac (hidden_linkonce): New test.
9450         * configure: Regenerate.
9451         * config.in: Regenerate.
9453 2018-01-26  Julia Koval  <julia.koval@intel.com>
9455         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9456         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9457         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9458         _mm_mask_bitshuffle_epi64_mask): Fix type.
9459         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9460         USI_FTYPE_V4DI_V4DI_USI): Remove.
9461         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9462         __builtin_ia32_vpshufbitqmb256_mask,
9463         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9464         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9465         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9467 2018-01-26  Alan Modra  <amodra@gmail.com>
9469         PR target/84033
9470         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9471         UNSPEC_VBPERMQ.  Sort other unspecs.
9473 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
9475         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9477 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
9479         PR middle-end/83055
9480         * predict.c (drop_profile): Do not push/pop cfun; update also
9481         node->count.
9482         (handle_missing_profiles): Fix logic looking for zero profiles.
9484 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
9486         PR middle-end/83977
9487         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9488         on functions with #pragma omp declare simd or functions with simd
9489         attribute.
9490         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9491         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9492         Remove trailing \n from warning_at calls.
9494 2018-01-25  Tom de Vries  <tom@codesourcery.com>
9496         PR target/84028
9497         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9498         for neutered workers.
9500 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
9502         PR target/68467
9503         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
9504         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
9506 2018-01-24  Jeff Law  <law@redhat.com>
9508         PR target/83994
9509         * i386.c (get_probe_interval): Move to earlier point.
9510         (ix86_compute_frame_layout): If -fstack-clash-protection and
9511         the frame is larger than the probe interval, then use pushes
9512         to save registers rather than reg->mem moves.
9513         (ix86_expand_prologue): Remove conditional for int_registers_saved
9514         assertion.
9516 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
9518         PR target/84014
9519         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
9520         min/max for never referenced object.
9522 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
9524         PR middle-end/83977
9525         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
9526         here.
9527         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
9528         attributes from DECL_ATTRIBUTES (decl) without affecting
9529         DECL_ATTRIBUTES (current_function_decl).
9530         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
9531         functions with non-NULL DECL_ABSTRACT_ORIGIN.
9533 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
9535         PR tree-optimization/83979
9536         * fold-const.c (fold_comparison): Use constant_boolean_node
9537         instead of boolean_{true,false}_node.
9539 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
9541         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
9542         with zero counts.
9544 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9546         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9547         Simplify the clause that sets the length attribute.
9548         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9549         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
9550         clause that sets the length attribute.
9551         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9553 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9555         PR target/83589
9556         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
9557         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
9558         Add strict parameter.
9559         (prevent_branch_around_nothing): Insert dummy insn between branch to
9560         label and label with no ptx insn inbetween.
9561         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
9563 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9565         PR target/81352
9566         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9567         for neutered threads in warp.
9568         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9570 2018-01-24  Richard Biener  <rguenther@suse.de>
9572         PR tree-optimization/83176
9573         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9574         operands.
9576 2018-01-24  Richard Biener  <rguenther@suse.de>
9578         PR tree-optimization/82819
9579         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9580         code generating pluses that are no-ops in the target precision.
9582 2018-01-24  Richard Biener  <rguenther@suse.de>
9584         PR middle-end/84000
9585         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9587 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9589         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9590         to merge probabilities.
9591         * predict.c (probably_never_executed): Also mark as cold functions
9592         with global 0 profile and guessed local profile.
9593         * profile-count.c (profile_probability::combine_with_count): New
9594         member function.
9595         * profile-count.h (profile_probability::operator*,
9596         profile_probability::operator*=, profile_probability::operator/,
9597         profile_probability::operator/=): Reduce precision to adjusted
9598         and set value to guessed on contradictory divisions.
9599         (profile_probability::combine_with_freq): Remove.
9600         (profile_probability::combine_wiht_count): Declare.
9601         (profile_count::force_nonzero):: Set to adjusted.
9602         (profile_count::probability_in):: Set quality to adjusted.
9603         * tree-ssa-tail-merge.c (replace_block_by): Use
9604         combine_with_count.
9606 2018-01-23  Andrew Waterman  <andrew@sifive.com>
9607             Jim Wilson  <jimw@sifive.com>
9609         * config/riscv/riscv.c (riscv_stack_boundary): New.
9610         (riscv_option_override): Set riscv_stack_boundary.  Handle
9611         riscv_preferred_stack_boundary_arg.
9612         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9613         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9614         (STACK_BOUNDARY): Set to riscv_stack_boundary.
9615         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9616         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9617         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9619 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
9621         PR target/83905
9622         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9623         of struct ix86_frame.
9624         (ix86_expand_epilogue): Likewise.  Add a local variable for
9625         the reg_save_offset field in struct ix86_frame.
9627 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
9629         PR tree-optimization/82604
9630         * tree-loop-distribution.c (enum partition_kind): New enum item
9631         PKIND_PARTIAL_MEMSET.
9632         (partition_builtin_p): Support above new enum item.
9633         (generate_code_for_partition): Ditto.
9634         (compute_access_range): Differentiate cases that equality can be
9635         proven at all loops, the innermost loops or no loops.
9636         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9637         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
9638         (finalize_partitions, distribute_loop): Don't fuse partition of
9639         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9640         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9641         parloop is enabled.
9643 2018-01-23  Martin Liska  <mliska@suse.cz>
9645         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9646         order to ignore the predictor.
9647         (PRED_POLYMORPHIC_CALL): Likewise.
9648         (PRED_RECURSIVE_CALL): Likewise.
9650 2018-01-23  Martin Liska  <mliska@suse.cz>
9652         * tree-profile.c (tree_profiling): Print function header to
9653         aware reader which function we are working on.
9654         * value-prof.c (gimple_find_values_to_profile): Do not print
9655         not interesting value histograms.
9657 2018-01-23  Martin Liska  <mliska@suse.cz>
9659         * profile-count.h (enum profile_quality): Add
9660         profile_uninitialized as the first value. Do not number values
9661         as they are zero based.
9662         (profile_count::verify): Update sanity check.
9663         (profile_probability::verify): Likewise.
9665 2018-01-23  Nathan Sidwell  <nathan@acm.org>
9667         * doc/invoke.texi (ffor-scope): Deprecate.
9669 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9671         PR tree-optimization/83510
9672         * domwalk.c (set_all_edges_as_executable): New function.
9673         (dom_walker::dom_walker): Convert bool param
9674         "skip_unreachable_blocks" to enum reachability.  Move setup of
9675         edge flags to set_all_edges_as_executable and only do it when
9676         reachability is REACHABLE_BLOCKS.
9677         * domwalk.h (enum dom_walker::reachability): New enum.
9678         (dom_walker::dom_walker): Convert bool param
9679         "skip_unreachable_blocks" to enum reachability.
9680         (set_all_edges_as_executable): New decl.
9681         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9682         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9683         "reachability".
9684         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9685         but converting true to REACHABLE_BLOCKS.
9686         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9687         * tree-vrp.c
9688         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9689         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9690         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9691         REACHABLE_BLOCKS.
9692         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9693         if check_all_array_refs will be called.
9695 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9697         * tree.c (selftest::test_location_wrappers): Add more test
9698         coverage.
9700 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9702         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9703         (selftest::test_bit_in_range): Likewise.
9705 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9707         PR testsuite/83888
9708         * doc/sourcebuild.texi (vect_float): Say that the selector
9709         only describes the situation when -funsafe-math-optimizations is on.
9710         (vect_float_strict): Document.
9712 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9714         PR tree-optimization/83965
9715         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9716         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9717         instead of checking only for a reduction.
9718         (vect_recog_widen_sum_pattern): Likewise.
9720 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9722         * predict.c (probably_never_executed): Only use precise profile info.
9723         (compute_function_frequency): Skip after inlining hack since we now
9724         have quality checking.
9726 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9728         * profile-count.h (profile_probability::very_unlikely,
9729         profile_probability::unlikely, profile_probability::even): Set
9730         precision to guessed.
9732 2018-01-23  Richard Biener  <rguenther@suse.de>
9734         PR tree-optimization/83963
9735         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9736         Properly terminate dominator walk when crossing the exit edge not
9737         when visiting its source block.
9739 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9741         PR c++/83918
9742         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9743         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9745 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9747         PR tree-optimization/83957
9748         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9749         semicolon after for body surrounded by braces.
9751         PR tree-optimization/83081
9752         * profile-count.h (profile_probability::split): New method.
9753         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9754         Use profile_probability::split.
9755         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9756         when splitting a single conditional jump into 2.
9758 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9760         PR tree-optimization/69452
9761         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9762         decl.
9764 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9766         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9767         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9768         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9770 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9772         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9773         * config/rl78/rl78.md (movdi): New define_expand.
9774         * config/rl78/rl78.c (rl78_split_movdi): New function.
9776 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9778         PR target/83862
9779         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9780         no longer used.
9781         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9782         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9783         128-bit to produce an UNSPEC move to get the double word with the
9784         signbit and then a shift directly to do signbit.
9785         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9786         implementation with a new version that just does either a direct
9787         move or a regular move.  Move memory interface to separate insns.
9788         Move insns so they are next to the expander.
9789         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9790         with signbit move.  Split big and little endian case.
9791         (signbit<mode>2_dm_mem_le): Likewise.
9792         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9793         (signbit<mode>2_dm2): Likewise.
9795 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9797         * config/rl78/rl78.md (anddi3): New define_expand.
9799 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9801         * config/rl78/rl78.md (umindi3): New define_expand.
9803 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9805         * config/rl78/rl78.md (smindi3): New define_expand.
9807 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9809         * config/rl78/rl78.md (smaxdi3): New define_expand.
9811 2018-01-22  Carl Love  <cel@us.ibm.com>
9813         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9814         LVX_V1TI): Add macro expansion.
9815         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9816         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9817         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9818         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9819         Change check to determine if the instruction is a byte reversing
9820         entry.  Fix typo in comment.
9821         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9822         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9823         Add def_builtin calls for new builtins.
9824         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9825         Add define_insn expansion.
9827 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9829         * config/rl78/rl78.md (umaxdi3): New define_expand.
9831 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9833         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9834         for non-QImode registers.
9836 2018-01-22  Richard Biener  <rguenther@suse.de>
9838         PR tree-optimization/83963
9839         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9840         including the loop exit block.
9841         (scop_detection::merge_sese): Likewise.
9842         (scop_detection::add_scop): Do it here instead.
9844 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9846         * doc/sourcebuild.texi (arm_softfloat): Document.
9848 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9850         PR gcc/77734
9851         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9852         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9853         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9855 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9856             David Edelsohn  <dje.gcc@gmail.com>
9858         PR target/83946
9859         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9860         Change "crset eq" to "crset 2".
9861         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9862         (*call_indirect_aix<mode>_nospec): Likewise.
9863         (*call_value_indirect_aix<mode>_nospec): Likewise.
9864         (*call_indirect_elfv2<mode>_nospec): Likewise.
9865         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9866         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9867         change assembly output from . to $.
9868         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9869         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9870         (*tablejump<mode>_internal1_nospec): Likewise.
9872 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9874         PR target/80870
9875         * config/sh/sh_optimize_sett_clrt.cc:
9876         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9878 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9880         PR tree-optimization/83940
9881         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9882         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9883         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9884         use it to pass back the definition type.
9885         (vect_check_store_rhs): Likewise rhs_dt_out.
9886         (vect_build_gather_load_calls): Add a mask_dt argument and use
9887         it instead of a call to vect_is_simple_use.
9888         (vectorizable_store): Update calls to vect_check_load_store_mask
9889         and vect_check_store_rhs.  Use the dt returned by the latter instead
9890         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9891         instead of calls to vect_is_simple_use.  Pass the scalar rather
9892         than the vector operand to vect_is_simple_use when handling
9893         second and subsequent copies of an rhs value.
9894         (vectorizable_load): Update calls to vect_check_load_store_mask
9895         and vect_build_gather_load_calls.  Use the cached mask_dt and
9896         gs_info.offset_dt instead of calls to vect_is_simple_use.
9898 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9900         PR middle-end/83945
9901         * tree-emutls.c: Include gimplify.h.
9902         (lower_emutls_2): New function.
9903         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9904         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9905         it before further processing.
9907         PR target/83930
9908         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9909         UINTVAL (trueop1) instead of INTVAL (op1).
9911 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9913         PR debug/81570
9914         PR debug/83728
9915         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9916         INCOMING_FRAME_SP_OFFSET if not defined.
9917         (scan_trace): Add ENTRY argument.  If true and
9918         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9919         emit a note to adjust the CFA offset.
9920         (create_cfi_notes): Adjust scan_trace callers.
9921         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9922         INCOMING_FRAME_SP_OFFSET in the CIE.
9923         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9924         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9925         Likewise.
9926         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9927         * doc/tm.texi: Regenerated.
9929 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9931         PR rtl-optimization/83147
9932         * lra-constraints.c (remove_inheritance_pseudos): Use
9933         lra_substitute_pseudo_within_insn.
9935 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9936             Cesar Philippidis  <cesar@codesourcery.com>
9938         PR target/83920
9939         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9941 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9943         PR target/83790
9944         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9945         spaces for function labels.
9947 2018-01-19  Martin Liska  <mliska@suse.cz>
9949         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9950         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9951         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9952         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9953         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9954         (PRED_CONST_RETURN): Change from 69 to 65.
9955         (PRED_NULL_RETURN): Change from 91 to 71.
9956         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9957         (PRED_LOOP_GUARD): Change from 66 to 73.
9959 2018-01-19  Martin Liska  <mliska@suse.cz>
9961         * predict.c (predict_insn_def): Add new assert.
9962         (struct branch_predictor): Change type to signed integer.
9963         (test_prediction_value_range): Amend test to cover
9964         PROB_UNINITIALIZED.
9965         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9966         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9967         (PRED_LOOP_ITERATIONS_MAX): Likewise.
9968         (PRED_LOOP_IV_COMPARE): Likewise.
9969         * predict.h (PROB_UNINITIALIZED): Define new constant.
9971 2018-01-19  Martin Liska  <mliska@suse.cz>
9973         * predict.c (dump_prediction): Add new format for
9974         analyze_brprob.py script which is enabled with -details
9975         suboption.
9976         * profile-count.h (precise_p): New function.
9978 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9980         PR tree-optimization/83922
9981         * tree-vect-loop.c (vect_verify_full_masking): Return false if
9982         there are no statements that need masking.
9983         (vect_active_double_reduction_p): New function.
9984         (vect_analyze_loop_operations): Use it when handling phis that
9985         are not in the loop header.
9987 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9989         PR tree-optimization/83914
9990         * tree-vect-loop.c (vectorizable_induction): Don't convert
9991         init_expr or apply the peeling adjustment for inductions
9992         that are nested within the vectorized loop.
9994 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9996         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9997         instead of NEG.
9999 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
10001         PR sanitizer/81715
10002         PR testsuite/83882
10003         * function.h (gimplify_parameters): Add gimple_seq * argument.
10004         * function.c: Include gimple.h and options.h.
10005         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
10006         for the added local temporaries if needed.
10007         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
10008         if there are any parameter cleanups, wrap whole body into a
10009         try/finally with the cleanups.
10011 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
10013         PR target/82964
10014         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
10015         Use GET_MODE_CLASS for scalar floating point.
10017 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
10019         PR ipa/82256
10020         patch by PaX Team
10021         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
10022         Fix call of call_cgraph_insertion_hooks.
10024 2018-01-18  Martin Sebor  <msebor@redhat.com>
10026         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
10028 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
10030         PR ipa/83619
10031         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
10032         frequencies.
10034 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
10036         PR other/70268
10037         * common.opt: (-ffile-prefix-map): New option.
10038         * opts.c (common_handle_option): Defer it.
10039         * opts-global.c (handle_common_deferred_options): Handle it.
10040         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
10041         * file-prefix-map.h: New file.
10042         (remap_debug_filename, add_debug_prefix_map): ...here.
10043         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
10044         * final.c (debug_prefix_map, add_debug_prefix_map
10045         remap_debug_filename): Move to...
10046         * file-prefix-map.c: New file.
10047         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
10048         generalize, get rid of alloca(), use strrchr() instead of strchr().
10049         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
10050         Implement in terms of add_prefix_map().
10051         (remap_macro_filename, remap_debug_filename): Implement in term of
10052         remap_filename().
10053         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
10054         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
10055         * dbxout.c: Include file-prefix-map.h.
10056         * varasm.c: Likewise.
10057         * vmsdbgout.c: Likewise.
10058         * xcoffout.c: Likewise.
10059         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
10060         * doc/cppopts.texi (-fmacro-prefix-map): Document.
10061         * doc/invoke.texi (-ffile-prefix-map): Document.
10062         (-fdebug-prefix-map): Update description.
10064 2018-01-18  Martin Liska  <mliska@suse.cz>
10066         * config/i386/i386.c (indirect_thunk_name): Document that also
10067         lfence is emitted.
10068         (output_indirect_thunk): Document why both instructions
10069         (pause and lfence) are generated.
10071 2018-01-18  Richard Biener  <rguenther@suse.de>
10073         PR tree-optimization/83887
10074         * graphite-scop-detection.c
10075         (scop_detection::get_nearest_dom_with_single_entry): Remove.
10076         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
10077         (scop_detection::merge_sese): Re-implement with a flood-fill
10078         algorithm that properly finds a SESE region if it exists.
10080 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
10082         PR c/61240
10083         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
10084         pointer_diff optimizations use view_convert instead of convert.
10086 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10088         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10089         Generate different code for -mno-speculate-indirect-jumps.
10090         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10091         (*call_indirect_aix<mode>): Disable for
10092         -mno-speculate-indirect-jumps.
10093         (*call_indirect_aix<mode>_nospec): New define_insn.
10094         (*call_value_indirect_aix<mode>): Disable for
10095         -mno-speculate-indirect-jumps.
10096         (*call_value_indirect_aix<mode>_nospec): New define_insn.
10097         (*sibcall_nonlocal_sysv<mode>): Generate different code for
10098         -mno-speculate-indirect-jumps.
10099         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10101 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
10103         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
10104         long double type, set the flags for noting the default long double
10105         type, even if we don't pass or return a long double type.
10107 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
10109         PR ipa/83051
10110         * ipa-inline.c (flatten_function): Do not overwrite final inlining
10111         failure.
10113 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
10115         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
10116         support for merge[hl].
10117         (fold_mergehl_helper): New helper function.
10118         (tree-vector-builder.h): New #include for tree_vector_builder usage.
10119         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
10120         (altivec_vmrglw_direct): Add xxmrglw insn.
10122 2018-01-17  Andrew Waterman  <andrew@sifive.com>
10124         * config/riscv/riscv.c (riscv_conditional_register_usage): If
10125         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
10127 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
10129         PR lto/83121
10130         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
10131         call the lto_location_cache before reading the
10132         DECL_SOURCE_LOCATION of the types.
10134 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
10135             Richard Sandiford  <richard.sandiford@linaro.org>
10137         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
10138         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
10139         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
10140         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
10141         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
10142         Add declaration.
10143         * config/aarch64/constraints.md (aarch64_movti_operand):
10144         Limit immediates.
10145         * config/aarch64/predicates.md (Uti): Add new constraint.
10147 2018-01-17 Carl Love  <cel@us.ibm.com>
10149         * config/rs6000/vsx.md (define_expand xl_len_r,
10150         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
10151         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
10152         lxvll.
10153         (define_expand, define_insn): Move the shift left from  the
10154         define_insn to the define_expand for lxvl and stxvl instructions.
10155         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
10156         and XL_LEN_R definitions to PURE.
10158 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
10160         * config/i386/i386.c (indirect_thunk_name): Declare regno
10161         as unsigned int.  Compare regno with INVALID_REGNUM.
10162         (output_indirect_thunk): Ditto.
10163         (output_indirect_thunk_function): Ditto.
10164         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
10165         in the call to output_indirect_thunk_function.
10167 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
10169         PR middle-end/83884
10170         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
10171         rather than the size of inner_type to determine the stack slot size
10172         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
10174 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
10176         PR target/83546
10177         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
10178         to PTA_SILVERMONT.
10180 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
10182         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
10183         endian Linux systems to optionally enable multilibs for selecting
10184         the long double type if the user configured an explicit type.
10185         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
10186         have no long double multilibs if not defined.
10187         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
10188         warn if the user used -mabi={ieee,ibm}longdouble and we built
10189         multilibs for long double.
10190         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
10191         appropriate multilib option.
10192         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
10193         multilib options.
10194         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
10195         for building long double multilibs.
10196         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
10198 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
10200         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
10201         copies.
10203         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
10204         64 bits.
10205         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
10206         128 bits.
10208         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
10209         variables.
10211         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
10212         return value.
10214 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10216         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
10217         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
10219 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10221         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
10222         different rtl trees depending on TARGET_64BIT.
10223         (rs6000_gen_lvx): Likewise.
10225 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10227         * config/visium/visium.md (nop): Tweak comment.
10228         (hazard_nop): Likewise.
10230 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10232         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
10233         -mspeculate-indirect-jumps.
10234         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
10235         for -mno-speculate-indirect-jumps.
10236         (*call_indirect_elfv2<mode>_nospec): New define_insn.
10237         (*call_value_indirect_elfv2<mode>): Disable for
10238         -mno-speculate-indirect-jumps.
10239         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
10240         (indirect_jump): Emit different RTL for
10241         -mno-speculate-indirect-jumps.
10242         (*indirect_jump<mode>): Disable for
10243         -mno-speculate-indirect-jumps.
10244         (*indirect_jump<mode>_nospec): New define_insn.
10245         (tablejump): Emit different RTL for
10246         -mno-speculate-indirect-jumps.
10247         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
10248         (tablejumpsi_nospec): New define_expand.
10249         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
10250         (tablejumpdi_nospec): New define_expand.
10251         (*tablejump<mode>_internal1): Disable for
10252         -mno-speculate-indirect-jumps.
10253         (*tablejump<mode>_internal1_nospec): New define_insn.
10254         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
10255         option.
10257 2018-01-16  Artyom Skrobov tyomitch@gmail.com
10259         * caller-save.c (insert_save): Drop unnecessary parameter.  All
10260         callers updated.
10262 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10263             Richard Biener  <rguenth@suse.de>
10265         PR libgomp/83590
10266         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
10267         return early, inline manually is_gimple_sizepos.  Make sure if we
10268         call gimplify_expr we don't end up with a gimple constant.
10269         * tree.c (variably_modified_type_p): Don't return true for
10270         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
10271         * gimplify.h (is_gimple_sizepos): Remove.
10273 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10275         PR tree-optimization/83857
10276         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
10277         vectorizable_live_operation for pure SLP statements.
10278         (vectorizable_live_operation): Handle PHIs.
10280 2018-01-16  Richard Biener  <rguenther@suse.de>
10282         PR tree-optimization/83867
10283         * tree-vect-stmts.c (vect_transform_stmt): Precompute
10284         nested_in_vect_loop_p since the scalar stmt may get invalidated.
10286 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10288         PR c/83844
10289         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
10290         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
10291         If off is not INTEGER_CST, issue a may not be aligned warning
10292         rather than isn't aligned.  Use isn%'t rather than isn't.
10293         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
10294         into MULT_EXPR.
10295         <case MULT_EXPR>: Improve the case when bottom and one of the
10296         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
10297         operand, in that case check if the other operand is multiple of
10298         bottom divided by the INTEGER_CST operand.
10300 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10302         PR target/83858
10303         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
10304         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
10305         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
10306         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
10307         * config/pa/pa.c (pa_function_arg_advance): Likewise.
10308         (pa_function_arg, pa_arg_partial_bytes): Likewise.
10309         (pa_function_arg_size): New function.
10311 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10313         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
10314         in a separate statement.
10316 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10318         PR tree-optimization/83847
10319         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
10320         group gathers and scatters.
10322 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10324         PR rtl-optimization/86620
10325         * params.def (max-sched-ready-insns): Bump minimum value to 1.
10327         PR rtl-optimization/83213
10328         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
10329         to last if both are JUMP_INSNs.
10331         PR tree-optimization/83843
10332         * gimple-ssa-store-merging.c
10333         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
10334         store_immediate_info for bswap/nop orig_stores.
10336 2018-01-15  Andrew Waterman  <andrew@sifive.com>
10338         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
10339         !TARGET_MUL.
10340         <UDIV>: Increase cost if !TARGET_DIV.
10342 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
10344         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
10345         (define_attr "cr_logical_3op"): New.
10346         (cceq_ior_compare): Adjust.
10347         (cceq_ior_compare_complement): Adjust.
10348         (*cceq_rev_compare): Adjust.
10349         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
10350         (is_cracked_insn): Adjust.
10351         (insn_must_be_first_in_group): Adjust.
10352         * config/rs6000/40x.md: Adjust.
10353         * config/rs6000/440.md: Adjust.
10354         * config/rs6000/476.md: Adjust.
10355         * config/rs6000/601.md: Adjust.
10356         * config/rs6000/603.md: Adjust.
10357         * config/rs6000/6xx.md: Adjust.
10358         * config/rs6000/7450.md: Adjust.
10359         * config/rs6000/7xx.md: Adjust.
10360         * config/rs6000/8540.md: Adjust.
10361         * config/rs6000/cell.md: Adjust.
10362         * config/rs6000/e300c2c3.md: Adjust.
10363         * config/rs6000/e500mc.md: Adjust.
10364         * config/rs6000/e500mc64.md: Adjust.
10365         * config/rs6000/e5500.md: Adjust.
10366         * config/rs6000/e6500.md: Adjust.
10367         * config/rs6000/mpc.md: Adjust.
10368         * config/rs6000/power4.md: Adjust.
10369         * config/rs6000/power5.md: Adjust.
10370         * config/rs6000/power6.md: Adjust.
10371         * config/rs6000/power7.md: Adjust.
10372         * config/rs6000/power8.md: Adjust.
10373         * config/rs6000/power9.md: Adjust.
10374         * config/rs6000/rs64.md: Adjust.
10375         * config/rs6000/titan.md: Adjust.
10377 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10379         * config/i386/predicates.md (indirect_branch_operand): Rewrite
10380         ix86_indirect_branch_register logic.
10382 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10384         * config/i386/constraints.md (Bs): Update
10385         ix86_indirect_branch_register check.  Don't check
10386         ix86_indirect_branch_register with GOT_memory_operand.
10387         (Bw): Likewise.
10388         * config/i386/predicates.md (GOT_memory_operand): Don't check
10389         ix86_indirect_branch_register here.
10390         (GOT32_symbol_operand): Likewise.
10392 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10394         * config/i386/predicates.md (constant_call_address_operand):
10395         Rewrite ix86_indirect_branch_register logic.
10396         (sibcall_insn_operand): Likewise.
10398 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10400         * config/i386/constraints.md (Bs): Replace
10401         ix86_indirect_branch_thunk_register with
10402         ix86_indirect_branch_register.
10403         (Bw): Likewise.
10404         * config/i386/i386.md (indirect_jump): Likewise.
10405         (tablejump): Likewise.
10406         (*sibcall_memory): Likewise.
10407         (*sibcall_value_memory): Likewise.
10408         Peepholes of indirect call and jump via memory: Likewise.
10409         * config/i386/i386.opt: Likewise.
10410         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10411         (GOT_memory_operand): Likewise.
10412         (call_insn_operand): Likewise.
10413         (sibcall_insn_operand): Likewise.
10414         (GOT32_symbol_operand): Likewise.
10416 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10418         PR middle-end/83837
10419         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
10420         type rather than type addr's type points to.
10421         (expand_omp_atomic_mutex): Likewise.
10422         (expand_omp_atomic): Likewise.
10424 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10426         PR target/83839
10427         * config/i386/i386.c (output_indirect_thunk_function): Use
10428         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
10429         for  __x86_return_thunk.
10431 2018-01-15  Richard Biener  <rguenther@suse.de>
10433         PR middle-end/83850
10434         * expmed.c (extract_bit_field_1): Fix typo.
10436 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10438         PR target/83687
10439         * config/arm/iterators.md (VF): New mode iterator.
10440         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
10441         Remove integer-related logic from pattern.
10442         (neon_vabd<mode>_3): Likewise.
10444 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10446         PR middle-end/82694
10447         * common.opt (fstrict-overflow): No longer an alias.
10448         (fwrapv-pointer): New option.
10449         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10450         also for pointer types based on flag_wrapv_pointer.
10451         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10452         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10453         opts->x_flag_wrapv got set.
10454         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10455         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10456         POINTER_TYPE_OVERFLOW_UNDEFINED.
10457         * match.pd: Likewise in address comparison pattern.
10458         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10460 2018-01-15  Richard Biener  <rguenther@suse.de>
10462         PR lto/83804
10463         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10464         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
10465         Reset type names to their identifier if their TYPE_DECL doesn't
10466         have linkage (and thus is used for ODR and devirt).
10467         (save_debug_info_for_decl): Remove.
10468         (save_debug_info_for_type): Likewise.
10469         (add_tree_to_fld_list): Adjust.
10470         * tree-pretty-print.c (dump_generic_node): Make dumping of
10471         type names more robust.
10473 2018-01-15  Richard Biener  <rguenther@suse.de>
10475         * BASE-VER: Bump to 8.0.1.
10477 2018-01-14  Martin Sebor  <msebor@redhat.com>
10479         PR other/83508
10480         * builtins.c (check_access): Avoid warning when the no-warning bit
10481         is set.
10483 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
10485         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10486         * ira-color (allocno_hard_regs_compare): Likewise.
10488 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
10490         PR target/83013
10491         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10492         Use .pushsection/.popsection.
10494 2018-01-14  Martin Sebor  <msebor@redhat.com>
10496         PR c++/81327
10497         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10499 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
10501         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
10502         entry from extra_headers.
10503         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
10504         extra_headers, make the list bitwise identical to the i?86-*-* one.
10506 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10508         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
10509         -mcmodel=large with -mindirect-branch=thunk,
10510         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
10511         -mfunction-return=thunk-extern.
10512         * doc/invoke.texi: Document -mcmodel=large is incompatible with
10513         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
10514         -mfunction-return=thunk and -mfunction-return=thunk-extern.
10516 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10518         * config/i386/i386.c (print_reg): Print the name of the full
10519         integer register without '%'.
10520         (ix86_print_operand): Handle 'V'.
10521          * doc/extend.texi: Document 'V' modifier.
10523 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10525         * config/i386/constraints.md (Bs): Disallow memory operand for
10526         -mindirect-branch-register.
10527         (Bw): Likewise.
10528         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10529         (GOT_memory_operand): Likewise.
10530         (call_insn_operand): Likewise.
10531         (sibcall_insn_operand): Likewise.
10532         (GOT32_symbol_operand): Likewise.
10533         * config/i386/i386.md (indirect_jump): Call convert_memory_address
10534         for -mindirect-branch-register.
10535         (tablejump): Likewise.
10536         (*sibcall_memory): Likewise.
10537         (*sibcall_value_memory): Likewise.
10538         Disallow peepholes of indirect call and jump via memory for
10539         -mindirect-branch-register.
10540         (*call_pop): Replace m with Bw.
10541         (*call_value_pop): Likewise.
10542         (*sibcall_pop_memory): Replace m with Bs.
10543         * config/i386/i386.opt (mindirect-branch-register): New option.
10544         * doc/invoke.texi: Document -mindirect-branch-register option.
10546 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10548         * config/i386/i386-protos.h (ix86_output_function_return): New.
10549         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
10550         set function_return_type.
10551         (indirect_thunk_name): Add ret_p to indicate thunk for function
10552         return.
10553         (output_indirect_thunk_function): Pass false to
10554         indirect_thunk_name.
10555         (ix86_output_indirect_branch_via_reg): Likewise.
10556         (ix86_output_indirect_branch_via_push): Likewise.
10557         (output_indirect_thunk_function): Create alias for function
10558         return thunk if regno < 0.
10559         (ix86_output_function_return): New function.
10560         (ix86_handle_fndecl_attribute): Handle function_return.
10561         (ix86_attribute_table): Add function_return.
10562         * config/i386/i386.h (machine_function): Add
10563         function_return_type.
10564         * config/i386/i386.md (simple_return_internal): Use
10565         ix86_output_function_return.
10566         (simple_return_internal_long): Likewise.
10567         * config/i386/i386.opt (mfunction-return=): New option.
10568         (indirect_branch): Mention -mfunction-return=.
10569         * doc/extend.texi: Document function_return function attribute.
10570         * doc/invoke.texi: Document -mfunction-return= option.
10572 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10574         * config/i386/i386-opts.h (indirect_branch): New.
10575         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10576         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10577         with local indirect jump when converting indirect call and jump.
10578         (ix86_set_indirect_branch_type): New.
10579         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10580         (indirectlabelno): New.
10581         (indirect_thunk_needed): Likewise.
10582         (indirect_thunk_bnd_needed): Likewise.
10583         (indirect_thunks_used): Likewise.
10584         (indirect_thunks_bnd_used): Likewise.
10585         (INDIRECT_LABEL): Likewise.
10586         (indirect_thunk_name): Likewise.
10587         (output_indirect_thunk): Likewise.
10588         (output_indirect_thunk_function): Likewise.
10589         (ix86_output_indirect_branch_via_reg): Likewise.
10590         (ix86_output_indirect_branch_via_push): Likewise.
10591         (ix86_output_indirect_branch): Likewise.
10592         (ix86_output_indirect_jmp): Likewise.
10593         (ix86_code_end): Call output_indirect_thunk_function if needed.
10594         (ix86_output_call_insn): Call ix86_output_indirect_branch if
10595         needed.
10596         (ix86_handle_fndecl_attribute): Handle indirect_branch.
10597         (ix86_attribute_table): Add indirect_branch.
10598         * config/i386/i386.h (machine_function): Add indirect_branch_type
10599         and has_local_indirect_jump.
10600         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10601         to true.
10602         (tablejump): Likewise.
10603         (*indirect_jump): Use ix86_output_indirect_jmp.
10604         (*tablejump_1): Likewise.
10605         (simple_return_indirect_internal): Likewise.
10606         * config/i386/i386.opt (mindirect-branch=): New option.
10607         (indirect_branch): New.
10608         (keep): Likewise.
10609         (thunk): Likewise.
10610         (thunk-inline): Likewise.
10611         (thunk-extern): Likewise.
10612         * doc/extend.texi: Document indirect_branch function attribute.
10613         * doc/invoke.texi: Document -mindirect-branch= option.
10615 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
10617         PR ipa/83051
10618         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10620 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
10622         * ipa-inline.c (want_inline_small_function_p): Return false if
10623         inlining has already failed with CIF_FINAL_ERROR.
10624         (update_caller_keys): Call want_inline_small_function_p before
10625         can_inline_edge_p.
10626         (update_callee_keys): Likewise.
10628 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10630         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10631         New function.
10632         (rs6000_quadword_masked_address_p): Likewise.
10633         (quad_aligned_load_p): Likewise.
10634         (quad_aligned_store_p): Likewise.
10635         (const_load_sequence_p): Add comment to describe the outer-most loop.
10636         (mimic_memory_attributes_and_flags): New function.
10637         (rs6000_gen_stvx): Likewise.
10638         (replace_swapped_aligned_store): Likewise.
10639         (rs6000_gen_lvx): Likewise.
10640         (replace_swapped_aligned_load): Likewise.
10641         (replace_swapped_load_constant): Capitalize argument name in
10642         comment describing this function.
10643         (rs6000_analyze_swaps): Add a third pass to search for vector loads
10644         and stores that access quad-word aligned addresses and replace
10645         with stvx or lvx instructions when appropriate.
10646         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10647         New function prototype.
10648         (rs6000_quadword_masked_address_p): Likewise.
10649         (rs6000_gen_lvx): Likewise.
10650         (rs6000_gen_stvx): Likewise.
10651         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10652         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10653         when memory address is aligned.
10654         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10655         this split to select lvx instruction when memory address is aligned.
10656         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10657         instruction when memory address is aligned.
10658         (*vsx_le_perm_load_v16qi): Likewise.
10659         (four unnamed splitters): Modify to select the stvx instruction
10660         when memory is aligned.
10662 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
10664         * predict.c (determine_unlikely_bbs): Handle correctly BBs
10665         which appears in the queue multiple times.
10667 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10668             Alan Hayward  <alan.hayward@arm.com>
10669             David Sherwood  <david.sherwood@arm.com>
10671         * tree-vectorizer.h (vec_lower_bound): New structure.
10672         (_loop_vec_info): Add check_nonzero and lower_bounds.
10673         (LOOP_VINFO_CHECK_NONZERO): New macro.
10674         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10675         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10676         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10677         fields.  Make seg_len the distance travelled, not including the
10678         access size.
10679         (dr_direction_indicator): Declare.
10680         (dr_zero_step_indicator): Likewise.
10681         (dr_known_forward_stride_p): Likewise.
10682         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10683         tree-ssanames.h.
10684         (runtime_alias_check_p): Allow runtime alias checks with
10685         variable strides.
10686         (operator ==): Compare access_size and align.
10687         (prune_runtime_alias_test_list): Rework for new distinction between
10688         the access_size and seg_len.
10689         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10690         segment lengths.
10691         (get_segment_min_max): New function.
10692         (create_intersect_range_checks): Use it.
10693         (dr_step_indicator): New function.
10694         (dr_direction_indicator): Likewise.
10695         (dr_zero_step_indicator): Likewise.
10696         (dr_known_forward_stride_p): Likewise.
10697         * tree-loop-distribution.c (data_ref_segment_size): Return
10698         DR_STEP * (niters - 1).
10699         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10700         constructor.
10701         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10702         (vect_preserves_scalar_order_p): New function, split out from...
10703         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10704         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10705         (vect_vfa_access_size): New function.
10706         (vect_vfa_align): Likewise.
10707         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10708         (dump_lower_bound): New function.
10709         (vect_check_lower_bound): Likewise.
10710         (vect_small_gap_p): Likewise.
10711         (vectorizable_with_step_bound_p): Likewise.
10712         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10713         depencies if the vectorization factor is 1.  Convert the checks
10714         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10715         a bunds check for variable steps if the minimum required step is
10716         relatively small. Update calls to the dr_with_seg_len
10717         constructor and to vect_compile_time_alias.
10718         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10719         function.
10720         (vect_loop_versioning): Call it.
10721         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10722         when retrying.
10723         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10725 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10726             Alan Hayward  <alan.hayward@arm.com>
10727             David Sherwood  <david.sherwood@arm.com>
10729         * doc/sourcebuild.texi (vect_scatter_store): Document.
10730         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10731         optabs.
10732         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10733         Document.
10734         * genopinit.c (main): Add supports_vec_scatter_store and
10735         supports_vec_scatter_store_cached to target_optabs.
10736         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10737         IFN_MASK_SCATTER_STORE.
10738         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10739         functions.
10740         * internal-fn.h (internal_store_fn_p): Declare.
10741         (internal_fn_stored_value_index): Likewise.
10742         * internal-fn.c (scatter_store_direct): New macro.
10743         (expand_scatter_store_optab_fn): New function.
10744         (direct_scatter_store_optab_supported_p): New macro.
10745         (internal_store_fn_p): New function.
10746         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10747         IFN_MASK_SCATTER_STORE.
10748         (internal_fn_mask_index): Likewise.
10749         (internal_fn_stored_value_index): New function.
10750         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10751         for scatter stores.
10752         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10753         * optabs-query.c (supports_vec_scatter_store_p): New function.
10754         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10755         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10756         true for scatter stores.
10757         (vect_gather_scatter_fn_p): Handle scatter stores too.
10758         (vect_check_gather_scatter): Consider using scatter stores if
10759         supports_vec_scatter_store_p.
10760         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10761         scatter stores too.
10762         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10763         internal_fn_stored_value_index.
10764         (check_load_store_masking): Handle scatter stores too.
10765         (vect_get_store_rhs): Make public.
10766         (vectorizable_call): Use internal_store_fn_p.
10767         (vectorizable_store): Handle scatter store internal functions.
10768         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10769         when deciding whether the end of the group has been reached.
10770         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10771         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10772         (mask_scatter_store<mode>): New insns.
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         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10779         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10780         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10781         function.
10782         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10783         Use vect_truncate_gather_scatter_offset if we can't treat the
10784         operation as a normal gather load or scatter store.
10785         (get_group_load_store_type): Take the gather_scatter_info
10786         as argument.  Try using a gather load or scatter store for
10787         single-element groups.
10788         (get_load_store_type): Update calls to get_group_load_store_type
10789         and vect_use_strided_gather_scatters_p.
10791 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10792             Alan Hayward  <alan.hayward@arm.com>
10793             David Sherwood  <david.sherwood@arm.com>
10795         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10796         optional tree argument.
10797         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10798         null target hooks.
10799         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10800         but continue to use the current value as a fallback.
10801         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10802         to compare the updates.
10803         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10804         (get_load_store_type): Use it when handling a strided access.
10805         (vect_get_strided_load_store_ops): New function.
10806         (vect_get_data_ptr_increment): Likewise.
10807         (vectorizable_load): Handle strided gather loads.  Always pass
10808         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10810 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10811             Alan Hayward  <alan.hayward@arm.com>
10812             David Sherwood  <david.sherwood@arm.com>
10814         * doc/md.texi (gather_load@var{m}): Document.
10815         (mask_gather_load@var{m}): Likewise.
10816         * genopinit.c (main): Add supports_vec_gather_load and
10817         supports_vec_gather_load_cached to target_optabs.
10818         * optabs-tree.c (init_tree_optimization_optabs): Use
10819         ggc_cleared_alloc to allocate target_optabs.
10820         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10821         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10822         functions.
10823         * internal-fn.h (internal_load_fn_p): Declare.
10824         (internal_gather_scatter_fn_p): Likewise.
10825         (internal_fn_mask_index): Likewise.
10826         (internal_gather_scatter_fn_supported_p): Likewise.
10827         * internal-fn.c (gather_load_direct): New macro.
10828         (expand_gather_load_optab_fn): New function.
10829         (direct_gather_load_optab_supported_p): New macro.
10830         (direct_internal_fn_optab): New function.
10831         (internal_load_fn_p): Likewise.
10832         (internal_gather_scatter_fn_p): Likewise.
10833         (internal_fn_mask_index): Likewise.
10834         (internal_gather_scatter_fn_supported_p): Likewise.
10835         * optabs-query.c (supports_at_least_one_mode_p): New function.
10836         (supports_vec_gather_load_p): Likewise.
10837         * optabs-query.h (supports_vec_gather_load_p): Declare.
10838         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10839         and memory_type field.
10840         (NUM_PATTERNS): Bump to 15.
10841         * tree-vect-data-refs.c: Include internal-fn.h.
10842         (vect_gather_scatter_fn_p): New function.
10843         (vect_describe_gather_scatter_call): Likewise.
10844         (vect_check_gather_scatter): Try using internal functions for
10845         gather loads.  Recognize existing calls to a gather load function.
10846         (vect_analyze_data_refs): Consider using gather loads if
10847         supports_vec_gather_load_p.
10848         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10849         (vect_get_gather_scatter_offset_type): Likewise.
10850         (vect_convert_mask_for_vectype): Likewise.
10851         (vect_add_conversion_to_patterm): Likewise.
10852         (vect_try_gather_scatter_pattern): Likewise.
10853         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10854         (vect_vect_recog_func_ptrs): Add it.
10855         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10856         internal_fn_mask_index and internal_gather_scatter_fn_p.
10857         (check_load_store_masking): Take the gather_scatter_info as an
10858         argument and handle gather loads.
10859         (vect_get_gather_scatter_ops): New function.
10860         (vectorizable_call): Check internal_load_fn_p.
10861         (vectorizable_load): Likewise.  Handle gather load internal
10862         functions.
10863         (vectorizable_store): Update call to check_load_store_masking.
10864         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10865         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10866         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10867         (aarch64_gather_scale_operand_d): New predicates.
10868         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10869         (mask_gather_load<mode>): New insns.
10871 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10872             Alan Hayward  <alan.hayward@arm.com>
10873             David Sherwood  <david.sherwood@arm.com>
10875         * optabs.def (fold_left_plus_optab): New optab.
10876         * doc/md.texi (fold_left_plus_@var{m}): Document.
10877         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10878         * internal-fn.c (fold_left_direct): Define.
10879         (expand_fold_left_optab_fn): Likewise.
10880         (direct_fold_left_optab_supported_p): Likewise.
10881         * fold-const-call.c (fold_const_fold_left): New function.
10882         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10883         * tree-parloops.c (valid_reduction_p): New function.
10884         (gather_scalar_reductions): Use it.
10885         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10886         (vect_finish_replace_stmt): Declare.
10887         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10888         (needs_fold_left_reduction_p): New function, split out from...
10889         (vect_is_simple_reduction): ...here.  Accept reductions that
10890         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10891         (vect_force_simple_reduction): Also store the reduction type in
10892         the assignment's STMT_VINFO_REDUC_TYPE.
10893         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10894         (merge_with_identity): New function.
10895         (vect_expand_fold_left): Likewise.
10896         (vectorize_fold_left_reduction): Likewise.
10897         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10898         scalar phi in place for it.  Check for target support and reject
10899         cases that would reassociate the operation.  Defer the transform
10900         phase to vectorize_fold_left_reduction.
10901         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10902         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10903         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10905 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10907         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10908         call to ifc_temp_var.
10910 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10911             Alan Hayward  <alan.hayward@arm.com>
10912             David Sherwood  <david.sherwood@arm.com>
10914         * target.def (legitimize_address_displacement): Take the original
10915         offset as a poly_int.
10916         * targhooks.h (default_legitimize_address_displacement): Update
10917         accordingly.
10918         * targhooks.c (default_legitimize_address_displacement): Likewise.
10919         * doc/tm.texi: Regenerate.
10920         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10921         as an argument, moving assert of ad->disp == ad->disp_term to...
10922         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10923         Try calling targetm.legitimize_address_displacement before expanding
10924         the address rather than afterwards, and adjust for the new interface.
10925         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10926         Match the new hook interface.  Handle SVE addresses.
10927         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10928         new hook interface.
10930 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10932         * Makefile.in (OBJS): Add early-remat.o.
10933         * target.def (select_early_remat_modes): New hook.
10934         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10935         * doc/tm.texi: Regenerate.
10936         * targhooks.h (default_select_early_remat_modes): Declare.
10937         * targhooks.c (default_select_early_remat_modes): New function.
10938         * timevar.def (TV_EARLY_REMAT): New timevar.
10939         * passes.def (pass_early_remat): New pass.
10940         * tree-pass.h (make_pass_early_remat): Declare.
10941         * early-remat.c: New file.
10942         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10943         function.
10944         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10946 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10947             Alan Hayward  <alan.hayward@arm.com>
10948             David Sherwood  <david.sherwood@arm.com>
10950         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10951         vfm1 with a bound_epilog parameter.
10952         (vect_do_peeling): Update calls accordingly, and move the prologue
10953         call earlier in the function.  Treat the base bound_epilog as 0 for
10954         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
10955         this base when peeling for gaps.
10956         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10957         with fully-masked loops.
10958         (vect_estimate_min_profitable_iters): Handle the single peeled
10959         iteration in that case.
10961 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10962             Alan Hayward  <alan.hayward@arm.com>
10963             David Sherwood  <david.sherwood@arm.com>
10965         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10966         single-element interleaving even if the size is not a power of 2.
10967         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10968         accesses for single-element interleaving if the group size is
10969         not a power of 2.
10971 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10972             Alan Hayward  <alan.hayward@arm.com>
10973             David Sherwood  <david.sherwood@arm.com>
10975         * doc/md.texi (fold_extract_last_@var{m}): Document.
10976         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10977         * optabs.def (fold_extract_last_optab): New optab.
10978         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10979         * internal-fn.c (fold_extract_direct): New macro.
10980         (expand_fold_extract_optab_fn): Likewise.
10981         (direct_fold_extract_optab_supported_p): Likewise.
10982         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10983         * tree-vect-loop.c (vect_model_reduction_cost): Handle
10984         EXTRACT_LAST_REDUCTION.
10985         (get_initial_def_for_reduction): Do not create an initial vector
10986         for EXTRACT_LAST_REDUCTION reductions.
10987         (vectorizable_reduction): Leave the scalar phi in place for
10988         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
10989         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
10990         epilogue code for EXTRACT_LAST_REDUCTION and defer the
10991         transform phase to vectorizable_condition.
10992         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10993         split out from...
10994         (vect_finish_stmt_generation): ...here.
10995         (vect_finish_replace_stmt): New function.
10996         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10997         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10998         pattern.
10999         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
11001 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11002             Alan Hayward  <alan.hayward@arm.com>
11003             David Sherwood  <david.sherwood@arm.com>
11005         * doc/md.texi (extract_last_@var{m}): Document.
11006         * optabs.def (extract_last_optab): New optab.
11007         * internal-fn.def (EXTRACT_LAST): New internal function.
11008         * internal-fn.c (cond_unary_direct): New macro.
11009         (expand_cond_unary_optab_fn): Likewise.
11010         (direct_cond_unary_optab_supported_p): Likewise.
11011         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
11012         loops using EXTRACT_LAST.
11013         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
11014         (extract_last_<mode>): ...this optab.
11015         (vec_extract<mode><Vel>): Update accordingly.
11017 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11018             Alan Hayward  <alan.hayward@arm.com>
11019             David Sherwood  <david.sherwood@arm.com>
11021         * target.def (empty_mask_is_expensive): New hook.
11022         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
11023         * doc/tm.texi: Regenerate.
11024         * targhooks.h (default_empty_mask_is_expensive): Declare.
11025         * targhooks.c (default_empty_mask_is_expensive): New function.
11026         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
11027         if the target says that empty masks are expensive.
11028         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
11029         New function.
11030         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
11032 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11033             Alan Hayward  <alan.hayward@arm.com>
11034             David Sherwood  <david.sherwood@arm.com>
11036         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
11037         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
11038         (vect_use_loop_mask_for_alignment_p): New function.
11039         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
11040         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
11041         niters_skip argument.  Make sure that the first niters_skip elements
11042         of the first iteration are inactive.
11043         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
11044         Update call to vect_set_loop_masks_directly.
11045         (get_misalign_in_elems): New function, split out from...
11046         (vect_gen_prolog_loop_niters): ...here.
11047         (vect_update_init_of_dr): Take a code argument that specifies whether
11048         the adjustment should be added or subtracted.
11049         (vect_update_init_of_drs): Likewise.
11050         (vect_prepare_for_masked_peels): New function.
11051         (vect_do_peeling): Skip prologue peeling if we're using a mask
11052         instead.  Update call to vect_update_inits_of_drs.
11053         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11054         mask_skip_niters.
11055         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
11056         alignment.  Do not include the number of peeled iterations in
11057         the minimum threshold in that case.
11058         (vectorizable_induction): Adjust the start value down by
11059         LOOP_VINFO_MASK_SKIP_NITERS iterations.
11060         (vect_transform_loop): Call vect_prepare_for_masked_peels.
11061         Take the number of skipped iterations into account when calculating
11062         the loop bounds.
11063         * tree-vect-stmts.c (vect_gen_while_not): New function.
11065 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11066             Alan Hayward  <alan.hayward@arm.com>
11067             David Sherwood  <david.sherwood@arm.com>
11069         * doc/sourcebuild.texi (vect_fully_masked): Document.
11070         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
11071         default value to 0.
11072         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
11073         split out from...
11074         (vect_analyze_loop_2): ...here. Don't check the vectorization
11075         factor against the number of loop iterations if the loop is
11076         fully-masked.
11078 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11079             Alan Hayward  <alan.hayward@arm.com>
11080             David Sherwood  <david.sherwood@arm.com>
11082         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
11083         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
11084         (dump_groups): Update accordingly.
11085         (iv_use::mem_type): New member variable.
11086         (address_p): New function.
11087         (record_use): Add a mem_type argument and initialize the new
11088         mem_type field.
11089         (record_group_use): Add a mem_type argument.  Use address_p.
11090         Remove obsolete null checks of base_object.  Update call to record_use.
11091         (find_interesting_uses_op): Update call to record_group_use.
11092         (find_interesting_uses_cond): Likewise.
11093         (find_interesting_uses_address): Likewise.
11094         (get_mem_type_for_internal_fn): New function.
11095         (find_address_like_use): Likewise.
11096         (find_interesting_uses_stmt): Try find_address_like_use before
11097         calling find_interesting_uses_op.
11098         (addr_offset_valid_p): Use the iv mem_type field as the type
11099         of the addressed memory.
11100         (add_autoinc_candidates): Likewise.
11101         (get_address_cost): Likewise.
11102         (split_small_address_groups_p): Use address_p.
11103         (split_address_groups): Likewise.
11104         (add_iv_candidate_for_use): Likewise.
11105         (autoinc_possible_for_pair): Likewise.
11106         (rewrite_groups): Likewise.
11107         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
11108         (determine_group_iv_cost): Update after split of USE_ADDRESS.
11109         (get_alias_ptr_type_for_ptr_address): New function.
11110         (rewrite_use_address): Rewrite address uses in calls that were
11111         identified by find_address_like_use.
11113 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11114             Alan Hayward  <alan.hayward@arm.com>
11115             David Sherwood  <david.sherwood@arm.com>
11117         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
11118         TARGET_MEM_REFs.
11119         * gimple-expr.h (is_gimple_addressable: Likewise.
11120         * gimple-expr.c (is_gimple_address): Likewise.
11121         * internal-fn.c (expand_call_mem_ref): New function.
11122         (expand_mask_load_optab_fn): Use it.
11123         (expand_mask_store_optab_fn): Likewise.
11125 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11126             Alan Hayward  <alan.hayward@arm.com>
11127             David Sherwood  <david.sherwood@arm.com>
11129         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
11130         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
11131         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
11132         (cond_umax@var{mode}): Document.
11133         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
11134         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
11135         (cond_umin_optab, cond_umax_optab): New optabs.
11136         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
11137         (COND_IOR, COND_XOR): New internal functions.
11138         * internal-fn.h (get_conditional_internal_fn): Declare.
11139         * internal-fn.c (cond_binary_direct): New macro.
11140         (expand_cond_binary_optab_fn): Likewise.
11141         (direct_cond_binary_optab_supported_p): Likewise.
11142         (get_conditional_internal_fn): New function.
11143         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
11144         Cope with reduction statements that are vectorized as calls rather
11145         than assignments.
11146         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
11147         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
11148         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
11149         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11150         (UNSPEC_COND_EOR): New unspecs.
11151         (optab): Add mappings for them.
11152         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
11153         (sve_int_op, sve_fp_op): New int attributes.
11155 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11156             Alan Hayward  <alan.hayward@arm.com>
11157             David Sherwood  <david.sherwood@arm.com>
11159         * optabs.def (while_ult_optab): New optab.
11160         * doc/md.texi (while_ult@var{m}@var{n}): Document.
11161         * internal-fn.def (WHILE_ULT): New internal function.
11162         * internal-fn.h (direct_internal_fn_supported_p): New override
11163         that takes two types as argument.
11164         * internal-fn.c (while_direct): New macro.
11165         (expand_while_optab_fn): New function.
11166         (convert_optab_supported_p): Likewise.
11167         (direct_while_optab_supported_p): New macro.
11168         * wide-int.h (wi::udiv_ceil): New function.
11169         * tree-vectorizer.h (rgroup_masks): New structure.
11170         (vec_loop_masks): New typedef.
11171         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
11172         and fully_masked_p.
11173         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
11174         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
11175         (vect_max_vf): New function.
11176         (slpeel_make_loop_iterate_ntimes): Delete.
11177         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
11178         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
11179         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
11180         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
11181         internal-fn.h, stor-layout.h and optabs-query.h.
11182         (vect_set_loop_mask): New function.
11183         (add_preheader_seq): Likewise.
11184         (add_header_seq): Likewise.
11185         (interleave_supported_p): Likewise.
11186         (vect_maybe_permute_loop_masks): Likewise.
11187         (vect_set_loop_masks_directly): Likewise.
11188         (vect_set_loop_condition_masked): Likewise.
11189         (vect_set_loop_condition_unmasked): New function, split out from
11190         slpeel_make_loop_iterate_ntimes.
11191         (slpeel_make_loop_iterate_ntimes): Rename to..
11192         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
11193         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
11194         (vect_do_peeling): Update call accordingly.
11195         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
11196         loops.
11197         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11198         mask_compare_type, can_fully_mask_p and fully_masked_p.
11199         (release_vec_loop_masks): New function.
11200         (_loop_vec_info): Use it to free the loop masks.
11201         (can_produce_all_loop_masks_p): New function.
11202         (vect_get_max_nscalars_per_iter): Likewise.
11203         (vect_verify_full_masking): Likewise.
11204         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
11205         retries, and free the mask rgroups before retrying.  Check loop-wide
11206         reasons for disallowing fully-masked loops.  Make the final decision
11207         about whether use a fully-masked loop or not.
11208         (vect_estimate_min_profitable_iters): Do not assume that peeling
11209         for the number of iterations will be needed for fully-masked loops.
11210         (vectorizable_reduction): Disable fully-masked loops.
11211         (vectorizable_live_operation): Likewise.
11212         (vect_halve_mask_nunits): New function.
11213         (vect_double_mask_nunits): Likewise.
11214         (vect_record_loop_mask): Likewise.
11215         (vect_get_loop_mask): Likewise.
11216         (vect_transform_loop): Handle the case in which the final loop
11217         iteration might handle a partial vector.  Call vect_set_loop_condition
11218         instead of slpeel_make_loop_iterate_ntimes.
11219         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
11220         (check_load_store_masking): New function.
11221         (prepare_load_store_mask): Likewise.
11222         (vectorizable_store): Handle fully-masked loops.
11223         (vectorizable_load): Likewise.
11224         (supportable_widening_operation): Use vect_halve_mask_nunits for
11225         booleans.
11226         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
11227         (vect_gen_while): New function.
11228         * config/aarch64/aarch64.md (umax<mode>3): New expander.
11229         (aarch64_uqdec<mode>): New insn.
11231 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11232             Alan Hayward  <alan.hayward@arm.com>
11233             David Sherwood  <david.sherwood@arm.com>
11235         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
11236         (reduc_xor_scal_optab): New optabs.
11237         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
11238         (reduc_xor_scal_@var{m}): Document.
11239         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
11240         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
11241         internal functions.
11242         * fold-const-call.c (fold_const_call): Handle them.
11243         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
11244         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
11245         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
11246         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
11247         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
11248         (UNSPEC_XORV): New unspecs.
11249         (optab): Add entries for them.
11250         (BITWISEV): New int iterator.
11251         (bit_reduc_op): New int attributes.
11253 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11254             Alan Hayward  <alan.hayward@arm.com>
11255             David Sherwood  <david.sherwood@arm.com>
11257         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
11258         * internal-fn.def (VEC_SHL_INSERT): New internal function.
11259         * optabs.def (vec_shl_insert_optab): New optab.
11260         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
11261         (duplicate_and_interleave): Likewise.
11262         * tree-vect-loop.c: Include internal-fn.h.
11263         (neutral_op_for_slp_reduction): New function, split out from
11264         get_initial_defs_for_reduction.
11265         (get_initial_def_for_reduction): Handle option 2 for variable-length
11266         vectors by loading the neutral value into a vector and then shifting
11267         the initial value into element 0.
11268         (get_initial_defs_for_reduction): Replace the code argument with
11269         the neutral value calculated by neutral_op_for_slp_reduction.
11270         Use gimple_build_vector for constant-length vectors.
11271         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
11272         but the first group_size elements have a neutral value.
11273         Use duplicate_and_interleave otherwise.
11274         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
11275         Update call to get_initial_defs_for_reduction.  Handle SLP
11276         reductions for variable-length vectors by creating one vector
11277         result for each scalar result, with the elements associated
11278         with other scalar results stubbed out with the neutral value.
11279         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
11280         Require IFN_VEC_SHL_INSERT for double reductions on
11281         variable-length vectors, or SLP reductions that have
11282         a neutral value.  Require can_duplicate_and_interleave_p
11283         support for variable-length unchained SLP reductions if there
11284         is no neutral value, such as for MIN/MAX reductions.  Also require
11285         the number of vector elements to be a multiple of the number of
11286         SLP statements when doing variable-length unchained SLP reductions.
11287         Update call to vect_create_epilog_for_reduction.
11288         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
11289         and remove initial values.
11290         (duplicate_and_interleave): Make public.
11291         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
11292         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
11294 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11295             Alan Hayward  <alan.hayward@arm.com>
11296             David Sherwood  <david.sherwood@arm.com>
11298         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
11299         (can_duplicate_and_interleave_p): New function.
11300         (vect_get_and_check_slp_defs): Take the vector of statements
11301         rather than just the current one.  Remove excess parentheses.
11302         Restriction rejectinon of vect_constant_def and vect_external_def
11303         for variable-length vectors to boolean types, or types for which
11304         can_duplicate_and_interleave_p is false.
11305         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
11306         (duplicate_and_interleave): New function.
11307         (vect_get_constant_vectors): Use gimple_build_vector for
11308         constant-length vectors and suitable variable-length constant
11309         vectors.  Use duplicate_and_interleave for other variable-length
11310         vectors.  Don't defer the update when inserting new statements.
11312 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11313             Alan Hayward  <alan.hayward@arm.com>
11314             David Sherwood  <david.sherwood@arm.com>
11316         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
11317         min_profitable_iters doesn't go negative.
11319 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11320             Alan Hayward  <alan.hayward@arm.com>
11321             David Sherwood  <david.sherwood@arm.com>
11323         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
11324         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
11325         * optabs.def (vec_mask_load_lanes_optab): New optab.
11326         (vec_mask_store_lanes_optab): Likewise.
11327         * internal-fn.def (MASK_LOAD_LANES): New internal function.
11328         (MASK_STORE_LANES): Likewise.
11329         * internal-fn.c (mask_load_lanes_direct): New macro.
11330         (mask_store_lanes_direct): Likewise.
11331         (expand_mask_load_optab_fn): Handle masked operations.
11332         (expand_mask_load_lanes_optab_fn): New macro.
11333         (expand_mask_store_optab_fn): Handle masked operations.
11334         (expand_mask_store_lanes_optab_fn): New macro.
11335         (direct_mask_load_lanes_optab_supported_p): Likewise.
11336         (direct_mask_store_lanes_optab_supported_p): Likewise.
11337         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
11338         parameter.
11339         (vect_load_lanes_supported): Likewise.
11340         * tree-vect-data-refs.c (strip_conversion): New function.
11341         (can_group_stmts_p): Likewise.
11342         (vect_analyze_data_ref_accesses): Use it instead of checking
11343         for a pair of assignments.
11344         (vect_store_lanes_supported): Take a masked_p parameter.
11345         (vect_load_lanes_supported): Likewise.
11346         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
11347         vect_store_lanes_supported and vect_load_lanes_supported.
11348         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11349         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
11350         parameter.  Don't allow gaps for masked accesses.
11351         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
11352         and vect_load_lanes_supported.
11353         (get_load_store_type): Take a masked_p parameter and update
11354         call to get_group_load_store_type.
11355         (vectorizable_store): Update call to get_load_store_type.
11356         Handle IFN_MASK_STORE_LANES.
11357         (vectorizable_load): Update call to get_load_store_type.
11358         Handle IFN_MASK_LOAD_LANES.
11360 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11361             Alan Hayward  <alan.hayward@arm.com>
11362             David Sherwood  <david.sherwood@arm.com>
11364         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
11365         modes for SVE.
11366         * config/aarch64/aarch64-protos.h
11367         (aarch64_sve_struct_memory_operand_p): Declare.
11368         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
11369         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
11370         (VPRED, vpred): Handle SVE structure modes.
11371         * config/aarch64/constraints.md (Utx): New constraint.
11372         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
11373         (aarch64_sve_struct_nonimmediate_operand): New predicates.
11374         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
11375         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
11376         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
11377         structure modes.  Split into pieces after RA.
11378         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
11379         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
11380         New patterns.
11381         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
11382         SVE structure modes.
11383         (aarch64_classify_address): Likewise.
11384         (sizetochar): Move earlier in file.
11385         (aarch64_print_operand): Handle SVE register lists.
11386         (aarch64_array_mode): New function.
11387         (aarch64_sve_struct_memory_operand_p): Likewise.
11388         (TARGET_ARRAY_MODE): Redefine.
11390 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11391             Alan Hayward  <alan.hayward@arm.com>
11392             David Sherwood  <david.sherwood@arm.com>
11394         * target.def (array_mode): New target hook.
11395         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
11396         * doc/tm.texi: Regenerate.
11397         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
11398         * hooks.c (hook_optmode_mode_uhwi_none): New function.
11399         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
11400         targetm.array_mode.
11401         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
11402         type sizes.
11404 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11405             Alan Hayward  <alan.hayward@arm.com>
11406             David Sherwood  <david.sherwood@arm.com>
11408         * fold-const.c (fold_binary_loc): Check the argument types
11409         rather than the result type when testing for a vector operation.
11411 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11413         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
11414         * doc/tm.texi: Regenerate.
11416 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11417             Alan Hayward  <alan.hayward@arm.com>
11418             David Sherwood  <david.sherwood@arm.com>
11420         * doc/invoke.texi (-msve-vector-bits=): Document new option.
11421         (sve): Document new AArch64 extension.
11422         * doc/md.texi (w): Extend the description of the AArch64
11423         constraint to include SVE vectors.
11424         (Upl, Upa): Document new AArch64 predicate constraints.
11425         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
11426         enum.
11427         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
11428         (msve-vector-bits=): New option.
11429         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
11430         SVE when these are disabled.
11431         (sve): New extension.
11432         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
11433         modes.  Adjust their number of units based on aarch64_sve_vg.
11434         (MAX_BITSIZE_MODE_ANY_MODE): Define.
11435         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
11436         aarch64_addr_query_type.
11437         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
11438         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
11439         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
11440         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
11441         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
11442         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
11443         (aarch64_simd_imm_zero_p): Delete.
11444         (aarch64_check_zero_based_sve_index_immediate): Declare.
11445         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11446         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11447         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11448         (aarch64_sve_float_mul_immediate_p): Likewise.
11449         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11450         rather than an rtx.
11451         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11452         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11453         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11454         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11455         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11456         (aarch64_regmode_natural_size): Likewise.
11457         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11458         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11459         left one place.
11460         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11461         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11462         for VG and the SVE predicate registers.
11463         (V_ALIASES): Add a "z"-prefixed alias.
11464         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11465         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11466         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11467         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11468         (REG_CLASS_NAMES): Add entries for them.
11469         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
11470         and the predicate registers.
11471         (aarch64_sve_vg): Declare.
11472         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11473         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11474         (REGMODE_NATURAL_SIZE): Define.
11475         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11476         SVE macros.
11477         * config/aarch64/aarch64.c: Include cfgrtl.h.
11478         (simd_immediate_info): Add a constructor for series vectors,
11479         and an associated step field.
11480         (aarch64_sve_vg): New variable.
11481         (aarch64_dbx_register_number): Handle VG and the predicate registers.
11482         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11483         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11484         (VEC_ANY_DATA, VEC_STRUCT): New constants.
11485         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11486         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11487         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11488         (aarch64_get_mask_mode): New functions.
11489         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11490         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11491         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
11492         predicate modes and predicate registers.  Explicitly restrict
11493         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
11494         to store a vector mode if it is recognized by
11495         aarch64_classify_vector_mode.
11496         (aarch64_regmode_natural_size): New function.
11497         (aarch64_hard_regno_caller_save_mode): Return the original mode
11498         for predicates.
11499         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
11500         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
11501         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
11502         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
11503         functions.
11504         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
11505         does not overlap dest if the function is frame-related.  Handle
11506         SVE constants.
11507         (aarch64_split_add_offset): New function.
11508         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
11509         them aarch64_add_offset.
11510         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
11511         and update call to aarch64_sub_sp.
11512         (aarch64_add_cfa_expression): New function.
11513         (aarch64_expand_prologue): Pass extra temporary registers to the
11514         functions above.  Handle the case in which we need to emit new
11515         DW_CFA_expressions for registers that were originally saved
11516         relative to the stack pointer, but now have to be expressed
11517         relative to the frame pointer.
11518         (aarch64_output_mi_thunk): Pass extra temporary registers to the
11519         functions above.
11520         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
11521         IP0 and IP1 values for SVE frames.
11522         (aarch64_expand_vec_series): New function.
11523         (aarch64_expand_sve_widened_duplicate): Likewise.
11524         (aarch64_expand_sve_const_vector): Likewise.
11525         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
11526         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
11527         into the register, rather than emitting a SET directly.
11528         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
11529         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
11530         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
11531         (offset_9bit_signed_scaled_p): New functions.
11532         (aarch64_replicate_bitmask_imm): New function.
11533         (aarch64_bitmask_imm): Use it.
11534         (aarch64_cannot_force_const_mem): Reject expressions involving
11535         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
11536         (aarch64_classify_index): Handle SVE indices, by requiring
11537         a plain register index with a scale that matches the element size.
11538         (aarch64_classify_address): Handle SVE addresses.  Assert that
11539         the mode of the address is VOIDmode or an integer mode.
11540         Update call to aarch64_classify_symbol.
11541         (aarch64_classify_symbolic_expression): Update call to
11542         aarch64_classify_symbol.
11543         (aarch64_const_vec_all_in_range_p): New function.
11544         (aarch64_print_vector_float_operand): Likewise.
11545         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
11546         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
11547         and the FP immediates 1.0 and 0.5.
11548         (aarch64_print_address_internal): Handle SVE addresses.
11549         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
11550         (aarch64_regno_regclass): Handle predicate registers.
11551         (aarch64_secondary_reload): Handle big-endian reloads of SVE
11552         data modes.
11553         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
11554         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
11555         (aarch64_convert_sve_vector_bits): New function.
11556         (aarch64_override_options): Use it to handle -msve-vector-bits=.
11557         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11558         rather than an rtx.
11559         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
11560         Handle SVE vector and predicate modes.  Accept VL-based constants
11561         that need only one temporary register, and VL offsets that require
11562         no temporary registers.
11563         (aarch64_conditional_register_usage): Mark the predicate registers
11564         as fixed if SVE isn't available.
11565         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11566         Return true for SVE vector and predicate modes.
11567         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11568         rather than an unsigned int.  Handle SVE modes.
11569         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
11570         SVE modes.
11571         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11572         if SVE is enabled.
11573         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11574         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11575         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11576         (aarch64_sve_float_mul_immediate_p): New functions.
11577         (aarch64_sve_valid_immediate): New function.
11578         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11579         Explicitly reject structure modes.  Check for INDEX constants.
11580         Handle PTRUE and PFALSE constants.
11581         (aarch64_check_zero_based_sve_index_immediate): New function.
11582         (aarch64_simd_imm_zero_p): Delete.
11583         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11584         vector modes.  Accept constants in the range of CNT[BHWD].
11585         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11586         ask for an Advanced SIMD mode.
11587         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11588         (aarch64_simd_vector_alignment): Handle SVE predicates.
11589         (aarch64_vectorize_preferred_vector_alignment): New function.
11590         (aarch64_simd_vector_alignment_reachable): Use it instead of
11591         the vector size.
11592         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11593         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11594         functions.
11595         (MAX_VECT_LEN): Delete.
11596         (expand_vec_perm_d): Add a vec_flags field.
11597         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11598         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11599         (aarch64_evpc_ext): Don't apply a big-endian lane correction
11600         for SVE modes.
11601         (aarch64_evpc_rev): Rename to...
11602         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
11603         (aarch64_evpc_rev_global): New function.
11604         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11605         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11606         MAX_VECT_LEN.
11607         (aarch64_evpc_sve_tbl): New function.
11608         (aarch64_expand_vec_perm_const_1): Update after rename of
11609         aarch64_evpc_rev.  Handle SVE permutes too, trying
11610         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11611         than aarch64_evpc_tbl.
11612         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11613         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11614         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11615         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11616         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11617         (aarch64_expand_sve_vcond): New functions.
11618         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11619         of aarch64_vector_mode_p.
11620         (aarch64_dwarf_poly_indeterminate_value): New function.
11621         (aarch64_compute_pressure_classes): Likewise.
11622         (aarch64_can_change_mode_class): Likewise.
11623         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11624         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11625         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11626         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11627         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11628         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11629         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11630         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11631         constraints.
11632         (Dn, Dl, Dr): Accept const as well as const_vector.
11633         (Dz): Likewise.  Compare against CONST0_RTX.
11634         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11635         of "vector" where appropriate.
11636         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11637         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11638         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11639         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11640         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11641         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11642         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11643         (v_int_equiv): Extend to SVE modes.
11644         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11645         mode attributes.
11646         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11647         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11648         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11649         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11650         (SVE_COND_FP_CMP): New int iterators.
11651         (perm_hilo): Handle the new unpack unspecs.
11652         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11653         attributes.
11654         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11655         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11656         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11657         (aarch64_equality_operator, aarch64_constant_vector_operand)
11658         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11659         (aarch64_sve_nonimmediate_operand): Likewise.
11660         (aarch64_sve_general_operand): Likewise.
11661         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11662         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11663         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11664         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11665         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11666         (aarch64_sve_float_arith_immediate): Likewise.
11667         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11668         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11669         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11670         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11671         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11672         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11673         (aarch64_sve_float_arith_operand): Likewise.
11674         (aarch64_sve_float_arith_with_sub_operand): Likewise.
11675         (aarch64_sve_float_mul_operand): Likewise.
11676         (aarch64_sve_vec_perm_operand): Likewise.
11677         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11678         (aarch64_mov_operand): Accept const_poly_int and const_vector.
11679         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11680         as well as const_vector.
11681         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11682         in file.  Use CONST0_RTX and CONSTM1_RTX.
11683         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11684         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11685         Use aarch64_simd_imm_zero.
11686         * config/aarch64/aarch64-sve.md: New file.
11687         * config/aarch64/aarch64.md: Include it.
11688         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11689         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11690         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11691         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11692         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11693         (sve): New attribute.
11694         (enabled): Disable instructions with the sve attribute unless
11695         TARGET_SVE.
11696         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11697         aarch64_expand_mov_immediate.
11698         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11699         CNT[BHSD] immediates.
11700         (movti): Split CONST_POLY_INT moves into two halves.
11701         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11702         Split additions that need a temporary here if the destination
11703         is the stack pointer.
11704         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11705         (*add<mode>3_poly_1): New instruction.
11706         (set_clobber_cc): New expander.
11708 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11710         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11711         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11712         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11713         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11714         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11715         Change innermode from fixed_mode_size to machine_mode.
11716         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11717         subreg of a variable-length CONST_VECTOR.
11719 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11720             Alan Hayward  <alan.hayward@arm.com>
11721             David Sherwood  <david.sherwood@arm.com>
11723         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11724         (add_offset_to_base): New function, split out from...
11725         (create_mem_ref): ...here.  When handling a scale other than 1,
11726         check first whether the address is valid without the offset.
11727         Add it into the base if so, leaving the index and scale as-is.
11729 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11731         PR c++/83778
11732         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11733         fold_for_warn before checking if arg2 is INTEGER_CST.
11735 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11737         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11738         (store_multiple_operation): Delete.
11739         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11740         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11741         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11742         guarded by TARGET_STRING.
11743         (rs6000_output_load_multiple): Delete.
11744         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11745         OPTION_MASK_STRING / TARGET_STRING handling.
11746         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11747         (const rs6000_opt_masks) <"string">: Change mask to 0.
11748         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11749         (MASK_STRING): Delete.
11750         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11751         parts.  Simplify.
11752         (load_multiple): Delete.
11753         (*ldmsi8): Delete.
11754         (*ldmsi7): Delete.
11755         (*ldmsi6): Delete.
11756         (*ldmsi5): Delete.
11757         (*ldmsi4): Delete.
11758         (*ldmsi3): Delete.
11759         (store_multiple): Delete.
11760         (*stmsi8): Delete.
11761         (*stmsi7): Delete.
11762         (*stmsi6): Delete.
11763         (*stmsi5): Delete.
11764         (*stmsi4): Delete.
11765         (*stmsi3): Delete.
11766         (movmemsi_8reg): Delete.
11767         (corresponding unnamed define_insn): Delete.
11768         (movmemsi_6reg): Delete.
11769         (corresponding unnamed define_insn): Delete.
11770         (movmemsi_4reg): Delete.
11771         (corresponding unnamed define_insn): Delete.
11772         (movmemsi_2reg): Delete.
11773         (corresponding unnamed define_insn): Delete.
11774         (movmemsi_1reg): Delete.
11775         (corresponding unnamed define_insn): Delete.
11776         * config/rs6000/rs6000.opt (mno-string): New.
11777         (mstring): Replace by deprecation warning stub.
11778         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11780 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11782         * regrename.c (regrename_do_replace): If replacing the same
11783         reg multiple times, try to reuse last created gen_raw_REG.
11785         PR debug/81155
11786         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11787         main to workaround a bug in GDB.
11789 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11791         PR target/83737
11792         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11794 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11796         PR rtl-optimization/80481
11797         * ira-color.c (get_cap_member): New function.
11798         (allocnos_conflict_by_live_ranges_p): Use it.
11799         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11800         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11802 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11804         PR target/83628
11805         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11806         (*saddl_se_1): Ditto.
11807         (*ssubsi_1): Ditto.
11808         (*ssubl_se_1): Ditto.
11810 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11812         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11813         rather than wi::to_widest for DR_INITs.
11814         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11815         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11816         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11817         INTEGER_CSTs.
11818         (vect_analyze_group_access_1): Note that here.
11820 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11822         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11823         polynomial type sizes.
11825 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11827         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11828         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11829         (gimple_add_tmp_var): Likewise.
11831 2018-01-12  Martin Liska  <mliska@suse.cz>
11833         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11834         (gimple_alloc_sizes): Likewise.
11835         (dump_gimple_statistics): Use PRIu64 in printf format.
11836         * gimple.h: Change uint64_t to int.
11838 2018-01-12  Martin Liska  <mliska@suse.cz>
11840         * tree-core.h: Use uint64_t instead of int.
11841         * tree.c (tree_node_counts): Likewise.
11842         (tree_node_sizes): Likewise.
11843         (dump_tree_statistics): Use PRIu64 in printf format.
11845 2018-01-12  Martin Liska  <mliska@suse.cz>
11847         * Makefile.in: As qsort_chk is implemented in vec.c, add
11848         vec.o to linkage of gencfn-macros.
11849         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11850         passing the info to record_node_allocation_statistics.
11851         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11852         and pass the info.
11853         * ggc-common.c (struct ggc_usage): Add operator== and use
11854         it in operator< and compare function.
11855         * mem-stats.h (struct mem_usage): Likewise.
11856         * vec.c (struct vec_usage): Remove operator< and compare
11857         function. Can be simply inherited.
11859 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11861         PR target/81616
11862         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11863         * tree-ssa-math-opts.c: Include domwalk.h.
11864         (convert_mult_to_fma_1): New function.
11865         (fma_transformation_info): New type.
11866         (fma_deferring_state): Likewise.
11867         (cancel_fma_deferring): New function.
11868         (result_of_phi): Likewise.
11869         (last_fma_candidate_feeds_initial_phi): Likewise.
11870         (convert_mult_to_fma): Added deferring logic, split actual
11871         transformation to convert_mult_to_fma_1.
11872         (math_opts_dom_walker): New type.
11873         (math_opts_dom_walker::after_dom_children): New method, body moved
11874         here from pass_optimize_widening_mul::execute, added deferring logic
11875         bits.
11876         (pass_optimize_widening_mul::execute): Moved most of code to
11877         math_opts_dom_walker::after_dom_children.
11878         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11879         * config/i386/i386.c (ix86_option_override_internal): Added
11880         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11882 2018-01-12  Richard Biener  <rguenther@suse.de>
11884         PR debug/83157
11885         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11886         inline instance vars.
11888 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11890         PR target/81819
11891         * config/rx/rx.c (rx_is_restricted_memory_address):
11892         Handle SUBREG case.
11894 2018-01-12  Richard Biener  <rguenther@suse.de>
11896         PR tree-optimization/80846
11897         * target.def (split_reduction): New target hook.
11898         * targhooks.c (default_split_reduction): New function.
11899         * targhooks.h (default_split_reduction): Declare.
11900         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11901         target requests first reduce vectors by combining low and high
11902         parts.
11903         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11904         (get_vectype_for_scalar_type_and_size): Export.
11905         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11906         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11907         * doc/tm.texi: Regenerate.
11908         * config/i386/i386.c (ix86_split_reduction): Implement
11909         TARGET_VECTORIZE_SPLIT_REDUCTION.
11911 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11913         PR target/83368
11914         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11915         in PIC mode except for TARGET_VXWORKS_RTP.
11916         * config/sparc/sparc.c: Include cfgrtl.h.
11917         (TARGET_INIT_PIC_REG): Define.
11918         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11919         (sparc_pic_register_p): New predicate.
11920         (sparc_legitimate_address_p): Use it.
11921         (sparc_legitimize_pic_address): Likewise.
11922         (sparc_delegitimize_address): Likewise.
11923         (sparc_mode_dependent_address_p): Likewise.
11924         (gen_load_pcrel_sym): Remove 4th parameter.
11925         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11926         (sparc_expand_prologue): Do not call load_got_register here.
11927         (sparc_flat_expand_prologue): Likewise.
11928         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11929         (sparc_use_pseudo_pic_reg): New function.
11930         (sparc_init_pic_reg): Likewise.
11931         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11932         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11934 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11936         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11937         Add item for branch_cost.
11939 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11941         PR rtl-optimization/83565
11942         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11943         not extend the result to a larger mode for rotate operations.
11944         (num_sign_bit_copies1): Likewise.
11946 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11948         PR target/40411
11949         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11950         -symbolic.
11951         Use values-Xc.o for -pedantic.
11952         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11954 2018-01-12  Martin Liska  <mliska@suse.cz>
11956         PR ipa/83054
11957         * ipa-devirt.c (final_warning_record::grow_type_warnings):
11958         New function.
11959         (possible_polymorphic_call_targets): Use it.
11960         (ipa_devirt): Likewise.
11962 2018-01-12  Martin Liska  <mliska@suse.cz>
11964         * profile-count.h (enum profile_quality): Use 0 as invalid
11965         enum value of profile_quality.
11967 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11969         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11970         -mext-string options.
11972 2018-01-12  Richard Biener  <rguenther@suse.de>
11974         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11975         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11976         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11977         Likewise.
11978         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11980 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11982         * configure.ac (--with-long-double-format): Add support for the
11983         configuration option to change the default long double format on
11984         PowerPC systems.
11985         * config.gcc (powerpc*-linux*-*): Likewise.
11986         * configure: Regenerate.
11987         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11988         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11989         used without modification.
11991 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11993         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11994         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11995         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11996         MISC_BUILTIN_SPEC_BARRIER.
11997         (rs6000_init_builtins): Likewise.
11998         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11999         enum value.
12000         (speculation_barrier): New define_insn.
12001         * doc/extend.texi: Document __builtin_speculation_barrier.
12003 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
12005         PR target/83203
12006         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
12007         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
12008         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
12009         iterators.
12010         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
12011         integral modes instead of "ss" and "sd".
12012         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
12013         vectors with 32-bit and 64-bit elements.
12014         (vecdupssescalarmodesuffix): New mode attribute.
12015         (vec_dup<mode>): Use it.
12017 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
12019         PR target/83330
12020         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
12021         frame if argument is passed on stack.
12023 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
12025         PR target/82682
12026         * ree.c (combine_reaching_defs): Optimize also
12027         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
12028         reg2=any_extend(exp); reg1=reg2;, formatting fix.
12030 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
12032         PR middle-end/83189
12033         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
12035 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
12037         PR middle-end/83718
12038         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
12039         after they are computed.
12041 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
12043         PR tree-optimization/83695
12044         * gimple-loop-linterchange.cc
12045         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
12046         reset cached scev information after interchange.
12047         (pass_linterchange::execute): Remove call to scev_reset_htab.
12049 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12051         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
12052         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
12053         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
12054         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
12055         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
12056         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
12057         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
12058         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
12059         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
12060         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
12061         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
12062         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
12063         (V_lane_reg): Likewise.
12064         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
12065         New define_expand.
12066         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
12067         (vfmal_lane_low<mode>_intrinsic,
12068         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
12069         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
12070         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
12071         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
12072         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
12073         vfmsl_lane_high<mode>_intrinsic): New define_insns.
12075 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12077         * config/arm/arm-cpus.in (fp16fml): New feature.
12078         (ALL_SIMD): Add fp16fml.
12079         (armv8.2-a): Add fp16fml as an option.
12080         (armv8.3-a): Likewise.
12081         (armv8.4-a): Add fp16fml as part of fp16.
12082         * config/arm/arm.h (TARGET_FP16FML): Define.
12083         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
12084         when appropriate.
12085         * config/arm/arm-modes.def (V2HF): Define.
12086         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
12087         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
12088         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
12089         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
12090         vfmsl_low, vfmsl_high): New set of builtins.
12091         * config/arm/iterators.md (PLUSMINUS): New code iterator.
12092         (vfml_op): New code attribute.
12093         (VFMLHALVES): New int iterator.
12094         (VFML, VFMLSEL): New mode attributes.
12095         (V_reg): Define mapping for V2HF.
12096         (V_hi, V_lo): New mode attributes.
12097         (VF_constraint): Likewise.
12098         (vfml_half, vfml_half_selector): New int attributes.
12099         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
12100         define_expand.
12101         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
12102         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
12103         New define_insn.
12104         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
12105         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
12106         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
12107         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
12108         documentation.
12109         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
12110         Document new effective target and option set.
12112 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12114         * config/arm/arm-cpus.in (armv8_4): New feature.
12115         (ARMv8_4a): New fgroup.
12116         (armv8.4-a): New arch.
12117         * config/arm/arm-tables.opt: Regenerate.
12118         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
12119         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
12120         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
12121         Add matching rules for -march=armv8.4-a and extensions.
12122         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
12124 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
12126         PR target/81821
12127         * config/rx/rx.md (BW): New mode attribute.
12128         (sync_lock_test_and_setsi): Add mode suffix to insn output.
12130 2018-01-11  Richard Biener  <rguenther@suse.de>
12132         PR tree-optimization/83435
12133         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
12134         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
12135         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
12137 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12138             Alan Hayward  <alan.hayward@arm.com>
12139             David Sherwood  <david.sherwood@arm.com>
12141         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
12142         field.
12143         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
12144         (aarch64_print_address_internal): Use it to check for a zero offset.
12146 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12147             Alan Hayward  <alan.hayward@arm.com>
12148             David Sherwood  <david.sherwood@arm.com>
12150         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
12151         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
12152         Return a poly_int64 rather than a HOST_WIDE_INT.
12153         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
12154         rather than a HOST_WIDE_INT.
12155         * config/aarch64/aarch64.h (aarch64_frame): Protect with
12156         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
12157         hard_fp_offset, frame_size, initial_adjust, callee_offset and
12158         final_offset from HOST_WIDE_INT to poly_int64.
12159         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
12160         to_constant when getting the number of units in an Advanced SIMD
12161         mode.
12162         (aarch64_builtin_vectorized_function): Check for a constant number
12163         of units.
12164         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
12165         GET_MODE_SIZE.
12166         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
12167         attribute instead of GET_MODE_NUNITS.
12168         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
12169         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
12170         GET_MODE_SIZE for fixed-size registers.
12171         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
12172         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
12173         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
12174         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
12175         (aarch64_print_operand, aarch64_print_address_internal)
12176         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
12177         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
12178         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
12179         Handle polynomial GET_MODE_SIZE.
12180         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
12181         wider than SImode without modification.
12182         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
12183         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
12184         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
12185         passing and returning SVE modes.
12186         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
12187         rather than GEN_INT.
12188         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
12189         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
12190         (aarch64_allocate_and_probe_stack_space): Likewise.
12191         (aarch64_layout_frame): Cope with polynomial offsets.
12192         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
12193         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
12194         polynomial offsets.
12195         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
12196         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
12197         poly_int64 rather than a HOST_WIDE_INT.
12198         (aarch64_get_separate_components, aarch64_process_components)
12199         (aarch64_expand_prologue, aarch64_expand_epilogue)
12200         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
12201         (aarch64_anchor_offset): New function, split out from...
12202         (aarch64_legitimize_address): ...here.
12203         (aarch64_builtin_vectorization_cost): Handle polynomial
12204         TYPE_VECTOR_SUBPARTS.
12205         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
12206         GET_MODE_NUNITS.
12207         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
12208         number of elements from the PARALLEL rather than the mode.
12209         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
12210         rather than GET_MODE_BITSIZE.
12211         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
12212         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
12213         (aarch64_expand_vec_perm_const_1): Handle polynomial
12214         d->perm.length () and d->perm elements.
12215         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
12216         Apply to_constant to d->perm elements.
12217         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
12218         polynomial CONST_VECTOR_NUNITS.
12219         (aarch64_move_pointer): Take amount as a poly_int64 rather
12220         than an int.
12221         (aarch64_progress_pointer): Avoid temporary variable.
12222         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
12223         the mode attribute instead of GET_MODE.
12225 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12226             Alan Hayward  <alan.hayward@arm.com>
12227             David Sherwood  <david.sherwood@arm.com>
12229         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
12230         x exists before using it.
12231         (aarch64_add_constant_internal): Rename to...
12232         (aarch64_add_offset_1): ...this.  Replace regnum with separate
12233         src and dest rtxes.  Handle the case in which they're different,
12234         including when the offset is zero.  Replace scratchreg with an rtx.
12235         Use 2 additions if there is no spare register into which we can
12236         move a 16-bit constant.
12237         (aarch64_add_constant): Delete.
12238         (aarch64_add_offset): Replace reg with separate src and dest
12239         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
12240         Use aarch64_add_offset_1.
12241         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
12242         an rtx rather than an int.  Take the delta as a poly_int64
12243         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
12244         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
12245         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
12246         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
12247         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
12248         and aarch64_add_sp.
12249         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
12250         aarch64_add_constant.
12252 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12254         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
12255         Use scalar_float_mode.
12257 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12259         * config/aarch64/aarch64-simd.md
12260         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
12261         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
12262         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
12263         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
12264         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
12265         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
12266         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
12267         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
12268         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
12269         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
12271 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12273         PR target/83514
12274         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
12275         targ_options->x_arm_arch_string is non NULL.
12277 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
12279         * config/aarch64/aarch64.h
12280         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
12282 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
12284         PR target/82096
12285         * expmed.c (emit_store_flag_force): Swap if const op0
12286         and change VOIDmode to mode of op0.
12288 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12290         PR rtl-optimization/83761
12291         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
12292         than bytes to mode_for_size.
12294 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12296         PR middle-end/83189
12297         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
12298         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
12299         profile.
12301 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12303         PR middle-end/83575
12304         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
12305         when in layout mode.
12306         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
12307         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
12308         partition fixup.
12310 2018-01-10  Michael Collison  <michael.collison@arm.com>
12312         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
12313         * config/aarch64/aarch64-option-extension.def: Add
12314         AARCH64_OPT_EXTENSION of 'fp16fml'.
12315         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12316         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
12317         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
12318         * config/aarch64/constraints.md (Ui7): New constraint.
12319         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
12320         (VFMLA_SEL_W): Ditto.
12321         (f16quad): Ditto.
12322         (f16mac1): Ditto.
12323         (VFMLA16_LOW): New int iterator.
12324         (VFMLA16_HIGH): Ditto.
12325         (UNSPEC_FMLAL): New unspec.
12326         (UNSPEC_FMLSL): Ditto.
12327         (UNSPEC_FMLAL2): Ditto.
12328         (UNSPEC_FMLSL2): Ditto.
12329         (f16mac): New code attribute.
12330         * config/aarch64/aarch64-simd-builtins.def
12331         (aarch64_fmlal_lowv2sf): Ditto.
12332         (aarch64_fmlsl_lowv2sf): Ditto.
12333         (aarch64_fmlalq_lowv4sf): Ditto.
12334         (aarch64_fmlslq_lowv4sf): Ditto.
12335         (aarch64_fmlal_highv2sf): Ditto.
12336         (aarch64_fmlsl_highv2sf): Ditto.
12337         (aarch64_fmlalq_highv4sf): Ditto.
12338         (aarch64_fmlslq_highv4sf): Ditto.
12339         (aarch64_fmlal_lane_lowv2sf): Ditto.
12340         (aarch64_fmlsl_lane_lowv2sf): Ditto.
12341         (aarch64_fmlal_laneq_lowv2sf): Ditto.
12342         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
12343         (aarch64_fmlalq_lane_lowv4sf): Ditto.
12344         (aarch64_fmlsl_lane_lowv4sf): Ditto.
12345         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
12346         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
12347         (aarch64_fmlal_lane_highv2sf): Ditto.
12348         (aarch64_fmlsl_lane_highv2sf): Ditto.
12349         (aarch64_fmlal_laneq_highv2sf): Ditto.
12350         (aarch64_fmlsl_laneq_highv2sf): Ditto.
12351         (aarch64_fmlalq_lane_highv4sf): Ditto.
12352         (aarch64_fmlsl_lane_highv4sf): Ditto.
12353         (aarch64_fmlalq_laneq_highv4sf): Ditto.
12354         (aarch64_fmlsl_laneq_highv4sf): Ditto.
12355         * config/aarch64/aarch64-simd.md:
12356         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
12357         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12358         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
12359         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12360         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
12361         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
12362         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
12363         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
12364         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
12365         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
12366         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
12367         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
12368         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
12369         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
12370         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
12371         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
12372         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
12373         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
12374         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
12375         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
12376         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
12377         (vfmlsl_low_u32): Ditto.
12378         (vfmlalq_low_u32): Ditto.
12379         (vfmlslq_low_u32): Ditto.
12380         (vfmlal_high_u32): Ditto.
12381         (vfmlsl_high_u32): Ditto.
12382         (vfmlalq_high_u32): Ditto.
12383         (vfmlslq_high_u32): Ditto.
12384         (vfmlal_lane_low_u32): Ditto.
12385         (vfmlsl_lane_low_u32): Ditto.
12386         (vfmlal_laneq_low_u32): Ditto.
12387         (vfmlsl_laneq_low_u32): Ditto.
12388         (vfmlalq_lane_low_u32): Ditto.
12389         (vfmlslq_lane_low_u32): Ditto.
12390         (vfmlalq_laneq_low_u32): Ditto.
12391         (vfmlslq_laneq_low_u32): Ditto.
12392         (vfmlal_lane_high_u32): Ditto.
12393         (vfmlsl_lane_high_u32): Ditto.
12394         (vfmlal_laneq_high_u32): Ditto.
12395         (vfmlsl_laneq_high_u32): Ditto.
12396         (vfmlalq_lane_high_u32): Ditto.
12397         (vfmlslq_lane_high_u32): Ditto.
12398         (vfmlalq_laneq_high_u32): Ditto.
12399         (vfmlslq_laneq_high_u32): Ditto.
12400         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
12401         (AARCH64_FL_FOR_ARCH8_4): New.
12402         (AARCH64_ISA_F16FML): New ISA flag.
12403         (TARGET_F16FML): New feature flag for fp16fml.
12404         (doc/invoke.texi): Document new fp16fml option.
12406 2018-01-10  Michael Collison  <michael.collison@arm.com>
12408         * config/aarch64/aarch64-builtins.c:
12409         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
12410         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12411         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
12412         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
12413         (AARCH64_ISA_SHA3): New ISA flag.
12414         (TARGET_SHA3): New feature flag for sha3.
12415         * config/aarch64/iterators.md (sha512_op): New int attribute.
12416         (CRYPTO_SHA512): New int iterator.
12417         (UNSPEC_SHA512H): New unspec.
12418         (UNSPEC_SHA512H2): Ditto.
12419         (UNSPEC_SHA512SU0): Ditto.
12420         (UNSPEC_SHA512SU1): Ditto.
12421         * config/aarch64/aarch64-simd-builtins.def
12422         (aarch64_crypto_sha512hqv2di): New builtin.
12423         (aarch64_crypto_sha512h2qv2di): Ditto.
12424         (aarch64_crypto_sha512su0qv2di): Ditto.
12425         (aarch64_crypto_sha512su1qv2di): Ditto.
12426         (aarch64_eor3qv8hi): Ditto.
12427         (aarch64_rax1qv2di): Ditto.
12428         (aarch64_xarqv2di): Ditto.
12429         (aarch64_bcaxqv8hi): Ditto.
12430         * config/aarch64/aarch64-simd.md:
12431         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
12432         (aarch64_crypto_sha512su0qv2di): Ditto.
12433         (aarch64_crypto_sha512su1qv2di): Ditto.
12434         (aarch64_eor3qv8hi): Ditto.
12435         (aarch64_rax1qv2di): Ditto.
12436         (aarch64_xarqv2di): Ditto.
12437         (aarch64_bcaxqv8hi): Ditto.
12438         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
12439         (vsha512h2q_u64): Ditto.
12440         (vsha512su0q_u64): Ditto.
12441         (vsha512su1q_u64): Ditto.
12442         (veor3q_u16): Ditto.
12443         (vrax1q_u64): Ditto.
12444         (vxarq_u64): Ditto.
12445         (vbcaxq_u16): Ditto.
12446         * config/arm/types.md (crypto_sha512): New type attribute.
12447         (crypto_sha3): Ditto.
12448         (doc/invoke.texi): Document new sha3 option.
12450 2018-01-10  Michael Collison  <michael.collison@arm.com>
12452         * config/aarch64/aarch64-builtins.c:
12453         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12454         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12455         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12456         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12457         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12458         (AARCH64_ISA_SM4): New ISA flag.
12459         (TARGET_SM4): New feature flag for sm4.
12460         * config/aarch64/aarch64-simd-builtins.def
12461         (aarch64_sm3ss1qv4si): Ditto.
12462         (aarch64_sm3tt1aq4si): Ditto.
12463         (aarch64_sm3tt1bq4si): Ditto.
12464         (aarch64_sm3tt2aq4si): Ditto.
12465         (aarch64_sm3tt2bq4si): Ditto.
12466         (aarch64_sm3partw1qv4si): Ditto.
12467         (aarch64_sm3partw2qv4si): Ditto.
12468         (aarch64_sm4eqv4si): Ditto.
12469         (aarch64_sm4ekeyqv4si): Ditto.
12470         * config/aarch64/aarch64-simd.md:
12471         (aarch64_sm3ss1qv4si): Ditto.
12472         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12473         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12474         (aarch64_sm4eqv4si): Ditto.
12475         (aarch64_sm4ekeyqv4si): Ditto.
12476         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12477         (sm3part_op): Ditto.
12478         (CRYPTO_SM3TT): Ditto.
12479         (CRYPTO_SM3PART): Ditto.
12480         (UNSPEC_SM3SS1): New unspec.
12481         (UNSPEC_SM3TT1A): Ditto.
12482         (UNSPEC_SM3TT1B): Ditto.
12483         (UNSPEC_SM3TT2A): Ditto.
12484         (UNSPEC_SM3TT2B): Ditto.
12485         (UNSPEC_SM3PARTW1): Ditto.
12486         (UNSPEC_SM3PARTW2): Ditto.
12487         (UNSPEC_SM4E): Ditto.
12488         (UNSPEC_SM4EKEY): Ditto.
12489         * config/aarch64/constraints.md (Ui2): New constraint.
12490         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12491         * config/arm/types.md (crypto_sm3): New type attribute.
12492         (crypto_sm4): Ditto.
12493         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12494         (vsm3tt1aq_u32): Ditto.
12495         (vsm3tt1bq_u32): Ditto.
12496         (vsm3tt2aq_u32): Ditto.
12497         (vsm3tt2bq_u32): Ditto.
12498         (vsm3partw1q_u32): Ditto.
12499         (vsm3partw2q_u32): Ditto.
12500         (vsm4eq_u32): Ditto.
12501         (vsm4ekeyq_u32): Ditto.
12502         (doc/invoke.texi): Document new sm4 option.
12504 2018-01-10  Michael Collison  <michael.collison@arm.com>
12506         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
12507         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
12508         (AARCH64_FL_FOR_ARCH8_4): New.
12509         (AARCH64_FL_V8_4): New flag.
12510         (doc/invoke.texi): Document new armv8.4-a option.
12512 2018-01-10  Michael Collison  <michael.collison@arm.com>
12514         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12515         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
12516         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
12517         * config/aarch64/aarch64-option-extension.def: Add
12518         AARCH64_OPT_EXTENSION of 'sha2'.
12519         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
12520         (crypto): Disable sha2 and aes if crypto disabled.
12521         (crypto): Enable aes and sha2 if enabled.
12522         (simd): Disable sha2 and aes if simd disabled.
12523         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
12524         New flags.
12525         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
12526         (TARGET_SHA2): New feature flag for sha2.
12527         (TARGET_AES): New feature flag for aes.
12528         * config/aarch64/aarch64-simd.md:
12529         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
12530         conditional on TARGET_AES.
12531         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
12532         (aarch64_crypto_sha1hsi): Make pattern conditional
12533         on TARGET_SHA2.
12534         (aarch64_crypto_sha1hv4si): Ditto.
12535         (aarch64_be_crypto_sha1hv4si): Ditto.
12536         (aarch64_crypto_sha1su1v4si): Ditto.
12537         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
12538         (aarch64_crypto_sha1su0v4si): Ditto.
12539         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
12540         (aarch64_crypto_sha256su0v4si): Ditto.
12541         (aarch64_crypto_sha256su1v4si): Ditto.
12542         (doc/invoke.texi): Document new aes and sha2 options.
12544 2018-01-10  Martin Sebor  <msebor@redhat.com>
12546         PR tree-optimization/83781
12547         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
12548         as string arrays.
12550 2018-01-11  Martin Sebor  <msebor@gmail.com>
12551             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12553         PR tree-optimization/83501
12554         PR tree-optimization/81703
12556         * tree-ssa-strlen.c (get_string_cst): Rename...
12557         (get_string_len): ...to this.  Handle global constants.
12558         (handle_char_store): Adjust.
12560 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
12561             Jim Wilson  <jimw@sifive.com>
12563         * config/riscv/riscv-protos.h (riscv_output_return): New.
12564         * config/riscv/riscv.c (struct machine_function): New naked_p field.
12565         (riscv_attribute_table, riscv_output_return),
12566         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12567         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12568         (riscv_compute_frame_info): Only compute frame->mask if not a naked
12569         function.
12570         (riscv_expand_prologue): Add early return for naked function.
12571         (riscv_expand_epilogue): Likewise.
12572         (riscv_function_ok_for_sibcall): Return false for naked function.
12573         (riscv_set_current_function): New.
12574         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12575         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12576         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12577         * doc/extend.texi (RISC-V Function Attributes): New.
12579 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12581         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12582         check for 128-bit long double before checking TCmode.
12583         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12584         128-bit long doubles before checking TFmode or TCmode.
12585         (FLOAT128_IBM_P): Likewise.
12587 2018-01-10  Martin Sebor  <msebor@redhat.com>
12589         PR tree-optimization/83671
12590         * builtins.c (c_strlen): Unconditionally return zero for the empty
12591         string.
12592         Use -Warray-bounds for warnings.
12593         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12594         for non-constant array indices with COMPONENT_REF, arrays of
12595         arrays, and pointers to arrays.
12596         (gimple_fold_builtin_strlen): Determine and set length range for
12597         non-constant character arrays.
12599 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
12601         PR middle-end/81897
12602         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12603         empty blocks.
12605 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
12607         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12609 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12611         PR target/83399
12612         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12613         VECTOR_MEM_ALTIVEC_OR_VSX_P.
12614         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12615         indexed_or_indirect_operand predicate.
12616         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12617         (*vsx_le_perm_load_v8hi): Likewise.
12618         (*vsx_le_perm_load_v16qi): Likewise.
12619         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12620         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12621         (*vsx_le_perm_store_v8hi): Likewise.
12622         (*vsx_le_perm_store_v16qi): Likewise.
12623         (eight unnamed splitters): Likewise.
12625 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12627         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12628         * config/rs6000/emmintrin.h: Likewise.
12629         * config/rs6000/mmintrin.h: Likewise.
12630         * config/rs6000/xmmintrin.h: Likewise.
12632 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
12634         PR c++/43486
12635         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12636         "public_flag".
12637         * tree.c (tree_nop_conversion): Return true for location wrapper
12638         nodes.
12639         (maybe_wrap_with_location): New function.
12640         (selftest::check_strip_nops): New function.
12641         (selftest::test_location_wrappers): New function.
12642         (selftest::tree_c_tests): Call it.
12643         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12644         (maybe_wrap_with_location): New decl.
12645         (EXPR_LOCATION_WRAPPER_P): New macro.
12646         (location_wrapper_p): New inline function.
12647         (tree_strip_any_location_wrapper): New inline function.
12649 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
12651         PR target/83735
12652         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12653         stack_realign_offset for the largest alignment of stack slot
12654         actually used.
12655         (ix86_find_max_used_stack_alignment): New function.
12656         (ix86_finalize_stack_frame_flags): Use it.  Set
12657         max_used_stack_alignment if we don't realign stack.
12658         * config/i386/i386.h (machine_function): Add
12659         max_used_stack_alignment.
12661 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
12663         * config/arm/arm.opt (-mbranch-cost): New option.
12664         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12665         account.
12667 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
12669         PR target/83629
12670         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12671         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12673 2018-01-10  Richard Biener  <rguenther@suse.de>
12675         PR debug/83765
12676         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12677         early out so it also covers the case where we have a non-NULL
12678         origin.
12680 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12682         PR tree-optimization/83753
12683         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12684         for non-strided grouped accesses if the number of elements is 1.
12686 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12688         PR target/81616
12689         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12690         * i386.h (TARGET_USE_GATHER): Define.
12691         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12693 2018-01-10  Martin Liska  <mliska@suse.cz>
12695         PR bootstrap/82831
12696         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12697         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12698         partitioning.
12699         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12700         CLEANUP_NO_PARTITIONING is not set.
12702 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12704         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12705         for vectors, as a partial revert of r254296.
12706         * rtl.h (const_vec_p): Delete.
12707         (const_vec_duplicate_p): Don't test for vector CONSTs.
12708         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12709         * expmed.c (make_tree): Likewise.
12711         Revert:
12712         * common.md (E, F): Use CONSTANT_P instead of checking for
12713         CONST_VECTOR.
12714         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12715         checking for CONST_VECTOR.
12717 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12719         PR middle-end/83575
12720         * predict.c (force_edge_cold): Handle in more sane way edges
12721         with no prediction.
12723 2018-01-09  Carl Love  <cel@us.ibm.com>
12725         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12726         V4SI, V4SF types.
12727         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12728         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12729         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12730         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12731         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12732         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12733         * config/rs6000/rs6000-protos.h: Add extern defition for
12734         rs6000_generate_float2_double_code.
12735         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12736         function.
12737         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12738         (float2_v2df): Add define_expand.
12740 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12742         PR target/83628
12743         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12744         op_mode in the force_to_mode call.
12746 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12748         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12749         instead of checking each element individually.
12750         (aarch64_evpc_uzp): Likewise.
12751         (aarch64_evpc_zip): Likewise.
12752         (aarch64_evpc_ext): Likewise.
12753         (aarch64_evpc_rev): Likewise.
12754         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12755         instead of checking each element individually.  Return true without
12756         generating rtl if
12757         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12758         whether all selected elements come from the same input, instead of
12759         checking each element individually.  Remove calls to gen_rtx_REG,
12760         start_sequence and end_sequence and instead assert that no rtl is
12761         generated.
12763 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12765         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12766         order of HIGH and CONST checks.
12768 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12770         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12771         if the destination isn't an SSA_NAME.
12773 2018-01-09  Richard Biener  <rguenther@suse.de>
12775         PR tree-optimization/83668
12776         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12777         move prologue...
12778         (canonicalize_loop_form): ... here, renamed from ...
12779         (canonicalize_loop_closed_ssa_form): ... this and amended to
12780         swap successor edges for loop exit blocks to make us use
12781         the RPO order we need for initial schedule generation.
12783 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12785         PR tree-optimization/64811
12786         * match.pd: When optimizing comparisons with Inf, avoid
12787         introducing or losing exceptions from comparisons with NaN.
12789 2018-01-09  Martin Liska  <mliska@suse.cz>
12791         PR sanitizer/82517
12792         * asan.c (shadow_mem_size): Add gcc_assert.
12794 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12796         Don't save registers in main().
12798         PR target/83738
12799         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12800         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12801         * config/avr/avr.c (avr_set_current_function): Don't error if
12802         naked, OS_task or OS_main are specified at the same time.
12803         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12804         OS_main.
12805         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12806         attribute.
12807         * common/config/avr/avr-common.c (avr_option_optimization_table):
12808         Switch on -mmain-is-OS_task for optimizing compilations.
12810 2018-01-09  Richard Biener  <rguenther@suse.de>
12812         PR tree-optimization/83572
12813         * graphite.c: Include cfganal.h.
12814         (graphite_transform_loops): Connect infinite loops to exit
12815         and remove fake edges at the end.
12817 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12819         * ipa-inline.c (edge_badness): Revert accidental checkin.
12821 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12823         PR ipa/80763
12824         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12825         symbols; not inline clones.
12827 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12829         PR target/83507
12830         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12831         hard registers.  Formatting fixes.
12833         PR preprocessor/83722
12834         * gcc.c (try_generate_repro): Pass
12835         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12836         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12837         do_report_bug.
12839 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12840             Kito Cheng  <kito.cheng@gmail.com>
12842         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12843         (riscv_leaf_function_p): Delete.
12844         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12846 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12848         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12849         function.
12850         (do_ifelse): New function.
12851         (do_isel): New function.
12852         (do_sub3): New function.
12853         (do_add3): New function.
12854         (do_load_mask_compare): New function.
12855         (do_overlap_load_compare): New function.
12856         (expand_compare_loop): New function.
12857         (expand_block_compare): Call expand_compare_loop() when appropriate.
12858         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12859         option description.
12860         (-mblock-compare-inline-loop-limit): New option.
12862 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12864         PR target/83677
12865         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12866         Reverse order of second and third operands in first alternative.
12867         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12868         of first and second elements in UNSPEC_VPERMR vector.
12869         (altivec_expand_vec_perm_le): Likewise.
12871 2018-01-08  Jeff Law  <law@redhat.com>
12873         PR rtl-optimizatin/81308
12874         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12875         (process_switch): If group_case_labels makes a change, then set
12876         cfg_altered.
12877         (pass_convert_switch::execute): If a switch is converted, then
12878         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12880         PR rtl-optimization/81308
12881         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12882         splitting insns.
12884 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12886         PR target/83663 - Revert r255946
12887         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12888         generation for cases where splatting a value is not useful.
12889         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12890         across a vec_duplicate and a paradoxical subreg forming a vector
12891         mode to a vec_concat.
12893 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12895         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12896         -march=armv8.3-a variants.
12897         * config/arm/t-multilib: Likewise.
12898         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12900 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12902         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12903         to generate rtl.
12904         (cceq_ior_compare_complement): Give it a name so I can use it, and
12905         change boolean_or_operator predicate to boolean_operator so it can
12906         be used to generate a crand.
12907         (eqne): New code iterator.
12908         (bd/bd_neg): New code_attrs.
12909         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12910         a single define_insn.
12911         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12912         decrement (bdnzt/bdnzf/bdzt/bdzf).
12913         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12914         with the new names of the branch decrement patterns, and added the
12915         names of the branch decrement conditional patterns.
12917 2018-01-08  Richard Biener  <rguenther@suse.de>
12919         PR tree-optimization/83563
12920         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12921         cache.
12923 2018-01-08  Richard Biener  <rguenther@suse.de>
12925         PR middle-end/83713
12926         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12928 2018-01-08  Richard Biener  <rguenther@suse.de>
12930         PR tree-optimization/83685
12931         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12932         references to abnormals.
12934 2018-01-08  Richard Biener  <rguenther@suse.de>
12936         PR lto/83719
12937         * dwarf2out.c (output_indirect_strings): Handle empty
12938         skeleton_debug_str_hash.
12939         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12941 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12943         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12944         (emit_store_direct): Likewise.
12945         (arc_trampoline_adjust_address): Likewise.
12946         (arc_asm_trampoline_template): New function.
12947         (arc_initialize_trampoline): Use asm_trampoline_template.
12948         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12949         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12950         * config/arc/arc.md (flush_icache): Delete pattern.
12952 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12954         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12955         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12956         munaligned-access.
12958 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12960         PR target/83681
12961         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12962         by not USED_FOR_TARGET.
12963         (make_pass_resolve_sw_modes): Likewise.
12965 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12967         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12968         USED_FOR_TARGET.
12970 2018-01-08  Richard Biener  <rguenther@suse.de>
12972         PR middle-end/83580
12973         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12975 2018-01-08  Richard Biener  <rguenther@suse.de>
12977         PR middle-end/83517
12978         * match.pd ((t * 2) / 2) -> t): Add missing :c.
12980 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
12982         PR middle-end/81897
12983         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12984         basic blocks with a small number of successors.
12985         (convert_control_dep_chain_into_preds): Improve handling of
12986         forwarder blocks.
12987         (dump_predicates): Split apart into...
12988         (dump_pred_chain): ...here...
12989         (dump_pred_info): ...and here.
12990         (can_one_predicate_be_invalidated_p): Add debugging printfs.
12991         (can_chain_union_be_invalidated_p): Improve check for invalidation
12992         of paths.
12993         (uninit_uses_cannot_happen): Avoid unnecessary if
12994         convert_control_dep_chain_into_preds yielded nothing.
12996 2018-01-06  Martin Sebor  <msebor@redhat.com>
12998         PR tree-optimization/83640
12999         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
13000         subtracting negative offset from size.
13001         (builtin_access::overlap): Adjust offset bounds of the access to fall
13002         within the size of the object if possible.
13004 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
13006         PR rtl-optimization/83699
13007         * expmed.c (extract_bit_field_1): Restrict the vector usage of
13008         extract_bit_field_as_subreg to cases in which the extracted
13009         value is also a vector.
13011         * lra-constraints.c (process_alt_operands): Test for the equivalence
13012         substitutions when detecting a possible reload cycle.
13014 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
13016         PR debug/83480
13017         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
13018         by default if flag_selective_schedling{,2}.  Formatting fixes.
13020         PR rtl-optimization/83682
13021         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
13022         if it has non-VECTOR_MODE element mode.
13023         (vec_duplicate_p): Likewise.
13025         PR middle-end/83694
13026         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
13027         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
13029 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
13031         PR target/83604
13032         * config/i386/i386-builtin.def
13033         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
13034         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
13035         Require also OPTION_MASK_ISA_AVX512F in addition to
13036         OPTION_MASK_ISA_GFNI.
13037         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
13038         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
13039         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
13040         to OPTION_MASK_ISA_GFNI.
13041         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
13042         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
13043         OPTION_MASK_ISA_AVX512BW.
13044         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
13045         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
13046         addition to OPTION_MASK_ISA_GFNI.
13047         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
13048         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
13049         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
13050         to OPTION_MASK_ISA_GFNI.
13051         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
13052         a requirement for all ISAs rather than any of them with a few
13053         exceptions.
13054         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
13055         processing.
13056         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
13057         bitmasks to be enabled with 3 exceptions, instead of requiring any
13058         enabled ISA with lots of exceptions.
13059         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
13060         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
13061         Change avx512bw in isa attribute to avx512f.
13062         * config/i386/sgxintrin.h: Add license boilerplate.
13063         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
13064         to __AVX512F__ and __AVX512VL to __AVX512VL__.
13065         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
13066         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
13067         defined.
13068         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
13069         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
13070         temporarily sse2 rather than sse if not enabled already.
13072         PR target/83604
13073         * config/i386/sse.md (VI248_VLBW): Rename to ...
13074         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
13075         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
13076         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
13077         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
13078         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
13079         mode iterator instead of VI248_VLBW.
13081 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
13083         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
13084         (record_modified): Skip clobbers; add debug output.
13085         (param_change_prob): Use sreal frequencies.
13087 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
13089         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
13090         punt for user-aligned variables.
13092 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
13094         * tree-chrec.c (chrec_contains_symbols): Return true for
13095         POLY_INT_CST.
13097 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
13099         PR target/82439
13100         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
13101         of (x|y) == x for BICS pattern.
13103 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
13105         PR tree-optimization/83605
13106         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
13107         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
13108         can throw.
13110 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13112         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
13113         * config/epiphany/rtems.h: New file.
13115 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13116             Uros Bizjak  <ubizjak@gmail.com>
13118         PR target/83554
13119         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
13120         QIreg_operand instead of register_operand predicate.
13121         * config/i386/i386.c (ix86_rop_should_change_byte_p,
13122         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
13123         comments instead of -fmitigate[-_]rop.
13125 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13127         PR bootstrap/81926
13128         * cgraphunit.c (symbol_table::compile): Switch to text_section
13129         before calling assembly_start debug hook.
13130         * run-rtl-passes.c (run_rtl_passes): Likewise.
13131         Include output.h.
13133 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13135         * tree-vrp.c (extract_range_from_binary_expr_1): Check
13136         range_int_cst_p rather than !symbolic_range_p before calling
13137         extract_range_from_multiplicative_op_1.
13139 2018-01-04  Jeff Law  <law@redhat.com>
13141         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
13142         redundant test in assertion.
13144 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13146         * doc/rtl.texi: Document machine_mode wrapper classes.
13148 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13150         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
13151         using tree_to_uhwi.
13153 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13155         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
13156         the VEC_PERM_EXPR fold to fail.
13158 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13160         PR debug/83585
13161         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
13162         to switched_sections.
13164 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13166         PR target/83680
13167         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
13168         test for d.testing.
13170 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
13172         PR target/83387
13173         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
13174         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
13176 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13178         PR debug/83666
13179         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
13180         is BLKmode and bitpos not zero or mode change is needed.
13182 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13184         PR target/83675
13185         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
13186         TARGET_VIS2.
13188 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
13190         PR target/83628
13191         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
13192         instead of MULT rtx.  Update all corresponding splitters.
13193         (*saddl_se): Ditto.
13194         (*ssub<modesuffix>): Ditto.
13195         (*ssubl_se): Ditto.
13196         (*cmp_sadd_di): Update split patterns.
13197         (*cmp_sadd_si): Ditto.
13198         (*cmp_sadd_sidi): Ditto.
13199         (*cmp_ssub_di): Ditto.
13200         (*cmp_ssub_si): Ditto.
13201         (*cmp_ssub_sidi): Ditto.
13202         * config/alpha/predicates.md (const23_operand): New predicate.
13203         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
13204         Look for ASHIFT, not MULT inner operand.
13205         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
13207 2018-01-04  Martin Liska  <mliska@suse.cz>
13209         PR gcov-profile/83669
13210         * gcov.c (output_intermediate_file): Add version to intermediate
13211         gcov file.
13212         * doc/gcov.texi: Document new field 'version' in intermediate
13213         file format. Fix location of '-k' option of gcov command.
13215 2018-01-04  Martin Liska  <mliska@suse.cz>
13217         PR ipa/82352
13218         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
13220 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13222         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
13224 2018-01-03  Martin Sebor  <msebor@redhat.com>
13226         PR tree-optimization/83655
13227         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
13228         checking calls with invalid arguments.
13230 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13232         * tree-vect-stmts.c (vect_get_store_rhs): New function.
13233         (vectorizable_mask_load_store): Delete.
13234         (vectorizable_call): Return false for masked loads and stores.
13235         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
13236         instead of gimple_assign_rhs1.
13237         (vectorizable_load): Handle IFN_MASK_LOAD.
13238         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
13240 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13242         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
13243         split out from..,
13244         (vectorizable_mask_load_store): ...here.
13245         (vectorizable_load): ...and here.
13247 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13249         * tree-vect-stmts.c (vect_build_all_ones_mask)
13250         (vect_build_zero_merge_argument): New functions, split out from...
13251         (vectorizable_load): ...here.
13253 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13255         * tree-vect-stmts.c (vect_check_store_rhs): New function,
13256         split out from...
13257         (vectorizable_mask_load_store): ...here.
13258         (vectorizable_store): ...and here.
13260 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13262         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
13263         split out from...
13264         (vectorizable_mask_load_store): ...here.
13266 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13268         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
13269         (vect_model_store_cost): Take a vec_load_store_type instead of a
13270         vect_def_type.
13271         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
13272         (vect_model_store_cost): Take a vec_load_store_type instead of a
13273         vect_def_type.
13274         (vectorizable_mask_load_store): Update accordingly.
13275         (vectorizable_store): Likewise.
13276         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
13278 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13280         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
13281         IFN_MASK_LOAD calls here rather than...
13282         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
13284 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13285             Alan Hayward  <alan.hayward@arm.com>
13286             David Sherwood  <david.sherwood@arm.com>
13288         * expmed.c (extract_bit_field_1): For vector extracts,
13289         fall back to extract_bit_field_as_subreg if vec_extract
13290         isn't available.
13292 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13293             Alan Hayward  <alan.hayward@arm.com>
13294             David Sherwood  <david.sherwood@arm.com>
13296         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
13297         they are variable or constant sized.
13298         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
13299         slots for constant-sized data.
13301 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13302             Alan Hayward  <alan.hayward@arm.com>
13303             David Sherwood  <david.sherwood@arm.com>
13305         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
13306         handling COND_EXPRs with boolean comparisons, try to find a better
13307         basis for the mask type than the boolean itself.
13309 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13311         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
13312         is calculated and how it can be overridden.
13313         * genmodes.c (max_bitsize_mode_any_mode): New variable.
13314         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
13315         if defined.
13316         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
13317         if nonzero.
13319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13320             Alan Hayward  <alan.hayward@arm.com>
13321             David Sherwood  <david.sherwood@arm.com>
13323         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
13324         Remove the mode argument.
13325         (aarch64_simd_valid_immediate): Remove the mode and inverse
13326         arguments.
13327         * config/aarch64/iterators.md (bitsize): New iterator.
13328         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
13329         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
13330         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
13331         aarch64_simd_valid_immediate.
13332         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
13333         (aarch64_reg_or_bic_imm): Likewise.
13334         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
13335         with an insn_type enum and msl with a modifier_type enum.
13336         Replace element_width with a scalar_mode.  Change the shift
13337         to unsigned int.  Add constructors for scalar_float_mode and
13338         scalar_int_mode elements.
13339         (aarch64_vect_float_const_representable_p): Delete.
13340         (aarch64_can_const_movi_rtx_p)
13341         (aarch64_simd_scalar_immediate_valid_for_move)
13342         (aarch64_simd_make_constant): Update call to
13343         aarch64_simd_valid_immediate.
13344         (aarch64_advsimd_valid_immediate_hs): New function.
13345         (aarch64_advsimd_valid_immediate): Likewise.
13346         (aarch64_simd_valid_immediate): Remove mode and inverse
13347         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
13348         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
13349         and aarch64_float_const_representable_p on the result.
13350         (aarch64_output_simd_mov_immediate): Remove mode argument.
13351         Update call to aarch64_simd_valid_immediate and use of
13352         simd_immediate_info.
13353         (aarch64_output_scalar_simd_mov_immediate): Update call
13354         accordingly.
13356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13357             Alan Hayward  <alan.hayward@arm.com>
13358             David Sherwood  <david.sherwood@arm.com>
13360         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
13361         (mode_nunits): Likewise CONST_MODE_NUNITS.
13362         * machmode.def (ADJUST_NUNITS): Document.
13363         * genmodes.c (mode_data::need_nunits_adj): New field.
13364         (blank_mode): Update accordingly.
13365         (adj_nunits): New variable.
13366         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
13367         parameter.
13368         (emit_mode_size_inline): Set need_bytesize_adj for all modes
13369         listed in adj_nunits.
13370         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
13371         listed in adj_nunits.  Don't emit case statements for such modes.
13372         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
13373         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
13374         nothing if adj_nunits is nonnull.
13375         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
13376         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
13377         (emit_mode_fbit): Update use of print_maybe_const_decl.
13378         (emit_move_size): Likewise.  Treat the array as non-const
13379         if adj_nunits.
13380         (emit_mode_adjustments): Handle adj_nunits.
13382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13384         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
13385         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
13386         (VECTOR_MODES): Use it.
13387         (make_vector_modes): Take the prefix as an argument.
13389 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13390             Alan Hayward  <alan.hayward@arm.com>
13391             David Sherwood  <david.sherwood@arm.com>
13393         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
13394         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
13395         for MODE_VECTOR_BOOL.
13396         * machmode.def (VECTOR_BOOL_MODE): Document.
13397         * genmodes.c (VECTOR_BOOL_MODE): New macro.
13398         (make_vector_bool_mode): New function.
13399         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
13400         MODE_VECTOR_BOOL.
13401         * lto-streamer-in.c (lto_input_mode_table): Likewise.
13402         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
13403         Likewise.
13404         * stor-layout.c (int_mode_for_mode): Likewise.
13405         * tree.c (build_vector_type_for_mode): Likewise.
13406         * varasm.c (output_constant_pool_2): Likewise.
13407         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
13408         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
13409         for MODE_VECTOR_BOOL.
13410         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
13411         of mode class checks.
13412         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
13413         instead of a list of mode class checks.
13414         (expand_vector_scalar_condition): Likewise.
13415         (type_for_widest_vector_mode): Handle BImode as an inner mode.
13417 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13418             Alan Hayward  <alan.hayward@arm.com>
13419             David Sherwood  <david.sherwood@arm.com>
13421         * machmode.h (mode_size): Change from unsigned short to
13422         poly_uint16_pod.
13423         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
13424         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13425         or if measurement_type is not polynomial.
13426         (fixed_size_mode::includes_p): Check for constant-sized modes.
13427         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
13428         return a poly_uint16 rather than an unsigned short.
13429         (emit_mode_size): Change the type of mode_size from unsigned short
13430         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
13431         (emit_mode_adjustments): Cope with polynomial vector sizes.
13432         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13433         for GET_MODE_SIZE.
13434         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13435         for GET_MODE_SIZE.
13436         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
13437         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
13438         * caller-save.c (setup_save_areas): Likewise.
13439         (replace_reg_with_saved_mem): Likewise.
13440         * calls.c (emit_library_call_value_1): Likewise.
13441         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
13442         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
13443         (gen_lowpart_for_combine): Likewise.
13444         * convert.c (convert_to_integer_1): Likewise.
13445         * cse.c (equiv_constant, cse_insn): Likewise.
13446         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
13447         (cselib_subst_to_values): Likewise.
13448         * dce.c (word_dce_process_block): Likewise.
13449         * df-problems.c (df_word_lr_mark_ref): Likewise.
13450         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13451         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13452         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13453         (rtl_for_decl_location): Likewise.
13454         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13455         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13456         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13457         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13458         (expand_expr_real_1): Likewise.
13459         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13460         (pad_below): Likewise.
13461         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13462         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13463         * ira.c (get_subreg_tracking_sizes): Likewise.
13464         * ira-build.c (ira_create_allocno_objects): Likewise.
13465         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13466         (ira_sort_regnos_for_alter_reg): Likewise.
13467         * ira-costs.c (record_operand_costs): Likewise.
13468         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13469         (resolve_simple_move): Likewise.
13470         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13471         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13472         (lra_constraints): Likewise.
13473         (CONST_POOL_OK_P): Reject variable-sized modes.
13474         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13475         (add_pseudo_to_slot, lra_spill): Likewise.
13476         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13477         * optabs-query.c (get_best_extraction_insn): Likewise.
13478         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13479         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13480         (expand_mult_highpart, valid_multiword_target_p): Likewise.
13481         * recog.c (offsettable_address_addr_space_p): Likewise.
13482         * regcprop.c (maybe_mode_change): Likewise.
13483         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13484         * regrename.c (build_def_use): Likewise.
13485         * regstat.c (dump_reg_info): Likewise.
13486         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13487         (find_reloads, find_reloads_subreg_address): Likewise.
13488         * reload1.c (eliminate_regs_1): Likewise.
13489         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13490         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13491         (simplify_binary_operation_1, simplify_subreg): Likewise.
13492         * targhooks.c (default_function_arg_padding): Likewise.
13493         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13494         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13495         (verify_gimple_assign_ternary): Likewise.
13496         * tree-inline.c (estimate_move_cost): Likewise.
13497         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13498         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
13499         (get_address_cost_ainc): Likewise.
13500         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
13501         (vect_supportable_dr_alignment): Likewise.
13502         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13503         (vectorizable_reduction): Likewise.
13504         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
13505         (vectorizable_operation, vectorizable_load): Likewise.
13506         * tree.c (build_same_sized_truth_vector_type): Likewise.
13507         * valtrack.c (cleanup_auto_inc_dec): Likewise.
13508         * var-tracking.c (emit_note_insn_var_location): Likewise.
13509         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
13510         (ADDR_VEC_ALIGN): Likewise.
13512 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13513             Alan Hayward  <alan.hayward@arm.com>
13514             David Sherwood  <david.sherwood@arm.com>
13516         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
13517         unsigned short.
13518         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13519         or if measurement_type is polynomial.
13520         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
13521         * combine.c (make_extraction): Likewise.
13522         * dse.c (find_shift_sequence): Likewise.
13523         * dwarf2out.c (mem_loc_descriptor): Likewise.
13524         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
13525         (extract_bit_field, extract_low_bits): Likewise.
13526         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
13527         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
13528         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
13529         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
13530         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13531         * reload.c (find_reloads): Likewise.
13532         * reload1.c (alter_reg): Likewise.
13533         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
13534         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
13535         * tree-if-conv.c (predicate_mem_writes): Likewise.
13536         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13537         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
13538         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13539         * valtrack.c (dead_debug_insert_temp): Likewise.
13540         * varasm.c (mergeable_constant_section): Likewise.
13541         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
13543 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13544             Alan Hayward  <alan.hayward@arm.com>
13545             David Sherwood  <david.sherwood@arm.com>
13547         * expr.c (expand_assignment): Cope with polynomial mode sizes
13548         when assigning to a CONCAT.
13550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13551             Alan Hayward  <alan.hayward@arm.com>
13552             David Sherwood  <david.sherwood@arm.com>
13554         * machmode.h (mode_precision): Change from unsigned short to
13555         poly_uint16_pod.
13556         (mode_to_precision): Return a poly_uint16 rather than an unsigned
13557         short.
13558         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
13559         or if measurement_type is not polynomial.
13560         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
13561         in which the mode is already known to be a scalar_int_mode.
13562         * genmodes.c (emit_mode_precision): Change the type of mode_precision
13563         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
13564         initializer.
13565         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13566         for GET_MODE_PRECISION.
13567         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13568         for GET_MODE_PRECISION.
13569         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13570         as polynomial.
13571         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13572         (expand_field_assignment, make_extraction): Likewise.
13573         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13574         (get_last_value): Likewise.
13575         * convert.c (convert_to_integer_1): Likewise.
13576         * cse.c (cse_insn): Likewise.
13577         * expr.c (expand_expr_real_1): Likewise.
13578         * lra-constraints.c (simplify_operand_subreg): Likewise.
13579         * optabs-query.c (can_atomic_load_p): Likewise.
13580         * optabs.c (expand_atomic_load): Likewise.
13581         (expand_atomic_store): Likewise.
13582         * ree.c (combine_reaching_defs): Likewise.
13583         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13584         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13585         * tree.h (type_has_mode_precision_p): Likewise.
13586         * ubsan.c (instrument_si_overflow): Likewise.
13588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13589             Alan Hayward  <alan.hayward@arm.com>
13590             David Sherwood  <david.sherwood@arm.com>
13592         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13593         polynomial numbers of units.
13594         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13595         (valid_vector_subparts_p): New function.
13596         (build_vector_type): Remove temporary shim and take the number
13597         of units as a poly_uint64 rather than an int.
13598         (build_opaque_vector_type): Take the number of units as a
13599         poly_uint64 rather than an int.
13600         * tree.c (build_vector_from_ctor): Handle polynomial
13601         TYPE_VECTOR_SUBPARTS.
13602         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13603         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13604         (build_vector_from_val): If the number of units is variable,
13605         use build_vec_duplicate_cst for constant operands and
13606         VEC_DUPLICATE_EXPR otherwise.
13607         (make_vector_type): Remove temporary is_constant ().
13608         (build_vector_type, build_opaque_vector_type): Take the number of
13609         units as a poly_uint64 rather than an int.
13610         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13611         VECTOR_CST_NELTS.
13612         * cfgexpand.c (expand_debug_expr): Likewise.
13613         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13614         (store_constructor, expand_expr_real_1): Likewise.
13615         (const_scalar_mask_from_tree): Likewise.
13616         * fold-const-call.c (fold_const_reduction): Likewise.
13617         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13618         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13619         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13620         (fold_relational_const): Likewise.
13621         (native_interpret_vector): Likewise.  Change the size from an
13622         int to an unsigned int.
13623         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13624         TYPE_VECTOR_SUBPARTS.
13625         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13626         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13627         duplicating a non-constant operand into a variable-length vector.
13628         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13629         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13630         * ipa-icf.c (sem_variable::equals): Likewise.
13631         * match.pd: Likewise.
13632         * omp-simd-clone.c (simd_clone_subparts): Likewise.
13633         * print-tree.c (print_node): Likewise.
13634         * stor-layout.c (layout_type): Likewise.
13635         * targhooks.c (default_builtin_vectorization_cost): Likewise.
13636         * tree-cfg.c (verify_gimple_comparison): Likewise.
13637         (verify_gimple_assign_binary): Likewise.
13638         (verify_gimple_assign_ternary): Likewise.
13639         (verify_gimple_assign_single): Likewise.
13640         * tree-pretty-print.c (dump_generic_node): Likewise.
13641         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13642         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13643         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13644         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13645         (vect_shift_permute_load_chain): Likewise.
13646         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13647         (expand_vector_condition, optimize_vector_constructor): Likewise.
13648         (lower_vec_perm, get_compute_type): Likewise.
13649         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13650         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13651         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13652         (vect_recog_mask_conversion_pattern): Likewise.
13653         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13654         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13655         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13656         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13657         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13658         (vectorizable_shift, vectorizable_operation, vectorizable_store)
13659         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13660         (supportable_widening_operation): Likewise.
13661         (supportable_narrowing_operation): Likewise.
13662         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13663         Likewise.
13664         * varasm.c (output_constant): Likewise.
13666 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13667             Alan Hayward  <alan.hayward@arm.com>
13668             David Sherwood  <david.sherwood@arm.com>
13670         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13671         so that both the length == 3 and length != 3 cases set up their
13672         own permute vectors.  Add comments explaining why we know the
13673         number of elements is constant.
13674         (vect_permute_load_chain): Likewise.
13676 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13677             Alan Hayward  <alan.hayward@arm.com>
13678             David Sherwood  <david.sherwood@arm.com>
13680         * machmode.h (mode_nunits): Change from unsigned char to
13681         poly_uint16_pod.
13682         (ONLY_FIXED_SIZE_MODES): New macro.
13683         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13684         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13685         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13686         New typedefs.
13687         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13688         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13689         or if measurement_type is not polynomial.
13690         * genmodes.c (ZERO_COEFFS): New macro.
13691         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13692         poly_uint16.
13693         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13694         Use ZERO_COEFFS when emitting initializers.
13695         * data-streamer.h (bp_pack_poly_value): New function.
13696         (bp_unpack_poly_value): Likewise.
13697         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13698         for GET_MODE_NUNITS.
13699         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13700         for GET_MODE_NUNITS.
13701         * tree.c (make_vector_type): Remove temporary shim and make
13702         the real function take the number of units as a poly_uint64
13703         rather than an int.
13704         (build_vector_type_for_mode): Handle polynomial nunits.
13705         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13706         * emit-rtl.c (const_vec_series_p_1): Likewise.
13707         (gen_rtx_CONST_VECTOR): Likewise.
13708         * fold-const.c (test_vec_duplicate_folding): Likewise.
13709         * genrecog.c (validate_pattern): Likewise.
13710         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13711         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13712         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13713         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13714         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13715         * rtlanal.c (subreg_get_info): Likewise.
13716         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13717         (vect_grouped_load_supported): Likewise.
13718         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13719         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13720         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13721         (simplify_const_unary_operation, simplify_binary_operation_1)
13722         (simplify_const_binary_operation, simplify_ternary_operation)
13723         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13724         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13725         instead of CONST_VECTOR_NUNITS.
13726         * varasm.c (output_constant_pool_2): Likewise.
13727         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13728         explicit-encoded elements in the XVEC for variable-length vectors.
13730 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13732         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13734 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13735             Alan Hayward  <alan.hayward@arm.com>
13736             David Sherwood  <david.sherwood@arm.com>
13738         * coretypes.h (fixed_size_mode): Declare.
13739         (fixed_size_mode_pod): New typedef.
13740         * builtins.h (target_builtins::x_apply_args_mode)
13741         (target_builtins::x_apply_result_mode): Change type to
13742         fixed_size_mode_pod.
13743         * builtins.c (apply_args_size, apply_result_size, result_vector)
13744         (expand_builtin_apply_args_1, expand_builtin_apply)
13745         (expand_builtin_return): Update accordingly.
13747 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13749         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13750         * cselib.c (cselib_hash_rtx): Likewise.
13751         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13752         CONST_VECTOR encoding.
13754 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13755             Jeff Law  <law@redhat.com>
13757         PR target/83641
13758         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13759         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13760         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13761         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13763         PR target/83641
13764         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13765         explicitly probe *sp in a noreturn function if there were any callee
13766         register saves or frame pointer is needed.
13768 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13770         PR debug/83621
13771         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13772         BLKmode for ternary, binary or unary expressions.
13774         PR debug/83645
13775         * var-tracking.c (delete_vta_debug_insn): New inline function.
13776         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13777         insns from get_insns () to NULL instead of each bb separately.
13778         Use delete_vta_debug_insn.  No longer static.
13779         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13780         delete_vta_debug_insns callers.
13781         * rtl.h (delete_vta_debug_insns): Declare.
13782         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13783         instead of variable_tracking_main.
13785 2018-01-03  Martin Sebor  <msebor@redhat.com>
13787         PR tree-optimization/83603
13788         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13789         arguments past the endof the argument list in functions declared
13790         without a prototype.
13791         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13792         Avoid checking when arguments are null.
13794 2018-01-03  Martin Sebor  <msebor@redhat.com>
13796         PR c/83559
13797         * doc/extend.texi (attribute const): Fix a typo.
13798         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13799         issuing -Wsuggest-attribute for void functions.
13801 2018-01-03  Martin Sebor  <msebor@redhat.com>
13803         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13804         offset_int::from instead of wide_int::to_shwi.
13805         (maybe_diag_overlap): Remove assertion.
13806         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13807         * gimple-ssa-sprintf.c (format_directive): Same.
13808         (parse_directive): Same.
13809         (sprintf_dom_walker::compute_format_length): Same.
13810         (try_substitute_return_value): Same.
13812 2018-01-03  Jeff Law  <law@redhat.com>
13814         PR middle-end/83654
13815         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13816         non-constant residual for zero at runtime and avoid probing in
13817         that case.  Reorganize code for trailing problem to mirror handling
13818         of the residual.
13820 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13822         PR tree-optimization/83501
13823         * tree-ssa-strlen.c (get_string_cst): New.
13824         (handle_char_store): Call get_string_cst.
13826 2018-01-03  Martin Liska  <mliska@suse.cz>
13828         PR tree-optimization/83593
13829         * tree-ssa-strlen.c: Include tree-cfg.h.
13830         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13831         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13832         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13833         to false.
13834         (strlen_dom_walker::before_dom_children): Call
13835         gimple_purge_dead_eh_edges. Dump tranformation with details
13836         dump flags.
13837         (strlen_dom_walker::before_dom_children): Update call by adding
13838         new argument cleanup_eh.
13839         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13841 2018-01-03  Martin Liska  <mliska@suse.cz>
13843         PR ipa/83549
13844         * cif-code.def (VARIADIC_THUNK): New enum value.
13845         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13846         thunks.
13848 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13850         * sse.md (mov<mode>_internal): Tighten condition for when to use
13851         vmovdqu<ssescalarsize> for TI and OI modes.
13853 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13855         Update copyright years.
13857 2018-01-03  Martin Liska  <mliska@suse.cz>
13859         PR ipa/83594
13860         * ipa-visibility.c (function_and_variable_visibility): Skip
13861         functions with noipa attribure.
13863 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13865         * gcc.c (process_command): Update copyright notice dates.
13866         * gcov-dump.c (print_version): Ditto.
13867         * gcov.c (print_version): Ditto.
13868         * gcov-tool.c (print_version): Ditto.
13869         * gengtype.c (create_file): Ditto.
13870         * doc/cpp.texi: Bump @copying's copyright year.
13871         * doc/cppinternals.texi: Ditto.
13872         * doc/gcc.texi: Ditto.
13873         * doc/gccint.texi: Ditto.
13874         * doc/gcov.texi: Ditto.
13875         * doc/install.texi: Ditto.
13876         * doc/invoke.texi: Ditto.
13878 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13880         * vector-builder.h (vector_builder::m_full_nelts): Change from
13881         unsigned int to poly_uint64.
13882         (vector_builder::full_nelts): Update prototype accordingly.
13883         (vector_builder::new_vector): Likewise.
13884         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13885         (vector_builder::operator ==): Likewise.
13886         (vector_builder::finalize): Likewise.
13887         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13888         Take the number of elements as a poly_uint64 rather than an
13889         unsigned int.
13890         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13891         from unsigned int to poly_uint64.
13892         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13893         (vec_perm_indices::new_vector): Likewise.
13894         (vec_perm_indices::length): Likewise.
13895         (vec_perm_indices::nelts_per_input): Likewise.
13896         (vec_perm_indices::input_nelts): Likewise.
13897         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13898         number of elements per input as a poly_uint64 rather than an
13899         unsigned int.  Use the original encoding for variable-length
13900         vectors, rather than clamping each individual element.
13901         For the second and subsequent elements in each pattern,
13902         clamp the step and base before clamping their sum.
13903         (vec_perm_indices::series_p): Handle polynomial element counts.
13904         (vec_perm_indices::all_in_range_p): Likewise.
13905         (vec_perm_indices_to_tree): Likewise.
13906         (vec_perm_indices_to_rtx): Likewise.
13907         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13908         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13909         (tree_vector_builder::new_binary_operation): Handle polynomial
13910         element counts.  Return false if we need to know the number
13911         of elements at compile time.
13912         * fold-const.c (fold_vec_perm): Punt if the number of elements
13913         isn't known at compile time.
13915 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13917         * vec-perm-indices.h (vec_perm_builder): Change element type
13918         from HOST_WIDE_INT to poly_int64.
13919         (vec_perm_indices::element_type): Update accordingly.
13920         (vec_perm_indices::clamp): Handle polynomial element_types.
13921         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13922         (vec_perm_indices::all_in_range_p): Likewise.
13923         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13924         than shwi trees.
13925         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13926         polynomial vec_perm_indices element types.
13927         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13928         * fold-const.c (fold_vec_perm): Likewise.
13929         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13930         * tree-vect-generic.c (lower_vec_perm): Likewise.
13931         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13932         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13933         element type to HOST_WIDE_INT.
13935 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13936             Alan Hayward  <alan.hayward@arm.com>
13937             David Sherwood  <david.sherwood@arm.com>
13939         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13940         rather than an int.  Use plus_constant.
13941         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13942         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13944 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13945             Alan Hayward  <alan.hayward@arm.com>
13946             David Sherwood  <david.sherwood@arm.com>
13948         * calls.c (emit_call_1, expand_call): Change struct_value_size from
13949         a HOST_WIDE_INT to a poly_int64.
13951 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13952             Alan Hayward  <alan.hayward@arm.com>
13953             David Sherwood  <david.sherwood@arm.com>
13955         * calls.c (load_register_parameters): Cope with polynomial
13956         mode sizes.  Require a constant size for BLKmode parameters
13957         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
13958         forces a parameter to be padded at the lsb end in order to
13959         fill a complete number of words, require the parameter size
13960         to be ordered wrt UNITS_PER_WORD.
13962 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13963             Alan Hayward  <alan.hayward@arm.com>
13964             David Sherwood  <david.sherwood@arm.com>
13966         * reload1.c (spill_stack_slot_width): Change element type
13967         from unsigned int to poly_uint64_pod.
13968         (alter_reg): Treat mode sizes as polynomial.
13970 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13971             Alan Hayward  <alan.hayward@arm.com>
13972             David Sherwood  <david.sherwood@arm.com>
13974         * reload.c (complex_word_subreg_p): New function.
13975         (reload_inner_reg_of_subreg, push_reload): Use it.
13977 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13978             Alan Hayward  <alan.hayward@arm.com>
13979             David Sherwood  <david.sherwood@arm.com>
13981         * lra-constraints.c (process_alt_operands): Reject matched
13982         operands whose sizes aren't ordered.
13983         (match_reload): Refer to this check here.
13985 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13986             Alan Hayward  <alan.hayward@arm.com>
13987             David Sherwood  <david.sherwood@arm.com>
13989         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13990         that the mode size is in the set {1, 2, 4, 8, 16}.
13992 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13993             Alan Hayward  <alan.hayward@arm.com>
13994             David Sherwood  <david.sherwood@arm.com>
13996         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13997         Use plus_constant instead of gen_rtx_PLUS.
13999 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14000             Alan Hayward  <alan.hayward@arm.com>
14001             David Sherwood  <david.sherwood@arm.com>
14003         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
14004         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
14005         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
14006         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
14007         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
14008         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
14009         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
14010         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
14011         * config/i386/i386.c (ix86_push_rounding): ...this new function.
14012         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
14013         a poly_int64.
14014         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
14015         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
14016         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
14017         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
14018         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
14019         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
14020         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
14021         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
14022         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
14023         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
14024         function.
14025         * expr.c (emit_move_resolve_push): Treat the input and result
14026         of PUSH_ROUNDING as a poly_int64.
14027         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
14028         (emit_push_insn): Likewise.
14029         * lra-eliminations.c (mark_not_eliminable): Likewise.
14030         * recog.c (push_operand): Likewise.
14031         * reload1.c (elimination_effects): Likewise.
14032         * rtlanal.c (nonzero_bits1): Likewise.
14033         * calls.c (store_one_arg): Likewise.  Require the padding to be
14034         known at compile time.
14036 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14037             Alan Hayward  <alan.hayward@arm.com>
14038             David Sherwood  <david.sherwood@arm.com>
14040         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
14041         Use plus_constant instead of gen_rtx_PLUS.
14043 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14044             Alan Hayward  <alan.hayward@arm.com>
14045             David Sherwood  <david.sherwood@arm.com>
14047         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
14048         rather than an int.
14050 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14051             Alan Hayward  <alan.hayward@arm.com>
14052             David Sherwood  <david.sherwood@arm.com>
14054         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
14055         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
14056         via stack temporaries.  Treat the mode size as polynomial too.
14058 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14059             Alan Hayward  <alan.hayward@arm.com>
14060             David Sherwood  <david.sherwood@arm.com>
14062         * expr.c (expand_expr_real_2): When handling conversions involving
14063         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
14064         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
14065         as a poly_uint64 too.
14067 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14068             Alan Hayward  <alan.hayward@arm.com>
14069             David Sherwood  <david.sherwood@arm.com>
14071         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
14073 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14074             Alan Hayward  <alan.hayward@arm.com>
14075             David Sherwood  <david.sherwood@arm.com>
14077         * combine.c (can_change_dest_mode): Handle polynomial
14078         REGMODE_NATURAL_SIZE.
14079         * expmed.c (store_bit_field_1): Likewise.
14080         * expr.c (store_constructor): Likewise.
14081         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
14082         and polynomial REGMODE_NATURAL_SIZE.
14083         (gen_lowpart_common): Likewise.
14084         * reginfo.c (record_subregs_of_mode): Likewise.
14085         * rtlanal.c (read_modify_subreg_p): Likewise.
14087 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14088             Alan Hayward  <alan.hayward@arm.com>
14089             David Sherwood  <david.sherwood@arm.com>
14091         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
14092         numbers of elements.
14094 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14095             Alan Hayward  <alan.hayward@arm.com>
14096             David Sherwood  <david.sherwood@arm.com>
14098         * match.pd: Cope with polynomial numbers of vector elements.
14100 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14101             Alan Hayward  <alan.hayward@arm.com>
14102             David Sherwood  <david.sherwood@arm.com>
14104         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
14105         in a POINTER_PLUS_EXPR.
14107 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14108             Alan Hayward  <alan.hayward@arm.com>
14109             David Sherwood  <david.sherwood@arm.com>
14111         * omp-simd-clone.c (simd_clone_subparts): New function.
14112         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
14113         (ipa_simd_modify_function_body): Likewise.
14115 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14116             Alan Hayward  <alan.hayward@arm.com>
14117             David Sherwood  <david.sherwood@arm.com>
14119         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
14120         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
14121         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
14122         (expand_vector_condition, vector_element): Likewise.
14123         (subparts_gt): New function.
14124         (get_compute_type): Use subparts_gt.
14125         (count_type_subparts): Delete.
14126         (expand_vector_operations_1): Use subparts_gt instead of
14127         count_type_subparts.
14129 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14130             Alan Hayward  <alan.hayward@arm.com>
14131             David Sherwood  <david.sherwood@arm.com>
14133         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
14134         (vect_compile_time_alias): ...this new function.  Do the calculation
14135         on poly_ints rather than trees.
14136         (vect_prune_runtime_alias_test_list): Update call accordingly.
14138 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14139             Alan Hayward  <alan.hayward@arm.com>
14140             David Sherwood  <david.sherwood@arm.com>
14142         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
14143         numbers of units.
14144         (vect_schedule_slp_instance): Likewise.
14146 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14147             Alan Hayward  <alan.hayward@arm.com>
14148             David Sherwood  <david.sherwood@arm.com>
14150         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
14151         constant and extern definitions for variable-length vectors.
14152         (vect_get_constant_vectors): Note that the number of units
14153         is known to be constant.
14155 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14156             Alan Hayward  <alan.hayward@arm.com>
14157             David Sherwood  <david.sherwood@arm.com>
14159         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
14160         of units as polynomial.  Choose between WIDE and NARROW based
14161         on multiple_p.
14163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14164             Alan Hayward  <alan.hayward@arm.com>
14165             David Sherwood  <david.sherwood@arm.com>
14167         * tree-vect-stmts.c (simd_clone_subparts): New function.
14168         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
14170 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14171             Alan Hayward  <alan.hayward@arm.com>
14172             David Sherwood  <david.sherwood@arm.com>
14174         * tree-vect-stmts.c (vectorizable_call): Treat the number of
14175         vectors as polynomial.  Use build_index_vector for
14176         IFN_GOMP_SIMD_LANE.
14178 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14179             Alan Hayward  <alan.hayward@arm.com>
14180             David Sherwood  <david.sherwood@arm.com>
14182         * tree-vect-stmts.c (get_load_store_type): Treat the number of
14183         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
14184         for variable-length vectors.
14185         (vectorizable_mask_load_store): Treat the number of units as
14186         polynomial, asserting that it is constant if the condition has
14187         already been enforced.
14188         (vectorizable_store, vectorizable_load): Likewise.
14190 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14191             Alan Hayward  <alan.hayward@arm.com>
14192             David Sherwood  <david.sherwood@arm.com>
14194         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
14195         of units as polynomial.  Punt if we can't tell at compile time
14196         which vector contains the final result.
14198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14199             Alan Hayward  <alan.hayward@arm.com>
14200             David Sherwood  <david.sherwood@arm.com>
14202         * tree-vect-loop.c (vectorizable_induction): Treat the number
14203         of units as polynomial.  Punt on SLP inductions.  Use an integer
14204         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
14205         cast of such a series for variable-length floating-point
14206         reductions.
14208 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14209             Alan Hayward  <alan.hayward@arm.com>
14210             David Sherwood  <david.sherwood@arm.com>
14212         * tree.h (build_index_vector): Declare.
14213         * tree.c (build_index_vector): New function.
14214         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
14215         of units as polynomial, forcibly converting it to a constant if
14216         vectorizable_reduction has already enforced the condition.
14217         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
14218         to create a {1,2,3,...} vector.
14219         (vectorizable_reduction): Treat the number of units as polynomial.
14220         Choose vectype_in based on the largest scalar element size rather
14221         than the smallest number of units.  Enforce the restrictions
14222         relied on above.
14224 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14225             Alan Hayward  <alan.hayward@arm.com>
14226             David Sherwood  <david.sherwood@arm.com>
14228         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
14229         number of units as polynomial.
14231 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14232             Alan Hayward  <alan.hayward@arm.com>
14233             David Sherwood  <david.sherwood@arm.com>
14235         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
14236         * target.def (autovectorize_vector_sizes): Return the vector sizes
14237         by pointer, using vector_sizes rather than a bitmask.
14238         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
14239         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
14240         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
14241         Likewise.
14242         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
14243         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
14244         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
14245         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
14246         * omp-general.c (omp_max_vf): Likewise.
14247         * omp-low.c (omp_clause_aligned_alignment): Likewise.
14248         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
14249         * tree-vect-loop.c (vect_analyze_loop): Likewise.
14250         * tree-vect-slp.c (vect_slp_bb): Likewise.
14251         * doc/tm.texi: Regenerate.
14252         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
14253         to a poly_uint64.
14254         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
14255         the vector size as a poly_uint64 rather than an unsigned int.
14256         (current_vector_size): Change from an unsigned int to a poly_uint64.
14257         (get_vectype_for_scalar_type): Update accordingly.
14258         * tree.h (build_truth_vector_type): Take the size and number of
14259         units as a poly_uint64 rather than an unsigned int.
14260         (build_vector_type): Add a temporary overload that takes
14261         the number of units as a poly_uint64 rather than an unsigned int.
14262         * tree.c (make_vector_type): Likewise.
14263         (build_truth_vector_type): Take the number of units as a poly_uint64
14264         rather than an unsigned int.
14266 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14267             Alan Hayward  <alan.hayward@arm.com>
14268             David Sherwood  <david.sherwood@arm.com>
14270         * target.def (get_mask_mode): Take the number of units and length
14271         as poly_uint64s rather than unsigned ints.
14272         * targhooks.h (default_get_mask_mode): Update accordingly.
14273         * targhooks.c (default_get_mask_mode): Likewise.
14274         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14275         * doc/tm.texi: Regenerate.
14277 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14278             Alan Hayward  <alan.hayward@arm.com>
14279             David Sherwood  <david.sherwood@arm.com>
14281         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
14282         * omp-general.c (omp_max_vf): Likewise.
14283         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
14284         (expand_omp_simd): Handle polynomial safelen.
14285         * omp-low.c (omplow_simd_context): Add a default constructor.
14286         (omplow_simd_context::max_vf): Change from int to poly_uint64.
14287         (lower_rec_simd_input_clauses): Update accordingly.
14288         (lower_rec_input_clauses): Likewise.
14290 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14291             Alan Hayward  <alan.hayward@arm.com>
14292             David Sherwood  <david.sherwood@arm.com>
14294         * tree-vectorizer.h (vect_nunits_for_cost): New function.
14295         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
14296         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
14297         (vect_analyze_slp_cost): Likewise.
14298         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
14299         (vect_model_load_cost): Likewise.
14301 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14302             Alan Hayward  <alan.hayward@arm.com>
14303             David Sherwood  <david.sherwood@arm.com>
14305         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
14306         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
14307         from an unsigned int * to a poly_uint64_pod *.
14308         (calculate_unrolling_factor): New function.
14309         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
14311 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14312             Alan Hayward  <alan.hayward@arm.com>
14313             David Sherwood  <david.sherwood@arm.com>
14315         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
14316         from an unsigned int to a poly_uint64.
14317         (_loop_vec_info::slp_unrolling_factor): Likewise.
14318         (_loop_vec_info::vectorization_factor): Change from an int
14319         to a poly_uint64.
14320         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
14321         (vect_get_num_vectors): New function.
14322         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
14323         (vect_get_num_copies): Use vect_get_num_vectors.
14324         (vect_analyze_data_ref_dependences): Change max_vf from an int *
14325         to an unsigned int *.
14326         (vect_analyze_data_refs): Change min_vf from an int * to a
14327         poly_uint64 *.
14328         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14329         than an unsigned HOST_WIDE_INT.
14330         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14331         (vect_analyze_data_ref_dependence): Change max_vf from an int *
14332         to an unsigned int *.
14333         (vect_analyze_data_ref_dependences): Likewise.
14334         (vect_compute_data_ref_alignment): Handle polynomial vf.
14335         (vect_enhance_data_refs_alignment): Likewise.
14336         (vect_prune_runtime_alias_test_list): Likewise.
14337         (vect_shift_permute_load_chain): Likewise.
14338         (vect_supportable_dr_alignment): Likewise.
14339         (dependence_distance_ge_vf): Take the vectorization factor as a
14340         poly_uint64 rather than an unsigned HOST_WIDE_INT.
14341         (vect_analyze_data_refs): Change min_vf from an int * to a
14342         poly_uint64 *.
14343         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
14344         vfm1 as a poly_uint64 rather than an int.  Make the same change
14345         for the returned bound_scalar.
14346         (vect_gen_vector_loop_niters): Handle polynomial vf.
14347         (vect_do_peeling): Likewise.  Update call to
14348         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
14349         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
14350         be constant.
14351         * tree-vect-loop.c (vect_determine_vectorization_factor)
14352         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
14353         (vect_get_known_peeling_cost): Likewise.
14354         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
14355         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
14356         (vect_transform_loop): Likewise.  Use the lowest possible VF when
14357         updating the upper bounds of the loop.
14358         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
14359         rather than an int.
14360         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
14361         polynomial unroll factors.
14362         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
14363         (vect_make_slp_decision): Likewise.
14364         (vect_supported_load_permutation_p): Likewise, and polynomial
14365         vf too.
14366         (vect_analyze_slp_cost): Handle polynomial vf.
14367         (vect_slp_analyze_node_operations): Likewise.
14368         (vect_slp_analyze_bb_1): Likewise.
14369         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14370         than an unsigned HOST_WIDE_INT.
14371         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
14372         (vectorizable_load): Handle polynomial vf.
14373         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
14374         a poly_uint64.
14375         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
14377 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14378             Alan Hayward  <alan.hayward@arm.com>
14379             David Sherwood  <david.sherwood@arm.com>
14381         * match.pd: Handle bit operations involving three constants
14382         and try to fold one pair.
14384 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14386         * tree-vect-loop-manip.c: Include gimple-fold.h.
14387         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
14388         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
14389         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
14390         Add a path that uses a step of VF instead of 1, but disable it
14391         for now.
14392         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
14393         and niters_no_overflow parameters.  Update calls to
14394         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
14395         Create a new SSA name if the latter choses to use a ste other
14396         than zero, and return it via niters_vector_mult_vf_var.
14397         * tree-vect-loop.c (vect_transform_loop): Update calls to
14398         vect_do_peeling, vect_gen_vector_loop_niters and
14399         slpeel_make_loop_iterate_ntimes.
14400         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
14401         (vect_gen_vector_loop_niters): Update declarations after above changes.
14403 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
14405         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
14406         128-bit round to integer instructions.
14407         (ceil<mode>2): Likewise.
14408         (btrunc<mode>2): Likewise.
14409         (round<mode>2): Likewise.
14411 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14413         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
14414         unaligned VSX load/store on P8/P9.
14415         (expand_block_clear): Allow the use of unaligned VSX
14416         load/store on P8/P9.
14418 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14420         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
14421         New function.
14422         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
14423         swap associated with both a load and a store.
14425 2018-01-02  Andrew Waterman  <andrew@sifive.com>
14427         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
14428         * config/riscv/riscv.md (clear_cache): Use it.
14430 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
14432         * web.c: Remove out-of-date comment.
14434 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14436         * expr.c (fixup_args_size_notes): Check that any existing
14437         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
14438         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
14439         (emit_single_push_insn): ...here.
14441 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14443         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
14444         (const_vector_encoded_nelts): New function.
14445         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
14446         (const_vector_int_elt, const_vector_elt): Declare.
14447         * emit-rtl.c (const_vector_int_elt_1): New function.
14448         (const_vector_elt): Likewise.
14449         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14450         of CONST_VECTOR_ELT.
14452 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14454         * expr.c: Include rtx-vector-builder.h.
14455         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14456         directly on the tree encoding.
14457         (const_vector_from_tree): Likewise.
14458         * optabs.c: Include rtx-vector-builder.h.
14459         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14460         sequence of "u" values.
14461         * vec-perm-indices.c: Include rtx-vector-builder.h.
14462         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14463         directly on the vec_perm_indices encoding.
14465 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14467         * doc/rtl.texi (const_vector): Describe new encoding scheme.
14468         * Makefile.in (OBJS): Add rtx-vector-builder.o.
14469         * rtx-vector-builder.h: New file.
14470         * rtx-vector-builder.c: Likewise.
14471         * rtl.h (rtx_def::u2): Add a const_vector field.
14472         (CONST_VECTOR_NPATTERNS): New macro.
14473         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14474         (CONST_VECTOR_DUPLICATE_P): Likewise.
14475         (CONST_VECTOR_STEPPED_P): Likewise.
14476         (CONST_VECTOR_ENCODED_ELT): Likewise.
14477         (const_vec_duplicate_p): Check for a duplicated vector encoding.
14478         (unwrap_const_vec_duplicate): Likewise.
14479         (const_vec_series_p): Check for a non-duplicated vector encoding.
14480         Say that the function only returns true for integer vectors.
14481         * emit-rtl.c: Include rtx-vector-builder.h.
14482         (gen_const_vec_duplicate_1): Delete.
14483         (gen_const_vector): Call gen_const_vec_duplicate instead of
14484         gen_const_vec_duplicate_1.
14485         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14486         (gen_const_vec_duplicate): Use rtx_vector_builder.
14487         (gen_const_vec_series): Likewise.
14488         (gen_rtx_CONST_VECTOR): Likewise.
14489         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
14490         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14491         Build a new vector rather than modifying a CONST_VECTOR in-place.
14492         (handle_special_swappables): Update call accordingly.
14493         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14494         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14495         Build a new vector rather than modifying a CONST_VECTOR in-place.
14496         (handle_special_swappables): Update call accordingly.
14498 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14500         * simplify-rtx.c (simplify_const_binary_operation): Use
14501         CONST_VECTOR_ELT instead of XVECEXP.
14503 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14505         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
14506         the selector elements to be different from the data elements
14507         if the selector is a VECTOR_CST.
14508         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
14509         ssizetype for the selector.
14511 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14513         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
14514         before testing each element individually.
14515         * tree-vect-generic.c (lower_vec_perm): Likewise.
14517 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14519         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
14520         * selftest-run-tests.c (selftest::run_tests): Call it.
14521         * vector-builder.h (vector_builder::operator ==): New function.
14522         (vector_builder::operator !=): Likewise.
14523         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
14524         (vec_perm_indices::all_from_input_p): New function.
14525         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14526         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
14527         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
14528         instead of reading the VECTOR_CST directly.  Detect whether both
14529         vector inputs are the same before constructing the vec_perm_indices,
14530         and update the number of inputs argument accordingly.  Use the
14531         utility functions added above.  Only construct sel2 if we need to.
14533 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14535         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
14536         the broadcast of the low byte.
14537         (expand_mult_highpart): Use an explicit encoding for the permutes.
14538         * optabs-query.c (can_mult_highpart_p): Likewise.
14539         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14540         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14541         (vectorizable_bswap): Likewise.
14542         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
14543         explicit encoding for the power-of-2 permutes.
14544         (vect_permute_store_chain): Likewise.
14545         (vect_grouped_load_supported): Likewise.
14546         (vect_permute_load_chain): Likewise.
14548 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14550         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
14551         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
14552         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
14553         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14554         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14555         (vect_gen_perm_mask_any): Likewise.
14557 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14559         * int-vector-builder.h: New file.
14560         * vec-perm-indices.h: Include int-vector-builder.h.
14561         (vec_perm_indices): Redefine as an int_vector_builder.
14562         (auto_vec_perm_indices): Delete.
14563         (vec_perm_builder): Redefine as a stand-alone class.
14564         (vec_perm_indices::vec_perm_indices): New function.
14565         (vec_perm_indices::clamp): Likewise.
14566         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14567         (vec_perm_indices::new_vector): New function.
14568         (vec_perm_indices::new_expanded_vector): Update for new
14569         vec_perm_indices class.
14570         (vec_perm_indices::rotate_inputs): New function.
14571         (vec_perm_indices::all_in_range_p): Operate directly on the
14572         encoded form, without computing elided elements.
14573         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14574         encoding.  Update for new vec_perm_indices class.
14575         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14576         the given vec_perm_builder.
14577         (expand_vec_perm_var): Update vec_perm_builder constructor.
14578         (expand_mult_highpart): Use vec_perm_builder instead of
14579         auto_vec_perm_indices.
14580         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14581         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
14582         or double series encoding as appropriate.
14583         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14584         vec_perm_indices instead of auto_vec_perm_indices.
14585         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14586         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14587         (vect_permute_store_chain): Likewise.
14588         (vect_grouped_load_supported): Likewise.
14589         (vect_permute_load_chain): Likewise.
14590         (vect_shift_permute_load_chain): Likewise.
14591         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14592         (vect_transform_slp_perm_load): Likewise.
14593         (vect_schedule_slp_instance): Likewise.
14594         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14595         (vectorizable_mask_load_store): Likewise.
14596         (vectorizable_bswap): Likewise.
14597         (vectorizable_store): Likewise.
14598         (vectorizable_load): Likewise.
14599         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14600         vec_perm_indices instead of auto_vec_perm_indices.  Use
14601         tree_to_vec_perm_builder to read the vector from a tree.
14602         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14603         vec_perm_builder instead of a vec_perm_indices.
14604         (have_whole_vector_shift): Use vec_perm_builder and
14605         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
14606         truncation to calc_vec_perm_mask_for_shift.
14607         (vect_create_epilog_for_reduction): Likewise.
14608         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14609         from auto_vec_perm_indices to vec_perm_indices.
14610         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14611         instead of changing individual elements.
14612         (aarch64_vectorize_vec_perm_const): Use new_vector to install
14613         the vector in d.perm.
14614         * config/arm/arm.c (expand_vec_perm_d::perm): Change
14615         from auto_vec_perm_indices to vec_perm_indices.
14616         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14617         instead of changing individual elements.
14618         (arm_vectorize_vec_perm_const): Use new_vector to install
14619         the vector in d.perm.
14620         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14621         Update vec_perm_builder constructor.
14622         (rs6000_expand_interleave): Likewise.
14623         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14624         (rs6000_expand_interleave): Likewise.
14626 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14628         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14629         to qimode could truncate the indices.
14630         * optabs.c (expand_vec_perm_var): Likewise.
14632 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14634         * Makefile.in (OBJS): Add vec-perm-indices.o.
14635         * vec-perm-indices.h: New file.
14636         * vec-perm-indices.c: Likewise.
14637         * target.h (vec_perm_indices): Replace with a forward class
14638         declaration.
14639         (auto_vec_perm_indices): Move to vec-perm-indices.h.
14640         * optabs.h: Include vec-perm-indices.h.
14641         (expand_vec_perm): Delete.
14642         (selector_fits_mode_p, expand_vec_perm_var): Declare.
14643         (expand_vec_perm_const): Declare.
14644         * target.def (vec_perm_const_ok): Replace with...
14645         (vec_perm_const): ...this new hook.
14646         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14647         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14648         * doc/tm.texi: Regenerate.
14649         * optabs.def (vec_perm_const): Delete.
14650         * doc/md.texi (vec_perm_const): Likewise.
14651         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14652         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14653         expand_vec_perm for constant permutation vectors.  Assert that
14654         the mode of variable permutation vectors is the integer equivalent
14655         of the mode that is being permuted.
14656         * optabs-query.h (selector_fits_mode_p): Declare.
14657         * optabs-query.c: Include vec-perm-indices.h.
14658         (selector_fits_mode_p): New function.
14659         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14660         is defined, instead of checking whether the vec_perm_const_optab
14661         exists.  Use targetm.vectorize.vec_perm_const instead of
14662         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
14663         fit in the vector mode before using a variable permute.
14664         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14665         vec_perm_indices instead of an rtx.
14666         (expand_vec_perm): Replace with...
14667         (expand_vec_perm_const): ...this new function.  Take the selector
14668         as a vec_perm_indices rather than an rtx.  Also take the mode of
14669         the selector.  Update call to shift_amt_for_vec_perm_mask.
14670         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14671         Use vec_perm_indices::new_expanded_vector to expand the original
14672         selector into bytes.  Check whether the indices fit in the vector
14673         mode before using a variable permute.
14674         (expand_vec_perm_var): Make global.
14675         (expand_mult_highpart): Use expand_vec_perm_const.
14676         * fold-const.c: Includes vec-perm-indices.h.
14677         * tree-ssa-forwprop.c: Likewise.
14678         * tree-vect-data-refs.c: Likewise.
14679         * tree-vect-generic.c: Likewise.
14680         * tree-vect-loop.c: Likewise.
14681         * tree-vect-slp.c: Likewise.
14682         * tree-vect-stmts.c: Likewise.
14683         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14684         Delete.
14685         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14686         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14687         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14688         (aarch64_vectorize_vec_perm_const): ...this new function.
14689         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14690         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14691         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14692         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14693         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14694         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14695         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14696         into...
14697         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14698         check for NEON modes.
14699         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14700         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14701         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14702         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14703         into...
14704         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14705         the old VEC_PERM_CONST conditions.
14706         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14707         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14708         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14709         (ia64_vectorize_vec_perm_const_ok): Merge into...
14710         (ia64_vectorize_vec_perm_const): ...this new function.
14711         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14712         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14713         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14714         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14715         * config/mips/mips.c (mips_expand_vec_perm_const)
14716         (mips_vectorize_vec_perm_const_ok): Merge into...
14717         (mips_vectorize_vec_perm_const): ...this new function.
14718         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14719         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14720         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14721         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14722         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14723         (rs6000_expand_vec_perm_const): Delete.
14724         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14725         Delete.
14726         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14727         (altivec_expand_vec_perm_const_le): Take each operand individually.
14728         Operate on constant selectors rather than rtxes.
14729         (altivec_expand_vec_perm_const): Likewise.  Update call to
14730         altivec_expand_vec_perm_const_le.
14731         (rs6000_expand_vec_perm_const): Delete.
14732         (rs6000_vectorize_vec_perm_const_ok): Delete.
14733         (rs6000_vectorize_vec_perm_const): New function.
14734         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14735         an element count and rtx array.
14736         (rs6000_expand_extract_even): Update call accordingly.
14737         (rs6000_expand_interleave): Likewise.
14738         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14739         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14740         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14741         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14742         (rs6000_expand_vec_perm_const): Delete.
14743         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14744         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14745         (altivec_expand_vec_perm_const_le): Take each operand individually.
14746         Operate on constant selectors rather than rtxes.
14747         (altivec_expand_vec_perm_const): Likewise.  Update call to
14748         altivec_expand_vec_perm_const_le.
14749         (rs6000_expand_vec_perm_const): Delete.
14750         (rs6000_vectorize_vec_perm_const_ok): Delete.
14751         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14752         reference to the SPE evmerge intructions.
14753         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14754         an element count and rtx array.
14755         (rs6000_expand_extract_even): Update call accordingly.
14756         (rs6000_expand_interleave): Likewise.
14757         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14758         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14759         new function.
14760         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14762 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14764         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14765         vector mode and that that mode matches the mode of the data
14766         being permuted.
14767         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14768         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14769         directly using expand_vec_perm_1 when forcing selectors into
14770         registers.
14771         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14773 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14775         * optabs-query.h (can_vec_perm_p): Delete.
14776         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14777         * optabs-query.c (can_vec_perm_p): Split into...
14778         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14779         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14780         particular selector is valid.
14781         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14782         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14783         (vect_grouped_load_supported): Likewise.
14784         (vect_shift_permute_load_chain): Likewise.
14785         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14786         (vect_transform_slp_perm_load): Likewise.
14787         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14788         (vectorizable_bswap): Likewise.
14789         (vect_gen_perm_mask_checked): Likewise.
14790         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14791         implementations of variable permutation vectors into account
14792         when deciding which selector to use.
14793         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14794         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14795         with a false third argument.
14796         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14797         to test whether the constant selector is valid and can_vec_perm_var_p
14798         to test whether a variable selector is valid.
14800 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14802         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14803         * optabs-query.c (can_vec_perm_p): Likewise.
14804         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14805         instead of vec_perm_indices.
14806         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14807         (vect_gen_perm_mask_checked): Likewise,
14808         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14809         (vect_gen_perm_mask_checked): Likewise,
14811 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14813         * optabs-query.h (qimode_for_vec_perm): Declare.
14814         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14815         (qimode_for_vec_perm): ...this new function.
14816         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14818 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14820         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14821         does not have a conditional at the top.
14823 2018-01-02  Richard Biener  <rguenther@suse.de>
14825         * ipa-inline.c (big_speedup_p): Fix expression.
14827 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14829         PR target/81616
14830         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14831         for generic 4->6.
14833 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14835         PR target/81616
14836         Generic tuning.
14837         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14838         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14839         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14840         cond_taken_branch_cost 3->4.
14842 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14844         PR tree-optimization/83581
14845         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14846         TODO_cleanup_cfg if any changes have been made.
14848         PR middle-end/83608
14849         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14850         convert_modes if target mode has the right side, but different mode
14851         class.
14853         PR middle-end/83609
14854         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14855         last argument when extracting from CONCAT.  If either from_real or
14856         from_imag is NULL, use expansion through memory.  If result is not
14857         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14858         the parts directly to inner mode, if even that fails, use expansion
14859         through memory.
14861         PR middle-end/83623
14862         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14863         check for bswap in mode rather than HImode and use that in expand_unop
14864         too.
14866 Copyright (C) 2018 Free Software Foundation, Inc.
14868 Copying and distribution of this file, with or without modification,
14869 are permitted in any medium without royalty provided the copyright
14870 notice and this notice are preserved.