re PR middle-end/85879 (ICE in expand_debug_locations, at cfgexpand.c:5405)
[official-gcc.git] / gcc / ChangeLog
blobc9cf570599c20c998db3db5fb729ce5171c67497
1 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
2             Cesar Philippidis  <cesar@codesourcery.com>
4         PR middle-end/85879
5         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6         when emitting error on private/firstprivate reductions.
7         * omp-low.c (lower_omp_target): Avoid reference-type processing
8         on pointers for firstprivate clause.
10 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
12         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13         (st1x2): Likewise.
14         (st1x3): Likewise.
15         * config/aarch64/aarch64-simd.md
16         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17         (aarch64_ld1_x3_<mode>): Likewise
18         (aarch64_st1x2<VALLDIF:mode>): Likewise
19         (aarch64_st1_x2_<mode>): Likewise
20         (aarch64_st1x3<VALLDIF:mode>): Likewise
21         (aarch64_st1_x3_<mode>): Likewise
22         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
23         (vld1_s8_x3): Likewise.
24         (vld1_u16_x3): Likewise.
25         (vld1_s16_x3): Likewise.
26         (vld1_u32_x3): Likewise.
27         (vld1_s32_x3): Likewise.
28         (vld1_u64_x3): Likewise.
29         (vld1_s64_x3): Likewise.
30         (vld1_f16_x3): Likewise.
31         (vld1_f32_x3): Likewise.
32         (vld1_f64_x3): Likewise.
33         (vld1_p8_x3): Likewise.
34         (vld1_p16_x3): Likewise.
35         (vld1_p64_x3): Likewise.
36         (vld1q_u8_x3): Likewise.
37         (vld1q_s8_x3): Likewise.
38         (vld1q_u16_x3): Likewise.
39         (vld1q_s16_x3): Likewise.
40         (vld1q_u32_x3): Likewise.
41         (vld1q_s32_x3): Likewise.
42         (vld1q_u64_x3): Likewise.
43         (vld1q_s64_x3): Likewise.
44         (vld1q_f16_x3): Likewise.
45         (vld1q_f32_x3): Likewise.
46         (vld1q_f64_x3): Likewise.
47         (vld1q_p8_x3): Likewise.
48         (vld1q_p16_x3): Likewise.
49         (vld1q_p64_x3): Likewise.
50         (vst1_s64_x2): Likewise.
51         (vst1_u64_x2): Likewise.
52         (vst1_f64_x2): Likewise.
53         (vst1_s8_x2): Likewise.
54         (vst1_p8_x2): Likewise.
55         (vst1_s16_x2): Likewise.
56         (vst1_p16_x2): Likewise.
57         (vst1_s32_x2): Likewise.
58         (vst1_u8_x2): Likewise.
59         (vst1_u16_x2): Likewise.
60         (vst1_u32_x2): Likewise.
61         (vst1_f16_x2): Likewise.
62         (vst1_f32_x2): Likewise.
63         (vst1_p64_x2): Likewise.
64         (vst1q_s8_x2): Likewise.
65         (vst1q_p8_x2): Likewise.
66         (vst1q_s16_x2): Likewise.
67         (vst1q_p16_x2): Likewise.
68         (vst1q_s32_x2): Likewise.
69         (vst1q_s64_x2): Likewise.
70         (vst1q_u8_x2): Likewise.
71         (vst1q_u16_x2): Likewise.
72         (vst1q_u32_x2): Likewise.
73         (vst1q_u64_x2): Likewise.
74         (vst1q_f16_x2): Likewise.
75         (vst1q_f32_x2): Likewise.
76         (vst1q_f64_x2): Likewise.
77         (vst1q_p64_x2): Likewise.
78         (vst1_s64_x3): Likewise.
79         (vst1_u64_x3): Likewise.
80         (vst1_f64_x3): Likewise.
81         (vst1_s8_x3): Likewise.
82         (vst1_p8_x3): Likewise.
83         (vst1_s16_x3): Likewise.
84         (vst1_p16_x3): Likewise.
85         (vst1_s32_x3): Likewise.
86         (vst1_u8_x3): Likewise.
87         (vst1_u16_x3): Likewise.
88         (vst1_u32_x3): Likewise.
89         (vst1_f16_x3): Likewise.
90         (vst1_f32_x3): Likewise.
91         (vst1_p64_x3): Likewise.
92         (vst1q_s8_x3): Likewise.
93         (vst1q_p8_x3): Likewise.
94         (vst1q_s16_x3): Likewise.
95         (vst1q_p16_x3): Likewise.
96         (vst1q_s32_x3): Likewise.
97         (vst1q_s64_x3): Likewise.
98         (vst1q_u8_x3): Likewise.
99         (vst1q_u16_x3): Likewise.
100         (vst1q_u32_x3): Likewise.
101         (vst1q_u64_x3): Likewise.
102         (vst1q_f16_x3): Likewise.
103         (vst1q_f32_x3): Likewise.
104         (vst1q_f64_x3): Likewise.
105         (vst1q_p64_x3): Likewise.
107 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
109         * config/msp430/msp430.c (msp430_output_labelref): Prepend
110         user_label_prefix to name.
112         * tree-core.h: Update comment about the format of NAME string
113         passed to handler in attribute_spec.
115         * config/msp430/msp430.md: Remove erroneous subreg expression from
116         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
117         zero_extend{q,h}isi2.
119 2018-05-30  Borislav Petkov  <bp@suse.de>
121         * doc/extend.texi: Document some architecture specific
122         constraints and sort entries.
124 2018-05-30  Martin Sebor  <msebor@redhat.com>
126         PR middle-end/85369
127         * builtins.c (expand_builtin_stpcpy_1): New function.
128         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
129         only if the former succeeds.
131 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
133         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
134         in saphira.
136 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
138         * doc/invoke.texi (-flinker-output): Document
140 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
142         * passes.c (ipa_write_summaries): Only modify statements if body
143         is in memory.
144         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
145         incrementally linking.
146         (ipa_passes): Likewise.
147         * lto-cgraph.c (lto_output_node): When incrementally linking do not
148         pass down resolution info.
149         * common.opt (flag_incremental_link): Update info.
150         * gcc.c (plugin specs): Turn flinker-output=* to
151         -plugin-opt=-linker-output-known
152         * toplev.c (compile_file): Also cut compilation when doing incremental
153         link.
154         * flag-types. (enum lto_partition_model): Add
155         LTO_LINKER_OUTPUT_NOLTOREL.
156         (invoke.texi): Add -flinker-output docs.
157         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
158         link same way as WPA; do not stream in dead initializers.
160         * dwarf2out.c (dwarf2out_die_ref_for_decl,
161         darf2out_register_external_decl): Support incremental link.
163 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
165         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
167 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
169         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
170         it down to simple_object_copy_lto_debug_sections.
171         (run_gcc): Determine incremental LTO link time and configure
172         lto1 into non-wpa mode, disable renaming of debug sections.
174 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
176         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
177         descriptions of various incorrectly documented functions.
179 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
181         Revert:
182         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
183         address check not strict.
185 2018-05-30  Richard Biener  <rguenther@suse.de>
187         PR tree-optimization/85964
188         * tracer.c (better_p): Drop initialized count check, we only
189         call the function with initialized counts now.
190         (find_best_successor): Do find a best edge if one
191         has uninitialized count.
192         (find_best_predecessor): Likewise.  Do BB frequency check only
193         if count is initialized.
195 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
197         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
198         (aarch64_ldrstr_offset_compare): New.
199         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
200         load/store orderings.
201         (aarch64_gen_adjusted_ldpstp): Likewise.
203 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
205         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
206         Check for subset of GENERAL_REGS and FP_REGS.
207         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
208         r=w alternative.
210 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
212         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
213         and wi::to_poly_offset.  Add the current offset and then check
214         whether the sum fits, rather than using an unchecked addition of
215         a checked term.  Check for a shwi rather than a uhwi.
216         * expr.c (get_bit_range): Use tree_to_poly_uint64.
217         (store_constructor): Use poly_int_tree_p.
218         (expand_expr_real_1): Likewise.
219         * function.c (assign_temp): Likewise.
220         * fold-const.c (const_binop): Use poly_int_tree_p and
221         wi::to_poly_offset.
222         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
223         division.
224         * ipa-icf-gimple.c (func_checker::compare_operand): Use
225         to_poly_offset for MEM offsets.
226         * ipa-icf.c (sem_variable::equals): Likewise.
227         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
228         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
229         wi::to_poly_offset for BIT_FIELD_REF offsets.
230         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
231         wi::to_poly_offset.
232         * var-tracking.c (emit_note_insn_var_location): Use
233         tree_to_poly_uint64.
235 2018-05-29  Jim Wilson  <jimw@sifive.com>
237         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
239 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
241         PR target/85950
242         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
243         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
244         sequence.
245         (sse4_1_round<mode>2): Use nonimmediate_operand
246         for operand 1 predicate.
248 2018-05-29  Martin Sebor  <msebor@redhat.com>
249             Richard Biener  <rguenther@suse.de>
251         PR testsuite/85888
252         * calls.c (get_size_range): Call determine_value_range instead
253         of get_value_range..
254         * tree-vrp.h (determine_value_range): Declared new function.
255         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
257 2018-05-29  Richard Biener  <rguenther@suse.de>
259         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
260         sure to use non-pattern stmts for get_earlier_stmt arguments.
261         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
262         called on pattern stmts.
263         (get_later_stmt): Likewise.
265 2018-05-29  Martin Liska  <mliska@suse.cz>
267         PR gcov-profile/85759
268         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
269         env variables.
271 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
273         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
274         VEC_UNPACK_*_EXPR.
275         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
276         VEC_PACK_*_EXPR.
278         PR target/85918
279         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
280         VEC_PACK_FLOAT_EXPR): New tree codes.
281         * tree-pretty-print.c (op_code_prio): Handle
282         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
283         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
284         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
285         * tree-inline.c (estimate_operator_cost): Likewise.
286         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
287         * fold-const.c (const_binop): Likewise.
288         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
289         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
290         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
291         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
292         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
293         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
294         * expr.c (expand_expr_real_2): Likewise.
295         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
296         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
297         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
298         optabs.
299         * optabs.c (expand_widen_pattern_expr): For
300         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
301         sign from result type rather than operand's type.
302         (expand_binop_directly): For vec_packu_float_optab and
303         vec_packs_float_optab allow result type to be different from operand's
304         type.
305         * optabs-tree.c (optab_for_tree_code): Handle
306         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
307         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
308         * tree-vect-generic.c (expand_vector_operations_1):  Handle
309         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
310         VEC_PACK_FLOAT_EXPR.
311         * tree-vect-stmts.c (supportable_widening_operation): Handle
312         FIX_TRUNC_EXPR.
313         (supportable_narrowing_operation): Handle FLOAT_EXPR.
314         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
315         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
316         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
317         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
318         mode attributes.
319         (vec_pack<floatprefix>_float_<mode>): New expander.
320         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
321         attributes.
322         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
323         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
324         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
325         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
326         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
327         Document.
328         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
329         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
330         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
331         VEC_PACK_FLOAT_EXPR): Document.
333 2018-05-29  Richard Biener  <rguenther@suse.de>
335         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
336         member.
337         (stmt_vec_info_vec): Make pointer.
338         (init_stmt_vec_info_vec): Remove.
339         (free_stmt_vec_info_vec): Likewise.
340         (set_stmt_vec_info_vec): New function.
341         (free_stmt_vec_infos): Likewise.
342         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
343         (set_vinfo_for_stmt): Likewise.
344         (get_earlier_stmt): Likewise.
345         (get_later_stmt): Likewise.
346         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
347         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
348         (vec_info::~vec_info): Free stmt_vec_infos.
349         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
350         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
351         (pass_slp_vectorize::execute): Likewise.
352         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
353         (free_stmt_vec_info_vec): Likewise.
354         (set_stmt_vec_info_vec): New function.
355         (free_stmt_vec_infos): Likewise.
356         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
357         the global stmt_vec_info_vec.
358         * tree-parloops.c (gather_scalar_reductions): Use
359         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
360         vector.
362 2018-05-29  Richard Biener  <rguenther@suse.de>
364         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
366 2018-05-29  Martin Liska  <mliska@suse.cz>
367             David Malcolm  <dmalcolm@redhat.com>
369         * vec.c (test_reverse): New.
370         (vec_c_tests): Add new test.
371         * vec.h (vl_ptr>::reverse): New function.
373 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
375         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
377         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
378         and later.
380 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
382         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
384 2018-05-28  Richard Biener  <rguenther@suse.de>
386         PR tree-optimization/85933
387         * tree-vect-data-refs.c (vect_record_base_alignments): Only
388         look at stmts marked as vectorizable.
390 2018-05-28  Richard Biener  <rguenther@suse.de>
392         PR tree-optimization/85934
393         * tree-vect-generic.c (expand_vector_operations_1): Hoist
394         vector boolean check before scalar optimization.
396 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
398         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
399         for armv5te.
401 2018-05-28  Mark Wielaard  <mark@klomp.org>
403         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
404         if it is an expression containing a minus sign.
406 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
408         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
410 2018-05-27  Paul Koning  <ni1d@arrl.net>
412         * config/pdp11/pdp11.md (truncsihi2): Remove.
414 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
415             Chung-Ju Wu  <jasonwucj@gmail.com>
417         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
418         implementation.
419         (unaligned_store_dw): Ditto.
420         * config/nds32/nds32-memory-manipulation.c
421         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
422         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
423         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
424         (emit_setmem_word_loop): Rename to ...
425         (emit_setmem_doubleword_loop): ... this.
426         (nds32_gen_dup_4_byte_to_word_value): New function.
427         (nds32_gen_dup_8_byte_to_double_word_value): New function.
428         (nds32_expand_setmem_loop): Refine implementation.
429         (nds32_expand_setmem_loop_v3m): Ditto.
430         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
431         pattern.
433 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
435         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
437 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
439         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
440         (nds32_init_machine_status): Initialize machine->attr_naked_p and
441         machine->attr_no_prologue_p.
442         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
443         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
444         (nds32_expand_epilogue): Consider attr_naked_p.
445         (nds32_expand_epilogue_v3pop): Likewise.
446         (nds32_can_use_return_insn): Likewise.
447         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
448         attr_no_prologue_p fields.
449         * config/nds32/nds32.opt (mret-in-naked-func): New option.
451 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
453         PR target/85918
454         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
455         attributes.
456         * config/i386/sse.md
457         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
458         Rename to ...
459         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
460         ... this.
461         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
462         Rename to ...
463         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
464         ... this.
465         (*<floatsuffix>floatv2div2sf2): Rename to ...
466         (*float<floatunssuffix>v2div2sf2): ... this.
467         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
468         (float<floatunssuffix>v2div2sf2_mask): ... this.
469         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
470         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
471         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
472         to ...
473         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
474         ... this.
475         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
476         Rename to ...
477         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
478         ... this.
479         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
480         Rename to ...
481         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
482         ... this.
483         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
484         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
485         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
486         gen_ufix_truncv8dfv8si2.
487         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
488         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
489         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
490         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
491         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
492         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
493         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
494         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
496 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
498         PR target/85900
499         PR target/85345
500         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
502 2018-05-25  Jim Wilson  <jimw@sifive.com>
504         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
505         * config/riscv/riscv.c (struct machine_function): Add
506         interrupt_handler_p and attribute_checked_p fields.
507         (riscv_attribute_table): Add interrupt.
508         (riscv_interrupt_type_p): New.
509         (riscv_save_reg_p): Save extra regs for interrupt handler.
510         (riscv_use_save_libcall): Return false  for interrupt handler.
511         (riscv_first_stack_step): Add forward declaration.
512         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
513         for interrupt handler with large frame.  Use it for saved reg list.
514         (riscv_expand_prologue): Move flag_stack_usage_info support to
515         eliminate duplication.
516         (riscv_expand_epilogue): Generate mret for interrupt handler.
517         (riscv_epilogue_uses): New.
518         (riscv_can_use_return_insn): Return false for interrupt handler.
519         (riscv_function_ok_for_sibcall): Likewise.
520         (riscv_set_current_function): Add interrupt handler support.
521         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
522         * config/riscv/riscv.md (UNSPECV_MRET): New.
523         (GP_REGNUM): New.
524         (riscv_frflags, riscv_fsflags): Use tab after opcode.
525         (riscv_mret): New.
526         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
528 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
530         PR tree-optimization/85712
531         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
532         this candidate has already been replaced in-situ by a copy.
534 2018-05-25  Jason Merrill  <jason@redhat.com>
536         PR c++/80485 - inline function non-zero address.
537         * symtab.c (nonzero_address): Check DECL_COMDAT.
539 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
541         PR target/83628
542         * config/alpha/alpha.md (ashlsi3): New insn pattern.
543         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
544         extension of SImode operation.  Use const123_operand predicate.
545         (*saddsi_1): Remove.
546         (*saddl_se_1): Ditto.
547         (*ssubsi_1): Ditto.
548         (*ssubl_se_1): Ditto.
549         * config/alpha/predicates.md (const123_operand): New predicate.
550         * config/alpha/constraints.md (P): Use IN_RANGE.
552 2018-05-25  Richard Biener  <rguenther@suse.de>
554         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
555         defaulted to true.
556         (ref_maybe_used_by_stmt_p): Likewise.
557         (stmt_may_clobber_ref_p): Likewise.
558         (stmt_may_clobber_ref_p_1): Likewise.
559         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
560         and pass it along.
561         (ref_maybe_used_by_stmt_p): Likewise.
562         (stmt_may_clobber_ref_p): Likewise.
563         (stmt_may_clobber_ref_p_1): Likewise.
564         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
565         the alias oracle to disambiguate DRs with stmts DR analysis
566         couldn't handle.
567         (vect_analyze_data_refs): Do not give up on not analyzable
568         DRs for BB vectorization.  Remove code truncating the dataref
569         vector.
571 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
573         PR target/85832
574         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
575         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
576         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
578 2018-05-25  Richard Biener  <rguenther@suse.de>
580         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
581         function, combining stmt data ref gathering and fatal analysis
582         parts.
583         (vect_analyze_data_refs): Remove now redudnant code and simplify.
584         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
585         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
586         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
587         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
589 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
591         PR tree-optimization/85720
592         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
593         SCC if all partitions are builtins.
594         (version_loop_by_alias_check): New parameter.  Generate cancelable
595         runtime alias check if all partitions are builtins.
596         (distribute_loop): Update call to above function.
598 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
600         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
601         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
602         (parm_default_def_partition_arg): Ditto.
603         (set_parm_default_def_partition): Ditto.
604         (get_parm_default_def_partitions): Ditto and make it static.
605         (get_undefined_value_partitions): Ditto and make it static.
606         (remove_ssa_form): Refactor call to init_var_map here.
607         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
608         computation for loop region.
609         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
610         (register_default_def): Delete.
611         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
612         (parm_default_def_partition_arg): Ditto.
613         (set_parm_default_def_partition): Ditto.
614         (get_parm_default_def_partitions): Ditto and make it static.
615         (get_undefined_value_partitions): Ditto and make it static.
616         (coalesce_with_default, coalesce_with_default): Update comment.
617         (create_coalesce_list_for_region): New func factored out from
618         create_outofssa_var_map.
619         (populate_coalesce_list_for_outofssa): New func factored out from
620         create_outofssa_var_map and coalesce_ssa_name.
621         (create_outofssa_var_map): Delete.
622         (coalesce_ssa_name): Refactor to support live range computation.
623         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
624         (get_parm_default_def_partitions): Delete.
625         (get_undefined_value_partitions): Ditto.
626         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
627         computation for loop region.
628         (new_tree_live_info, loe_visit_block): Ditto.
629         (live_worklist, set_var_live_on_entry): Ditto.
630         (calculate_live_on_exit, verify_live_on_entry): Ditto.
631         * tree-ssa-live.h (struct _var_map): New fields.
632         (init_var_map): Change decl.
633         (region_contains_p): New.
635 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
637         * tree-ssa-live.h (live_merge_and_clear): Delete.
639 2018-05-25  Richard Biener  <rguenther@suse.de>
641         PR c++/85912
642         * tree-dump.c (dequeue_and_dump): Remove access to removed
643         operand 2 of a SWITCH_EXPR.
645 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
647         * doc/sourcebuild.texi (vect_double_cond_arith): Include
648         multiplication and division.
649         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
650         (cond_udiv@var{m}, cond_umod@var{m}): Document.
651         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
652         (cond_udiv_optab, cond_umod_optab): New optabs.
653         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
654         (IFN_COND_RDIV): New internal functions.
655         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
656         TRUNC_MOD_EXPR and RDIV_EXPR.
657         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
658         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
659         New unspecs.
660         (SVE_INT_BINARY): Include mult.
661         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
662         (optab, sve_int_op): Handle mult.
663         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
664         UNSPEC_COND_DIV.
665         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
666         for SVE_INT_BINARY_SD.
668 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
670         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
671         (optab, sve_int_op): Handle div and udiv.
672         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
673         for SVE_INT_BINARY_SD.
674         (*<optab><mode>3): New insn for the same.
676 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
678         * tree-vect-patterns.c: Include predict.h.
679         (vect_recog_divmod_pattern): Restrict check for division support
680         to when optimizing for size.
682 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
684         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
685         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
686         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
687         (gimple_match_op::set_op): Likewise.
688         (gimple_resimplify4): Declare.
689         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
690         (expr::gen_transform): Likewise.
691         (decision_tree::gen): Generate a simplification routine for 4 operands.
692         * gimple-match-head.c (gimple_simplify): Add an overload for
693         4 operands.  In the top-level function, handle up to 4 call
694         arguments and call gimple_resimplify4.
695         (gimple_resimplify4): New function.
696         (build_call_internal): Pass a fourth operand.
697         (maybe_push_to_seq): Likewise.
698         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
699         Fold VEC_COND_EXPRs of an operation and a default value into
700         an IFN_COND_* function if possible.
701         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
702         New unspecs.
703         (SVE_COND_FP_BINARY): Include them.
704         (optab, sve_fp_op): Handle them.
705         (SVE_INT_BINARY_REV): New code iterator.
706         (SVE_COND_FP_BINARY_REV): New int iterator.
707         (commutative): New int attribute.
708         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
709         Declare.
710         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
711         function.
712         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
713         (*cond_<optab><mode>): New patterns for reversed operands.
715 2018-05-25  Richard Biener  <rguenther@suse.de>
717         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
718         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
719         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
720         (STMT_VINFO_GROUPED_ACCESS): Adjust.
721         * tree-vect-data-refs.c (everywhere): Adjust users.
722         * tree-vect-loop.c (everywhere): Likewise.
723         * tree-vect-slp.c (everywhere): Likewise.
724         * tree-vect-stmts.c (everywhere): Likewise.
725         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
727 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
729         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
730         Rename to...
731         (gcc_cv_as_section_exclude): ... this.
732         Try Solaris as #exclude syntax.
733         * configure: Regenerate.
734         * config.in: Regenerate.
735         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
736         SECTION_EXCLUDE.
737         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
738         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
740         * varasm.c (default_elf_asm_named_section): Don't check if
741         HAVE_GAS_SECTION_EXCLUDE is defined.
743 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
745         * doc/md.texi: Update the documentation of the cond_* optabs
746         to mention the new final operand.  Fix GET_MODE_NUNITS call.
747         Describe the scalar case too.
748         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
749         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
750         instead of 2.
751         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
752         (get_conditional_internal_fn): Update comment.
753         * tree-vect-loop.c (vectorizable_reduction): Pass the original
754         accumulator value as a final argument to conditional functions.
755         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
756         a define_expand and add an "else" operand.  Assert for now that
757         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
758         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
759         (*cond_<optab><mode>): New patterns.
760         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
761         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
762         (UNSPEC_COND_EOR): Delete.
763         (optab): Remove associated mappings.
764         (SVE_INT_BINARY): New code iterator.
765         (sve_int_op): Remove int attribute and add "minus" to the code
766         attribute.
767         (SVE_COND_INT_OP): Delete.
768         (SVE_COND_FP_OP): Rename to...
769         (SVE_COND_FP_BINARY): ...this.
771 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
773         * optabs.c (can_reuse_operands_p): New function.
774         (maybe_legitimize_operands): Try to reuse the results for
775         earlier operands.
777 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
779         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
780         Add {q} suffix to insn mnemonic.
782 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
784         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
785         (msp430_warn_func_return): New.
787 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
789         * fold-const.c (tree_nonzero_bits): New function.
790         * fold-const.h (tree_nonzero_bits): Likewise.
791         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
792         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
794 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
796         PR target/85900
797         PR target/85345
798         * varasm.c (assemble_alias): Check ifunc_resolver only on
799         FUNCTION_DECL.
801 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
803         PR target/85903
804         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
805         when memory input operand is handled.
807 2018-05-24  Luis Machado  <luis.machado@linaro.org>
809         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
810         global.
811         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
813 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
815         * match.pd: Delay FMA folds until after vectorization.
817 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
819         PR target/83009
820         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
821         address check not strict.
823 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
825         * gimple-match.h (gimple_match_op): New class.
826         (mprts_hook): Replace parameters with a gimple_match_op *.
827         (maybe_build_generic_op): Likewise.
828         (gimple_simplified_result_is_gimple_val): Replace parameters with
829         a const gimple_match_op *.
830         (gimple_simplify): Replace code_helper * and tree * parameters with
831         a gimple_match_op * parameter.
832         (gimple_resimplify1): Replace code_helper *, tree and tree *
833         parameters with a gimple_match_op * parameter.
834         (gimple_resimplify2): Likewise.
835         (gimple_resimplify3): Likewise.
836         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
837         parameters with a gimple_match_op * parameter.
838         * gimple-match-head.c (gimple_simplify): Change prototypes of
839         auto-generated functions to take a gimple_match_op * instead of
840         separate code_helper * and tree * parameters.  Make the same
841         change in the top-level overload and update calls to the
842         gimple_resimplify routines.  Update calls to the auto-generated
843         functions and to maybe_push_res_to_seq in the publicly-facing
844         operation-specific gimple_simplify overloads.
845         (gimple_match_op::MAX_NUM_OPS): Define.
846         (gimple_resimplify1): Replace rcode and ops with a single res_op
847         parameter.  Update call to gimple_simplify.
848         (gimple_resimplify2): Likewise.
849         (gimple_resimplify3): Likewise.
850         (mprts_hook): Replace parameters with a gimple_match_op *.
851         (maybe_build_generic_op): Likewise.
852         (build_call_internal): Replace type, nargs and ops with
853         a gimple_match_op *.
854         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
855         with a single gimple_match_op *.  Update calls to mprts_hook,
856         build_call_internal and gimple_simplified_result_is_gimple_val.
857         Factor out code that is common to the tree_code and combined_fn cases.
858         * genmatch.c (expr::gen_transform): Replace tem_code and
859         tem_ops with a gimple_match_op called tem_op.  Update calls
860         to the gimple_resimplify functions and maybe_push_res_to_seq.
861         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
862         res_ops.  Update call to the gimple_resimplify functions.
863         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
864         (decision_tree::gen): Make the functions take a gimple_match_op *
865         called res_op instead of separate res_code and res_ops parameters.
866         Update call accordingly.
867         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
868         and ops with a single res_op parameter.  Update calls to
869         maybe_build_generic_op and maybe_push_res_to_seq.
870         (fold_stmt_1): Update calls to gimple_simplify and
871         replace_stmt_with_simplification.
872         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
873         and gimple_simplified_result_is_gimple_val.
874         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
875         gimple_simplify.
876         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
877         with a gimple_match_op *.
878         (vn_nary_build_or_lookup): Likewise.  Update call to
879         vn_nary_build_or_lookup_1.
880         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
881         gimple_match_op *.  Update calls to the gimple_resimplify routines
882         and to gimple_simplified_result_is_gimple_val.
883         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
884         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
885         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
886         (visit_nary_op): Likewise.
887         (visit_reference_op_load): Likewise.
889 2018-05-23  Luis Machado  <luis.machado@linaro.org>
891         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
892         modifier for printing the step amount.
894 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
896         PR target/78849
897         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
898         types.
900 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
902         * doc/sourcebuild.texi (Endianness): New subsubsection.
904 2018-05-23  Luis Machado  <luis.machado@linaro.org>
906         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
907         <prefetch_dynamic_strides>: New const bool field.
908         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
909         prefetch_dynamic_strides.
910         (exynosm1_prefetch_tune): Likewise.
911         (thunderxt88_prefetch_tune): Likewise.
912         (thunderx_prefetch_tune): Likewise.
913         (thunderx2t99_prefetch_tune): Likewise.
914         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
915         false.
916         (aarch64_override_options_internal): Update to set
917         PARAM_PREFETCH_DYNAMIC_STRIDES.
918         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
919         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
920         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
921         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
922         prefetch-dynamic-strides setting.
924 2018-05-23  Luis Machado  <luis.machado@linaro.org>
926         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
927         <minimum_stride>: New const int field.
928         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
929         minimum_stride field defaulting to -1.
930         (exynosm1_prefetch_tune): Likewise.
931         (thunderxt88_prefetch_tune): Likewise.
932         (thunderx_prefetch_tune): Likewise.
933         (thunderx2t99_prefetch_tune): Likewise.
934         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
935         <default_opt_level>: Set to 3.
936         (aarch64_override_options_internal): Update to set
937         PARAM_PREFETCH_MINIMUM_STRIDE.
938         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
939         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
940         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
941         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
942         stride is constant and is below the minimum stride threshold.
944 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
946         * config/arm/arm-cpus.in (mode26): Delete.
947         (armv4): Delete mode26 reference.
948         * config/arm/arm.c (arm_configure_build_target): Delete use of
949         isa_bit_mode26.
951 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
953         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
954         New insn pattern.
955         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
956         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
957         for non-SSE modes.
958         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
959         (floatunsdidf2): Ditto.
961 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
963         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
964         (fixuns_trunc<mode>si2_avx512f): Ditto.
965         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
966         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
967         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
969 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
971         PR rtl-optimization/79985
972         * df-scan.c (df_insn_refs_collect): Remove special case for
973         global registers and asm statements.
975 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
977         * extend.texi (Global Register Variables): Rewrite the bullet list.
978         Note that the register is available for allocation. Note that access
979         via inline asm must use constraints. Add note about async-signal
980         handlers. Remove paragraph about automagic register selection.
982 2018-05-23  Richard Biener  <rguenther@suse.de>
984         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
985         of fixed offset from memset VN.
987 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
989         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
990         first_interp field.
991         (alloc_cand_and_find_basis): Initialize first_interp field.
992         (slsr_process_mul): Modify first_interp field.
993         (slsr_process_add): Likewise.
994         (slsr_process_cast): Modify first_interp field for each new
995         interpretation.
996         (slsr_process_copy): Likewise.
997         (dump_candidate): Dump first_interp field.
998         (replace_mult_candidate): Process all interpretations, not just
999         subsequent ones.
1000         (replace_rhs_if_not_dup): Likewise.
1001         (replace_one_candidate): Likewise.
1003 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
1005         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
1006         Add new boolean.
1007         (aarch64_needs_frame_chain): New function.
1008         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
1010 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
1012         PR target/84882
1013         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
1014         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
1015         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
1016         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
1017         as true for strict-align.
1018         (aarch64_can_inline_p): Perform checks even when callee has no
1019         attributes to check for strict alignment.
1020         * doc/extend.texi (AArch64 Function Attributes): Document
1021         no-strict-align.
1022         * doc/invoke.texi: (AArch64 Options): Likewise.
1024 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
1026         PR tree-optimization/85853
1027         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
1028         the handling of the root of the node to...
1029         (vect_slp_analyze_node_operations_1): ...this new function,
1030         and run the whole thing with the child nodes' def types
1031         set according to their SLP node's def type.
1033 2018-05-23  Richard Biener  <rguenther@suse.de>
1035         PR middle-end/85874
1036         * tree-data-ref.c (create_runtime_alias_checks): Defer
1037         and ignore overflow warnings.
1039 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
1041         PR tree-optimization/85822
1042         * tree-vrp.c (is_masked_range_test): Fix handling of negative
1043         constants.
1045 2018-05-23  Richard Biener  <rguenther@suse.de>
1047         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
1048         memset constants via native_interpret_expr.
1050 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
1052         PR target/85345
1053         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
1054         attribute.
1055         (cgraph_node::create_alias): Likewise.
1056         (cgraph_node::get_availability): Check ifunc_resolver instead
1057         of looking up ifunc attribute.
1058         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1059         * varasm.c (do_assemble_alias): Likewise.
1060         (assemble_alias): Likewise.
1061         (default_binds_local_p_3): Likewise.
1062         * cgraph.h (cgraph_node): Add ifunc_resolver.
1063         (cgraph_node::only_called_directly_or_aliased_p): Return false
1064         for IFUNC resolver.
1065         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
1066         attribute.
1067         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
1068         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
1069         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
1070         instead of looking up ifunc attribute.
1072 2018-05-22  Luis Machado  <luis.machado@linaro.org>
1074         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
1076 2018-05-22  Martin Sebor  <msebor@redhat.com>
1078         PR middle-end/85359
1079         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
1080         only when expasion succeeds.
1081         (expand_builtin_strcmp): Same.
1082         (expand_builtin_strncmp): Same.
1084 2018-05-22  Martin Sebor  <msebor@redhat.com>
1086         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
1088 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
1089             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1091         * config/aarch64/aarch64-ldpstp.md: Replace uses of
1092         aarch64_mem_pair_operand with memory_operand and delete operand swapping
1093         code.
1094         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1095         Add check for legitimate_address.
1096         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
1097         (aarch64_swap_ldrstr_operands): New.
1098         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
1099         Define prototype.
1101 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
1102             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1104         * config/aarch64/aarch64.md: New patterns to generate stp
1105         and ldp.
1106         (store_pair_sw, store_pair_dw): New patterns to generate stp for
1107         single words and double words.
1108         (load_pair_sw, load_pair_dw): Likewise.
1109         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
1110         Delete.
1111         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
1112         Delete.
1113         * config/aarch64/aarch64-ldpstp.md: Modify peephole
1114         for different mode ldpstp and add peephole for merged zero stores.
1115         Likewise for loads.
1116         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1117         Add size check.
1118         (aarch64_gen_store_pair): Rename calls to match new patterns.
1119         (aarch64_gen_load_pair): Rename calls to match new patterns.
1120         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
1121         (load_pair<DREG:mode><DREG2:mode>): ... This.
1122         (store_pair<mode>): Rename to...
1123         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
1124         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
1125         New mode iterators.
1126         (V_INT_EQUIV): Handle SImode.
1127         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
1128         New predicate.
1130 2018-05-22  Martin Sebor  <msebor@redhat.com>
1132         PR c/85623
1133         * calls.c (maybe_warn_nonstring_arg): Use string length to set
1134         or ajust the presumed bound on an operation to avoid unnecessary
1135         warnings.
1137 2018-05-22  Martin Sebor  <msebor@redhat.com>
1139         PR tree-optimization/85826
1140         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
1141         assuming that a DECL necesarily has a constant size.
1143 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
1145         PR middle-end/85862
1146         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
1148 2018-05-22  Richard Biener  <rguenther@suse.de>
1150         PR tree-optimization/85834
1151         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
1152         non-constant and non-zero memset arguments.
1154 2018-05-22  Martin Liska  <mliska@suse.cz>
1156         PR ipa/85607
1157         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
1159 2018-05-22  Richard Biener  <rguenther@suse.de>
1161         PR tree-optimization/85863
1162         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
1163         comparisons when vectype is specified.
1164         (vectorizable_condition): Do not specify vectype for
1165         vect_is_simple_cond when SLP vectorizing.
1167 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
1169         PR target/85657
1170         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
1171         define __ibm128 as long double.
1172         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
1173         as a distinct type when IEEE 128-bit support is enabled.
1174         (init_float128_ieee): Fix up conversions between IFmode and IEEE
1175         128-bit types to use the correct functions.
1176         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
1177         convert between 128-bit floating point types that have different
1178         modes but the same representation, instead of using gen_lowpart to
1179         makean alias.
1180         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
1181         KFmode.
1182         (IFKF_reg): New attributes to give the register constraints for
1183         IFmode and KFmode.
1184         (extend<mode>tf2_internal): New insns to mark an explicit
1185         conversion between 128-bit floating point types that have a
1186         different mode but share the same representation.
1188 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
1190         PR tree-optimization/85814
1191         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
1192         a null return from get_strinfo when unsharing the next
1193         strinfo in the chain.
1195 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
1197         PR gcc/84923
1198         * varasm.c (weak_finish): Clean up weak_decls.
1200 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1202         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
1203         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
1204         UNSPEC_UADALP values.
1205         * config/aarch64/iterators.md (ABAL): New int iterator.
1206         (ABDL2): Likewise.
1207         (ADALP): Likewise.
1208         (sur): Add mappings for the above.
1209         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
1210         New define_insn.
1211         (aarch64_<sur>abal<mode>_4): Likewise.
1212         (aarch64_<sur>adalp<mode>_3): Likewise.
1213         (<sur>sadv16qi): New define_expand.
1215 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
1217         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
1218         (*movdf_internal): Ditto.
1219         (*rcpsf2_sse): Ditto.
1220         (*rsqrtsf2_sse): Ditto.
1221         (*sqrt<mode>2_sse): Ditto.
1223 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
1225         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
1226         eor3q<mode>4.
1227         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
1228         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
1229         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
1230         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
1231         vbcaxq_s64): New.
1232         * config/aarch64/arm_neon.h: Likewise.
1233         * config/aarch64/iterators.md (VQ_I): New.
1235 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
1237         * config.gcc: Add arc/t-multilib-linux to tmake_file for
1238         arc*-*-linux*.
1239         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
1240         MULTILIB_DIRNAMES
1242 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1244         * config/nds32/constraints.md (S): New constraint.
1245         * config/nds32/nds32.md (call_internal): Use constraint S.
1246         (call_value_internal): Likewise.
1247         (sibcall_internal): Likewise.
1248         (sibcall_value_internal): Likewise.
1250 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1251             Chung-Ju Wu  <jasonwucj@gmail.com>
1253         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
1254         into consideration.
1256 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1257             Chung-Ju Wu  <jasonwucj@gmail.com>
1259         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
1260         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
1261         (nds32_rtx_costs_impl): Simplify.
1262         (nds32_address_cost_impl): Simplify.
1263         (nds32_init_rtx_costs): New function.
1264         (nds32_rtx_costs_speed_prefer): Likewise.
1265         (nds32_rtx_costs_size_prefer): Likewise.
1266         (nds32_address_cost_speed_prefer): Likewise.
1267         (nds32_address_cost_speed_fwprop): Likewise.
1268         (nds32_address_cost_size_prefer): Likewise.
1269         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
1270         * config/nds32/nds32.c (nds32_option_override): Use
1271         nds32_init_rtx_costs function.
1273 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1275         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
1276         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
1277         (TARGET_PIPELINE_N8): Likewise.
1278         (TARGET_PIPELINE_N10): Likewise.
1279         (TARGET_PIPELINE_N13): Likewise.
1280         (TARGET_PIPELINE_GRAYWOLF): Likewise.
1282 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
1284         * config/nds32/nds32-fpu.md: Update copyright year.
1286 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1288         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
1290 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1292         * config/nds32/nds32.c
1293         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
1294         * config/nds32/nds32.opt (minline-asm-r15): New option.
1296 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1298         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
1299         MASK_HW_ABS.
1300         * config/nds32/nds32.md (abssi2): New pattern.
1302 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
1304         * config/i386/i386.md (rex64namesuffix): New mode attribute.
1305         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
1306         Merge insn pattern from sse_cvtsi2ss<round_name> and
1307         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
1308         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
1309         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
1310         using SWI48 mode iterator.
1311         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
1312         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
1313         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
1314         pattern from sse_cvttss2si<round_saeonly_name>
1315         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
1316         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
1317         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
1318         using SWI48 mode iterator.
1319         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
1320         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
1321         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
1322         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
1323         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
1324         using SWI48 mode iterator.
1325         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
1326         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
1327         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
1328         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
1329         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
1330         SWI48 mode iterator.
1331         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
1332         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
1333         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
1334         pattern from sse_cvttsd2si<round_saeonly_name>
1335         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
1337 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1339         * config/nds32/nds32-md-auxiliary.c
1340         (nds32_valid_smw_lwm_base_p): Refine.
1341         (nds32_output_smw_single_word): Refine.
1342         (nds32_output_smw_double_word): New.
1343         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
1345 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1347         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
1348         (nds32_output_stack_pop): Refine.
1349         (nds32_expand_unaligned_load): Refine.
1350         (nds32_expand_unaligned_store): Refine.
1352 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1353             Chung-Ju Wu  <jasonwucj@gmail.com>
1355         * config/nds32/constants.md: Add TP_REGNUM constant.
1356         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
1357         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
1358         UNSPEC_ADD32.
1359         * config/nds32/nds32-doubleword.md: Consider flag_pic.
1360         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
1361         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
1362         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
1363         and PIC code generation.
1364         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
1365         code generation.
1366         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
1367         optimization.
1368         * config/nds32/nds32.md: Support TLS and PIC.
1369         * config/nds32/nds32.c: Support TLS and PIC.
1370         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
1371         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
1372         predicate.
1374 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1376         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
1377         mode with E_ prefix.
1379 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1380             Chung-Ju Wu  <jasonwucj@gmail.com>
1382         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
1383         * config/nds32/nds32-md-auxiliary.c
1384         (symbolic_reference_mentioned_p): New.
1385         (nds32_legitimize_ict_address): New.
1386         (nds32_expand_ict_move): New.
1387         (nds32_indirect_call_referenced_p): New.
1388         (nds32_symbol_binds_local_p): Delete.
1389         (nds32_long_call_p): Modify.
1390         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
1391         * config/nds32/nds32-protos.h
1392         (symbolic_reference_mentioned_p): Declare.
1393         (nds32_legitimize_ict_address): Declare.
1394         (nds32_expand_ict_move): Declare.
1395         (nds32_indirect_call_referenced_p): Declare.
1396         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
1397         (nds32_relax_group): Use nds32_ict_const_p as condition.
1398         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
1399         (nds32_asm_file_start): Output ict_model directive in asm code.
1400         (nds32_legitimate_address_p): Consider indirect call.
1401         (nds32_print_operand): Consider indirect call.
1402         (nds32_print_operand_address): Consider indirect call.
1403         (nds32_insert_attributes): Handle "indirect_call" attribute.
1404         (TARGET_LEGITIMATE_ADDRESS_P): Define.
1405         (TARGET_LEGITIMATE_CONSTANT_P): Define.
1406         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1407         (TARGET_DELEGITIMIZE_ADDRESS): Define.
1408         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
1409         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
1410         (TARGET_ICT_MODEL_SMALL): Define.
1411         (TARGET_ICT_MODEL_LARGE): Define.
1412         * config/nds32/nds32.md (movsi): Consider ict model.
1413         (call, call_value): Consider ict model.
1414         (sibcall, sibcall_value): Consider ict model.
1415         * config/nds32/nds32.opt (mict-model): New option.
1416         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
1417         model.
1419 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
1420             Monk Chiang  <sh.chiang04@gmail.com>
1421             Jim Wilson <jimw@sifive.com>
1423         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
1424         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
1425         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
1426         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
1427         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
1428         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
1429         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
1430         compute save_libcall_adjustment properly.
1431         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
1432         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
1433         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
1434         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
1435         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1436         (ABI_SPEC): Handle mabi=ilp32e.
1437         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1438         (RVE): Add RVE mask.
1439         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1440         <-march>: Add rv32e as an example.
1442 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
1444         PR c++/82899
1445         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1446         (intra_create_variable_infos): Handle C++ constructors.
1448 2018-05-18  Martin Liska  <mliska@suse.cz>
1450         * passes.def: Remove a redundant pass.
1452 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
1454         PR bootstrap/85838
1455         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1457 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1459         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1460         (ARMv4): Update.
1461         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1462         (ARMv6m): Update.
1463         (armv2, armv2a, armv3, armv3m): Delete architectures.
1464         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1465         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1466         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1467         Delete cpus.
1468         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1469         (*mulsidi3adddi): Likewise.
1470         (mulsidi3): Likewise.
1471         (*mulsidi3_nov6): Likewise.
1472         (umulsidi3): Likewise.
1473         (umulsidi3_nov6): Likewise.
1474         (umaddsidi4): Likewise.
1475         (*umulsidi3adddi): Likewise.
1476         (smulsi3_highpart): Likewise.
1477         (*smulsi3_highpart_nov6): Likewise.
1478         (umulsi3_highpart): Likewise.
1479         (*umulsi3_highpart_nov6): Likewise.
1480         * config/arm/arm.h (arm_arch3m): Delete.
1481         * config/arm/arm.c (arm_arch3m): Delete.
1482         (arm_option_override_internal): Update armv3-related comment.
1483         (arm_configure_build_target): Delete use of isa_bit_mode32.
1484         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1485         (arm_rtx_costs_internal): Delete check of arm_arch3m.
1486         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1487         (mulsa3): Likewise.
1488         (mulusa3): Likewise.
1489         * config/arm/arm-protos.h (arm_arch3m): Delete.
1490         * config/arm/arm-tables.opt: Regenerate.
1491         * config/arm/arm-tune.md: Likewise.
1492         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
1493         deleted architectures.
1495 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1497         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
1498         (armv5t, armv5te): New features.
1499         (ARMv5, ARMv5e): Delete fgroups.
1500         (ARMv5t, ARMv5te): Adjust for above changes.
1501         (ARMv6m): Likewise.
1502         (armv5, armv5e): Delete arches.
1503         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
1504         arm_arch5.
1505         (*call_reg_arm): Likewise.
1506         (*call_value_reg_armv5): Likewise.
1507         (*call_value_reg_arm): Likewise.
1508         (*call_symbol): Likewise.
1509         (*call_value_symbol): Likewise.
1510         (*sibcall_insn): Likewise.
1511         (*sibcall_value_insn): Likewise.
1512         (clzsi2): Likewise.
1513         (prefetch): Likewise.
1514         (define_split and define_peephole2 dependent on arm_arch5):
1515         Likewise.
1516         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
1517         arm_arch5e.
1518         (TARGET_ARM_QBIT): Likewise.
1519         (TARGET_DSP_MULTIPLY): Likewise.
1520         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
1521         (arm_arch5, arm_arch5e): Delete.
1522         (arm_arch5t, arm_arch5te): Declare.
1523         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
1524         (arm_arch5t): Declare.
1525         (arm_option_reconfigure_globals): Update for the above.
1526         (arm_options_perform_arch_sanity_checks): Update comment, replace
1527         use of arm_arch5 with arm_arch5t.
1528         (use_return_insn): Likewise.
1529         (arm_emit_call_insn): Likewise.
1530         (output_return_instruction): Likewise.
1531         (arm_final_prescan_insn): Likewise.
1532         (arm_coproc_builtin_available): Likewise.
1533         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
1534         arm_arch5e with arm_arch5t and arm_arch5te.
1535         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
1536         (arm_arch5t, arm_arch5te): Declare.
1537         * config/arm/arm-tables.opt: Regenerate.
1538         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
1539         * config/arm/t-multilib: Likewise.
1540         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
1541         instead of arm_arch5.
1542         (*call_reg_thumb1): Likewise.
1543         (*call_value_reg_thumb1_v5): Likewise.
1544         (*call_value_reg_thumb1): Likewise.
1545         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
1546         unreachable path.
1547         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
1549 2018-05-18  Martin Liska  <mliska@suse.cz>
1551         PR gcov-profile/84846
1552         * doc/gcov.texi: Document -t option of gcov tool.
1554 2018-05-18  Martin Liska  <mliska@suse.cz>
1556         PR gcov-profile/84846
1557         * gcov.c (print_usage): Add new -t option.
1558         (process_args): Handle the option.
1559         (generate_results): Use stdout as output when requested by
1560         the option.
1562 2018-05-18  Martin Liska  <mliska@suse.cz>
1564         PR gcov-profile/84846
1565         * coverage.c (coverage_init): Write PWD to .gcno file.
1566         * doc/gcov.texi: Document how working directory is printed.
1567         * gcov-dump.c (dump_gcov_file): Print PWD.
1568         * gcov.c (output_intermediate_file): Likewise.
1569         (read_graph_file): Read PWD string.
1570         (output_lines): Print PWD.
1572 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1574         PR middle-end/85817
1575         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1576         for retval and return false if all args to phi are zero.        
1578 2018-05-18  Richard Biener  <rguenther@suse.de>
1580         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1581         method.
1582         (evrp_dom_walker::before_dom_children): Call it.
1584 2018-05-18  Richard Biener  <rguenther@suse.de>
1586         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1587         results when processing array refs with variable index.
1589 2018-05-18  Toon Moene  <toon@moene.org>
1591         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1592         directly after that of -floop-interchange. Indicate that both
1593         options are enabled by default when specifying -O3. 
1595 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1597         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1598         iterator.  Delete separate integer-mode vec_set<mode> expander.
1599         (aarch64_simd_vec_setv2di): Delete.
1600         (vec_setv2di): Delete.
1601         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1602         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
1603         the "w, r" alternative.
1605 2018-05-18  Martin Liska  <mliska@suse.cz>
1607         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1608         * tree-pass.h (make_pass_lower_switch_O0): New function.
1609         * tree-switch-conversion.c (node_has_low_bound): Remove.
1610         (node_has_high_bound): Likewise.
1611         (node_is_bounded): Likewise.
1612         (class pass_lower_switch): Make it a template type and create
1613         two instances.
1614         (pass_lower_switch::execute): Add template argument.
1615         (make_pass_lower_switch): New function.
1616         (make_pass_lower_switch_O0): New function.
1617         (do_jump_if_equal): Remove.
1618         (emit_case_nodes): Simplify to just handle all 3 cases and leave
1619         all the hard work to tree optimization passes.
1621 2018-05-18  Martin Liska  <mliska@suse.cz>
1623         * dbgcnt.c (limit_low): Renamed from limit.
1624         (limit_high): New variable.
1625         (dbg_cnt_is_enabled): Check for upper limit.
1626         (dbg_cnt): Adjust dumping.
1627         (dbg_cnt_set_limit_by_index): Add new argument for high
1628         value.
1629         (dbg_cnt_set_limit_by_name): Likewise.
1630         (dbg_cnt_process_single_pair): Parse new format.
1631         (dbg_cnt_process_opt): Use strtok.
1632         (dbg_cnt_list_all_counters): Remove 'value' and add
1633         'limit_high'.
1634         * doc/invoke.texi: Document changes.
1636 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
1638         * doc/sourcebuild.texi (scalar_all_fma): Document.
1639         * tree.def (FMA_EXPR): Delete.
1640         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1641         * internal-fn.c (ternary_direct): New macro.
1642         (expand_ternary_optab_fn): Likewise.
1643         (direct_ternary_optab_supported_p): Likewise.
1644         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1645         * builtins.c (fold_builtin_fma): Delete.
1646         (fold_builtin_3): Don't call it.
1647         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1648         * expr.c (expand_expr_real_2): Likewise.
1649         * fold-const.c (operand_equal_p): Likewise.
1650         (fold_ternary_loc): Likewise.
1651         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1652         * gimple.c (DEFTREECODE): Likewise.
1653         * gimplify.c (gimplify_expr): Likewise.
1654         * optabs-tree.c (optab_for_tree_code): Likewise.
1655         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1656         * tree-eh.c (operation_could_trap_p): Likewise.
1657         (stmt_could_throw_1_p): Likewise.
1658         * tree-inline.c (estimate_operator_cost): Likewise.
1659         * tree-pretty-print.c (dump_generic_node): Likewise.
1660         (op_code_prio): Likewise.
1661         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1662         * tree-ssa-operands.c (get_expr_operands): Likewise.
1663         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1664         * fold-const-call.h (fold_fma): Delete.
1665         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1666         CFN_FNMA and CFN_FNMS.
1667         (fold_fma): Delete.
1668         * genmatch.c (combined_fn): New enum.
1669         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1670         (commutative_op): New function.
1671         (commutate): Use it.  Handle more than 2 operands.
1672         (dt_operand::gen_gimple_expr): Use commutative_op.
1673         (parser::parse_expr): Allow :c to be used with non-binary
1674         operators if the commutative operand is known.
1675         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1676         CFN_FMS, CFN_FNMA and CFN_FNMS.
1677         (backprop::process_assign_use): Remove FMA_EXPR handling.
1678         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1679         (gen_hsa_fma): New function.
1680         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1681         IFN_FNMA and IFN_FNMS.
1682         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1683         * gimple-fold.h (follow_all_ssa_edges): Declare.
1684         * gimple-fold.c (follow_all_ssa_edges): New function.
1685         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1686         gimple_build interface and use follow_all_ssa_edges to fold the result.
1687         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1688         instead of checking for optabs directly.
1689         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1690         rather than FMA_EXPRs.
1691         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1692         call to IFN_FMA instead of an FMA_EXPR.
1694 2018-05-17  Jim Wilson  <jimw@sifive.com>
1696         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1697         sign extended promoted subreg, and the range does not have the sign bit
1698         set, then do a sign extend.
1700         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1701         test, check for sign extended subreg and/or constant operands, and
1702         do a sign extend in that case.
1704 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1706         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1707         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1708         Add untyped.
1709         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1710         Change logics_shift_reg to logics_shift_imm.
1711         (thunderx2t99_fp_loadpair_basic): Delete.
1712         (thunderx2t99_fp_storepair_basic): Delete.
1713         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1714         (thunderx2t99_asimd_polynomial): Delete.
1715         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1716         and neon_fp_mul_d_scalar_q.
1717         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1718         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1719         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1720         (thunderx2t99_asimd_lut): Add missing tbl types.
1721         (thunderx2t99_asimd_ext): Delete.
1722         (thunderx2t99_asimd_load1_1_mult): Delete.
1723         (thunderx2t99_asimd_load1_2_mult): Delete.
1724         (thunderx2t99_asimd_load1_ldp): New.
1725         (thunderx2t99_asimd_load1): New.
1726         (thunderx2t99_asimd_load2): Add missing *load2* types.
1727         (thunderx2t99_asimd_load3): New.
1728         (thunderx2t99_asimd_load4): New.
1729         (thunderx2t99_asimd_store1_1_mult): Delete.
1730         (thunderx2t99_asimd_store1_2_mult): Delete.
1731         (thunderx2t99_asimd_store2_mult): Delete.
1732         (thunderx2t99_asimd_store2_onelane): Delete.
1733         (thunderx2t99_asimd_store_stp): New.
1734         (thunderx2t99_asimd_store1): New.
1735         (thunderx2t99_asimd_store2): New.
1736         (thunderx2t99_asimd_store3): New.
1737         (thunderx2t99_asimd_store4): New.
1739 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1741         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1742         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1744 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1745             Segher Boessenkool  <segher@kernel.crashing.org>
1747         PR target/85698
1748         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1749         operand.
1751 2018-05-17  Richard Biener  <rguenther@suse.de>
1753         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1754         for pruning loop and prune defs feeding only already visited PHIs.
1756 2018-05-17  Richard Biener  <rguenther@suse.de>
1758         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1760 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1761             Richard Biener  <rguenther@suse.de>
1763         PR tree-optimization/85793
1764         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1765         for VMAT_ELEMENTWISE.
1767 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1769         * internal-fn.h (lookup_internal_fn): Declare
1770         * internal-fn.c (lookup_internal_fn): New function.
1771         * gimple.c (gimple_build_call_from_tree): Handle calls to
1772         internal functions.
1773         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1774         internal function names.
1775         * tree-pretty-print.c (dump_generic_node): Likewise.
1776         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1778 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1780         * gimple-fold.h (gimple_build): Make the function forms take
1781         combined_fn rather than built_in_function.
1782         (gimple_simplify): Likewise.
1783         * gimple-match-head.c (gimple_simplify): Likewise.
1784         * gimple-fold.c (gimple_build): Likewise.
1785         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1786         rather than gimple_build_call_internal.
1787         (get_initial_defs_for_reduction): Likewise.
1788         (vect_create_epilog_for_reduction): Likewise.
1789         (vectorizable_live_operation): Likewise.
1791 2018-05-17  Martin Liska  <mliska@suse.cz>
1793         * gimple-ssa-sprintf.c (format_directive): Do not use
1794         space in between 'G_' and '('.
1796 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1798         PR target/85323
1799         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1800         even if the mask is not all ones.
1802         PR target/85323
1803         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1804         vector.
1805         (ix86_gimple_fold_builtin): Likewise.
1807         PR target/85323
1808         * config/i386/i386.c: Include tree-vector-builder.h.
1809         (ix86_vector_shift_count): New function.
1810         (ix86_fold_builtin): Fold shift builtins by scalar count.
1811         (ix86_gimple_fold_builtin): Likewise.
1813         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1814         _mm512_setzero): New intrinsics.
1816 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1817             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1819         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1820         code generation for cases where splatting a value is not useful.
1821         * simplify-rtx.c (simplify_ternary_operation): Simplify
1822         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1823         mode to a vec_concat.
1825 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1827         * config.gcc: Support "goldmont-plus".
1828         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1829         "goldmont-plus".
1830         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1831         PROCESSOR_GOLDMONT_PLUS.
1832         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1833         (processor_target_table): Add "goldmont-plus".
1834         (PTA_GOLDMONT_PLUS): Define.
1835         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1836         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1837         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1838         (fold_builtin_cpu): Add "goldmont-plus".
1839         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1840         (ix86_option_override_internal): Add "goldmont-plus".
1841         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1842         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1843         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1844         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1846 2018-05-17  Richard Biener  <rguenther@suse.de>
1848         PR tree-optimization/85757
1849         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1850         remove defs that only feed that PHI from further processing.
1852 2018-05-16  Jim Wilson  <jimw@sifive.com>
1854         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1855         asterisk to name.
1856         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1858 2018-05-16  Mark Wielaard  <mark@klomp.org>
1860         * dwarf2out.c (count_index_strings): New function.
1861         (output_indirect_strings): Call count_index_strings and generate
1862         header for dwarf_version >= 5.
1864 2018-05-16  Mark Wielaard  <mark@klomp.org>
1866         * dwarf2out.c (dwarf_FORM): New function.
1867         (set_indirect_string): Use dwarf_FORM.
1868         (reset_indirect_string): Likewise.
1869         (size_of_die): Likewise.
1870         (value_format): Likewise.
1871         (output_die): Likewise.
1872         (add_skeleton_AT_string): Likewise.
1873         (output_macinfo_op): Likewise.
1874         (index_string): Likewise.
1875         (output_index_string_offset): Likewise.
1876         (output_index_string): Likewise.
1877         (count_index_strings): Likewise.
1879 2018-05-16  Carl Love  <cel@us.ibm.com>
1881         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1882         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1884 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1886         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1887         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1889 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1891         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1892         (fnma<mode>4): Likewise.
1893         (fms<mode>4): Likewise.
1894         (fnms<mode>4): Likewise.
1895         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1896         (aarch64_fnma<mode>4): Likewise.
1897         (aarch64_fms<mode>4): Likewise.
1898         (aarch64_fnms<mode>4): Likewise.
1899         (aarch64_fnmadd<mode>4): Likewise.
1901 2018-05-16  Jason Merrill  <jason@redhat.com>
1903         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1905 2018-05-16  Richard Biener  <rguenther@suse.de>
1907         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1908         (dump_stmt_cost): Declare.
1909         (add_stmt_cost): Dump cost we add.
1910         (add_stmt_costs): New function.
1911         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1912         No longer exported.
1913         (vect_analyze_stmt): Adjust prototype.
1914         (vectorizable_condition): Likewise.
1915         (vectorizable_live_operation): Likewise.
1916         (vectorizable_reduction): Likewise.
1917         (vectorizable_induction): Likewise.
1918         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1919         cost vector to pass to vectorizable_ and record afterwards.
1920         (vect_model_reduction_cost): Take cost vector argument and adjust.
1921         (vect_model_induction_cost): Likewise.
1922         (vectorizable_reduction): Likewise.
1923         (vectorizable_induction): Likewise.
1924         (vectorizable_live_operation): Likewise.
1925         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1926         SLP_TREE_NUMBER_OF_VEC_STMTS.
1927         (vect_analyze_slp_cost_1): Remove.
1928         (vect_analyze_slp_cost): Likewise.
1929         (vect_slp_analyze_node_operations): Take visited args and
1930         a target cost vector.  Avoid processing already visited stmt sets.
1931         (vect_slp_analyze_operations): Use a local cost vector to gather
1932         costs and register those of non-discarded instances.
1933         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1934         (vect_schedule_slp_instance): Remove copying of
1935         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
1936         zero.
1937         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1938         adding cost.  Record cost entry location.
1939         (vect_prologue_cost_for_slp_op): Function to compute cost of
1940         a constant or invariant generated for SLP vect in the prologue,
1941         split out from vect_analyze_slp_cost_1.
1942         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
1943         (vect_model_promotion_demotion_cost): Likewise.
1944         (vect_model_store_cost): Likewise, make static.
1945         (vect_model_load_cost): Likewise.
1946         (vectorizable_bswap): Add cost vector arg and adjust.
1947         (vectorizable_call): Likewise.
1948         (vectorizable_simd_clone_call): Likewise.
1949         (vectorizable_conversion): Likewise.
1950         (vectorizable_assignment): Likewise.
1951         (vectorizable_shift): Likewise.
1952         (vectorizable_operation): Likewise.
1953         (vectorizable_store): Likewise.
1954         (vectorizable_load): Likewise.
1955         (vectorizable_condition): Likewise.
1956         (vectorizable_comparison): Likewise.
1957         (can_vectorize_live_stmts): Likewise.
1958         (vect_analyze_stmt): Likewise.
1959         (vect_transform_stmt): Adjust calls to vectorizable_*.
1960         * tree-vectorizer.c: Include gimple-pretty-print.h.
1961         (dump_stmt_cost): New function.
1963 2018-05-16  Richard Biener  <rguenther@suse.de>
1965         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1966         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1967         * tree-ssa-dse.c: Include tree-ssa-loop.h.
1968         (check_name): New callback.
1969         (dse_classify_store): Track cycles via a visited bitmap of PHI
1970         defs and simplify handling of in-loop and across loop dead stores
1971         and properly fail for loop-variant refs.  Handle byte-tracking with
1972         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1973         limiting the walk.
1975 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
1977         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1978         (vect_get_mask_type_for_stmt): Likewise.
1979         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1980         split out from...
1981         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
1982         to determine the statement's vector type and the vector type that
1983         should be used for calculating nunits.  Deal with cases in which
1984         the type has to be deferred.
1985         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1986         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
1987         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
1988         (vect_determine_vf_for_stmt): New functions, split out from...
1989         (vect_determine_vectorization_factor): ...here.
1990         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
1991         (vect_get_mask_type_for_stmt): New functions, split out from
1992         vect_determine_vectorization_factor.
1994 2018-05-16  Richard Biener  <rguenther@suse.de>
1996         * tree-cfg.c (verify_gimple_assign_ternary): Properly
1997         verify the [VEC_]COND_EXPR embedded comparison.
1999 2018-05-15  Martin Sebor  <msebor@redhat.com>
2001         PR tree-optimization/85753
2002         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
2003         RECORD_TYPE in addition to ARRAY_TYPE.
2005 2018-05-15  Martin Sebor  <msebor@redhat.com>
2007         PR middle-end/85643
2008         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
2010 2018-05-15  Richard Biener  <rguenther@suse.de>
2012         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
2013         add by_clobber_p one.  Change algorithm to collect all defs
2014         representing uses we need to walk and try reducing them to
2015         a single one before failing.
2016         (dse_dom_walker::dse_optimize_stmt): Adjust.
2018 2018-05-13  Mark Wielaard  <mark@klomp.org>
2020         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
2021         (size_of_loc_descr): Likewise.
2022         (output_loc_operands): Likewise.
2023         (output_loc_operands_raw): Likewise.
2024         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
2025         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
2026         (hash_loc_operands): Likewise.
2027         (compare_loc_operands): Likewise.
2029 2018-05-14  Mark Wielaard  <mark@klomp.org>
2031         * dwarf2out.c (count_index_addrs): New function.
2032         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
2034 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2036         PR tree-optimization/83648
2037         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
2038         return value as malloc candidate.
2040 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2042         PR ipa/85734
2043         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
2044         as true in call to suggest_attribute.
2046 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
2048         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
2049         -mreadonly-in-sdata.
2051 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2053         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
2054         New pattern.
2055         (aarch64_crypto_aesd_fused): Likewise.
2057 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
2059         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
2060         (movsi_aarch64): Likewise.
2061         (load_pairsi): Likewise.
2062         (load_pairdi): Likewise.
2063         (store_pairsi): Likewise.
2064         (store_pairdi): Likewise.
2065         (load_pairsf): Likewise.
2066         (load_pairdf): Likewise.
2067         (store_pairsf): Likewise.
2068         (store_pairdf): Likewise.
2069         (zero_extend): Likewise.
2070         (trunc): Swap alternatives.
2071         (fcvt_target): Add '?' to prefer w over r.
2073 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
2075         PR target/85756
2076         * config/i386/i386.md: Disallow non-commutative arithmetics in
2077         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
2078         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
2079         in the peephole2 before it.
2081 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
2083         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
2084         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
2085         (ix86_handle_option): Handle -mcldemote.
2086         * config.gcc: New header.
2087         * config/i386/cldemoteintrin.h: New file.
2088         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
2089         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
2090         -mcldemote.
2091         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2092         OPTION_MASK_ISA_CLDEMOTE.
2093         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
2094         (ix86_valid_target_attribute_inner_p): Ditto.
2095         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
2096         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
2097         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
2098         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
2099         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
2100         (cldemote): New.
2101         * config/i386/i386.opt: Add -mcldemote.
2102         * config/i386/x86intrin.h: New header.
2103         * doc/invoke.texi: Add -mcldemote.
2105 2018-05-14  Richard Biener  <rguenther@suse.de>
2107         * doc/match-and-simplify.texi: Adjust :s documentation.
2109 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
2111         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
2112         intended memcpy size.
2113         (REORDER_45): Likewise.
2115 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
2117         * sort.cc: New file.
2118         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
2119         * vec.c (qsort_chk): Use gcc_qsort.
2120         * Makefile.in (OBJS-libcommon): Add sort.o.
2121         (build/sort.o): New target.  Use it...
2122         (BUILD_RTL): ... here, and...
2123         (build/gencfn-macros): ... here, and...
2124         (build/genmatch): ... here.
2126 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
2127             Chung-Ju Wu  <jasonwucj@gmail.com>
2129         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
2130         * config/nds32/nds32-graywolf.md: New file.
2131         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
2132         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
2133         pipeline.
2134         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
2135         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
2136         * config/nds32/nds32.md (pipeline_model): Add graywolf.
2137         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
2138         * config/nds32/pipelines.md: Include n15 settings.
2140 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
2141             Chung-Ju Wu  <jasonwucj@gmail.com>
2143         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
2144         * config/nds32/nds32-n13.md: New file.
2145         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
2146         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
2147         pipeline.
2148         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
2149         * config/nds32/nds32.md (pipeline_model): Add n13.
2150         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
2151         * config/nds32/pipelines.md: Include n13 settings.
2153 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
2154             Chung-Ju Wu  <jasonwucj@gmail.com>
2156         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
2157         * config/nds32/nds32-n10.md: New file.
2158         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
2159         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
2160         pipeline.
2161         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
2162         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
2163         * config/nds32/nds32.md (pipeline_model): Add n10.
2164         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
2165         * config/nds32/pipelines.md: Include n10 settings.
2167 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
2168             Kito Cheng  <kito.cheng@gmail.com>
2169             Chung-Ju Wu  <jasonwucj@gmail.com>
2171         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
2172         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2173         Add enum values for DSP extension instructions.
2174         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
2175         New constraints.
2176         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
2177         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
2178         New code iterators.
2179         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
2180         * config/nds32/nds32-dspext.md: New file for DSP implementation.
2181         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
2182         * config/nds32/nds32-intrinsic.md: Likewise.
2183         * config/nds32/nds32_intrinsic.h: Likewise.
2184         * config/nds32/nds32-md-auxiliary.c: Likewise.
2185         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
2186         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
2187         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
2188         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
2189         * config/nds32/nds32-protos.h: New declarations for DSP extension.
2190         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
2191         TYPE_DMAC in switch statement.
2192         * config/nds32/nds32.c: New checking and implementation for DSP
2193         extension instructions.
2194         * config/nds32/nds32.h: Likewise.
2195         * config/nds32/nds32.md: Likewise.
2196         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
2197         * config/nds32/predicates.md: Implement new predicates for DSP
2198         extension.
2200 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
2202         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
2203         Reformat alternatives and attributes so it is easier to identify
2204         which constraints/attributes go with which instruction.
2205         (mov<mode>_hardfloat32, FMOVE64): Likewise.
2206         (mov<mode>_softfloat32, FMOVE64): Likewise.
2207         (mov<mode>_hardfloat64, FMOVE64): Likewise.
2208         (mov<mode>_softfloat64, FMOVE64): Likewise.
2210 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2212         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2213         subsection.
2214         (Basic PowerPC Built-in Functions): The new name of the
2215         subsection previously known as "PowerPC Built-in Functions".
2216         (Basic PowerPC Built-in Functions Available on all Configurations):
2217         New subsubsection.
2218         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
2219         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
2220         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
2221         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
2223 2018-05-11  Martin Jambor  <mjambor@suse.cz>
2225         PR ipa/85655
2226         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
2227         single const.
2229 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2231         PR target/85733
2232         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
2234 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
2236         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
2237         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
2238         (ix86_handle_option): Handle -mwaitpkg.
2239         * config.gcc: New header.
2240         * config/i386/cpuid.h (bit_WAITPKG): New bit.
2241         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
2242         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
2243         function type.
2244         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2245         OPTION_MASK_ISA_WAITPKG.
2246         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
2247         (ix86_option_override_internal): Add PTA_WAITPKG.
2248         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
2249         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
2250         IX86_BUILTIN_TPAUSE.
2251         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
2252         __builtin_ia32_umwait and __builtin_ia32_tpause.
2253         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
2254         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
2255         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
2256         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
2257         UNSPECV_TPAUSE): New.
2258         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
2259         * config/i386/i386.opt: Add -mwaitpkg.
2260         * config/i386/waitpkgintrin.h: New file.
2261         * config/i386/x86intrin.h: New header.
2262         * doc/invoke.texi: Add -mwaitpkg.
2264 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2266         PR target/85606
2267         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
2268         equivalent.
2269         (cortex-m0): Use armv6s-m isa.
2270         (cortex-m0plus): Likewise.
2271         (cortex-m1): Likewise.
2272         (cortex-m0.small-multiply): Likewise.
2273         (cortex-m0plus.small-multiply): Likewise.
2274         (cortex-m1.small-multiply): Likewise.
2276 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2277             Jakub Jelinek  <jakub@redhat.com>
2279         PR tree-optimization/85692
2280         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
2281         source permute as well.
2283 2018-05-11  Martin Liska  <mliska@suse.cz>
2285         PR sanitizer/85556
2286         * doc/extend.texi: Document LLVM style format for no_sanitize
2287         attribute.
2289 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
2291         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
2292         mode_supports_vsx_dform_quad to mode_supports_dq_form.
2293         (mode_supports_vsx_dform_quad): Likewise.
2294         (mode_supports_vmx_dform): Move these functions to be next to the
2295         other mode_supports functions.
2296         (mode_supports_dq_form): Likewise.
2297         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
2298         mode_supports_dq_form.
2299         (reg_offset_addressing_ok_p): Likewise.
2300         (offsettable_ok_by_alignment): Likewise.
2301         (rs6000_legitimate_offset_address_p): Likewise.
2302         (legitimate_lo_sum_address_p): Likewise.
2303         (rs6000_legitimize_address): Likewise.
2304         (rs6000_legitimize_reload_address): Likewise.
2305         (rs6000_secondary_reload_inner): Likewise.
2306         (rs6000_preferred_reload_class): Likewise.
2307         (rs6000_output_move_128bit): Likewise.
2309 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2311         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
2312         Generate SImode target register for null target.
2313         <case IX86_BUILTIN_XGETBV>: Ditto.
2314         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
2315         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
2317 2018-05-10  Carl Love  <cel@us.ibm.com>
2319         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
2320         dcbtt and dcbtstt if operands[2] is 0.
2322 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2324         PR target/85693
2325         * config/i386/sse.md (usadv64qi): New expander.
2327 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
2329         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
2330         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
2331         -maltivec=be support.
2332         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
2333         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
2334         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
2335         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
2336         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
2337         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
2338         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
2339         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
2340         altivec_vsumsws): Adjust.
2341         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
2342         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
2343         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
2344         support.
2345         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
2346         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
2347         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
2348         (altivec_lve<VI_char>x): Delete expand.
2349         (*altivec_lve<VI_char>x_internal): Rename to...
2350         (altivec_lve<VI_char>x): ... this.
2351         (altivec_lvxl_<mode>): Delete expand.
2352         (*altivec_lvxl_<mode>_internal): Rename to ...
2353         (altivec_lvxl_<mode>): ... this.
2354         (altivec_stvxl_<mode>): Delete expand.
2355         (*altivec_stvxl_<mode>_internal): Rename to ...
2356         (altivec_stvxl_<mode>): ... this.
2357         (altivec_stve<VI_char>x): Delete expand.
2358         (*altivec_stve<VI_char>x_internal): Rename to ...
2359         (altivec_stve<VI_char>x): ... this.
2360         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
2361         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
2362         reduc_plus_scal_<mode>): Adjust.
2363         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
2364         comment.
2365         (rs6000_cpu_cpp_builtins): Adjust.
2366         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
2367         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
2368         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
2369         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
2370         -maltivec=be support.
2371         (rs6000_split_vec_extract_var): Adjust.
2372         (rs6000_split_v4si_init): Adjust.
2373         (swap_selector_for_mode): Delete.
2374         (altivec_expand_lvx_be, altivec_expand_stvx_be,
2375         altivec_expand_stvex_be): Delete.
2376         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
2377         -maltivec=be support.
2378         (rs6000_gimple_fold_builtin): Ditto.
2379         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
2380         Adjust.
2381         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
2382         (TARGET_DIRECT_MOVE_64BIT): Adjust.
2383         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
2384         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
2385         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
2386         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
2387         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
2388         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
2389         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
2390         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
2391         anonymous split): Adjust.
2392         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
2393         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
2395 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
2397         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
2398         when --with-gxx-include-dir is also specified.
2399         * configure: Regenerate.
2401 2018-05-09  Jim Wilson  <jimw@sifive.com>
2403         PR target/84797
2404         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
2405         * config/riscv/t-withmultilib: New.
2406         * config/riscv/withmultilib.h: New.
2407         * doc/install.texi: Document RISC-V --with-multilib-list support.
2409 2018-05-09  Richard Biener  <rguenther@suse.de>
2411         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
2412         vector.
2413         (vect_bb_vectorization_profitable_p): Adjust.  Compute
2414         actual scalar cost using the cost vector and the add_stmt_cost
2415         machinery.
2417 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2419         PR rtl-optimization/85645
2420         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
2421         in the REG_CFA_REGISTER note for LR, don't leave it empty.
2423 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2425         PR rtl-optimization/85645
2426         * shrink-wrap.c (spread_components): Return a boolean saying if
2427         anything was changed.
2428         (try_shrink_wrapping_separate): Iterate spread_components until
2429         nothing changes anymore.
2431 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2433         PR rtl-optimization/85645
2434         * regrename.c (build_def_use): Also kill the chains that include the
2435         destination of a REG_CFA_REGISTER note.
2437 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2439         PR rtl-optimization/85645
2440         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2441         insn that has a REG_CFA_REGISTER note.
2443 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
2445         * cfgexpand.c (expand_clobber): New function.
2446         (expand_gimple_stmt_1): Use it.
2447         * tree-vect-stmts.c (vect_clobber_variable): New function,
2448         split out from...
2449         (vectorizable_simd_clone_call): ...here.
2450         (vectorizable_store): Emit a clobber either side of an
2451         IFN_STORE_LANES sequence.
2452         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2454 2018-05-09  Tom de Vries  <tom@codesourcery.com>
2456         PR target/85626
2457         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2458         (define_insn "trap_if_false"): Add exit after trap.
2460 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2462         PR rtl-optimization/85638
2463         * bb-reorder.c: Include common/common-target.h.
2464         (create_forwarder_block): New function extracted from...
2465         (fix_up_crossing_landing_pad): ...here.  Rename into...
2466         (dw2_fix_up_crossing_landing_pad): ...this.
2467         (sjlj_fix_up_crossing_landing_pad): New function.
2468         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2469         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2470         from both partitions and exit the loop after one iteration.
2472 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2474         Revert:
2475         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2476         subsection.
2477         (Basic PowerPC Built-in Functions): The new name of the
2478         subsection previously known as "PowerPC Built-in Functions".
2479         (Basic PowerPC Built-in Functions Available on all Configurations):
2480         New subsubsection.
2481         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2482         subsubsection.
2483         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2484         subsubsection.
2485         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2486         subsubsection.
2487         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2488         subsubsection.
2490 2018-05-08  Jim Wilson  <jimw@sifive.com>
2492         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
2493         (LD_EMUL_SUFFIX): New.
2494         (LINK_SPEC): Use it.
2496 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2498         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2499         subsection.
2500         (Basic PowerPC Built-in Functions): The new name of the
2501         subsection previously known as "PowerPC Built-in Functions".
2502         (Basic PowerPC Built-in Functions Available on all Configurations):
2503         New subsubsection.
2504         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2505         subsubsection.
2506         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2507         subsubsection.
2508         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2509         subsubsection.
2510         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2511         subsubsection.
2513 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2515         PR target/85683
2516         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
2517         after cmpelim optimization.
2519 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
2521         * config.gcc: Support "goldmont".
2522         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
2523         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2524         PROCESSOR_GOLDMONT.
2525         * config/i386/i386.c (m_GOLDMONT): Define.
2526         (processor_target_table): Add "goldmont".
2527         (PTA_GOLDMONT): Define.
2528         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
2529         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
2530         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
2531         (fold_builtin_cpu): Add "goldmont".
2532         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
2533         (ix86_option_override_internal): Add "goldmont".
2534         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
2535         (processor_type): Add PROCESSOR_GOLDMONT.
2536         * config/i386/i386.md: Add CPU "glm".
2537         * config/i386/glm.md: New file.
2538         * config/i386/x86-tune.def: Add m_GOLDMONT.
2539         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2541 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2543         PR target/85572
2544         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
2545         E_V4DImode.
2546         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
2547         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
2548         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
2550         PR target/85317
2551         * config/i386/i386.c (ix86_fold_builtin): Handle
2552         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2554         PR target/85480
2555         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2556         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2558 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
2560         PR target/85658
2561         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2562         (check_arch): Likewise.
2563         (check_fpu): Return the result rather than printing it.
2564         (end arch): Fix operator precedence.
2565         (end cpu): Likewise.
2566         (END): Print the result from check_fpu.
2568 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2569             Alan Hayward  <alan.hayward@arm.com>
2570             David Sherwood  <david.sherwood@arm.com>
2572         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2573         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2574         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2575         (*fcmuo<mode>_and): New patterns.
2577 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2579         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2580         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2581         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2582         (cmp_op, sve_imm_con): New code attributes.
2583         (SVE_COND_INT_CMP, imm_con): Delete.
2584         (cmp_op): Remove above unspecs from int attribute.
2585         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2586         to...
2587         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
2588         comparison-specific unspecs.
2589         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2590         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2591         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2592         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2593         (*vec_fcm<cmp_op><mode>): Rename to...
2594         (*fcm<cmp_op><mode>): ...this and adjust likewise.
2595         (*vec_fcmuo<mode>): Rename to...
2596         (*fcmuo<mode>): ...this and adjust likewise.
2597         (*pred_fcm<cmp_op><mode>): New pattern.
2598         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2599         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2600         functions.
2601         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2602         and UNORDERED.
2603         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2604         (aarch64_emit_sve_predicated_cond): New function.
2605         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2606         (aarch64_emit_unspec_cond_or): Replace with...
2607         (aarch64_emit_sve_or_conds): ...this new function.  Use
2608         aarch64_emit_sve_ptrue_op for the individual comparisons and
2609         aarch64_emit_binop to OR them together.
2610         (aarch64_emit_inverted_unspec_cond): Replace with...
2611         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
2612         aarch64_emit_sve_ptrue_op for the comparison and
2613         aarch64_emit_unop to invert the result.
2614         (aarch64_expand_sve_vec_cmp_float): Update after the above
2615         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
2617 2018-05-07  Nathan Sidwell  <nathan@acm.org>
2619         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2620         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2621         (Backwards Compatibility): Likewise.
2623 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2625         PR bootstrap/85681
2626         Revert:
2627         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2629         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2630         <prefetch_dynamic_strides>: New const bool field.
2631         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2632         prefetch_dynamic_strides.
2633         (exynosm1_prefetch_tune): Likewise.
2634         (thunderxt88_prefetch_tune): Likewise.
2635         (thunderx_prefetch_tune): Likewise.
2636         (thunderx2t99_prefetch_tune): Likewise.
2637         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2638         (aarch64_override_options_internal): Update to set
2639         PARAM_PREFETCH_DYNAMIC_STRIDES.
2640         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2641         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2642         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2643         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2644         prefetch-dynamic-strides setting.
2646         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2648         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2649         <minimum_stride>: New const int field.
2650         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2651         minimum_stride field.
2652         (exynosm1_prefetch_tune): Likewise.
2653         (thunderxt88_prefetch_tune): Likewise.
2654         (thunderx_prefetch_tune): Likewise.
2655         (thunderx2t99_prefetch_tune): Likewise.
2656         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2657         (aarch64_override_options_internal): Update to set
2658         PARAM_PREFETCH_MINIMUM_STRIDE.
2659         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2660         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2661         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2662         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2663         stride is constant and is below the minimum stride threshold.
2665 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2667         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2668         to 512.
2670 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2672         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2673         <prefetch_dynamic_strides>: New const bool field.
2674         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2675         prefetch_dynamic_strides.
2676         (exynosm1_prefetch_tune): Likewise.
2677         (thunderxt88_prefetch_tune): Likewise.
2678         (thunderx_prefetch_tune): Likewise.
2679         (thunderx2t99_prefetch_tune): Likewise.
2680         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2681         (aarch64_override_options_internal): Update to set
2682         PARAM_PREFETCH_DYNAMIC_STRIDES.
2683         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2684         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2685         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2686         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2687         prefetch-dynamic-strides setting.
2689 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2691         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2692         <minimum_stride>: New const int field.
2693         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2694         minimum_stride field.
2695         (exynosm1_prefetch_tune): Likewise.
2696         (thunderxt88_prefetch_tune): Likewise.
2697         (thunderx_prefetch_tune): Likewise.
2698         (thunderx2t99_prefetch_tune): Likewise.
2699         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2700         (aarch64_override_options_internal): Update to set
2701         PARAM_PREFETCH_MINIMUM_STRIDE.
2702         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2703         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2704         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2705         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2706         stride is constant and is below the minimum stride threshold.
2708 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2710         PR c++/85659
2711         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2712         the type is addressable.  Don't force op into register if it has
2713         BLKmode.
2715 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2717         PR other/77609
2718         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2719         any section for which we don't know a specific type it should have,
2720         regardless of name.  Previously this was done only for the exact
2721         names ".init_array", ".fini_array", and ".preinit_array".
2722         (default_elf_asm_named_section): Add comment about
2723         relationship with default_section_type_flags and SECTION_NOTYPE.
2724         (get_section): Don't consider it a type conflict if one side has
2725         SECTION_NOTYPE and the other doesn't, as long as neither has the
2726         SECTION_BSS et al used in the default_section_type_flags logic.
2728 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2730         PR target/85653
2731         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2732         (workaround_barsyncs): New function.
2733         (nvptx_reorg): Use workaround_barsyncs.
2734         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2735         (define_expand "nvptx_membar_cta"): New define_expand.
2736         (define_insn "*nvptx_membar_cta"): New insn.
2738 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2740         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2741         To improve optimization opportunities.
2742         * builtin-types.def: The new needed builtin types for the above.
2744 2018-05-04  Richard Biener  <rguenther@suse.de>
2746         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2747         * gimple-ssa-store-merging.c
2748         (imm_store_chain_info::output_merged_store): Remove redundant create,
2749         release split_store vector contents on failure.
2750         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2751         scalar stmt vector on cache hit.
2753 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2755         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2756         Xilinx FP support.
2757         * config.gcc (powerpc-xilinx-eabi*): Remove.
2758         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2759         support.
2760         (fusion_addis_mem_combo_load): Ditto.
2761         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2762         FP support.
2763         (rs6000_cpu_cpp_builtins): Ditto.
2764         * config/rs6000/rs6000-linux.c
2765         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2766         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2767         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2768         support.
2769         (rs6000_setup_reg_addr_masks): Ditto.
2770         (rs6000_init_hard_regno_mode_ok): Ditto.
2771         (rs6000_option_override_internal): Ditto.
2772         (legitimate_lo_sum_address_p): Ditto.
2773         (rs6000_legitimize_address): Ditto.
2774         (rs6000_legitimize_reload_address): Ditto.
2775         (rs6000_legitimate_address_p): Ditto.
2776         (abi_v4_pass_in_fpr): Ditto.
2777         (setup_incoming_varargs): Ditto.
2778         (rs6000_gimplify_va_arg): Ditto.
2779         (rs6000_split_multireg_move): Ditto.
2780         (rs6000_savres_strategy): Ditto.
2781         (rs6000_emit_prologue_components): Ditto.
2782         (rs6000_emit_epilogue_components): Ditto.
2783         (rs6000_emit_prologue): Ditto.
2784         (rs6000_emit_epilogue): Ditto.
2785         (rs6000_elf_file_end): Ditto.
2786         (rs6000_function_value): Ditto.
2787         (rs6000_libcall_value): Ditto.
2788         * config/rs6000/rs6000.h: Ditto.
2789         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2790         (TARGET_MINMAX): ... this.  New.
2791         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2792         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2793         (*movsi_internal1_single): Delete.
2794         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2795         mfpu=, mxilinx-fpu): Delete.
2796         * config/rs6000/singlefp.h: Delete.
2797         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2798         * config/rs6000/t-rs6000: Ditto.
2799         * config/rs6000/t-xilinx: Delete.
2800         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2801         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2802         (VStype_simple): Delete.
2803         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2804         * config/rs6000/xfpu.h: Delete.
2805         * config/rs6000/xfpu.md: Delete.
2806         * config/rs6000/xilinx.h: Delete.
2807         * config/rs6000/xilinx.opt: Delete.
2808         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2809         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2811 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2813         PR libgomp/85639
2814         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2815         if ignore == 0.
2817 2018-05-04  Richard Biener  <rguenther@suse.de>
2819         PR middle-end/85627
2820         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2821         (expand_complex_div_wide): Likewise.
2822         (expand_complex_operations_1): Likewise.
2823         (expand_complex_libcall): Preserve EH info of the original stmt.
2824         (tree_lower_complex): Handle removed blocks.
2825         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2826         on complex multiplication and division libcall builtins.
2828 2018-05-04  Richard Biener  <rguenther@suse.de>
2830         PR middle-end/85574
2831         * fold-const.c (negate_expr_p): Restrict negation of operand
2832         zero of a division to when we know that can happen without
2833         overflow.
2834         (fold_negate_expr_1): Likewise.
2836 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2838         PR libstdc++/85466
2839         * real.h (real_nextafter): Declare.
2840         * real.c (real_nextafter): New function.
2841         * fold-const-call.c (fold_const_nextafter): New function.
2842         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2843         CASE_CFN_NEXTTOWARD.
2844         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2845         even when arg1_mode is different from arg0_mode.
2847 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2849         * doc/extend.texi (Deprecated Features): Remove
2850         -ffriend-injection.
2851         (Backwards Compatibility): Likewise.
2852         * doc/invoke.texi (C++ Language Options): Likewise.
2853         (C++ Dialect Options): Likewise.
2855 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2857         PR target/85530
2858         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2859         _mm512_mask_mullox_epi64): New intrinsics.
2861 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2863         PR testsuite/85106
2864         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2865         dump files): Add offload-tree.
2867 2018-05-03  Richard Biener  <rguenther@suse.de>
2869         PR tree-optimization/85615
2870         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2871         to loops not nested in BBs loop father to avoid creating multi-entry
2872         loops.
2874 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2876         PR tree-optimization/70291
2877         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2878         arguments.  Change return type to tree.  Emit libcall as a new
2879         statement rather than replacing existing one when inplace_p is true.
2880         (expand_complex_multiplication_components): New function.
2881         (expand_complex_multiplication): Expand floating-point complex
2882         multiplication using the above.
2883         (expand_complex_division): Rename inner_type parameter to type.
2884         Update expand_complex_libcall call-site.
2885         (expand_complex_operations_1): Update expand_complex_multiplication
2886         and expand_complex_division call-sites.
2888 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2890         PR target/85582
2891         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2892         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2893         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2894         the highest significant bit of the shift count mask is clear.  In
2895         check whether and[sq]i3 is needed verify that all significant bits
2896         of the shift count other than the highest are set.
2898 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2900         PR libgomp/82428
2901         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2902         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2903         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2904         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2905         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2906         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2907         __builtin_goacc_parlevel_size.
2909 2018-05-02  Richard Biener  <rguenther@suse.de>
2911         PR tree-optimization/85597
2912         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2913         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2914         directly.
2916 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2918         PR testsuite/85106
2919         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2920         dump files): Add ltrans-tree.
2922 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2924         PR testsuite/85106
2925         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2926         dump files): Add wpa-ipa.
2928 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2930         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
2931         powerpc*-*-linux*paired* target.
2932         * config/rs6000/750cl.h: Delete.
2933         * config/rs6000/paired.h: Delete.
2934         * config/rs6000/paired.md: Delete.
2935         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2936         float support.
2937         * config/rs6000/rs6000-builtin.def: Remove paired float support.
2938         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2939         comment.  Remove paired float support.
2940         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2941         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2942         VECTOR_PAIRED.
2943         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2944         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2945         declarations.
2946         * config/rs6000/rs6000.c: Remove paired float support.
2947         (paired_expand_vector_init, paired_expand_vector_move,
2948         paired_emit_vector_compare, paired_emit_vector_cond_expr,
2949         (paired_expand_lv_builtin, paired_expand_stv_builtin,
2950         paired_expand_builtin, paired_expand_predicate_builtin,
2951         paired_init_builtins): Delete.
2952         * config/rs6000/rs6000.h: Remove paired float support.
2953         * config/rs6000/rs6000.md: Remove paired float support.
2954         (move_from_CR_ov_bit): Delete.
2955         * config/rs6000/rs6000.opt (mpaired): Delete.
2956         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2957         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2959 2018-05-02  Richard Biener  <rguenther@suse.de>
2961         PR middle-end/85567
2962         * gimplify.c (gimplify_save_expr): When in SSA form allow
2963         SAVE_EXPRs to compute to SSA vars.
2965 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2967         PR target/85582
2968         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2969         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2970         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2971         clobber operands[2], instead use a new pseudo.  Formatting fixes.
2973 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
2975         PR tree-optimization/85586
2976         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2977         exit early for statements in the same group if the accesses are
2978         not strided.
2980 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2982         PR lto/85451
2983         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2984         error message.
2986 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
2988         PR tree-optimization/85143
2989         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2991 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2993         PR lto/85451
2994         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
2995         not found" error message.
2997 2018-05-01  Tom de Vries  <tom@codesourcery.com>
2999         PR other/83786
3000         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
3001         * vec.c (test_ordered_remove_if): New function.
3002         (vec_c_tests): Call test_ordered_remove_if.
3003         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
3004         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
3005         * tree-vect-patterns.c (vect_pattern_recog_1): Use
3006         VEC_ORDERED_REMOVE_IF.
3008 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3010         PR tree-optimization/82665
3011         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
3012         pointer subtraction where arguments come from a memchr call.
3014 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
3016         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
3017         --push-state --as-needed and --pop-state instead of --as-needed and
3018         --no-as-needed if ld supports it.
3019         * configure: Regenerated.
3021         PR web/85578
3022         * doc/install.texi2html: Replace _002d with - and _002a with * in
3023         generated html files using sed.
3025 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3027         PR c++/85523
3028         * gcc-rich-location.c (blank_line_before_p): New function.
3029         (use_new_line): New function.
3030         (gcc_rich_location::add_fixit_insert_formatted): New function.
3031         * gcc-rich-location.h
3032         (gcc_rich_location::add_fixit_insert_formatted): New function.
3034 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3036         * selftest.c (assert_streq): Rename "expected" and "actual" to
3037         "val1" and "val2".  Extend NULL-handling to cover both inputs
3038         symmetrically, while still requiring both to be non-NULL for a pass.
3039         * selftest.h (assert_streq): Rename "expected" and "actual" to
3040         "val1" and "val2".
3041         (ASSERT_EQ): Likewise.
3042         (ASSERT_EQ_AT): Likewise.
3043         (ASSERT_KNOWN_EQ): Likewise.
3044         (ASSERT_KNOWN_EQ_AT): Likewise.
3045         (ASSERT_NE): Likewise.
3046         (ASSERT_MAYBE_NE): Likewise.
3047         (ASSERT_MAYBE_NE_AT): Likewise.
3048         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
3049         the assertion to pass.
3050         (ASSERT_STREQ_AT): Likewise.
3052 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
3054         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
3055         interaction with -pie.
3057 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3059         * selftest.h: Fix alphabetization of per-source-file selftest
3060         declarations.
3062 2018-04-30  Jason Merrill  <jason@redhat.com>
3064         PR c++/61982 - dead stores to destroyed objects.
3065         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
3066         of clobber.
3068 2018-04-30  Jason Merrill  <jason@redhat.com>
3070         * tree.c (build_clobber): New.
3071         * tree.h: Declare it.
3072         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
3074 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3076         * diagnostic-show-locus.c (layout::layout): Update for
3077         location_get_source_line returning a char_span.
3078         (struct char_span): Move to input.h.
3079         (struct correction): Update for fields in char_span becoming
3080         private.
3081         (struct source_line): Update for location_get_source_line
3082         returning a char_span.
3083         (layout::print_line): Likewise.
3084         * edit-context.c (edited_file::print_content): Likewise.
3085         (edited_file::print_diff_hunk): Likewise.
3086         (edited_file::print_run_of_changed_lines): Likewise.
3087         (edited_file::get_num_lines): Likewise.
3088         (edited_line::edited_line): Likewise.
3089         * final.c (asm_show_source): Likewise.
3090         * input.c (location_get_source_line): Convert return type
3091         from const char * to char_span, losing the final "line_len"
3092         param.
3093         (dump_location_info): Update for the above.
3094         (get_substring_ranges_for_loc): Likewise.  Use a char_span
3095         when handling the literal within the line.
3096         (test_reading_source_line): Update for location_get_source_line
3097         returning a char_span.
3098         * input.h (class char_span): Move here from
3099         diagnostic-show-locus.c, converting from a struct to a class.
3100         Make data members private.
3101         (char_span::operator bool): New.
3102         (char_span::length): New.
3103         (char_span::get_buffer): New.
3104         (char_span::operator[]): New.
3105         (char_span::subspan): Make const.
3106         (char_span::xstrdup): New.
3107         (location_get_source_line): Convert return type from const char *
3108         to char_span, losing the final "line_size" param.
3110 2018-04-30  Jan Hubicka  <jh@suse.cz>
3112         * lto-wrapper.c (ltrans_priorities): New static var.
3113         (cmp_priority): New.
3114         (run_gcc): Read priorities and if doing parallel build order
3115         the Makefile by them.
3117 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3119         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
3121 2018-04-30  Richard Biener  <rguenther@suse.de>
3123         * tree-cfg.c (verify_address): Remove base argument, add
3124         flag whether to check TREE_ADDRESSABLE and do that.
3125         (verify_expr): Remove.
3126         (verify_types_in_gimple_reference): Add pieces from verify_expr.
3127         (verify_gimple_assign_single): Likewise.
3128         (verify_gimple_switch): Likewise.
3129         (verify_expr_location_1): Dereference tp once.  Add (disabled)
3130         piece from verify_expr.
3131         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
3133 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
3135         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
3137 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
3139         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
3140         (small_data_pattern): Likewise.
3141         (arc_rewrite_small_data): Likewise.
3142         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
3143         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
3144         (get_symbol_alignment): New function.
3145         (legitimate_small_data_address_p): Likewise.
3146         (legitimate_scaled_address): Update, call
3147         legitimate_small_data_address_p.
3148         (output_sdata): New static variable.
3149         (arc_print_operand): Update how we handle small data operands.
3150         (arc_print_operand_address): Likewise.
3151         (arc_legitimate_address_p): Update, use
3152         legitimate_small_data_address_p.
3153         (arc_rewrite_small_data_p): Remove.
3154         (arc_rewrite_small_data_1): Likewise.
3155         (arc_rewrite_small_data): Likewise.
3156         (small_data_pattern): Likewise.
3157         (compact_sda_memory_operand): Update to use
3158         legitimate_small_data_address_p and get_symbol_alignment.
3159         (prepare_move_operands): Don't rewite sdata pattern.
3160         (prepare_extend_operands): Remove.
3161         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
3162         pattern.
3163         (zero_extendqisi2): Likewise.
3164         (zero_extendhisi2): Likewise.
3165         (extendqihi2): Likewise.
3166         (extendqisi2): Likewise.
3167         (extendhisi2): Likewise.
3168         (addsi3): Likewise.
3169         (subsi3): Likewise.
3170         (andsi3): Likewise.
3171         * config/arc/constraints.md (Usd): Change it to memory constraint.
3173 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
3175         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
3176         as source of std instructions.
3177         * config/arc/arc.md (movsi_insn): Update pattern predicate to
3178         allow 6-bit constants as source for store instructions.
3179         (movdi_insn): Update instruction pattern to allow 6-bit constants
3180         as source for store instructions.
3182 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
3184         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
3186 2018-04-30  Nathan Sidwell  <nathan@acm.org>
3187             Sandra Loosemore <sandra@codesourcery.com>
3189         * dumpfile.c (dump_open): Allow '-' for stdout.
3190         * doc/invoke.texi (Developer Options): Document dump filename
3191         determination early.  Document stdin/stdout selection.
3193 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
3195         Microblaze Target: PIC data text relative
3197         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
3198         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
3199         Add declaration.
3200         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
3201         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
3202         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
3203         New addressing mode for data-text relative position indepenedent code.
3204         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
3205         'ADDRESS_SYMBOLIC_TXT_REL'.
3206         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
3207         (microblaze_legitimate_pic_operand): Exclude function calls from
3208         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
3209         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
3210         addresses cases.
3211         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3212         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3213         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
3214         for 'address + offset'.
3215         (microblaze_expand_prologue): Add new function prologue call for
3216         'r20' assignation.
3217         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
3218         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
3219         table in case of TARGET_PIC_DATA_TEXT_REL.
3220         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
3221         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
3222         Add new macros 'UNSPEC_TEXT',
3223         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
3224         + exclude function calls from 'UNSPEC_PLT' in case of data text
3225         relative mode.
3226         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3227         new target hook for generating address diff vector tables in case of
3228         flag_pic.
3229         * doc/tm.texi : Regenerate.
3230         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
3231         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
3232         of addr diff vector generation.
3233         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3234         target hook definition.
3235         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
3236         Add default function for generate_pic_addr_diff_vec -> flag_pic.
3237         * doc/invoke.texi (Add new pic option): Add new microblaze pic
3238         option for data text relative.
3240 2018-04-30  Richard Biener  <rguenther@suse.de>
3242         * tree-chrec.h (evolution_function_is_constant_p): Remove
3243         redundant check.
3244         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
3246 2018-04-30  Richard Biener  <rguenther@suse.de>
3248         PR bootstrap/85571
3249         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
3251 2018-04-30  Richard Biener  <rguenther@suse.de>
3253         PR tree-optimization/28364
3254         PR tree-optimization/85275
3255         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
3256         copying first exit test.
3258 2018-04-28  Mark Wielaard  <mark@klomp.org>
3260         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
3261         dwarf_version >= 5.
3262         (dwarf_AT): Handle DW_AT_addr_base.
3263         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
3265 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
3267         PR target/84431
3268         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
3269         (*ashl<dwi>3_doubleword_mask_1): Ditto.
3270         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
3271         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
3273 2018-04-28  Richard Biener  <rguenther@suse.de>
3275         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
3276         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
3277         to reflect use.  Only add interesting stmts.
3279 2018-04-27  Martin Jambor  <mjambor@suse.cz>
3281         PR ipa/85549
3282         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
3283         the jump function allows for passing through aggregate values.
3285 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
3287         * input.h (in_system_header_at): Convert from macro to inline
3288         function.
3289         (from_macro_expansion_at): Likewise.
3290         (from_macro_definition_at): Likewise.
3292 2018-04-27  Jeff Law  <law@redhat.com>
3294         * config.gcc: Mark tile* targets as deprecated/obsolete.
3296 2018-04-27  Richard Biener  <rguenther@suse.de>
3298         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
3299         fix for ILP32.
3301 2018-04-27  Richard Biener  <rguenther@suse.de>
3303         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
3305 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
3307         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
3308         with Yd constraint. Set "preferred_for_speed" attribute from
3309         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
3310         with Yd constraint.
3311         (*movdi_internal): Ditto.
3312         (movti_interunit splitters): Remove
3313         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
3314         (movdi_interunit splitters): Ditto.
3315         * config/i386/constraints.md (Ye): Remove.
3316         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
3318 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3320         PR target/85512
3321         * config/aarch64/constraints.md (Usg): Limit to 31.
3322         (Usj): Limit to 63.
3324 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
3326         PR tree-optimization/85529
3327         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
3328         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
3329         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
3330         zero extension or masking of the MSB bit.
3331         (optimize_range_tests): Add FIRST_BB argument, pass it through
3332         to optimize_range_tests_var_bound.
3333         (maybe_optimize_range_tests, reassociate_bb): Adjust
3334         optimize_range_tests callers.
3336 2018-04-26  Richard Biener  <rguenther@suse.de>
3337             Jakub Jelinek  <jakub@redhat.com>
3339         * cgraph.h (symbol_table): Just declare debug method here.
3340         * symtab.c (symbol_table::debug): Define.
3342 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
3344         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
3346 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
3348         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
3349         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
3350         (*movdi_internal): Substitute Yi and Yj constraint with x
3351         and Ym and Yn constraint with y constraint.  Update "isa"
3352         attribute and set "preferred_for_speed" attribute from
3353         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
3354         (*movsi_internal): Ditto.
3355         (*movdf_internal): Ditto.
3356         (*movsf_internal): Ditto.
3357         (*zero_extendsidi2): Ditto.
3358         * config/i386/sse.md (vec_set<mode>_0): Ditto.
3359         (sse2_loadld): Ditto.
3360         (*vec_extract<ssevecmodelower>_0): Ditto.
3361         (*vec_extractv4si_0_zext_sse4): Ditto.
3362         (vec_concatv2di): Ditto.
3363         (*vec_dup<mode>): Ditto.
3364         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
3365         * config/i386/constraints.md (Yi): Remove.
3366         (Yj): Remove.
3367         (Ym): Remove.
3368         (Yn): Remove.
3370 2018-04-26  Nathan Sidwell  <nathan@acm.org>
3372         * dumpfile.c (dump_open): New.
3373         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
3374         (dump_finish): Detect stdio/stderr by value not name.
3376 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
3378         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
3380 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3382         PR target/84952
3383         * config/nvptx/nvptx.c (verify_neutering_jumps)
3384         (verify_neutering_labels): New function
3385         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
3387 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3389         PR target/84025
3390         * config/nvptx/nvptx.c (needs_neutering_p): New function.
3391         (nvptx_single): Use needs_neutering_p to skip over insns that do not
3392         need neutering.
3394 2018-04-26  Richard Biener <rguenther@suse.de>
3395             Tom de Vries  <tom@codesourcery.com>
3397         PR lto/85422
3398         * lto-streamer-out.c (output_function): Fixup loops if required to match
3399         discovery done in the reader.
3401 2018-04-26  Richard Biener  <rguenther@suse.de>
3403         PR tree-optimization/85116
3404         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
3405         have a loop exit from the single latch predecessor.  Remove
3406         case of header with just condition.
3407         (ch_base::copy_headers): Exclude infinite loops from any
3408         processing.
3409         (pass_ch::execute): Record exits.
3411 2018-04-26  Richard Biener  <rguenther@suse.de>
3413         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
3414         prologue cost vector and pass it to vect_get_load_cost.
3415         (vect_get_peeling_costs_all_drs): Likewise.
3416         (vect_peeling_hash_get_lowest_cost): Likewise.
3417         (vect_enhance_data_refs_alignment): Likewise.
3419 2018-04-26  Richard Biener  <rguenther@suse.de>
3421         PR middle-end/85450
3422         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
3423         checking of integer<->pointer conversions.
3424         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
3425         sign-/zero-extending pointer types.
3426         (expand_omp_for_static_chunk): Likewise.
3428 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
3429             Jean Lee  <xiaoyur347@gmail.com>
3431         * config/mips/mips.c (mips_asan_shadow_offset): New function.
3432         (TARGET_ASAN_SHADOW_OFFSET): Define.
3433         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
3434         true for -fsanitize=address.
3436 2018-04-25  Mark Wielaard  <mark@klomp.org>
3438         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3439         shorter ones.
3441 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3443         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3444         than "alu", remove explicit "memory" and "imm_disp" attributes.
3445         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3447         PR middle-end/85414
3448         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3449         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3450         gen_lowpart_no_emit.
3452 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
3454         PR target/85473
3455         * config/i386/i386.c (ix86_expand_builtin): Change memory
3456         operand to XI, extend p0 to Pmode.
3457         * config/i386/i386.md: Change unspec volatile and operand
3458         1 mode to XI, change operand 0 mode to P.
3460 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3462         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3463         GET_MODE_MASK before any checking.
3464         (nds32_can_use_bset_p): Likewise.
3465         (nds32_can_use_btgl_p): Likewise.
3467 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3469         * config/nds32/nds32-doubleword.md: New define_split pattern for
3470         illegal register number.
3472 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3474         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3476 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3478         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3480 2018-04-25  Richard Biener  <rguenther@suse.de>
3482         * lto-streamer.h (LTO_major_version): Bump to 8.
3484 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3486         * BASE-VER: Set to 9.0.0.
3488 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
3490         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
3491         in __abskf2 and __powikf2.
3493 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3495         PR target/85512
3496         * config/aarch64/constraints.md (Usg, Usj): New constraints.
3497         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
3498         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
3499         Use the above on operand 2.  Reindent.
3500         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
3502 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3504         PR target/85485
3505         * common/config/i386/i386-common.c (ix86_handle_option): Don't
3506         handle OPT_mcet.
3507         * config/i386/i386.opt (mcet): Removed.
3508         * doc/install.texi: Remove -mcet documentation.
3509         * doc/invoke.texi: Likewise.
3511 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3513         PR target/85485
3514         * doc/install.texi: Remove -mcet from bootstrap-cet.
3516 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3518         PR target/85511
3519         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
3520         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
3521         if TARGET_64BIT.
3523         PR target/85503
3524         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
3525         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
3526         containing a CONST_VECTOR.
3528 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
3530         * doc/install.texi: Update newlib dependency for nvptx.
3532 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3534         PR target/85508
3535         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
3536         instead of INTVAL when shifting x left.
3538 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
3540         PR tree-optimization/85478
3541         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
3542         vect_grouped_store_supported for single element vectors.
3544 2018-04-24  Richard Biener  <rguenther@suse.de>
3546         PR target/85491
3547         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
3548         load cost increase to the case of non-constant step.
3550 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3552         PR target/84828
3553         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3554         destination if any_malformed_asm.
3556 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
3558         PR middle-end/85496
3559         * expr.c (store_field): In the bitfield case, if the value comes from
3560         a function call and is returned in registers by means of a PARALLEL,
3561         do not change the mode of the temporary unless BLKmode and VOIDmode.
3563 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
3565         PR rtl-optimization/85423
3566         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3567         dependencies to debug insns when the previous insn is non-debug.
3569 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3571         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3572         enums into a single definition.
3573         (fls): Fix predicates and printing.
3574         (seti): Likewise.
3576 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3578         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3579         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3580         and short u6 immediate.
3581         (check_if_valid_sleep_operand): Remove.
3582         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3584 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3586         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3587         flag_always_save_lp condition.
3588         * config/nds32/nds32.opt (malways-save-lp): New option.
3590 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3592         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3593         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3594         * config/nds32/nds32.h
3595         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3596         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3598 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3600         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3601         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3603 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3604             Chung-Ju Wu  <jasonwucj@gmail.com>
3606         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3607         Declare.
3608         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3609         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3611 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3613         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3615 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3617         * config/nds32/nds32-protos.h (nds32_data_alignment,
3618         nds32_local_alignment): Declare.
3619         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3620         nds32_local_alignment): New functions.
3621         (TARGET_CONSTANT_ALIGNMENT): Define.
3622         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3624 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3626         * config/nds32/nds32.c
3627         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3628         (TARGET_MODES_TIEABLE_P): Likewise.
3630 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3632         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3633         level Ofast and Og.
3635 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
3636             Chung-Ju Wu  <jasonwucj@gmail.com>
3638         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3639         for unaligned access.
3640         * config/nds32/nds32-intrinsic.c: Implementation of expanding
3641         unaligned access.
3642         * config/nds32/nds32-intrinsic.md: Likewise.
3643         * config/nds32/nds32_intrinsic.h: Likewise.
3644         * config/nds32/nds32.h (nds32_builtins): Likewise.
3645         * config/nds32/nds32.opt (munaligned-access): New option.
3646         * config/nds32/nds32.c (nds32_asm_file_start): Display
3647         flag_unaligned_access status.
3649 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3651         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3652         -mno-relax is present.
3653         * config/riscv/linux.h (LINK_SPEC): Ditto.
3655 2018-04-20  Martin Sebor  <msebor@redhat.com>
3657         PR c/85365
3658         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3659         for null pointers.
3660         (gimple_fold_builtin_stxcpy_chk): Same.
3661         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3663 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
3665         PR target/85456
3666         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3667         __powikf2 when long double is IEEE 128-bit.
3669 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3671         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3672         step to make sure stack always aligned.
3674 2018-04-20  Carl Love  <cel@us.ibm.com>
3676         PR target/83402
3677         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3678         size check for arg0.
3680 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3681             Tom de Vries  <tom@codesourcery.com>
3683         PR target/85445
3684         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3685         Emit insns for calls too.
3686         (nvptx_find_par): Always look for worker-level predecessor insn.
3687         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3688         calls.
3689         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3690         (nvptx_process_pars): Propagate frames for calls.
3692 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3694         PR target/85469
3695         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3696         Removed.
3697         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3698         (ix86_handle_option): Don't handle OPT_mibt.
3699         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3700         __SHSTK__.
3701         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3702         has_ibt and ibt.
3703         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3704         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3705         (ix86_target_macros): Define __CET__ with flag_cf_protection
3706         for -fcf-protection.
3707         * config/i386/i386.c (isa2_opts): Remove -mibt.
3708         * config/i386/i386.h (TARGET_IBT): Removed.
3709         (TARGET_IBT_P): Likewise.
3710         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3711         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3712         * config/i386/i386.opt (mcet): Update help message.
3713         (mshstk): Likewise.
3714         (mibt): Removed.
3715         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3716         -mcet as an alias for -mshstk.
3718 2018-04-20  Richard Biener <rguenther@suse.de>
3720         PR middle-end/85475
3721         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3722         complexity by forcing a single use of the multiply operand.
3724 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3726         ipa/85449
3727         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3728         recursion dependency to only apply to non-clones.
3730 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3732         ipa/85447
3733         * ipa-cp.c (create_specialized_node): Check that clones of
3734         self-recursive edges exist during IPA-CP.
3736 2018-04-19  Toon Moene  <toon@moene.org>
3738         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3739         by -O3. 
3741 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3743         PR tree-optimization/85467
3744         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3745         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3746         VECTOR_CST element to type.
3748 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3750         PR target/85397
3751         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3752         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3753         (builtin_longjmp): Likewise.
3754         (save_stack_nonlocal): New pattern.
3755         (restore_stack_nonlocal): Likewise.
3757 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3759         PR target/85404
3760         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3761         Replace ASM_OUTPUT_LABEL with fprintf.
3763 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3765         PR target/85417
3766         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3767         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3768         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3769         define __IBT__ and __SHSTK__ for -fcf-protection.
3770         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3771         TARGET_IBT.
3772         (ix86_trampoline_init): Likewise.
3773         (x86_output_mi_thunk): Likewise.
3774         (ix86_notrack_prefixed_insn_p): Likewise.
3775         (ix86_option_override_internal): Don't disallow -fcf-protection.
3776         * config/i386/i386.md (rdssp<mode>): Also enable for
3777         -fcf-protection.
3778         (incssp<mode>): Likewise.
3779         (nop_endbr): Likewise.
3780         * config/i386/i386.opt (mcet): Change help message to built-in
3781         functions only.
3782         (mibt): Likewise.
3783         (mshstk): Likewise.
3784         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3785         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3786         enable CET built-in functions.
3788 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3790         * common/config/i386/i386-common.c 
3791         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3792         OPTION_MASK_ISA_MOVDIRI_UNSET,
3793         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3794         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3795         * config.gcc (movdirintrin.h): New header.
3796         * config/i386/cpuid.h (bit_MOVDIRI,
3797         bit_MOVDIR64B): New bits.
3798         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3799         and -mmvodir64b.
3800         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3801         (VOID, PVOID, PCVOID)): New function types.
3802         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3803         __builtin_ia32_directstoreu_u64,
3804          __builtin_ia32_movdir64b): New builtins.
3805         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3806         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3807         and -mmovdiri.
3808         (ix86_valid_target_attribute_inner_p): Ditto.
3809         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3810         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3811         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3812         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3813         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3814         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3815         (movdiri<mode>, movdir64b_<mode>): New.
3816         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3817         * config/i386/immintrin.h: Include movdirintrin.h.
3818         * config/i386/movdirintrin.h: New file.
3819         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3821 2018-04-19  Richard Biener  <rguenther@suse.de>
3823         PR middle-end/85455
3824         * cfg.c (clear_bb_flags): When loop state says we have
3825         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3827 2018-04-19  Richard Biener  <rguenther@suse.de>
3829         PR tree-optimization/84737
3830         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3831         copying restrict info.
3832         (vect_setup_realignment): Use it.
3833         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3834         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3835         the first DR to all generated stores.
3836         (vectorizable_load): Likewise for loads.
3838 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3840         PR tree-optimization/85446
3841         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3842         the integral and pointer types to have the same precision.
3844         * doc/install.texi: Document --disable-cet being the default and
3845         --enable-cet=auto.
3847 2018-04-18  Martin Liska  <mliska@suse.cz>
3849         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3850         style.
3852 2018-04-18  Martin Liska  <mliska@suse.cz>
3854         Revert
3855         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3857         PR ipa/83983
3858         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3859         arguments if they are comparable.
3861 2018-04-18  Martin Liska  <mliska@suse.cz>
3863         Revert
3864         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3866         PR lto/84805
3867         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3868         incomplete types.
3870 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3872         PR target/85388
3873         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3874         ENDBR after calling __morestack.
3876 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3878         PR jit/85384
3879         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3880         by using gcc_base_ver to generate a gcc_driver_version, and use
3881         it when generating GCC_DRIVER_NAME.
3882         * configure: Regenerate.
3884 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3886         PR target/81084
3887         * config.gcc: Obsolete powerpc*-*-*spe*.
3889 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3891         PR debug/84637
3892         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3893         (stabstr_D): Change type of unum from unsigned int to
3894         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3895         type.
3897 2018-04-17  Jim Wilson  <jimw@sifive.com>
3899         PR 84856
3900         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3901         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3902         Set arg_pointer_offset after using pretend_args_size.
3904 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3906         PR rtl-optimization/85431
3907         * dse.c (record_store): Ignore zero width stores.
3909         PR sanitizer/85230
3910         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3911         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3912         __builtin_stack_restore rather than after it.
3913         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3914         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3915         argument instead of virtual_dynamic_stack_rtx.
3917 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3919         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3920         New prototype.
3921         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3922         Add note to error message to explain internal mapping of overloaded
3923         built-in function name to non-overloaded built-in function name.
3924         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3925         function.
3927 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3929         PR target/85424
3930         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3931         where the inputs overlap with the output.
3933 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3935         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3936         (=v, v) alternative and explicit "memory" attribute.
3937         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
3938         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3939         attributes.
3940         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3941         "sselog1" type instead of "sselog".
3942         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3943         "sselog".  Remove explicit "memory" attribute.
3944         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3945         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3946         attributes.
3947         (vec_extract_hi_v32hi): Merge all alternatives into one, use
3948         "sselog1" type instead of "sselog".  Remove explicit "memory"
3949         attribute.
3950         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3951         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3952         attribute.
3953         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3954         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3955         attributes.
3956         (vec_extract_hi_v64qi): Merge all alternatives into one, use
3957         "sselog1" type instead of "sselog".  Remove explicit "memory"
3958         attribute.
3959         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3960         use "sselog1" type instead of "sselog".  Remove explicit "memory"
3961         attribute.
3963         PR target/85430
3964         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3966         PR middle-end/85414
3967         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3968         on a SUBREG.
3970 2018-04-17  Martin Jambor  <mjambor@suse.cz>
3972         PR ipa/85421
3973         * ipa-cp.c (create_specialized_node): Call
3974         expand_all_artificial_thunks if necessary.
3976 2018-04-17  Martin Liska  <mliska@suse.cz>
3978         PR lto/85405
3979         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3980         in message, remote space in between '_G' and '('.
3982 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3984         PR target/85281
3985         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3986         avx512f_vmcmp<mode>3<round_saeonly_name>,
3987         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
3988         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
3989         avx512f_rndscale<mode><round_saeonly_name>,
3990         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
3991         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
3992         Use %<iptr>2 instead of %2 for -masm=intel.
3993         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
3994         avx512f_vcvttss2usi<round_saeonly_name>,
3995         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
3996         -masm=intel.
3997         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
3998         avx512f_vcvttsd2usi<round_saeonly_name>,
3999         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
4000         Use %q1 instead of %1 for -masm=intel.
4001         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
4002         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
4003         of %3 for -masm=intel.
4004         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
4005         -masm=intel.
4006         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
4007         -masm=intel.
4008         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
4009         -masm=intel.
4010         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
4011         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
4012         %g1.
4013         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
4014         -masm=intel.
4015         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
4016         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
4017         %g1 and one with %0 and %1.
4018         (avx512er_vmrcp28<mode><round_saeonly_name>,
4019         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
4020         %1 for -masm=intel.
4021         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
4022         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
4023         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
4024         of %0 and %{%4%} for -masm=intel.
4025         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
4026         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
4027         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
4028         order of %0 and %{%5%}%{z%} for -masm=intel.
4030 2018-04-17  Jan Hubicka  <jh@suse.cz>
4032         PR lto/85405
4033         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
4035 2018-04-17  Martin Liska  <mliska@suse.cz>
4037         PR ipa/85329
4038         * multiple_target.c (create_dispatcher_calls): Set apostrophes
4039         for target_clone error message.  Make default implementation
4040         clone to be a local declaration.
4041         (separate_attrs): Add new argument and check for an empty
4042         string.
4043         (expand_target_clones): Handle it.
4044         (ipa_target_clone): Make redirection just for target_clones
4045         functions.
4047 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
4048             Tom de Vries  <tom@codesourcery.com>
4050         PR middle-end/84955
4051         * omp-expand.c (expand_oacc_for): Add dummy false branch for
4052         tiled basic blocks without omp continue statements.
4054 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
4056         PR target/83660
4057         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
4058         vec_extract expression as having side effects to make sure it gets
4059         a cleanup point.
4061 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
4063         PR target/85403
4064         * config/i386/i386.c (get_builtin_code_for_version): Check
4065         error_mark_node.
4067 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
4069         PR target/84331
4070         * gcc/config.gcc: Support "skylake".
4071         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
4072         PROCESSOR_SKYLAKE.
4073         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
4074         (processor_target_table): Add "skylake".
4075         (ix86_option_override_internal): Add "skylake".
4076         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
4077         PROCESSOR_CANNONLAKE.
4078         (get_builtin_code_for_version): Fix priority for
4079         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
4080         PROCESSOR_SKYLAKE-AVX512.
4081         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
4082         (processor_type): Add PROCESSOR_SKYLAKE.
4084 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
4085             Jason Merrill  <jason@redhat.com>
4087         PR c++/85112
4088         * convert.c (convert_to_integer_1): Use direct recursion for
4089         enumeral types and types with a precision less than the number
4090         of bits in their mode.
4092 2018-04-16  Julia Koval  <julia.koval@intel.com>
4094         PR target/84413
4095         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
4096         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
4098 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
4100         PR target/85293
4101         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
4102         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
4103         and -mno-direct-move.
4105 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
4107         PR target/83402
4108         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
4109         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
4110         Ensure negative shifts result in {0}.
4112 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
4114         PR rtl-optimization/79916
4115         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
4116         regs (if any) to define how to gnerate SD moves when LRA is in
4117         progress.
4119 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
4121         PR rtl-optimization/85393
4122         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
4123         * except.c (expand_dw2_landing_pad_for_region): Make static.
4124         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
4125         a label and unconditional jump to old_bb, rather than
4126         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
4127         basic block.
4129         PR rtl-optimization/85376
4130         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
4131         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
4132         instead of a specific value.
4134 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
4135             Bin Cheng  <bin.cheng@arm.com>
4137         PR tree-optimization/82965
4138         PR tree-optimization/83991
4139         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
4140         by_profile_only parameter.
4141         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
4142         information if the loop was predicted to iterate too many times.
4143         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
4145 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
4147         PR lto/71991
4148         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
4149         always inline.
4151 2018-04-13  Martin Liska  <mliska@suse.cz>
4152             Jakub Jelinek  <jakub@redhat.com>
4154         PR middle-end/81657
4155         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
4156         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
4157         * builtins.c (expand_builtin_memory_copy_args): Use
4158         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
4159         handle dest_addr == pc_rtx.
4161 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
4163         PR target/85291
4164         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
4165         asked to not generate direct moves.
4166         (fix_trunc<mode>si2_stfiwx): Similar.
4167         (fix_trunc<mode>si2_internal): Similar.
4169 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4171         PR debug/83157
4172         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
4173         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
4174         lookup if dest in some wider mode is known to be const0_rtx and
4175         if so, record permanent equivalence for it to be ZERO_EXTEND of
4176         the narrower mode destination.
4178 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4180         * lto-streamer-out.c (output_function): Revert 259346.
4181         * omp-expand.c (expand_oacc_for): Likewise.
4183 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
4185         PR rtl-optimization/85354
4186         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
4187         * sel-sched.c (sel_global_init): ... here.
4189 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
4191         PR target/85238
4192         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
4193         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4194         mode for PE-COFF targets.
4195         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
4196         (i386_pe_asm_lto_end): Likewise.
4197         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
4198         (TARGET_ASM_LTO_END): Likewise.
4199         * config/i386/winnt.c (saved_debug_info_level): New static variable.
4200         (i386_pe_asm_lto_start): New function.
4201         (i386_pe_asm_lto_end): Likewise.
4203 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4204             Richard Biener  <rguenther@suse.de>
4206         PR middle-end/84955
4207         * lto-streamer-out.c (output_function): Fix CFG loop state before
4208         streaming out.
4209         * omp-expand.c (expand_oacc_for): Handle calls to internal
4210         functions like regular functions.
4212 2018-04-12  Richard Biener  <rguenther@suse.de>
4214         PR lto/85371
4215         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
4216         for the early LTO debug to properly generate references to it
4217         during DIE emission.  Do not re-use that for the skeleton for
4218         split-dwarf.
4219         (dwarf2out_early_finish): Likewise.
4221 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4223         PR target/85328
4224         * config/i386/sse.md
4225         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
4226         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
4227         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
4228         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
4229         and output is a reg, avoid creating invalid lowpart subreg, but
4230         instead split into a 512-bit move.  Don't split if not AVX512VL,
4231         input is xmm16+ reg and output is a mem.
4232         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
4233         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
4234         xmm16+ reg and output is a mem.
4236 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4238         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
4239         also for flag_dwarf2_cfi_asm.
4241 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4243         PR rtl-optimization/85342
4244         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
4245         a bool scalar var inside of the loop instead.  Don't try to update
4246         recog_data.operand after failed apply_change_group.
4248 2018-04-12  Tom de Vries  <tom@codesourcery.com>
4250         PR target/85296
4251         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
4252         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
4253         array with flexible array member as array without given dimension.
4254         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
4255         argument for undefined param to true.
4257 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
4259         PR target/85321
4260         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4261         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
4262         from PowerPC section.
4263         * config/rs6000/sysv4.opt (mcall-): Improve help text.
4264         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
4265         help text that is too long.
4266         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
4267         help text that is too long.
4268         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
4269         help text that is too long.
4271 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
4273         * config/alpha/alpha.md (stack_probe_internal): Rename
4274         from "probe_stack".  Update all callers.
4276 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4278         PR rtl-optimization/84566
4279         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
4280         sched_macro_fuse_insns.
4282 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4284         PR target/84301
4285         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
4286         (compute_block_dependences): ... from here.
4288 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4290         PR tree-optimization/85331
4291         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
4292         from int to HOST_WIDE_INT.
4294 2018-04-11  Martin Jambor  <mjambor@suse.cz>
4296         PR ipa/84149
4297         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
4298         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
4299         not the same as the source val.
4300         (cgraph_edge_brings_value_p): New parameter.
4301         (gather_edges_for_value): Pass destination value to
4302         cgraph_edge_brings_value_p.
4303         (perhaps_add_new_callers): Likewise.
4304         (get_info_about_necessary_edges): Likewise and exclude values brought
4305         only by self-recursive edges.
4306         (create_specialized_node): Redirect only clones of self-calling edges.
4307         (+self_recursive_pass_through_p): New function.
4308         (find_more_scalar_values_for_callers_subset): Use it.
4309         (find_aggregate_values_for_callers_subset): Likewise.
4310         (known_aggs_to_agg_replacement_list): Removed.
4311         (decide_whether_version_node): Re-calculate known constants for all
4312         remaining context clones.
4314 2018-04-11  Richard Biener  <rguenther@suse.de>
4316         PR lto/85339
4317         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
4318         from early DWARF output.
4319         (dwarf2out_early_finish): Output line info unconditionally into
4320         early DWARF and add reference to it.
4322 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4324         PR target/85281
4325         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
4326         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
4327         other than V2DFmode using iptr mode attribute.
4328         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
4330 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4332         PR rtl-optimization/84659
4333         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
4335 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4337         PR debug/85302
4338         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
4339         SIZEP is NULL.
4340         (output_loc_list): Pass address of a dummy size variable even in the
4341         locview handling loop.
4342         (index_location_lists): Add comment on why skip_loc_list_entry can't
4343         call size_of_locs.
4345 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4347         PR target/85261
4348         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
4349         into register.
4351 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
4353         PR target/85321
4354         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4355         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
4356         and -mstring-compare-inline-limit.
4358 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4360         PR target/85287
4361         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
4362         for stack clash protection in a register whenever we need it to be in
4363         a register.
4365 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4367         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
4368         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
4370 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4372         PR target/85321
4373         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
4374         the help text.
4375         (mlong-double-): Ditto.
4376         * config/rs6000/sysv4.opt (msdata=): Ditto.
4377         (mtls-size=): Ditto.
4379 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4381         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4382         erroneous entries for
4383         "vector int vec_ldl (int, long int *)", and
4384         "vector unsigned int vec_ldl (int, unsigned long int *)".
4385         Add comments and entries for
4386         "vector bool char vec_ldl (int, bool char *)",
4387         "vector bool short vec_ldl (int, bool short *)",
4388         "vector bool int vec_ldl (int, bool int *)",
4389         "vector bool long long vec_ldl (int, bool long long *)",
4390         "vector pixel vec_ldl (int, pixel *)",
4391         "vector long long vec_ldl (int, long long *)",
4392         "vector unsigned long long vec_ldl (int, unsigned long long *)".
4393         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
4394         type tree bool_long_long_type_node and correct definition of
4395         bool_V2DI_type_node to make reference to this new type tree.
4396         (rs6000_mangle_type): Replace erroneous reference to
4397         bool_long_type_node with bool_long_long_type_node.
4398         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
4399         comments to emphasize sign distinctions for char and int types and
4400         replace RS6000_BTI_bool_long constant with
4401         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
4402         use of RS6000_BTI_pixel.
4403         (bool_long_type_node): Remove this macro definition.
4404         (bool_long_long_type_node): New macro definition
4406 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4408         PR rtl-optimization/85300
4409         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
4410         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
4411         simplify_unary_operation fails.
4413 2018-04-10  Martin Liska  <mliska@suse.cz>
4415         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
4416         cgraph_edge and ipa_ref.
4418 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4420         PR target/85177
4421         PR target/85255
4422         * config/i386/sse.md
4423         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
4424         computation of the VEC_MERGE selector from mask.
4425         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
4426         Fix decoding of the VEC_MERGE selector into mask.
4428 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4430         PR tree-optimization/85286
4431         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
4433 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4435         * final.c (final_1): Set insn_last_address as well as
4436         insn_current_address.
4438 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4440         PR target/85173
4441         * explow.c (emit_stack_probe): Call validize_mem on memory location
4442         before passing it to gen_probe_stack.  Create address operand and
4443         legitimize it for the probe_stack_address case.
4445 2018-04-09  Jan Hubicka  <jh@suse.cz>
4447         PR lto/85078
4448         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4449         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4450         * tree.c (free_lang_data_in_type): Fix handling of binfos;
4451         walk basetypes.
4452         (free_lang_data): Rebuild type inheritance graph.
4454 2018-04-09  Martin Sebor  <msebor@redhat.com>
4456         * invoke.texi (-finline-small-functions): Mention other optimization
4457         options.
4458         (-findirect-inlining, -fpartial-inlining): Same.
4459         (-finline-functions-called-once): Same.
4460         (-freorder-blocks-and-partition): Same.
4462 2018-04-09  Jan Hubicka  <jh@suse.cz>
4464         PR rtl/84058
4465         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4466         jumps; choose last target that matches the criteria (i.e.
4467         no partition changes for non-crossing jumps).
4468         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4469         support for redirecting crossing jumps to non-crossing.
4471 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
4473         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4474         also for naked functions.
4476 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
4478         * config/arc/arc.md (add_shift): New pattern.
4479         (add_shift2): Likewise.
4480         (sub_shift): Likewise.
4481         (sub_shift_cmp0_noout): Likewise.
4482         (compare_si_ashiftsi): Likewise.
4483         (xbfu_cmp0_noout): New combine pattern.
4484         (xbfu_cmp0"): Likewise.
4485         (movsi_set_cc_insn): Place the predicable variant first.
4486         (commutative_binary_cmp0_noout): Remove clobber.
4487         (commutative_binary_cmp0): New pattern.
4488         (noncommutative_binary_cmp0): Likewise.
4489         (noncommutative_binary_cmp0_noout): Likewise.
4490         (noncommutative_binary_comparison_result_used): Removed.
4491         (rsub_cmp0): New pattern.
4492         (rsub_cmp0_noout): Likewise.
4493         (extzvsi): Changed, keep only meaningful variants.
4494         (SQH, SEZ): New iterators.
4495         (SQH_postfix): New mode attribute.
4496         (SEZ_prefix): New code attribute.
4497         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
4498         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
4499         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
4500         of numerical value.
4501         (noncommutative_operator): Check the availability of barrel
4502         shifter option.
4504 2018-04-09  Richard Biener  <rguenther@suse.de>
4506         PR tree-optimization/85284
4507         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
4508         Only use the niter constraining form of simple_iv when the exit
4509         is always executed.
4511 2018-04-09  Tom de Vries  <tom@codesourcery.com>
4513         PR target/84041
4514         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4515         (define_expand "*memory_barrier"): New define_expand.
4516         (define_insn "memory_barrier"): New insn.
4518 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4520         PR rtl-optimization/80463
4521         PR rtl-optimization/83972
4522         PR rtl-optimization/83480
4524         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
4525         correct producer for the insn.
4526         (tidy_control_flow): Fixup seqnos in case of debug insns.
4528 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4530         PR rtl-optimization/83913
4532         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
4533         different sched-times when merging exprs.
4535 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4537         PR rtl-optimization/83962
4539         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
4540         tidy_fallthru_edge and tidy_control_flow.
4542 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4544         PR rtl-optimization/83530
4546         * sel-sched.c (force_next_insn): New global variable.
4547         (remove_insn_for_debug): When force_next_insn is true, also leave only
4548         next insn in the ready list.
4549         (sel_sched_region): When the region wasn't scheduled, make another pass
4550         over it with force_next_insn set to 1.
4552 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4554         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4555         into tm_file.
4556         * config/nds32/constants.md (unspec_volatile_element): Add enum values
4557         for interrupt control.
4558         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4559         functions for interrupt control.
4560         * config/nds32/nds32-intrinsic.md: Likewise.
4561         * config/nds32/nds32_intrinsic.h: Likewise.
4562         * config/nds32/nds32.h (nds32_builtins): Likewise.
4564 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4566         * config/nds32/nds32.c (nds32_init_machine_status,
4567         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4568         strict_aligned_p field.
4569         (nds32_expand_to_rtl_hook): New function.
4570         (TARGET_EXPAND_TO_RTL_HOOK): Define.
4571         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4573 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4574             Chung-Ju Wu  <jasonwucj@gmail.com>
4576         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4577         * config/nds32/nds32-n7.md: New file.
4578         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4579         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4580         pipeline.
4581         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4582         * config/nds32/nds32.md (pipeline_model): Add n7.
4583         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4584         * config/nds32/pipelines.md: Include n7 settings.
4586 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4587             Chung-Ju Wu  <jasonwucj@gmail.com>
4589         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4590         * config/nds32/nds32-e8.md: New file.
4591         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4592         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4593         pipeline.
4594         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4595         * config/nds32/nds32.md (pipeline_model): Add e8.
4596         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4597         * config/nds32/pipelines.md: Include e8 settings.
4599 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4600             Chung-Ju Wu  <jasonwucj@gmail.com>
4602         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4603         * config/nds32/nds32-n8.md: New file.
4604         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4605         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4606         pipeline.
4607         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4608         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4609         * config/nds32/nds32.md (pipeline_model): Add n8.
4610         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4611         * config/nds32/pipelines.md: Include n8 settings.
4613 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4614             Chung-Ju Wu  <jasonwucj@gmail.com>
4616         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4617         * config/nds32/nds32-n9-2r1w.md: New file.
4618         * config/nds32/nds32-n9-3r2w.md: New file.
4619         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4620         nds32_register_ports): New or modify for cpu n9.
4621         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4622         pipeline.
4623         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4624         * config/nds32/nds32-utils.c: New file.
4625         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4626         TARGET_MUL_SLOW): Define.
4627         * config/nds32/nds32.md (pipeline_model): New attribute.
4628         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4629         New options that support cpu n9.
4630         * config/nds32/pipelines.md: Include n9 settings.
4631         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4633 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4635         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4636         information if necessary.
4637         (output_cond_branch_compare_zero): Likewise.
4638         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4639         (nds32_target_alignment): Refine for alignment.
4640         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4641         (FUNCTION_BOUNDARY): Modify.
4642         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4643         align case.
4644         * config/nds32/nds32.opt (malways-align, malign-functions): New.
4646 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4648         * config/nds32/constants.md (unspec_volatile_element): Add values for
4649         TLB operation and data prefetch.
4650         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4651         functions for TLB operation and data prefetch.
4652         * config/nds32/nds32-intrinsic.md: Likewise.
4653         * config/nds32/nds32_intrinsic.h: Likewise.
4654         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4655         (nds32_print_operand): Likewise.
4656         * config/nds32/nds32.h (nds32_builtins): Likewise.
4658 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4659         Andrew Pinski <pinsika@gcc.gnu.org>
4661         PR middle-end/82976
4662         * match.pd: Use constant_boolean_node of correct type instead of
4663         boolean_true_node or boolean_false_node for simplifying
4664         pointer comparisons to zero.
4666 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4668         PR tree-optimization/80021
4669         * tree.c (verify_type_variant): Make error call in verify_variant_match
4670         translatable and remove final full stop.
4672 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4674         * config/nds32/constants.md (unspec_volatile_element): Add
4675         UNSPEC_VOLATILE_EH_RETURN.
4676         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4677         nds32_output_stack_pop): Support dwarf exception handling process.
4678         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4679         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4680         exception handling process.
4681         (nds32_compute_stack_frame): Likewise.
4682         (nds32_return_addr_rtx): Likewise.
4683         (nds32_initial_elimination_offset): Likewise.
4684         (nds32_expand_prologue): Likewise.
4685         (nds32_expand_epilogue): Likewise.
4686         (nds32_dynamic_chain_address): New function.
4687         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4688         exception handling.
4689         (DYNAMIC_CHAIN_ADDRESS): Define.
4690         (EH_RETURN_DATA_REGNO): Define.
4691         (EH_RETURN_STACKADJ_RTX): Define.
4692         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4693         patterns for dwarf exception handling.
4695 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4697         * config/nds32/nds32.h: Clean up obsolete macros.
4699 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4701         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4702         Add enum values for particular instructions.
4703         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4704         particular intrinsic functions.
4705         * config/nds32/nds32-intrinsic.md: Likewise.
4706         * config/nds32/nds32_intrinsic.h: Likewise.
4707         * config/nds32/nds32.h (nds32_builtins): Likewise.
4708         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4709         (btst, ave): New patterns for particular instructions.
4711 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4713         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4714         Add enum values for atomic load/store and memory sync.
4715         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4716         and memory sync.
4717         * config/nds32/nds32-intrinsic.md: Likewise.
4718         * config/nds32/nds32_intrinsic.h: Likewise.
4719         * config/nds32/nds32.h (nds32_builtins): Likewise.
4721 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4723         PR tree-optimization/85257
4724         * fold-const.c (native_encode_vector): If not all elts could fit
4725         and off is -1, return 0 rather than offset.
4726         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4727         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4728         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4729         adjust buffer in native_interpret_expr call.
4731 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4733         * config/nds32/constants.md (unspec_volatile_element): Add cache
4734         control enum values.
4735         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4736         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4737         * config/nds32/nds32.c (nds32_cctl_names): New.
4738         (nds32_print_operand): Handle cache control register names.
4739         * config/nds32/nds32.h (nds32_builtins): New enum values.
4740         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4741         macros.
4742         * config/nds32/nds32.md (type): Add mmu.
4743         * config/nds32/pipelines.md (simple_insn): Add mmu.
4745 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4747         * config/nds32/nds32.md (type): Remove call.
4748         * config/nds32/pipelines.md (simple_insn): Likewise.
4750 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4752         * config/nds32/constants.md (unspec_volatile_element): Add
4753         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4754         UNSPEC_VOLATILE_FMFCFG.
4755         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4756         description for fmfcfg and fmfcsr.
4757         (bdesc_1arg): Add fmtcsr.
4758         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4759         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4760         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4761         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4762         unspec_fmfcfg): New patterns.
4763         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4764         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4765         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4766         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4767         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4768         __nds32__fmfcfg): Define.
4770 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4772         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4773         intrinsic register names.
4774         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4775         intrinsic register enum values and macros.
4777 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4779         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4780         for load/store addressing form.
4781         (nds32_print_operand_address): Likewise.
4783 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4785         PR target/85196
4786         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4787         based on LABEL_REF.  Remove useless assertion.
4788         (pic_address_needs_scratch): Fix formatting.
4789         (sparc_legitimize_pic_address): Minor tweaks.
4790         (sparc_delegitimize_address): Adjust assertion accordingly.
4791         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4792         into symbolic_operand.
4793         (movsi_high_pic_label_ref): Likewise.
4794         (movsi_lo_sum_pic_label_ref): Likewise.
4795         (movdi_pic_label_ref): Likewise.
4796         (movdi_high_pic_label_ref): Likewise.
4797         (movdi_lo_sum_pic_label_ref): Likewise.
4799 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4801         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4802         custom LIB_SPEC setup.
4804 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4805             Kito Cheng  <kito.cheng@gmail.com>
4807         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4808         * config/riscv/freebsd.h: New.
4810 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4812         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4813         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4814         file.
4816 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4817             Kito Cheng  <kito.cheng@gmail.com>
4819         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4820         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4821         * config/nds32/nds32-protos.h (nds32_output_call,
4822         nds32_output_return): Declare.
4823         * config/nds32/nds32.md: Refine all the call and return patterns.
4825 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4827         PR debug/85252
4828         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4829         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4831         PR rtl-optimization/84872
4832         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4833         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4834         EDGE_CROSSING edge.
4836 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4838         * expr.c (copy_blkmode_to_reg): Revert 254862.
4839         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4841 2018-04-06  Richard Biener  <rguenther@suse.de>
4843         PR middle-end/85244
4844         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4845         after seeing a component reference with an adjacent field.  Treat
4846         refs to arrays at struct end of external decls similar to
4847         refs to unconstrained commons.
4849 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4851         PR sanitizer/85213
4852         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4853         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4854         recursive calls.
4855         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4856         save_p here.
4858 2018-04-06  Richard Biener  <rguenther@suse.de>
4860         PR middle-end/85180
4861         * alias.c (find_base_term): New wrapper around find_base_term
4862         unwinding CSELIB_VAL_PTR changes.
4863         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4864         recursion.
4866 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4868         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4869         instructions.
4870         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4871         constant definitions.
4872         ("nop"): lr 0,0 -> nopr r0
4873         ("nop_lr0", "nop_lr1"): New insn definitions.
4875 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4877         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4878         NDS32_V3PUSH_AVAILABLE_P macro.
4880 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4881             Chung-Ju Wu  <jasonwucj@gmail.com>
4883         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4884         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4885         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4886         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4887         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4888         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4889         * config/nds32/constraints.md: New constraints and checking for hard
4890         float configuration.
4891         * config/nds32/iterators.md: New mode iterator and attribute for hard
4892         float configuration.
4893         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4894         patterns.
4895         * config/nds32/nds32-fpu.md: New file.
4896         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4897         deal with hard float code generation.
4898         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4899         ARCH_V3S.
4900         (abi_type, float_reg_number): New enum type.
4901         * config/nds32/nds32-predicates.c: New predicates for hard float.
4902         * config/nds32/nds32-protos.h: Declare functions for hard float.
4903         * config/nds32/nds32.c: Implementation for hard float configuration.
4904         * config/nds32/nds32.h: Definitions for hard float configuration.
4905         * config/nds32/nds32.md: Include hard float machine description and
4906         modify patterns for hard float configuration.
4907         * config/nds32/nds32.opt: New options for hard float configuration.
4908         * config/nds32/predicates.md: New predicates for hard float
4909         configuration.
4911 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4913         * common/config/nds32/nds32-common.c
4914         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4916 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4918         PR middle-end/85195
4919         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4920         CONSTRUCTOR_ELT (ctor, ...)->value.
4922 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4924         PR target/85193
4925         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4927 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4929         PR target/85204
4930         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4931         cond jump.
4933 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4934             Kito Cheng  <kito.cheng@gmail.com>
4936         * config/nds32/constraints.md (U33): Fine-tune checking condition.
4937         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4938         * config/nds32/nds32.h (nds32_16bit_address_type): Add
4939         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4941 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
4942             Kito Cheng  <kito.cheng@gmail.com>
4944         * config/nds32/constraints.md (Ufe): New memory constraint.
4945         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4946         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4947         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4948         operands.
4949         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4950         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4952 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4954         * config/nds32/nds32.md: Use optimize_size in the condition for
4955         alu-shift instructions.
4957 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4959         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4961 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4963         * config/nds32/nds32.md (negsi2): Refine pattern.
4965 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4966             Chung-Ju Wu  <jasonwucj@gmail.com>
4968         * config/nds32/iterators.md (shift_rotate): New code iterator.
4969         (shift): New code attribute.
4970         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4971         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4972         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4973         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4974         bit-wise operations.
4975         (andsi3, *andsi3): Ditto.
4976         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4977         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4978         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4979         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4980         nds32_ior_operand, nds32_xor_operand): New predicates.
4982 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4984         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4985         (addsi3, subsi3): ... this.
4987 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4989         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
4991 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
4993         * config/nds32/nds32.md: Adjust indention.
4995 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
4997         * config/nds32/nds32.md (feature): New attribute.
4999 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5001         * config/nds32/nds32.md (subtype): New attribute.
5003 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5005         PR target/85203
5006         * config/arm/arm-builtins.c (arm_expand_builtin): Change
5007         expansion to perform a bitwise AND of the argument followed by a
5008         boolean negation of the result.
5010 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
5012         PR rtl-optimization/84878
5013         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
5014         the basic block.  Assert the use reference is not artificial and that
5015         it has an associated insn.
5017 2018-04-04  Michael Matz  <matz@suse.de>
5019         * builtins.c (compute_objsize): Pass correct operand
5020         to array_at_struct_end_p.
5022 2018-04-04  Richard Biener  <rguenther@suse.de>
5024         PR lto/85176
5025         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
5026         from contexts for DINFO_LEVEL_TERSE and below.
5028 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
5030         * config/nds32/nds32-doubleword.md (move_<mode>): Require
5031         resiter_operand condition.
5032         * config/nds32/nds32.md (*move<mode>): Ditto.
5034 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
5035             Monk Chiang  <sh.chiang04@gmail.com>
5037         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
5039 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5041         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
5043 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5044             Kito Cheng  <kito.cheng@gmail.com>
5046         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
5047         nds32_cond_code_str, output_cond_branch,
5048         output_cond_branch_compare_zero, nds32_expand_cbranch,
5049         nds32_expand_cstore, nds32_expand_movcc,
5050         nds32_output_cbranchsi4_equality_zero,
5051         nds32_output_cbranchsi4_equality_reg,
5052         nds32_output_cbranchsi4_equality_reg_or_const_int,
5053         nds32_output_cbranchsi4_greater_less_zero: New functions.
5054         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
5055         nds32_expand_cstore, nds32_expand_movcc,
5056         nds32_output_cbranchsi4_equality_zero,
5057         nds32_output_cbranchsi4_equality_reg,
5058         nds32_output_cbranchsi4_equality_reg_or_const_int,
5059         nds32_output_cbranchsi4_greater_less_zero): Declare.
5060         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
5061         nds32_rimm11s_operand): New predicates.
5062         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
5063         * config/nds32/nds32.md: Rewrite all the branch and conditional move
5064         patterns.
5066 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
5068         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
5069         * config/nds32/nds32.md: Ditto.
5070         * config/nds32/pipelines.md: Ditto.
5072 2018-04-04  Richard Biener  <rguenther@suse.de>
5074         PR tree-optimization/85168
5075         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
5076         propagating abnormals.
5078 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5080         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
5082 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5083             Kito Cheng  <kito.cheng@gmail.com>
5085         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
5086         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
5087         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
5088         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
5089         * config/nds32/nds32.md (sibcall_internal): New.
5090         (sibcall_register): Remove.
5091         (sibcall_immediate): Remove.
5092         (sibcall_value_internal): New.
5093         (sibcall_value_register): Remove.
5094         (sibcall_value_immediate): Remove.
5095         * config/nds32/predicates.md (nds32_general_register_operand): New.
5096         (nds32_call_address_operand): New.
5098 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
5100         PR rtl-optimization/85167
5101         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
5102         bb_defs if *split_p, instead preinitialize it to NULL.
5104         PR tree-optimization/85156
5105         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
5106         evaluating the argument multiple times.
5108 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
5110         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
5111         than vector.
5112         (_mm_cvtpd_ps): Likewise.
5113         (_mm_cvttpd_epi32): Likewise.
5114         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
5115         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
5116         vector, pixel, and bool following altivec.h include.
5118 2018-04-03  Martin Sebor  <msebor@redhat.com>
5120         * doc/extend.texi (Common Function Attributes): Clarify.
5121         (const attribute): Likewise.
5122         (pure attribute): Likewise.
5124 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
5126         PR target/85169
5127         * config/i386/i386.c (ix86_expand_vector_set): Use
5128         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
5130 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
5132         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
5133         instructions when changing rounding bits to preserve precision bits
5134         in the x87 control word.
5136 2018-04-03  Martin Liska  <mliska@suse.cz>
5138         PR tree-optimization/82491
5139         * rtl.h (strip_offset_and_add): Replace += suboffset with
5140         poly_uint64 () + suboffset.
5142 2018-03-29  Martin Liska  <mliska@suse.cz>
5143             Martin Jambor  <mjambor@suse.cz>
5145         PR ipa/84947
5146         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
5147         param_type is not an integral or pointer type.
5149 2018-04-03  Richard Biener  <rguenther@suse.de>
5151         * sese.h (recompute_all_dominators): Remove.
5153 2018-04-02  Martin Sebor  <msebor@redhat.com>
5155         * doc/invoke.texi (-Wrestrict): Fix typos.
5157 2018-04-02  Jim Wilson  <jimw@sifive.com>
5159         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
5160         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
5161         (<optab>di3, <optab>si3_extend): Likewise.
5162         (<optab>si3_mask, <optab>si3_mask_1): New.
5163         (<optab>di3_mask, <optab>di3_mask_1): New.
5164         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
5165         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
5166         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
5168 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
5170         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
5171         example.
5173 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5175         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
5176         (nds32_canonicalize_comparison): New function.
5178 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5179             Kito Cheng  <kito.cheng@gmail.com>
5180             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
5182         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
5183         * config/nds32/constants.md (unspec_volatile_element): Add
5184         UNSPEC_VOLATILE_RELAX_GROUP.
5185         * config/nds32/nds32-relax-opt.c: New file.
5186         * config/nds32/nds32-predicates.c
5187         (nds32_symbol_load_store_p): New function.
5188         * config/nds32/nds32-protos.h
5189         (nds32_symbol_load_store_p): Declare function.
5190         (make_pass_nds32_relax_opt): Declare new rtl pass function.
5191         * config/nds32/nds32.c
5192         (nds32_register_pass): New function to register pass.
5193         (nds32_register_passes): New function to register passes.
5194         * config/nds32/nds32.md (relax_group): New pattern.
5195         * config/nds32/nds32.opt (mrelax-hint): New option.
5196         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
5198 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
5200         * config/nds32/t-nds32: Modify files dependency.
5202 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5204         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
5205         (PROFILE_HOOK): Define its implementation.
5207 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5209         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
5210         type and 32-bit size.
5212 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
5214         PR middle-end/85090
5215         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
5216         (V_128_256): New mode iterator.
5217         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
5218         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
5219         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
5220         of V.
5221         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
5222         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
5224 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
5226         PR target/83315
5227         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
5228         NaN inputs correctly.
5230 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
5232         PR target/80546
5233         * config/rs6000/vsx.md (??r): New mode attribute.
5234         (*vsx_mov<mode>_64bit): Use it.
5235         (*vsx_mov<mode>_32bit): Likewise.
5237 2018-03-30  Martin Sebor  <msebor@redhat.com>
5239         PR tree-optimization/84818
5240         * builtins.c (check_access): Use warning_n.
5242 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5244         PR target/83822
5245         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
5246         condition.
5247         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
5248         condition.
5250 2018-03-30  Julia Koval  <julia.koval@intel.com>
5252         PR target/84413
5253         * x86-tune.def (movx, partial_reg_dependency): Enable for
5254         m_SKYLAKE_AVX512.
5256 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
5258         PR inline-asm/84985
5259         * lra-constraints.c (process_alt_operands): Move setting
5260         this_alternative_matches below.
5262 2018-03-29  Martin Liska  <mliska@suse.cz>
5264         PR lto/84995.
5265         * doc/invoke.texi: Document how LTO works with debug info.
5266         Describe auto-load support of binutils.  Mention 'x86-64'
5267         as valid option value of -march option.
5269 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
5271         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
5273         PR c/85094
5274         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
5275         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
5276         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
5277         checking.
5279 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5281         PR target/84912
5282         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
5283         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
5284         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
5285         for RS6000_BTM_POWERPC64.
5286         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
5287         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
5288         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
5289         definition.
5290         (DIVDE): Use it.
5291         (DIVDEU): Likewise.
5293 2018-03-28 Carl Love  <cel@us.ibm.com>
5295         Revert
5296         2017-09-27  Carl Love  <cel@us.ibm.com>
5298         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
5299         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
5300         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
5301         fctiw instruction.
5303 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5305         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
5306         instead of __vector bool.
5307         (_mm_max_pu8): Likewise.
5308         (_mm_min_pi16): Likewise.
5310 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5312         PR target/84912
5313         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
5314         (DIVWEUO): Likewise.
5315         (DIVDEO): Likewise.
5316         (DIVDEUO): Likewise.
5317         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
5318         DIVWEUO and DIVDEUO.
5319         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
5320         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
5321         (div_extend): Likewise.
5322         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
5323         builtin function.
5324         (__builtin_divweuo): Likewise.
5325         (__builtin_divdeo): Likewise.
5326         (__builtin_divdeuo): Likewise.
5328 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5330         PR target/85095
5331         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
5332         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
5334         PR tree-optimization/82004
5335         * gimple-match-head.c (optimize_pow_to_exp): New function.
5336         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
5337         Don't fold to exp if optimize_pow_to_exp is false.
5339 2018-03-28  Martin Liska  <mliska@suse.cz>
5341         PR other/84819
5342         * calls.c (initialize_argument_information): Fix trailing space.
5343         * common.opt: Fix typo and provide better explanation for
5344         -fsanitize-coverage option.
5345         * config/i386/i386.opt: Fix typo.
5347 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5348             Martin Liska  <mliska@suse.cz>
5350         PR sanitizer/85081
5351         * gimplify.c (asan_poison_variable): Don't do the check for
5352         gimplify_omp_ctxp here.
5353         (gimplify_decl_expr): Do it here.
5354         (gimplify_target_expr): Likewise.
5356 2018-03-28  Martin Liska  <mliska@suse.cz>
5358         PR target/84988
5359         * config/i386/i386.c (ix86_function_arg_advance): Do not call
5360         chkp_type_bounds_count if MPX is not enabled.
5362 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5364         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
5366 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
5368         PR target/84914
5369         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
5370         function to create the function decl for complex long double
5371         multiply and divide for -mabi=ieeelongdouble.
5372         (init_float128_ieee): Call it.
5374 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
5376         PR target/85044
5377         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
5378         -fcf-protection=branch -mibt.
5379         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
5381 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5383         PR target/81863
5384         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
5386 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
5388         PR target/85056
5389         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
5390         extern array declarations.
5392 2018-03-27  Richard Biener  <rguenther@suse.de>
5394         PR middle-end/84067
5395         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
5396         explicit single_use checks.
5398 2018-03-27  Richard Biener  <rguenther@suse.de>
5400         PR tree-optimization/85082
5401         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
5402         Valueize the VUSE.
5404 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5406         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
5407         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
5408         Turn on fasynchronous-unwind-tables and funwind-tables.
5410 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
5412         PR target/85073
5413         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
5414         (*bmi_blsr_<mode>_ccz): Ditto.
5416 2018-03-26  Tom de Vries  <tom@codesourcery.com>
5418         PR tree-optimization/85063
5419         * omp-general.c (offloading_function_p): New function.  Factor out
5420         of ...
5421         * omp-offload.c (pass_omp_target_link::gate): ... here.
5422         * omp-general.h (offloading_function_p): Declare.
5423         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
5424         with attribute omp declare target for offloading functions.
5426 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
5428         PR tree-optimization/84005
5429         * tree-data-ref.h (get_base_for_alignment): Declare.
5430         * tree-data-ref.c (get_base_for_alignment_1): New function.
5431         (get_base_for_alignment): Likewise.
5432         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
5433         get_base_for_alignment to find a suitable base object, instead
5434         of always using drb->base_address.
5436 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5438         PR inline-asm/85022
5439         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5440         known size by default.
5442 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
5444         PR inline-asm/85030
5445         * lra-constraints.c (process_alt_operands): Don't match BLKmode
5446         and non BLKmode operands.
5448 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5450         PR target/85026
5451         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5452         Clean up attributes.
5454 2018-03-23  Richard Biener  <rguenther@suse.de>
5456         PR debug/85020
5457         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5458         we are going to emit early debug for LTO.
5460 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5462         PR inline-asm/85034
5463         * function.c (match_asm_constraints_1): Don't optimize if input
5464         doesn't satisfy general_operand predicate for output's mode.
5466         PR inline-asm/85022
5467         * alias.c (write_dependence_p): Don't require for x_canonicalized
5468         non-VOIDmode if x has VOIDmode.
5470         PR sanitizer/85029
5471         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5472         just don't try to optimize it rather than assert it never happens.
5474 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5476         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5477         macro expansions for definition of ST_INTERNAL_<mode> and
5478         LD_INTERNAL_<mode> builtins.
5479         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5480         Remove prototype.
5481         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5482         function.
5483         (altivec_expand_st_builtin): Likewise.
5484         (altivec_expand_builtin): Remove calls to deleted functions.
5485         (rs6000_address_for_altivec): Delete this function.
5486         * config/rs6000/vector.md: Remove expands for
5487         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
5489 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
5491         PR target/84826
5492         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
5493         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
5494         re-computing once computed.
5495         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
5496         (arm_init_machine_status): Initialize
5497         machine->static_chain_stack_bytes.
5499 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5501         PR target/84760
5502         * doc/extend.texi: Add four new prototypes for vec_ld.
5503         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
5504         definitions for more logical presentation.
5505         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
5506         entries for V1TI variants of __builtin_altivec_ld builtin.
5507         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
5508         handling of V1TI variant of LVX icode pattern.
5509         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
5510         (rs6000_gimple_fold_builtin): Likewise.
5511         (altivec_init_builtins): Add code to define
5512         __builtin_altivec_lvx_v1ti function.
5514 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5516         PR inline-asm/84941
5517         * function.c (match_asm_constraints_1): Don't do the optimization
5518         if input isn't a REG, SUBREG, MEM or constant.
5520 2018-03-22  Tom de Vries  <tom@codesourcery.com>
5522         PR tree-optimization/84956
5523         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
5524         bb_has_abnormal_pred.
5526 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5528         PR sanitizer/85018
5529         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
5530         DECL_INITIAL (decl) to decl at the end.
5531         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
5532         adjust the comment.
5534 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
5536         * doc/extend.texi (__builtin_tgmath): Document when complex
5537         integer types are treated as _Complex _Float64.
5539 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5541         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
5543 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5545         PR tree-optimization/84960
5546         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
5547         if it is ENTRY block, move them into single succ of ENTRY in that case.
5549 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
5551         PR tree-optimization/84811
5552         * poly-int.h (poly_span_traits): Remove the T3 parameter and
5553         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5554         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5555         (known_subrange_p): Update accordingly.  Cast each value involved
5556         in the size comparison, rather than casting the result of the
5557         subtraction.
5559 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5561         PR tree-optimization/84982
5562         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5563         by flipping the least significant bit rather than all bits from
5564         bitpos to bitpos + bitsize - 1.
5566 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5568         * doc/extend.texi (Deprecated Features): Remove mention of
5569         long-deleted deprecations.
5571 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5573         PR jit/84288
5574         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5575         * configure: Regenerate.
5577 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5579         PR tree-optimization/83126
5580         * tree-parloops.c (num_phis): New function.
5581         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5583 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5585         * doc/extend.texi (Deprecated Features): Update deprecated flags,
5586         mention anon-struct/union members and trailing attributes.
5588 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
5590         PR tree-optimization/84969
5591         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5592         builtin memset partitions if they set different rhs values.
5594 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5596         PR rtl-optimization/84989
5597         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5598         VEC_DUPLICATE with scalar result mode.
5600 2018-03-21  Martin Liska  <mliska@suse.cz>
5602         PR ipa/84963
5603         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5604         not intended return statement.
5606 2018-03-21  Martin Liska  <mliska@suse.cz>
5608         PR target/84988
5609         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5610         (chkp_find_bound_slots_1): Limit number of iterations.
5612 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
5614         PR target/84838
5615         * Minor grammar fixes for x86 options.
5617 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5619         PR debug/84875
5620         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5621         holding REG_CFA_RESTORE notes, instead turn them into a USE.
5623 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
5625         PR target/83789
5626         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5627         (altivec_lvx_<mode>_1op): Likewise.
5628         (altivec_stvx_<mode>_2op): Likewise.
5629         (altivec_stvx_<mode>_1op): Likewise.
5630         (altivec_lvx_<VM2:mode>): New define_expand.
5631         (altivec_stvx_<VM2:mode>): Likewise.
5632         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5633         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5634         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5635         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5636         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5637         (rs6000_gen_lvx): Likewise.
5638         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5639         (altivec_expand_stv_builtin): Likewise.
5640         (altivec_expand_builtin): Likewise.
5641         * config/rs6000/vector.md: Likewise.
5643 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5645         PR target/82518
5646         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5647         BYTES_BIG_ENDIAN.
5649 2018-03-20  Richard Biener  <rguenther@suse.de>
5651         PR target/84986
5652         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5653         sign-conversions as zero, fall back to standard scalar_stmt
5654         cost for the rest.
5656 2018-03-20  Martin Liska  <mliska@suse.cz>
5658         PR ipa/84825
5659         * predict.c (rebuild_frequencies): Handle case when we have
5660         PROFILE_ABSENT, but flag_guess_branch_prob is false.
5662 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5664         PR target/84990
5665         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5666         flag_section_anchors.
5667         * varasm.c (use_blocks_for_decl_p): Remove hack for
5668         dw2_force_const_mem.
5670         PR target/84845
5671         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5672         to ...
5673         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5674         be created, use lowpart_subreg of operands[0] rather than operands[0]
5675         itself.
5676         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5677         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5678         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5679         and n constraint instead of aarch64_shift_imm_di and Usd.
5680         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5681         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5683 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5685         PR target/82989
5686         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5687         to favor GPR over NEON registers.
5688         (<shift>di3_neon): Likewise.
5690 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5692         PR target/84952
5693         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5694         (nvptx_process_pars): Emit bar.sync asap and alap.
5696 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5698         PR target/84954
5699         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5700         seen_label if seen_label is already set.
5702 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5704         PR target/84945
5705         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5706         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5707         Use 1U instead of 1.  Formatting fixes.
5709         PR c/84953
5710         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5711         instead of TREE_TYPE (s1) for the return value.
5713 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5715         PR tree-optimization/84946
5716         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5717         bitsize + bitsize in poly_uint64 rather than poly_int64.
5719         PR sanitizer/78651
5720         * dwarf2asm.c: Include fold-const.c.
5721         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5722         of decl rather than decl itself.
5724         PR rtl-optimization/84643
5725         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5727 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5729         PR sanitizer/78651
5730         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5731         calling assemble_variable.
5733 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5735         PR target/81647
5736         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5737         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5739 2018-03-19  Jim Wilson  <jimw@sifive.com>
5741         PR bootstrap/84856
5742         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5743         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5744         (riscv_first_stack_step): Likewise.
5745         (riscv_option_override): Use STACK_BOUNDARY instead of
5746         MIN_STACK_BOUNDARY.
5747         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5748         MIN_STACK_BOUNDARY.
5749         (BIGGEST_ALIGNMENT): Set to 128.
5750         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5751         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5752         STACK_BOUNDARY.
5754 2018-03-19  Richard Biener  <rguenther@suse.de>
5756         PR tree-optimization/84933
5757         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5758         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5760 2018-03-19  Richard Biener  <rguenther@suse.de>
5762         PR tree-optimization/84859
5763         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5764         (cond_if_else_store_replacement): Perform sinking operation on
5765         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5766         Generalize what a BB with a single eligible store is.
5768 2018-03-19  Richard Biener  <rguenther@suse.de>
5770         PR tree-optimization/84929
5771         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5772         chrec_is_positive against non-chrec arg.
5774 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5776         PR target/84711
5777         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5779 2018-03-18  Martin Liska  <mliska@suse.cz>
5781         PR rtl-optimization/84635
5782         * regrename.c (build_def_use): Use matches_mode only when
5783         matches >= 0.
5785 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5787         PR tree-optimization/84913
5788         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5789         vectorize chains of COND_EXPRs.
5791 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5793         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5795 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5797         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5799 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5801         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5803 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5804             Kito Cheng  <kito.cheng@gmail.com>
5806         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5807         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5808         (nds32_adjust_reg_alloc_order): New function.
5809         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5811 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5813         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5814         nds32_print_operand, nds32_print_operand_address): Use
5815         HOST_WIDE_INT_PRINT_DEC instead.
5817 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5819         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5821 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5823         PR target/84902
5824         * config/i386/i386.c (initial_ix86_tune_features,
5825         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5826         unsigned long long.
5827         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5828         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5829         rather than 1u << ix86_tune.  Formatting fix.
5830         (ix86_option_override_internal): Change ix86_arch_mask from
5831         unsigned int to unsigned HOST_WIDE_INT, initialize to
5832         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5833         (ix86_function_specific_restore): Likewise.
5835 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5837         PR target/84899
5838         * postreload.c (reload_combine_recognize_pattern): Perform
5839         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5840         truncate_int_for_mode the result for the destination's mode.
5842         PR c/84909
5843         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5844         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5845         Likewise.
5846         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5847         Likewise.
5849 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5851         PR target/84876
5852         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5853         regno_allocno_class_array and sorted_pseudos.
5854         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5855         insns where regno is used.
5857 2018-03-16  Martin Liska  <mliska@suse.cz>
5859         PR ipa/84833
5860         * multiple_target.c (create_dispatcher_calls): Redirect
5861         reference in the symbol table.
5863 2018-03-16  Martin Liska  <mliska@suse.cz>
5865         PR ipa/84722
5866         * multiple_target.c (create_dispatcher_calls): Redirect also
5867         an alias.
5869 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5871         PR c++/79937
5872         PR c++/82410
5873         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5874         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5875         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5877 2018-03-16  Julia Koval  <julia.koval@intel.com>
5879         * doc/invoke.texi (Skylake Server): Add CLWB.
5880         Cannonlake): Remove CLWB.
5882 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5884         PR tree-optimization/84841
5885         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5886         1 << 3.
5887         (FLOAT_ONE_CONST_TYPE): Define.
5888         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5889         (sort_by_operand_rank): Put entries with higher constant_type last
5890         rather than first to match comments.
5892 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5894         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5895         split predicate.
5897 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5899         PR c++/79085
5900         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5901         check and use address of target always.
5903 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5905         PR target/84574
5906         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5907         (indirect_thunk_bnd_needed): Likewise.
5908         (indirect_thunks_used): Likewise.
5909         (indirect_thunks_bnd_used): Likewise.
5910         (indirect_return_needed): New.
5911         (indirect_return_bnd_needed): Likewise.
5912         (output_indirect_thunk_function): Add a bool argument for
5913         function return.
5914         (output_indirect_thunk_function): Don't generate alias for
5915         function return thunk.
5916         (ix86_code_end): Call output_indirect_thunk_function to generate
5917         function return thunks.
5918         (ix86_output_function_return): Set indirect_return_bnd_needed
5919         and indirect_return_needed instead of indirect_thunk_bnd_needed
5920         and indirect_thunk_needed.
5922 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5924         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5925         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5926         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5928 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5929             Paul Hua <paul.hua.gm@gmail.com>
5931         PR c/84852
5932         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5934 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
5936         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5937         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5938         resp. SFmode cases.
5940 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
5942         PR target/84711
5943         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5944         instead of GET_MODE_SIZE when comparing Units.
5946 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5948         PR target/68256
5949         * varasm.c (hash_section): Return an unchangeble hash value
5950         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5951         Return !aarch64_can_use_per_function_literal_pools_p ().
5953 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5955         PR target/84860
5956         * optabs.c (emit_conditional_move): Pass address of cmode's copy
5957         rather than address of cmode as last argument to prepare_cmp_insn.
5959 2018-03-15  Julia Koval  <julia.koval@intel.com>
5961         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5962         F_AVX512VNNI, F_AVX512BITALG): New.
5964 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
5966         PR target/83451
5967         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
5968         insn for floating-point loads and stores.
5970 2018-03-14  Carl Love  <cel@us.ibm.com>
5972         * config/rs6000/rs6000-c.c: Add macro definitions for
5973         ALTIVEC_BUILTIN_VEC_PERMXOR.
5974         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5975         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5976         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5977         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5978         UNSPEC_VPERMXOR.
5979         * config/doc/extend.texi: Add prototypes for vec_permxor.
5981 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
5983         PR c/84852
5984         * diagnostic-show-locus.c (class layout_point): Convert m_line
5985         from int to linenum_type.
5986         (line_span::comparator): Use linenum "compare" function when
5987         comparing line numbers.
5988         (test_line_span): New function.
5989         (layout_range::contains_point): Convert param "row" from int to
5990         linenum_type.
5991         (layout_range::intersects_line_p): Likewise.
5992         (layout::will_show_line_p): Likewise.
5993         (layout::print_source_line): Likewise.
5994         (layout::should_print_annotation_line_p): Likewise.
5995         (layout::print_annotation_line): Likewise.
5996         (layout::print_leading_fixits): Likewise.
5997         (layout::annotation_line_showed_range_p): Likewise.
5998         (struct line_corrections): Likewise for field m_row.
5999         (line_corrections::line_corrections): Likewise for param "row".
6000         (layout::print_trailing_fixits): Likewise.
6001         (layout::get_state_at_point): Likewise.
6002         (layout::get_x_bound_for_row): Likewise.
6003         (layout::print_line): Likewise.
6004         (diagnostic_show_locus): Likewise for locals "last_line" and
6005         "row".
6006         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
6007         * input.c (selftest::test_linenum_comparisons): New function.
6008         (selftest::input_c_tests): Call it.
6009         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
6010         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
6011         * selftest.h (ASSERT_GT): New macro.
6012         (ASSERT_GT_AT): New macro.
6013         (ASSERT_LT): New macro.
6014         (ASSERT_LT_AT): New macro.
6016 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
6018         PR rtl-optimization/84780
6019         * combine.c (distribute_links): Don't make a link based on pc_rtx.
6021 2018-03-14  Martin Liska  <mliska@suse.cz>
6023         * tree.c (record_node_allocation_statistics): Use
6024         get_stats_node_kind.
6025         (get_stats_node_kind): New function extracted from
6026         record_node_allocation_statistics.
6027         (free_node): Use get_stats_node_kind.
6029 2018-03-14  Richard Biener  <rguenther@suse.de>
6031         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
6032         that the value-set of ANTIC_IN doesn't grow.
6034         Revert
6035         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6036         member.
6037         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6038         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6040 2018-03-14  Julia Koval  <julia.koval@intel.com>
6042         * config.gcc (icelake-client, icelake-server): New.
6043         (icelake): Remove.
6044         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
6045         (initial_ix86_arch_features): Ditto.
6046         (PTA_SKYLAKE): Add SGX.
6047         (PTA_ICELAKE): Remove.
6048         (PTA_ICELAKE_CLIENT): New.
6049         (PTA_ICELAKE_SERVER): New.
6050         (ix86_option_override_internal): Split up icelake on icelake client and
6051         icelake server.
6052         (get_builtin_code_for_version): Ditto.
6053         (fold_builtin_cpu): Ditto.
6054         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
6055         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
6056         * config/i386/i386.h (processor_type): Ditto.
6057         * doc/invoke.texi: Ditto.
6059 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
6061         PR sanitizer/83392
6062         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
6063         INTEGER_CST offset, add it together with bitpos / 8 and
6064         sign extend based on POINTER_SIZE.
6066         PR target/84844
6067         Revert
6068         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
6070         PR target/78090
6071         * config/i386/constraints.md (Yc): New register constraint.
6072         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
6073         Use Yc constraint for alternative 2 of operand 0.  Remove
6074         preferred_for_speed attribute.
6076 2018-03-14  Richard Biener  <rguenther@suse.de>
6078         PR tree-optimization/84830
6079         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
6080         with the old one to avoid oscillations.
6082 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
6084         PR target/83712
6085         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
6086         pseudos.
6087         (assign_by_spills): Return a flag of reload assignment failure.
6088         Do not process the reload assignment failures.  Do not spill other
6089         reload pseudos if they has the same reg class.  Update n if
6090         necessary.
6091         (lra_assign): Add a return arg.  Set up from the result of
6092         assign_by_spills call.
6093         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6094         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6095         usage_insns if it is not NULL.
6096         (spill_hard_reg_in_range): New function.
6097         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6098         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6099         function prototypes.
6100         (lra_assign): Change prototype.
6101         * lra.c (lra): Add code to deal with fails by splitting hard reg
6102         live ranges.
6104 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
6106         * config/riscv/riscv.opt (mrelax): New option.
6107         * config/riscv/riscv.c (riscv_file_start): Emit ".option
6108         "norelax" when riscv_mrelax is disabled.
6109         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
6111 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
6113         PR target/84743
6114         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
6115         reassociation for int modes.
6117 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
6119         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
6120         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
6121         for big-endian.
6122         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
6123         * config/aarch64/aarch64-sve.md
6124         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
6125         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
6126         (*extend<mode><Vwide>2): Rename to...
6127         (aarch64_sve_extend<mode><Vwide>2): ...this.
6128         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
6129         renaming the old pattern to...
6130         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
6131         unsigned packs.
6132         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
6133         define_expand, renaming the old pattern to...
6134         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
6135         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
6136         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
6137         account when deciding which SVE instruction the optab should use.
6138         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
6140 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
6142         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
6143         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
6144         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
6145         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
6146         (tlsdesc_small_<mode>): Turn a define_expand and use
6147         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
6148         (tlsdesc_small_advsimd_<mode>): ...this.
6149         (tlsdesc_small_sve_<mode>): New pattern.
6151 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
6153         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
6154         (UNSPEC_UMUL_HIGHPART): New constants.
6155         (MUL_HIGHPART): New int iteraor.
6156         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
6157         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
6158         define_expand.
6159         (*<su>mul<mode>3_highpart): New define_insn.
6161 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
6163         PR lto/84805
6164         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6165         incomplete types.
6167 2018-03-13  Martin Liska  <mliska@suse.cz>
6169         PR ipa/84658.
6170         * (sem_item_optimizer::sem_item_optimizer): Initialize new
6171         vector.
6172         (sem_item_optimizer::~sem_item_optimizer): Release it.
6173         (sem_item_optimizer::merge_classes): Register variable aliases.
6174         (sem_item_optimizer::fixup_pt_set): New function.
6175         (sem_item_optimizer::fixup_points_to_sets): Likewise.
6176         * ipa-icf.h: Declare new variables and functions.
6178 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
6180         PR middle-end/84834
6181         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
6182         integer_pow2p@2 and test integer_pow2p in condition.
6183         (A < 0 ? C : 0): Similarly for @1.
6185         PR middle-end/84831
6186         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
6187         characters starting at p contain '\0' character, don't look beyond
6188         that.
6190         PR target/84827
6191         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
6192         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
6194         PR target/84828
6195         * reg-stack.c (change_stack): Change update_end var from int to
6196         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
6197         also call set_block_for_insn on the newly added insns and rescan.
6199         PR target/84786
6200         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
6201         on the last operand.
6203         PR c++/84704
6204         * tree.c (stabilize_reference_1): Return save_expr (e) for
6205         STATEMENT_LIST even if it doesn't have side-effects.
6207 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
6209         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
6211 2018-03-12  Renlin Li  <renlin.li@arm.com>
6213         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
6214         aarch64_output_scalar_simd_mov_immediate.
6216 2018-03-12  Martin Sebor  <msebor@redhat.com>
6218         PR tree-optimization/83456
6219         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
6220         for perfectly overlapping calls to memcpy.
6221         (gimple_fold_builtin_memory_chk): Same.
6222         (gimple_fold_builtin_strcpy): Handle no-warning.
6223         (gimple_fold_builtin_stxcpy_chk): Same.
6224         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
6226 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6228         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
6229         parameter.  Use it for SFmode.
6230         (rs6000_function_arg_advance_1): Adjust.
6231         (rs6000_function_arg): Adjust.
6232         (rs6000_gimplify_va_arg): Pass false for that new parameter.
6234 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6236         PR rtl-optimization/84169
6237         PR rtl-optimization/84780
6238         * combine.c (can_combine_p): Check for a 2-insn combination whether
6239         the destination register is used between the two insns, too.
6241 2018-03-12  Richard Biener  <rguenther@suse.de>
6243         PR tree-optimization/84803
6244         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
6245         for refs DR analysis didn't process.
6247 2018-03-12  Richard Biener  <rguenther@suse.de>
6249         PR tree-optimization/84777
6250         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
6251         force-vectorize loops ignore whether we are optimizing for size.
6253 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6255         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
6256         (TARGET_MD_ASM_ADJUST): Define.
6258 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
6259             Kito Cheng  <kito.cheng@gmail.com>
6260             Chung-Ju Wu  <jasonwucj@gmail.com>
6262         * config/nds32/nds32.c (nds32_compute_stack_frame,
6263         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
6264         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
6265         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
6266         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
6267         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
6268         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
6269         * config/nds32/nds32.md (prologue, epilogue): Use macro
6270         NDS32_V3PUSH_AVAILABLE_P to do checking.
6272 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
6274         PR debug/58150
6275         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
6276         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
6277         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
6278         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
6279         addition of most attributes on !orig_type_die or the attribute not
6280         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
6282 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6283             Chung-Ju Wu  <jasonwucj@gmail.com>
6285         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
6286         __NDS32_VH__ macro.
6287         * config/nds32/nds32.opt (mvh): New option.
6289 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6290             Chung-Ju Wu  <jasonwucj@gmail.com>
6292         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
6293         function.
6294         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
6295         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
6296         definition.
6298 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6299             Chung-Ju Wu  <jasonwucj@gmail.com>
6301         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
6302         function.
6303         * config/nds32/nds32-multiple.md (strlensi): New pattern.
6304         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
6306 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
6307             Kito Cheng  <kito.cheng@gmail.com>
6308             Chung-Ju Wu  <jasonwucj@gmail.com>
6310         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
6311         UNSPEC_FFMISM and UNSPEC_FLMISM.
6312         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
6313         for ffb, ffmism and flmism.
6314         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
6315         (unspec_ffmism): Ditto.
6316         (unspec_flmism): Ditto.
6317         (nds32_expand_builtin_impl): Check if string extension is available.
6318         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
6319         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
6321 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
6323         Reverting patch:
6324         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6326         PR target/83712
6327         * lra-assigns.c (assign_by_spills): Return a flag of reload
6328         assignment failure.  Do not process the reload assignment
6329         failures.  Do not spill other reload pseudos if they has the same
6330         reg class.
6331         (lra_assign): Add a return arg.  Set up from the result of
6332         assign_by_spills call.
6333         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6334         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6335         usage_insns if it is not NULL.
6336         (spill_hard_reg_in_range): New function.
6337         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6338         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6339         function prototypes.
6340         (lra_assign): Change prototype.
6341         * lra.c (lra): Add code to deal with fails by splitting hard reg
6342         live ranges.
6344 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
6346         PR target/84807
6347         * config/i386/i386.opt: Replace Enforcment with Enforcement.
6349 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
6351         PR debug/84620
6352         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
6353         (dw_val_node): Add val_symbolic_view.
6354         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
6355         (symview_upper_bound): New.
6356         (new_line_info_table): Initialize symviews_since_reset.
6357         (dwarf2out_source_line): Count symviews_since_reset and set
6358         symview_upper_bound.
6359         (dw_val_equal_p): Handle symview.
6360         (add_AT_symview): New.
6361         (print_dw_val): Handle symview.
6362         (attr_checksum, attr_checksum_ordered): Likewise.
6363         (same_dw_val_p, size_of_die): Likewise.
6364         (value_format, output_die): Likewise.
6365         (add_high_low_attributes): Use add_AT_symview for entry_view.
6366         (dwarf2out_finish): Reset symview_upper_bound, clear
6367         zero_view_p.
6369 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
6371         PR target/83969
6372         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
6373         Add strict argument and use it.
6374         (rs6000_split_multireg_move): Update for new strict argument.
6375         (mem_operand_gpr): Disallow all non-offsettable addresses.
6376         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
6378 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
6380         PR target/84772
6381         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
6382         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
6383         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
6385         PR c++/84767
6386         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
6387         decl, use remap_type if we want to use the type.
6389 2018-03-09  Martin Sebor  <msebor@redhat.com>
6391         PR tree-optimization/84526
6392         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6393         Remove dead code.
6394         (builtin_access::generic_overlap): Be prepared to handle non-array
6395         base objects.
6397 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
6399         PR rtl-optimization/84682
6400         * lra-constraints.c (process_address_1): Check is_address flag
6401         for address constraints.
6402         (process_alt_operands): Likewise.
6403         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
6404         preprocess_constraints.
6405         * recog.h (preprocess_constraints): Add oploc parameter.
6406         Adjust callers.
6407         * recog.c (preprocess_constraints): Test address_operand for
6408         CT_ADDRESS constraints.
6410 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6412         PR target/83712
6413         * lra-assigns.c (assign_by_spills): Return a flag of reload
6414         assignment failure.  Do not process the reload assignment
6415         failures.  Do not spill other reload pseudos if they has the same
6416         reg class.
6417         (lra_assign): Add a return arg.  Set up from the result of
6418         assign_by_spills call.
6419         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6420         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6421         usage_insns if it is not NULL.
6422         (spill_hard_reg_in_range): New function.
6423         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6424         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6425         function prototypes.
6426         (lra_assign): Change prototype.
6427         * lra.c (lra): Add code to deal with fails by splitting hard reg
6428         live ranges.
6430 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6432         PR target/83193
6433         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
6434         Accept complain bool parameter.  Only emit errors if it is true.
6435         (arm_parse_cpu_option_name): Likewise.
6436         (arm_target_thumb_only): Adjust callers of the above.
6437         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6438         prototype to take a default true bool parameter.
6439         (arm_parse_arch_option_name): Likewise.
6441 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
6442             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
6444         PR jit/64089
6445         PR jit/84288
6446         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6447         * configure: Regenerate.
6448         * configure.ac ("linker --version-script option"): New.
6449         ("linker soname option"): New.
6451 2018-03-09  Richard Biener  <rguenther@suse.de>
6453         PR tree-optimization/84775
6454         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6455         immediate uses of predicate stmts and mark them modified.
6457         Revert
6458         PR tree-optimization/84178
6459         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6460         to caller.
6461         (version_loop_for_if_conversion): Delay update_ssa call.
6462         (tree_if_conversion): Delay update_ssa until after predicate
6463         insertion.
6465 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
6467         PR target/84763
6468         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6469         when the function accesses prior frames.
6471 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6473         PR debug/84456
6474         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6475         gen_llsym, otherwise call maybe_gen_llsym.
6477         PR inline-asm/84742
6478         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6479         has ',' character inside of it.
6481 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6483         PR target/84748
6484         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6485         as clobbering CC_REGNUM.
6487 2018-03-08  Richard Biener  <rguenther@suse.de>
6489         PR middle-end/84552
6490         * tree-scalar-evolution.c: Include tree-into-ssa.h.
6491         (follow_copies_to_constant): Do not follow SSA names registered
6492         for update.
6494 2018-03-08  Richard Biener  <rguenther@suse.de>
6496         PR tree-optimization/84178
6497         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6498         to caller.
6499         (version_loop_for_if_conversion): Delay update_ssa call.
6500         (tree_if_conversion): Delay update_ssa until after predicate
6501         insertion.
6503 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
6505         PR tree-optimization/84178
6506         * tree-if-conv.c (release_bb_predicate): Remove the
6507         the assertion that the stmts have NULL use_ops.
6508         Discard the statements, asserting that they haven't
6509         yet been added to a BB.
6511 2018-03-08  Richard Biener  <rguenther@suse.de>
6513         PR tree-optimization/84746
6514         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
6515         (phi_translate): Pass in destination ANTIC_OUT set.
6516         (phi_translate_1): Likewise.  For a simplified result lookup
6517         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
6518         (phi_translate_set): Adjust.
6519         (do_pre_regular_insertion): Likewise.
6520         (do_pre_partial_partial_insertion): Likewise.
6522 2018-03-08  Martin Liska  <mliska@suse.cz>
6524         PR gcov-profile/84735
6525         * doc/gcov.texi: Document usage of profile files.
6526         * gcov-io.h: Document changes in the format.
6528 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
6530         PR debug/84404
6531         PR debug/84408
6532         * dwarf2out.c (struct dw_line_info_table): Update comments for
6533         view == -1.
6534         (FORCE_RESET_NEXT_VIEW): New.
6535         (FORCE_RESETTING_VIEW_P): New.
6536         (RESETTING_VIEW_P): Check for -1 too.
6537         (ZERO_VIEW_P): Likewise.
6538         (new_line_info_table): Force-reset next view.
6539         (dwarf2out_begin_function): Likewise.
6540         (dwarf2out_source_line): Simplify zero_view_p initialization.
6541         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
6542         view directly.  Omit view when omitting .loc at line 0.
6544 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6546         PR tree-optimization/84740
6547         * tree-switch-conversion.c (process_switch): Call build_constructors
6548         only if info.phi_count is non-zero.
6550         PR tree-optimization/84739
6551         * tree-tailcall.c (find_tail_calls): Check call arguments against
6552         DECL_ARGUMENTS (current_function_decl) rather than
6553         DECL_ARGUMENTS (func) when checking for tail recursion.
6555 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6557         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6558         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6559         Volker Reichelt's entry and add entries for people that perform
6560         GCC fuzzy testing and report numerous bugs.
6562 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
6564         PR target/82411
6565         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6566         readonly data in sdata, if that is disabled.
6567         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6568         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6569         -mreadonly-in-sdata option.
6571 2018-03-07  Martin Sebor  <msebor@redhat.com>
6573         PR tree-optimization/84468
6574         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6575         basic block when looking for nul assignment.
6577 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
6579         PR target/84277
6580         * except.h (output_function_exception_table): Adjust prototype.
6581         * except.c (output_function_exception_table): Remove FNNAME parameter
6582         and add SECTION parameter.  Ouput one part of the table at a time.
6583         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6584         the first part of the exception table and emit unwind directives.
6585         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6586         (i386_pe_seh_cold_init): Likewise.
6587         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6588         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6589         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6590         (ix86_output_call_insn): Emit a nop in one more case for SEH.
6591         * config/i386/winnt.c: Include except.h.
6592         (struct seh_frame_state): Add reg_offset, after_prologue and
6593         in_cold_section fields.
6594         (i386_pe_seh_end_prologue): Set seh->after_prologue.
6595         (i386_pe_seh_cold_init): New function.
6596         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6597         to seh->in_cold_section.
6598         (seh_emit_push): Record the offset of the push.
6599         (seh_emit_save): Record the offet of the save.
6600         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6601         Test seh->after_prologue to disregard the epilogue.
6602         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6603         (i386_pe_end_cold_function): New function.
6605 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6607         PR fortran/84565
6608         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6609         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6611         PR c++/84704
6612         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6613         on tmp_var.
6614         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6615         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6617         PR middle-end/84723
6618         * multiple_target.c: Include tree-inline.h and intl.h.
6619         (expand_target_clones): Diagnose and fail if node->definition and
6620         !tree_versionable_function_p (node->decl).
6622 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
6624         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6625         sprint_ul.
6626         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6627         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6628         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6630 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6632         PR target/84710
6633         * combine.c (try_combine): Use reg_or_subregno instead of handling
6634         just paradoxical SUBREGs and REGs.
6636 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
6638          * config/arc/arc.c (arc_finalize_pic): Remove function.
6639          (arc_must_save_register): We use single base PIC register, remove
6640          checks to save/restore the PIC register.
6641          (arc_expand_prologue): Likewise.
6642          * config/arc/arc-protos.h (arc_set_default_type_attributes):
6643          Remove.
6644          (arc_verify_short): Likewise.
6645          (arc_attr_type): Likewise.
6646          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6647          (walk_stores): Likewise.
6648          (arc_address_cost): Make it static.
6649          (arc_verify_short): Likewise.
6650          (branch_dest): Likewise.
6651          (arc_attr_type): Likewise.
6652          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6653          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6654          (arc_final_prescan_insn): Remove inserting the nops due to
6655          hardware hazards.  It is done in reorg step.
6656          (insn_length_variant_t): Remove.
6657          (insn_length_parameters_t): Likewise.
6658          (arc_insn_length_parameters): Likewise.
6659          (arc_get_insn_variants): Likewise.
6660          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6662 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6664         PR inline-asm/84683
6665         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6666         assertion failure.
6668         PR tree-optimization/84687
6669         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6670         on new_node->decl.
6671         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6673 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6675         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6676         Rename to ppc_speculation_barrier.
6677         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6678         __builtin_ppc_speculation_barrier.
6680 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6682         PR target/84700
6683         * combine.c (combine_simplify_rtx): Don't try to simplify if
6684         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6685         are equal to x.
6687 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6689         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6690         to 32 bytes when compiling for POWER9.
6692 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6694         PR target/84564
6695         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6696         regparm >= 3 with no arg reg available also for calls with
6697         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6699         PR target/84524
6700         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6701         orig,vex.
6702         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6704 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6706         PR target/84264
6707         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6709 2018-03-05  Richard Biener  <rguenther@suse.de>
6711         PR tree-optimization/84486
6712         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6713         When inserting a __builtin_assume_aligned call set the LHS
6714         SSA name alignment info accordingly.
6716 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6718         PR tree-optimization/84114
6719         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6720         Avoid reassociation of FLOAT_MODE addition.
6722 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6724         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6725         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6726         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6727         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6728         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6729         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6730         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6731         and -mwbnoinvd.
6732         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6733         __builtin_ia32_wbinvd): New builtins.
6734         (SPECIAL_ARGS2): New.
6735         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6736         (SPECIAL_ARGS2): New.
6737         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6738         (ix86_valid_target_attribute_inner_p): Ditto.
6739         (ix86_init_mmx_sse_builtins): Add special_args2.
6740         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6741         TARGET_WBNOINVD_P): New.
6742         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6743         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6744         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6745         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6746         * config/i386/pconfigintrin.h: New file.
6747         * config/i386/wbnoinvdintrin.h: Ditto.
6748         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6749         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6751 2018-03-05  Richard Biener  <rguenther@suse.de>
6753         PR tree-optimization/84670
6754         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6755         member.
6756         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6757         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6758         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6759         doesn't grow if all successors (recursively) were visited at least
6760         once.
6762 2018-03-05  Richard Biener  <rguenther@suse.de>
6764         PR tree-optimization/84650
6765         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6766         if executed in the loop pipeline.
6768 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6770         * doc/configfiles.texi (Configuration Files): Move info about
6771         conditionalizing $target-protos.h to...
6772         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6773         differs from $target-protos.h.
6775 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6776             Chung-Ju Wu  <jasonwucj@gmail.com>
6778         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6779         * config/nds32/nds32-multiple.md (setmemsi): Define.
6780         * config/nds32/nds32-memory-manipulation.c
6781         (nds32_gen_dup_4_byte_to_word_value): New.
6782         (emit_setmem_word_loop): New.
6783         (emit_setmem_byte_loop): New.
6784         (nds32_expand_setmem_loop): New.
6785         (nds32_expand_setmem_loop_v3m): New.
6786         (nds32_expand_setmem_unroll): New.
6787         (nds32_expand_setmem): New.
6789 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6790             Chung-Ju Wu  <jasonwucj@gmail.com>
6792         * config/nds32/nds32-memory-manipulation.c
6793         (nds32_emit_load_store): New.
6794         (nds32_emit_post_inc_load_store): New.
6795         (nds32_emit_mem_move): New.
6796         (nds32_emit_mem_move_block): New.
6797         (nds32_expand_movmemsi_loop_unknown_size): New.
6798         (nds32_expand_movmemsi_loop_known_size): New.
6799         (nds32_expand_movmemsi_loop): New.
6800         (nds32_expand_movmemsi_unroll): New.
6801         (nds32_expand_movmemqi): Rename ...
6802         (nds32_expand_movmemsi): ... to this.
6803         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6804         (movmemsi): ... to this.
6805         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6806         (nds32_expand_movmemsi): ... to this.
6808 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6809             Monk Chiang  <sh.chiang04@gmail.com>
6810             Chung-Ju Wu  <jasonwucj@gmail.com>
6812         * config/nds32/nds32-protos.h
6813         (nds32_expand_load_multiple): New arguments.
6814         (nds32_expand_store_multiple): Ditto.
6815         (nds32_valid_multiple_load_store): Rename ...
6816         (nds32_valid_multiple_load_store_p): ... to this.
6817         * config/nds32/nds32-memory-manipulation.c
6818         (nds32_expand_load_multiple): Refine implementation.
6819         (nds32_expand_store_multiple): Ditto.
6820         * config/nds32/nds32-multiple.md
6821         (load_multiple): Update nds32_expand_load_multiple interface.
6822         (store_multiple): Update nds32_expand_store_multiple interface.
6823         * config/nds32/nds32-predicates.c
6824         (nds32_valid_multiple_load_store): Rename ...
6825         (nds32_valid_multiple_load_store_p): ... to this and refine
6826         implementation.
6827         * config/nds32/predicates.md
6828         (nds32_load_multiple_and_update_address_operation): New predicate.
6829         (nds32_store_multiple_and_update_address_operation): New predicate.
6831 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6832             Chung-Ju Wu  <jasonwucj@gmail.com>
6834         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6835         (combo): New attribute.
6836         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6838 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6840         * config/nds32/nds32.opt: Change -mcmodel= default value.
6842 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6843             Monk Chiang  <sh.chiang04@gmail.com>
6844             Chung-Ju Wu  <jasonwucj@gmail.com>
6846         * config/nds32/constants.md (unspec_element): New enum.
6847         * config/nds32/constraints.md (Umw): New constraint.
6848         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6849         * config/nds32/nds32-intrinsic.md: Likewise.
6850         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6851         (nds32_valid_smw_lwm_base_p): New.
6852         (nds32_output_smw_single_word): New.
6853         (nds32_output_lmw_single_word): New.
6854         (nds32_expand_unaligned_load): New.
6855         (nds32_expand_unaligned_store): New.
6856         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6857         (nds32_output_smw_single_word): Declare.
6858         (nds32_output_lmw_single_word): Declare.
6859         (nds32_expand_unaligned_load): Declare.
6860         (nds32_expand_unaligned_store): Declare.
6861         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6862         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6863         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6864         NDS32_BUILTIN_UASTORE_DW.
6865         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6866         predicate.
6868 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6869             Kito Cheng  <kito.cheng@gmail.com>
6870             Chung-Ju Wu  <jasonwucj@gmail.com>
6872         * config/nds32/nds32-intrinsic.c
6873         (nds32_expand_builtin_null_ftype_reg): Delete.
6874         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6875         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6876         (nds32_read_argument): New.
6877         (nds32_legitimize_target): Ditto.
6878         (nds32_legitimize_argument): Ditto.
6879         (nds32_check_constant_argument): Ditto.
6880         (nds32_expand_unop_builtin): Ditto.
6881         (nds32_expand_unopimm_builtin): Ditto.
6882         (nds32_expand_binop_builtin): Ditto.
6883         (nds32_builtin_decl_impl): Ditto.
6884         (builtin_description): Ditto.
6885         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6886         (nds32_init_builtins_impl): Ditto.
6887         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6888         (nds32_builtin_decl): New.
6889         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6890         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6892 2018-03-02  Jeff Law  <law@redhat.com>
6894         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6895         (redundant_insn, fill_simple_delay_slots): Likewise.
6896         (fill_slots_from_thread): Likewise.
6897         * resource.c (mark_referenced_resources): Likewise.
6898         (mark_set_resources, find_dead_or_set_registers): Likewise.
6900 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6902         * substring-locations.h (format_warning_va): Formatting fix for
6903         ATTRIBUTE_GCC_DIAG.
6904         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6905         argument.
6906         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6907         * substring-locations.c: Include intl.h.
6908         (format_warning_va): Turned into small wrapper around
6909         format_warning_n_va, renamed to ...
6910         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6911         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6912         use ngettext.
6913         (format_warning_at_substring_n): New function.
6914         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6915         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6916         format_warning_at_substring with just a shorter name instead of
6917         const function pointer.
6918         (fmtwarn_n): New function.
6919         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6920         appropriate, get rid of all the fmtstr temporaries, move conditionals
6921         with G_() wrapped string literals directly into fmtwarn arguments,
6922         cast dir.len to (int), formatting fixes.
6924 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6926         * doc/invoke.texi: Remove "Cilk Plus" references.
6928 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6929             Richard Biener  <rguenther@suse.de>
6931         PR ipa/84628
6932         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6933         for error or warning attributes if CALL_FROM_THUNK_P is set.
6934         Formatting fixes.
6936 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6938         PR target/56540
6939         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6940         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6942         PR target/56540
6943         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6944         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6946         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6947         instead of -1U in last predictors element's probability member.
6949 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6951         PR ipa/83983
6952         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6953         arguments if they are comparable.
6955 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6957         PR tree-optimization/84634
6958         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6959         masks and masked_loop_p with a single loop_masks, making sure it's
6960         null for bb vectorization.
6962 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
6964         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6965         (vect_analyze_data_ref_access): Use loop->safe_len rather than
6966         loop->force_vectorize to check whether there is no alias.
6968 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6970         PR target/84614
6971         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6972         prototypes.
6973         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6974         comments.
6975         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6976         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6977         instead of a loop around prev_real_insn.
6978         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6979         prev_real_insn.
6981         PR inline-asm/84625
6982         * config/i386/i386.c (ix86_print_operand): Use conditional
6983         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6984         zero vector.
6986 2018-03-02  Richard Biener  <rguenther@suse.de>
6988         PR tree-optimization/84427
6989         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
6990         (bitmap_set_subtract_values): Rewrite to handle multiple
6991         exprs per value.
6992         (clean): Likewise.
6993         (prune_clobbered_mems): Likewise.
6994         (phi_translate): Take edge instead of pred/phiblock.
6995         (phi_translate_1): Likewise.
6996         (phi_translate_set): Likewise.  Insert all translated
6997         exprs for a value into the set, keeping possibly multiple
6998         expressions per value.
6999         (compute_antic_aux): Adjust for phi_translate changes.
7000         When intersecting union the expressions and prune those
7001         not in the final value set, keeping possibly multiple
7002         expressions per value.  Do not use value-insertion
7003         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
7004         all expressions.  Add verification that the value-sets
7005         only shrink during iteration.
7006         (compute_partial_antic_aux): Adjust for the phi_translate changes.
7007         (do_pre_regular_insertion): Likewise.
7008         (do_pre_partial_partial_insertion): Likewise.
7010 2018-03-02  Richard Biener  <rguenther@suse.de>
7012         PR target/82005
7013         * config/darwin.c (saved_debug_info_level): New static global.
7014         (darwin_asm_lto_start): Disable debug info generation for LTO out.
7015         (darwin_asm_lto_end): Restore debug info generation settings.
7017 2018-03-01  Martin Liska  <mliska@suse.cz>
7019         PR sanitizer/82484
7020         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
7021         volatile arguments.
7023 2018-03-01  Richard Biener  <rguenther@suse.de>
7025         PR debug/84645
7026         * dwarf2out.c (gen_variable_die): Properly handle late VLA
7027         type annotation with LTO when debug was disabled at compile-time.
7029 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
7031         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
7032         XINT with INTVAL.
7033         (mips_final_postscan_insn): Likewise.
7035 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
7037         PR rtl-optimization/84528
7038         * alias.c (init_alias_target): Add commentary.
7039         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
7040         a unique base value if the frame pointer is not eliminated
7041         to the stack pointer.
7043 2018-03-01  Tom de Vries  <tom@codesourcery.com>
7045         PR rtl-optimization/83327
7046         * lra-int.h (hard_regs_spilled_into): Declare.
7047         * lra.c (hard_regs_spilled_into): Define.
7048         (init_reg_info): Init hard_regs_spilled_into.
7049         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
7050         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
7051         (process_bb_lives): Handle hard_regs_spilled_into.
7052         (lra_create_live_ranges_1): Before doing liveness propagation, clear
7053         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
7055 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
7057         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
7058         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
7059         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
7060         * config/rs6000/aix72.h: New file.
7062 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
7064         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
7065         instead of warning_at with conditional singular and plural messages
7066         where possible.
7068         PR target/52991
7069         * stor-layout.c (update_alignment_for_field): For
7070         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
7071         && !DECL_PACKED (field), do the alignment update, just use
7072         only desired_align instead of MAX (type_align, desired_align)
7073         as the alignment.
7074         (place_field): Don't do known_align < desired_align handling
7075         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
7076         is non-NULL, instead do it after rli->prev_field handling and
7077         only if not within a bitfield word.  For DECL_PACKED (field)
7078         use type_align of BITS_PER_UNIT.
7080 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
7082         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
7083         superfluous parentheses and trailing spaces.
7085 2018-02-28  Richard Biener  <rguenther@suse.de>
7087         PR tree-optimization/84584
7088         * graphite-scop-detection.c (scop_detection::add_scop): Discard
7089         SCoPs with fake exit edge.
7091 2018-02-28  Martin Liska  <mliska@suse.cz>
7093         PR testsuite/84597
7094         * timevar.c (timer::print): Fix format to properly print 100%
7095         values.
7097 2018-02-28  Richard Biener  <rguenther@suse.de>
7099         PR middle-end/84607
7100         * genmatch.c (capture_info::walk_match): Do not mark
7101         captured expressions without operands as expr_p given
7102         they act more like predicates and should be subject to
7103         "lost tail" side-effect preserving.
7105 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
7107         PR rtl-optimization/81611
7108         * auto-inc-dec.c (attempt_change): Move dead note from
7109         mem_insn if it's the next use of regno
7110         (find_address): Take address use of reg holding
7111         non-incremented value.  Add parm to limit search to the named
7112         reg only.
7113         (merge_in_block): Attempt to use a mem insn that is the next
7114         use of the original regno.
7116 2018-02-27  Martin Sebor  <msebor@redhat.com>
7118         PR c++/83871
7119         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
7120         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
7122 2018-02-27  Martin Sebor  <msebor@redhat.com>
7124         PR translation/84207
7125         * diagnostic-core.h (warning_n, error_n, inform_n): Change
7126         n argument to unsigned HOST_WIDE_INT.
7127         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
7128         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
7129         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
7130         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
7132 2018-02-27  Richard Biener  <rguenther@suse.de>
7134         PR tree-optimization/84512
7135         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7136         Do not use the estimate returned from record_stmt_cost for
7137         the scalar iteration cost but sum properly using add_stmt_cost.
7139 2018-02-27  Richard Biener  <rguenther@suse.de>
7141         PR tree-optimization/84466
7142         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7143         Adjust last change to less strictly validate use operands.
7145 2018-02-27  Martin Liska  <mliska@suse.cz>
7147         PR gcov-profile/84548
7148         * gcov.c (process_file): Allow partial overlap and consider it
7149         also as group functions.
7150         (output_lines): Properly calculate range of lines for a group.
7152 2018-02-27  Martin Liska  <mliska@suse.cz>
7154         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
7155         'ggc' suffixes.  Change first column width.
7156         (timer::print): Fix formatting of the column.
7158 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
7160         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
7161         preserve inline entry blocks for the sake of debug inline
7162         entry point markers alone.
7163         (remove_unused_locals): Suggest in comments a better place to
7164         force the preservation of inline entry blocks that are
7165         otherwise unused, but do not preserve them.
7167 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7169         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
7171 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7173         PR target/84039
7174         * config/i386/constraints.md (Bs): Replace
7175         ix86_indirect_branch_register with
7176         TARGET_INDIRECT_BRANCH_REGISTER.
7177         (Bw): Likewise.
7178         * config/i386/i386.md (indirect_jump): Likewise.
7179         (tablejump): Likewise.
7180         (*sibcall_memory): Likewise.
7181         (*sibcall_value_memory): Likewise.
7182         Peepholes of indirect call and jump via memory: Likewise.
7183         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
7184         (*sibcall_value_GOT_32): Likewise.
7185         * config/i386/predicates.md (indirect_branch_operand): Likewise.
7186         (GOT_memory_operand): Likewise.
7187         (call_insn_operand): Likewise.
7188         (sibcall_insn_operand): Likewise.
7189         (GOT32_symbol_operand): Likewise.
7190         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
7192 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7194         PR rtl-optimization/83496
7195         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
7196         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
7197         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
7198         redundant insn, if any.
7199         (relax_delay_slots): Likewise.
7200         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
7202 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
7204         PR tree-optimization/83965
7205         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
7206         that grouped statements are part of a reduction chain.  Return
7207         true if the statement is not marked as a reduction itself but
7208         is part of a group.
7209         (vect_recog_dot_prod_pattern): Don't check whether the statement
7210         is part of a group here.
7211         (vect_recog_sad_pattern): Likewise.
7212         (vect_recog_widen_sum_pattern): Likewise.
7214 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7216         PR debug/84545
7217         * final.c (rest_of_clean_state): Also look for calls inside sequences.
7219 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7221         PR target/84530
7222         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
7223         the bool argument.
7224         (ix86_output_indirect_function_return): New prototype.
7225         (ix86_split_simple_return_pop_internal): Likewise.
7226         * config/i386/i386.c (indirect_return_via_cx): New.
7227         (indirect_return_via_cx_bnd): Likewise.
7228         (indirect_thunk_name): Handle return va CX_REG.
7229         (output_indirect_thunk_function): Create alias for
7230         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
7231         (ix86_output_indirect_jmp): Remove the bool argument.
7232         (ix86_output_indirect_function_return): New function.
7233         (ix86_split_simple_return_pop_internal): Likewise.
7234         * config/i386/i386.md (*indirect_jump): Don't pass false
7235         to ix86_output_indirect_jmp.
7236         (*tablejump_1): Likewise.
7237         (simple_return_pop_internal): Change it to define_insn_and_split.
7238         Call ix86_split_simple_return_pop_internal to split it for
7239         -mfunction-return=.
7240         (simple_return_indirect_internal): Call
7241         ix86_output_indirect_function_return instead of
7242         ix86_output_indirect_jmp.
7244 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
7246         PR bootstrap/84405
7247         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
7248         memset and value initialization afterwards.
7250 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
7252         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
7254 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7256         PR target/84521
7257         * common/config/aarch64/aarch64-common.c
7258         (aarch_option_optimization_table[]): Switch
7259         off fomit-frame-pointer
7261 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7262             Chung-Ju Wu  <jasonwucj@gmail.com>
7264         * config/nds32/nds32-multiple.md (load_multiple): Disallow
7265         volatile memory.
7266         (store_multiple): Ditto.
7268 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7270         * config.gcc: Add --with-cpu support for nds32 target.
7271         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
7272         * config/nds32/nds32.opt: Add -mcpu= option.
7274 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
7276         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
7277         isel=yes): Warn for these deprecated options.
7279 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
7281         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
7282         ISA_2_5_MASKS_EMBEDDED.
7284 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
7286         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
7287         p->max as pointers rather than using iterative_hash_expr.
7289 2018-02-23  Carl Love  <cel@us.ibm.com>
7291         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
7292         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
7293         BU_P8V_OVERLOAD_2.
7294         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
7295         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
7296         P8V_BUILTIN_VEC_VUNSIGNED2.
7298 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
7300         PR target/81572
7301         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
7302         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
7303         LRA_UNKNOWN_ALT.
7304         * lra-constraints.c (curr_insn_transform): Set up
7305         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
7306         LRA_UNKNOWN_ALT.
7307         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
7308         * lra-eliminations.c (spill_pseudos): Ditto.
7309         (process_insn_for_elimination): Ditto.
7310         * lra-lives.c (reg_early_clobber_p): Use the new macros.
7311         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
7312         LRA_NON_CLOBBERED_ALT.
7314 2018-02-22  Martin Sebor  <msebor@redhat.com>
7316         PR tree-optimization/84480
7317         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
7318         to maybe_diag_stxncpy_trunc.  Call it.
7319         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
7320         from gimple_fold_builtin_strcpy.  Print inlining stack.
7321         (handle_builtin_stxncpy): Print inlining stack.
7322         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
7324 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
7326         PR target/84176
7327         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
7328         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
7329         and -fcheck-pointer-bounds are used together.
7330         (indirect_thunk_prefix): New enum.
7331         (indirect_thunk_need_prefix): New function.
7332         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
7333         "_nt" instead of "_bnd" for NOTRACK prefix.
7334         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
7335         (output_indirect_thunk_function): Likewise.
7336         (): Likewise.
7337         (ix86_code_end): Update output_indirect_thunk_function calls.
7338         (ix86_output_indirect_branch_via_reg): Replace
7339         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
7340         (ix86_output_indirect_branch_via_push): Likewise.
7341         (ix86_output_function_return): Likewise.
7342         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
7343         incompatible with -fcf-protection=branch and
7344         -fcheck-pointer-bounds.
7346 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7348         PR target/83335
7349         * config/aarch64/aarch64.c (aarch64_print_address_internal):
7350         Change gcc_assert call to output_operand_lossage.
7352 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7354         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
7356 2018-02-22  DJ Delorie  <dj@redhat.com>
7357             Sebastian Perta  <sebastian.perta@renesas.com>
7358             Oleg Endo  <olegendo@gcc.gnu.org>
7360         * config/rx/rx.c (rx_rtx_costs): New function.
7361         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
7363 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7365         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
7367 2018-02-22  Martin Liska  <mliska@suse.cz>
7369         PR driver/83193
7370         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
7371         Add "native" as a possible value.
7373 2018-02-22  Martin Liska  <mliska@suse.cz>
7375         PR driver/83193
7376         * config/i386/i386.c (ix86_option_override_internal):
7377         Add "native" as a possible value for -march and -mtune.
7379 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
7381         PR target/84502
7382         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
7383         to all type variants.
7385         PR tree-optimization/84503
7386         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
7387         width as info->bitpos + info->bitsize - start.
7388         (merged_store_group::merge_overlapping): Simplify width computation.
7389         (check_no_overlap): New function.
7390         (imm_store_chain_info::try_coalesce_bswap): Compute expected
7391         start + width and last_order of the group, fail if check_no_overlap
7392         fails.
7393         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
7394         to group if check_no_overlap fails.
7396 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7398         * config/rs6000/altivec.md: Delete contraint arguments to
7399         define_expand, define_split, and define_peephole2, and in
7400         define_insn_and_split if always unused.
7401         * config/rs6000/darwin.md: Ditto.
7402         * config/rs6000/dfp.md: Ditto.
7403         * config/rs6000/rs6000.md: Ditto.
7404         * config/rs6000/sync.md: Ditto.
7405         * config/rs6000/vector.md: Ditto.
7406         * config/rs6000/vsx.md: Ditto.
7408 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7410         * config/rs6000/altivec.md: Write output control strings as braced
7411         blocks instead of double-quoted strings.
7412         * config/rs6000/darwin.md: Ditto.
7413         * config/rs6000/rs6000.md: Ditto.
7414         * config/rs6000/vector.md: Ditto.
7415         * config/rs6000/vsx.md: Ditto.
7417 2018-02-21  Jason Merrill  <jason@redhat.com>
7419         PR c++/84314 - ICE with templates and fastcall attribute.
7420         * attribs.c (build_type_attribute_qual_variant): Remove assert.
7422 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7424         * ipa-cp.c (determine_versionability): Fix comment typos.
7426 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7428         PR c/84229
7429         * ipa-cp.c (determine_versionability): Do not version functions caling
7430         va_arg_pack.
7432 2018-02-21  Martin Liska  <mliska@suse.cz>
7434         PR driver/83193
7435         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7436         Add "native" as a possible value.
7437         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
7438         the macro when native cpu detection is available.
7440 2018-02-21  Martin Liska  <mliska@suse.cz>
7442         PR driver/83193
7443         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7444         Add "native" as a possible value.
7445         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7446         when native cpu detection is available.
7448 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
7449             Martin Sebor  <msebor@redhat.com>
7451         PR tree-optimization/84478
7452         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7453         false.
7454         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7455         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7456         support which is conservatively correct, for 2 only stay conservative
7457         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
7458         argument to the 2 argument get_range_strlen, adjust 6 arg
7459         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7460         false.
7461         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7462         (gimple_fold_builtin_strlen): Pass true as last argument to
7463         get_range_strlen.
7465 2018-02-20  Martin Sebor  <msebor@redhat.com>
7467         PR middle-end/84095
7468         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7469         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
7470         (builtin_memref::builtin_memref): Factor out parts into
7471         set_base_and_offset and call it.
7473 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7475         PR middle-end/84406
7476         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7477         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7478         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
7479         search at the associated MODE_INT.
7481 2018-02-20  Jeff Law  <law@redhat.com>
7483         PR middle-end/82123
7484         PR tree-optimization/81592
7485         PR middle-end/79257
7486         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
7487         for range data rather than using global data.
7488         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
7489         range data rather than using global data.
7490         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
7491         pass it to children as needed.
7492         (struct directive::fmtresult): Similarly.
7493         (struct directive::set_width): Similarly.
7494         (struct directive::set_precision): Similarly.
7495         (format_integer, format_directive, parse_directive): Similarly.
7496         (format_none): Accept unnamed vr_values parameter.
7497         (format_percent, format_floating, format_character): Similarly.
7498         (format_string, format_plain): Similarly.
7499         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
7500         the EVRP range analyzer for range data rather than using global data.
7501         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
7502         gimple-ssa-evrp-analyze.h
7503         (class sprintf_dom_walker): Add after_dom_children member function.
7504         Add evrp_range_analyzer member.
7505         (sprintf_dom_walker::before_dom_children): Call into the EVRP
7506         range analyzer as needed.
7507         (sprintf_dom_walker::after_dom_children): New member function.
7508         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
7509         if not optimizing.
7510         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
7511         (evrp_range_analyzer::pop_to_marker): Likewise.
7513 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7515         PR tree-optimization/84419
7516         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
7517         with the required type if its current type is compatible but
7518         different.
7520 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
7522         PR middle-end/82004
7523         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
7524         after vectorization.
7526 2018-02-20  Martin Liska  <mliska@suse.cz>
7528         PR driver/83193
7529         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
7530         possible values if we don't have a hint.
7532 2018-02-20  Martin Liska  <mliska@suse.cz>
7534         PR c/84310
7535         PR target/79747
7536         * final.c (shorten_branches): Build align_tab array with one
7537         more element.
7538         * opts.c (finish_options): Add alignment option limit check.
7539         (MAX_CODE_ALIGN): Likewise.
7540         (MAX_CODE_ALIGN_VALUE): Likewise.
7541         * doc/invoke.texi: Document maximum allowed option value for
7542         all -falign-* options.
7544 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
7546         PR target/84146
7547         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
7548         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
7549         * var-tracking.c (emit_note_insn_var_location): Remove all references
7550         to NOTE_INSN_CALL_ARG_LOCATION.
7551         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7552         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7553         Use copy_rtx_if_shared.
7554         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7555         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7556         (dwarf2out_var_location): Remove handling of
7557         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7558         on call_insn.
7559         * final.c (final_scan_insn): Remove all references to
7560         NOTE_INSN_CALL_ARG_LOCATION.
7561         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
7562         before dumping final insns.
7563         * except.c (emit_note_eh_region_end): Remove all references to
7564         NOTE_INSN_CALL_ARG_LOCATION.
7565         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7566         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7567         * config/arc/arc.c (hwloop_optimize): Likewise.
7568         * config/arm/arm.c (create_fix_barrier): Likewise.
7569         * config/s390/s390.c (s390_chunkify_start): Likewise.
7570         * config/sh/sh.c (find_barrier): Likewise.
7571         * config/i386/i386.c (rest_of_insert_endbranch,
7572         ix86_seh_fixup_eh_fallthru): Likewise.
7573         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7574         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7575         * config/frv/frv.c (frv_function_prologue): Likewise.
7576         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
7577         reg note.
7578         (note_outside_basic_block_p): Remove all references to
7579         NOTE_INSN_CALL_ARG_LOCATION.
7580         * gengtype.c (adjust_field_rtx_def): Likewise.
7581         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7582         Likewise.
7583         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7584         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7586         PR c++/84444
7587         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7588         is ADDR_EXPR.
7590         PR tree-optimization/84452
7591         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7592         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7593         is NULL.
7595 2018-02-19  Martin Liska  <mliska@suse.cz>
7597         PR sanitizer/82183
7598         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7600 2018-02-19  Martin Liska  <mliska@suse.cz>
7601             Richard Sandiford  <richard.sandiford@linaro.org>
7603         PR tree-optimization/82491
7604         * gimple-fold.c (get_base_constructor): Make earlier bail out
7605         to prevent ubsan.
7607 2018-02-19  Carl Love  <cel@us.ibm.com>
7609         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7610         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7611         BU_P8V_OVERLOAD_1.
7612         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7613         P8V_BUILTIN_VEC_NEG.
7615 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
7617         * config/rl78/rl78.md (movdf): New define expand.
7619 2018-02-19  Martin Liska  <mliska@suse.cz>
7621         PR other/80589
7622         * doc/invoke.texi: Fix typo.
7623         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7625 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
7627         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7628         handle rs6000_single_float and rs6000_double_float specially for
7629         e500 family CPUs.
7631 2018-02-16  Jeff Law  <law@redhat.com>
7633         * config/rx/rx.c (add_pop_cfi_notes): New function.;
7634         (pop_regs): Use it.
7636 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7638         PR ipa/84425
7639         * ipa-inline.c (inline_small_functions): Fix a typo.
7641 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7643         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7645 2018-02-16  Carl Love  <cel@us.ibm.com>
7647         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7648         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7649         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7650         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7651         expansion to P8V_BUILTIN_VEC_FLOAT2.
7653 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
7655         PR rtl-optimization/70023
7656         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7657         src_regno into account.
7659 2018-02-16  Carl Love  <cel@us.ibm.com>
7661         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7662         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7663         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7664         * config/rs6000/rs6000.c: Remove case statements for
7665         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7666         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7667         and P9V_BUILTIN_VEC_VINSERT4B.
7668         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7669         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7670         * config/rs6000/vsx.md:
7671         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7672         vec_insert4b.
7674 2018-02-16  Carl Love  <cel@us.ibm.com>
7676         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7677         vec_insert4b.
7678         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7679         definitions.
7680         * config/rs6000/rs6000-c.c: Add the definitions for
7681         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7682         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7683         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7684         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7685         definition for insert4b and define insn *insert3b_internal.
7686         * doc/extend.texi: Add documentation for vec_extract4b.
7688 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7690         * doc/extend.texi (Backwards Compatibility): Mention friend
7691         injection.  Note for-scope is deprecated.
7692         * doc/invoke.texi (-ffriend-injection): Deprecate.
7694 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7696         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7697         that moved to I2, also allow destinations that are a paradoxical
7698         subreg (instead of a normal reg).
7700 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7702         PR target/83831
7703         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7704         to QImode.
7706 2018-02-16  Richard Biener  <rguenther@suse.de>
7708         PR tree-optimization/84037
7709         PR tree-optimization/84016
7710         PR target/82862
7711         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7712         Adjust vec_construct for the fact we need additional higher latency
7713         128bit inserts for AVX256 and AVX512 vector builds.
7714         (ix86_add_stmt_cost): Scale vector construction cost for
7715         elementwise loads.
7717 2018-02-16  Richard Biener  <rguenther@suse.de>
7719         PR tree-optimization/84417
7720         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7721         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7722         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7724 2018-02-16  Martin Liska  <mliska@suse.cz>
7726         PR sanitizer/84307
7727         * internal-fn.def (ASAN_CHECK): Set proper flags.
7728         (ASAN_MARK): Likewise.
7730 2018-02-16  Julia Koval  <julia.koval@intel.com>
7732         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7733         from PTA_CANNONLAKE.
7735 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7737         PR target/84272
7738         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7739         Use ++iter rather than iter++ for std::list iterators.
7740         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7741         defer deleting them until all nodes in the forest are processed.  Do
7742         free even leaf nodes.  Change to_process into auto_vec.
7744         PR bootstrap/84405
7745         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7746         * vec.h (vec_default_construct): Use memset instead of placement new
7747         if BROKEN_VALUE_INITIALIZATION is defined.
7748         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7749         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7750         is defined.
7752         PR rtl-optimization/83723
7753         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7754         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7755         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7756         recursive calls.
7757         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7758         callers.
7759         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7761 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7763         PR rtl-optimization/81443
7764         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7765         from inner REGs to paradoxical SUBREGs.
7767 2018-02-16  Richard Biener  <rguenther@suse.de>
7769         PR tree-optimization/84399
7770         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7771         For operands we can analyze at their definition make sure we can
7772         analyze them at each use as well.
7774 2018-02-16  Richard Biener  <rguenther@suse.de>
7776         PR tree-optimization/84190
7777         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7778         volatile accesses if the decl isn't volatile.
7780 2018-02-15  Jason Merrill  <jason@redhat.com>
7782         PR c++/84314 - ICE with templates and fastcall attribute.
7783         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7784         TYPE_CANONICAL on an existing type.
7786 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7788         PR tree-optimization/84383
7789         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7790         dstoff nor call operand_equal_p if dstbase is NULL.
7792         PR tree-optimization/84334
7793         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7794         also a CONSTANT_CLASS_P, punt.
7796 2018-02-14  Jim Wilson  <jimw@sifive.com>
7798         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7799         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7800         to where locals are set.  Add TARGET_RVC support.
7801         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7803 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7805         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7807 2018-02-14  Martin Sebor  <msebor@redhat.com>
7809         PR tree-optimization/83698
7810         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7811         arrays constrain the offset range to their bounds.
7812         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7813         (builtin_access::overlap): Avoid setting the size of overlap if it's
7814         already been set.
7815         (maybe_diag_overlap): Also consider arrays when deciding what values
7816         of offsets to include in diagnostics.
7818 2018-02-14  Martin Sebor  <msebor@redhat.com>
7820         PR c/84108
7821         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7822         that correspond to the kind of a declaration.
7824 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7826         PR target/83984
7827         * config/pa/pa.md: Load address of PIC label using the linkage table
7828         if the label is nonlocal.
7830 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7832         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7833         warning message if user requests -maltivec=be.
7834         * doc/invoke.texi: Document deprecation of -maltivec=be.
7836 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7838         PR target/84220
7839         * config/rs6000/rs6000-c.c: Update definitions for
7840         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7841         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7843 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7845         PR target/84239
7846         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7847         add _get_ssp intrinsics. Remove argument from
7848         __builtin_ia32_rdssp[d|q].
7849         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7850         * config/i386/i386-builtin.def: Remove argument from
7851         __builtin_ia32_rdssp[d|q].
7852         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7853         ix86_expand_special_args_builtin for _rdssp[d|q].
7854         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7855         Clear register before usage.
7856         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7857         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7859 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7861         PR tree-optimization/84357
7862         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7863         operand 1 of an ARRAY_REF too.
7865 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7867         PR target/83831
7868         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7869         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7870         declarations.
7871         (set_of_reg): New struct.
7872         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7873         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7874         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7875         functions.
7876         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7877         Split into bitclr, bitset, bitinvert patterns if appropriate.
7878         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7879         use rx_fuse_in_memory_bitop.
7880         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7881         to named insn, correct maximum insn length.
7883 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7885         PR target/79242
7886         * machmode.def: Define a complex mode for PARTIAL_INT.
7887         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7888         MODE_PARTIAL_INT.
7889         * doc/rtl.texi: Document CSPImode.
7890         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7891         handling.
7892         (msp430_hard_regno_nregs_with_padding): Likewise.
7894 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7896         PR target/84279
7897         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7899 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7901         PR rtl-optimization/84169
7902         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7903         we generated a parallel as new i3 and we split that to new i2 and i3
7904         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7905         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7906         those to i2, not i1.  Partially rewrite this scan code.
7908 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7910         PR c/82210
7911         * stor-layout.c (place_field): For variable length fields, adjust
7912         offset_align afterwards not just based on the field's alignment,
7913         but also on the size.
7915         PR middle-end/84309
7916         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7917         of exps and logs in the use_exp2 case.
7919 2018-02-13  Jeff Law  <law@redhat.com>
7921         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7922         entry for "vector".
7924         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7925         ARGS as unused.
7927 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7929         PR debug/84342
7930         PR debug/84319
7931         * common.opt (gas-loc-support, gas-locview-support): New.
7932         (ginline-points, ginternal-reset-location-views): New.
7933         * doc/invoke.texi: Document them.  Use @itemx where intended.
7934         (gvariable-location-views): Adjust.
7935         * target.def (reset_location_view): New.
7936         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7937         (TARGET_RESET_LOCATION_VIEW): New.
7938         * doc/tm.texi: Rebuilt.
7939         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7940         (dwarf2out_default_as_locview_support): New.
7941         (output_asm_line_debug_info): Use option variables.
7942         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7943         (output_loc_list): Likewise.
7944         (add_high_low_attributes): Check option variables.
7945         Don't output entry view attribute in strict mode.
7946         (gen_inlined_subroutine_die): Check option variables.
7947         (dwarf2out_inline_entry): Likewise.
7948         (init_sections_and_labels): Likewise.
7949         (dwarf2out_early_finish): Likewise.
7950         (maybe_reset_location_view): New, from...
7951         (dwarf2out_var_location): ... here.  Call it.
7952         * debug.h (dwarf2out_default_as_loc_support): Declare.
7953         (dwarf2out_default_as_locview_support): Declare.
7954         * hooks.c (hook_int_rtx_insn_0): New.
7955         * hooks.h (hook_int_rtx_insn_0): Declare.
7956         * toplev.c (process_options): Take -gas-loc-support and
7957         -gas-locview-support from dwarf2out.  Enable
7958         -gvariable-location-views by default only with locview
7959         assembler support.  Enable -ginternal-reset-location-views by
7960         default only if the target defines the corresponding hook.
7961         Enable -ginline-points by default if location views are
7962         enabled; force it disabled if statement frontiers are
7963         disabled.
7964         * tree-inline.c (expand_call_inline): Check option variables.
7965         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7967 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
7969         PR tree-optimization/84321
7970         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7971         handling.  Also check whether the anti-range contains any values
7972         that satisfy the mask; switch to a VR_RANGE if not.
7974 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
7976         PR sanitizer/84340
7977         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7979 2018-02-13  Martin Jambor  <mjambor@suse.cz>
7981         PR c++/83990
7982         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7983         of call statements, also set location of a load to a temporary.
7985 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
7987         * config/rl78/rl78.c (add_vector_labels): New function.
7988         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
7989         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
7990         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
7991         which checks that no arguments are passed.
7992         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
7993         * doc/extend.texi: Documentation for the new attribute.
7995 2018-02-13  Andreas Schwab  <schwab@suse.de>
7997         * config/riscv/linux.h (CPP_SPEC): Define.
7999 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
8001         PR target/84335
8002         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
8003         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
8004         OPTION_MASK_ISA_AES as first argument to def_builtin_const
8005         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
8006         instead of OPTION_MASK_ISA_PCLMUL as first argument to
8007         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
8008         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
8009         temporarily for AES and PCLMUL builtins.
8011         PR tree-optimization/84339
8012         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
8013         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
8014         Formatting fixes.
8016         PR middle-end/84309
8017         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
8018         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
8019         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
8020         inline function.
8021         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
8022         inline function.
8023         * omp-simd-clone.h: New file.
8024         * omp-simd-clone.c: Include omp-simd-clone.h.
8025         (expand_simd_clones): No longer static.
8026         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
8027         cgraph.h and omp-simd-clone.h.
8028         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
8029         (vect_recog_widen_shift_pattern): Formatting fix.
8030         (vect_pattern_recog_1): Don't check optab for calls.
8032         PR target/84336
8033         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
8034         operands[2] into a REG before using gen_lowpart on it.
8036 2018-02-12  Jeff Law  <law@redhat.com>
8038         PR target/83760
8039         * config/sh/sh.c (find_barrier): Consider a sibling call
8040         a barrier as well.
8042         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
8043         successfully back substituting a reg.
8045 2018-02-12  Richard Biener  <rguenther@suse.de>
8047         PR tree-optimization/84037
8048         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
8049         parameter, move visited init to caller.
8050         (vect_slp_analyze_operations): Separate cost from validity
8051         check, initialize visited once for all instances.
8052         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
8053         for all instances.
8054         * tree-vect-stmts.c (vect_model_simple_cost): Make early
8055         out an assert.
8056         (vect_model_promotion_demotion_cost): Likewise.
8057         (vectorizable_bswap): Guard cost modeling with !slp_node
8058         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
8059         SLP stmts.
8060         (vectorizable_call): Likewise.
8061         (vectorizable_conversion): Likewise.
8062         (vectorizable_assignment): Likewise.
8063         (vectorizable_shift): Likewise.
8064         (vectorizable_operation): Likewise.
8065         (vectorizable_store): Likewise.
8066         (vectorizable_load): Likewise.
8067         (vectorizable_condition): Likewise.
8068         (vectorizable_comparison): Likewise.
8070 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
8072         PR sanitizer/84307
8073         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
8074         (ASAN_MARK): Fix fnspec to account for return value, change pointer
8075         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
8077 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8079         PR middle-end/83665
8080         * params.def (inline-min-speedup): Increase from 8 to 15.
8081         (max-inline-insns-auto): Decrease from 40 to 30.
8082         * ipa-split.c (consider_split): Add some buffer for function to
8083         be considered inlining candidate.
8084         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
8085         default values.
8087 2018-02-12  Richard Biener  <rguenther@suse.de>
8089         PR tree-optimization/84037
8090         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
8091         matched stmts if we cannot swap the non-matched ones.
8093 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
8095         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
8096         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
8097         _mm_maskz_scalef_round_ss): New intrinsics.
8098         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
8099         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
8100         __builtin_ia32_scalefss_round): Remove.
8101         (__builtin_ia32_scalefsd_mask_round,
8102         __builtin_ia32_scalefss_mask_round): New intrinsics.
8103         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
8104         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
8105         ((match_operand:VF_128 2 "<round_nimm_predicate>"
8106         "<round_constraint>")): Changed to ...
8107         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
8108         "<round_scalar_constraint>")): ... this.
8109         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
8110         %0, %1, %2<round_op3>}"): Changed to ...
8111         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
8112         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
8113         %2<round_scalar_mask_op3>}"): ... this.
8114         * config/i386/subst.md (round_scalar_nimm_predicate): New.
8116 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
8118         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
8119         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
8120         (_mm_maskz_sqrt_round_ss): New intrinsics.
8121         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
8122         (__builtin_ia32_sqrtsd_mask_round)
8123         (__builtin_ia32_sqrtss_mask_round): New builtins.
8124         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
8125         (__builtin_ia32_sqrtss_round): Remove.
8126         (__builtin_ia32_sqrtsd_mask_round)
8127         (__builtin_ia32_sqrtss_mask_round): New builtins.
8128         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
8129         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
8130         ((match_operand:VF_128 1 "vector_operand"
8131         "xBm,<round_constraint>")): Changed to ...
8132         ((match_operand:VF_128 1 "vector_operand"
8133         "xBm,<round_scalar_constraint>")): ... this.
8134         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
8135         %0, %2, %<iptr>1<round_op3>}): Changed to ...
8136         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
8137         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
8138         %<iptr>1<round_scalar_mask_op3>}): ... this.
8139         ((set_attr "prefix" "<round_prefix>")): Changed to ...
8140         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
8142 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
8144         PR target/84266
8145         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
8146         Cast vec_cmpeq result to correct type.
8147         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
8148         Cast vec_cmpgt result to correct type.
8150 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
8152         * final.c (final_scan_insn_1): Renamed from...
8153         (final_scan_insn): ... this.  New wrapper, to recover
8154         seen from the outermost call in recursive ones.
8155         * config/sparc/sparc.c (output_return): Drop seen from call.
8156         (output_sibcall): Likewise.
8157         * config/visium/visium.c (output_branch): Likewise.
8159 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
8161         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
8162         function label.
8164 2018-02-10  Alan Modra  <amodra@gmail.com>
8166         PR target/84300
8167         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
8168         Specify LR as an input.
8170 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
8172         PR sanitizer/83987
8173         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
8174         remove_member_access_dummy_vars): New functions.
8175         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
8176         lower_omp_1, execute_lower_omp): Use them.
8178         PR rtl-optimization/84308
8179         * shrink-wrap.c (spread_components): Release todo vector.
8181 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
8183         PR rtl-optimization/57193
8184         * ira-color.c (struct allocno_color_data): Add member
8185         conflict_allocno_hard_prefs.
8186         (update_conflict_allocno_hard_prefs): New.
8187         (bucket_allocno_compare_func): Add a preference based on
8188         conflict_allocno_hard_prefs.
8189         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
8190         (color_allocnos): Remove a dead code.  Initiate
8191         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
8193 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8195         PR target/84226
8196         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
8197         constraint from =wa to wa.  Avoid a subreg on the output operand,
8198         instead use a pseudo and subreg it in a move.
8199         (p9_xxbrd_<mode>): Changed to ...
8200         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
8201         (p9_xxbrd_v2df): New expander.
8202         (p9_xxbrw_<mode>): Changed to ...
8203         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
8204         (p9_xxbrw_v4sf): New expander.
8206 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8208         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
8210 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
8212         PR target/83926
8213         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
8214         multiply in 32-bit mode.
8215         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
8216         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
8217         mode.
8219 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8221         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
8222         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
8223         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
8224         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
8226 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
8228         PR lto/84213
8229         * dwarf2out.c (is_trivial_indirect_ref): New function.
8230         (dwarf2out_late_global_decl): Do not generate a location
8231         attribute for variables that have a non-trivial DECL_VALUE_EXPR
8232         and that are not defined in the current unit.
8234 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8236         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
8237         instead of a libcall for UNORDERED.
8239 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
8241         PR target/82641
8242         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
8243         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
8245 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8247         PR target/PR84295
8248         * config/s390/s390.c (s390_set_current_function): Invoke
8249         s390_indirect_branch_settings also if fndecl didn't change.
8251 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8253         * config/rs6000/rs6000.md (blockage): Set length to zero.
8255 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8257         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
8259 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8261         PR sanitizer/84285
8262         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
8263         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
8264         -static-lib*san.
8266         PR debug/84252
8267         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
8268         PARALLEL incoming that failed vt_get_decl_and_offset check.
8270         PR middle-end/84237
8271         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
8272         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
8273         TREE_READONLY bit.
8274         (get_variable_section): For decls in named .bss* sections pass true as
8275         second argument to bss_initializer_p.
8277 2018-02-09  Marek Polacek  <polacek@redhat.com>
8278             Jakub Jelinek  <jakub@redhat.com>
8280         PR c++/83659
8281         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
8282         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
8283         Sync some changes from cxx_fold_indirect_ref.
8285 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8287         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
8288         markers.
8289         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
8290         (BLOCK_INLINE_ENTRY_LABEL): New.
8291         (dwarf2out_var_location): Disregard inline entry markers.
8292         (inline_entry_data): New struct.
8293         (inline_entry_data_hasher): New hashtable type.
8294         (inline_entry_data_hasher::hash): New.
8295         (inline_entry_data_hasher::equal): New.
8296         (inline_entry_data_table): New variable.
8297         (add_high_low_attributes): Add DW_AT_entry_pc and
8298         DW_AT_GNU_entry_view attributes if a pending entry is found
8299         in inline_entry_data_table.  Add old entry_pc attribute only
8300         if debug nonbinding markers are disabled.
8301         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
8302         markers are enabled.
8303         (block_within_block_p, dwarf2out_inline_entry): New.
8304         (dwarf2out_finish): Check that no entries remained in
8305         inline_entry_data_table.
8306         * final.c (reemit_insn_block_notes): Handle inline entry notes.
8307         (final_scan_insn, notice_source_line): Likewise.
8308         (rest_of_clean_state): Skip inline entry markers.
8309         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
8310         markers.
8311         * gimple.c (gimple_build_debug_inline_entry): New.
8312         * gimple.h (enum gimple_debug_subcode): Add
8313         GIMPLE_DEBUG_INLINE_ENTRY.
8314         (gimple_build_debug_inline_entry): Declare.
8315         (gimple_debug_inline_entry_p): New.
8316         (gimple_debug_nonbind_marker_p): Adjust.
8317         * insn-notes.def (INLINE_ENTRY): New.
8318         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
8319         inline entry marker notes.
8320         (print_insn): Likewise.
8321         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
8322         (INSN_DEBUG_MARKER_KIND): Likewise.
8323         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
8324         * tree-inline.c (expand_call_inline): Build and insert
8325         debug_inline_entry stmt.
8326         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
8327         inline entry blocks early, if nonbind markers are enabled.
8328         (dump_scope_block): Dump fragment info.
8329         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
8330         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
8331         (gimple_build_debug_inline_entry): New.
8332         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
8333         Enable/disable inline entry points too.
8334         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
8335         (DEBUG_INSN): Describe inline entry markers.
8337         * common.opt (gvariable-location-views): New.
8338         (gvariable-location-views=incompat5): New.
8339         * config.in: Rebuilt.
8340         * configure: Rebuilt.
8341         * configure.ac: Test assembler for view support.
8342         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
8343         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
8344         * dwarf2out.c (var_loc_view): New typedef.
8345         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
8346         (dwarf2out_locviews_in_attribute): New.
8347         (dwarf2out_locviews_in_loclist): New.
8348         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
8349         (enum dw_line_info_opcode): Add LI_adv_address.
8350         (struct dw_line_info_table): Add view.
8351         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
8352         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
8353         (zero_view_p): New variable.
8354         (ZERO_VIEW_P): New macro.
8355         (output_asm_line_debug_info): New.
8356         (struct var_loc_node): Add view.
8357         (add_AT_view_list, AT_loc_list): New.
8358         (add_var_loc_to_decl): Add view param.  Test it against last.
8359         (new_loc_list): Add view params.  Record them.
8360         (AT_loc_list_ptr): Handle loc and view lists.
8361         (view_list_to_loc_list_val_node): New.
8362         (print_dw_val): Handle dw_val_class_view_list.
8363         (size_of_die): Likewise.
8364         (value_format): Likewise.
8365         (loc_list_has_views): New.
8366         (gen_llsym): Set vl_symbol too.
8367         (maybe_gen_llsym, skip_loc_list_entry): New.
8368         (dwarf2out_maybe_output_loclist_view_pair): New.
8369         (output_loc_list): Output view list or entries too.
8370         (output_view_list_offset): New.
8371         (output_die): Handle dw_val_class_view_list.
8372         (output_dwarf_version): New.
8373         (output_compilation_unit_header): Use it.
8374         (output_skeleton_debug_sections): Likewise.
8375         (output_rnglists, output_line_info): Likewise.
8376         (output_pubnames, output_aranges): Update version comments.
8377         (output_one_line_info_table): Output view numbers in asm comments.
8378         (dw_loc_list): Determine current endview, pass it to new_loc_list.
8379         Call maybe_gen_llsym.
8380         (loc_list_from_tree_1): Adjust.
8381         (add_AT_location_description): Create view list attribute if
8382         needed, check it's absent otherwise.
8383         (convert_cfa_to_fb_loc_list): Adjust.
8384         (maybe_emit_file): Call output_asm_line_debug_info for test.
8385         (dwarf2out_var_location): Reset views as needed.  Precompute
8386         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
8387         attribute.  Set view.
8388         (new_line_info_table): Reset next view.
8389         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
8390         (dwarf2out_source_line): Likewise.  Output view resets and labels to
8391         the assembler, or select appropriate line info opcodes.
8392         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
8393         (optimize_string_length): Catch it.  Adjust.
8394         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
8395         dw_val_class_view_list, and remove it if no longer needed.
8396         (hash_loc_list): Hash view numbers.
8397         (loc_list_hasher::equal): Compare them.
8398         (optimize_location_lists): Check whether a view list symbol is
8399         needed, and whether the locview attribute is present, and
8400         whether they match.  Remove the locview attribute if no longer
8401         needed.
8402         (index_location_lists): Call skip_loc_list_entry for test.
8403         (dwarf2out_finish): Call output_asm_line_debug_info for test.
8404         Use output_dwarf_version.
8405         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
8406         (struct dw_val_node): Add val_view_list.
8407         * final.c (SEEN_NEXT_VIEW): New.
8408         (set_next_view_needed): New.
8409         (clear_next_view_needed): New.
8410         (maybe_output_next_view): New.
8411         (final_start_function): Rename to...
8412         (final_start_function_1): ... this.  Take pointer to FIRST,
8413         add SEEN parameter.  Emit param bindings in the initial view.
8414         (final_start_function): Reintroduce SEEN-less interface.
8415         (final): Rename to...
8416         (final_1): ... this.  Take SEEN parameter.  Output final pending
8417         next view at the end.
8418         (final): Reintroduce seen-less interface.
8419         (final_scan_insn): Output pending next view before switching
8420         sections or ending a block.  Mark the next view as needed when
8421         outputting variable locations.  Notify debug backend of section
8422         changes, and of location view changes.
8423         (rest_of_handle_final): Adjust.
8424         * toplev.c (process_options): Autodetect value for debug variable
8425         location views option.  Warn on incompat5 without -gdwarf-5.
8426         * doc/invoke.texi (gvariable-location-views): New.
8427         (gvariable-location-views=incompat5): New.
8428         (gno-variable-location-views): New.
8430 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
8432         PR tree-optimization/84136
8433         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
8434         that the result of find_edge is non-NULL.
8436 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8438         PR target/83008
8439         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8440         storing integer register in SImode.  Fix cost of 256 and 512
8441         byte aligned SSE register store.
8443 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8445         * config/i386/i386.c (ix86_multiplication_cost): Fix
8446         multiplication cost for TARGET_AVX512DQ.
8448 2018-02-08  Marek Polacek  <polacek@redhat.com>
8450         PR tree-optimization/84238
8451         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8452         get_range_strlen.
8454 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8456         PR tree-optimization/84265
8457         * tree-vect-stmts.c (vectorizable_store): Don't treat
8458         VMAT_CONTIGUOUS accesses as grouped.
8459         (vectorizable_load): Likewise.
8461 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8463         PR tree-optimization/81635
8464         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8465         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8466         (test_round_for_mask): New functions.
8467         (wide_int_cc_tests): Call test_round_for_mask.
8468         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8469         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8470         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8471         range returned by get_range_info.
8473 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8475         PR ipa/81360
8476         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8477         * symtab.c: Include builtins.h
8478         (symtab_node::output_to_lto_symbol_table_p): Move here
8479         from lto-streamer-out.c:output_symbol_p.
8480         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8481         (output_symbol_p): Move all logic to symtab.c
8482         (produce_symtab): Update.
8484 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8486         * config/s390/s390-opts.h (enum indirect_branch): Define.
8487         * config/s390/s390-protos.h (s390_return_addr_from_memory)
8488         (s390_indirect_branch_via_thunk)
8489         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
8490         (enum s390_indirect_branch_type): Define.
8491         * config/s390/s390.c (struct s390_frame_layout, struct
8492         machine_function): Remove.
8493         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
8494         (indirect_branch_table_label_no, indirect_branch_table_name):
8495         Define variables.
8496         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
8497         (enum s390_indirect_branch_option): Define.
8498         (s390_return_addr_from_memory): New function.
8499         (s390_handle_string_attribute): New function.
8500         (s390_attribute_table): Add new attribute handler.
8501         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
8502         (s390_indirect_branch_via_thunk): New function.
8503         (s390_indirect_branch_via_inline_thunk): New function.
8504         (s390_function_ok_for_sibcall): When jumping via thunk disallow
8505         sibling call optimization for non z10 compiles.
8506         (s390_emit_call): Force indirect branch target to be a single
8507         register.  Add r1 clobber for non-z10 compiles.
8508         (s390_emit_epilogue): Emit return jump via return_use expander.
8509         (s390_reorg): Handle JUMP_INSNs as execute targets.
8510         (s390_option_override_internal): Perform validity checks for the
8511         new command line options.
8512         (s390_indirect_branch_attrvalue): New function.
8513         (s390_indirect_branch_settings): New function.
8514         (s390_set_current_function): Invoke s390_indirect_branch_settings.
8515         (s390_output_indirect_thunk_function):  New function.
8516         (s390_code_end): Implement target hook.
8517         (s390_case_values_threshold): Implement target hook.
8518         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
8519         macros.
8520         * config/s390/s390.h (struct s390_frame_layout)
8521         (struct machine_function): Move here from s390.c.
8522         (TARGET_INDIRECT_BRANCH_NOBP_RET)
8523         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
8524         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
8525         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
8526         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
8527         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
8528         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
8529         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
8530         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
8531         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
8532         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
8533         (mnemonic attribute): Add values which aren't recognized
8534         automatically.
8535         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
8536         pattern for branch conversion.  Fix mnemonic attribute.
8537         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
8538         indirect branch via thunk if requested.
8539         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
8540         ("*indirect_jump"): Disable for branch conversion using out of
8541         line thunks.
8542         ("indirect_jump_via_thunk<mode>_z10")
8543         ("indirect_jump_via_thunk<mode>")
8544         ("indirect_jump_via_inlinethunk<mode>_z10")
8545         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
8546         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
8547         ("casesi_jump_via_inlinethunk<mode>_z10")
8548         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
8549         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
8550         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8551         ("*indirect2_jump"): Disable for branch conversion.
8552         ("casesi_jump"): Turn into expander and expand patterns for branch
8553         conversion.
8554         ("return_use"): New expander.
8555         ("*return"): Emit return via thunk and rename it to ...
8556         ("*return<mode>"): ... this one.
8557         * config/s390/s390.opt: Add new options and and enum for the
8558         option values.
8560 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8562         * lra-constraints.c (match_reload): Unconditionally use
8563         gen_lowpart_SUBREG, rather than selecting between that
8564         and equivalent gen_rtx_SUBREG code.
8566 2018-02-08  Richard Biener  <rguenther@suse.de>
8568         PR tree-optimization/84233
8569         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8570         changed flag instead of boguously re-using phi_inserted.
8572 2018-02-08  Martin Jambor  <mjambor@suse.cz>
8574         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8575         static local variables.
8577 2018-02-08  Richard Biener  <rguenther@suse.de>
8579         PR tree-optimization/84278
8580         * tree-vect-stmts.c (vectorizable_store): When looking for
8581         smaller vector types to perform grouped strided loads/stores
8582         make sure the mode is supported by the target.
8583         (vectorizable_load): Likewise.
8585 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8587         * config/aarch64/aarch64.c (aarch64_components_for_bb):
8588         Increase LDP/STP opportunities by adding adjacent callee-saves.
8590 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8592         PR rtl-optimization/84068
8593         PR rtl-optimization/83459
8594         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8596 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
8598         PR tree-optimization/84224
8599         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8600         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8601         non-zero arguments.
8603 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
8605         PR target/84113
8606         * config/rs6000/altivec.md (*restore_world): Remove LR use.
8607         * config/rs6000/predicates.md (restore_world_operation): Adjust op
8608         count, remove one USE.
8610 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
8612         * doc/install.texi (Configuration): Document the
8613         --with-long-double-format={ibm,ieee} PowerPC configuration
8614         options.
8616         PR target/84154
8617         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8618         Convert from define_expand to be define_insn_and_split.  Rework
8619         float/double/_Float128 conversions to QI/HI/SImode to work with
8620         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
8621         conversions to QI/HImode types did a store and then a load to
8622         truncate the value.  For conversions to VSX registers, don't split
8623         the insn, instead emit the code directly.  Use the code iterator
8624         any_fix to combine signed and unsigned conversions.
8625         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8626         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8627         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8628         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8629         (fix_<mode>di2_hw): Likewise.
8630         (fixuns_<mode>di2_hw): Likewise.
8631         (fix_<mode>si2_hw): Likewise.
8632         (fixuns_<mode>si2_hw): Likewise.
8633         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8634         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8635         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8636         fix<uns>_trunc<SFDF:mode>si2_p8.
8637         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8638         used.
8639         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8640         (fix<uns>_<mode>_mem): Likewise.
8641         (fctiw<u>z_<mode>_mem): Likewise.
8642         (fix<uns>_<mode>_mem): Likewise.
8643         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8644         the register allocator from doing a direct move to the GPRs to do
8645         a store, and instead use the ISA 3.0 store byte/half-word from
8646         vector register instruction.  For IEEE 128-bit floating point,
8647         also optimize stores of 32-bit ints.
8648         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8650 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
8652         * genextract.c (push_pathstr_operand): New function to support
8653         [a-zA-Z].
8654         (walk_rtx): Call push_pathstr_operand.
8655         (print_path): Support [a-zA-Z].
8657 2018-02-07  Richard Biener  <rguenther@suse.de>
8659         PR tree-optimization/84037
8660         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8661         (cse_and_gimplify_to_preheader): Declare.
8662         (vect_get_place_in_interleaving_chain): Likewise.
8663         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8664         ivexpr_map.
8665         (_loop_vec_info::~_loop_vec_info): Delete it.
8666         (cse_and_gimplify_to_preheader): New function.
8667         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8668         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8669         (vectorizable_load): Likewise.  For grouped stores always base
8670         the IV on the first element.
8671         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8672         condition before gimplifying.
8674 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8676         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8677         *DIV_EXPR and *MOD_EXPR.
8679 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8681         PR target/84248
8682         * config/i386/i386.c (ix86_option_override_internal): Mask out
8683         the CF_SET bit when checking -fcf-protection.
8685 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8687         PR libgomp/84217
8688         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8689         enough.
8691 2018-02-07  Richard Biener  <rguenther@suse.de>
8693         PR tree-optimization/84204
8694         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8695         this place.
8697         PR tree-optimization/84205
8698         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8699         special-case isl_ast_op_zdiv_r.
8701         PR tree-optimization/84223
8702         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8703         Only add conditions from within the region.
8704         (gather_bbs::after_dom_children): Adjust.
8706 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8708         PR target/84209
8709         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8710         * config/avr/avr.md: Only post-reload split REG-REG moves if
8711         either register is GENERAL_REG_P.
8713 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8715         PR tree-optimization/84235
8716         * tree-ssa-scopedtables.c
8717         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8718         if the subtraction is performed in floating point type where NaNs are
8719         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8720         build 1.  Formatting fix.
8722 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8724         PR target/84146
8725         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8726         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8727         and skip it regardless of bb boundaries.  Use CALL_P macro,
8728         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8729         unnecessarily, formatting fix.
8731 2018-02-06  Michael Collison  <michael.collison@arm.com>
8733         * config/arm/thumb2.md:
8734         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8735         (*thumb_mov_notscc): Ditto.
8737 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8739         PR target/84154
8740         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8741         unsigned_fix, not "s".
8743 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8745         * configure.ac (gcc_fn_eh_frame_ro): New function.
8746         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8747         correct .eh_frame permissions.
8748         * configure: Regenerate.
8750 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8752         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8753         irrelevant options.
8755 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8757         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8758         Display warning message for -mno-speculate-indirect-jumps.
8760 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8762         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8763         Undocumented.
8764         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8766 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8768         PR tree-optimization/84225
8769         * tree-eh.c (find_trapping_overflow): Only call
8770         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8772 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8774         PR target/84145
8775         * config/i386/i386.c: Reimplement the check of possible options
8776         -mibt/-mshstk conbination. Change error messages.
8777         * doc/invoke.texi: Fix a typo: remove extra '='.
8779 2018-02-06  Marek Polacek  <polacek@redhat.com>
8781         PR tree-optimization/84228
8782         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8784 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8786         PR target/82641
8787         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8788         emitted arch directives.
8789         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8790         __ARM_FEATURE_COPROC before changing architectures.
8792 2018-02-06  Richard Biener  <rguenther@suse.de>
8794         * config/i386/i386.c (print_reg): Fix typo.
8795         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8797 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8799         * configure: Regenerate.
8801 2018-02-05  Martin Sebor  <msebor@redhat.com>
8803         PR tree-optimization/83369
8804         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8805         inlining context.
8807 2018-02-05  Martin Liska  <mliska@suse.cz>
8809         * doc/invoke.texi: Cherry-pick upstream r323995.
8811 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8813         * ira.c (ira_init_register_move_cost): Adjust comment.
8815 2018-02-05  Martin Liska  <mliska@suse.cz>
8817         PR gcov-profile/84137
8818         * doc/gcov.texi: Fix typo in documentation.
8820 2018-02-05  Martin Liska  <mliska@suse.cz>
8822         PR gcov-profile/83879
8823         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8824         using dlopen functionality.
8826 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8828         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8829         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8830         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8831         _mm_maskz_range_round_ss): New intrinsics.
8832         (__builtin_ia32_rangesd128_round)
8833         (__builtin_ia32_rangess128_round): Remove.
8834         (__builtin_ia32_rangesd128_mask_round,
8835         __builtin_ia32_rangess128_mask_round): New builtins.
8836         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8837         __builtin_ia32_rangess128_round): Remove.
8838         (__builtin_ia32_rangesd128_mask_round,
8839         __builtin_ia32_rangess128_mask_round): New builtins.
8840         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8841         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8842         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8843         "<round_saeonly_constraint>")): Changed to ...
8844         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8845         "<round_saeonly_scalar_constraint>")): ... this.
8846         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8847         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8848         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8849         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8850         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8852 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8854         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8855         options.
8856         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8857         Remove all values except native, 8540 and 8548.
8859 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8861         * config/i386/i386.c (ix86_output_function_return): Pass
8862         INVALID_REGNUM, instead of -1, as invalid register number to
8863         indirect_thunk_name and output_indirect_thunk.
8865 2018-02-02  Julia Koval  <julia.koval@intel.com>
8867         * config.gcc: Add -march=icelake.
8868         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8869         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8870         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8871         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8872         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8873         (processor_target_table): Add icelake.
8874         (ix86_option_override_internal): Handle new PTAs.
8875         (get_builtin_code_for_version): Handle icelake.
8876         (M_INTEL_COREI7_ICELAKE): New.
8877         (fold_builtin_cpu): Handle icelake.
8878         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8879         * doc/invoke.texi: Add -march=icelake.
8881 2018-02-02  Julia Koval  <julia.koval@intel.com>
8883         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8884         to wide_int_bitmask.
8885         * wide-int-bitmask.h: New.
8887 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8889         PR target/84066
8890         * config/i386/i386.md: Replace Pmode with word_mode in
8891         builtin_setjmp_setup and builtin_longjmp to support x32.
8893 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8895         PR target/56010
8896         PR target/83743
8897         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8898         #include "opts.h".
8899         (rs6000_supported_cpu_names): New static variable.
8900         (linux_cpu_translation_table): Likewise.
8901         (elf_platform) <cpu>: Define new static variable and use it.
8902         Translate kernel AT_PLATFORM name to canonical name if needed.
8903         Error if platform name is unknown.
8905 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8907         PR target/84089
8908         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8910 2018-02-01  Jeff Law  <law@redhat.com>
8912         PR target/84128
8913         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8914         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8915         the scratch if RELEASE_VIA_POP is false.
8916         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8917         If we have to save a temporary register, decrement SIZE appropriately.
8918         Pass new arguments to release_scratch_register_on_entry.
8919         (ix86_adjust_stack_and_probe): Likewise.
8920         (ix86_emit_probe_stack_range): Pass new arguments to
8921         release_scratch_register_on_entry.
8923 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8925         PR rtl-optimization/84157
8926         * combine.c (change_zero_ext): Use REG_P predicate in
8927         front of HARD_REGISTER_P predicate.
8929 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
8931         * config/avr/avr.c (avr_option_override): Move disabling of
8932         -fdelete-null-pointer-checks to...
8933         * common/config/avr/avr-common.c (avr_option_optimization_table):
8934         ...here.
8936 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8938         PR tree-optimization/81635
8939         * tree-data-ref.c (split_constant_offset_1): For types that
8940         wrap on overflow, try to use range info to prove that wrapping
8941         cannot occur.
8943 2018-02-01  Renlin Li  <renlin.li@arm.com>
8945         PR target/83370
8946         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8947         TAILCALL_ADDR_REGS.
8948         (aarch64_register_move_cost): Likewise.
8949         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8950         TAILCALL_ADDR_REGS.
8951         (REG_CLASS_NAMES): Likewise.
8952         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8953         TAILCALL_ADDR_REGS. Remove IP registers.
8954         * config/aarch64/aarch64.md (Ucs): Update register constraint.
8956 2018-02-01  Richard Biener  <rguenther@suse.de>
8958         * domwalk.h (dom_walker::dom_walker): Add additional constructor
8959         for specifying RPO order and allow NULL for that.
8960         * domwalk.c (dom_walker::dom_walker): Likewise.
8961         (dom_walker::walk): Handle NULL RPO order.
8962         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8963         in RPO order.
8964         (rewrite_update_dom_walker): Likewise.
8965         (mark_def_dom_walker): Likewise.
8967 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8969         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8970         (aarch64_maybe_expand_sve_subreg_move): Declare.
8971         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8972         * config/aarch64/predicates.md (aarch64_any_register_operand): New
8973         predicate.
8974         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8975         that are semantically a reverse operation.
8976         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8977         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8978         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8979         functions.
8980         (aarch64_can_change_mode_class): For big-endian, forbid changes
8981         between two SVE modes if they have different element sizes.
8983 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8985         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8986         the TImode handling for big-endian targets.
8988 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8990         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
8991         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
8992         not just bytes.
8993         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
8994         Remove BSWAP handing for big-endian targets and use the form of
8995         LD1RQ appropariate for the mode.
8997 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
8999         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
9000         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
9001         duplicated element.
9003 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9005         PR tearget/83845
9006         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
9007         check for operands that need to go through aarch64_sve_reload_be.
9009 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
9011         PR tree-optimization/81661
9012         PR tree-optimization/84117
9013         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
9014         * tree-eh.c: Include gimplify.h.
9015         (find_trapping_overflow, replace_trapping_overflow,
9016         rewrite_to_non_trapping_overflow): New functions.
9017         * tree-vect-loop.c: Include tree-eh.h.
9018         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
9019         * tree-data-ref.c: Include tree-eh.h.
9020         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
9022 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
9024         PR rtl-optimization/84123
9025         * combine.c (change_zero_ext): Check if hard register satisfies
9026         can_change_dest_mode before calling gen_lowpart_SUBREG.
9028 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
9030         PR target/82444
9031         * ira.c (ira_init_register_move_cost): Remove assert.
9033 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
9035         PR rtl-optimization/84071
9036         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
9037         * doc/tm.texi: Regenerate.
9039 2018-01-31  Richard Biener  <rguenther@suse.de>
9041         PR tree-optimization/84132
9042         * tree-data-ref.c (analyze_miv_subscript): Properly
9043         check whether evolution_function_is_affine_multivariate_p
9044         before calling gcd_of_steps_may_divide_p.
9046 2018-01-31  Julia Koval  <julia.koval@intel.com>
9048         PR target/83618
9049         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
9050         * config/i386/i386.md (rdpid_rex64) New.
9051         (rdpid): Make 32bit only.
9053 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
9055         PR lto/84105
9056         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
9057         an IDENTIFIER_NODE for FUNCTION_TYPE's.
9059 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
9061         Revert
9062         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
9064         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
9066 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
9068         PR rtl-optimization/84071
9069         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
9070         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
9072 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
9074         * config/arc/arc.c (arc_handle_aux_attribute): New function.
9075         (arc_attribute_table): Add 'aux' attribute.
9076         (arc_in_small_data_p): Consider aux like variables.
9077         (arc_is_aux_reg_p): New function.
9078         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
9079         (arc_get_aux_arg): New function.
9080         (prepare_move_operands): Handle aux-register access.
9081         (arc_handle_aux_attribute): New function.
9082         * doc/extend.texi (ARC Variable attributes): Add subsection.
9084 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
9086         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
9087         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
9088         (arc_attribute_table): Add 'uncached' attribute.
9089         (arc_print_operand): Print '.di' flag for uncached memory
9090         accesses.
9091         (arc_in_small_data_p): Do not consider for small data the uncached
9092         types.
9093         (arc_is_uncached_mem_p): New function.
9094         * config/arc/predicates.md (compact_store_memory_operand): Check
9095         for uncached memory accesses.
9096         (nonvol_nonimm_operand): Likewise.
9097         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
9099 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
9101         PR c/84100
9102         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
9103         falign-loops=): Add Optimization flag.
9105 2018-01-30  Jeff Law  <law@redhat.com>
9107         PR target/84064
9108         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
9109         INT_REGISTERS_SAVED.  Check it prior to calling
9110         get_scratch_register_on_entry.
9111         (ix86_adjust_stack_and_probe): Similarly.
9112         (ix86_emit_probe_stack_range): Similarly.
9113         (ix86_expand_prologue): Corresponding changes.
9115 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9117         PR target/40411
9118         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
9119         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
9121 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
9123         PR target/84112
9124         * lra-constraints.c (curr_insn_transform): Process AND in the
9125         address.
9127 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
9129         PR rtl-optimization/83986
9130         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
9131         dependence against last_pending_memory_flush in addition to
9132         pending_jump_insns.
9134 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
9136         PR tree-optimization/81611
9137         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
9138         copies.
9140 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9142         PR target/83758
9143         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
9144         a reg rtx.
9146 2018-01-30  Richard Biener  <rguenther@suse.de>
9147             Jakub Jelinek  <jakub@redhat.com>
9149         PR tree-optimization/84111
9150         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
9151         inner loops added during recursion, as they don't have up-to-date
9152         SSA form.
9154 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
9156         PR ipa/81360
9157         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
9158         (can_inline_edge_by_limits_p): ... here.
9159         (can_early_inline_edge_p, check_callers,
9160         update_caller_keys, update_callee_keys, recursive_inlining,
9161         add_new_edges_to_heap, speculation_useful_p,
9162         inline_small_functions,
9163         inline_small_functions, flatten_function,
9164         inline_to_all_callers_1): Update.
9166 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
9168         * profile-count.c (profile_count::combine_with_ipa_count): Handle
9169         zeros correctly.
9171 2018-01-30  Richard Biener  <rguenther@suse.de>
9173         PR tree-optimization/83008
9174         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
9175         invariant and constant vector uses in stmts when they need
9176         more than one stmt.
9178 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9180         PR bootstrap/84017
9181         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
9182         * configure: Regenerate.
9184 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9186         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
9187         pattern.
9188         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
9189         Use gen_rtx_REG rather than gen_lowpart.
9191 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9193         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
9194         rather than 0 when creating partial subregs.
9196 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9198         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
9199         of usage.
9201 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
9203         PR target/81550
9204         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
9205         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
9206         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
9207         flags.  This restores the settings used before the 2017-07-24.
9208         Turning off pre increment/decrement/modify allows IVOPTS to
9209         optimize DF/SF loops where the index is an int.
9211 2018-01-29  Richard Biener  <rguenther@suse.de>
9212             Kelvin Nilsen  <kelvin@gcc.gnu.org>
9214         PR bootstrap/80867
9215         * tree-vect-stmts.c (vectorizable_call): Don't call
9216         targetm.vectorize_builtin_md_vectorized_function if callee is
9217         NULL.
9219 2018-01-22  Carl Love  <cel@us.ibm.com>
9221         * doc/extend.tex: Fix typo in second arg in
9222         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
9224 2018-01-29  Richard Biener  <rguenther@suse.de>
9226         PR tree-optimization/84086
9227         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
9228         (flush_ssaname_freelist): When SSA names were released reset
9229         the SCEV hash table.
9231 2018-01-29  Richard Biener  <rguenther@suse.de>
9233         PR tree-optimization/84057
9234         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
9235         removed paths when removing edges.
9237 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
9239         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
9240         -mfunction-return=@var{choice}.
9242 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9244         PR diagnostic/84034
9245         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
9246         Handle CR like TAB.
9247         (layout::print_source_line): Likewise.
9248         (test_get_line_width_without_trailing_whitespace): Add test cases.
9250 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
9252         PR middle-end/84040
9253         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
9254         debug insns.
9256 2018-01-26  Jim Wilson  <jimw@sifive.com>
9258         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
9260         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
9261         specified.
9263 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9265         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
9266         and CMP + SUB-immediate -> SUBS.
9268 2018-01-26  Martin Sebor  <msebor@redhat.com>
9270         PR tree-optimization/83896
9271         * tree-ssa-strlen.c (get_string_len): Rename...
9272         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
9273         Avoid assuming length is constant.
9274         (handle_char_store): Use HOST_WIDE_INT for string length.
9276 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
9278         PR target/81763
9279         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
9280         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
9282 2018-01-26  Richard Biener  <rguenther@suse.de>
9284         PR rtl-optimization/84003
9285         * dse.c (record_store): Only record redundant stores when
9286         the earlier store aliases at least all accesses the later one does.
9288 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
9290         PR rtl-optimization/83985
9291         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
9292         REG_CFA_RESTORE insns.
9293         (delete_unmarked_insns): Don't ignore separate shrink wrapping
9294         REG_CFA_RESTORE insns here.
9296         PR c/83989
9297         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
9298         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
9300 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9302         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
9303         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
9304         (arc_init): Likewise.
9305         (arc_override_options): Likewise.
9306         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
9307         value.
9308         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
9309         support.
9310         * config/arc/arc.h (TARGET_DBNZ): Define.
9311         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
9312         properly set the tune attribute.
9313         (dbnz): Use TARGET_DBNZ guard.
9314         * config/arc/arc.opt (mtune): Add core3 option.
9316 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9318         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
9319         recognize new pic like addresses.
9320         (arc_delegitimize_address): Clean up.
9322 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9324         * config/arc/arc-arches.def: Option mrf16 valid for all
9325         architectures.
9326         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
9327         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
9328         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
9329         * config/arc/arc-tables.opt: Regenerate.
9330         * config/arc/arc.c (arc_conditional_register_usage): Handle
9331         reduced register file case.
9332         (arc_file_start): Set must have build attributes.
9333         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
9334         mrf16 option value.
9335         * config/arc/arc.opt (mrf16): Add new option.
9336         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
9337         * config/arc/genmultilib.awk: Handle new mrf16 option.
9338         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
9339         * config/arc/t-multilib: Regenerate.
9340         * doc/invoke.texi (ARC Options): Document mrf16 option.
9342 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9344         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
9345         * config/arc/arc.c (arc_handle_secure_attribute): New function.
9346         (arc_attribute_table): Add 'secure_call' attribute.
9347         (arc_print_operand): Print secure call operand.
9348         (arc_function_ok_for_sibcall): Don't optimize tail calls when
9349         secure.
9350         (arc_is_secure_call_p): New function.  * config/arc/arc.md
9351         (call_i): Add support for sjli instruction.
9352         (call_value_i): Likewise.
9353         * config/arc/constraints.md (Csc): New constraint.
9355 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9356             John Eric Martin  <John.Martin@emmicro-us.com>
9358         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
9359         * config/arc/arc.c (_arc_jli_section): New struct.
9360         (arc_jli_section): New type.
9361         (rc_jli_sections): New static variable.
9362         (arc_handle_jli_attribute): New function.
9363         (arc_attribute_table): Add jli_always and jli_fixed attribute.
9364         (arc_file_end): New function.
9365         (TARGET_ASM_FILE_END): Define.
9366         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
9367         (arc_add_jli_section): New function.
9368         (jli_call_scan): Likewise.
9369         (arc_reorg): Call jli_call_scan.
9370         (arc_output_addsi): Remove 'S' from printing asm operand.
9371         (arc_is_jli_call_p): New function.
9372         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
9373         operand.
9374         (movhi_insn): Likewise.
9375         (movsi_insn): Likewise.
9376         (movsi_set_cc_insn): Likewise.
9377         (loadqi_update): Likewise.
9378         (load_zeroextendqisi_update): Likewise.
9379         (load_signextendqisi_update): Likewise.
9380         (loadhi_update): Likewise.
9381         (load_zeroextendhisi_update): Likewise.
9382         (load_signextendhisi_update): Likewise.
9383         (loadsi_update): Likewise.
9384         (loadsf_update): Likewise.
9385         (movsicc_insn): Likewise.
9386         (bset_insn): Likewise.
9387         (bxor_insn): Likewise.
9388         (bclr_insn): Likewise.
9389         (bmsk_insn): Likewise.
9390         (bicsi3_insn): Likewise.
9391         (cmpsi_cc_c_insn): Likewise.
9392         (movsi_ne): Likewise.
9393         (movsi_cond_exec): Likewise.
9394         (clrsbsi2): Likewise.
9395         (norm_f): Likewise.
9396         (normw): Likewise.
9397         (swap): Likewise.
9398         (divaw): Likewise.
9399         (flag): Likewise.
9400         (sr): Likewise.
9401         (kflag): Likewise.
9402         (ffs): Likewise.
9403         (ffs_f): Likewise.
9404         (fls): Likewise.
9405         (call_i): Remove 'S' asm letter, add jli instruction.
9406         (call_value_i): Likewise.
9407         * config/arc/arc.op (mjli-always): New option.
9408         * config/arc/constraints.md (Cji): New constraint.
9409         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
9410         operand.
9411         (subsf3_fpx): Likewise.
9412         (mulsf3_fpx): Likewise.
9413         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
9414         asm operand.
9415         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
9416         function attrbutes.
9417         * doc/invoke.texi (ARC): Document mjli-always option.
9419 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
9421         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
9422         avoid addition with 0 and use incw and decw where possible.
9424 2018-01-26  Richard Biener  <rguenther@suse.de>
9426         PR tree-optimization/81082
9427         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
9428         association if it requires casting to unsigned.
9429         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
9430         from fold_plusminus_mult_expr to catch important cases late when
9431         range info is available.
9433 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9435         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9436         * configure.ac (hidden_linkonce): New test.
9437         * configure: Regenerate.
9438         * config.in: Regenerate.
9440 2018-01-26  Julia Koval  <julia.koval@intel.com>
9442         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9443         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9444         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9445         _mm_mask_bitshuffle_epi64_mask): Fix type.
9446         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9447         USI_FTYPE_V4DI_V4DI_USI): Remove.
9448         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9449         __builtin_ia32_vpshufbitqmb256_mask,
9450         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9451         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9452         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9454 2018-01-26  Alan Modra  <amodra@gmail.com>
9456         PR target/84033
9457         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9458         UNSPEC_VBPERMQ.  Sort other unspecs.
9460 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
9462         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9464 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
9466         PR middle-end/83055
9467         * predict.c (drop_profile): Do not push/pop cfun; update also
9468         node->count.
9469         (handle_missing_profiles): Fix logic looking for zero profiles.
9471 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
9473         PR middle-end/83977
9474         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9475         on functions with #pragma omp declare simd or functions with simd
9476         attribute.
9477         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9478         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9479         Remove trailing \n from warning_at calls.
9481 2018-01-25  Tom de Vries  <tom@codesourcery.com>
9483         PR target/84028
9484         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9485         for neutered workers.
9487 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
9489         PR target/68467
9490         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
9491         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
9493 2018-01-24  Jeff Law  <law@redhat.com>
9495         PR target/83994
9496         * i386.c (get_probe_interval): Move to earlier point.
9497         (ix86_compute_frame_layout): If -fstack-clash-protection and
9498         the frame is larger than the probe interval, then use pushes
9499         to save registers rather than reg->mem moves.
9500         (ix86_expand_prologue): Remove conditional for int_registers_saved
9501         assertion.
9503 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
9505         PR target/84014
9506         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
9507         min/max for never referenced object.
9509 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
9511         PR middle-end/83977
9512         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
9513         here.
9514         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
9515         attributes from DECL_ATTRIBUTES (decl) without affecting
9516         DECL_ATTRIBUTES (current_function_decl).
9517         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
9518         functions with non-NULL DECL_ABSTRACT_ORIGIN.
9520 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
9522         PR tree-optimization/83979
9523         * fold-const.c (fold_comparison): Use constant_boolean_node
9524         instead of boolean_{true,false}_node.
9526 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
9528         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
9529         with zero counts.
9531 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9533         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9534         Simplify the clause that sets the length attribute.
9535         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9536         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
9537         clause that sets the length attribute.
9538         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9540 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9542         PR target/83589
9543         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
9544         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
9545         Add strict parameter.
9546         (prevent_branch_around_nothing): Insert dummy insn between branch to
9547         label and label with no ptx insn inbetween.
9548         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
9550 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9552         PR target/81352
9553         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9554         for neutered threads in warp.
9555         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9557 2018-01-24  Richard Biener  <rguenther@suse.de>
9559         PR tree-optimization/83176
9560         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9561         operands.
9563 2018-01-24  Richard Biener  <rguenther@suse.de>
9565         PR tree-optimization/82819
9566         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9567         code generating pluses that are no-ops in the target precision.
9569 2018-01-24  Richard Biener  <rguenther@suse.de>
9571         PR middle-end/84000
9572         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9574 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9576         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9577         to merge probabilities.
9578         * predict.c (probably_never_executed): Also mark as cold functions
9579         with global 0 profile and guessed local profile.
9580         * profile-count.c (profile_probability::combine_with_count): New
9581         member function.
9582         * profile-count.h (profile_probability::operator*,
9583         profile_probability::operator*=, profile_probability::operator/,
9584         profile_probability::operator/=): Reduce precision to adjusted
9585         and set value to guessed on contradictory divisions.
9586         (profile_probability::combine_with_freq): Remove.
9587         (profile_probability::combine_wiht_count): Declare.
9588         (profile_count::force_nonzero):: Set to adjusted.
9589         (profile_count::probability_in):: Set quality to adjusted.
9590         * tree-ssa-tail-merge.c (replace_block_by): Use
9591         combine_with_count.
9593 2018-01-23  Andrew Waterman  <andrew@sifive.com>
9594             Jim Wilson  <jimw@sifive.com>
9596         * config/riscv/riscv.c (riscv_stack_boundary): New.
9597         (riscv_option_override): Set riscv_stack_boundary.  Handle
9598         riscv_preferred_stack_boundary_arg.
9599         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9600         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9601         (STACK_BOUNDARY): Set to riscv_stack_boundary.
9602         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9603         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9604         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9606 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
9608         PR target/83905
9609         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9610         of struct ix86_frame.
9611         (ix86_expand_epilogue): Likewise.  Add a local variable for
9612         the reg_save_offset field in struct ix86_frame.
9614 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
9616         PR tree-optimization/82604
9617         * tree-loop-distribution.c (enum partition_kind): New enum item
9618         PKIND_PARTIAL_MEMSET.
9619         (partition_builtin_p): Support above new enum item.
9620         (generate_code_for_partition): Ditto.
9621         (compute_access_range): Differentiate cases that equality can be
9622         proven at all loops, the innermost loops or no loops.
9623         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9624         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
9625         (finalize_partitions, distribute_loop): Don't fuse partition of
9626         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9627         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9628         parloop is enabled.
9630 2018-01-23  Martin Liska  <mliska@suse.cz>
9632         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9633         order to ignore the predictor.
9634         (PRED_POLYMORPHIC_CALL): Likewise.
9635         (PRED_RECURSIVE_CALL): Likewise.
9637 2018-01-23  Martin Liska  <mliska@suse.cz>
9639         * tree-profile.c (tree_profiling): Print function header to
9640         aware reader which function we are working on.
9641         * value-prof.c (gimple_find_values_to_profile): Do not print
9642         not interesting value histograms.
9644 2018-01-23  Martin Liska  <mliska@suse.cz>
9646         * profile-count.h (enum profile_quality): Add
9647         profile_uninitialized as the first value. Do not number values
9648         as they are zero based.
9649         (profile_count::verify): Update sanity check.
9650         (profile_probability::verify): Likewise.
9652 2018-01-23  Nathan Sidwell  <nathan@acm.org>
9654         * doc/invoke.texi (ffor-scope): Deprecate.
9656 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9658         PR tree-optimization/83510
9659         * domwalk.c (set_all_edges_as_executable): New function.
9660         (dom_walker::dom_walker): Convert bool param
9661         "skip_unreachable_blocks" to enum reachability.  Move setup of
9662         edge flags to set_all_edges_as_executable and only do it when
9663         reachability is REACHABLE_BLOCKS.
9664         * domwalk.h (enum dom_walker::reachability): New enum.
9665         (dom_walker::dom_walker): Convert bool param
9666         "skip_unreachable_blocks" to enum reachability.
9667         (set_all_edges_as_executable): New decl.
9668         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9669         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9670         "reachability".
9671         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9672         but converting true to REACHABLE_BLOCKS.
9673         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9674         * tree-vrp.c
9675         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9676         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9677         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9678         REACHABLE_BLOCKS.
9679         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9680         if check_all_array_refs will be called.
9682 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9684         * tree.c (selftest::test_location_wrappers): Add more test
9685         coverage.
9687 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9689         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9690         (selftest::test_bit_in_range): Likewise.
9692 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9694         PR testsuite/83888
9695         * doc/sourcebuild.texi (vect_float): Say that the selector
9696         only describes the situation when -funsafe-math-optimizations is on.
9697         (vect_float_strict): Document.
9699 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9701         PR tree-optimization/83965
9702         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9703         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9704         instead of checking only for a reduction.
9705         (vect_recog_widen_sum_pattern): Likewise.
9707 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9709         * predict.c (probably_never_executed): Only use precise profile info.
9710         (compute_function_frequency): Skip after inlining hack since we now
9711         have quality checking.
9713 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9715         * profile-count.h (profile_probability::very_unlikely,
9716         profile_probability::unlikely, profile_probability::even): Set
9717         precision to guessed.
9719 2018-01-23  Richard Biener  <rguenther@suse.de>
9721         PR tree-optimization/83963
9722         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9723         Properly terminate dominator walk when crossing the exit edge not
9724         when visiting its source block.
9726 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9728         PR c++/83918
9729         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9730         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9732 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9734         PR tree-optimization/83957
9735         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9736         semicolon after for body surrounded by braces.
9738         PR tree-optimization/83081
9739         * profile-count.h (profile_probability::split): New method.
9740         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9741         Use profile_probability::split.
9742         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9743         when splitting a single conditional jump into 2.
9745 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9747         PR tree-optimization/69452
9748         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9749         decl.
9751 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9753         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9754         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9755         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9757 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9759         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9760         * config/rl78/rl78.md (movdi): New define_expand.
9761         * config/rl78/rl78.c (rl78_split_movdi): New function.
9763 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9765         PR target/83862
9766         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9767         no longer used.
9768         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9769         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9770         128-bit to produce an UNSPEC move to get the double word with the
9771         signbit and then a shift directly to do signbit.
9772         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9773         implementation with a new version that just does either a direct
9774         move or a regular move.  Move memory interface to separate insns.
9775         Move insns so they are next to the expander.
9776         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9777         with signbit move.  Split big and little endian case.
9778         (signbit<mode>2_dm_mem_le): Likewise.
9779         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9780         (signbit<mode>2_dm2): Likewise.
9782 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9784         * config/rl78/rl78.md (anddi3): New define_expand.
9786 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9788         * config/rl78/rl78.md (umindi3): New define_expand.
9790 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9792         * config/rl78/rl78.md (smindi3): New define_expand.
9794 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9796         * config/rl78/rl78.md (smaxdi3): New define_expand.
9798 2018-01-22  Carl Love  <cel@us.ibm.com>
9800         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9801         LVX_V1TI): Add macro expansion.
9802         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9803         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9804         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9805         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9806         Change check to determine if the instruction is a byte reversing
9807         entry.  Fix typo in comment.
9808         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9809         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9810         Add def_builtin calls for new builtins.
9811         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9812         Add define_insn expansion.
9814 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9816         * config/rl78/rl78.md (umaxdi3): New define_expand.
9818 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9820         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9821         for non-QImode registers.
9823 2018-01-22  Richard Biener  <rguenther@suse.de>
9825         PR tree-optimization/83963
9826         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9827         including the loop exit block.
9828         (scop_detection::merge_sese): Likewise.
9829         (scop_detection::add_scop): Do it here instead.
9831 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9833         * doc/sourcebuild.texi (arm_softfloat): Document.
9835 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9837         PR gcc/77734
9838         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9839         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9840         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9842 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9843             David Edelsohn  <dje.gcc@gmail.com>
9845         PR target/83946
9846         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9847         Change "crset eq" to "crset 2".
9848         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9849         (*call_indirect_aix<mode>_nospec): Likewise.
9850         (*call_value_indirect_aix<mode>_nospec): Likewise.
9851         (*call_indirect_elfv2<mode>_nospec): Likewise.
9852         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9853         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9854         change assembly output from . to $.
9855         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9856         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9857         (*tablejump<mode>_internal1_nospec): Likewise.
9859 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9861         PR target/80870
9862         * config/sh/sh_optimize_sett_clrt.cc:
9863         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9865 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9867         PR tree-optimization/83940
9868         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9869         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9870         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9871         use it to pass back the definition type.
9872         (vect_check_store_rhs): Likewise rhs_dt_out.
9873         (vect_build_gather_load_calls): Add a mask_dt argument and use
9874         it instead of a call to vect_is_simple_use.
9875         (vectorizable_store): Update calls to vect_check_load_store_mask
9876         and vect_check_store_rhs.  Use the dt returned by the latter instead
9877         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9878         instead of calls to vect_is_simple_use.  Pass the scalar rather
9879         than the vector operand to vect_is_simple_use when handling
9880         second and subsequent copies of an rhs value.
9881         (vectorizable_load): Update calls to vect_check_load_store_mask
9882         and vect_build_gather_load_calls.  Use the cached mask_dt and
9883         gs_info.offset_dt instead of calls to vect_is_simple_use.
9885 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9887         PR middle-end/83945
9888         * tree-emutls.c: Include gimplify.h.
9889         (lower_emutls_2): New function.
9890         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9891         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9892         it before further processing.
9894         PR target/83930
9895         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9896         UINTVAL (trueop1) instead of INTVAL (op1).
9898 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9900         PR debug/81570
9901         PR debug/83728
9902         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9903         INCOMING_FRAME_SP_OFFSET if not defined.
9904         (scan_trace): Add ENTRY argument.  If true and
9905         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9906         emit a note to adjust the CFA offset.
9907         (create_cfi_notes): Adjust scan_trace callers.
9908         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9909         INCOMING_FRAME_SP_OFFSET in the CIE.
9910         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9911         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9912         Likewise.
9913         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9914         * doc/tm.texi: Regenerated.
9916 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9918         PR rtl-optimization/83147
9919         * lra-constraints.c (remove_inheritance_pseudos): Use
9920         lra_substitute_pseudo_within_insn.
9922 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9923             Cesar Philippidis  <cesar@codesourcery.com>
9925         PR target/83920
9926         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9928 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9930         PR target/83790
9931         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9932         spaces for function labels.
9934 2018-01-19  Martin Liska  <mliska@suse.cz>
9936         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9937         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9938         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9939         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9940         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9941         (PRED_CONST_RETURN): Change from 69 to 65.
9942         (PRED_NULL_RETURN): Change from 91 to 71.
9943         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9944         (PRED_LOOP_GUARD): Change from 66 to 73.
9946 2018-01-19  Martin Liska  <mliska@suse.cz>
9948         * predict.c (predict_insn_def): Add new assert.
9949         (struct branch_predictor): Change type to signed integer.
9950         (test_prediction_value_range): Amend test to cover
9951         PROB_UNINITIALIZED.
9952         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9953         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9954         (PRED_LOOP_ITERATIONS_MAX): Likewise.
9955         (PRED_LOOP_IV_COMPARE): Likewise.
9956         * predict.h (PROB_UNINITIALIZED): Define new constant.
9958 2018-01-19  Martin Liska  <mliska@suse.cz>
9960         * predict.c (dump_prediction): Add new format for
9961         analyze_brprob.py script which is enabled with -details
9962         suboption.
9963         * profile-count.h (precise_p): New function.
9965 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9967         PR tree-optimization/83922
9968         * tree-vect-loop.c (vect_verify_full_masking): Return false if
9969         there are no statements that need masking.
9970         (vect_active_double_reduction_p): New function.
9971         (vect_analyze_loop_operations): Use it when handling phis that
9972         are not in the loop header.
9974 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
9976         PR tree-optimization/83914
9977         * tree-vect-loop.c (vectorizable_induction): Don't convert
9978         init_expr or apply the peeling adjustment for inductions
9979         that are nested within the vectorized loop.
9981 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9983         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9984         instead of NEG.
9986 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
9988         PR sanitizer/81715
9989         PR testsuite/83882
9990         * function.h (gimplify_parameters): Add gimple_seq * argument.
9991         * function.c: Include gimple.h and options.h.
9992         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
9993         for the added local temporaries if needed.
9994         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
9995         if there are any parameter cleanups, wrap whole body into a
9996         try/finally with the cleanups.
9998 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
10000         PR target/82964
10001         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
10002         Use GET_MODE_CLASS for scalar floating point.
10004 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
10006         PR ipa/82256
10007         patch by PaX Team
10008         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
10009         Fix call of call_cgraph_insertion_hooks.
10011 2018-01-18  Martin Sebor  <msebor@redhat.com>
10013         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
10015 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
10017         PR ipa/83619
10018         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
10019         frequencies.
10021 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
10023         PR other/70268
10024         * common.opt: (-ffile-prefix-map): New option.
10025         * opts.c (common_handle_option): Defer it.
10026         * opts-global.c (handle_common_deferred_options): Handle it.
10027         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
10028         * file-prefix-map.h: New file.
10029         (remap_debug_filename, add_debug_prefix_map): ...here.
10030         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
10031         * final.c (debug_prefix_map, add_debug_prefix_map
10032         remap_debug_filename): Move to...
10033         * file-prefix-map.c: New file.
10034         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
10035         generalize, get rid of alloca(), use strrchr() instead of strchr().
10036         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
10037         Implement in terms of add_prefix_map().
10038         (remap_macro_filename, remap_debug_filename): Implement in term of
10039         remap_filename().
10040         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
10041         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
10042         * dbxout.c: Include file-prefix-map.h.
10043         * varasm.c: Likewise.
10044         * vmsdbgout.c: Likewise.
10045         * xcoffout.c: Likewise.
10046         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
10047         * doc/cppopts.texi (-fmacro-prefix-map): Document.
10048         * doc/invoke.texi (-ffile-prefix-map): Document.
10049         (-fdebug-prefix-map): Update description.
10051 2018-01-18  Martin Liska  <mliska@suse.cz>
10053         * config/i386/i386.c (indirect_thunk_name): Document that also
10054         lfence is emitted.
10055         (output_indirect_thunk): Document why both instructions
10056         (pause and lfence) are generated.
10058 2018-01-18  Richard Biener  <rguenther@suse.de>
10060         PR tree-optimization/83887
10061         * graphite-scop-detection.c
10062         (scop_detection::get_nearest_dom_with_single_entry): Remove.
10063         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
10064         (scop_detection::merge_sese): Re-implement with a flood-fill
10065         algorithm that properly finds a SESE region if it exists.
10067 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
10069         PR c/61240
10070         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
10071         pointer_diff optimizations use view_convert instead of convert.
10073 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10075         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10076         Generate different code for -mno-speculate-indirect-jumps.
10077         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10078         (*call_indirect_aix<mode>): Disable for
10079         -mno-speculate-indirect-jumps.
10080         (*call_indirect_aix<mode>_nospec): New define_insn.
10081         (*call_value_indirect_aix<mode>): Disable for
10082         -mno-speculate-indirect-jumps.
10083         (*call_value_indirect_aix<mode>_nospec): New define_insn.
10084         (*sibcall_nonlocal_sysv<mode>): Generate different code for
10085         -mno-speculate-indirect-jumps.
10086         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10088 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
10090         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
10091         long double type, set the flags for noting the default long double
10092         type, even if we don't pass or return a long double type.
10094 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
10096         PR ipa/83051
10097         * ipa-inline.c (flatten_function): Do not overwrite final inlining
10098         failure.
10100 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
10102         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
10103         support for merge[hl].
10104         (fold_mergehl_helper): New helper function.
10105         (tree-vector-builder.h): New #include for tree_vector_builder usage.
10106         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
10107         (altivec_vmrglw_direct): Add xxmrglw insn.
10109 2018-01-17  Andrew Waterman  <andrew@sifive.com>
10111         * config/riscv/riscv.c (riscv_conditional_register_usage): If
10112         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
10114 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
10116         PR lto/83121
10117         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
10118         call the lto_location_cache before reading the
10119         DECL_SOURCE_LOCATION of the types.
10121 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
10122             Richard Sandiford  <richard.sandiford@linaro.org>
10124         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
10125         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
10126         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
10127         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
10128         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
10129         Add declaration.
10130         * config/aarch64/constraints.md (aarch64_movti_operand):
10131         Limit immediates.
10132         * config/aarch64/predicates.md (Uti): Add new constraint.
10134 2018-01-17 Carl Love  <cel@us.ibm.com>
10136         * config/rs6000/vsx.md (define_expand xl_len_r,
10137         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
10138         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
10139         lxvll.
10140         (define_expand, define_insn): Move the shift left from  the
10141         define_insn to the define_expand for lxvl and stxvl instructions.
10142         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
10143         and XL_LEN_R definitions to PURE.
10145 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
10147         * config/i386/i386.c (indirect_thunk_name): Declare regno
10148         as unsigned int.  Compare regno with INVALID_REGNUM.
10149         (output_indirect_thunk): Ditto.
10150         (output_indirect_thunk_function): Ditto.
10151         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
10152         in the call to output_indirect_thunk_function.
10154 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
10156         PR middle-end/83884
10157         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
10158         rather than the size of inner_type to determine the stack slot size
10159         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
10161 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
10163         PR target/83546
10164         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
10165         to PTA_SILVERMONT.
10167 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
10169         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
10170         endian Linux systems to optionally enable multilibs for selecting
10171         the long double type if the user configured an explicit type.
10172         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
10173         have no long double multilibs if not defined.
10174         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
10175         warn if the user used -mabi={ieee,ibm}longdouble and we built
10176         multilibs for long double.
10177         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
10178         appropriate multilib option.
10179         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
10180         multilib options.
10181         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
10182         for building long double multilibs.
10183         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
10185 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
10187         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
10188         copies.
10190         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
10191         64 bits.
10192         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
10193         128 bits.
10195         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
10196         variables.
10198         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
10199         return value.
10201 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10203         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
10204         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
10206 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10208         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
10209         different rtl trees depending on TARGET_64BIT.
10210         (rs6000_gen_lvx): Likewise.
10212 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10214         * config/visium/visium.md (nop): Tweak comment.
10215         (hazard_nop): Likewise.
10217 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10219         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
10220         -mspeculate-indirect-jumps.
10221         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
10222         for -mno-speculate-indirect-jumps.
10223         (*call_indirect_elfv2<mode>_nospec): New define_insn.
10224         (*call_value_indirect_elfv2<mode>): Disable for
10225         -mno-speculate-indirect-jumps.
10226         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
10227         (indirect_jump): Emit different RTL for
10228         -mno-speculate-indirect-jumps.
10229         (*indirect_jump<mode>): Disable for
10230         -mno-speculate-indirect-jumps.
10231         (*indirect_jump<mode>_nospec): New define_insn.
10232         (tablejump): Emit different RTL for
10233         -mno-speculate-indirect-jumps.
10234         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
10235         (tablejumpsi_nospec): New define_expand.
10236         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
10237         (tablejumpdi_nospec): New define_expand.
10238         (*tablejump<mode>_internal1): Disable for
10239         -mno-speculate-indirect-jumps.
10240         (*tablejump<mode>_internal1_nospec): New define_insn.
10241         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
10242         option.
10244 2018-01-16  Artyom Skrobov tyomitch@gmail.com
10246         * caller-save.c (insert_save): Drop unnecessary parameter.  All
10247         callers updated.
10249 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10250             Richard Biener  <rguenth@suse.de>
10252         PR libgomp/83590
10253         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
10254         return early, inline manually is_gimple_sizepos.  Make sure if we
10255         call gimplify_expr we don't end up with a gimple constant.
10256         * tree.c (variably_modified_type_p): Don't return true for
10257         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
10258         * gimplify.h (is_gimple_sizepos): Remove.
10260 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10262         PR tree-optimization/83857
10263         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
10264         vectorizable_live_operation for pure SLP statements.
10265         (vectorizable_live_operation): Handle PHIs.
10267 2018-01-16  Richard Biener  <rguenther@suse.de>
10269         PR tree-optimization/83867
10270         * tree-vect-stmts.c (vect_transform_stmt): Precompute
10271         nested_in_vect_loop_p since the scalar stmt may get invalidated.
10273 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10275         PR c/83844
10276         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
10277         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
10278         If off is not INTEGER_CST, issue a may not be aligned warning
10279         rather than isn't aligned.  Use isn%'t rather than isn't.
10280         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
10281         into MULT_EXPR.
10282         <case MULT_EXPR>: Improve the case when bottom and one of the
10283         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
10284         operand, in that case check if the other operand is multiple of
10285         bottom divided by the INTEGER_CST operand.
10287 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10289         PR target/83858
10290         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
10291         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
10292         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
10293         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
10294         * config/pa/pa.c (pa_function_arg_advance): Likewise.
10295         (pa_function_arg, pa_arg_partial_bytes): Likewise.
10296         (pa_function_arg_size): New function.
10298 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10300         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
10301         in a separate statement.
10303 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10305         PR tree-optimization/83847
10306         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
10307         group gathers and scatters.
10309 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10311         PR rtl-optimization/86620
10312         * params.def (max-sched-ready-insns): Bump minimum value to 1.
10314         PR rtl-optimization/83213
10315         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
10316         to last if both are JUMP_INSNs.
10318         PR tree-optimization/83843
10319         * gimple-ssa-store-merging.c
10320         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
10321         store_immediate_info for bswap/nop orig_stores.
10323 2018-01-15  Andrew Waterman  <andrew@sifive.com>
10325         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
10326         !TARGET_MUL.
10327         <UDIV>: Increase cost if !TARGET_DIV.
10329 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
10331         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
10332         (define_attr "cr_logical_3op"): New.
10333         (cceq_ior_compare): Adjust.
10334         (cceq_ior_compare_complement): Adjust.
10335         (*cceq_rev_compare): Adjust.
10336         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
10337         (is_cracked_insn): Adjust.
10338         (insn_must_be_first_in_group): Adjust.
10339         * config/rs6000/40x.md: Adjust.
10340         * config/rs6000/440.md: Adjust.
10341         * config/rs6000/476.md: Adjust.
10342         * config/rs6000/601.md: Adjust.
10343         * config/rs6000/603.md: Adjust.
10344         * config/rs6000/6xx.md: Adjust.
10345         * config/rs6000/7450.md: Adjust.
10346         * config/rs6000/7xx.md: Adjust.
10347         * config/rs6000/8540.md: Adjust.
10348         * config/rs6000/cell.md: Adjust.
10349         * config/rs6000/e300c2c3.md: Adjust.
10350         * config/rs6000/e500mc.md: Adjust.
10351         * config/rs6000/e500mc64.md: Adjust.
10352         * config/rs6000/e5500.md: Adjust.
10353         * config/rs6000/e6500.md: Adjust.
10354         * config/rs6000/mpc.md: Adjust.
10355         * config/rs6000/power4.md: Adjust.
10356         * config/rs6000/power5.md: Adjust.
10357         * config/rs6000/power6.md: Adjust.
10358         * config/rs6000/power7.md: Adjust.
10359         * config/rs6000/power8.md: Adjust.
10360         * config/rs6000/power9.md: Adjust.
10361         * config/rs6000/rs64.md: Adjust.
10362         * config/rs6000/titan.md: Adjust.
10364 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10366         * config/i386/predicates.md (indirect_branch_operand): Rewrite
10367         ix86_indirect_branch_register logic.
10369 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10371         * config/i386/constraints.md (Bs): Update
10372         ix86_indirect_branch_register check.  Don't check
10373         ix86_indirect_branch_register with GOT_memory_operand.
10374         (Bw): Likewise.
10375         * config/i386/predicates.md (GOT_memory_operand): Don't check
10376         ix86_indirect_branch_register here.
10377         (GOT32_symbol_operand): Likewise.
10379 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10381         * config/i386/predicates.md (constant_call_address_operand):
10382         Rewrite ix86_indirect_branch_register logic.
10383         (sibcall_insn_operand): Likewise.
10385 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10387         * config/i386/constraints.md (Bs): Replace
10388         ix86_indirect_branch_thunk_register with
10389         ix86_indirect_branch_register.
10390         (Bw): Likewise.
10391         * config/i386/i386.md (indirect_jump): Likewise.
10392         (tablejump): Likewise.
10393         (*sibcall_memory): Likewise.
10394         (*sibcall_value_memory): Likewise.
10395         Peepholes of indirect call and jump via memory: Likewise.
10396         * config/i386/i386.opt: Likewise.
10397         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10398         (GOT_memory_operand): Likewise.
10399         (call_insn_operand): Likewise.
10400         (sibcall_insn_operand): Likewise.
10401         (GOT32_symbol_operand): Likewise.
10403 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10405         PR middle-end/83837
10406         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
10407         type rather than type addr's type points to.
10408         (expand_omp_atomic_mutex): Likewise.
10409         (expand_omp_atomic): Likewise.
10411 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10413         PR target/83839
10414         * config/i386/i386.c (output_indirect_thunk_function): Use
10415         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
10416         for  __x86_return_thunk.
10418 2018-01-15  Richard Biener  <rguenther@suse.de>
10420         PR middle-end/83850
10421         * expmed.c (extract_bit_field_1): Fix typo.
10423 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10425         PR target/83687
10426         * config/arm/iterators.md (VF): New mode iterator.
10427         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
10428         Remove integer-related logic from pattern.
10429         (neon_vabd<mode>_3): Likewise.
10431 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10433         PR middle-end/82694
10434         * common.opt (fstrict-overflow): No longer an alias.
10435         (fwrapv-pointer): New option.
10436         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10437         also for pointer types based on flag_wrapv_pointer.
10438         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10439         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10440         opts->x_flag_wrapv got set.
10441         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10442         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10443         POINTER_TYPE_OVERFLOW_UNDEFINED.
10444         * match.pd: Likewise in address comparison pattern.
10445         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10447 2018-01-15  Richard Biener  <rguenther@suse.de>
10449         PR lto/83804
10450         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10451         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
10452         Reset type names to their identifier if their TYPE_DECL doesn't
10453         have linkage (and thus is used for ODR and devirt).
10454         (save_debug_info_for_decl): Remove.
10455         (save_debug_info_for_type): Likewise.
10456         (add_tree_to_fld_list): Adjust.
10457         * tree-pretty-print.c (dump_generic_node): Make dumping of
10458         type names more robust.
10460 2018-01-15  Richard Biener  <rguenther@suse.de>
10462         * BASE-VER: Bump to 8.0.1.
10464 2018-01-14  Martin Sebor  <msebor@redhat.com>
10466         PR other/83508
10467         * builtins.c (check_access): Avoid warning when the no-warning bit
10468         is set.
10470 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
10472         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10473         * ira-color (allocno_hard_regs_compare): Likewise.
10475 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
10477         PR target/83013
10478         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10479         Use .pushsection/.popsection.
10481 2018-01-14  Martin Sebor  <msebor@redhat.com>
10483         PR c++/81327
10484         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10486 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
10488         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
10489         entry from extra_headers.
10490         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
10491         extra_headers, make the list bitwise identical to the i?86-*-* one.
10493 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10495         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
10496         -mcmodel=large with -mindirect-branch=thunk,
10497         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
10498         -mfunction-return=thunk-extern.
10499         * doc/invoke.texi: Document -mcmodel=large is incompatible with
10500         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
10501         -mfunction-return=thunk and -mfunction-return=thunk-extern.
10503 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10505         * config/i386/i386.c (print_reg): Print the name of the full
10506         integer register without '%'.
10507         (ix86_print_operand): Handle 'V'.
10508          * doc/extend.texi: Document 'V' modifier.
10510 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10512         * config/i386/constraints.md (Bs): Disallow memory operand for
10513         -mindirect-branch-register.
10514         (Bw): Likewise.
10515         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10516         (GOT_memory_operand): Likewise.
10517         (call_insn_operand): Likewise.
10518         (sibcall_insn_operand): Likewise.
10519         (GOT32_symbol_operand): Likewise.
10520         * config/i386/i386.md (indirect_jump): Call convert_memory_address
10521         for -mindirect-branch-register.
10522         (tablejump): Likewise.
10523         (*sibcall_memory): Likewise.
10524         (*sibcall_value_memory): Likewise.
10525         Disallow peepholes of indirect call and jump via memory for
10526         -mindirect-branch-register.
10527         (*call_pop): Replace m with Bw.
10528         (*call_value_pop): Likewise.
10529         (*sibcall_pop_memory): Replace m with Bs.
10530         * config/i386/i386.opt (mindirect-branch-register): New option.
10531         * doc/invoke.texi: Document -mindirect-branch-register option.
10533 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10535         * config/i386/i386-protos.h (ix86_output_function_return): New.
10536         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
10537         set function_return_type.
10538         (indirect_thunk_name): Add ret_p to indicate thunk for function
10539         return.
10540         (output_indirect_thunk_function): Pass false to
10541         indirect_thunk_name.
10542         (ix86_output_indirect_branch_via_reg): Likewise.
10543         (ix86_output_indirect_branch_via_push): Likewise.
10544         (output_indirect_thunk_function): Create alias for function
10545         return thunk if regno < 0.
10546         (ix86_output_function_return): New function.
10547         (ix86_handle_fndecl_attribute): Handle function_return.
10548         (ix86_attribute_table): Add function_return.
10549         * config/i386/i386.h (machine_function): Add
10550         function_return_type.
10551         * config/i386/i386.md (simple_return_internal): Use
10552         ix86_output_function_return.
10553         (simple_return_internal_long): Likewise.
10554         * config/i386/i386.opt (mfunction-return=): New option.
10555         (indirect_branch): Mention -mfunction-return=.
10556         * doc/extend.texi: Document function_return function attribute.
10557         * doc/invoke.texi: Document -mfunction-return= option.
10559 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10561         * config/i386/i386-opts.h (indirect_branch): New.
10562         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10563         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10564         with local indirect jump when converting indirect call and jump.
10565         (ix86_set_indirect_branch_type): New.
10566         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10567         (indirectlabelno): New.
10568         (indirect_thunk_needed): Likewise.
10569         (indirect_thunk_bnd_needed): Likewise.
10570         (indirect_thunks_used): Likewise.
10571         (indirect_thunks_bnd_used): Likewise.
10572         (INDIRECT_LABEL): Likewise.
10573         (indirect_thunk_name): Likewise.
10574         (output_indirect_thunk): Likewise.
10575         (output_indirect_thunk_function): Likewise.
10576         (ix86_output_indirect_branch_via_reg): Likewise.
10577         (ix86_output_indirect_branch_via_push): Likewise.
10578         (ix86_output_indirect_branch): Likewise.
10579         (ix86_output_indirect_jmp): Likewise.
10580         (ix86_code_end): Call output_indirect_thunk_function if needed.
10581         (ix86_output_call_insn): Call ix86_output_indirect_branch if
10582         needed.
10583         (ix86_handle_fndecl_attribute): Handle indirect_branch.
10584         (ix86_attribute_table): Add indirect_branch.
10585         * config/i386/i386.h (machine_function): Add indirect_branch_type
10586         and has_local_indirect_jump.
10587         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10588         to true.
10589         (tablejump): Likewise.
10590         (*indirect_jump): Use ix86_output_indirect_jmp.
10591         (*tablejump_1): Likewise.
10592         (simple_return_indirect_internal): Likewise.
10593         * config/i386/i386.opt (mindirect-branch=): New option.
10594         (indirect_branch): New.
10595         (keep): Likewise.
10596         (thunk): Likewise.
10597         (thunk-inline): Likewise.
10598         (thunk-extern): Likewise.
10599         * doc/extend.texi: Document indirect_branch function attribute.
10600         * doc/invoke.texi: Document -mindirect-branch= option.
10602 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
10604         PR ipa/83051
10605         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10607 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
10609         * ipa-inline.c (want_inline_small_function_p): Return false if
10610         inlining has already failed with CIF_FINAL_ERROR.
10611         (update_caller_keys): Call want_inline_small_function_p before
10612         can_inline_edge_p.
10613         (update_callee_keys): Likewise.
10615 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10617         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10618         New function.
10619         (rs6000_quadword_masked_address_p): Likewise.
10620         (quad_aligned_load_p): Likewise.
10621         (quad_aligned_store_p): Likewise.
10622         (const_load_sequence_p): Add comment to describe the outer-most loop.
10623         (mimic_memory_attributes_and_flags): New function.
10624         (rs6000_gen_stvx): Likewise.
10625         (replace_swapped_aligned_store): Likewise.
10626         (rs6000_gen_lvx): Likewise.
10627         (replace_swapped_aligned_load): Likewise.
10628         (replace_swapped_load_constant): Capitalize argument name in
10629         comment describing this function.
10630         (rs6000_analyze_swaps): Add a third pass to search for vector loads
10631         and stores that access quad-word aligned addresses and replace
10632         with stvx or lvx instructions when appropriate.
10633         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10634         New function prototype.
10635         (rs6000_quadword_masked_address_p): Likewise.
10636         (rs6000_gen_lvx): Likewise.
10637         (rs6000_gen_stvx): Likewise.
10638         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10639         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10640         when memory address is aligned.
10641         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10642         this split to select lvx instruction when memory address is aligned.
10643         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10644         instruction when memory address is aligned.
10645         (*vsx_le_perm_load_v16qi): Likewise.
10646         (four unnamed splitters): Modify to select the stvx instruction
10647         when memory is aligned.
10649 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
10651         * predict.c (determine_unlikely_bbs): Handle correctly BBs
10652         which appears in the queue multiple times.
10654 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10655             Alan Hayward  <alan.hayward@arm.com>
10656             David Sherwood  <david.sherwood@arm.com>
10658         * tree-vectorizer.h (vec_lower_bound): New structure.
10659         (_loop_vec_info): Add check_nonzero and lower_bounds.
10660         (LOOP_VINFO_CHECK_NONZERO): New macro.
10661         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10662         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10663         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10664         fields.  Make seg_len the distance travelled, not including the
10665         access size.
10666         (dr_direction_indicator): Declare.
10667         (dr_zero_step_indicator): Likewise.
10668         (dr_known_forward_stride_p): Likewise.
10669         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10670         tree-ssanames.h.
10671         (runtime_alias_check_p): Allow runtime alias checks with
10672         variable strides.
10673         (operator ==): Compare access_size and align.
10674         (prune_runtime_alias_test_list): Rework for new distinction between
10675         the access_size and seg_len.
10676         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10677         segment lengths.
10678         (get_segment_min_max): New function.
10679         (create_intersect_range_checks): Use it.
10680         (dr_step_indicator): New function.
10681         (dr_direction_indicator): Likewise.
10682         (dr_zero_step_indicator): Likewise.
10683         (dr_known_forward_stride_p): Likewise.
10684         * tree-loop-distribution.c (data_ref_segment_size): Return
10685         DR_STEP * (niters - 1).
10686         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10687         constructor.
10688         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10689         (vect_preserves_scalar_order_p): New function, split out from...
10690         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10691         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10692         (vect_vfa_access_size): New function.
10693         (vect_vfa_align): Likewise.
10694         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10695         (dump_lower_bound): New function.
10696         (vect_check_lower_bound): Likewise.
10697         (vect_small_gap_p): Likewise.
10698         (vectorizable_with_step_bound_p): Likewise.
10699         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10700         depencies if the vectorization factor is 1.  Convert the checks
10701         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10702         a bunds check for variable steps if the minimum required step is
10703         relatively small. Update calls to the dr_with_seg_len
10704         constructor and to vect_compile_time_alias.
10705         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10706         function.
10707         (vect_loop_versioning): Call it.
10708         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10709         when retrying.
10710         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10712 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10713             Alan Hayward  <alan.hayward@arm.com>
10714             David Sherwood  <david.sherwood@arm.com>
10716         * doc/sourcebuild.texi (vect_scatter_store): Document.
10717         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10718         optabs.
10719         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10720         Document.
10721         * genopinit.c (main): Add supports_vec_scatter_store and
10722         supports_vec_scatter_store_cached to target_optabs.
10723         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10724         IFN_MASK_SCATTER_STORE.
10725         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10726         functions.
10727         * internal-fn.h (internal_store_fn_p): Declare.
10728         (internal_fn_stored_value_index): Likewise.
10729         * internal-fn.c (scatter_store_direct): New macro.
10730         (expand_scatter_store_optab_fn): New function.
10731         (direct_scatter_store_optab_supported_p): New macro.
10732         (internal_store_fn_p): New function.
10733         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10734         IFN_MASK_SCATTER_STORE.
10735         (internal_fn_mask_index): Likewise.
10736         (internal_fn_stored_value_index): New function.
10737         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10738         for scatter stores.
10739         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10740         * optabs-query.c (supports_vec_scatter_store_p): New function.
10741         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10742         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10743         true for scatter stores.
10744         (vect_gather_scatter_fn_p): Handle scatter stores too.
10745         (vect_check_gather_scatter): Consider using scatter stores if
10746         supports_vec_scatter_store_p.
10747         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10748         scatter stores too.
10749         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10750         internal_fn_stored_value_index.
10751         (check_load_store_masking): Handle scatter stores too.
10752         (vect_get_store_rhs): Make public.
10753         (vectorizable_call): Use internal_store_fn_p.
10754         (vectorizable_store): Handle scatter store internal functions.
10755         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10756         when deciding whether the end of the group has been reached.
10757         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10758         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10759         (mask_scatter_store<mode>): New insns.
10761 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10762             Alan Hayward  <alan.hayward@arm.com>
10763             David Sherwood  <david.sherwood@arm.com>
10765         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10766         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10767         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10768         function.
10769         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10770         Use vect_truncate_gather_scatter_offset if we can't treat the
10771         operation as a normal gather load or scatter store.
10772         (get_group_load_store_type): Take the gather_scatter_info
10773         as argument.  Try using a gather load or scatter store for
10774         single-element groups.
10775         (get_load_store_type): Update calls to get_group_load_store_type
10776         and vect_use_strided_gather_scatters_p.
10778 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10779             Alan Hayward  <alan.hayward@arm.com>
10780             David Sherwood  <david.sherwood@arm.com>
10782         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10783         optional tree argument.
10784         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10785         null target hooks.
10786         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10787         but continue to use the current value as a fallback.
10788         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10789         to compare the updates.
10790         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10791         (get_load_store_type): Use it when handling a strided access.
10792         (vect_get_strided_load_store_ops): New function.
10793         (vect_get_data_ptr_increment): Likewise.
10794         (vectorizable_load): Handle strided gather loads.  Always pass
10795         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10797 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10798             Alan Hayward  <alan.hayward@arm.com>
10799             David Sherwood  <david.sherwood@arm.com>
10801         * doc/md.texi (gather_load@var{m}): Document.
10802         (mask_gather_load@var{m}): Likewise.
10803         * genopinit.c (main): Add supports_vec_gather_load and
10804         supports_vec_gather_load_cached to target_optabs.
10805         * optabs-tree.c (init_tree_optimization_optabs): Use
10806         ggc_cleared_alloc to allocate target_optabs.
10807         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10808         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10809         functions.
10810         * internal-fn.h (internal_load_fn_p): Declare.
10811         (internal_gather_scatter_fn_p): Likewise.
10812         (internal_fn_mask_index): Likewise.
10813         (internal_gather_scatter_fn_supported_p): Likewise.
10814         * internal-fn.c (gather_load_direct): New macro.
10815         (expand_gather_load_optab_fn): New function.
10816         (direct_gather_load_optab_supported_p): New macro.
10817         (direct_internal_fn_optab): New function.
10818         (internal_load_fn_p): Likewise.
10819         (internal_gather_scatter_fn_p): Likewise.
10820         (internal_fn_mask_index): Likewise.
10821         (internal_gather_scatter_fn_supported_p): Likewise.
10822         * optabs-query.c (supports_at_least_one_mode_p): New function.
10823         (supports_vec_gather_load_p): Likewise.
10824         * optabs-query.h (supports_vec_gather_load_p): Declare.
10825         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10826         and memory_type field.
10827         (NUM_PATTERNS): Bump to 15.
10828         * tree-vect-data-refs.c: Include internal-fn.h.
10829         (vect_gather_scatter_fn_p): New function.
10830         (vect_describe_gather_scatter_call): Likewise.
10831         (vect_check_gather_scatter): Try using internal functions for
10832         gather loads.  Recognize existing calls to a gather load function.
10833         (vect_analyze_data_refs): Consider using gather loads if
10834         supports_vec_gather_load_p.
10835         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10836         (vect_get_gather_scatter_offset_type): Likewise.
10837         (vect_convert_mask_for_vectype): Likewise.
10838         (vect_add_conversion_to_patterm): Likewise.
10839         (vect_try_gather_scatter_pattern): Likewise.
10840         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10841         (vect_vect_recog_func_ptrs): Add it.
10842         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10843         internal_fn_mask_index and internal_gather_scatter_fn_p.
10844         (check_load_store_masking): Take the gather_scatter_info as an
10845         argument and handle gather loads.
10846         (vect_get_gather_scatter_ops): New function.
10847         (vectorizable_call): Check internal_load_fn_p.
10848         (vectorizable_load): Likewise.  Handle gather load internal
10849         functions.
10850         (vectorizable_store): Update call to check_load_store_masking.
10851         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10852         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10853         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10854         (aarch64_gather_scale_operand_d): New predicates.
10855         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10856         (mask_gather_load<mode>): New insns.
10858 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10859             Alan Hayward  <alan.hayward@arm.com>
10860             David Sherwood  <david.sherwood@arm.com>
10862         * optabs.def (fold_left_plus_optab): New optab.
10863         * doc/md.texi (fold_left_plus_@var{m}): Document.
10864         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10865         * internal-fn.c (fold_left_direct): Define.
10866         (expand_fold_left_optab_fn): Likewise.
10867         (direct_fold_left_optab_supported_p): Likewise.
10868         * fold-const-call.c (fold_const_fold_left): New function.
10869         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10870         * tree-parloops.c (valid_reduction_p): New function.
10871         (gather_scalar_reductions): Use it.
10872         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10873         (vect_finish_replace_stmt): Declare.
10874         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10875         (needs_fold_left_reduction_p): New function, split out from...
10876         (vect_is_simple_reduction): ...here.  Accept reductions that
10877         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10878         (vect_force_simple_reduction): Also store the reduction type in
10879         the assignment's STMT_VINFO_REDUC_TYPE.
10880         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10881         (merge_with_identity): New function.
10882         (vect_expand_fold_left): Likewise.
10883         (vectorize_fold_left_reduction): Likewise.
10884         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10885         scalar phi in place for it.  Check for target support and reject
10886         cases that would reassociate the operation.  Defer the transform
10887         phase to vectorize_fold_left_reduction.
10888         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10889         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10890         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10892 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10894         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10895         call to ifc_temp_var.
10897 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10898             Alan Hayward  <alan.hayward@arm.com>
10899             David Sherwood  <david.sherwood@arm.com>
10901         * target.def (legitimize_address_displacement): Take the original
10902         offset as a poly_int.
10903         * targhooks.h (default_legitimize_address_displacement): Update
10904         accordingly.
10905         * targhooks.c (default_legitimize_address_displacement): Likewise.
10906         * doc/tm.texi: Regenerate.
10907         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10908         as an argument, moving assert of ad->disp == ad->disp_term to...
10909         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10910         Try calling targetm.legitimize_address_displacement before expanding
10911         the address rather than afterwards, and adjust for the new interface.
10912         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10913         Match the new hook interface.  Handle SVE addresses.
10914         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10915         new hook interface.
10917 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10919         * Makefile.in (OBJS): Add early-remat.o.
10920         * target.def (select_early_remat_modes): New hook.
10921         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10922         * doc/tm.texi: Regenerate.
10923         * targhooks.h (default_select_early_remat_modes): Declare.
10924         * targhooks.c (default_select_early_remat_modes): New function.
10925         * timevar.def (TV_EARLY_REMAT): New timevar.
10926         * passes.def (pass_early_remat): New pass.
10927         * tree-pass.h (make_pass_early_remat): Declare.
10928         * early-remat.c: New file.
10929         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10930         function.
10931         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10933 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10934             Alan Hayward  <alan.hayward@arm.com>
10935             David Sherwood  <david.sherwood@arm.com>
10937         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10938         vfm1 with a bound_epilog parameter.
10939         (vect_do_peeling): Update calls accordingly, and move the prologue
10940         call earlier in the function.  Treat the base bound_epilog as 0 for
10941         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
10942         this base when peeling for gaps.
10943         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10944         with fully-masked loops.
10945         (vect_estimate_min_profitable_iters): Handle the single peeled
10946         iteration in that case.
10948 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10949             Alan Hayward  <alan.hayward@arm.com>
10950             David Sherwood  <david.sherwood@arm.com>
10952         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10953         single-element interleaving even if the size is not a power of 2.
10954         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10955         accesses for single-element interleaving if the group size is
10956         not a power of 2.
10958 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10959             Alan Hayward  <alan.hayward@arm.com>
10960             David Sherwood  <david.sherwood@arm.com>
10962         * doc/md.texi (fold_extract_last_@var{m}): Document.
10963         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10964         * optabs.def (fold_extract_last_optab): New optab.
10965         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10966         * internal-fn.c (fold_extract_direct): New macro.
10967         (expand_fold_extract_optab_fn): Likewise.
10968         (direct_fold_extract_optab_supported_p): Likewise.
10969         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10970         * tree-vect-loop.c (vect_model_reduction_cost): Handle
10971         EXTRACT_LAST_REDUCTION.
10972         (get_initial_def_for_reduction): Do not create an initial vector
10973         for EXTRACT_LAST_REDUCTION reductions.
10974         (vectorizable_reduction): Leave the scalar phi in place for
10975         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
10976         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
10977         epilogue code for EXTRACT_LAST_REDUCTION and defer the
10978         transform phase to vectorizable_condition.
10979         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10980         split out from...
10981         (vect_finish_stmt_generation): ...here.
10982         (vect_finish_replace_stmt): New function.
10983         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10984         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10985         pattern.
10986         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
10988 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10989             Alan Hayward  <alan.hayward@arm.com>
10990             David Sherwood  <david.sherwood@arm.com>
10992         * doc/md.texi (extract_last_@var{m}): Document.
10993         * optabs.def (extract_last_optab): New optab.
10994         * internal-fn.def (EXTRACT_LAST): New internal function.
10995         * internal-fn.c (cond_unary_direct): New macro.
10996         (expand_cond_unary_optab_fn): Likewise.
10997         (direct_cond_unary_optab_supported_p): Likewise.
10998         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
10999         loops using EXTRACT_LAST.
11000         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
11001         (extract_last_<mode>): ...this optab.
11002         (vec_extract<mode><Vel>): Update accordingly.
11004 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11005             Alan Hayward  <alan.hayward@arm.com>
11006             David Sherwood  <david.sherwood@arm.com>
11008         * target.def (empty_mask_is_expensive): New hook.
11009         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
11010         * doc/tm.texi: Regenerate.
11011         * targhooks.h (default_empty_mask_is_expensive): Declare.
11012         * targhooks.c (default_empty_mask_is_expensive): New function.
11013         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
11014         if the target says that empty masks are expensive.
11015         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
11016         New function.
11017         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
11019 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11020             Alan Hayward  <alan.hayward@arm.com>
11021             David Sherwood  <david.sherwood@arm.com>
11023         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
11024         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
11025         (vect_use_loop_mask_for_alignment_p): New function.
11026         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
11027         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
11028         niters_skip argument.  Make sure that the first niters_skip elements
11029         of the first iteration are inactive.
11030         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
11031         Update call to vect_set_loop_masks_directly.
11032         (get_misalign_in_elems): New function, split out from...
11033         (vect_gen_prolog_loop_niters): ...here.
11034         (vect_update_init_of_dr): Take a code argument that specifies whether
11035         the adjustment should be added or subtracted.
11036         (vect_update_init_of_drs): Likewise.
11037         (vect_prepare_for_masked_peels): New function.
11038         (vect_do_peeling): Skip prologue peeling if we're using a mask
11039         instead.  Update call to vect_update_inits_of_drs.
11040         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11041         mask_skip_niters.
11042         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
11043         alignment.  Do not include the number of peeled iterations in
11044         the minimum threshold in that case.
11045         (vectorizable_induction): Adjust the start value down by
11046         LOOP_VINFO_MASK_SKIP_NITERS iterations.
11047         (vect_transform_loop): Call vect_prepare_for_masked_peels.
11048         Take the number of skipped iterations into account when calculating
11049         the loop bounds.
11050         * tree-vect-stmts.c (vect_gen_while_not): New function.
11052 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11053             Alan Hayward  <alan.hayward@arm.com>
11054             David Sherwood  <david.sherwood@arm.com>
11056         * doc/sourcebuild.texi (vect_fully_masked): Document.
11057         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
11058         default value to 0.
11059         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
11060         split out from...
11061         (vect_analyze_loop_2): ...here. Don't check the vectorization
11062         factor against the number of loop iterations if the loop is
11063         fully-masked.
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         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
11070         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
11071         (dump_groups): Update accordingly.
11072         (iv_use::mem_type): New member variable.
11073         (address_p): New function.
11074         (record_use): Add a mem_type argument and initialize the new
11075         mem_type field.
11076         (record_group_use): Add a mem_type argument.  Use address_p.
11077         Remove obsolete null checks of base_object.  Update call to record_use.
11078         (find_interesting_uses_op): Update call to record_group_use.
11079         (find_interesting_uses_cond): Likewise.
11080         (find_interesting_uses_address): Likewise.
11081         (get_mem_type_for_internal_fn): New function.
11082         (find_address_like_use): Likewise.
11083         (find_interesting_uses_stmt): Try find_address_like_use before
11084         calling find_interesting_uses_op.
11085         (addr_offset_valid_p): Use the iv mem_type field as the type
11086         of the addressed memory.
11087         (add_autoinc_candidates): Likewise.
11088         (get_address_cost): Likewise.
11089         (split_small_address_groups_p): Use address_p.
11090         (split_address_groups): Likewise.
11091         (add_iv_candidate_for_use): Likewise.
11092         (autoinc_possible_for_pair): Likewise.
11093         (rewrite_groups): Likewise.
11094         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
11095         (determine_group_iv_cost): Update after split of USE_ADDRESS.
11096         (get_alias_ptr_type_for_ptr_address): New function.
11097         (rewrite_use_address): Rewrite address uses in calls that were
11098         identified by find_address_like_use.
11100 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11101             Alan Hayward  <alan.hayward@arm.com>
11102             David Sherwood  <david.sherwood@arm.com>
11104         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
11105         TARGET_MEM_REFs.
11106         * gimple-expr.h (is_gimple_addressable: Likewise.
11107         * gimple-expr.c (is_gimple_address): Likewise.
11108         * internal-fn.c (expand_call_mem_ref): New function.
11109         (expand_mask_load_optab_fn): Use it.
11110         (expand_mask_store_optab_fn): Likewise.
11112 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11113             Alan Hayward  <alan.hayward@arm.com>
11114             David Sherwood  <david.sherwood@arm.com>
11116         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
11117         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
11118         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
11119         (cond_umax@var{mode}): Document.
11120         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
11121         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
11122         (cond_umin_optab, cond_umax_optab): New optabs.
11123         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
11124         (COND_IOR, COND_XOR): New internal functions.
11125         * internal-fn.h (get_conditional_internal_fn): Declare.
11126         * internal-fn.c (cond_binary_direct): New macro.
11127         (expand_cond_binary_optab_fn): Likewise.
11128         (direct_cond_binary_optab_supported_p): Likewise.
11129         (get_conditional_internal_fn): New function.
11130         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
11131         Cope with reduction statements that are vectorized as calls rather
11132         than assignments.
11133         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
11134         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
11135         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
11136         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11137         (UNSPEC_COND_EOR): New unspecs.
11138         (optab): Add mappings for them.
11139         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
11140         (sve_int_op, sve_fp_op): New int attributes.
11142 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11143             Alan Hayward  <alan.hayward@arm.com>
11144             David Sherwood  <david.sherwood@arm.com>
11146         * optabs.def (while_ult_optab): New optab.
11147         * doc/md.texi (while_ult@var{m}@var{n}): Document.
11148         * internal-fn.def (WHILE_ULT): New internal function.
11149         * internal-fn.h (direct_internal_fn_supported_p): New override
11150         that takes two types as argument.
11151         * internal-fn.c (while_direct): New macro.
11152         (expand_while_optab_fn): New function.
11153         (convert_optab_supported_p): Likewise.
11154         (direct_while_optab_supported_p): New macro.
11155         * wide-int.h (wi::udiv_ceil): New function.
11156         * tree-vectorizer.h (rgroup_masks): New structure.
11157         (vec_loop_masks): New typedef.
11158         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
11159         and fully_masked_p.
11160         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
11161         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
11162         (vect_max_vf): New function.
11163         (slpeel_make_loop_iterate_ntimes): Delete.
11164         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
11165         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
11166         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
11167         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
11168         internal-fn.h, stor-layout.h and optabs-query.h.
11169         (vect_set_loop_mask): New function.
11170         (add_preheader_seq): Likewise.
11171         (add_header_seq): Likewise.
11172         (interleave_supported_p): Likewise.
11173         (vect_maybe_permute_loop_masks): Likewise.
11174         (vect_set_loop_masks_directly): Likewise.
11175         (vect_set_loop_condition_masked): Likewise.
11176         (vect_set_loop_condition_unmasked): New function, split out from
11177         slpeel_make_loop_iterate_ntimes.
11178         (slpeel_make_loop_iterate_ntimes): Rename to..
11179         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
11180         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
11181         (vect_do_peeling): Update call accordingly.
11182         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
11183         loops.
11184         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11185         mask_compare_type, can_fully_mask_p and fully_masked_p.
11186         (release_vec_loop_masks): New function.
11187         (_loop_vec_info): Use it to free the loop masks.
11188         (can_produce_all_loop_masks_p): New function.
11189         (vect_get_max_nscalars_per_iter): Likewise.
11190         (vect_verify_full_masking): Likewise.
11191         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
11192         retries, and free the mask rgroups before retrying.  Check loop-wide
11193         reasons for disallowing fully-masked loops.  Make the final decision
11194         about whether use a fully-masked loop or not.
11195         (vect_estimate_min_profitable_iters): Do not assume that peeling
11196         for the number of iterations will be needed for fully-masked loops.
11197         (vectorizable_reduction): Disable fully-masked loops.
11198         (vectorizable_live_operation): Likewise.
11199         (vect_halve_mask_nunits): New function.
11200         (vect_double_mask_nunits): Likewise.
11201         (vect_record_loop_mask): Likewise.
11202         (vect_get_loop_mask): Likewise.
11203         (vect_transform_loop): Handle the case in which the final loop
11204         iteration might handle a partial vector.  Call vect_set_loop_condition
11205         instead of slpeel_make_loop_iterate_ntimes.
11206         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
11207         (check_load_store_masking): New function.
11208         (prepare_load_store_mask): Likewise.
11209         (vectorizable_store): Handle fully-masked loops.
11210         (vectorizable_load): Likewise.
11211         (supportable_widening_operation): Use vect_halve_mask_nunits for
11212         booleans.
11213         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
11214         (vect_gen_while): New function.
11215         * config/aarch64/aarch64.md (umax<mode>3): New expander.
11216         (aarch64_uqdec<mode>): New insn.
11218 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11219             Alan Hayward  <alan.hayward@arm.com>
11220             David Sherwood  <david.sherwood@arm.com>
11222         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
11223         (reduc_xor_scal_optab): New optabs.
11224         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
11225         (reduc_xor_scal_@var{m}): Document.
11226         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
11227         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
11228         internal functions.
11229         * fold-const-call.c (fold_const_call): Handle them.
11230         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
11231         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
11232         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
11233         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
11234         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
11235         (UNSPEC_XORV): New unspecs.
11236         (optab): Add entries for them.
11237         (BITWISEV): New int iterator.
11238         (bit_reduc_op): New int attributes.
11240 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11241             Alan Hayward  <alan.hayward@arm.com>
11242             David Sherwood  <david.sherwood@arm.com>
11244         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
11245         * internal-fn.def (VEC_SHL_INSERT): New internal function.
11246         * optabs.def (vec_shl_insert_optab): New optab.
11247         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
11248         (duplicate_and_interleave): Likewise.
11249         * tree-vect-loop.c: Include internal-fn.h.
11250         (neutral_op_for_slp_reduction): New function, split out from
11251         get_initial_defs_for_reduction.
11252         (get_initial_def_for_reduction): Handle option 2 for variable-length
11253         vectors by loading the neutral value into a vector and then shifting
11254         the initial value into element 0.
11255         (get_initial_defs_for_reduction): Replace the code argument with
11256         the neutral value calculated by neutral_op_for_slp_reduction.
11257         Use gimple_build_vector for constant-length vectors.
11258         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
11259         but the first group_size elements have a neutral value.
11260         Use duplicate_and_interleave otherwise.
11261         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
11262         Update call to get_initial_defs_for_reduction.  Handle SLP
11263         reductions for variable-length vectors by creating one vector
11264         result for each scalar result, with the elements associated
11265         with other scalar results stubbed out with the neutral value.
11266         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
11267         Require IFN_VEC_SHL_INSERT for double reductions on
11268         variable-length vectors, or SLP reductions that have
11269         a neutral value.  Require can_duplicate_and_interleave_p
11270         support for variable-length unchained SLP reductions if there
11271         is no neutral value, such as for MIN/MAX reductions.  Also require
11272         the number of vector elements to be a multiple of the number of
11273         SLP statements when doing variable-length unchained SLP reductions.
11274         Update call to vect_create_epilog_for_reduction.
11275         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
11276         and remove initial values.
11277         (duplicate_and_interleave): Make public.
11278         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
11279         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
11281 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11282             Alan Hayward  <alan.hayward@arm.com>
11283             David Sherwood  <david.sherwood@arm.com>
11285         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
11286         (can_duplicate_and_interleave_p): New function.
11287         (vect_get_and_check_slp_defs): Take the vector of statements
11288         rather than just the current one.  Remove excess parentheses.
11289         Restriction rejectinon of vect_constant_def and vect_external_def
11290         for variable-length vectors to boolean types, or types for which
11291         can_duplicate_and_interleave_p is false.
11292         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
11293         (duplicate_and_interleave): New function.
11294         (vect_get_constant_vectors): Use gimple_build_vector for
11295         constant-length vectors and suitable variable-length constant
11296         vectors.  Use duplicate_and_interleave for other variable-length
11297         vectors.  Don't defer the update when inserting new statements.
11299 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11300             Alan Hayward  <alan.hayward@arm.com>
11301             David Sherwood  <david.sherwood@arm.com>
11303         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
11304         min_profitable_iters doesn't go negative.
11306 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11307             Alan Hayward  <alan.hayward@arm.com>
11308             David Sherwood  <david.sherwood@arm.com>
11310         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
11311         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
11312         * optabs.def (vec_mask_load_lanes_optab): New optab.
11313         (vec_mask_store_lanes_optab): Likewise.
11314         * internal-fn.def (MASK_LOAD_LANES): New internal function.
11315         (MASK_STORE_LANES): Likewise.
11316         * internal-fn.c (mask_load_lanes_direct): New macro.
11317         (mask_store_lanes_direct): Likewise.
11318         (expand_mask_load_optab_fn): Handle masked operations.
11319         (expand_mask_load_lanes_optab_fn): New macro.
11320         (expand_mask_store_optab_fn): Handle masked operations.
11321         (expand_mask_store_lanes_optab_fn): New macro.
11322         (direct_mask_load_lanes_optab_supported_p): Likewise.
11323         (direct_mask_store_lanes_optab_supported_p): Likewise.
11324         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
11325         parameter.
11326         (vect_load_lanes_supported): Likewise.
11327         * tree-vect-data-refs.c (strip_conversion): New function.
11328         (can_group_stmts_p): Likewise.
11329         (vect_analyze_data_ref_accesses): Use it instead of checking
11330         for a pair of assignments.
11331         (vect_store_lanes_supported): Take a masked_p parameter.
11332         (vect_load_lanes_supported): Likewise.
11333         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
11334         vect_store_lanes_supported and vect_load_lanes_supported.
11335         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11336         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
11337         parameter.  Don't allow gaps for masked accesses.
11338         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
11339         and vect_load_lanes_supported.
11340         (get_load_store_type): Take a masked_p parameter and update
11341         call to get_group_load_store_type.
11342         (vectorizable_store): Update call to get_load_store_type.
11343         Handle IFN_MASK_STORE_LANES.
11344         (vectorizable_load): Update call to get_load_store_type.
11345         Handle IFN_MASK_LOAD_LANES.
11347 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11348             Alan Hayward  <alan.hayward@arm.com>
11349             David Sherwood  <david.sherwood@arm.com>
11351         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
11352         modes for SVE.
11353         * config/aarch64/aarch64-protos.h
11354         (aarch64_sve_struct_memory_operand_p): Declare.
11355         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
11356         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
11357         (VPRED, vpred): Handle SVE structure modes.
11358         * config/aarch64/constraints.md (Utx): New constraint.
11359         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
11360         (aarch64_sve_struct_nonimmediate_operand): New predicates.
11361         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
11362         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
11363         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
11364         structure modes.  Split into pieces after RA.
11365         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
11366         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
11367         New patterns.
11368         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
11369         SVE structure modes.
11370         (aarch64_classify_address): Likewise.
11371         (sizetochar): Move earlier in file.
11372         (aarch64_print_operand): Handle SVE register lists.
11373         (aarch64_array_mode): New function.
11374         (aarch64_sve_struct_memory_operand_p): Likewise.
11375         (TARGET_ARRAY_MODE): Redefine.
11377 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11378             Alan Hayward  <alan.hayward@arm.com>
11379             David Sherwood  <david.sherwood@arm.com>
11381         * target.def (array_mode): New target hook.
11382         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
11383         * doc/tm.texi: Regenerate.
11384         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
11385         * hooks.c (hook_optmode_mode_uhwi_none): New function.
11386         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
11387         targetm.array_mode.
11388         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
11389         type sizes.
11391 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11392             Alan Hayward  <alan.hayward@arm.com>
11393             David Sherwood  <david.sherwood@arm.com>
11395         * fold-const.c (fold_binary_loc): Check the argument types
11396         rather than the result type when testing for a vector operation.
11398 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11400         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
11401         * doc/tm.texi: Regenerate.
11403 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11404             Alan Hayward  <alan.hayward@arm.com>
11405             David Sherwood  <david.sherwood@arm.com>
11407         * doc/invoke.texi (-msve-vector-bits=): Document new option.
11408         (sve): Document new AArch64 extension.
11409         * doc/md.texi (w): Extend the description of the AArch64
11410         constraint to include SVE vectors.
11411         (Upl, Upa): Document new AArch64 predicate constraints.
11412         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
11413         enum.
11414         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
11415         (msve-vector-bits=): New option.
11416         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
11417         SVE when these are disabled.
11418         (sve): New extension.
11419         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
11420         modes.  Adjust their number of units based on aarch64_sve_vg.
11421         (MAX_BITSIZE_MODE_ANY_MODE): Define.
11422         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
11423         aarch64_addr_query_type.
11424         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
11425         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
11426         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
11427         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
11428         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
11429         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
11430         (aarch64_simd_imm_zero_p): Delete.
11431         (aarch64_check_zero_based_sve_index_immediate): Declare.
11432         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11433         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11434         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11435         (aarch64_sve_float_mul_immediate_p): Likewise.
11436         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11437         rather than an rtx.
11438         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11439         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11440         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11441         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11442         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11443         (aarch64_regmode_natural_size): Likewise.
11444         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11445         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11446         left one place.
11447         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11448         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11449         for VG and the SVE predicate registers.
11450         (V_ALIASES): Add a "z"-prefixed alias.
11451         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11452         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11453         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11454         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11455         (REG_CLASS_NAMES): Add entries for them.
11456         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
11457         and the predicate registers.
11458         (aarch64_sve_vg): Declare.
11459         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11460         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11461         (REGMODE_NATURAL_SIZE): Define.
11462         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11463         SVE macros.
11464         * config/aarch64/aarch64.c: Include cfgrtl.h.
11465         (simd_immediate_info): Add a constructor for series vectors,
11466         and an associated step field.
11467         (aarch64_sve_vg): New variable.
11468         (aarch64_dbx_register_number): Handle VG and the predicate registers.
11469         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11470         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11471         (VEC_ANY_DATA, VEC_STRUCT): New constants.
11472         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11473         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11474         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11475         (aarch64_get_mask_mode): New functions.
11476         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11477         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11478         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
11479         predicate modes and predicate registers.  Explicitly restrict
11480         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
11481         to store a vector mode if it is recognized by
11482         aarch64_classify_vector_mode.
11483         (aarch64_regmode_natural_size): New function.
11484         (aarch64_hard_regno_caller_save_mode): Return the original mode
11485         for predicates.
11486         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
11487         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
11488         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
11489         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
11490         functions.
11491         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
11492         does not overlap dest if the function is frame-related.  Handle
11493         SVE constants.
11494         (aarch64_split_add_offset): New function.
11495         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
11496         them aarch64_add_offset.
11497         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
11498         and update call to aarch64_sub_sp.
11499         (aarch64_add_cfa_expression): New function.
11500         (aarch64_expand_prologue): Pass extra temporary registers to the
11501         functions above.  Handle the case in which we need to emit new
11502         DW_CFA_expressions for registers that were originally saved
11503         relative to the stack pointer, but now have to be expressed
11504         relative to the frame pointer.
11505         (aarch64_output_mi_thunk): Pass extra temporary registers to the
11506         functions above.
11507         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
11508         IP0 and IP1 values for SVE frames.
11509         (aarch64_expand_vec_series): New function.
11510         (aarch64_expand_sve_widened_duplicate): Likewise.
11511         (aarch64_expand_sve_const_vector): Likewise.
11512         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
11513         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
11514         into the register, rather than emitting a SET directly.
11515         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
11516         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
11517         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
11518         (offset_9bit_signed_scaled_p): New functions.
11519         (aarch64_replicate_bitmask_imm): New function.
11520         (aarch64_bitmask_imm): Use it.
11521         (aarch64_cannot_force_const_mem): Reject expressions involving
11522         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
11523         (aarch64_classify_index): Handle SVE indices, by requiring
11524         a plain register index with a scale that matches the element size.
11525         (aarch64_classify_address): Handle SVE addresses.  Assert that
11526         the mode of the address is VOIDmode or an integer mode.
11527         Update call to aarch64_classify_symbol.
11528         (aarch64_classify_symbolic_expression): Update call to
11529         aarch64_classify_symbol.
11530         (aarch64_const_vec_all_in_range_p): New function.
11531         (aarch64_print_vector_float_operand): Likewise.
11532         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
11533         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
11534         and the FP immediates 1.0 and 0.5.
11535         (aarch64_print_address_internal): Handle SVE addresses.
11536         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
11537         (aarch64_regno_regclass): Handle predicate registers.
11538         (aarch64_secondary_reload): Handle big-endian reloads of SVE
11539         data modes.
11540         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
11541         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
11542         (aarch64_convert_sve_vector_bits): New function.
11543         (aarch64_override_options): Use it to handle -msve-vector-bits=.
11544         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11545         rather than an rtx.
11546         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
11547         Handle SVE vector and predicate modes.  Accept VL-based constants
11548         that need only one temporary register, and VL offsets that require
11549         no temporary registers.
11550         (aarch64_conditional_register_usage): Mark the predicate registers
11551         as fixed if SVE isn't available.
11552         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11553         Return true for SVE vector and predicate modes.
11554         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11555         rather than an unsigned int.  Handle SVE modes.
11556         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
11557         SVE modes.
11558         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11559         if SVE is enabled.
11560         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11561         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11562         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11563         (aarch64_sve_float_mul_immediate_p): New functions.
11564         (aarch64_sve_valid_immediate): New function.
11565         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11566         Explicitly reject structure modes.  Check for INDEX constants.
11567         Handle PTRUE and PFALSE constants.
11568         (aarch64_check_zero_based_sve_index_immediate): New function.
11569         (aarch64_simd_imm_zero_p): Delete.
11570         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11571         vector modes.  Accept constants in the range of CNT[BHWD].
11572         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11573         ask for an Advanced SIMD mode.
11574         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11575         (aarch64_simd_vector_alignment): Handle SVE predicates.
11576         (aarch64_vectorize_preferred_vector_alignment): New function.
11577         (aarch64_simd_vector_alignment_reachable): Use it instead of
11578         the vector size.
11579         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11580         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11581         functions.
11582         (MAX_VECT_LEN): Delete.
11583         (expand_vec_perm_d): Add a vec_flags field.
11584         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11585         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11586         (aarch64_evpc_ext): Don't apply a big-endian lane correction
11587         for SVE modes.
11588         (aarch64_evpc_rev): Rename to...
11589         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
11590         (aarch64_evpc_rev_global): New function.
11591         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11592         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11593         MAX_VECT_LEN.
11594         (aarch64_evpc_sve_tbl): New function.
11595         (aarch64_expand_vec_perm_const_1): Update after rename of
11596         aarch64_evpc_rev.  Handle SVE permutes too, trying
11597         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11598         than aarch64_evpc_tbl.
11599         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11600         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11601         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11602         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11603         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11604         (aarch64_expand_sve_vcond): New functions.
11605         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11606         of aarch64_vector_mode_p.
11607         (aarch64_dwarf_poly_indeterminate_value): New function.
11608         (aarch64_compute_pressure_classes): Likewise.
11609         (aarch64_can_change_mode_class): Likewise.
11610         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11611         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11612         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11613         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11614         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11615         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11616         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11617         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11618         constraints.
11619         (Dn, Dl, Dr): Accept const as well as const_vector.
11620         (Dz): Likewise.  Compare against CONST0_RTX.
11621         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11622         of "vector" where appropriate.
11623         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11624         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11625         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11626         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11627         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11628         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11629         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11630         (v_int_equiv): Extend to SVE modes.
11631         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11632         mode attributes.
11633         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11634         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11635         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11636         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11637         (SVE_COND_FP_CMP): New int iterators.
11638         (perm_hilo): Handle the new unpack unspecs.
11639         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11640         attributes.
11641         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11642         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11643         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11644         (aarch64_equality_operator, aarch64_constant_vector_operand)
11645         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11646         (aarch64_sve_nonimmediate_operand): Likewise.
11647         (aarch64_sve_general_operand): Likewise.
11648         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11649         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11650         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11651         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11652         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11653         (aarch64_sve_float_arith_immediate): Likewise.
11654         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11655         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11656         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11657         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11658         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11659         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11660         (aarch64_sve_float_arith_operand): Likewise.
11661         (aarch64_sve_float_arith_with_sub_operand): Likewise.
11662         (aarch64_sve_float_mul_operand): Likewise.
11663         (aarch64_sve_vec_perm_operand): Likewise.
11664         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11665         (aarch64_mov_operand): Accept const_poly_int and const_vector.
11666         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11667         as well as const_vector.
11668         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11669         in file.  Use CONST0_RTX and CONSTM1_RTX.
11670         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11671         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11672         Use aarch64_simd_imm_zero.
11673         * config/aarch64/aarch64-sve.md: New file.
11674         * config/aarch64/aarch64.md: Include it.
11675         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11676         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11677         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11678         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11679         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11680         (sve): New attribute.
11681         (enabled): Disable instructions with the sve attribute unless
11682         TARGET_SVE.
11683         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11684         aarch64_expand_mov_immediate.
11685         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11686         CNT[BHSD] immediates.
11687         (movti): Split CONST_POLY_INT moves into two halves.
11688         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11689         Split additions that need a temporary here if the destination
11690         is the stack pointer.
11691         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11692         (*add<mode>3_poly_1): New instruction.
11693         (set_clobber_cc): New expander.
11695 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11697         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11698         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11699         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11700         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11701         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11702         Change innermode from fixed_mode_size to machine_mode.
11703         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11704         subreg of a variable-length CONST_VECTOR.
11706 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11707             Alan Hayward  <alan.hayward@arm.com>
11708             David Sherwood  <david.sherwood@arm.com>
11710         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11711         (add_offset_to_base): New function, split out from...
11712         (create_mem_ref): ...here.  When handling a scale other than 1,
11713         check first whether the address is valid without the offset.
11714         Add it into the base if so, leaving the index and scale as-is.
11716 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11718         PR c++/83778
11719         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11720         fold_for_warn before checking if arg2 is INTEGER_CST.
11722 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11724         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11725         (store_multiple_operation): Delete.
11726         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11727         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11728         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11729         guarded by TARGET_STRING.
11730         (rs6000_output_load_multiple): Delete.
11731         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11732         OPTION_MASK_STRING / TARGET_STRING handling.
11733         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11734         (const rs6000_opt_masks) <"string">: Change mask to 0.
11735         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11736         (MASK_STRING): Delete.
11737         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11738         parts.  Simplify.
11739         (load_multiple): Delete.
11740         (*ldmsi8): Delete.
11741         (*ldmsi7): Delete.
11742         (*ldmsi6): Delete.
11743         (*ldmsi5): Delete.
11744         (*ldmsi4): Delete.
11745         (*ldmsi3): Delete.
11746         (store_multiple): Delete.
11747         (*stmsi8): Delete.
11748         (*stmsi7): Delete.
11749         (*stmsi6): Delete.
11750         (*stmsi5): Delete.
11751         (*stmsi4): Delete.
11752         (*stmsi3): Delete.
11753         (movmemsi_8reg): Delete.
11754         (corresponding unnamed define_insn): Delete.
11755         (movmemsi_6reg): Delete.
11756         (corresponding unnamed define_insn): Delete.
11757         (movmemsi_4reg): Delete.
11758         (corresponding unnamed define_insn): Delete.
11759         (movmemsi_2reg): Delete.
11760         (corresponding unnamed define_insn): Delete.
11761         (movmemsi_1reg): Delete.
11762         (corresponding unnamed define_insn): Delete.
11763         * config/rs6000/rs6000.opt (mno-string): New.
11764         (mstring): Replace by deprecation warning stub.
11765         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11767 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11769         * regrename.c (regrename_do_replace): If replacing the same
11770         reg multiple times, try to reuse last created gen_raw_REG.
11772         PR debug/81155
11773         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11774         main to workaround a bug in GDB.
11776 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11778         PR target/83737
11779         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11781 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11783         PR rtl-optimization/80481
11784         * ira-color.c (get_cap_member): New function.
11785         (allocnos_conflict_by_live_ranges_p): Use it.
11786         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11787         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11789 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11791         PR target/83628
11792         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11793         (*saddl_se_1): Ditto.
11794         (*ssubsi_1): Ditto.
11795         (*ssubl_se_1): Ditto.
11797 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11799         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11800         rather than wi::to_widest for DR_INITs.
11801         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11802         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11803         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11804         INTEGER_CSTs.
11805         (vect_analyze_group_access_1): Note that here.
11807 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11809         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11810         polynomial type sizes.
11812 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11814         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11815         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11816         (gimple_add_tmp_var): Likewise.
11818 2018-01-12  Martin Liska  <mliska@suse.cz>
11820         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11821         (gimple_alloc_sizes): Likewise.
11822         (dump_gimple_statistics): Use PRIu64 in printf format.
11823         * gimple.h: Change uint64_t to int.
11825 2018-01-12  Martin Liska  <mliska@suse.cz>
11827         * tree-core.h: Use uint64_t instead of int.
11828         * tree.c (tree_node_counts): Likewise.
11829         (tree_node_sizes): Likewise.
11830         (dump_tree_statistics): Use PRIu64 in printf format.
11832 2018-01-12  Martin Liska  <mliska@suse.cz>
11834         * Makefile.in: As qsort_chk is implemented in vec.c, add
11835         vec.o to linkage of gencfn-macros.
11836         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11837         passing the info to record_node_allocation_statistics.
11838         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11839         and pass the info.
11840         * ggc-common.c (struct ggc_usage): Add operator== and use
11841         it in operator< and compare function.
11842         * mem-stats.h (struct mem_usage): Likewise.
11843         * vec.c (struct vec_usage): Remove operator< and compare
11844         function. Can be simply inherited.
11846 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11848         PR target/81616
11849         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11850         * tree-ssa-math-opts.c: Include domwalk.h.
11851         (convert_mult_to_fma_1): New function.
11852         (fma_transformation_info): New type.
11853         (fma_deferring_state): Likewise.
11854         (cancel_fma_deferring): New function.
11855         (result_of_phi): Likewise.
11856         (last_fma_candidate_feeds_initial_phi): Likewise.
11857         (convert_mult_to_fma): Added deferring logic, split actual
11858         transformation to convert_mult_to_fma_1.
11859         (math_opts_dom_walker): New type.
11860         (math_opts_dom_walker::after_dom_children): New method, body moved
11861         here from pass_optimize_widening_mul::execute, added deferring logic
11862         bits.
11863         (pass_optimize_widening_mul::execute): Moved most of code to
11864         math_opts_dom_walker::after_dom_children.
11865         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11866         * config/i386/i386.c (ix86_option_override_internal): Added
11867         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11869 2018-01-12  Richard Biener  <rguenther@suse.de>
11871         PR debug/83157
11872         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11873         inline instance vars.
11875 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11877         PR target/81819
11878         * config/rx/rx.c (rx_is_restricted_memory_address):
11879         Handle SUBREG case.
11881 2018-01-12  Richard Biener  <rguenther@suse.de>
11883         PR tree-optimization/80846
11884         * target.def (split_reduction): New target hook.
11885         * targhooks.c (default_split_reduction): New function.
11886         * targhooks.h (default_split_reduction): Declare.
11887         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11888         target requests first reduce vectors by combining low and high
11889         parts.
11890         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11891         (get_vectype_for_scalar_type_and_size): Export.
11892         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11893         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11894         * doc/tm.texi: Regenerate.
11895         * config/i386/i386.c (ix86_split_reduction): Implement
11896         TARGET_VECTORIZE_SPLIT_REDUCTION.
11898 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11900         PR target/83368
11901         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11902         in PIC mode except for TARGET_VXWORKS_RTP.
11903         * config/sparc/sparc.c: Include cfgrtl.h.
11904         (TARGET_INIT_PIC_REG): Define.
11905         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11906         (sparc_pic_register_p): New predicate.
11907         (sparc_legitimate_address_p): Use it.
11908         (sparc_legitimize_pic_address): Likewise.
11909         (sparc_delegitimize_address): Likewise.
11910         (sparc_mode_dependent_address_p): Likewise.
11911         (gen_load_pcrel_sym): Remove 4th parameter.
11912         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11913         (sparc_expand_prologue): Do not call load_got_register here.
11914         (sparc_flat_expand_prologue): Likewise.
11915         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11916         (sparc_use_pseudo_pic_reg): New function.
11917         (sparc_init_pic_reg): Likewise.
11918         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11919         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11921 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11923         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11924         Add item for branch_cost.
11926 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11928         PR rtl-optimization/83565
11929         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11930         not extend the result to a larger mode for rotate operations.
11931         (num_sign_bit_copies1): Likewise.
11933 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11935         PR target/40411
11936         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11937         -symbolic.
11938         Use values-Xc.o for -pedantic.
11939         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11941 2018-01-12  Martin Liska  <mliska@suse.cz>
11943         PR ipa/83054
11944         * ipa-devirt.c (final_warning_record::grow_type_warnings):
11945         New function.
11946         (possible_polymorphic_call_targets): Use it.
11947         (ipa_devirt): Likewise.
11949 2018-01-12  Martin Liska  <mliska@suse.cz>
11951         * profile-count.h (enum profile_quality): Use 0 as invalid
11952         enum value of profile_quality.
11954 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11956         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11957         -mext-string options.
11959 2018-01-12  Richard Biener  <rguenther@suse.de>
11961         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11962         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11963         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11964         Likewise.
11965         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11967 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11969         * configure.ac (--with-long-double-format): Add support for the
11970         configuration option to change the default long double format on
11971         PowerPC systems.
11972         * config.gcc (powerpc*-linux*-*): Likewise.
11973         * configure: Regenerate.
11974         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11975         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11976         used without modification.
11978 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11980         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11981         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11982         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11983         MISC_BUILTIN_SPEC_BARRIER.
11984         (rs6000_init_builtins): Likewise.
11985         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11986         enum value.
11987         (speculation_barrier): New define_insn.
11988         * doc/extend.texi: Document __builtin_speculation_barrier.
11990 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
11992         PR target/83203
11993         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
11994         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
11995         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
11996         iterators.
11997         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
11998         integral modes instead of "ss" and "sd".
11999         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
12000         vectors with 32-bit and 64-bit elements.
12001         (vecdupssescalarmodesuffix): New mode attribute.
12002         (vec_dup<mode>): Use it.
12004 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
12006         PR target/83330
12007         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
12008         frame if argument is passed on stack.
12010 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
12012         PR target/82682
12013         * ree.c (combine_reaching_defs): Optimize also
12014         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
12015         reg2=any_extend(exp); reg1=reg2;, formatting fix.
12017 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
12019         PR middle-end/83189
12020         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
12022 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
12024         PR middle-end/83718
12025         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
12026         after they are computed.
12028 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
12030         PR tree-optimization/83695
12031         * gimple-loop-linterchange.cc
12032         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
12033         reset cached scev information after interchange.
12034         (pass_linterchange::execute): Remove call to scev_reset_htab.
12036 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12038         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
12039         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
12040         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
12041         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
12042         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
12043         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
12044         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
12045         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
12046         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
12047         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
12048         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
12049         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
12050         (V_lane_reg): Likewise.
12051         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
12052         New define_expand.
12053         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
12054         (vfmal_lane_low<mode>_intrinsic,
12055         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
12056         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
12057         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
12058         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
12059         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
12060         vfmsl_lane_high<mode>_intrinsic): New define_insns.
12062 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12064         * config/arm/arm-cpus.in (fp16fml): New feature.
12065         (ALL_SIMD): Add fp16fml.
12066         (armv8.2-a): Add fp16fml as an option.
12067         (armv8.3-a): Likewise.
12068         (armv8.4-a): Add fp16fml as part of fp16.
12069         * config/arm/arm.h (TARGET_FP16FML): Define.
12070         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
12071         when appropriate.
12072         * config/arm/arm-modes.def (V2HF): Define.
12073         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
12074         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
12075         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
12076         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
12077         vfmsl_low, vfmsl_high): New set of builtins.
12078         * config/arm/iterators.md (PLUSMINUS): New code iterator.
12079         (vfml_op): New code attribute.
12080         (VFMLHALVES): New int iterator.
12081         (VFML, VFMLSEL): New mode attributes.
12082         (V_reg): Define mapping for V2HF.
12083         (V_hi, V_lo): New mode attributes.
12084         (VF_constraint): Likewise.
12085         (vfml_half, vfml_half_selector): New int attributes.
12086         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
12087         define_expand.
12088         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
12089         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
12090         New define_insn.
12091         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
12092         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
12093         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
12094         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
12095         documentation.
12096         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
12097         Document new effective target and option set.
12099 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12101         * config/arm/arm-cpus.in (armv8_4): New feature.
12102         (ARMv8_4a): New fgroup.
12103         (armv8.4-a): New arch.
12104         * config/arm/arm-tables.opt: Regenerate.
12105         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
12106         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
12107         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
12108         Add matching rules for -march=armv8.4-a and extensions.
12109         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
12111 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
12113         PR target/81821
12114         * config/rx/rx.md (BW): New mode attribute.
12115         (sync_lock_test_and_setsi): Add mode suffix to insn output.
12117 2018-01-11  Richard Biener  <rguenther@suse.de>
12119         PR tree-optimization/83435
12120         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
12121         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
12122         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
12124 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12125             Alan Hayward  <alan.hayward@arm.com>
12126             David Sherwood  <david.sherwood@arm.com>
12128         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
12129         field.
12130         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
12131         (aarch64_print_address_internal): Use it to check for a zero offset.
12133 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12134             Alan Hayward  <alan.hayward@arm.com>
12135             David Sherwood  <david.sherwood@arm.com>
12137         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
12138         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
12139         Return a poly_int64 rather than a HOST_WIDE_INT.
12140         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
12141         rather than a HOST_WIDE_INT.
12142         * config/aarch64/aarch64.h (aarch64_frame): Protect with
12143         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
12144         hard_fp_offset, frame_size, initial_adjust, callee_offset and
12145         final_offset from HOST_WIDE_INT to poly_int64.
12146         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
12147         to_constant when getting the number of units in an Advanced SIMD
12148         mode.
12149         (aarch64_builtin_vectorized_function): Check for a constant number
12150         of units.
12151         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
12152         GET_MODE_SIZE.
12153         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
12154         attribute instead of GET_MODE_NUNITS.
12155         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
12156         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
12157         GET_MODE_SIZE for fixed-size registers.
12158         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
12159         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
12160         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
12161         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
12162         (aarch64_print_operand, aarch64_print_address_internal)
12163         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
12164         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
12165         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
12166         Handle polynomial GET_MODE_SIZE.
12167         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
12168         wider than SImode without modification.
12169         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
12170         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
12171         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
12172         passing and returning SVE modes.
12173         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
12174         rather than GEN_INT.
12175         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
12176         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
12177         (aarch64_allocate_and_probe_stack_space): Likewise.
12178         (aarch64_layout_frame): Cope with polynomial offsets.
12179         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
12180         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
12181         polynomial offsets.
12182         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
12183         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
12184         poly_int64 rather than a HOST_WIDE_INT.
12185         (aarch64_get_separate_components, aarch64_process_components)
12186         (aarch64_expand_prologue, aarch64_expand_epilogue)
12187         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
12188         (aarch64_anchor_offset): New function, split out from...
12189         (aarch64_legitimize_address): ...here.
12190         (aarch64_builtin_vectorization_cost): Handle polynomial
12191         TYPE_VECTOR_SUBPARTS.
12192         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
12193         GET_MODE_NUNITS.
12194         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
12195         number of elements from the PARALLEL rather than the mode.
12196         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
12197         rather than GET_MODE_BITSIZE.
12198         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
12199         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
12200         (aarch64_expand_vec_perm_const_1): Handle polynomial
12201         d->perm.length () and d->perm elements.
12202         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
12203         Apply to_constant to d->perm elements.
12204         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
12205         polynomial CONST_VECTOR_NUNITS.
12206         (aarch64_move_pointer): Take amount as a poly_int64 rather
12207         than an int.
12208         (aarch64_progress_pointer): Avoid temporary variable.
12209         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
12210         the mode attribute instead of GET_MODE.
12212 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12213             Alan Hayward  <alan.hayward@arm.com>
12214             David Sherwood  <david.sherwood@arm.com>
12216         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
12217         x exists before using it.
12218         (aarch64_add_constant_internal): Rename to...
12219         (aarch64_add_offset_1): ...this.  Replace regnum with separate
12220         src and dest rtxes.  Handle the case in which they're different,
12221         including when the offset is zero.  Replace scratchreg with an rtx.
12222         Use 2 additions if there is no spare register into which we can
12223         move a 16-bit constant.
12224         (aarch64_add_constant): Delete.
12225         (aarch64_add_offset): Replace reg with separate src and dest
12226         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
12227         Use aarch64_add_offset_1.
12228         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
12229         an rtx rather than an int.  Take the delta as a poly_int64
12230         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
12231         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
12232         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
12233         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
12234         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
12235         and aarch64_add_sp.
12236         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
12237         aarch64_add_constant.
12239 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12241         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
12242         Use scalar_float_mode.
12244 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12246         * config/aarch64/aarch64-simd.md
12247         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
12248         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
12249         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
12250         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
12251         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
12252         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
12253         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
12254         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
12255         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
12256         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
12258 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12260         PR target/83514
12261         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
12262         targ_options->x_arm_arch_string is non NULL.
12264 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
12266         * config/aarch64/aarch64.h
12267         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
12269 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
12271         PR target/82096
12272         * expmed.c (emit_store_flag_force): Swap if const op0
12273         and change VOIDmode to mode of op0.
12275 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12277         PR rtl-optimization/83761
12278         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
12279         than bytes to mode_for_size.
12281 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12283         PR middle-end/83189
12284         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
12285         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
12286         profile.
12288 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12290         PR middle-end/83575
12291         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
12292         when in layout mode.
12293         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
12294         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
12295         partition fixup.
12297 2018-01-10  Michael Collison  <michael.collison@arm.com>
12299         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
12300         * config/aarch64/aarch64-option-extension.def: Add
12301         AARCH64_OPT_EXTENSION of 'fp16fml'.
12302         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12303         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
12304         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
12305         * config/aarch64/constraints.md (Ui7): New constraint.
12306         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
12307         (VFMLA_SEL_W): Ditto.
12308         (f16quad): Ditto.
12309         (f16mac1): Ditto.
12310         (VFMLA16_LOW): New int iterator.
12311         (VFMLA16_HIGH): Ditto.
12312         (UNSPEC_FMLAL): New unspec.
12313         (UNSPEC_FMLSL): Ditto.
12314         (UNSPEC_FMLAL2): Ditto.
12315         (UNSPEC_FMLSL2): Ditto.
12316         (f16mac): New code attribute.
12317         * config/aarch64/aarch64-simd-builtins.def
12318         (aarch64_fmlal_lowv2sf): Ditto.
12319         (aarch64_fmlsl_lowv2sf): Ditto.
12320         (aarch64_fmlalq_lowv4sf): Ditto.
12321         (aarch64_fmlslq_lowv4sf): Ditto.
12322         (aarch64_fmlal_highv2sf): Ditto.
12323         (aarch64_fmlsl_highv2sf): Ditto.
12324         (aarch64_fmlalq_highv4sf): Ditto.
12325         (aarch64_fmlslq_highv4sf): Ditto.
12326         (aarch64_fmlal_lane_lowv2sf): Ditto.
12327         (aarch64_fmlsl_lane_lowv2sf): Ditto.
12328         (aarch64_fmlal_laneq_lowv2sf): Ditto.
12329         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
12330         (aarch64_fmlalq_lane_lowv4sf): Ditto.
12331         (aarch64_fmlsl_lane_lowv4sf): Ditto.
12332         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
12333         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
12334         (aarch64_fmlal_lane_highv2sf): Ditto.
12335         (aarch64_fmlsl_lane_highv2sf): Ditto.
12336         (aarch64_fmlal_laneq_highv2sf): Ditto.
12337         (aarch64_fmlsl_laneq_highv2sf): Ditto.
12338         (aarch64_fmlalq_lane_highv4sf): Ditto.
12339         (aarch64_fmlsl_lane_highv4sf): Ditto.
12340         (aarch64_fmlalq_laneq_highv4sf): Ditto.
12341         (aarch64_fmlsl_laneq_highv4sf): Ditto.
12342         * config/aarch64/aarch64-simd.md:
12343         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
12344         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12345         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
12346         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12347         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
12348         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
12349         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
12350         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
12351         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
12352         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
12353         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
12354         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
12355         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
12356         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
12357         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
12358         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
12359         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
12360         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
12361         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
12362         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
12363         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
12364         (vfmlsl_low_u32): Ditto.
12365         (vfmlalq_low_u32): Ditto.
12366         (vfmlslq_low_u32): Ditto.
12367         (vfmlal_high_u32): Ditto.
12368         (vfmlsl_high_u32): Ditto.
12369         (vfmlalq_high_u32): Ditto.
12370         (vfmlslq_high_u32): Ditto.
12371         (vfmlal_lane_low_u32): Ditto.
12372         (vfmlsl_lane_low_u32): Ditto.
12373         (vfmlal_laneq_low_u32): Ditto.
12374         (vfmlsl_laneq_low_u32): Ditto.
12375         (vfmlalq_lane_low_u32): Ditto.
12376         (vfmlslq_lane_low_u32): Ditto.
12377         (vfmlalq_laneq_low_u32): Ditto.
12378         (vfmlslq_laneq_low_u32): Ditto.
12379         (vfmlal_lane_high_u32): Ditto.
12380         (vfmlsl_lane_high_u32): Ditto.
12381         (vfmlal_laneq_high_u32): Ditto.
12382         (vfmlsl_laneq_high_u32): Ditto.
12383         (vfmlalq_lane_high_u32): Ditto.
12384         (vfmlslq_lane_high_u32): Ditto.
12385         (vfmlalq_laneq_high_u32): Ditto.
12386         (vfmlslq_laneq_high_u32): Ditto.
12387         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
12388         (AARCH64_FL_FOR_ARCH8_4): New.
12389         (AARCH64_ISA_F16FML): New ISA flag.
12390         (TARGET_F16FML): New feature flag for fp16fml.
12391         (doc/invoke.texi): Document new fp16fml option.
12393 2018-01-10  Michael Collison  <michael.collison@arm.com>
12395         * config/aarch64/aarch64-builtins.c:
12396         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
12397         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12398         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
12399         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
12400         (AARCH64_ISA_SHA3): New ISA flag.
12401         (TARGET_SHA3): New feature flag for sha3.
12402         * config/aarch64/iterators.md (sha512_op): New int attribute.
12403         (CRYPTO_SHA512): New int iterator.
12404         (UNSPEC_SHA512H): New unspec.
12405         (UNSPEC_SHA512H2): Ditto.
12406         (UNSPEC_SHA512SU0): Ditto.
12407         (UNSPEC_SHA512SU1): Ditto.
12408         * config/aarch64/aarch64-simd-builtins.def
12409         (aarch64_crypto_sha512hqv2di): New builtin.
12410         (aarch64_crypto_sha512h2qv2di): Ditto.
12411         (aarch64_crypto_sha512su0qv2di): Ditto.
12412         (aarch64_crypto_sha512su1qv2di): Ditto.
12413         (aarch64_eor3qv8hi): Ditto.
12414         (aarch64_rax1qv2di): Ditto.
12415         (aarch64_xarqv2di): Ditto.
12416         (aarch64_bcaxqv8hi): Ditto.
12417         * config/aarch64/aarch64-simd.md:
12418         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
12419         (aarch64_crypto_sha512su0qv2di): Ditto.
12420         (aarch64_crypto_sha512su1qv2di): Ditto.
12421         (aarch64_eor3qv8hi): Ditto.
12422         (aarch64_rax1qv2di): Ditto.
12423         (aarch64_xarqv2di): Ditto.
12424         (aarch64_bcaxqv8hi): Ditto.
12425         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
12426         (vsha512h2q_u64): Ditto.
12427         (vsha512su0q_u64): Ditto.
12428         (vsha512su1q_u64): Ditto.
12429         (veor3q_u16): Ditto.
12430         (vrax1q_u64): Ditto.
12431         (vxarq_u64): Ditto.
12432         (vbcaxq_u16): Ditto.
12433         * config/arm/types.md (crypto_sha512): New type attribute.
12434         (crypto_sha3): Ditto.
12435         (doc/invoke.texi): Document new sha3 option.
12437 2018-01-10  Michael Collison  <michael.collison@arm.com>
12439         * config/aarch64/aarch64-builtins.c:
12440         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12441         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12442         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12443         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12444         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12445         (AARCH64_ISA_SM4): New ISA flag.
12446         (TARGET_SM4): New feature flag for sm4.
12447         * config/aarch64/aarch64-simd-builtins.def
12448         (aarch64_sm3ss1qv4si): Ditto.
12449         (aarch64_sm3tt1aq4si): Ditto.
12450         (aarch64_sm3tt1bq4si): Ditto.
12451         (aarch64_sm3tt2aq4si): Ditto.
12452         (aarch64_sm3tt2bq4si): Ditto.
12453         (aarch64_sm3partw1qv4si): Ditto.
12454         (aarch64_sm3partw2qv4si): Ditto.
12455         (aarch64_sm4eqv4si): Ditto.
12456         (aarch64_sm4ekeyqv4si): Ditto.
12457         * config/aarch64/aarch64-simd.md:
12458         (aarch64_sm3ss1qv4si): Ditto.
12459         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12460         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12461         (aarch64_sm4eqv4si): Ditto.
12462         (aarch64_sm4ekeyqv4si): Ditto.
12463         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12464         (sm3part_op): Ditto.
12465         (CRYPTO_SM3TT): Ditto.
12466         (CRYPTO_SM3PART): Ditto.
12467         (UNSPEC_SM3SS1): New unspec.
12468         (UNSPEC_SM3TT1A): Ditto.
12469         (UNSPEC_SM3TT1B): Ditto.
12470         (UNSPEC_SM3TT2A): Ditto.
12471         (UNSPEC_SM3TT2B): Ditto.
12472         (UNSPEC_SM3PARTW1): Ditto.
12473         (UNSPEC_SM3PARTW2): Ditto.
12474         (UNSPEC_SM4E): Ditto.
12475         (UNSPEC_SM4EKEY): Ditto.
12476         * config/aarch64/constraints.md (Ui2): New constraint.
12477         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12478         * config/arm/types.md (crypto_sm3): New type attribute.
12479         (crypto_sm4): Ditto.
12480         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12481         (vsm3tt1aq_u32): Ditto.
12482         (vsm3tt1bq_u32): Ditto.
12483         (vsm3tt2aq_u32): Ditto.
12484         (vsm3tt2bq_u32): Ditto.
12485         (vsm3partw1q_u32): Ditto.
12486         (vsm3partw2q_u32): Ditto.
12487         (vsm4eq_u32): Ditto.
12488         (vsm4ekeyq_u32): Ditto.
12489         (doc/invoke.texi): Document new sm4 option.
12491 2018-01-10  Michael Collison  <michael.collison@arm.com>
12493         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
12494         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
12495         (AARCH64_FL_FOR_ARCH8_4): New.
12496         (AARCH64_FL_V8_4): New flag.
12497         (doc/invoke.texi): Document new armv8.4-a option.
12499 2018-01-10  Michael Collison  <michael.collison@arm.com>
12501         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12502         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
12503         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
12504         * config/aarch64/aarch64-option-extension.def: Add
12505         AARCH64_OPT_EXTENSION of 'sha2'.
12506         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
12507         (crypto): Disable sha2 and aes if crypto disabled.
12508         (crypto): Enable aes and sha2 if enabled.
12509         (simd): Disable sha2 and aes if simd disabled.
12510         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
12511         New flags.
12512         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
12513         (TARGET_SHA2): New feature flag for sha2.
12514         (TARGET_AES): New feature flag for aes.
12515         * config/aarch64/aarch64-simd.md:
12516         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
12517         conditional on TARGET_AES.
12518         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
12519         (aarch64_crypto_sha1hsi): Make pattern conditional
12520         on TARGET_SHA2.
12521         (aarch64_crypto_sha1hv4si): Ditto.
12522         (aarch64_be_crypto_sha1hv4si): Ditto.
12523         (aarch64_crypto_sha1su1v4si): Ditto.
12524         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
12525         (aarch64_crypto_sha1su0v4si): Ditto.
12526         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
12527         (aarch64_crypto_sha256su0v4si): Ditto.
12528         (aarch64_crypto_sha256su1v4si): Ditto.
12529         (doc/invoke.texi): Document new aes and sha2 options.
12531 2018-01-10  Martin Sebor  <msebor@redhat.com>
12533         PR tree-optimization/83781
12534         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
12535         as string arrays.
12537 2018-01-11  Martin Sebor  <msebor@gmail.com>
12538             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12540         PR tree-optimization/83501
12541         PR tree-optimization/81703
12543         * tree-ssa-strlen.c (get_string_cst): Rename...
12544         (get_string_len): ...to this.  Handle global constants.
12545         (handle_char_store): Adjust.
12547 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
12548             Jim Wilson  <jimw@sifive.com>
12550         * config/riscv/riscv-protos.h (riscv_output_return): New.
12551         * config/riscv/riscv.c (struct machine_function): New naked_p field.
12552         (riscv_attribute_table, riscv_output_return),
12553         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12554         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12555         (riscv_compute_frame_info): Only compute frame->mask if not a naked
12556         function.
12557         (riscv_expand_prologue): Add early return for naked function.
12558         (riscv_expand_epilogue): Likewise.
12559         (riscv_function_ok_for_sibcall): Return false for naked function.
12560         (riscv_set_current_function): New.
12561         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12562         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12563         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12564         * doc/extend.texi (RISC-V Function Attributes): New.
12566 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12568         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12569         check for 128-bit long double before checking TCmode.
12570         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12571         128-bit long doubles before checking TFmode or TCmode.
12572         (FLOAT128_IBM_P): Likewise.
12574 2018-01-10  Martin Sebor  <msebor@redhat.com>
12576         PR tree-optimization/83671
12577         * builtins.c (c_strlen): Unconditionally return zero for the empty
12578         string.
12579         Use -Warray-bounds for warnings.
12580         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12581         for non-constant array indices with COMPONENT_REF, arrays of
12582         arrays, and pointers to arrays.
12583         (gimple_fold_builtin_strlen): Determine and set length range for
12584         non-constant character arrays.
12586 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
12588         PR middle-end/81897
12589         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12590         empty blocks.
12592 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
12594         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12596 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12598         PR target/83399
12599         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12600         VECTOR_MEM_ALTIVEC_OR_VSX_P.
12601         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12602         indexed_or_indirect_operand predicate.
12603         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12604         (*vsx_le_perm_load_v8hi): Likewise.
12605         (*vsx_le_perm_load_v16qi): Likewise.
12606         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12607         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12608         (*vsx_le_perm_store_v8hi): Likewise.
12609         (*vsx_le_perm_store_v16qi): Likewise.
12610         (eight unnamed splitters): Likewise.
12612 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12614         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12615         * config/rs6000/emmintrin.h: Likewise.
12616         * config/rs6000/mmintrin.h: Likewise.
12617         * config/rs6000/xmmintrin.h: Likewise.
12619 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
12621         PR c++/43486
12622         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12623         "public_flag".
12624         * tree.c (tree_nop_conversion): Return true for location wrapper
12625         nodes.
12626         (maybe_wrap_with_location): New function.
12627         (selftest::check_strip_nops): New function.
12628         (selftest::test_location_wrappers): New function.
12629         (selftest::tree_c_tests): Call it.
12630         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12631         (maybe_wrap_with_location): New decl.
12632         (EXPR_LOCATION_WRAPPER_P): New macro.
12633         (location_wrapper_p): New inline function.
12634         (tree_strip_any_location_wrapper): New inline function.
12636 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
12638         PR target/83735
12639         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12640         stack_realign_offset for the largest alignment of stack slot
12641         actually used.
12642         (ix86_find_max_used_stack_alignment): New function.
12643         (ix86_finalize_stack_frame_flags): Use it.  Set
12644         max_used_stack_alignment if we don't realign stack.
12645         * config/i386/i386.h (machine_function): Add
12646         max_used_stack_alignment.
12648 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
12650         * config/arm/arm.opt (-mbranch-cost): New option.
12651         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12652         account.
12654 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
12656         PR target/83629
12657         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12658         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12660 2018-01-10  Richard Biener  <rguenther@suse.de>
12662         PR debug/83765
12663         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12664         early out so it also covers the case where we have a non-NULL
12665         origin.
12667 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12669         PR tree-optimization/83753
12670         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12671         for non-strided grouped accesses if the number of elements is 1.
12673 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12675         PR target/81616
12676         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12677         * i386.h (TARGET_USE_GATHER): Define.
12678         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12680 2018-01-10  Martin Liska  <mliska@suse.cz>
12682         PR bootstrap/82831
12683         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12684         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12685         partitioning.
12686         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12687         CLEANUP_NO_PARTITIONING is not set.
12689 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12691         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12692         for vectors, as a partial revert of r254296.
12693         * rtl.h (const_vec_p): Delete.
12694         (const_vec_duplicate_p): Don't test for vector CONSTs.
12695         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12696         * expmed.c (make_tree): Likewise.
12698         Revert:
12699         * common.md (E, F): Use CONSTANT_P instead of checking for
12700         CONST_VECTOR.
12701         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12702         checking for CONST_VECTOR.
12704 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12706         PR middle-end/83575
12707         * predict.c (force_edge_cold): Handle in more sane way edges
12708         with no prediction.
12710 2018-01-09  Carl Love  <cel@us.ibm.com>
12712         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12713         V4SI, V4SF types.
12714         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12715         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12716         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12717         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12718         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12719         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12720         * config/rs6000/rs6000-protos.h: Add extern defition for
12721         rs6000_generate_float2_double_code.
12722         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12723         function.
12724         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12725         (float2_v2df): Add define_expand.
12727 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12729         PR target/83628
12730         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12731         op_mode in the force_to_mode call.
12733 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12735         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12736         instead of checking each element individually.
12737         (aarch64_evpc_uzp): Likewise.
12738         (aarch64_evpc_zip): Likewise.
12739         (aarch64_evpc_ext): Likewise.
12740         (aarch64_evpc_rev): Likewise.
12741         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12742         instead of checking each element individually.  Return true without
12743         generating rtl if
12744         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12745         whether all selected elements come from the same input, instead of
12746         checking each element individually.  Remove calls to gen_rtx_REG,
12747         start_sequence and end_sequence and instead assert that no rtl is
12748         generated.
12750 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12752         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12753         order of HIGH and CONST checks.
12755 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12757         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12758         if the destination isn't an SSA_NAME.
12760 2018-01-09  Richard Biener  <rguenther@suse.de>
12762         PR tree-optimization/83668
12763         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12764         move prologue...
12765         (canonicalize_loop_form): ... here, renamed from ...
12766         (canonicalize_loop_closed_ssa_form): ... this and amended to
12767         swap successor edges for loop exit blocks to make us use
12768         the RPO order we need for initial schedule generation.
12770 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12772         PR tree-optimization/64811
12773         * match.pd: When optimizing comparisons with Inf, avoid
12774         introducing or losing exceptions from comparisons with NaN.
12776 2018-01-09  Martin Liska  <mliska@suse.cz>
12778         PR sanitizer/82517
12779         * asan.c (shadow_mem_size): Add gcc_assert.
12781 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12783         Don't save registers in main().
12785         PR target/83738
12786         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12787         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12788         * config/avr/avr.c (avr_set_current_function): Don't error if
12789         naked, OS_task or OS_main are specified at the same time.
12790         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12791         OS_main.
12792         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12793         attribute.
12794         * common/config/avr/avr-common.c (avr_option_optimization_table):
12795         Switch on -mmain-is-OS_task for optimizing compilations.
12797 2018-01-09  Richard Biener  <rguenther@suse.de>
12799         PR tree-optimization/83572
12800         * graphite.c: Include cfganal.h.
12801         (graphite_transform_loops): Connect infinite loops to exit
12802         and remove fake edges at the end.
12804 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12806         * ipa-inline.c (edge_badness): Revert accidental checkin.
12808 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12810         PR ipa/80763
12811         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12812         symbols; not inline clones.
12814 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12816         PR target/83507
12817         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12818         hard registers.  Formatting fixes.
12820         PR preprocessor/83722
12821         * gcc.c (try_generate_repro): Pass
12822         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12823         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12824         do_report_bug.
12826 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12827             Kito Cheng  <kito.cheng@gmail.com>
12829         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12830         (riscv_leaf_function_p): Delete.
12831         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12833 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12835         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12836         function.
12837         (do_ifelse): New function.
12838         (do_isel): New function.
12839         (do_sub3): New function.
12840         (do_add3): New function.
12841         (do_load_mask_compare): New function.
12842         (do_overlap_load_compare): New function.
12843         (expand_compare_loop): New function.
12844         (expand_block_compare): Call expand_compare_loop() when appropriate.
12845         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12846         option description.
12847         (-mblock-compare-inline-loop-limit): New option.
12849 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12851         PR target/83677
12852         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12853         Reverse order of second and third operands in first alternative.
12854         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12855         of first and second elements in UNSPEC_VPERMR vector.
12856         (altivec_expand_vec_perm_le): Likewise.
12858 2018-01-08  Jeff Law  <law@redhat.com>
12860         PR rtl-optimizatin/81308
12861         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12862         (process_switch): If group_case_labels makes a change, then set
12863         cfg_altered.
12864         (pass_convert_switch::execute): If a switch is converted, then
12865         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12867         PR rtl-optimization/81308
12868         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12869         splitting insns.
12871 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12873         PR target/83663 - Revert r255946
12874         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12875         generation for cases where splatting a value is not useful.
12876         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12877         across a vec_duplicate and a paradoxical subreg forming a vector
12878         mode to a vec_concat.
12880 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12882         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12883         -march=armv8.3-a variants.
12884         * config/arm/t-multilib: Likewise.
12885         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12887 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12889         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12890         to generate rtl.
12891         (cceq_ior_compare_complement): Give it a name so I can use it, and
12892         change boolean_or_operator predicate to boolean_operator so it can
12893         be used to generate a crand.
12894         (eqne): New code iterator.
12895         (bd/bd_neg): New code_attrs.
12896         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12897         a single define_insn.
12898         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12899         decrement (bdnzt/bdnzf/bdzt/bdzf).
12900         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12901         with the new names of the branch decrement patterns, and added the
12902         names of the branch decrement conditional patterns.
12904 2018-01-08  Richard Biener  <rguenther@suse.de>
12906         PR tree-optimization/83563
12907         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12908         cache.
12910 2018-01-08  Richard Biener  <rguenther@suse.de>
12912         PR middle-end/83713
12913         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12915 2018-01-08  Richard Biener  <rguenther@suse.de>
12917         PR tree-optimization/83685
12918         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12919         references to abnormals.
12921 2018-01-08  Richard Biener  <rguenther@suse.de>
12923         PR lto/83719
12924         * dwarf2out.c (output_indirect_strings): Handle empty
12925         skeleton_debug_str_hash.
12926         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12928 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12930         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12931         (emit_store_direct): Likewise.
12932         (arc_trampoline_adjust_address): Likewise.
12933         (arc_asm_trampoline_template): New function.
12934         (arc_initialize_trampoline): Use asm_trampoline_template.
12935         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12936         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12937         * config/arc/arc.md (flush_icache): Delete pattern.
12939 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12941         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12942         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12943         munaligned-access.
12945 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12947         PR target/83681
12948         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12949         by not USED_FOR_TARGET.
12950         (make_pass_resolve_sw_modes): Likewise.
12952 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12954         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12955         USED_FOR_TARGET.
12957 2018-01-08  Richard Biener  <rguenther@suse.de>
12959         PR middle-end/83580
12960         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12962 2018-01-08  Richard Biener  <rguenther@suse.de>
12964         PR middle-end/83517
12965         * match.pd ((t * 2) / 2) -> t): Add missing :c.
12967 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
12969         PR middle-end/81897
12970         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12971         basic blocks with a small number of successors.
12972         (convert_control_dep_chain_into_preds): Improve handling of
12973         forwarder blocks.
12974         (dump_predicates): Split apart into...
12975         (dump_pred_chain): ...here...
12976         (dump_pred_info): ...and here.
12977         (can_one_predicate_be_invalidated_p): Add debugging printfs.
12978         (can_chain_union_be_invalidated_p): Improve check for invalidation
12979         of paths.
12980         (uninit_uses_cannot_happen): Avoid unnecessary if
12981         convert_control_dep_chain_into_preds yielded nothing.
12983 2018-01-06  Martin Sebor  <msebor@redhat.com>
12985         PR tree-optimization/83640
12986         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
12987         subtracting negative offset from size.
12988         (builtin_access::overlap): Adjust offset bounds of the access to fall
12989         within the size of the object if possible.
12991 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
12993         PR rtl-optimization/83699
12994         * expmed.c (extract_bit_field_1): Restrict the vector usage of
12995         extract_bit_field_as_subreg to cases in which the extracted
12996         value is also a vector.
12998         * lra-constraints.c (process_alt_operands): Test for the equivalence
12999         substitutions when detecting a possible reload cycle.
13001 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
13003         PR debug/83480
13004         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
13005         by default if flag_selective_schedling{,2}.  Formatting fixes.
13007         PR rtl-optimization/83682
13008         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
13009         if it has non-VECTOR_MODE element mode.
13010         (vec_duplicate_p): Likewise.
13012         PR middle-end/83694
13013         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
13014         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
13016 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
13018         PR target/83604
13019         * config/i386/i386-builtin.def
13020         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
13021         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
13022         Require also OPTION_MASK_ISA_AVX512F in addition to
13023         OPTION_MASK_ISA_GFNI.
13024         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
13025         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
13026         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
13027         to OPTION_MASK_ISA_GFNI.
13028         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
13029         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
13030         OPTION_MASK_ISA_AVX512BW.
13031         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
13032         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
13033         addition to OPTION_MASK_ISA_GFNI.
13034         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
13035         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
13036         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
13037         to OPTION_MASK_ISA_GFNI.
13038         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
13039         a requirement for all ISAs rather than any of them with a few
13040         exceptions.
13041         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
13042         processing.
13043         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
13044         bitmasks to be enabled with 3 exceptions, instead of requiring any
13045         enabled ISA with lots of exceptions.
13046         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
13047         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
13048         Change avx512bw in isa attribute to avx512f.
13049         * config/i386/sgxintrin.h: Add license boilerplate.
13050         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
13051         to __AVX512F__ and __AVX512VL to __AVX512VL__.
13052         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
13053         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
13054         defined.
13055         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
13056         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
13057         temporarily sse2 rather than sse if not enabled already.
13059         PR target/83604
13060         * config/i386/sse.md (VI248_VLBW): Rename to ...
13061         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
13062         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
13063         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
13064         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
13065         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
13066         mode iterator instead of VI248_VLBW.
13068 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
13070         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
13071         (record_modified): Skip clobbers; add debug output.
13072         (param_change_prob): Use sreal frequencies.
13074 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
13076         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
13077         punt for user-aligned variables.
13079 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
13081         * tree-chrec.c (chrec_contains_symbols): Return true for
13082         POLY_INT_CST.
13084 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
13086         PR target/82439
13087         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
13088         of (x|y) == x for BICS pattern.
13090 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
13092         PR tree-optimization/83605
13093         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
13094         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
13095         can throw.
13097 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13099         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
13100         * config/epiphany/rtems.h: New file.
13102 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13103             Uros Bizjak  <ubizjak@gmail.com>
13105         PR target/83554
13106         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
13107         QIreg_operand instead of register_operand predicate.
13108         * config/i386/i386.c (ix86_rop_should_change_byte_p,
13109         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
13110         comments instead of -fmitigate[-_]rop.
13112 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13114         PR bootstrap/81926
13115         * cgraphunit.c (symbol_table::compile): Switch to text_section
13116         before calling assembly_start debug hook.
13117         * run-rtl-passes.c (run_rtl_passes): Likewise.
13118         Include output.h.
13120 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13122         * tree-vrp.c (extract_range_from_binary_expr_1): Check
13123         range_int_cst_p rather than !symbolic_range_p before calling
13124         extract_range_from_multiplicative_op_1.
13126 2018-01-04  Jeff Law  <law@redhat.com>
13128         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
13129         redundant test in assertion.
13131 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13133         * doc/rtl.texi: Document machine_mode wrapper classes.
13135 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13137         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
13138         using tree_to_uhwi.
13140 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13142         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
13143         the VEC_PERM_EXPR fold to fail.
13145 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13147         PR debug/83585
13148         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
13149         to switched_sections.
13151 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13153         PR target/83680
13154         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
13155         test for d.testing.
13157 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
13159         PR target/83387
13160         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
13161         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
13163 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13165         PR debug/83666
13166         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
13167         is BLKmode and bitpos not zero or mode change is needed.
13169 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13171         PR target/83675
13172         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
13173         TARGET_VIS2.
13175 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
13177         PR target/83628
13178         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
13179         instead of MULT rtx.  Update all corresponding splitters.
13180         (*saddl_se): Ditto.
13181         (*ssub<modesuffix>): Ditto.
13182         (*ssubl_se): Ditto.
13183         (*cmp_sadd_di): Update split patterns.
13184         (*cmp_sadd_si): Ditto.
13185         (*cmp_sadd_sidi): Ditto.
13186         (*cmp_ssub_di): Ditto.
13187         (*cmp_ssub_si): Ditto.
13188         (*cmp_ssub_sidi): Ditto.
13189         * config/alpha/predicates.md (const23_operand): New predicate.
13190         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
13191         Look for ASHIFT, not MULT inner operand.
13192         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
13194 2018-01-04  Martin Liska  <mliska@suse.cz>
13196         PR gcov-profile/83669
13197         * gcov.c (output_intermediate_file): Add version to intermediate
13198         gcov file.
13199         * doc/gcov.texi: Document new field 'version' in intermediate
13200         file format. Fix location of '-k' option of gcov command.
13202 2018-01-04  Martin Liska  <mliska@suse.cz>
13204         PR ipa/82352
13205         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
13207 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13209         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
13211 2018-01-03  Martin Sebor  <msebor@redhat.com>
13213         PR tree-optimization/83655
13214         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
13215         checking calls with invalid arguments.
13217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13219         * tree-vect-stmts.c (vect_get_store_rhs): New function.
13220         (vectorizable_mask_load_store): Delete.
13221         (vectorizable_call): Return false for masked loads and stores.
13222         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
13223         instead of gimple_assign_rhs1.
13224         (vectorizable_load): Handle IFN_MASK_LOAD.
13225         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
13227 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13229         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
13230         split out from..,
13231         (vectorizable_mask_load_store): ...here.
13232         (vectorizable_load): ...and here.
13234 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13236         * tree-vect-stmts.c (vect_build_all_ones_mask)
13237         (vect_build_zero_merge_argument): New functions, split out from...
13238         (vectorizable_load): ...here.
13240 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13242         * tree-vect-stmts.c (vect_check_store_rhs): New function,
13243         split out from...
13244         (vectorizable_mask_load_store): ...here.
13245         (vectorizable_store): ...and here.
13247 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13249         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
13250         split out from...
13251         (vectorizable_mask_load_store): ...here.
13253 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13255         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
13256         (vect_model_store_cost): Take a vec_load_store_type instead of a
13257         vect_def_type.
13258         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
13259         (vect_model_store_cost): Take a vec_load_store_type instead of a
13260         vect_def_type.
13261         (vectorizable_mask_load_store): Update accordingly.
13262         (vectorizable_store): Likewise.
13263         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
13265 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13267         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
13268         IFN_MASK_LOAD calls here rather than...
13269         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
13271 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13272             Alan Hayward  <alan.hayward@arm.com>
13273             David Sherwood  <david.sherwood@arm.com>
13275         * expmed.c (extract_bit_field_1): For vector extracts,
13276         fall back to extract_bit_field_as_subreg if vec_extract
13277         isn't available.
13279 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13280             Alan Hayward  <alan.hayward@arm.com>
13281             David Sherwood  <david.sherwood@arm.com>
13283         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
13284         they are variable or constant sized.
13285         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
13286         slots for constant-sized data.
13288 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13289             Alan Hayward  <alan.hayward@arm.com>
13290             David Sherwood  <david.sherwood@arm.com>
13292         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
13293         handling COND_EXPRs with boolean comparisons, try to find a better
13294         basis for the mask type than the boolean itself.
13296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13298         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
13299         is calculated and how it can be overridden.
13300         * genmodes.c (max_bitsize_mode_any_mode): New variable.
13301         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
13302         if defined.
13303         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
13304         if nonzero.
13306 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13307             Alan Hayward  <alan.hayward@arm.com>
13308             David Sherwood  <david.sherwood@arm.com>
13310         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
13311         Remove the mode argument.
13312         (aarch64_simd_valid_immediate): Remove the mode and inverse
13313         arguments.
13314         * config/aarch64/iterators.md (bitsize): New iterator.
13315         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
13316         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
13317         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
13318         aarch64_simd_valid_immediate.
13319         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
13320         (aarch64_reg_or_bic_imm): Likewise.
13321         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
13322         with an insn_type enum and msl with a modifier_type enum.
13323         Replace element_width with a scalar_mode.  Change the shift
13324         to unsigned int.  Add constructors for scalar_float_mode and
13325         scalar_int_mode elements.
13326         (aarch64_vect_float_const_representable_p): Delete.
13327         (aarch64_can_const_movi_rtx_p)
13328         (aarch64_simd_scalar_immediate_valid_for_move)
13329         (aarch64_simd_make_constant): Update call to
13330         aarch64_simd_valid_immediate.
13331         (aarch64_advsimd_valid_immediate_hs): New function.
13332         (aarch64_advsimd_valid_immediate): Likewise.
13333         (aarch64_simd_valid_immediate): Remove mode and inverse
13334         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
13335         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
13336         and aarch64_float_const_representable_p on the result.
13337         (aarch64_output_simd_mov_immediate): Remove mode argument.
13338         Update call to aarch64_simd_valid_immediate and use of
13339         simd_immediate_info.
13340         (aarch64_output_scalar_simd_mov_immediate): Update call
13341         accordingly.
13343 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13344             Alan Hayward  <alan.hayward@arm.com>
13345             David Sherwood  <david.sherwood@arm.com>
13347         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
13348         (mode_nunits): Likewise CONST_MODE_NUNITS.
13349         * machmode.def (ADJUST_NUNITS): Document.
13350         * genmodes.c (mode_data::need_nunits_adj): New field.
13351         (blank_mode): Update accordingly.
13352         (adj_nunits): New variable.
13353         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
13354         parameter.
13355         (emit_mode_size_inline): Set need_bytesize_adj for all modes
13356         listed in adj_nunits.
13357         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
13358         listed in adj_nunits.  Don't emit case statements for such modes.
13359         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
13360         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
13361         nothing if adj_nunits is nonnull.
13362         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
13363         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
13364         (emit_mode_fbit): Update use of print_maybe_const_decl.
13365         (emit_move_size): Likewise.  Treat the array as non-const
13366         if adj_nunits.
13367         (emit_mode_adjustments): Handle adj_nunits.
13369 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13371         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
13372         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
13373         (VECTOR_MODES): Use it.
13374         (make_vector_modes): Take the prefix as an argument.
13376 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13377             Alan Hayward  <alan.hayward@arm.com>
13378             David Sherwood  <david.sherwood@arm.com>
13380         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
13381         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
13382         for MODE_VECTOR_BOOL.
13383         * machmode.def (VECTOR_BOOL_MODE): Document.
13384         * genmodes.c (VECTOR_BOOL_MODE): New macro.
13385         (make_vector_bool_mode): New function.
13386         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
13387         MODE_VECTOR_BOOL.
13388         * lto-streamer-in.c (lto_input_mode_table): Likewise.
13389         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
13390         Likewise.
13391         * stor-layout.c (int_mode_for_mode): Likewise.
13392         * tree.c (build_vector_type_for_mode): Likewise.
13393         * varasm.c (output_constant_pool_2): Likewise.
13394         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
13395         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
13396         for MODE_VECTOR_BOOL.
13397         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
13398         of mode class checks.
13399         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
13400         instead of a list of mode class checks.
13401         (expand_vector_scalar_condition): Likewise.
13402         (type_for_widest_vector_mode): Handle BImode as an inner mode.
13404 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13405             Alan Hayward  <alan.hayward@arm.com>
13406             David Sherwood  <david.sherwood@arm.com>
13408         * machmode.h (mode_size): Change from unsigned short to
13409         poly_uint16_pod.
13410         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
13411         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13412         or if measurement_type is not polynomial.
13413         (fixed_size_mode::includes_p): Check for constant-sized modes.
13414         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
13415         return a poly_uint16 rather than an unsigned short.
13416         (emit_mode_size): Change the type of mode_size from unsigned short
13417         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
13418         (emit_mode_adjustments): Cope with polynomial vector sizes.
13419         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13420         for GET_MODE_SIZE.
13421         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13422         for GET_MODE_SIZE.
13423         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
13424         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
13425         * caller-save.c (setup_save_areas): Likewise.
13426         (replace_reg_with_saved_mem): Likewise.
13427         * calls.c (emit_library_call_value_1): Likewise.
13428         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
13429         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
13430         (gen_lowpart_for_combine): Likewise.
13431         * convert.c (convert_to_integer_1): Likewise.
13432         * cse.c (equiv_constant, cse_insn): Likewise.
13433         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
13434         (cselib_subst_to_values): Likewise.
13435         * dce.c (word_dce_process_block): Likewise.
13436         * df-problems.c (df_word_lr_mark_ref): Likewise.
13437         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13438         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13439         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13440         (rtl_for_decl_location): Likewise.
13441         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13442         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13443         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13444         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13445         (expand_expr_real_1): Likewise.
13446         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13447         (pad_below): Likewise.
13448         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13449         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13450         * ira.c (get_subreg_tracking_sizes): Likewise.
13451         * ira-build.c (ira_create_allocno_objects): Likewise.
13452         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13453         (ira_sort_regnos_for_alter_reg): Likewise.
13454         * ira-costs.c (record_operand_costs): Likewise.
13455         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13456         (resolve_simple_move): Likewise.
13457         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13458         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13459         (lra_constraints): Likewise.
13460         (CONST_POOL_OK_P): Reject variable-sized modes.
13461         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13462         (add_pseudo_to_slot, lra_spill): Likewise.
13463         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13464         * optabs-query.c (get_best_extraction_insn): Likewise.
13465         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13466         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13467         (expand_mult_highpart, valid_multiword_target_p): Likewise.
13468         * recog.c (offsettable_address_addr_space_p): Likewise.
13469         * regcprop.c (maybe_mode_change): Likewise.
13470         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13471         * regrename.c (build_def_use): Likewise.
13472         * regstat.c (dump_reg_info): Likewise.
13473         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13474         (find_reloads, find_reloads_subreg_address): Likewise.
13475         * reload1.c (eliminate_regs_1): Likewise.
13476         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13477         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13478         (simplify_binary_operation_1, simplify_subreg): Likewise.
13479         * targhooks.c (default_function_arg_padding): Likewise.
13480         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13481         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13482         (verify_gimple_assign_ternary): Likewise.
13483         * tree-inline.c (estimate_move_cost): Likewise.
13484         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13485         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
13486         (get_address_cost_ainc): Likewise.
13487         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
13488         (vect_supportable_dr_alignment): Likewise.
13489         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13490         (vectorizable_reduction): Likewise.
13491         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
13492         (vectorizable_operation, vectorizable_load): Likewise.
13493         * tree.c (build_same_sized_truth_vector_type): Likewise.
13494         * valtrack.c (cleanup_auto_inc_dec): Likewise.
13495         * var-tracking.c (emit_note_insn_var_location): Likewise.
13496         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
13497         (ADDR_VEC_ALIGN): Likewise.
13499 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13500             Alan Hayward  <alan.hayward@arm.com>
13501             David Sherwood  <david.sherwood@arm.com>
13503         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
13504         unsigned short.
13505         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13506         or if measurement_type is polynomial.
13507         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
13508         * combine.c (make_extraction): Likewise.
13509         * dse.c (find_shift_sequence): Likewise.
13510         * dwarf2out.c (mem_loc_descriptor): Likewise.
13511         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
13512         (extract_bit_field, extract_low_bits): Likewise.
13513         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
13514         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
13515         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
13516         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
13517         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13518         * reload.c (find_reloads): Likewise.
13519         * reload1.c (alter_reg): Likewise.
13520         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
13521         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
13522         * tree-if-conv.c (predicate_mem_writes): Likewise.
13523         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13524         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
13525         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13526         * valtrack.c (dead_debug_insert_temp): Likewise.
13527         * varasm.c (mergeable_constant_section): Likewise.
13528         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
13530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13531             Alan Hayward  <alan.hayward@arm.com>
13532             David Sherwood  <david.sherwood@arm.com>
13534         * expr.c (expand_assignment): Cope with polynomial mode sizes
13535         when assigning to a CONCAT.
13537 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13538             Alan Hayward  <alan.hayward@arm.com>
13539             David Sherwood  <david.sherwood@arm.com>
13541         * machmode.h (mode_precision): Change from unsigned short to
13542         poly_uint16_pod.
13543         (mode_to_precision): Return a poly_uint16 rather than an unsigned
13544         short.
13545         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
13546         or if measurement_type is not polynomial.
13547         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
13548         in which the mode is already known to be a scalar_int_mode.
13549         * genmodes.c (emit_mode_precision): Change the type of mode_precision
13550         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
13551         initializer.
13552         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13553         for GET_MODE_PRECISION.
13554         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13555         for GET_MODE_PRECISION.
13556         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13557         as polynomial.
13558         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13559         (expand_field_assignment, make_extraction): Likewise.
13560         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13561         (get_last_value): Likewise.
13562         * convert.c (convert_to_integer_1): Likewise.
13563         * cse.c (cse_insn): Likewise.
13564         * expr.c (expand_expr_real_1): Likewise.
13565         * lra-constraints.c (simplify_operand_subreg): Likewise.
13566         * optabs-query.c (can_atomic_load_p): Likewise.
13567         * optabs.c (expand_atomic_load): Likewise.
13568         (expand_atomic_store): Likewise.
13569         * ree.c (combine_reaching_defs): Likewise.
13570         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13571         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13572         * tree.h (type_has_mode_precision_p): Likewise.
13573         * ubsan.c (instrument_si_overflow): Likewise.
13575 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13576             Alan Hayward  <alan.hayward@arm.com>
13577             David Sherwood  <david.sherwood@arm.com>
13579         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13580         polynomial numbers of units.
13581         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13582         (valid_vector_subparts_p): New function.
13583         (build_vector_type): Remove temporary shim and take the number
13584         of units as a poly_uint64 rather than an int.
13585         (build_opaque_vector_type): Take the number of units as a
13586         poly_uint64 rather than an int.
13587         * tree.c (build_vector_from_ctor): Handle polynomial
13588         TYPE_VECTOR_SUBPARTS.
13589         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13590         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13591         (build_vector_from_val): If the number of units is variable,
13592         use build_vec_duplicate_cst for constant operands and
13593         VEC_DUPLICATE_EXPR otherwise.
13594         (make_vector_type): Remove temporary is_constant ().
13595         (build_vector_type, build_opaque_vector_type): Take the number of
13596         units as a poly_uint64 rather than an int.
13597         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13598         VECTOR_CST_NELTS.
13599         * cfgexpand.c (expand_debug_expr): Likewise.
13600         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13601         (store_constructor, expand_expr_real_1): Likewise.
13602         (const_scalar_mask_from_tree): Likewise.
13603         * fold-const-call.c (fold_const_reduction): Likewise.
13604         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13605         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13606         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13607         (fold_relational_const): Likewise.
13608         (native_interpret_vector): Likewise.  Change the size from an
13609         int to an unsigned int.
13610         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13611         TYPE_VECTOR_SUBPARTS.
13612         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13613         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13614         duplicating a non-constant operand into a variable-length vector.
13615         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13616         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13617         * ipa-icf.c (sem_variable::equals): Likewise.
13618         * match.pd: Likewise.
13619         * omp-simd-clone.c (simd_clone_subparts): Likewise.
13620         * print-tree.c (print_node): Likewise.
13621         * stor-layout.c (layout_type): Likewise.
13622         * targhooks.c (default_builtin_vectorization_cost): Likewise.
13623         * tree-cfg.c (verify_gimple_comparison): Likewise.
13624         (verify_gimple_assign_binary): Likewise.
13625         (verify_gimple_assign_ternary): Likewise.
13626         (verify_gimple_assign_single): Likewise.
13627         * tree-pretty-print.c (dump_generic_node): Likewise.
13628         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13629         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13630         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13631         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13632         (vect_shift_permute_load_chain): Likewise.
13633         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13634         (expand_vector_condition, optimize_vector_constructor): Likewise.
13635         (lower_vec_perm, get_compute_type): Likewise.
13636         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13637         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13638         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13639         (vect_recog_mask_conversion_pattern): Likewise.
13640         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13641         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13642         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13643         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13644         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13645         (vectorizable_shift, vectorizable_operation, vectorizable_store)
13646         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13647         (supportable_widening_operation): Likewise.
13648         (supportable_narrowing_operation): Likewise.
13649         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13650         Likewise.
13651         * varasm.c (output_constant): Likewise.
13653 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13654             Alan Hayward  <alan.hayward@arm.com>
13655             David Sherwood  <david.sherwood@arm.com>
13657         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13658         so that both the length == 3 and length != 3 cases set up their
13659         own permute vectors.  Add comments explaining why we know the
13660         number of elements is constant.
13661         (vect_permute_load_chain): Likewise.
13663 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13664             Alan Hayward  <alan.hayward@arm.com>
13665             David Sherwood  <david.sherwood@arm.com>
13667         * machmode.h (mode_nunits): Change from unsigned char to
13668         poly_uint16_pod.
13669         (ONLY_FIXED_SIZE_MODES): New macro.
13670         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13671         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13672         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13673         New typedefs.
13674         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13675         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13676         or if measurement_type is not polynomial.
13677         * genmodes.c (ZERO_COEFFS): New macro.
13678         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13679         poly_uint16.
13680         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13681         Use ZERO_COEFFS when emitting initializers.
13682         * data-streamer.h (bp_pack_poly_value): New function.
13683         (bp_unpack_poly_value): Likewise.
13684         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13685         for GET_MODE_NUNITS.
13686         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13687         for GET_MODE_NUNITS.
13688         * tree.c (make_vector_type): Remove temporary shim and make
13689         the real function take the number of units as a poly_uint64
13690         rather than an int.
13691         (build_vector_type_for_mode): Handle polynomial nunits.
13692         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13693         * emit-rtl.c (const_vec_series_p_1): Likewise.
13694         (gen_rtx_CONST_VECTOR): Likewise.
13695         * fold-const.c (test_vec_duplicate_folding): Likewise.
13696         * genrecog.c (validate_pattern): Likewise.
13697         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13698         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13699         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13700         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13701         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13702         * rtlanal.c (subreg_get_info): Likewise.
13703         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13704         (vect_grouped_load_supported): Likewise.
13705         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13706         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13707         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13708         (simplify_const_unary_operation, simplify_binary_operation_1)
13709         (simplify_const_binary_operation, simplify_ternary_operation)
13710         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13711         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13712         instead of CONST_VECTOR_NUNITS.
13713         * varasm.c (output_constant_pool_2): Likewise.
13714         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13715         explicit-encoded elements in the XVEC for variable-length vectors.
13717 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13719         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13722             Alan Hayward  <alan.hayward@arm.com>
13723             David Sherwood  <david.sherwood@arm.com>
13725         * coretypes.h (fixed_size_mode): Declare.
13726         (fixed_size_mode_pod): New typedef.
13727         * builtins.h (target_builtins::x_apply_args_mode)
13728         (target_builtins::x_apply_result_mode): Change type to
13729         fixed_size_mode_pod.
13730         * builtins.c (apply_args_size, apply_result_size, result_vector)
13731         (expand_builtin_apply_args_1, expand_builtin_apply)
13732         (expand_builtin_return): Update accordingly.
13734 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13736         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13737         * cselib.c (cselib_hash_rtx): Likewise.
13738         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13739         CONST_VECTOR encoding.
13741 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13742             Jeff Law  <law@redhat.com>
13744         PR target/83641
13745         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13746         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13747         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13748         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13750         PR target/83641
13751         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13752         explicitly probe *sp in a noreturn function if there were any callee
13753         register saves or frame pointer is needed.
13755 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13757         PR debug/83621
13758         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13759         BLKmode for ternary, binary or unary expressions.
13761         PR debug/83645
13762         * var-tracking.c (delete_vta_debug_insn): New inline function.
13763         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13764         insns from get_insns () to NULL instead of each bb separately.
13765         Use delete_vta_debug_insn.  No longer static.
13766         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13767         delete_vta_debug_insns callers.
13768         * rtl.h (delete_vta_debug_insns): Declare.
13769         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13770         instead of variable_tracking_main.
13772 2018-01-03  Martin Sebor  <msebor@redhat.com>
13774         PR tree-optimization/83603
13775         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13776         arguments past the endof the argument list in functions declared
13777         without a prototype.
13778         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13779         Avoid checking when arguments are null.
13781 2018-01-03  Martin Sebor  <msebor@redhat.com>
13783         PR c/83559
13784         * doc/extend.texi (attribute const): Fix a typo.
13785         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13786         issuing -Wsuggest-attribute for void functions.
13788 2018-01-03  Martin Sebor  <msebor@redhat.com>
13790         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13791         offset_int::from instead of wide_int::to_shwi.
13792         (maybe_diag_overlap): Remove assertion.
13793         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13794         * gimple-ssa-sprintf.c (format_directive): Same.
13795         (parse_directive): Same.
13796         (sprintf_dom_walker::compute_format_length): Same.
13797         (try_substitute_return_value): Same.
13799 2018-01-03  Jeff Law  <law@redhat.com>
13801         PR middle-end/83654
13802         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13803         non-constant residual for zero at runtime and avoid probing in
13804         that case.  Reorganize code for trailing problem to mirror handling
13805         of the residual.
13807 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13809         PR tree-optimization/83501
13810         * tree-ssa-strlen.c (get_string_cst): New.
13811         (handle_char_store): Call get_string_cst.
13813 2018-01-03  Martin Liska  <mliska@suse.cz>
13815         PR tree-optimization/83593
13816         * tree-ssa-strlen.c: Include tree-cfg.h.
13817         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13818         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13819         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13820         to false.
13821         (strlen_dom_walker::before_dom_children): Call
13822         gimple_purge_dead_eh_edges. Dump tranformation with details
13823         dump flags.
13824         (strlen_dom_walker::before_dom_children): Update call by adding
13825         new argument cleanup_eh.
13826         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13828 2018-01-03  Martin Liska  <mliska@suse.cz>
13830         PR ipa/83549
13831         * cif-code.def (VARIADIC_THUNK): New enum value.
13832         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13833         thunks.
13835 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13837         * sse.md (mov<mode>_internal): Tighten condition for when to use
13838         vmovdqu<ssescalarsize> for TI and OI modes.
13840 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13842         Update copyright years.
13844 2018-01-03  Martin Liska  <mliska@suse.cz>
13846         PR ipa/83594
13847         * ipa-visibility.c (function_and_variable_visibility): Skip
13848         functions with noipa attribure.
13850 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13852         * gcc.c (process_command): Update copyright notice dates.
13853         * gcov-dump.c (print_version): Ditto.
13854         * gcov.c (print_version): Ditto.
13855         * gcov-tool.c (print_version): Ditto.
13856         * gengtype.c (create_file): Ditto.
13857         * doc/cpp.texi: Bump @copying's copyright year.
13858         * doc/cppinternals.texi: Ditto.
13859         * doc/gcc.texi: Ditto.
13860         * doc/gccint.texi: Ditto.
13861         * doc/gcov.texi: Ditto.
13862         * doc/install.texi: Ditto.
13863         * doc/invoke.texi: Ditto.
13865 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13867         * vector-builder.h (vector_builder::m_full_nelts): Change from
13868         unsigned int to poly_uint64.
13869         (vector_builder::full_nelts): Update prototype accordingly.
13870         (vector_builder::new_vector): Likewise.
13871         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13872         (vector_builder::operator ==): Likewise.
13873         (vector_builder::finalize): Likewise.
13874         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13875         Take the number of elements as a poly_uint64 rather than an
13876         unsigned int.
13877         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13878         from unsigned int to poly_uint64.
13879         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13880         (vec_perm_indices::new_vector): Likewise.
13881         (vec_perm_indices::length): Likewise.
13882         (vec_perm_indices::nelts_per_input): Likewise.
13883         (vec_perm_indices::input_nelts): Likewise.
13884         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13885         number of elements per input as a poly_uint64 rather than an
13886         unsigned int.  Use the original encoding for variable-length
13887         vectors, rather than clamping each individual element.
13888         For the second and subsequent elements in each pattern,
13889         clamp the step and base before clamping their sum.
13890         (vec_perm_indices::series_p): Handle polynomial element counts.
13891         (vec_perm_indices::all_in_range_p): Likewise.
13892         (vec_perm_indices_to_tree): Likewise.
13893         (vec_perm_indices_to_rtx): Likewise.
13894         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13895         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13896         (tree_vector_builder::new_binary_operation): Handle polynomial
13897         element counts.  Return false if we need to know the number
13898         of elements at compile time.
13899         * fold-const.c (fold_vec_perm): Punt if the number of elements
13900         isn't known at compile time.
13902 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13904         * vec-perm-indices.h (vec_perm_builder): Change element type
13905         from HOST_WIDE_INT to poly_int64.
13906         (vec_perm_indices::element_type): Update accordingly.
13907         (vec_perm_indices::clamp): Handle polynomial element_types.
13908         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13909         (vec_perm_indices::all_in_range_p): Likewise.
13910         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13911         than shwi trees.
13912         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13913         polynomial vec_perm_indices element types.
13914         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13915         * fold-const.c (fold_vec_perm): Likewise.
13916         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13917         * tree-vect-generic.c (lower_vec_perm): Likewise.
13918         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13919         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13920         element type to HOST_WIDE_INT.
13922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13923             Alan Hayward  <alan.hayward@arm.com>
13924             David Sherwood  <david.sherwood@arm.com>
13926         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13927         rather than an int.  Use plus_constant.
13928         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13929         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13931 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13932             Alan Hayward  <alan.hayward@arm.com>
13933             David Sherwood  <david.sherwood@arm.com>
13935         * calls.c (emit_call_1, expand_call): Change struct_value_size from
13936         a HOST_WIDE_INT to a poly_int64.
13938 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13939             Alan Hayward  <alan.hayward@arm.com>
13940             David Sherwood  <david.sherwood@arm.com>
13942         * calls.c (load_register_parameters): Cope with polynomial
13943         mode sizes.  Require a constant size for BLKmode parameters
13944         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
13945         forces a parameter to be padded at the lsb end in order to
13946         fill a complete number of words, require the parameter size
13947         to be ordered wrt UNITS_PER_WORD.
13949 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13950             Alan Hayward  <alan.hayward@arm.com>
13951             David Sherwood  <david.sherwood@arm.com>
13953         * reload1.c (spill_stack_slot_width): Change element type
13954         from unsigned int to poly_uint64_pod.
13955         (alter_reg): Treat mode sizes as polynomial.
13957 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13958             Alan Hayward  <alan.hayward@arm.com>
13959             David Sherwood  <david.sherwood@arm.com>
13961         * reload.c (complex_word_subreg_p): New function.
13962         (reload_inner_reg_of_subreg, push_reload): Use it.
13964 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13965             Alan Hayward  <alan.hayward@arm.com>
13966             David Sherwood  <david.sherwood@arm.com>
13968         * lra-constraints.c (process_alt_operands): Reject matched
13969         operands whose sizes aren't ordered.
13970         (match_reload): Refer to this check here.
13972 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13973             Alan Hayward  <alan.hayward@arm.com>
13974             David Sherwood  <david.sherwood@arm.com>
13976         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13977         that the mode size is in the set {1, 2, 4, 8, 16}.
13979 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13980             Alan Hayward  <alan.hayward@arm.com>
13981             David Sherwood  <david.sherwood@arm.com>
13983         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13984         Use plus_constant instead of gen_rtx_PLUS.
13986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13987             Alan Hayward  <alan.hayward@arm.com>
13988             David Sherwood  <david.sherwood@arm.com>
13990         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
13991         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
13992         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
13993         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
13994         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
13995         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
13996         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
13997         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
13998         * config/i386/i386.c (ix86_push_rounding): ...this new function.
13999         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
14000         a poly_int64.
14001         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
14002         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
14003         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
14004         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
14005         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
14006         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
14007         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
14008         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
14009         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
14010         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
14011         function.
14012         * expr.c (emit_move_resolve_push): Treat the input and result
14013         of PUSH_ROUNDING as a poly_int64.
14014         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
14015         (emit_push_insn): Likewise.
14016         * lra-eliminations.c (mark_not_eliminable): Likewise.
14017         * recog.c (push_operand): Likewise.
14018         * reload1.c (elimination_effects): Likewise.
14019         * rtlanal.c (nonzero_bits1): Likewise.
14020         * calls.c (store_one_arg): Likewise.  Require the padding to be
14021         known at compile time.
14023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14024             Alan Hayward  <alan.hayward@arm.com>
14025             David Sherwood  <david.sherwood@arm.com>
14027         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
14028         Use plus_constant instead of gen_rtx_PLUS.
14030 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14031             Alan Hayward  <alan.hayward@arm.com>
14032             David Sherwood  <david.sherwood@arm.com>
14034         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
14035         rather than an int.
14037 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14038             Alan Hayward  <alan.hayward@arm.com>
14039             David Sherwood  <david.sherwood@arm.com>
14041         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
14042         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
14043         via stack temporaries.  Treat the mode size as polynomial too.
14045 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14046             Alan Hayward  <alan.hayward@arm.com>
14047             David Sherwood  <david.sherwood@arm.com>
14049         * expr.c (expand_expr_real_2): When handling conversions involving
14050         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
14051         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
14052         as a poly_uint64 too.
14054 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14055             Alan Hayward  <alan.hayward@arm.com>
14056             David Sherwood  <david.sherwood@arm.com>
14058         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
14060 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14061             Alan Hayward  <alan.hayward@arm.com>
14062             David Sherwood  <david.sherwood@arm.com>
14064         * combine.c (can_change_dest_mode): Handle polynomial
14065         REGMODE_NATURAL_SIZE.
14066         * expmed.c (store_bit_field_1): Likewise.
14067         * expr.c (store_constructor): Likewise.
14068         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
14069         and polynomial REGMODE_NATURAL_SIZE.
14070         (gen_lowpart_common): Likewise.
14071         * reginfo.c (record_subregs_of_mode): Likewise.
14072         * rtlanal.c (read_modify_subreg_p): Likewise.
14074 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14075             Alan Hayward  <alan.hayward@arm.com>
14076             David Sherwood  <david.sherwood@arm.com>
14078         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
14079         numbers of elements.
14081 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14082             Alan Hayward  <alan.hayward@arm.com>
14083             David Sherwood  <david.sherwood@arm.com>
14085         * match.pd: Cope with polynomial numbers of vector elements.
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         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
14092         in a POINTER_PLUS_EXPR.
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         * omp-simd-clone.c (simd_clone_subparts): New function.
14099         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
14100         (ipa_simd_modify_function_body): Likewise.
14102 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14103             Alan Hayward  <alan.hayward@arm.com>
14104             David Sherwood  <david.sherwood@arm.com>
14106         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
14107         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
14108         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
14109         (expand_vector_condition, vector_element): Likewise.
14110         (subparts_gt): New function.
14111         (get_compute_type): Use subparts_gt.
14112         (count_type_subparts): Delete.
14113         (expand_vector_operations_1): Use subparts_gt instead of
14114         count_type_subparts.
14116 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14117             Alan Hayward  <alan.hayward@arm.com>
14118             David Sherwood  <david.sherwood@arm.com>
14120         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
14121         (vect_compile_time_alias): ...this new function.  Do the calculation
14122         on poly_ints rather than trees.
14123         (vect_prune_runtime_alias_test_list): Update call accordingly.
14125 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14126             Alan Hayward  <alan.hayward@arm.com>
14127             David Sherwood  <david.sherwood@arm.com>
14129         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
14130         numbers of units.
14131         (vect_schedule_slp_instance): Likewise.
14133 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14134             Alan Hayward  <alan.hayward@arm.com>
14135             David Sherwood  <david.sherwood@arm.com>
14137         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
14138         constant and extern definitions for variable-length vectors.
14139         (vect_get_constant_vectors): Note that the number of units
14140         is known to be constant.
14142 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14143             Alan Hayward  <alan.hayward@arm.com>
14144             David Sherwood  <david.sherwood@arm.com>
14146         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
14147         of units as polynomial.  Choose between WIDE and NARROW based
14148         on multiple_p.
14150 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14151             Alan Hayward  <alan.hayward@arm.com>
14152             David Sherwood  <david.sherwood@arm.com>
14154         * tree-vect-stmts.c (simd_clone_subparts): New function.
14155         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
14157 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14158             Alan Hayward  <alan.hayward@arm.com>
14159             David Sherwood  <david.sherwood@arm.com>
14161         * tree-vect-stmts.c (vectorizable_call): Treat the number of
14162         vectors as polynomial.  Use build_index_vector for
14163         IFN_GOMP_SIMD_LANE.
14165 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14166             Alan Hayward  <alan.hayward@arm.com>
14167             David Sherwood  <david.sherwood@arm.com>
14169         * tree-vect-stmts.c (get_load_store_type): Treat the number of
14170         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
14171         for variable-length vectors.
14172         (vectorizable_mask_load_store): Treat the number of units as
14173         polynomial, asserting that it is constant if the condition has
14174         already been enforced.
14175         (vectorizable_store, vectorizable_load): Likewise.
14177 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14178             Alan Hayward  <alan.hayward@arm.com>
14179             David Sherwood  <david.sherwood@arm.com>
14181         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
14182         of units as polynomial.  Punt if we can't tell at compile time
14183         which vector contains the final result.
14185 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14186             Alan Hayward  <alan.hayward@arm.com>
14187             David Sherwood  <david.sherwood@arm.com>
14189         * tree-vect-loop.c (vectorizable_induction): Treat the number
14190         of units as polynomial.  Punt on SLP inductions.  Use an integer
14191         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
14192         cast of such a series for variable-length floating-point
14193         reductions.
14195 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14196             Alan Hayward  <alan.hayward@arm.com>
14197             David Sherwood  <david.sherwood@arm.com>
14199         * tree.h (build_index_vector): Declare.
14200         * tree.c (build_index_vector): New function.
14201         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
14202         of units as polynomial, forcibly converting it to a constant if
14203         vectorizable_reduction has already enforced the condition.
14204         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
14205         to create a {1,2,3,...} vector.
14206         (vectorizable_reduction): Treat the number of units as polynomial.
14207         Choose vectype_in based on the largest scalar element size rather
14208         than the smallest number of units.  Enforce the restrictions
14209         relied on above.
14211 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14212             Alan Hayward  <alan.hayward@arm.com>
14213             David Sherwood  <david.sherwood@arm.com>
14215         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
14216         number of units as polynomial.
14218 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14219             Alan Hayward  <alan.hayward@arm.com>
14220             David Sherwood  <david.sherwood@arm.com>
14222         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
14223         * target.def (autovectorize_vector_sizes): Return the vector sizes
14224         by pointer, using vector_sizes rather than a bitmask.
14225         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
14226         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
14227         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
14228         Likewise.
14229         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
14230         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
14231         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
14232         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
14233         * omp-general.c (omp_max_vf): Likewise.
14234         * omp-low.c (omp_clause_aligned_alignment): Likewise.
14235         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
14236         * tree-vect-loop.c (vect_analyze_loop): Likewise.
14237         * tree-vect-slp.c (vect_slp_bb): Likewise.
14238         * doc/tm.texi: Regenerate.
14239         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
14240         to a poly_uint64.
14241         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
14242         the vector size as a poly_uint64 rather than an unsigned int.
14243         (current_vector_size): Change from an unsigned int to a poly_uint64.
14244         (get_vectype_for_scalar_type): Update accordingly.
14245         * tree.h (build_truth_vector_type): Take the size and number of
14246         units as a poly_uint64 rather than an unsigned int.
14247         (build_vector_type): Add a temporary overload that takes
14248         the number of units as a poly_uint64 rather than an unsigned int.
14249         * tree.c (make_vector_type): Likewise.
14250         (build_truth_vector_type): Take the number of units as a poly_uint64
14251         rather than an unsigned int.
14253 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14254             Alan Hayward  <alan.hayward@arm.com>
14255             David Sherwood  <david.sherwood@arm.com>
14257         * target.def (get_mask_mode): Take the number of units and length
14258         as poly_uint64s rather than unsigned ints.
14259         * targhooks.h (default_get_mask_mode): Update accordingly.
14260         * targhooks.c (default_get_mask_mode): Likewise.
14261         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14262         * doc/tm.texi: Regenerate.
14264 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14265             Alan Hayward  <alan.hayward@arm.com>
14266             David Sherwood  <david.sherwood@arm.com>
14268         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
14269         * omp-general.c (omp_max_vf): Likewise.
14270         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
14271         (expand_omp_simd): Handle polynomial safelen.
14272         * omp-low.c (omplow_simd_context): Add a default constructor.
14273         (omplow_simd_context::max_vf): Change from int to poly_uint64.
14274         (lower_rec_simd_input_clauses): Update accordingly.
14275         (lower_rec_input_clauses): Likewise.
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         * tree-vectorizer.h (vect_nunits_for_cost): New function.
14282         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
14283         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
14284         (vect_analyze_slp_cost): Likewise.
14285         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
14286         (vect_model_load_cost): Likewise.
14288 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14289             Alan Hayward  <alan.hayward@arm.com>
14290             David Sherwood  <david.sherwood@arm.com>
14292         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
14293         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
14294         from an unsigned int * to a poly_uint64_pod *.
14295         (calculate_unrolling_factor): New function.
14296         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
14298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14299             Alan Hayward  <alan.hayward@arm.com>
14300             David Sherwood  <david.sherwood@arm.com>
14302         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
14303         from an unsigned int to a poly_uint64.
14304         (_loop_vec_info::slp_unrolling_factor): Likewise.
14305         (_loop_vec_info::vectorization_factor): Change from an int
14306         to a poly_uint64.
14307         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
14308         (vect_get_num_vectors): New function.
14309         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
14310         (vect_get_num_copies): Use vect_get_num_vectors.
14311         (vect_analyze_data_ref_dependences): Change max_vf from an int *
14312         to an unsigned int *.
14313         (vect_analyze_data_refs): Change min_vf from an int * to a
14314         poly_uint64 *.
14315         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14316         than an unsigned HOST_WIDE_INT.
14317         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14318         (vect_analyze_data_ref_dependence): Change max_vf from an int *
14319         to an unsigned int *.
14320         (vect_analyze_data_ref_dependences): Likewise.
14321         (vect_compute_data_ref_alignment): Handle polynomial vf.
14322         (vect_enhance_data_refs_alignment): Likewise.
14323         (vect_prune_runtime_alias_test_list): Likewise.
14324         (vect_shift_permute_load_chain): Likewise.
14325         (vect_supportable_dr_alignment): Likewise.
14326         (dependence_distance_ge_vf): Take the vectorization factor as a
14327         poly_uint64 rather than an unsigned HOST_WIDE_INT.
14328         (vect_analyze_data_refs): Change min_vf from an int * to a
14329         poly_uint64 *.
14330         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
14331         vfm1 as a poly_uint64 rather than an int.  Make the same change
14332         for the returned bound_scalar.
14333         (vect_gen_vector_loop_niters): Handle polynomial vf.
14334         (vect_do_peeling): Likewise.  Update call to
14335         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
14336         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
14337         be constant.
14338         * tree-vect-loop.c (vect_determine_vectorization_factor)
14339         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
14340         (vect_get_known_peeling_cost): Likewise.
14341         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
14342         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
14343         (vect_transform_loop): Likewise.  Use the lowest possible VF when
14344         updating the upper bounds of the loop.
14345         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
14346         rather than an int.
14347         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
14348         polynomial unroll factors.
14349         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
14350         (vect_make_slp_decision): Likewise.
14351         (vect_supported_load_permutation_p): Likewise, and polynomial
14352         vf too.
14353         (vect_analyze_slp_cost): Handle polynomial vf.
14354         (vect_slp_analyze_node_operations): Likewise.
14355         (vect_slp_analyze_bb_1): Likewise.
14356         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14357         than an unsigned HOST_WIDE_INT.
14358         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
14359         (vectorizable_load): Handle polynomial vf.
14360         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
14361         a poly_uint64.
14362         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
14364 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14365             Alan Hayward  <alan.hayward@arm.com>
14366             David Sherwood  <david.sherwood@arm.com>
14368         * match.pd: Handle bit operations involving three constants
14369         and try to fold one pair.
14371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14373         * tree-vect-loop-manip.c: Include gimple-fold.h.
14374         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
14375         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
14376         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
14377         Add a path that uses a step of VF instead of 1, but disable it
14378         for now.
14379         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
14380         and niters_no_overflow parameters.  Update calls to
14381         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
14382         Create a new SSA name if the latter choses to use a ste other
14383         than zero, and return it via niters_vector_mult_vf_var.
14384         * tree-vect-loop.c (vect_transform_loop): Update calls to
14385         vect_do_peeling, vect_gen_vector_loop_niters and
14386         slpeel_make_loop_iterate_ntimes.
14387         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
14388         (vect_gen_vector_loop_niters): Update declarations after above changes.
14390 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
14392         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
14393         128-bit round to integer instructions.
14394         (ceil<mode>2): Likewise.
14395         (btrunc<mode>2): Likewise.
14396         (round<mode>2): Likewise.
14398 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14400         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
14401         unaligned VSX load/store on P8/P9.
14402         (expand_block_clear): Allow the use of unaligned VSX
14403         load/store on P8/P9.
14405 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14407         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
14408         New function.
14409         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
14410         swap associated with both a load and a store.
14412 2018-01-02  Andrew Waterman  <andrew@sifive.com>
14414         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
14415         * config/riscv/riscv.md (clear_cache): Use it.
14417 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
14419         * web.c: Remove out-of-date comment.
14421 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14423         * expr.c (fixup_args_size_notes): Check that any existing
14424         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
14425         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
14426         (emit_single_push_insn): ...here.
14428 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14430         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
14431         (const_vector_encoded_nelts): New function.
14432         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
14433         (const_vector_int_elt, const_vector_elt): Declare.
14434         * emit-rtl.c (const_vector_int_elt_1): New function.
14435         (const_vector_elt): Likewise.
14436         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14437         of CONST_VECTOR_ELT.
14439 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14441         * expr.c: Include rtx-vector-builder.h.
14442         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14443         directly on the tree encoding.
14444         (const_vector_from_tree): Likewise.
14445         * optabs.c: Include rtx-vector-builder.h.
14446         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14447         sequence of "u" values.
14448         * vec-perm-indices.c: Include rtx-vector-builder.h.
14449         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14450         directly on the vec_perm_indices encoding.
14452 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14454         * doc/rtl.texi (const_vector): Describe new encoding scheme.
14455         * Makefile.in (OBJS): Add rtx-vector-builder.o.
14456         * rtx-vector-builder.h: New file.
14457         * rtx-vector-builder.c: Likewise.
14458         * rtl.h (rtx_def::u2): Add a const_vector field.
14459         (CONST_VECTOR_NPATTERNS): New macro.
14460         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14461         (CONST_VECTOR_DUPLICATE_P): Likewise.
14462         (CONST_VECTOR_STEPPED_P): Likewise.
14463         (CONST_VECTOR_ENCODED_ELT): Likewise.
14464         (const_vec_duplicate_p): Check for a duplicated vector encoding.
14465         (unwrap_const_vec_duplicate): Likewise.
14466         (const_vec_series_p): Check for a non-duplicated vector encoding.
14467         Say that the function only returns true for integer vectors.
14468         * emit-rtl.c: Include rtx-vector-builder.h.
14469         (gen_const_vec_duplicate_1): Delete.
14470         (gen_const_vector): Call gen_const_vec_duplicate instead of
14471         gen_const_vec_duplicate_1.
14472         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14473         (gen_const_vec_duplicate): Use rtx_vector_builder.
14474         (gen_const_vec_series): Likewise.
14475         (gen_rtx_CONST_VECTOR): Likewise.
14476         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
14477         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14478         Build a new vector rather than modifying a CONST_VECTOR in-place.
14479         (handle_special_swappables): Update call accordingly.
14480         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14481         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14482         Build a new vector rather than modifying a CONST_VECTOR in-place.
14483         (handle_special_swappables): Update call accordingly.
14485 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14487         * simplify-rtx.c (simplify_const_binary_operation): Use
14488         CONST_VECTOR_ELT instead of XVECEXP.
14490 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14492         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
14493         the selector elements to be different from the data elements
14494         if the selector is a VECTOR_CST.
14495         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
14496         ssizetype for the selector.
14498 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14500         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
14501         before testing each element individually.
14502         * tree-vect-generic.c (lower_vec_perm): Likewise.
14504 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14506         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
14507         * selftest-run-tests.c (selftest::run_tests): Call it.
14508         * vector-builder.h (vector_builder::operator ==): New function.
14509         (vector_builder::operator !=): Likewise.
14510         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
14511         (vec_perm_indices::all_from_input_p): New function.
14512         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14513         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
14514         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
14515         instead of reading the VECTOR_CST directly.  Detect whether both
14516         vector inputs are the same before constructing the vec_perm_indices,
14517         and update the number of inputs argument accordingly.  Use the
14518         utility functions added above.  Only construct sel2 if we need to.
14520 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14522         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
14523         the broadcast of the low byte.
14524         (expand_mult_highpart): Use an explicit encoding for the permutes.
14525         * optabs-query.c (can_mult_highpart_p): Likewise.
14526         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14527         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14528         (vectorizable_bswap): Likewise.
14529         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
14530         explicit encoding for the power-of-2 permutes.
14531         (vect_permute_store_chain): Likewise.
14532         (vect_grouped_load_supported): Likewise.
14533         (vect_permute_load_chain): Likewise.
14535 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14537         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
14538         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
14539         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
14540         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14541         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14542         (vect_gen_perm_mask_any): Likewise.
14544 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14546         * int-vector-builder.h: New file.
14547         * vec-perm-indices.h: Include int-vector-builder.h.
14548         (vec_perm_indices): Redefine as an int_vector_builder.
14549         (auto_vec_perm_indices): Delete.
14550         (vec_perm_builder): Redefine as a stand-alone class.
14551         (vec_perm_indices::vec_perm_indices): New function.
14552         (vec_perm_indices::clamp): Likewise.
14553         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14554         (vec_perm_indices::new_vector): New function.
14555         (vec_perm_indices::new_expanded_vector): Update for new
14556         vec_perm_indices class.
14557         (vec_perm_indices::rotate_inputs): New function.
14558         (vec_perm_indices::all_in_range_p): Operate directly on the
14559         encoded form, without computing elided elements.
14560         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14561         encoding.  Update for new vec_perm_indices class.
14562         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14563         the given vec_perm_builder.
14564         (expand_vec_perm_var): Update vec_perm_builder constructor.
14565         (expand_mult_highpart): Use vec_perm_builder instead of
14566         auto_vec_perm_indices.
14567         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14568         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
14569         or double series encoding as appropriate.
14570         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14571         vec_perm_indices instead of auto_vec_perm_indices.
14572         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14573         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14574         (vect_permute_store_chain): Likewise.
14575         (vect_grouped_load_supported): Likewise.
14576         (vect_permute_load_chain): Likewise.
14577         (vect_shift_permute_load_chain): Likewise.
14578         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14579         (vect_transform_slp_perm_load): Likewise.
14580         (vect_schedule_slp_instance): Likewise.
14581         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14582         (vectorizable_mask_load_store): Likewise.
14583         (vectorizable_bswap): Likewise.
14584         (vectorizable_store): Likewise.
14585         (vectorizable_load): Likewise.
14586         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14587         vec_perm_indices instead of auto_vec_perm_indices.  Use
14588         tree_to_vec_perm_builder to read the vector from a tree.
14589         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14590         vec_perm_builder instead of a vec_perm_indices.
14591         (have_whole_vector_shift): Use vec_perm_builder and
14592         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
14593         truncation to calc_vec_perm_mask_for_shift.
14594         (vect_create_epilog_for_reduction): Likewise.
14595         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14596         from auto_vec_perm_indices to vec_perm_indices.
14597         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14598         instead of changing individual elements.
14599         (aarch64_vectorize_vec_perm_const): Use new_vector to install
14600         the vector in d.perm.
14601         * config/arm/arm.c (expand_vec_perm_d::perm): Change
14602         from auto_vec_perm_indices to vec_perm_indices.
14603         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14604         instead of changing individual elements.
14605         (arm_vectorize_vec_perm_const): Use new_vector to install
14606         the vector in d.perm.
14607         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14608         Update vec_perm_builder constructor.
14609         (rs6000_expand_interleave): Likewise.
14610         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14611         (rs6000_expand_interleave): Likewise.
14613 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14615         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14616         to qimode could truncate the indices.
14617         * optabs.c (expand_vec_perm_var): Likewise.
14619 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14621         * Makefile.in (OBJS): Add vec-perm-indices.o.
14622         * vec-perm-indices.h: New file.
14623         * vec-perm-indices.c: Likewise.
14624         * target.h (vec_perm_indices): Replace with a forward class
14625         declaration.
14626         (auto_vec_perm_indices): Move to vec-perm-indices.h.
14627         * optabs.h: Include vec-perm-indices.h.
14628         (expand_vec_perm): Delete.
14629         (selector_fits_mode_p, expand_vec_perm_var): Declare.
14630         (expand_vec_perm_const): Declare.
14631         * target.def (vec_perm_const_ok): Replace with...
14632         (vec_perm_const): ...this new hook.
14633         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14634         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14635         * doc/tm.texi: Regenerate.
14636         * optabs.def (vec_perm_const): Delete.
14637         * doc/md.texi (vec_perm_const): Likewise.
14638         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14639         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14640         expand_vec_perm for constant permutation vectors.  Assert that
14641         the mode of variable permutation vectors is the integer equivalent
14642         of the mode that is being permuted.
14643         * optabs-query.h (selector_fits_mode_p): Declare.
14644         * optabs-query.c: Include vec-perm-indices.h.
14645         (selector_fits_mode_p): New function.
14646         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14647         is defined, instead of checking whether the vec_perm_const_optab
14648         exists.  Use targetm.vectorize.vec_perm_const instead of
14649         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
14650         fit in the vector mode before using a variable permute.
14651         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14652         vec_perm_indices instead of an rtx.
14653         (expand_vec_perm): Replace with...
14654         (expand_vec_perm_const): ...this new function.  Take the selector
14655         as a vec_perm_indices rather than an rtx.  Also take the mode of
14656         the selector.  Update call to shift_amt_for_vec_perm_mask.
14657         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14658         Use vec_perm_indices::new_expanded_vector to expand the original
14659         selector into bytes.  Check whether the indices fit in the vector
14660         mode before using a variable permute.
14661         (expand_vec_perm_var): Make global.
14662         (expand_mult_highpart): Use expand_vec_perm_const.
14663         * fold-const.c: Includes vec-perm-indices.h.
14664         * tree-ssa-forwprop.c: Likewise.
14665         * tree-vect-data-refs.c: Likewise.
14666         * tree-vect-generic.c: Likewise.
14667         * tree-vect-loop.c: Likewise.
14668         * tree-vect-slp.c: Likewise.
14669         * tree-vect-stmts.c: Likewise.
14670         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14671         Delete.
14672         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14673         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14674         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14675         (aarch64_vectorize_vec_perm_const): ...this new function.
14676         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14677         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14678         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14679         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14680         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14681         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14682         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14683         into...
14684         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14685         check for NEON modes.
14686         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14687         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14688         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14689         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14690         into...
14691         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14692         the old VEC_PERM_CONST conditions.
14693         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14694         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14695         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14696         (ia64_vectorize_vec_perm_const_ok): Merge into...
14697         (ia64_vectorize_vec_perm_const): ...this new function.
14698         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14699         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14700         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14701         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14702         * config/mips/mips.c (mips_expand_vec_perm_const)
14703         (mips_vectorize_vec_perm_const_ok): Merge into...
14704         (mips_vectorize_vec_perm_const): ...this new function.
14705         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14706         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14707         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14708         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14709         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14710         (rs6000_expand_vec_perm_const): Delete.
14711         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14712         Delete.
14713         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14714         (altivec_expand_vec_perm_const_le): Take each operand individually.
14715         Operate on constant selectors rather than rtxes.
14716         (altivec_expand_vec_perm_const): Likewise.  Update call to
14717         altivec_expand_vec_perm_const_le.
14718         (rs6000_expand_vec_perm_const): Delete.
14719         (rs6000_vectorize_vec_perm_const_ok): Delete.
14720         (rs6000_vectorize_vec_perm_const): New function.
14721         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14722         an element count and rtx array.
14723         (rs6000_expand_extract_even): Update call accordingly.
14724         (rs6000_expand_interleave): Likewise.
14725         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14726         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14727         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14728         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14729         (rs6000_expand_vec_perm_const): Delete.
14730         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14731         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14732         (altivec_expand_vec_perm_const_le): Take each operand individually.
14733         Operate on constant selectors rather than rtxes.
14734         (altivec_expand_vec_perm_const): Likewise.  Update call to
14735         altivec_expand_vec_perm_const_le.
14736         (rs6000_expand_vec_perm_const): Delete.
14737         (rs6000_vectorize_vec_perm_const_ok): Delete.
14738         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14739         reference to the SPE evmerge intructions.
14740         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14741         an element count and rtx array.
14742         (rs6000_expand_extract_even): Update call accordingly.
14743         (rs6000_expand_interleave): Likewise.
14744         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14745         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14746         new function.
14747         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14749 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14751         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14752         vector mode and that that mode matches the mode of the data
14753         being permuted.
14754         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14755         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14756         directly using expand_vec_perm_1 when forcing selectors into
14757         registers.
14758         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14760 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14762         * optabs-query.h (can_vec_perm_p): Delete.
14763         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14764         * optabs-query.c (can_vec_perm_p): Split into...
14765         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14766         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14767         particular selector is valid.
14768         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14769         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14770         (vect_grouped_load_supported): Likewise.
14771         (vect_shift_permute_load_chain): Likewise.
14772         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14773         (vect_transform_slp_perm_load): Likewise.
14774         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14775         (vectorizable_bswap): Likewise.
14776         (vect_gen_perm_mask_checked): Likewise.
14777         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14778         implementations of variable permutation vectors into account
14779         when deciding which selector to use.
14780         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14781         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14782         with a false third argument.
14783         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14784         to test whether the constant selector is valid and can_vec_perm_var_p
14785         to test whether a variable selector is valid.
14787 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14789         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14790         * optabs-query.c (can_vec_perm_p): Likewise.
14791         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14792         instead of vec_perm_indices.
14793         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14794         (vect_gen_perm_mask_checked): Likewise,
14795         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14796         (vect_gen_perm_mask_checked): Likewise,
14798 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14800         * optabs-query.h (qimode_for_vec_perm): Declare.
14801         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14802         (qimode_for_vec_perm): ...this new function.
14803         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14805 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14807         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14808         does not have a conditional at the top.
14810 2018-01-02  Richard Biener  <rguenther@suse.de>
14812         * ipa-inline.c (big_speedup_p): Fix expression.
14814 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14816         PR target/81616
14817         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14818         for generic 4->6.
14820 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14822         PR target/81616
14823         Generic tuning.
14824         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14825         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14826         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14827         cond_taken_branch_cost 3->4.
14829 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14831         PR tree-optimization/83581
14832         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14833         TODO_cleanup_cfg if any changes have been made.
14835         PR middle-end/83608
14836         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14837         convert_modes if target mode has the right side, but different mode
14838         class.
14840         PR middle-end/83609
14841         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14842         last argument when extracting from CONCAT.  If either from_real or
14843         from_imag is NULL, use expansion through memory.  If result is not
14844         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14845         the parts directly to inner mode, if even that fails, use expansion
14846         through memory.
14848         PR middle-end/83623
14849         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14850         check for bswap in mode rather than HImode and use that in expand_unop
14851         too.
14853 Copyright (C) 2018 Free Software Foundation, Inc.
14855 Copying and distribution of this file, with or without modification,
14856 are permitted in any medium without royalty provided the copyright
14857 notice and this notice are preserved.