2018-06-01 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blob7adafede7ec77c82a18f592371595a0390a975a7
1 2018-06-01  Richard Biener  <rguenther@suse.de>
3         PR ipa/85960
4         * tree-ssa-structalias.c (get_function_part_constraint):
5         Handle NULL fi->decl.
6         (find_func_aliases_for_call): Properly handle indirect
7         fi from direct call.
8         (find_func_clobbers): Likewise.
9         (ipa_pta_execute): Likewise.
10         (create_variable_info_for): For functions that are ifunc_resolver
11         resolve to a varinfo that contains the result of the resolver
12         call.
13         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14         aliases.
16 2018-05-31  Michael Collison  <michael.collison@arm.com>
18         * config/aarch64/aarch64.md:
19         (*fix_to_zero_extenddfdi2): New pattern.
20         * gcc.target/aarch64/fix_extend1.c: New testcase.
22 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
24         PR middle-end/78809
25         PR middle-end/83026
26         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
27         and BUILT_IN_STRNCMP_EQ.
28         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
29         BUILT_IN_STRNCMP_EQ.
30         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
31         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
32         (gimple_fold_builtin): Likewise.
33         * tree-ssa-strlen.c (compute_string_length): New function.
34         (determine_min_obsize): New function.
35         (handle_builtin_string_cmp): New function to handle calls to
36         string compare functions.
37         (strlen_optimize_stmt): Add handling to builtin string compare
38         calls.
39         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
40         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
41         * tree.c (build_common_builtin_nodes): Add new defines of
42         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
44 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
46         PR target/85984
47         * bb-reorder.c (pass_partition_blocks::gate): Return false for
48         functions with naked attribute.
50 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
52         * config/i386/sse.md (avx_vec_concat<mode>):
53         Substitute concat_tg_mode mode attribute with xtg_mode.
54         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
55         (concat_tg_mode): Remove mode attribute.
57 2018-05-31  Martin Sebor  <msebor@redhat.com>
59         PR c/82063
60         * calls.c (alloc_max_size): Correct a logic error/typo.
61         Treat excessive arguments as infinite.  Warn for invalid arguments.
62         * doc/invoke.texi (-Walloc-size-larger-than): Update.
64 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
66         PR target/85829
67         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
68         and movx for Haswell.
70 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
71             Cesar Philippidis  <cesar@codesourcery.com>
73         PR middle-end/85879
74         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
75         when emitting error on private/firstprivate reductions.
76         * omp-low.c (lower_omp_target): Avoid reference-type processing
77         on pointers for firstprivate clause.
79 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
81         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
82         (st1x2): Likewise.
83         (st1x3): Likewise.
84         * config/aarch64/aarch64-simd.md
85         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
86         (aarch64_ld1_x3_<mode>): Likewise
87         (aarch64_st1x2<VALLDIF:mode>): Likewise
88         (aarch64_st1_x2_<mode>): Likewise
89         (aarch64_st1x3<VALLDIF:mode>): Likewise
90         (aarch64_st1_x3_<mode>): Likewise
91         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
92         (vld1_s8_x3): Likewise.
93         (vld1_u16_x3): Likewise.
94         (vld1_s16_x3): Likewise.
95         (vld1_u32_x3): Likewise.
96         (vld1_s32_x3): Likewise.
97         (vld1_u64_x3): Likewise.
98         (vld1_s64_x3): Likewise.
99         (vld1_f16_x3): Likewise.
100         (vld1_f32_x3): Likewise.
101         (vld1_f64_x3): Likewise.
102         (vld1_p8_x3): Likewise.
103         (vld1_p16_x3): Likewise.
104         (vld1_p64_x3): Likewise.
105         (vld1q_u8_x3): Likewise.
106         (vld1q_s8_x3): Likewise.
107         (vld1q_u16_x3): Likewise.
108         (vld1q_s16_x3): Likewise.
109         (vld1q_u32_x3): Likewise.
110         (vld1q_s32_x3): Likewise.
111         (vld1q_u64_x3): Likewise.
112         (vld1q_s64_x3): Likewise.
113         (vld1q_f16_x3): Likewise.
114         (vld1q_f32_x3): Likewise.
115         (vld1q_f64_x3): Likewise.
116         (vld1q_p8_x3): Likewise.
117         (vld1q_p16_x3): Likewise.
118         (vld1q_p64_x3): Likewise.
119         (vst1_s64_x2): Likewise.
120         (vst1_u64_x2): Likewise.
121         (vst1_f64_x2): Likewise.
122         (vst1_s8_x2): Likewise.
123         (vst1_p8_x2): Likewise.
124         (vst1_s16_x2): Likewise.
125         (vst1_p16_x2): Likewise.
126         (vst1_s32_x2): Likewise.
127         (vst1_u8_x2): Likewise.
128         (vst1_u16_x2): Likewise.
129         (vst1_u32_x2): Likewise.
130         (vst1_f16_x2): Likewise.
131         (vst1_f32_x2): Likewise.
132         (vst1_p64_x2): Likewise.
133         (vst1q_s8_x2): Likewise.
134         (vst1q_p8_x2): Likewise.
135         (vst1q_s16_x2): Likewise.
136         (vst1q_p16_x2): Likewise.
137         (vst1q_s32_x2): Likewise.
138         (vst1q_s64_x2): Likewise.
139         (vst1q_u8_x2): Likewise.
140         (vst1q_u16_x2): Likewise.
141         (vst1q_u32_x2): Likewise.
142         (vst1q_u64_x2): Likewise.
143         (vst1q_f16_x2): Likewise.
144         (vst1q_f32_x2): Likewise.
145         (vst1q_f64_x2): Likewise.
146         (vst1q_p64_x2): Likewise.
147         (vst1_s64_x3): Likewise.
148         (vst1_u64_x3): Likewise.
149         (vst1_f64_x3): Likewise.
150         (vst1_s8_x3): Likewise.
151         (vst1_p8_x3): Likewise.
152         (vst1_s16_x3): Likewise.
153         (vst1_p16_x3): Likewise.
154         (vst1_s32_x3): Likewise.
155         (vst1_u8_x3): Likewise.
156         (vst1_u16_x3): Likewise.
157         (vst1_u32_x3): Likewise.
158         (vst1_f16_x3): Likewise.
159         (vst1_f32_x3): Likewise.
160         (vst1_p64_x3): Likewise.
161         (vst1q_s8_x3): Likewise.
162         (vst1q_p8_x3): Likewise.
163         (vst1q_s16_x3): Likewise.
164         (vst1q_p16_x3): Likewise.
165         (vst1q_s32_x3): Likewise.
166         (vst1q_s64_x3): Likewise.
167         (vst1q_u8_x3): Likewise.
168         (vst1q_u16_x3): Likewise.
169         (vst1q_u32_x3): Likewise.
170         (vst1q_u64_x3): Likewise.
171         (vst1q_f16_x3): Likewise.
172         (vst1q_f32_x3): Likewise.
173         (vst1q_f64_x3): Likewise.
174         (vst1q_p64_x3): Likewise.
176 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
178         * config/msp430/msp430.c (msp430_output_labelref): Prepend
179         user_label_prefix to name.
181         * tree-core.h: Update comment about the format of NAME string
182         passed to handler in attribute_spec.
184         * config/msp430/msp430.md: Remove erroneous subreg expression from
185         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
186         zero_extend{q,h}isi2.
188 2018-05-30  Borislav Petkov  <bp@suse.de>
190         * doc/extend.texi: Document some architecture specific
191         constraints and sort entries.
193 2018-05-30  Martin Sebor  <msebor@redhat.com>
195         PR middle-end/85369
196         * builtins.c (expand_builtin_stpcpy_1): New function.
197         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
198         only if the former succeeds.
200 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
202         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
203         in saphira.
205 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
207         * doc/invoke.texi (-flinker-output): Document
209 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
211         * passes.c (ipa_write_summaries): Only modify statements if body
212         is in memory.
213         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
214         incrementally linking.
215         (ipa_passes): Likewise.
216         * lto-cgraph.c (lto_output_node): When incrementally linking do not
217         pass down resolution info.
218         * common.opt (flag_incremental_link): Update info.
219         * gcc.c (plugin specs): Turn flinker-output=* to
220         -plugin-opt=-linker-output-known
221         * toplev.c (compile_file): Also cut compilation when doing incremental
222         link.
223         * flag-types. (enum lto_partition_model): Add
224         LTO_LINKER_OUTPUT_NOLTOREL.
225         (invoke.texi): Add -flinker-output docs.
226         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
227         link same way as WPA; do not stream in dead initializers.
229         * dwarf2out.c (dwarf2out_die_ref_for_decl,
230         darf2out_register_external_decl): Support incremental link.
232 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
234         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
236 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
238         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
239         it down to simple_object_copy_lto_debug_sections.
240         (run_gcc): Determine incremental LTO link time and configure
241         lto1 into non-wpa mode, disable renaming of debug sections.
243 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
245         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
246         descriptions of various incorrectly documented functions.
248 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
250         Revert:
251         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
252         address check not strict.
254 2018-05-30  Richard Biener  <rguenther@suse.de>
256         PR tree-optimization/85964
257         * tracer.c (better_p): Drop initialized count check, we only
258         call the function with initialized counts now.
259         (find_best_successor): Do find a best edge if one
260         has uninitialized count.
261         (find_best_predecessor): Likewise.  Do BB frequency check only
262         if count is initialized.
264 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
266         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
267         (aarch64_ldrstr_offset_compare): New.
268         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
269         load/store orderings.
270         (aarch64_gen_adjusted_ldpstp): Likewise.
272 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
274         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
275         Check for subset of GENERAL_REGS and FP_REGS.
276         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
277         r=w alternative.
279 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
281         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
282         and wi::to_poly_offset.  Add the current offset and then check
283         whether the sum fits, rather than using an unchecked addition of
284         a checked term.  Check for a shwi rather than a uhwi.
285         * expr.c (get_bit_range): Use tree_to_poly_uint64.
286         (store_constructor): Use poly_int_tree_p.
287         (expand_expr_real_1): Likewise.
288         * function.c (assign_temp): Likewise.
289         * fold-const.c (const_binop): Use poly_int_tree_p and
290         wi::to_poly_offset.
291         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
292         division.
293         * ipa-icf-gimple.c (func_checker::compare_operand): Use
294         to_poly_offset for MEM offsets.
295         * ipa-icf.c (sem_variable::equals): Likewise.
296         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
297         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
298         wi::to_poly_offset for BIT_FIELD_REF offsets.
299         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
300         wi::to_poly_offset.
301         * var-tracking.c (emit_note_insn_var_location): Use
302         tree_to_poly_uint64.
304 2018-05-29  Jim Wilson  <jimw@sifive.com>
306         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
308 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
310         PR target/85950
311         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
312         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
313         sequence.
314         (sse4_1_round<mode>2): Use nonimmediate_operand
315         for operand 1 predicate.
317 2018-05-29  Martin Sebor  <msebor@redhat.com>
318             Richard Biener  <rguenther@suse.de>
320         PR testsuite/85888
321         * calls.c (get_size_range): Call determine_value_range instead
322         of get_value_range..
323         * tree-vrp.h (determine_value_range): Declared new function.
324         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
326 2018-05-29  Richard Biener  <rguenther@suse.de>
328         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
329         sure to use non-pattern stmts for get_earlier_stmt arguments.
330         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
331         called on pattern stmts.
332         (get_later_stmt): Likewise.
334 2018-05-29  Martin Liska  <mliska@suse.cz>
336         PR gcov-profile/85759
337         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
338         env variables.
340 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
342         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
343         VEC_UNPACK_*_EXPR.
344         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
345         VEC_PACK_*_EXPR.
347         PR target/85918
348         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
349         VEC_PACK_FLOAT_EXPR): New tree codes.
350         * tree-pretty-print.c (op_code_prio): Handle
351         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
352         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
353         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
354         * tree-inline.c (estimate_operator_cost): Likewise.
355         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
356         * fold-const.c (const_binop): Likewise.
357         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
358         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
359         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
360         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
361         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
362         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
363         * expr.c (expand_expr_real_2): Likewise.
364         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
365         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
366         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
367         optabs.
368         * optabs.c (expand_widen_pattern_expr): For
369         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
370         sign from result type rather than operand's type.
371         (expand_binop_directly): For vec_packu_float_optab and
372         vec_packs_float_optab allow result type to be different from operand's
373         type.
374         * optabs-tree.c (optab_for_tree_code): Handle
375         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
376         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
377         * tree-vect-generic.c (expand_vector_operations_1):  Handle
378         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
379         VEC_PACK_FLOAT_EXPR.
380         * tree-vect-stmts.c (supportable_widening_operation): Handle
381         FIX_TRUNC_EXPR.
382         (supportable_narrowing_operation): Handle FLOAT_EXPR.
383         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
384         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
385         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
386         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
387         mode attributes.
388         (vec_pack<floatprefix>_float_<mode>): New expander.
389         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
390         attributes.
391         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
392         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
393         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
394         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
395         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
396         Document.
397         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
398         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
399         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
400         VEC_PACK_FLOAT_EXPR): Document.
402 2018-05-29  Richard Biener  <rguenther@suse.de>
404         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
405         member.
406         (stmt_vec_info_vec): Make pointer.
407         (init_stmt_vec_info_vec): Remove.
408         (free_stmt_vec_info_vec): Likewise.
409         (set_stmt_vec_info_vec): New function.
410         (free_stmt_vec_infos): Likewise.
411         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
412         (set_vinfo_for_stmt): Likewise.
413         (get_earlier_stmt): Likewise.
414         (get_later_stmt): Likewise.
415         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
416         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
417         (vec_info::~vec_info): Free stmt_vec_infos.
418         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
419         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
420         (pass_slp_vectorize::execute): Likewise.
421         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
422         (free_stmt_vec_info_vec): Likewise.
423         (set_stmt_vec_info_vec): New function.
424         (free_stmt_vec_infos): Likewise.
425         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
426         the global stmt_vec_info_vec.
427         * tree-parloops.c (gather_scalar_reductions): Use
428         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
429         vector.
431 2018-05-29  Richard Biener  <rguenther@suse.de>
433         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
435 2018-05-29  Martin Liska  <mliska@suse.cz>
436             David Malcolm  <dmalcolm@redhat.com>
438         * vec.c (test_reverse): New.
439         (vec_c_tests): Add new test.
440         * vec.h (vl_ptr>::reverse): New function.
442 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
444         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
446         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
447         and later.
449 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
451         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
453 2018-05-28  Richard Biener  <rguenther@suse.de>
455         PR tree-optimization/85933
456         * tree-vect-data-refs.c (vect_record_base_alignments): Only
457         look at stmts marked as vectorizable.
459 2018-05-28  Richard Biener  <rguenther@suse.de>
461         PR tree-optimization/85934
462         * tree-vect-generic.c (expand_vector_operations_1): Hoist
463         vector boolean check before scalar optimization.
465 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
467         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
468         for armv5te.
470 2018-05-28  Mark Wielaard  <mark@klomp.org>
472         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
473         if it is an expression containing a minus sign.
475 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
477         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
479 2018-05-27  Paul Koning  <ni1d@arrl.net>
481         * config/pdp11/pdp11.md (truncsihi2): Remove.
483 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
484             Chung-Ju Wu  <jasonwucj@gmail.com>
486         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
487         implementation.
488         (unaligned_store_dw): Ditto.
489         * config/nds32/nds32-memory-manipulation.c
490         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
491         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
492         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
493         (emit_setmem_word_loop): Rename to ...
494         (emit_setmem_doubleword_loop): ... this.
495         (nds32_gen_dup_4_byte_to_word_value): New function.
496         (nds32_gen_dup_8_byte_to_double_word_value): New function.
497         (nds32_expand_setmem_loop): Refine implementation.
498         (nds32_expand_setmem_loop_v3m): Ditto.
499         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
500         pattern.
502 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
504         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
506 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
508         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
509         (nds32_init_machine_status): Initialize machine->attr_naked_p and
510         machine->attr_no_prologue_p.
511         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
512         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
513         (nds32_expand_epilogue): Consider attr_naked_p.
514         (nds32_expand_epilogue_v3pop): Likewise.
515         (nds32_can_use_return_insn): Likewise.
516         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
517         attr_no_prologue_p fields.
518         * config/nds32/nds32.opt (mret-in-naked-func): New option.
520 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
522         PR target/85918
523         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
524         attributes.
525         * config/i386/sse.md
526         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
527         Rename to ...
528         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
529         ... this.
530         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
531         Rename to ...
532         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
533         ... this.
534         (*<floatsuffix>floatv2div2sf2): Rename to ...
535         (*float<floatunssuffix>v2div2sf2): ... this.
536         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
537         (float<floatunssuffix>v2div2sf2_mask): ... this.
538         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
539         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
540         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
541         to ...
542         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
543         ... this.
544         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
545         Rename to ...
546         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
547         ... this.
548         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
549         Rename to ...
550         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
551         ... this.
552         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
553         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
554         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
555         gen_ufix_truncv8dfv8si2.
556         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
557         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
558         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
559         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
560         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
561         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
562         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
563         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
565 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
567         PR target/85900
568         PR target/85345
569         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
571 2018-05-25  Jim Wilson  <jimw@sifive.com>
573         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
574         * config/riscv/riscv.c (struct machine_function): Add
575         interrupt_handler_p and attribute_checked_p fields.
576         (riscv_attribute_table): Add interrupt.
577         (riscv_interrupt_type_p): New.
578         (riscv_save_reg_p): Save extra regs for interrupt handler.
579         (riscv_use_save_libcall): Return false  for interrupt handler.
580         (riscv_first_stack_step): Add forward declaration.
581         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
582         for interrupt handler with large frame.  Use it for saved reg list.
583         (riscv_expand_prologue): Move flag_stack_usage_info support to
584         eliminate duplication.
585         (riscv_expand_epilogue): Generate mret for interrupt handler.
586         (riscv_epilogue_uses): New.
587         (riscv_can_use_return_insn): Return false for interrupt handler.
588         (riscv_function_ok_for_sibcall): Likewise.
589         (riscv_set_current_function): Add interrupt handler support.
590         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
591         * config/riscv/riscv.md (UNSPECV_MRET): New.
592         (GP_REGNUM): New.
593         (riscv_frflags, riscv_fsflags): Use tab after opcode.
594         (riscv_mret): New.
595         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
597 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
599         PR tree-optimization/85712
600         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
601         this candidate has already been replaced in-situ by a copy.
603 2018-05-25  Jason Merrill  <jason@redhat.com>
605         PR c++/80485 - inline function non-zero address.
606         * symtab.c (nonzero_address): Check DECL_COMDAT.
608 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
610         PR target/83628
611         * config/alpha/alpha.md (ashlsi3): New insn pattern.
612         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
613         extension of SImode operation.  Use const123_operand predicate.
614         (*saddsi_1): Remove.
615         (*saddl_se_1): Ditto.
616         (*ssubsi_1): Ditto.
617         (*ssubl_se_1): Ditto.
618         * config/alpha/predicates.md (const123_operand): New predicate.
619         * config/alpha/constraints.md (P): Use IN_RANGE.
621 2018-05-25  Richard Biener  <rguenther@suse.de>
623         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
624         defaulted to true.
625         (ref_maybe_used_by_stmt_p): Likewise.
626         (stmt_may_clobber_ref_p): Likewise.
627         (stmt_may_clobber_ref_p_1): Likewise.
628         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
629         and pass it along.
630         (ref_maybe_used_by_stmt_p): Likewise.
631         (stmt_may_clobber_ref_p): Likewise.
632         (stmt_may_clobber_ref_p_1): Likewise.
633         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
634         the alias oracle to disambiguate DRs with stmts DR analysis
635         couldn't handle.
636         (vect_analyze_data_refs): Do not give up on not analyzable
637         DRs for BB vectorization.  Remove code truncating the dataref
638         vector.
640 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
642         PR target/85832
643         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
644         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
645         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
647 2018-05-25  Richard Biener  <rguenther@suse.de>
649         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
650         function, combining stmt data ref gathering and fatal analysis
651         parts.
652         (vect_analyze_data_refs): Remove now redudnant code and simplify.
653         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
654         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
655         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
656         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
658 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
660         PR tree-optimization/85720
661         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
662         SCC if all partitions are builtins.
663         (version_loop_by_alias_check): New parameter.  Generate cancelable
664         runtime alias check if all partitions are builtins.
665         (distribute_loop): Update call to above function.
667 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
669         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
670         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
671         (parm_default_def_partition_arg): Ditto.
672         (set_parm_default_def_partition): Ditto.
673         (get_parm_default_def_partitions): Ditto and make it static.
674         (get_undefined_value_partitions): Ditto and make it static.
675         (remove_ssa_form): Refactor call to init_var_map here.
676         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
677         computation for loop region.
678         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
679         (register_default_def): Delete.
680         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
681         (parm_default_def_partition_arg): Ditto.
682         (set_parm_default_def_partition): Ditto.
683         (get_parm_default_def_partitions): Ditto and make it static.
684         (get_undefined_value_partitions): Ditto and make it static.
685         (coalesce_with_default, coalesce_with_default): Update comment.
686         (create_coalesce_list_for_region): New func factored out from
687         create_outofssa_var_map.
688         (populate_coalesce_list_for_outofssa): New func factored out from
689         create_outofssa_var_map and coalesce_ssa_name.
690         (create_outofssa_var_map): Delete.
691         (coalesce_ssa_name): Refactor to support live range computation.
692         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
693         (get_parm_default_def_partitions): Delete.
694         (get_undefined_value_partitions): Ditto.
695         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
696         computation for loop region.
697         (new_tree_live_info, loe_visit_block): Ditto.
698         (live_worklist, set_var_live_on_entry): Ditto.
699         (calculate_live_on_exit, verify_live_on_entry): Ditto.
700         * tree-ssa-live.h (struct _var_map): New fields.
701         (init_var_map): Change decl.
702         (region_contains_p): New.
704 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
706         * tree-ssa-live.h (live_merge_and_clear): Delete.
708 2018-05-25  Richard Biener  <rguenther@suse.de>
710         PR c++/85912
711         * tree-dump.c (dequeue_and_dump): Remove access to removed
712         operand 2 of a SWITCH_EXPR.
714 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
716         * doc/sourcebuild.texi (vect_double_cond_arith): Include
717         multiplication and division.
718         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
719         (cond_udiv@var{m}, cond_umod@var{m}): Document.
720         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
721         (cond_udiv_optab, cond_umod_optab): New optabs.
722         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
723         (IFN_COND_RDIV): New internal functions.
724         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
725         TRUNC_MOD_EXPR and RDIV_EXPR.
726         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
727         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
728         New unspecs.
729         (SVE_INT_BINARY): Include mult.
730         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
731         (optab, sve_int_op): Handle mult.
732         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
733         UNSPEC_COND_DIV.
734         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
735         for SVE_INT_BINARY_SD.
737 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
739         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
740         (optab, sve_int_op): Handle div and udiv.
741         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
742         for SVE_INT_BINARY_SD.
743         (*<optab><mode>3): New insn for the same.
745 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
747         * tree-vect-patterns.c: Include predict.h.
748         (vect_recog_divmod_pattern): Restrict check for division support
749         to when optimizing for size.
751 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
753         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
754         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
755         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
756         (gimple_match_op::set_op): Likewise.
757         (gimple_resimplify4): Declare.
758         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
759         (expr::gen_transform): Likewise.
760         (decision_tree::gen): Generate a simplification routine for 4 operands.
761         * gimple-match-head.c (gimple_simplify): Add an overload for
762         4 operands.  In the top-level function, handle up to 4 call
763         arguments and call gimple_resimplify4.
764         (gimple_resimplify4): New function.
765         (build_call_internal): Pass a fourth operand.
766         (maybe_push_to_seq): Likewise.
767         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
768         Fold VEC_COND_EXPRs of an operation and a default value into
769         an IFN_COND_* function if possible.
770         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
771         New unspecs.
772         (SVE_COND_FP_BINARY): Include them.
773         (optab, sve_fp_op): Handle them.
774         (SVE_INT_BINARY_REV): New code iterator.
775         (SVE_COND_FP_BINARY_REV): New int iterator.
776         (commutative): New int attribute.
777         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
778         Declare.
779         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
780         function.
781         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
782         (*cond_<optab><mode>): New patterns for reversed operands.
784 2018-05-25  Richard Biener  <rguenther@suse.de>
786         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
787         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
788         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
789         (STMT_VINFO_GROUPED_ACCESS): Adjust.
790         * tree-vect-data-refs.c (everywhere): Adjust users.
791         * tree-vect-loop.c (everywhere): Likewise.
792         * tree-vect-slp.c (everywhere): Likewise.
793         * tree-vect-stmts.c (everywhere): Likewise.
794         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
796 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
798         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
799         Rename to...
800         (gcc_cv_as_section_exclude): ... this.
801         Try Solaris as #exclude syntax.
802         * configure: Regenerate.
803         * config.in: Regenerate.
804         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
805         SECTION_EXCLUDE.
806         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
807         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
809         * varasm.c (default_elf_asm_named_section): Don't check if
810         HAVE_GAS_SECTION_EXCLUDE is defined.
812 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
814         * doc/md.texi: Update the documentation of the cond_* optabs
815         to mention the new final operand.  Fix GET_MODE_NUNITS call.
816         Describe the scalar case too.
817         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
818         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
819         instead of 2.
820         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
821         (get_conditional_internal_fn): Update comment.
822         * tree-vect-loop.c (vectorizable_reduction): Pass the original
823         accumulator value as a final argument to conditional functions.
824         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
825         a define_expand and add an "else" operand.  Assert for now that
826         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
827         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
828         (*cond_<optab><mode>): New patterns.
829         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
830         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
831         (UNSPEC_COND_EOR): Delete.
832         (optab): Remove associated mappings.
833         (SVE_INT_BINARY): New code iterator.
834         (sve_int_op): Remove int attribute and add "minus" to the code
835         attribute.
836         (SVE_COND_INT_OP): Delete.
837         (SVE_COND_FP_OP): Rename to...
838         (SVE_COND_FP_BINARY): ...this.
840 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
842         * optabs.c (can_reuse_operands_p): New function.
843         (maybe_legitimize_operands): Try to reuse the results for
844         earlier operands.
846 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
848         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
849         Add {q} suffix to insn mnemonic.
851 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
853         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
854         (msp430_warn_func_return): New.
856 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
858         * fold-const.c (tree_nonzero_bits): New function.
859         * fold-const.h (tree_nonzero_bits): Likewise.
860         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
861         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
863 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
865         PR target/85900
866         PR target/85345
867         * varasm.c (assemble_alias): Check ifunc_resolver only on
868         FUNCTION_DECL.
870 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
872         PR target/85903
873         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
874         when memory input operand is handled.
876 2018-05-24  Luis Machado  <luis.machado@linaro.org>
878         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
879         global.
880         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
882 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
884         * match.pd: Delay FMA folds until after vectorization.
886 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
888         PR target/83009
889         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
890         address check not strict.
892 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
894         * gimple-match.h (gimple_match_op): New class.
895         (mprts_hook): Replace parameters with a gimple_match_op *.
896         (maybe_build_generic_op): Likewise.
897         (gimple_simplified_result_is_gimple_val): Replace parameters with
898         a const gimple_match_op *.
899         (gimple_simplify): Replace code_helper * and tree * parameters with
900         a gimple_match_op * parameter.
901         (gimple_resimplify1): Replace code_helper *, tree and tree *
902         parameters with a gimple_match_op * parameter.
903         (gimple_resimplify2): Likewise.
904         (gimple_resimplify3): Likewise.
905         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
906         parameters with a gimple_match_op * parameter.
907         * gimple-match-head.c (gimple_simplify): Change prototypes of
908         auto-generated functions to take a gimple_match_op * instead of
909         separate code_helper * and tree * parameters.  Make the same
910         change in the top-level overload and update calls to the
911         gimple_resimplify routines.  Update calls to the auto-generated
912         functions and to maybe_push_res_to_seq in the publicly-facing
913         operation-specific gimple_simplify overloads.
914         (gimple_match_op::MAX_NUM_OPS): Define.
915         (gimple_resimplify1): Replace rcode and ops with a single res_op
916         parameter.  Update call to gimple_simplify.
917         (gimple_resimplify2): Likewise.
918         (gimple_resimplify3): Likewise.
919         (mprts_hook): Replace parameters with a gimple_match_op *.
920         (maybe_build_generic_op): Likewise.
921         (build_call_internal): Replace type, nargs and ops with
922         a gimple_match_op *.
923         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
924         with a single gimple_match_op *.  Update calls to mprts_hook,
925         build_call_internal and gimple_simplified_result_is_gimple_val.
926         Factor out code that is common to the tree_code and combined_fn cases.
927         * genmatch.c (expr::gen_transform): Replace tem_code and
928         tem_ops with a gimple_match_op called tem_op.  Update calls
929         to the gimple_resimplify functions and maybe_push_res_to_seq.
930         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
931         res_ops.  Update call to the gimple_resimplify functions.
932         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
933         (decision_tree::gen): Make the functions take a gimple_match_op *
934         called res_op instead of separate res_code and res_ops parameters.
935         Update call accordingly.
936         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
937         and ops with a single res_op parameter.  Update calls to
938         maybe_build_generic_op and maybe_push_res_to_seq.
939         (fold_stmt_1): Update calls to gimple_simplify and
940         replace_stmt_with_simplification.
941         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
942         and gimple_simplified_result_is_gimple_val.
943         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
944         gimple_simplify.
945         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
946         with a gimple_match_op *.
947         (vn_nary_build_or_lookup): Likewise.  Update call to
948         vn_nary_build_or_lookup_1.
949         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
950         gimple_match_op *.  Update calls to the gimple_resimplify routines
951         and to gimple_simplified_result_is_gimple_val.
952         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
953         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
954         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
955         (visit_nary_op): Likewise.
956         (visit_reference_op_load): Likewise.
958 2018-05-23  Luis Machado  <luis.machado@linaro.org>
960         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
961         modifier for printing the step amount.
963 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
965         PR target/78849
966         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
967         types.
969 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
971         * doc/sourcebuild.texi (Endianness): New subsubsection.
973 2018-05-23  Luis Machado  <luis.machado@linaro.org>
975         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
976         <prefetch_dynamic_strides>: New const bool field.
977         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
978         prefetch_dynamic_strides.
979         (exynosm1_prefetch_tune): Likewise.
980         (thunderxt88_prefetch_tune): Likewise.
981         (thunderx_prefetch_tune): Likewise.
982         (thunderx2t99_prefetch_tune): Likewise.
983         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
984         false.
985         (aarch64_override_options_internal): Update to set
986         PARAM_PREFETCH_DYNAMIC_STRIDES.
987         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
988         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
989         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
990         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
991         prefetch-dynamic-strides setting.
993 2018-05-23  Luis Machado  <luis.machado@linaro.org>
995         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
996         <minimum_stride>: New const int field.
997         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
998         minimum_stride field defaulting to -1.
999         (exynosm1_prefetch_tune): Likewise.
1000         (thunderxt88_prefetch_tune): Likewise.
1001         (thunderx_prefetch_tune): Likewise.
1002         (thunderx2t99_prefetch_tune): Likewise.
1003         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
1004         <default_opt_level>: Set to 3.
1005         (aarch64_override_options_internal): Update to set
1006         PARAM_PREFETCH_MINIMUM_STRIDE.
1007         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1008         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1009         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1010         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1011         stride is constant and is below the minimum stride threshold.
1013 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1015         * config/arm/arm-cpus.in (mode26): Delete.
1016         (armv4): Delete mode26 reference.
1017         * config/arm/arm.c (arm_configure_build_target): Delete use of
1018         isa_bit_mode26.
1020 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
1022         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
1023         New insn pattern.
1024         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
1025         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
1026         for non-SSE modes.
1027         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
1028         (floatunsdidf2): Ditto.
1030 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
1032         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
1033         (fixuns_trunc<mode>si2_avx512f): Ditto.
1034         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
1035         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
1036         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
1038 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
1040         PR rtl-optimization/79985
1041         * df-scan.c (df_insn_refs_collect): Remove special case for
1042         global registers and asm statements.
1044 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
1046         * extend.texi (Global Register Variables): Rewrite the bullet list.
1047         Note that the register is available for allocation. Note that access
1048         via inline asm must use constraints. Add note about async-signal
1049         handlers. Remove paragraph about automagic register selection.
1051 2018-05-23  Richard Biener  <rguenther@suse.de>
1053         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
1054         of fixed offset from memset VN.
1056 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
1058         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
1059         first_interp field.
1060         (alloc_cand_and_find_basis): Initialize first_interp field.
1061         (slsr_process_mul): Modify first_interp field.
1062         (slsr_process_add): Likewise.
1063         (slsr_process_cast): Modify first_interp field for each new
1064         interpretation.
1065         (slsr_process_copy): Likewise.
1066         (dump_candidate): Dump first_interp field.
1067         (replace_mult_candidate): Process all interpretations, not just
1068         subsequent ones.
1069         (replace_rhs_if_not_dup): Likewise.
1070         (replace_one_candidate): Likewise.
1072 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
1074         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
1075         Add new boolean.
1076         (aarch64_needs_frame_chain): New function.
1077         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
1079 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
1081         PR target/84882
1082         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
1083         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
1084         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
1085         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
1086         as true for strict-align.
1087         (aarch64_can_inline_p): Perform checks even when callee has no
1088         attributes to check for strict alignment.
1089         * doc/extend.texi (AArch64 Function Attributes): Document
1090         no-strict-align.
1091         * doc/invoke.texi: (AArch64 Options): Likewise.
1093 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
1095         PR tree-optimization/85853
1096         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
1097         the handling of the root of the node to...
1098         (vect_slp_analyze_node_operations_1): ...this new function,
1099         and run the whole thing with the child nodes' def types
1100         set according to their SLP node's def type.
1102 2018-05-23  Richard Biener  <rguenther@suse.de>
1104         PR middle-end/85874
1105         * tree-data-ref.c (create_runtime_alias_checks): Defer
1106         and ignore overflow warnings.
1108 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
1110         PR tree-optimization/85822
1111         * tree-vrp.c (is_masked_range_test): Fix handling of negative
1112         constants.
1114 2018-05-23  Richard Biener  <rguenther@suse.de>
1116         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
1117         memset constants via native_interpret_expr.
1119 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
1121         PR target/85345
1122         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
1123         attribute.
1124         (cgraph_node::create_alias): Likewise.
1125         (cgraph_node::get_availability): Check ifunc_resolver instead
1126         of looking up ifunc attribute.
1127         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1128         * varasm.c (do_assemble_alias): Likewise.
1129         (assemble_alias): Likewise.
1130         (default_binds_local_p_3): Likewise.
1131         * cgraph.h (cgraph_node): Add ifunc_resolver.
1132         (cgraph_node::only_called_directly_or_aliased_p): Return false
1133         for IFUNC resolver.
1134         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
1135         attribute.
1136         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
1137         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
1138         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
1139         instead of looking up ifunc attribute.
1141 2018-05-22  Luis Machado  <luis.machado@linaro.org>
1143         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
1145 2018-05-22  Martin Sebor  <msebor@redhat.com>
1147         PR middle-end/85359
1148         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
1149         only when expasion succeeds.
1150         (expand_builtin_strcmp): Same.
1151         (expand_builtin_strncmp): Same.
1153 2018-05-22  Martin Sebor  <msebor@redhat.com>
1155         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
1157 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
1158             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1160         * config/aarch64/aarch64-ldpstp.md: Replace uses of
1161         aarch64_mem_pair_operand with memory_operand and delete operand swapping
1162         code.
1163         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1164         Add check for legitimate_address.
1165         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
1166         (aarch64_swap_ldrstr_operands): New.
1167         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
1168         Define prototype.
1170 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
1171             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1173         * config/aarch64/aarch64.md: New patterns to generate stp
1174         and ldp.
1175         (store_pair_sw, store_pair_dw): New patterns to generate stp for
1176         single words and double words.
1177         (load_pair_sw, load_pair_dw): Likewise.
1178         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
1179         Delete.
1180         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
1181         Delete.
1182         * config/aarch64/aarch64-ldpstp.md: Modify peephole
1183         for different mode ldpstp and add peephole for merged zero stores.
1184         Likewise for loads.
1185         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1186         Add size check.
1187         (aarch64_gen_store_pair): Rename calls to match new patterns.
1188         (aarch64_gen_load_pair): Rename calls to match new patterns.
1189         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
1190         (load_pair<DREG:mode><DREG2:mode>): ... This.
1191         (store_pair<mode>): Rename to...
1192         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
1193         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
1194         New mode iterators.
1195         (V_INT_EQUIV): Handle SImode.
1196         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
1197         New predicate.
1199 2018-05-22  Martin Sebor  <msebor@redhat.com>
1201         PR c/85623
1202         * calls.c (maybe_warn_nonstring_arg): Use string length to set
1203         or ajust the presumed bound on an operation to avoid unnecessary
1204         warnings.
1206 2018-05-22  Martin Sebor  <msebor@redhat.com>
1208         PR tree-optimization/85826
1209         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
1210         assuming that a DECL necesarily has a constant size.
1212 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
1214         PR middle-end/85862
1215         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
1217 2018-05-22  Richard Biener  <rguenther@suse.de>
1219         PR tree-optimization/85834
1220         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
1221         non-constant and non-zero memset arguments.
1223 2018-05-22  Martin Liska  <mliska@suse.cz>
1225         PR ipa/85607
1226         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
1228 2018-05-22  Richard Biener  <rguenther@suse.de>
1230         PR tree-optimization/85863
1231         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
1232         comparisons when vectype is specified.
1233         (vectorizable_condition): Do not specify vectype for
1234         vect_is_simple_cond when SLP vectorizing.
1236 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
1238         PR target/85657
1239         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
1240         define __ibm128 as long double.
1241         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
1242         as a distinct type when IEEE 128-bit support is enabled.
1243         (init_float128_ieee): Fix up conversions between IFmode and IEEE
1244         128-bit types to use the correct functions.
1245         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
1246         convert between 128-bit floating point types that have different
1247         modes but the same representation, instead of using gen_lowpart to
1248         makean alias.
1249         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
1250         KFmode.
1251         (IFKF_reg): New attributes to give the register constraints for
1252         IFmode and KFmode.
1253         (extend<mode>tf2_internal): New insns to mark an explicit
1254         conversion between 128-bit floating point types that have a
1255         different mode but share the same representation.
1257 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
1259         PR tree-optimization/85814
1260         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
1261         a null return from get_strinfo when unsharing the next
1262         strinfo in the chain.
1264 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
1266         PR gcc/84923
1267         * varasm.c (weak_finish): Clean up weak_decls.
1269 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1271         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
1272         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
1273         UNSPEC_UADALP values.
1274         * config/aarch64/iterators.md (ABAL): New int iterator.
1275         (ABDL2): Likewise.
1276         (ADALP): Likewise.
1277         (sur): Add mappings for the above.
1278         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
1279         New define_insn.
1280         (aarch64_<sur>abal<mode>_4): Likewise.
1281         (aarch64_<sur>adalp<mode>_3): Likewise.
1282         (<sur>sadv16qi): New define_expand.
1284 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
1286         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
1287         (*movdf_internal): Ditto.
1288         (*rcpsf2_sse): Ditto.
1289         (*rsqrtsf2_sse): Ditto.
1290         (*sqrt<mode>2_sse): Ditto.
1292 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
1294         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
1295         eor3q<mode>4.
1296         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
1297         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
1298         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
1299         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
1300         vbcaxq_s64): New.
1301         * config/aarch64/arm_neon.h: Likewise.
1302         * config/aarch64/iterators.md (VQ_I): New.
1304 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
1306         * config.gcc: Add arc/t-multilib-linux to tmake_file for
1307         arc*-*-linux*.
1308         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
1309         MULTILIB_DIRNAMES
1311 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1313         * config/nds32/constraints.md (S): New constraint.
1314         * config/nds32/nds32.md (call_internal): Use constraint S.
1315         (call_value_internal): Likewise.
1316         (sibcall_internal): Likewise.
1317         (sibcall_value_internal): Likewise.
1319 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1320             Chung-Ju Wu  <jasonwucj@gmail.com>
1322         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
1323         into consideration.
1325 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
1326             Chung-Ju Wu  <jasonwucj@gmail.com>
1328         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
1329         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
1330         (nds32_rtx_costs_impl): Simplify.
1331         (nds32_address_cost_impl): Simplify.
1332         (nds32_init_rtx_costs): New function.
1333         (nds32_rtx_costs_speed_prefer): Likewise.
1334         (nds32_rtx_costs_size_prefer): Likewise.
1335         (nds32_address_cost_speed_prefer): Likewise.
1336         (nds32_address_cost_speed_fwprop): Likewise.
1337         (nds32_address_cost_size_prefer): Likewise.
1338         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
1339         * config/nds32/nds32.c (nds32_option_override): Use
1340         nds32_init_rtx_costs function.
1342 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
1344         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
1345         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
1346         (TARGET_PIPELINE_N8): Likewise.
1347         (TARGET_PIPELINE_N10): Likewise.
1348         (TARGET_PIPELINE_N13): Likewise.
1349         (TARGET_PIPELINE_GRAYWOLF): Likewise.
1351 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
1353         * config/nds32/nds32-fpu.md: Update copyright year.
1355 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1357         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
1359 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1361         * config/nds32/nds32.c
1362         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
1363         * config/nds32/nds32.opt (minline-asm-r15): New option.
1365 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1367         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
1368         MASK_HW_ABS.
1369         * config/nds32/nds32.md (abssi2): New pattern.
1371 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
1373         * config/i386/i386.md (rex64namesuffix): New mode attribute.
1374         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
1375         Merge insn pattern from sse_cvtsi2ss<round_name> and
1376         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
1377         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
1378         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
1379         using SWI48 mode iterator.
1380         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
1381         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
1382         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
1383         pattern from sse_cvttss2si<round_saeonly_name>
1384         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
1385         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
1386         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
1387         using SWI48 mode iterator.
1388         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
1389         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
1390         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
1391         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
1392         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
1393         using SWI48 mode iterator.
1394         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
1395         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
1396         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
1397         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
1398         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
1399         SWI48 mode iterator.
1400         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
1401         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
1402         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
1403         pattern from sse_cvttsd2si<round_saeonly_name>
1404         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
1406 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1408         * config/nds32/nds32-md-auxiliary.c
1409         (nds32_valid_smw_lwm_base_p): Refine.
1410         (nds32_output_smw_single_word): Refine.
1411         (nds32_output_smw_double_word): New.
1412         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
1414 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1416         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
1417         (nds32_output_stack_pop): Refine.
1418         (nds32_expand_unaligned_load): Refine.
1419         (nds32_expand_unaligned_store): Refine.
1421 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1422             Chung-Ju Wu  <jasonwucj@gmail.com>
1424         * config/nds32/constants.md: Add TP_REGNUM constant.
1425         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
1426         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
1427         UNSPEC_ADD32.
1428         * config/nds32/nds32-doubleword.md: Consider flag_pic.
1429         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
1430         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
1431         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
1432         and PIC code generation.
1433         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
1434         code generation.
1435         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
1436         optimization.
1437         * config/nds32/nds32.md: Support TLS and PIC.
1438         * config/nds32/nds32.c: Support TLS and PIC.
1439         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
1440         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
1441         predicate.
1443 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
1445         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
1446         mode with E_ prefix.
1448 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
1449             Chung-Ju Wu  <jasonwucj@gmail.com>
1451         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
1452         * config/nds32/nds32-md-auxiliary.c
1453         (symbolic_reference_mentioned_p): New.
1454         (nds32_legitimize_ict_address): New.
1455         (nds32_expand_ict_move): New.
1456         (nds32_indirect_call_referenced_p): New.
1457         (nds32_symbol_binds_local_p): Delete.
1458         (nds32_long_call_p): Modify.
1459         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
1460         * config/nds32/nds32-protos.h
1461         (symbolic_reference_mentioned_p): Declare.
1462         (nds32_legitimize_ict_address): Declare.
1463         (nds32_expand_ict_move): Declare.
1464         (nds32_indirect_call_referenced_p): Declare.
1465         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
1466         (nds32_relax_group): Use nds32_ict_const_p as condition.
1467         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
1468         (nds32_asm_file_start): Output ict_model directive in asm code.
1469         (nds32_legitimate_address_p): Consider indirect call.
1470         (nds32_print_operand): Consider indirect call.
1471         (nds32_print_operand_address): Consider indirect call.
1472         (nds32_insert_attributes): Handle "indirect_call" attribute.
1473         (TARGET_LEGITIMATE_ADDRESS_P): Define.
1474         (TARGET_LEGITIMATE_CONSTANT_P): Define.
1475         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1476         (TARGET_DELEGITIMIZE_ADDRESS): Define.
1477         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
1478         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
1479         (TARGET_ICT_MODEL_SMALL): Define.
1480         (TARGET_ICT_MODEL_LARGE): Define.
1481         * config/nds32/nds32.md (movsi): Consider ict model.
1482         (call, call_value): Consider ict model.
1483         (sibcall, sibcall_value): Consider ict model.
1484         * config/nds32/nds32.opt (mict-model): New option.
1485         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
1486         model.
1488 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
1489             Monk Chiang  <sh.chiang04@gmail.com>
1490             Jim Wilson <jimw@sifive.com>
1492         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
1493         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
1494         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
1495         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
1496         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
1497         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
1498         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
1499         compute save_libcall_adjustment properly.
1500         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
1501         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
1502         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
1503         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
1504         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1505         (ABI_SPEC): Handle mabi=ilp32e.
1506         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1507         (RVE): Add RVE mask.
1508         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1509         <-march>: Add rv32e as an example.
1511 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
1513         PR c++/82899
1514         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1515         (intra_create_variable_infos): Handle C++ constructors.
1517 2018-05-18  Martin Liska  <mliska@suse.cz>
1519         * passes.def: Remove a redundant pass.
1521 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
1523         PR bootstrap/85838
1524         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1526 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1528         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1529         (ARMv4): Update.
1530         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1531         (ARMv6m): Update.
1532         (armv2, armv2a, armv3, armv3m): Delete architectures.
1533         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1534         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1535         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1536         Delete cpus.
1537         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1538         (*mulsidi3adddi): Likewise.
1539         (mulsidi3): Likewise.
1540         (*mulsidi3_nov6): Likewise.
1541         (umulsidi3): Likewise.
1542         (umulsidi3_nov6): Likewise.
1543         (umaddsidi4): Likewise.
1544         (*umulsidi3adddi): Likewise.
1545         (smulsi3_highpart): Likewise.
1546         (*smulsi3_highpart_nov6): Likewise.
1547         (umulsi3_highpart): Likewise.
1548         (*umulsi3_highpart_nov6): Likewise.
1549         * config/arm/arm.h (arm_arch3m): Delete.
1550         * config/arm/arm.c (arm_arch3m): Delete.
1551         (arm_option_override_internal): Update armv3-related comment.
1552         (arm_configure_build_target): Delete use of isa_bit_mode32.
1553         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1554         (arm_rtx_costs_internal): Delete check of arm_arch3m.
1555         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1556         (mulsa3): Likewise.
1557         (mulusa3): Likewise.
1558         * config/arm/arm-protos.h (arm_arch3m): Delete.
1559         * config/arm/arm-tables.opt: Regenerate.
1560         * config/arm/arm-tune.md: Likewise.
1561         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
1562         deleted architectures.
1564 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1566         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
1567         (armv5t, armv5te): New features.
1568         (ARMv5, ARMv5e): Delete fgroups.
1569         (ARMv5t, ARMv5te): Adjust for above changes.
1570         (ARMv6m): Likewise.
1571         (armv5, armv5e): Delete arches.
1572         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
1573         arm_arch5.
1574         (*call_reg_arm): Likewise.
1575         (*call_value_reg_armv5): Likewise.
1576         (*call_value_reg_arm): Likewise.
1577         (*call_symbol): Likewise.
1578         (*call_value_symbol): Likewise.
1579         (*sibcall_insn): Likewise.
1580         (*sibcall_value_insn): Likewise.
1581         (clzsi2): Likewise.
1582         (prefetch): Likewise.
1583         (define_split and define_peephole2 dependent on arm_arch5):
1584         Likewise.
1585         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
1586         arm_arch5e.
1587         (TARGET_ARM_QBIT): Likewise.
1588         (TARGET_DSP_MULTIPLY): Likewise.
1589         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
1590         (arm_arch5, arm_arch5e): Delete.
1591         (arm_arch5t, arm_arch5te): Declare.
1592         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
1593         (arm_arch5t): Declare.
1594         (arm_option_reconfigure_globals): Update for the above.
1595         (arm_options_perform_arch_sanity_checks): Update comment, replace
1596         use of arm_arch5 with arm_arch5t.
1597         (use_return_insn): Likewise.
1598         (arm_emit_call_insn): Likewise.
1599         (output_return_instruction): Likewise.
1600         (arm_final_prescan_insn): Likewise.
1601         (arm_coproc_builtin_available): Likewise.
1602         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
1603         arm_arch5e with arm_arch5t and arm_arch5te.
1604         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
1605         (arm_arch5t, arm_arch5te): Declare.
1606         * config/arm/arm-tables.opt: Regenerate.
1607         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
1608         * config/arm/t-multilib: Likewise.
1609         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
1610         instead of arm_arch5.
1611         (*call_reg_thumb1): Likewise.
1612         (*call_value_reg_thumb1_v5): Likewise.
1613         (*call_value_reg_thumb1): Likewise.
1614         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
1615         unreachable path.
1616         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
1618 2018-05-18  Martin Liska  <mliska@suse.cz>
1620         PR gcov-profile/84846
1621         * doc/gcov.texi: Document -t option of gcov tool.
1623 2018-05-18  Martin Liska  <mliska@suse.cz>
1625         PR gcov-profile/84846
1626         * gcov.c (print_usage): Add new -t option.
1627         (process_args): Handle the option.
1628         (generate_results): Use stdout as output when requested by
1629         the option.
1631 2018-05-18  Martin Liska  <mliska@suse.cz>
1633         PR gcov-profile/84846
1634         * coverage.c (coverage_init): Write PWD to .gcno file.
1635         * doc/gcov.texi: Document how working directory is printed.
1636         * gcov-dump.c (dump_gcov_file): Print PWD.
1637         * gcov.c (output_intermediate_file): Likewise.
1638         (read_graph_file): Read PWD string.
1639         (output_lines): Print PWD.
1641 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1643         PR middle-end/85817
1644         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1645         for retval and return false if all args to phi are zero.        
1647 2018-05-18  Richard Biener  <rguenther@suse.de>
1649         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1650         method.
1651         (evrp_dom_walker::before_dom_children): Call it.
1653 2018-05-18  Richard Biener  <rguenther@suse.de>
1655         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1656         results when processing array refs with variable index.
1658 2018-05-18  Toon Moene  <toon@moene.org>
1660         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1661         directly after that of -floop-interchange. Indicate that both
1662         options are enabled by default when specifying -O3. 
1664 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1666         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1667         iterator.  Delete separate integer-mode vec_set<mode> expander.
1668         (aarch64_simd_vec_setv2di): Delete.
1669         (vec_setv2di): Delete.
1670         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1671         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
1672         the "w, r" alternative.
1674 2018-05-18  Martin Liska  <mliska@suse.cz>
1676         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1677         * tree-pass.h (make_pass_lower_switch_O0): New function.
1678         * tree-switch-conversion.c (node_has_low_bound): Remove.
1679         (node_has_high_bound): Likewise.
1680         (node_is_bounded): Likewise.
1681         (class pass_lower_switch): Make it a template type and create
1682         two instances.
1683         (pass_lower_switch::execute): Add template argument.
1684         (make_pass_lower_switch): New function.
1685         (make_pass_lower_switch_O0): New function.
1686         (do_jump_if_equal): Remove.
1687         (emit_case_nodes): Simplify to just handle all 3 cases and leave
1688         all the hard work to tree optimization passes.
1690 2018-05-18  Martin Liska  <mliska@suse.cz>
1692         * dbgcnt.c (limit_low): Renamed from limit.
1693         (limit_high): New variable.
1694         (dbg_cnt_is_enabled): Check for upper limit.
1695         (dbg_cnt): Adjust dumping.
1696         (dbg_cnt_set_limit_by_index): Add new argument for high
1697         value.
1698         (dbg_cnt_set_limit_by_name): Likewise.
1699         (dbg_cnt_process_single_pair): Parse new format.
1700         (dbg_cnt_process_opt): Use strtok.
1701         (dbg_cnt_list_all_counters): Remove 'value' and add
1702         'limit_high'.
1703         * doc/invoke.texi: Document changes.
1705 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
1707         * doc/sourcebuild.texi (scalar_all_fma): Document.
1708         * tree.def (FMA_EXPR): Delete.
1709         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1710         * internal-fn.c (ternary_direct): New macro.
1711         (expand_ternary_optab_fn): Likewise.
1712         (direct_ternary_optab_supported_p): Likewise.
1713         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1714         * builtins.c (fold_builtin_fma): Delete.
1715         (fold_builtin_3): Don't call it.
1716         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1717         * expr.c (expand_expr_real_2): Likewise.
1718         * fold-const.c (operand_equal_p): Likewise.
1719         (fold_ternary_loc): Likewise.
1720         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1721         * gimple.c (DEFTREECODE): Likewise.
1722         * gimplify.c (gimplify_expr): Likewise.
1723         * optabs-tree.c (optab_for_tree_code): Likewise.
1724         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1725         * tree-eh.c (operation_could_trap_p): Likewise.
1726         (stmt_could_throw_1_p): Likewise.
1727         * tree-inline.c (estimate_operator_cost): Likewise.
1728         * tree-pretty-print.c (dump_generic_node): Likewise.
1729         (op_code_prio): Likewise.
1730         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1731         * tree-ssa-operands.c (get_expr_operands): Likewise.
1732         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1733         * fold-const-call.h (fold_fma): Delete.
1734         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1735         CFN_FNMA and CFN_FNMS.
1736         (fold_fma): Delete.
1737         * genmatch.c (combined_fn): New enum.
1738         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1739         (commutative_op): New function.
1740         (commutate): Use it.  Handle more than 2 operands.
1741         (dt_operand::gen_gimple_expr): Use commutative_op.
1742         (parser::parse_expr): Allow :c to be used with non-binary
1743         operators if the commutative operand is known.
1744         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1745         CFN_FMS, CFN_FNMA and CFN_FNMS.
1746         (backprop::process_assign_use): Remove FMA_EXPR handling.
1747         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1748         (gen_hsa_fma): New function.
1749         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1750         IFN_FNMA and IFN_FNMS.
1751         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1752         * gimple-fold.h (follow_all_ssa_edges): Declare.
1753         * gimple-fold.c (follow_all_ssa_edges): New function.
1754         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1755         gimple_build interface and use follow_all_ssa_edges to fold the result.
1756         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1757         instead of checking for optabs directly.
1758         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1759         rather than FMA_EXPRs.
1760         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1761         call to IFN_FMA instead of an FMA_EXPR.
1763 2018-05-17  Jim Wilson  <jimw@sifive.com>
1765         * expr.c (do_tablejump): When converting index to Pmode, if we have a
1766         sign extended promoted subreg, and the range does not have the sign bit
1767         set, then do a sign extend.
1769         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1770         test, check for sign extended subreg and/or constant operands, and
1771         do a sign extend in that case.
1773 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
1775         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1776         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1777         Add untyped.
1778         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1779         Change logics_shift_reg to logics_shift_imm.
1780         (thunderx2t99_fp_loadpair_basic): Delete.
1781         (thunderx2t99_fp_storepair_basic): Delete.
1782         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1783         (thunderx2t99_asimd_polynomial): Delete.
1784         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1785         and neon_fp_mul_d_scalar_q.
1786         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1787         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1788         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1789         (thunderx2t99_asimd_lut): Add missing tbl types.
1790         (thunderx2t99_asimd_ext): Delete.
1791         (thunderx2t99_asimd_load1_1_mult): Delete.
1792         (thunderx2t99_asimd_load1_2_mult): Delete.
1793         (thunderx2t99_asimd_load1_ldp): New.
1794         (thunderx2t99_asimd_load1): New.
1795         (thunderx2t99_asimd_load2): Add missing *load2* types.
1796         (thunderx2t99_asimd_load3): New.
1797         (thunderx2t99_asimd_load4): New.
1798         (thunderx2t99_asimd_store1_1_mult): Delete.
1799         (thunderx2t99_asimd_store1_2_mult): Delete.
1800         (thunderx2t99_asimd_store2_mult): Delete.
1801         (thunderx2t99_asimd_store2_onelane): Delete.
1802         (thunderx2t99_asimd_store_stp): New.
1803         (thunderx2t99_asimd_store1): New.
1804         (thunderx2t99_asimd_store2): New.
1805         (thunderx2t99_asimd_store3): New.
1806         (thunderx2t99_asimd_store4): New.
1808 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
1810         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1811         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
1813 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
1814             Segher Boessenkool  <segher@kernel.crashing.org>
1816         PR target/85698
1817         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1818         operand.
1820 2018-05-17  Richard Biener  <rguenther@suse.de>
1822         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1823         for pruning loop and prune defs feeding only already visited PHIs.
1825 2018-05-17  Richard Biener  <rguenther@suse.de>
1827         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1829 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
1830             Richard Biener  <rguenther@suse.de>
1832         PR tree-optimization/85793
1833         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1834         for VMAT_ELEMENTWISE.
1836 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1838         * internal-fn.h (lookup_internal_fn): Declare
1839         * internal-fn.c (lookup_internal_fn): New function.
1840         * gimple.c (gimple_build_call_from_tree): Handle calls to
1841         internal functions.
1842         * gimple-pretty-print.c (dump_gimple_call): Print "." before
1843         internal function names.
1844         * tree-pretty-print.c (dump_generic_node): Likewise.
1845         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1847 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
1849         * gimple-fold.h (gimple_build): Make the function forms take
1850         combined_fn rather than built_in_function.
1851         (gimple_simplify): Likewise.
1852         * gimple-match-head.c (gimple_simplify): Likewise.
1853         * gimple-fold.c (gimple_build): Likewise.
1854         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1855         rather than gimple_build_call_internal.
1856         (get_initial_defs_for_reduction): Likewise.
1857         (vect_create_epilog_for_reduction): Likewise.
1858         (vectorizable_live_operation): Likewise.
1860 2018-05-17  Martin Liska  <mliska@suse.cz>
1862         * gimple-ssa-sprintf.c (format_directive): Do not use
1863         space in between 'G_' and '('.
1865 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
1867         PR target/85323
1868         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1869         even if the mask is not all ones.
1871         PR target/85323
1872         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1873         vector.
1874         (ix86_gimple_fold_builtin): Likewise.
1876         PR target/85323
1877         * config/i386/i386.c: Include tree-vector-builder.h.
1878         (ix86_vector_shift_count): New function.
1879         (ix86_fold_builtin): Fold shift builtins by scalar count.
1880         (ix86_gimple_fold_builtin): Likewise.
1882         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1883         _mm512_setzero): New intrinsics.
1885 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
1886             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1888         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1889         code generation for cases where splatting a value is not useful.
1890         * simplify-rtx.c (simplify_ternary_operation): Simplify
1891         vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1892         mode to a vec_concat.
1894 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
1896         * config.gcc: Support "goldmont-plus".
1897         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1898         "goldmont-plus".
1899         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1900         PROCESSOR_GOLDMONT_PLUS.
1901         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1902         (processor_target_table): Add "goldmont-plus".
1903         (PTA_GOLDMONT_PLUS): Define.
1904         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1905         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1906         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1907         (fold_builtin_cpu): Add "goldmont-plus".
1908         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1909         (ix86_option_override_internal): Add "goldmont-plus".
1910         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1911         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1912         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1913         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1915 2018-05-17  Richard Biener  <rguenther@suse.de>
1917         PR tree-optimization/85757
1918         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1919         remove defs that only feed that PHI from further processing.
1921 2018-05-16  Jim Wilson  <jimw@sifive.com>
1923         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1924         asterisk to name.
1925         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1927 2018-05-16  Mark Wielaard  <mark@klomp.org>
1929         * dwarf2out.c (count_index_strings): New function.
1930         (output_indirect_strings): Call count_index_strings and generate
1931         header for dwarf_version >= 5.
1933 2018-05-16  Mark Wielaard  <mark@klomp.org>
1935         * dwarf2out.c (dwarf_FORM): New function.
1936         (set_indirect_string): Use dwarf_FORM.
1937         (reset_indirect_string): Likewise.
1938         (size_of_die): Likewise.
1939         (value_format): Likewise.
1940         (output_die): Likewise.
1941         (add_skeleton_AT_string): Likewise.
1942         (output_macinfo_op): Likewise.
1943         (index_string): Likewise.
1944         (output_index_string_offset): Likewise.
1945         (output_index_string): Likewise.
1946         (count_index_strings): Likewise.
1948 2018-05-16  Carl Love  <cel@us.ibm.com>
1950         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1951         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1953 2018-05-16  Martin Jambor  <mjambor@suse.cz>
1955         * ipa-prop.c (ipa_free_all_edge_args): Remove.
1956         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1958 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
1960         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1961         (fnma<mode>4): Likewise.
1962         (fms<mode>4): Likewise.
1963         (fnms<mode>4): Likewise.
1964         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1965         (aarch64_fnma<mode>4): Likewise.
1966         (aarch64_fms<mode>4): Likewise.
1967         (aarch64_fnms<mode>4): Likewise.
1968         (aarch64_fnmadd<mode>4): Likewise.
1970 2018-05-16  Jason Merrill  <jason@redhat.com>
1972         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
1974 2018-05-16  Richard Biener  <rguenther@suse.de>
1976         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1977         (dump_stmt_cost): Declare.
1978         (add_stmt_cost): Dump cost we add.
1979         (add_stmt_costs): New function.
1980         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1981         No longer exported.
1982         (vect_analyze_stmt): Adjust prototype.
1983         (vectorizable_condition): Likewise.
1984         (vectorizable_live_operation): Likewise.
1985         (vectorizable_reduction): Likewise.
1986         (vectorizable_induction): Likewise.
1987         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1988         cost vector to pass to vectorizable_ and record afterwards.
1989         (vect_model_reduction_cost): Take cost vector argument and adjust.
1990         (vect_model_induction_cost): Likewise.
1991         (vectorizable_reduction): Likewise.
1992         (vectorizable_induction): Likewise.
1993         (vectorizable_live_operation): Likewise.
1994         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1995         SLP_TREE_NUMBER_OF_VEC_STMTS.
1996         (vect_analyze_slp_cost_1): Remove.
1997         (vect_analyze_slp_cost): Likewise.
1998         (vect_slp_analyze_node_operations): Take visited args and
1999         a target cost vector.  Avoid processing already visited stmt sets.
2000         (vect_slp_analyze_operations): Use a local cost vector to gather
2001         costs and register those of non-discarded instances.
2002         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
2003         (vect_schedule_slp_instance): Remove copying of
2004         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
2005         zero.
2006         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
2007         adding cost.  Record cost entry location.
2008         (vect_prologue_cost_for_slp_op): Function to compute cost of
2009         a constant or invariant generated for SLP vect in the prologue,
2010         split out from vect_analyze_slp_cost_1.
2011         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
2012         (vect_model_promotion_demotion_cost): Likewise.
2013         (vect_model_store_cost): Likewise, make static.
2014         (vect_model_load_cost): Likewise.
2015         (vectorizable_bswap): Add cost vector arg and adjust.
2016         (vectorizable_call): Likewise.
2017         (vectorizable_simd_clone_call): Likewise.
2018         (vectorizable_conversion): Likewise.
2019         (vectorizable_assignment): Likewise.
2020         (vectorizable_shift): Likewise.
2021         (vectorizable_operation): Likewise.
2022         (vectorizable_store): Likewise.
2023         (vectorizable_load): Likewise.
2024         (vectorizable_condition): Likewise.
2025         (vectorizable_comparison): Likewise.
2026         (can_vectorize_live_stmts): Likewise.
2027         (vect_analyze_stmt): Likewise.
2028         (vect_transform_stmt): Adjust calls to vectorizable_*.
2029         * tree-vectorizer.c: Include gimple-pretty-print.h.
2030         (dump_stmt_cost): New function.
2032 2018-05-16  Richard Biener  <rguenther@suse.de>
2034         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
2035         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
2036         * tree-ssa-dse.c: Include tree-ssa-loop.h.
2037         (check_name): New callback.
2038         (dse_classify_store): Track cycles via a visited bitmap of PHI
2039         defs and simplify handling of in-loop and across loop dead stores
2040         and properly fail for loop-variant refs.  Handle byte-tracking with
2041         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
2042         limiting the walk.
2044 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
2046         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
2047         (vect_get_mask_type_for_stmt): Likewise.
2048         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
2049         split out from...
2050         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
2051         to determine the statement's vector type and the vector type that
2052         should be used for calculating nunits.  Deal with cases in which
2053         the type has to be deferred.
2054         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
2055         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
2056         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
2057         (vect_determine_vf_for_stmt): New functions, split out from...
2058         (vect_determine_vectorization_factor): ...here.
2059         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
2060         (vect_get_mask_type_for_stmt): New functions, split out from
2061         vect_determine_vectorization_factor.
2063 2018-05-16  Richard Biener  <rguenther@suse.de>
2065         * tree-cfg.c (verify_gimple_assign_ternary): Properly
2066         verify the [VEC_]COND_EXPR embedded comparison.
2068 2018-05-15  Martin Sebor  <msebor@redhat.com>
2070         PR tree-optimization/85753
2071         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
2072         RECORD_TYPE in addition to ARRAY_TYPE.
2074 2018-05-15  Martin Sebor  <msebor@redhat.com>
2076         PR middle-end/85643
2077         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
2079 2018-05-15  Richard Biener  <rguenther@suse.de>
2081         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
2082         add by_clobber_p one.  Change algorithm to collect all defs
2083         representing uses we need to walk and try reducing them to
2084         a single one before failing.
2085         (dse_dom_walker::dse_optimize_stmt): Adjust.
2087 2018-05-13  Mark Wielaard  <mark@klomp.org>
2089         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
2090         (size_of_loc_descr): Likewise.
2091         (output_loc_operands): Likewise.
2092         (output_loc_operands_raw): Likewise.
2093         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
2094         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
2095         (hash_loc_operands): Likewise.
2096         (compare_loc_operands): Likewise.
2098 2018-05-14  Mark Wielaard  <mark@klomp.org>
2100         * dwarf2out.c (count_index_addrs): New function.
2101         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
2103 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2105         PR tree-optimization/83648
2106         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
2107         return value as malloc candidate.
2109 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2111         PR ipa/85734
2112         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
2113         as true in call to suggest_attribute.
2115 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
2117         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
2118         -mreadonly-in-sdata.
2120 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2122         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
2123         New pattern.
2124         (aarch64_crypto_aesd_fused): Likewise.
2126 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
2128         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
2129         (movsi_aarch64): Likewise.
2130         (load_pairsi): Likewise.
2131         (load_pairdi): Likewise.
2132         (store_pairsi): Likewise.
2133         (store_pairdi): Likewise.
2134         (load_pairsf): Likewise.
2135         (load_pairdf): Likewise.
2136         (store_pairsf): Likewise.
2137         (store_pairdf): Likewise.
2138         (zero_extend): Likewise.
2139         (trunc): Swap alternatives.
2140         (fcvt_target): Add '?' to prefer w over r.
2142 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
2144         PR target/85756
2145         * config/i386/i386.md: Disallow non-commutative arithmetics in
2146         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
2147         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
2148         in the peephole2 before it.
2150 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
2152         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
2153         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
2154         (ix86_handle_option): Handle -mcldemote.
2155         * config.gcc: New header.
2156         * config/i386/cldemoteintrin.h: New file.
2157         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
2158         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
2159         -mcldemote.
2160         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2161         OPTION_MASK_ISA_CLDEMOTE.
2162         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
2163         (ix86_valid_target_attribute_inner_p): Ditto.
2164         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
2165         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
2166         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
2167         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
2168         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
2169         (cldemote): New.
2170         * config/i386/i386.opt: Add -mcldemote.
2171         * config/i386/x86intrin.h: New header.
2172         * doc/invoke.texi: Add -mcldemote.
2174 2018-05-14  Richard Biener  <rguenther@suse.de>
2176         * doc/match-and-simplify.texi: Adjust :s documentation.
2178 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
2180         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
2181         intended memcpy size.
2182         (REORDER_45): Likewise.
2184 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
2186         * sort.cc: New file.
2187         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
2188         * vec.c (qsort_chk): Use gcc_qsort.
2189         * Makefile.in (OBJS-libcommon): Add sort.o.
2190         (build/sort.o): New target.  Use it...
2191         (BUILD_RTL): ... here, and...
2192         (build/gencfn-macros): ... here, and...
2193         (build/genmatch): ... here.
2195 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
2196             Chung-Ju Wu  <jasonwucj@gmail.com>
2198         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
2199         * config/nds32/nds32-graywolf.md: New file.
2200         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
2201         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
2202         pipeline.
2203         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
2204         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
2205         * config/nds32/nds32.md (pipeline_model): Add graywolf.
2206         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
2207         * config/nds32/pipelines.md: Include n15 settings.
2209 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
2210             Chung-Ju Wu  <jasonwucj@gmail.com>
2212         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
2213         * config/nds32/nds32-n13.md: New file.
2214         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
2215         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
2216         pipeline.
2217         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
2218         * config/nds32/nds32.md (pipeline_model): Add n13.
2219         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
2220         * config/nds32/pipelines.md: Include n13 settings.
2222 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
2223             Chung-Ju Wu  <jasonwucj@gmail.com>
2225         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
2226         * config/nds32/nds32-n10.md: New file.
2227         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
2228         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
2229         pipeline.
2230         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
2231         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
2232         * config/nds32/nds32.md (pipeline_model): Add n10.
2233         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
2234         * config/nds32/pipelines.md: Include n10 settings.
2236 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
2237             Kito Cheng  <kito.cheng@gmail.com>
2238             Chung-Ju Wu  <jasonwucj@gmail.com>
2240         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
2241         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2242         Add enum values for DSP extension instructions.
2243         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
2244         New constraints.
2245         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
2246         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
2247         New code iterators.
2248         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
2249         * config/nds32/nds32-dspext.md: New file for DSP implementation.
2250         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
2251         * config/nds32/nds32-intrinsic.md: Likewise.
2252         * config/nds32/nds32_intrinsic.h: Likewise.
2253         * config/nds32/nds32-md-auxiliary.c: Likewise.
2254         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
2255         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
2256         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
2257         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
2258         * config/nds32/nds32-protos.h: New declarations for DSP extension.
2259         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
2260         TYPE_DMAC in switch statement.
2261         * config/nds32/nds32.c: New checking and implementation for DSP
2262         extension instructions.
2263         * config/nds32/nds32.h: Likewise.
2264         * config/nds32/nds32.md: Likewise.
2265         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
2266         * config/nds32/predicates.md: Implement new predicates for DSP
2267         extension.
2269 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
2271         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
2272         Reformat alternatives and attributes so it is easier to identify
2273         which constraints/attributes go with which instruction.
2274         (mov<mode>_hardfloat32, FMOVE64): Likewise.
2275         (mov<mode>_softfloat32, FMOVE64): Likewise.
2276         (mov<mode>_hardfloat64, FMOVE64): Likewise.
2277         (mov<mode>_softfloat64, FMOVE64): Likewise.
2279 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2281         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2282         subsection.
2283         (Basic PowerPC Built-in Functions): The new name of the
2284         subsection previously known as "PowerPC Built-in Functions".
2285         (Basic PowerPC Built-in Functions Available on all Configurations):
2286         New subsubsection.
2287         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
2288         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
2289         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
2290         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
2292 2018-05-11  Martin Jambor  <mjambor@suse.cz>
2294         PR ipa/85655
2295         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
2296         single const.
2298 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2300         PR target/85733
2301         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
2303 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
2305         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
2306         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
2307         (ix86_handle_option): Handle -mwaitpkg.
2308         * config.gcc: New header.
2309         * config/i386/cpuid.h (bit_WAITPKG): New bit.
2310         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
2311         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
2312         function type.
2313         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2314         OPTION_MASK_ISA_WAITPKG.
2315         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
2316         (ix86_option_override_internal): Add PTA_WAITPKG.
2317         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
2318         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
2319         IX86_BUILTIN_TPAUSE.
2320         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
2321         __builtin_ia32_umwait and __builtin_ia32_tpause.
2322         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
2323         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
2324         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
2325         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
2326         UNSPECV_TPAUSE): New.
2327         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
2328         * config/i386/i386.opt: Add -mwaitpkg.
2329         * config/i386/waitpkgintrin.h: New file.
2330         * config/i386/x86intrin.h: New header.
2331         * doc/invoke.texi: Add -mwaitpkg.
2333 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
2335         PR target/85606
2336         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
2337         equivalent.
2338         (cortex-m0): Use armv6s-m isa.
2339         (cortex-m0plus): Likewise.
2340         (cortex-m1): Likewise.
2341         (cortex-m0.small-multiply): Likewise.
2342         (cortex-m0plus.small-multiply): Likewise.
2343         (cortex-m1.small-multiply): Likewise.
2345 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2346             Jakub Jelinek  <jakub@redhat.com>
2348         PR tree-optimization/85692
2349         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
2350         source permute as well.
2352 2018-05-11  Martin Liska  <mliska@suse.cz>
2354         PR sanitizer/85556
2355         * doc/extend.texi: Document LLVM style format for no_sanitize
2356         attribute.
2358 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
2360         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
2361         mode_supports_vsx_dform_quad to mode_supports_dq_form.
2362         (mode_supports_vsx_dform_quad): Likewise.
2363         (mode_supports_vmx_dform): Move these functions to be next to the
2364         other mode_supports functions.
2365         (mode_supports_dq_form): Likewise.
2366         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
2367         mode_supports_dq_form.
2368         (reg_offset_addressing_ok_p): Likewise.
2369         (offsettable_ok_by_alignment): Likewise.
2370         (rs6000_legitimate_offset_address_p): Likewise.
2371         (legitimate_lo_sum_address_p): Likewise.
2372         (rs6000_legitimize_address): Likewise.
2373         (rs6000_legitimize_reload_address): Likewise.
2374         (rs6000_secondary_reload_inner): Likewise.
2375         (rs6000_preferred_reload_class): Likewise.
2376         (rs6000_output_move_128bit): Likewise.
2378 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2380         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
2381         Generate SImode target register for null target.
2382         <case IX86_BUILTIN_XGETBV>: Ditto.
2383         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
2384         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
2386 2018-05-10  Carl Love  <cel@us.ibm.com>
2388         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
2389         dcbtt and dcbtstt if operands[2] is 0.
2391 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
2393         PR target/85693
2394         * config/i386/sse.md (usadv64qi): New expander.
2396 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
2398         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
2399         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
2400         -maltivec=be support.
2401         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
2402         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
2403         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
2404         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
2405         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
2406         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
2407         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
2408         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
2409         altivec_vsumsws): Adjust.
2410         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
2411         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
2412         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
2413         support.
2414         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
2415         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
2416         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
2417         (altivec_lve<VI_char>x): Delete expand.
2418         (*altivec_lve<VI_char>x_internal): Rename to...
2419         (altivec_lve<VI_char>x): ... this.
2420         (altivec_lvxl_<mode>): Delete expand.
2421         (*altivec_lvxl_<mode>_internal): Rename to ...
2422         (altivec_lvxl_<mode>): ... this.
2423         (altivec_stvxl_<mode>): Delete expand.
2424         (*altivec_stvxl_<mode>_internal): Rename to ...
2425         (altivec_stvxl_<mode>): ... this.
2426         (altivec_stve<VI_char>x): Delete expand.
2427         (*altivec_stve<VI_char>x_internal): Rename to ...
2428         (altivec_stve<VI_char>x): ... this.
2429         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
2430         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
2431         reduc_plus_scal_<mode>): Adjust.
2432         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
2433         comment.
2434         (rs6000_cpu_cpp_builtins): Adjust.
2435         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
2436         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
2437         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
2438         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
2439         -maltivec=be support.
2440         (rs6000_split_vec_extract_var): Adjust.
2441         (rs6000_split_v4si_init): Adjust.
2442         (swap_selector_for_mode): Delete.
2443         (altivec_expand_lvx_be, altivec_expand_stvx_be,
2444         altivec_expand_stvex_be): Delete.
2445         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
2446         -maltivec=be support.
2447         (rs6000_gimple_fold_builtin): Ditto.
2448         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
2449         Adjust.
2450         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
2451         (TARGET_DIRECT_MOVE_64BIT): Adjust.
2452         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
2453         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
2454         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
2455         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
2456         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
2457         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
2458         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
2459         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
2460         anonymous split): Adjust.
2461         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
2462         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
2464 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
2466         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
2467         when --with-gxx-include-dir is also specified.
2468         * configure: Regenerate.
2470 2018-05-09  Jim Wilson  <jimw@sifive.com>
2472         PR target/84797
2473         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
2474         * config/riscv/t-withmultilib: New.
2475         * config/riscv/withmultilib.h: New.
2476         * doc/install.texi: Document RISC-V --with-multilib-list support.
2478 2018-05-09  Richard Biener  <rguenther@suse.de>
2480         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
2481         vector.
2482         (vect_bb_vectorization_profitable_p): Adjust.  Compute
2483         actual scalar cost using the cost vector and the add_stmt_cost
2484         machinery.
2486 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2488         PR rtl-optimization/85645
2489         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
2490         in the REG_CFA_REGISTER note for LR, don't leave it empty.
2492 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2494         PR rtl-optimization/85645
2495         * shrink-wrap.c (spread_components): Return a boolean saying if
2496         anything was changed.
2497         (try_shrink_wrapping_separate): Iterate spread_components until
2498         nothing changes anymore.
2500 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2502         PR rtl-optimization/85645
2503         * regrename.c (build_def_use): Also kill the chains that include the
2504         destination of a REG_CFA_REGISTER note.
2506 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
2508         PR rtl-optimization/85645
2509         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2510         insn that has a REG_CFA_REGISTER note.
2512 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
2514         * cfgexpand.c (expand_clobber): New function.
2515         (expand_gimple_stmt_1): Use it.
2516         * tree-vect-stmts.c (vect_clobber_variable): New function,
2517         split out from...
2518         (vectorizable_simd_clone_call): ...here.
2519         (vectorizable_store): Emit a clobber either side of an
2520         IFN_STORE_LANES sequence.
2521         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2523 2018-05-09  Tom de Vries  <tom@codesourcery.com>
2525         PR target/85626
2526         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2527         (define_insn "trap_if_false"): Add exit after trap.
2529 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
2531         PR rtl-optimization/85638
2532         * bb-reorder.c: Include common/common-target.h.
2533         (create_forwarder_block): New function extracted from...
2534         (fix_up_crossing_landing_pad): ...here.  Rename into...
2535         (dw2_fix_up_crossing_landing_pad): ...this.
2536         (sjlj_fix_up_crossing_landing_pad): New function.
2537         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2538         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2539         from both partitions and exit the loop after one iteration.
2541 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2543         Revert:
2544         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2545         subsection.
2546         (Basic PowerPC Built-in Functions): The new name of the
2547         subsection previously known as "PowerPC Built-in Functions".
2548         (Basic PowerPC Built-in Functions Available on all Configurations):
2549         New subsubsection.
2550         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2551         subsubsection.
2552         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2553         subsubsection.
2554         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2555         subsubsection.
2556         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2557         subsubsection.
2559 2018-05-08  Jim Wilson  <jimw@sifive.com>
2561         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
2562         (LD_EMUL_SUFFIX): New.
2563         (LINK_SPEC): Use it.
2565 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2567         * doc/extend.texi (PowerPC Built-in Functions): Rename this
2568         subsection.
2569         (Basic PowerPC Built-in Functions): The new name of the
2570         subsection previously known as "PowerPC Built-in Functions".
2571         (Basic PowerPC Built-in Functions Available on all Configurations):
2572         New subsubsection.
2573         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2574         subsubsection.
2575         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2576         subsubsection.
2577         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2578         subsubsection.
2579         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2580         subsubsection.
2582 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2584         PR target/85683
2585         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
2586         after cmpelim optimization.
2588 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
2590         * config.gcc: Support "goldmont".
2591         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
2592         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2593         PROCESSOR_GOLDMONT.
2594         * config/i386/i386.c (m_GOLDMONT): Define.
2595         (processor_target_table): Add "goldmont".
2596         (PTA_GOLDMONT): Define.
2597         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
2598         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
2599         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
2600         (fold_builtin_cpu): Add "goldmont".
2601         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
2602         (ix86_option_override_internal): Add "goldmont".
2603         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
2604         (processor_type): Add PROCESSOR_GOLDMONT.
2605         * config/i386/i386.md: Add CPU "glm".
2606         * config/i386/glm.md: New file.
2607         * config/i386/x86-tune.def: Add m_GOLDMONT.
2608         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2610 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
2612         PR target/85572
2613         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
2614         E_V4DImode.
2615         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
2616         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
2617         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
2619         PR target/85317
2620         * config/i386/i386.c (ix86_fold_builtin): Handle
2621         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2623         PR target/85480
2624         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2625         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2627 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
2629         PR target/85658
2630         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2631         (check_arch): Likewise.
2632         (check_fpu): Return the result rather than printing it.
2633         (end arch): Fix operator precedence.
2634         (end cpu): Likewise.
2635         (END): Print the result from check_fpu.
2637 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2638             Alan Hayward  <alan.hayward@arm.com>
2639             David Sherwood  <david.sherwood@arm.com>
2641         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2642         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2643         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2644         (*fcmuo<mode>_and): New patterns.
2646 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
2648         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2649         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2650         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2651         (cmp_op, sve_imm_con): New code attributes.
2652         (SVE_COND_INT_CMP, imm_con): Delete.
2653         (cmp_op): Remove above unspecs from int attribute.
2654         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2655         to...
2656         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
2657         comparison-specific unspecs.
2658         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2659         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2660         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2661         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2662         (*vec_fcm<cmp_op><mode>): Rename to...
2663         (*fcm<cmp_op><mode>): ...this and adjust likewise.
2664         (*vec_fcmuo<mode>): Rename to...
2665         (*fcmuo<mode>): ...this and adjust likewise.
2666         (*pred_fcm<cmp_op><mode>): New pattern.
2667         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2668         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2669         functions.
2670         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2671         and UNORDERED.
2672         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2673         (aarch64_emit_sve_predicated_cond): New function.
2674         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2675         (aarch64_emit_unspec_cond_or): Replace with...
2676         (aarch64_emit_sve_or_conds): ...this new function.  Use
2677         aarch64_emit_sve_ptrue_op for the individual comparisons and
2678         aarch64_emit_binop to OR them together.
2679         (aarch64_emit_inverted_unspec_cond): Replace with...
2680         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
2681         aarch64_emit_sve_ptrue_op for the comparison and
2682         aarch64_emit_unop to invert the result.
2683         (aarch64_expand_sve_vec_cmp_float): Update after the above
2684         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
2686 2018-05-07  Nathan Sidwell  <nathan@acm.org>
2688         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2689         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2690         (Backwards Compatibility): Likewise.
2692 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2694         PR bootstrap/85681
2695         Revert:
2696         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2698         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2699         <prefetch_dynamic_strides>: New const bool field.
2700         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2701         prefetch_dynamic_strides.
2702         (exynosm1_prefetch_tune): Likewise.
2703         (thunderxt88_prefetch_tune): Likewise.
2704         (thunderx_prefetch_tune): Likewise.
2705         (thunderx2t99_prefetch_tune): Likewise.
2706         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2707         (aarch64_override_options_internal): Update to set
2708         PARAM_PREFETCH_DYNAMIC_STRIDES.
2709         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2710         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2711         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2712         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2713         prefetch-dynamic-strides setting.
2715         2018-05-07  Luis Machado  <luis.machado@linaro.org>
2717         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2718         <minimum_stride>: New const int field.
2719         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2720         minimum_stride field.
2721         (exynosm1_prefetch_tune): Likewise.
2722         (thunderxt88_prefetch_tune): Likewise.
2723         (thunderx_prefetch_tune): Likewise.
2724         (thunderx2t99_prefetch_tune): Likewise.
2725         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2726         (aarch64_override_options_internal): Update to set
2727         PARAM_PREFETCH_MINIMUM_STRIDE.
2728         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2729         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2730         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2731         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2732         stride is constant and is below the minimum stride threshold.
2734 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2736         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2737         to 512.
2739 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2741         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2742         <prefetch_dynamic_strides>: New const bool field.
2743         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2744         prefetch_dynamic_strides.
2745         (exynosm1_prefetch_tune): Likewise.
2746         (thunderxt88_prefetch_tune): Likewise.
2747         (thunderx_prefetch_tune): Likewise.
2748         (thunderx2t99_prefetch_tune): Likewise.
2749         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2750         (aarch64_override_options_internal): Update to set
2751         PARAM_PREFETCH_DYNAMIC_STRIDES.
2752         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2753         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2754         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2755         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2756         prefetch-dynamic-strides setting.
2758 2018-05-07  Luis Machado  <luis.machado@linaro.org>
2760         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2761         <minimum_stride>: New const int field.
2762         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2763         minimum_stride field.
2764         (exynosm1_prefetch_tune): Likewise.
2765         (thunderxt88_prefetch_tune): Likewise.
2766         (thunderx_prefetch_tune): Likewise.
2767         (thunderx2t99_prefetch_tune): Likewise.
2768         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2769         (aarch64_override_options_internal): Update to set
2770         PARAM_PREFETCH_MINIMUM_STRIDE.
2771         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2772         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2773         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2774         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2775         stride is constant and is below the minimum stride threshold.
2777 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
2779         PR c++/85659
2780         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2781         the type is addressable.  Don't force op into register if it has
2782         BLKmode.
2784 2018-05-05  Roland McGrath  <mcgrathr@google.com>
2786         PR other/77609
2787         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2788         any section for which we don't know a specific type it should have,
2789         regardless of name.  Previously this was done only for the exact
2790         names ".init_array", ".fini_array", and ".preinit_array".
2791         (default_elf_asm_named_section): Add comment about
2792         relationship with default_section_type_flags and SECTION_NOTYPE.
2793         (get_section): Don't consider it a type conflict if one side has
2794         SECTION_NOTYPE and the other doesn't, as long as neither has the
2795         SECTION_BSS et al used in the default_section_type_flags logic.
2797 2018-05-05  Tom de Vries  <tom@codesourcery.com>
2799         PR target/85653
2800         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2801         (workaround_barsyncs): New function.
2802         (nvptx_reorg): Use workaround_barsyncs.
2803         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2804         (define_expand "nvptx_membar_cta"): New define_expand.
2805         (define_insn "*nvptx_membar_cta"): New insn.
2807 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
2809         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2810         To improve optimization opportunities.
2811         * builtin-types.def: The new needed builtin types for the above.
2813 2018-05-04  Richard Biener  <rguenther@suse.de>
2815         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2816         * gimple-ssa-store-merging.c
2817         (imm_store_chain_info::output_merged_store): Remove redundant create,
2818         release split_store vector contents on failure.
2819         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2820         scalar stmt vector on cache hit.
2822 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
2824         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2825         Xilinx FP support.
2826         * config.gcc (powerpc-xilinx-eabi*): Remove.
2827         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2828         support.
2829         (fusion_addis_mem_combo_load): Ditto.
2830         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2831         FP support.
2832         (rs6000_cpu_cpp_builtins): Ditto.
2833         * config/rs6000/rs6000-linux.c
2834         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2835         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2836         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2837         support.
2838         (rs6000_setup_reg_addr_masks): Ditto.
2839         (rs6000_init_hard_regno_mode_ok): Ditto.
2840         (rs6000_option_override_internal): Ditto.
2841         (legitimate_lo_sum_address_p): Ditto.
2842         (rs6000_legitimize_address): Ditto.
2843         (rs6000_legitimize_reload_address): Ditto.
2844         (rs6000_legitimate_address_p): Ditto.
2845         (abi_v4_pass_in_fpr): Ditto.
2846         (setup_incoming_varargs): Ditto.
2847         (rs6000_gimplify_va_arg): Ditto.
2848         (rs6000_split_multireg_move): Ditto.
2849         (rs6000_savres_strategy): Ditto.
2850         (rs6000_emit_prologue_components): Ditto.
2851         (rs6000_emit_epilogue_components): Ditto.
2852         (rs6000_emit_prologue): Ditto.
2853         (rs6000_emit_epilogue): Ditto.
2854         (rs6000_elf_file_end): Ditto.
2855         (rs6000_function_value): Ditto.
2856         (rs6000_libcall_value): Ditto.
2857         * config/rs6000/rs6000.h: Ditto.
2858         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2859         (TARGET_MINMAX): ... this.  New.
2860         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2861         * config/rs6000/rs6000.md: Remove Xilinx FP support.
2862         (*movsi_internal1_single): Delete.
2863         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2864         mfpu=, mxilinx-fpu): Delete.
2865         * config/rs6000/singlefp.h: Delete.
2866         * config/rs6000/sysv4.h: Remove Xilinx FP support.
2867         * config/rs6000/t-rs6000: Ditto.
2868         * config/rs6000/t-xilinx: Delete.
2869         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2870         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2871         (VStype_simple): Delete.
2872         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2873         * config/rs6000/xfpu.h: Delete.
2874         * config/rs6000/xfpu.md: Delete.
2875         * config/rs6000/xilinx.h: Delete.
2876         * config/rs6000/xilinx.opt: Delete.
2877         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2878         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2880 2018-05-04  Tom de Vries  <tom@codesourcery.com>
2882         PR libgomp/85639
2883         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2884         if ignore == 0.
2886 2018-05-04  Richard Biener  <rguenther@suse.de>
2888         PR middle-end/85627
2889         * tree-complex.c (update_complex_assignment): We are always in SSA form.
2890         (expand_complex_div_wide): Likewise.
2891         (expand_complex_operations_1): Likewise.
2892         (expand_complex_libcall): Preserve EH info of the original stmt.
2893         (tree_lower_complex): Handle removed blocks.
2894         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2895         on complex multiplication and division libcall builtins.
2897 2018-05-04  Richard Biener  <rguenther@suse.de>
2899         PR middle-end/85574
2900         * fold-const.c (negate_expr_p): Restrict negation of operand
2901         zero of a division to when we know that can happen without
2902         overflow.
2903         (fold_negate_expr_1): Likewise.
2905 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
2907         PR libstdc++/85466
2908         * real.h (real_nextafter): Declare.
2909         * real.c (real_nextafter): New function.
2910         * fold-const-call.c (fold_const_nextafter): New function.
2911         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2912         CASE_CFN_NEXTTOWARD.
2913         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2914         even when arg1_mode is different from arg0_mode.
2916 2018-05-03  Nathan Sidwell  <nathan@acm.org>
2918         * doc/extend.texi (Deprecated Features): Remove
2919         -ffriend-injection.
2920         (Backwards Compatibility): Likewise.
2921         * doc/invoke.texi (C++ Language Options): Likewise.
2922         (C++ Dialect Options): Likewise.
2924 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
2926         PR target/85530
2927         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2928         _mm512_mask_mullox_epi64): New intrinsics.
2930 2018-05-03  Tom de Vries  <tom@codesourcery.com>
2932         PR testsuite/85106
2933         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2934         dump files): Add offload-tree.
2936 2018-05-03  Richard Biener  <rguenther@suse.de>
2938         PR tree-optimization/85615
2939         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2940         to loops not nested in BBs loop father to avoid creating multi-entry
2941         loops.
2943 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2945         PR tree-optimization/70291
2946         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2947         arguments.  Change return type to tree.  Emit libcall as a new
2948         statement rather than replacing existing one when inplace_p is true.
2949         (expand_complex_multiplication_components): New function.
2950         (expand_complex_multiplication): Expand floating-point complex
2951         multiplication using the above.
2952         (expand_complex_division): Rename inner_type parameter to type.
2953         Update expand_complex_libcall call-site.
2954         (expand_complex_operations_1): Update expand_complex_multiplication
2955         and expand_complex_division call-sites.
2957 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
2959         PR target/85582
2960         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2961         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2962         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2963         the highest significant bit of the shift count mask is clear.  In
2964         check whether and[sq]i3 is needed verify that all significant bits
2965         of the shift count other than the highest are set.
2967 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2969         PR libgomp/82428
2970         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2971         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2972         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2973         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2974         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2975         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2976         __builtin_goacc_parlevel_size.
2978 2018-05-02  Richard Biener  <rguenther@suse.de>
2980         PR tree-optimization/85597
2981         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2982         do not use split vect_get_vec_defs call but call vect_get_slp_defs
2983         directly.
2985 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2987         PR testsuite/85106
2988         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2989         dump files): Add ltrans-tree.
2991 2018-05-02  Tom de Vries  <tom@codesourcery.com>
2993         PR testsuite/85106
2994         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2995         dump files): Add wpa-ipa.
2997 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
2999         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
3000         powerpc*-*-linux*paired* target.
3001         * config/rs6000/750cl.h: Delete.
3002         * config/rs6000/paired.h: Delete.
3003         * config/rs6000/paired.md: Delete.
3004         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
3005         float support.
3006         * config/rs6000/rs6000-builtin.def: Remove paired float support.
3007         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
3008         comment.  Remove paired float support.
3009         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
3010         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3011         VECTOR_PAIRED.
3012         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
3013         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
3014         declarations.
3015         * config/rs6000/rs6000.c: Remove paired float support.
3016         (paired_expand_vector_init, paired_expand_vector_move,
3017         paired_emit_vector_compare, paired_emit_vector_cond_expr,
3018         (paired_expand_lv_builtin, paired_expand_stv_builtin,
3019         paired_expand_builtin, paired_expand_predicate_builtin,
3020         paired_init_builtins): Delete.
3021         * config/rs6000/rs6000.h: Remove paired float support.
3022         * config/rs6000/rs6000.md: Remove paired float support.
3023         (move_from_CR_ov_bit): Delete.
3024         * config/rs6000/rs6000.opt (mpaired): Delete.
3025         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
3026         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
3028 2018-05-02  Richard Biener  <rguenther@suse.de>
3030         PR middle-end/85567
3031         * gimplify.c (gimplify_save_expr): When in SSA form allow
3032         SAVE_EXPRs to compute to SSA vars.
3034 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
3036         PR target/85582
3037         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
3038         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
3039         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
3040         clobber operands[2], instead use a new pseudo.  Formatting fixes.
3042 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
3044         PR tree-optimization/85586
3045         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
3046         exit early for statements in the same group if the accesses are
3047         not strided.
3049 2018-05-02  Tom de Vries  <tom@codesourcery.com>
3051         PR lto/85451
3052         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
3053         error message.
3055 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
3057         PR tree-optimization/85143
3058         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
3060 2018-05-01  Tom de Vries  <tom@codesourcery.com>
3062         PR lto/85451
3063         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
3064         not found" error message.
3066 2018-05-01  Tom de Vries  <tom@codesourcery.com>
3068         PR other/83786
3069         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
3070         * vec.c (test_ordered_remove_if): New function.
3071         (vec_c_tests): Call test_ordered_remove_if.
3072         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
3073         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
3074         * tree-vect-patterns.c (vect_pattern_recog_1): Use
3075         VEC_ORDERED_REMOVE_IF.
3077 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3079         PR tree-optimization/82665
3080         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
3081         pointer subtraction where arguments come from a memchr call.
3083 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
3085         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
3086         --push-state --as-needed and --pop-state instead of --as-needed and
3087         --no-as-needed if ld supports it.
3088         * configure: Regenerated.
3090         PR web/85578
3091         * doc/install.texi2html: Replace _002d with - and _002a with * in
3092         generated html files using sed.
3094 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3096         PR c++/85523
3097         * gcc-rich-location.c (blank_line_before_p): New function.
3098         (use_new_line): New function.
3099         (gcc_rich_location::add_fixit_insert_formatted): New function.
3100         * gcc-rich-location.h
3101         (gcc_rich_location::add_fixit_insert_formatted): New function.
3103 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3105         * selftest.c (assert_streq): Rename "expected" and "actual" to
3106         "val1" and "val2".  Extend NULL-handling to cover both inputs
3107         symmetrically, while still requiring both to be non-NULL for a pass.
3108         * selftest.h (assert_streq): Rename "expected" and "actual" to
3109         "val1" and "val2".
3110         (ASSERT_EQ): Likewise.
3111         (ASSERT_EQ_AT): Likewise.
3112         (ASSERT_KNOWN_EQ): Likewise.
3113         (ASSERT_KNOWN_EQ_AT): Likewise.
3114         (ASSERT_NE): Likewise.
3115         (ASSERT_MAYBE_NE): Likewise.
3116         (ASSERT_MAYBE_NE_AT): Likewise.
3117         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
3118         the assertion to pass.
3119         (ASSERT_STREQ_AT): Likewise.
3121 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
3123         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
3124         interaction with -pie.
3126 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3128         * selftest.h: Fix alphabetization of per-source-file selftest
3129         declarations.
3131 2018-04-30  Jason Merrill  <jason@redhat.com>
3133         PR c++/61982 - dead stores to destroyed objects.
3134         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
3135         of clobber.
3137 2018-04-30  Jason Merrill  <jason@redhat.com>
3139         * tree.c (build_clobber): New.
3140         * tree.h: Declare it.
3141         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
3143 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3145         * diagnostic-show-locus.c (layout::layout): Update for
3146         location_get_source_line returning a char_span.
3147         (struct char_span): Move to input.h.
3148         (struct correction): Update for fields in char_span becoming
3149         private.
3150         (struct source_line): Update for location_get_source_line
3151         returning a char_span.
3152         (layout::print_line): Likewise.
3153         * edit-context.c (edited_file::print_content): Likewise.
3154         (edited_file::print_diff_hunk): Likewise.
3155         (edited_file::print_run_of_changed_lines): Likewise.
3156         (edited_file::get_num_lines): Likewise.
3157         (edited_line::edited_line): Likewise.
3158         * final.c (asm_show_source): Likewise.
3159         * input.c (location_get_source_line): Convert return type
3160         from const char * to char_span, losing the final "line_len"
3161         param.
3162         (dump_location_info): Update for the above.
3163         (get_substring_ranges_for_loc): Likewise.  Use a char_span
3164         when handling the literal within the line.
3165         (test_reading_source_line): Update for location_get_source_line
3166         returning a char_span.
3167         * input.h (class char_span): Move here from
3168         diagnostic-show-locus.c, converting from a struct to a class.
3169         Make data members private.
3170         (char_span::operator bool): New.
3171         (char_span::length): New.
3172         (char_span::get_buffer): New.
3173         (char_span::operator[]): New.
3174         (char_span::subspan): Make const.
3175         (char_span::xstrdup): New.
3176         (location_get_source_line): Convert return type from const char *
3177         to char_span, losing the final "line_size" param.
3179 2018-04-30  Jan Hubicka  <jh@suse.cz>
3181         * lto-wrapper.c (ltrans_priorities): New static var.
3182         (cmp_priority): New.
3183         (run_gcc): Read priorities and if doing parallel build order
3184         the Makefile by them.
3186 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3188         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
3190 2018-04-30  Richard Biener  <rguenther@suse.de>
3192         * tree-cfg.c (verify_address): Remove base argument, add
3193         flag whether to check TREE_ADDRESSABLE and do that.
3194         (verify_expr): Remove.
3195         (verify_types_in_gimple_reference): Add pieces from verify_expr.
3196         (verify_gimple_assign_single): Likewise.
3197         (verify_gimple_switch): Likewise.
3198         (verify_expr_location_1): Dereference tp once.  Add (disabled)
3199         piece from verify_expr.
3200         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
3202 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
3204         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
3206 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
3208         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
3209         (small_data_pattern): Likewise.
3210         (arc_rewrite_small_data): Likewise.
3211         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
3212         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
3213         (get_symbol_alignment): New function.
3214         (legitimate_small_data_address_p): Likewise.
3215         (legitimate_scaled_address): Update, call
3216         legitimate_small_data_address_p.
3217         (output_sdata): New static variable.
3218         (arc_print_operand): Update how we handle small data operands.
3219         (arc_print_operand_address): Likewise.
3220         (arc_legitimate_address_p): Update, use
3221         legitimate_small_data_address_p.
3222         (arc_rewrite_small_data_p): Remove.
3223         (arc_rewrite_small_data_1): Likewise.
3224         (arc_rewrite_small_data): Likewise.
3225         (small_data_pattern): Likewise.
3226         (compact_sda_memory_operand): Update to use
3227         legitimate_small_data_address_p and get_symbol_alignment.
3228         (prepare_move_operands): Don't rewite sdata pattern.
3229         (prepare_extend_operands): Remove.
3230         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
3231         pattern.
3232         (zero_extendqisi2): Likewise.
3233         (zero_extendhisi2): Likewise.
3234         (extendqihi2): Likewise.
3235         (extendqisi2): Likewise.
3236         (extendhisi2): Likewise.
3237         (addsi3): Likewise.
3238         (subsi3): Likewise.
3239         (andsi3): Likewise.
3240         * config/arc/constraints.md (Usd): Change it to memory constraint.
3242 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
3244         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
3245         as source of std instructions.
3246         * config/arc/arc.md (movsi_insn): Update pattern predicate to
3247         allow 6-bit constants as source for store instructions.
3248         (movdi_insn): Update instruction pattern to allow 6-bit constants
3249         as source for store instructions.
3251 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
3253         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
3255 2018-04-30  Nathan Sidwell  <nathan@acm.org>
3256             Sandra Loosemore <sandra@codesourcery.com>
3258         * dumpfile.c (dump_open): Allow '-' for stdout.
3259         * doc/invoke.texi (Developer Options): Document dump filename
3260         determination early.  Document stdin/stdout selection.
3262 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
3264         Microblaze Target: PIC data text relative
3266         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
3267         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
3268         Add declaration.
3269         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
3270         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
3271         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
3272         New addressing mode for data-text relative position indepenedent code.
3273         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
3274         'ADDRESS_SYMBOLIC_TXT_REL'.
3275         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
3276         (microblaze_legitimate_pic_operand): Exclude function calls from
3277         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
3278         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
3279         addresses cases.
3280         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3281         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3282         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
3283         for 'address + offset'.
3284         (microblaze_expand_prologue): Add new function prologue call for
3285         'r20' assignation.
3286         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
3287         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
3288         table in case of TARGET_PIC_DATA_TEXT_REL.
3289         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
3290         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
3291         Add new macros 'UNSPEC_TEXT',
3292         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
3293         + exclude function calls from 'UNSPEC_PLT' in case of data text
3294         relative mode.
3295         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3296         new target hook for generating address diff vector tables in case of
3297         flag_pic.
3298         * doc/tm.texi : Regenerate.
3299         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
3300         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
3301         of addr diff vector generation.
3302         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3303         target hook definition.
3304         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
3305         Add default function for generate_pic_addr_diff_vec -> flag_pic.
3306         * doc/invoke.texi (Add new pic option): Add new microblaze pic
3307         option for data text relative.
3309 2018-04-30  Richard Biener  <rguenther@suse.de>
3311         * tree-chrec.h (evolution_function_is_constant_p): Remove
3312         redundant check.
3313         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
3315 2018-04-30  Richard Biener  <rguenther@suse.de>
3317         PR bootstrap/85571
3318         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
3320 2018-04-30  Richard Biener  <rguenther@suse.de>
3322         PR tree-optimization/28364
3323         PR tree-optimization/85275
3324         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
3325         copying first exit test.
3327 2018-04-28  Mark Wielaard  <mark@klomp.org>
3329         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
3330         dwarf_version >= 5.
3331         (dwarf_AT): Handle DW_AT_addr_base.
3332         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
3334 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
3336         PR target/84431
3337         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
3338         (*ashl<dwi>3_doubleword_mask_1): Ditto.
3339         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
3340         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
3342 2018-04-28  Richard Biener  <rguenther@suse.de>
3344         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
3345         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
3346         to reflect use.  Only add interesting stmts.
3348 2018-04-27  Martin Jambor  <mjambor@suse.cz>
3350         PR ipa/85549
3351         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
3352         the jump function allows for passing through aggregate values.
3354 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
3356         * input.h (in_system_header_at): Convert from macro to inline
3357         function.
3358         (from_macro_expansion_at): Likewise.
3359         (from_macro_definition_at): Likewise.
3361 2018-04-27  Jeff Law  <law@redhat.com>
3363         * config.gcc: Mark tile* targets as deprecated/obsolete.
3365 2018-04-27  Richard Biener  <rguenther@suse.de>
3367         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
3368         fix for ILP32.
3370 2018-04-27  Richard Biener  <rguenther@suse.de>
3372         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
3374 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
3376         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
3377         with Yd constraint. Set "preferred_for_speed" attribute from
3378         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
3379         with Yd constraint.
3380         (*movdi_internal): Ditto.
3381         (movti_interunit splitters): Remove
3382         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
3383         (movdi_interunit splitters): Ditto.
3384         * config/i386/constraints.md (Ye): Remove.
3385         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
3387 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3389         PR target/85512
3390         * config/aarch64/constraints.md (Usg): Limit to 31.
3391         (Usj): Limit to 63.
3393 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
3395         PR tree-optimization/85529
3396         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
3397         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
3398         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
3399         zero extension or masking of the MSB bit.
3400         (optimize_range_tests): Add FIRST_BB argument, pass it through
3401         to optimize_range_tests_var_bound.
3402         (maybe_optimize_range_tests, reassociate_bb): Adjust
3403         optimize_range_tests callers.
3405 2018-04-26  Richard Biener  <rguenther@suse.de>
3406             Jakub Jelinek  <jakub@redhat.com>
3408         * cgraph.h (symbol_table): Just declare debug method here.
3409         * symtab.c (symbol_table::debug): Define.
3411 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
3413         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
3415 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
3417         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
3418         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
3419         (*movdi_internal): Substitute Yi and Yj constraint with x
3420         and Ym and Yn constraint with y constraint.  Update "isa"
3421         attribute and set "preferred_for_speed" attribute from
3422         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
3423         (*movsi_internal): Ditto.
3424         (*movdf_internal): Ditto.
3425         (*movsf_internal): Ditto.
3426         (*zero_extendsidi2): Ditto.
3427         * config/i386/sse.md (vec_set<mode>_0): Ditto.
3428         (sse2_loadld): Ditto.
3429         (*vec_extract<ssevecmodelower>_0): Ditto.
3430         (*vec_extractv4si_0_zext_sse4): Ditto.
3431         (vec_concatv2di): Ditto.
3432         (*vec_dup<mode>): Ditto.
3433         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
3434         * config/i386/constraints.md (Yi): Remove.
3435         (Yj): Remove.
3436         (Ym): Remove.
3437         (Yn): Remove.
3439 2018-04-26  Nathan Sidwell  <nathan@acm.org>
3441         * dumpfile.c (dump_open): New.
3442         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
3443         (dump_finish): Detect stdio/stderr by value not name.
3445 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
3447         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
3449 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3451         PR target/84952
3452         * config/nvptx/nvptx.c (verify_neutering_jumps)
3453         (verify_neutering_labels): New function
3454         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
3456 2018-04-26  Tom de Vries  <tom@codesourcery.com>
3458         PR target/84025
3459         * config/nvptx/nvptx.c (needs_neutering_p): New function.
3460         (nvptx_single): Use needs_neutering_p to skip over insns that do not
3461         need neutering.
3463 2018-04-26  Richard Biener <rguenther@suse.de>
3464             Tom de Vries  <tom@codesourcery.com>
3466         PR lto/85422
3467         * lto-streamer-out.c (output_function): Fixup loops if required to match
3468         discovery done in the reader.
3470 2018-04-26  Richard Biener  <rguenther@suse.de>
3472         PR tree-optimization/85116
3473         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
3474         have a loop exit from the single latch predecessor.  Remove
3475         case of header with just condition.
3476         (ch_base::copy_headers): Exclude infinite loops from any
3477         processing.
3478         (pass_ch::execute): Record exits.
3480 2018-04-26  Richard Biener  <rguenther@suse.de>
3482         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
3483         prologue cost vector and pass it to vect_get_load_cost.
3484         (vect_get_peeling_costs_all_drs): Likewise.
3485         (vect_peeling_hash_get_lowest_cost): Likewise.
3486         (vect_enhance_data_refs_alignment): Likewise.
3488 2018-04-26  Richard Biener  <rguenther@suse.de>
3490         PR middle-end/85450
3491         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
3492         checking of integer<->pointer conversions.
3493         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
3494         sign-/zero-extending pointer types.
3495         (expand_omp_for_static_chunk): Likewise.
3497 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
3498             Jean Lee  <xiaoyur347@gmail.com>
3500         * config/mips/mips.c (mips_asan_shadow_offset): New function.
3501         (TARGET_ASAN_SHADOW_OFFSET): Define.
3502         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
3503         true for -fsanitize=address.
3505 2018-04-25  Mark Wielaard  <mark@klomp.org>
3507         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3508         shorter ones.
3510 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3512         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3513         than "alu", remove explicit "memory" and "imm_disp" attributes.
3514         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3516         PR middle-end/85414
3517         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3518         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3519         gen_lowpart_no_emit.
3521 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
3523         PR target/85473
3524         * config/i386/i386.c (ix86_expand_builtin): Change memory
3525         operand to XI, extend p0 to Pmode.
3526         * config/i386/i386.md: Change unspec volatile and operand
3527         1 mode to XI, change operand 0 mode to P.
3529 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3531         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3532         GET_MODE_MASK before any checking.
3533         (nds32_can_use_bset_p): Likewise.
3534         (nds32_can_use_btgl_p): Likewise.
3536 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3538         * config/nds32/nds32-doubleword.md: New define_split pattern for
3539         illegal register number.
3541 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3543         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3545 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
3547         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3549 2018-04-25  Richard Biener  <rguenther@suse.de>
3551         * lto-streamer.h (LTO_major_version): Bump to 8.
3553 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
3555         * BASE-VER: Set to 9.0.0.
3557 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
3559         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
3560         in __abskf2 and __powikf2.
3562 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3564         PR target/85512
3565         * config/aarch64/constraints.md (Usg, Usj): New constraints.
3566         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
3567         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
3568         Use the above on operand 2.  Reindent.
3569         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
3571 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3573         PR target/85485
3574         * common/config/i386/i386-common.c (ix86_handle_option): Don't
3575         handle OPT_mcet.
3576         * config/i386/i386.opt (mcet): Removed.
3577         * doc/install.texi: Remove -mcet documentation.
3578         * doc/invoke.texi: Likewise.
3580 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
3582         PR target/85485
3583         * doc/install.texi: Remove -mcet from bootstrap-cet.
3585 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3587         PR target/85511
3588         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
3589         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
3590         if TARGET_64BIT.
3592         PR target/85503
3593         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
3594         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
3595         containing a CONST_VECTOR.
3597 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
3599         * doc/install.texi: Update newlib dependency for nvptx.
3601 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3603         PR target/85508
3604         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
3605         instead of INTVAL when shifting x left.
3607 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
3609         PR tree-optimization/85478
3610         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
3611         vect_grouped_store_supported for single element vectors.
3613 2018-04-24  Richard Biener  <rguenther@suse.de>
3615         PR target/85491
3616         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
3617         load cost increase to the case of non-constant step.
3619 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
3621         PR target/84828
3622         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3623         destination if any_malformed_asm.
3625 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
3627         PR middle-end/85496
3628         * expr.c (store_field): In the bitfield case, if the value comes from
3629         a function call and is returned in registers by means of a PARALLEL,
3630         do not change the mode of the temporary unless BLKmode and VOIDmode.
3632 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
3634         PR rtl-optimization/85423
3635         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3636         dependencies to debug insns when the previous insn is non-debug.
3638 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3640         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3641         enums into a single definition.
3642         (fls): Fix predicates and printing.
3643         (seti): Likewise.
3645 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
3647         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3648         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3649         and short u6 immediate.
3650         (check_if_valid_sleep_operand): Remove.
3651         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3653 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3655         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3656         flag_always_save_lp condition.
3657         * config/nds32/nds32.opt (malways-save-lp): New option.
3659 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3661         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3662         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3663         * config/nds32/nds32.h
3664         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3665         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3667 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3669         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3670         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3672 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
3673             Chung-Ju Wu  <jasonwucj@gmail.com>
3675         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3676         Declare.
3677         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3678         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3680 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3682         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3684 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3686         * config/nds32/nds32-protos.h (nds32_data_alignment,
3687         nds32_local_alignment): Declare.
3688         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3689         nds32_local_alignment): New functions.
3690         (TARGET_CONSTANT_ALIGNMENT): Define.
3691         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3693 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3695         * config/nds32/nds32.c
3696         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3697         (TARGET_MODES_TIEABLE_P): Likewise.
3699 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
3701         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3702         level Ofast and Og.
3704 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
3705             Chung-Ju Wu  <jasonwucj@gmail.com>
3707         * config/nds32/constants.md (unspec_volatile_element): Add enum values
3708         for unaligned access.
3709         * config/nds32/nds32-intrinsic.c: Implementation of expanding
3710         unaligned access.
3711         * config/nds32/nds32-intrinsic.md: Likewise.
3712         * config/nds32/nds32_intrinsic.h: Likewise.
3713         * config/nds32/nds32.h (nds32_builtins): Likewise.
3714         * config/nds32/nds32.opt (munaligned-access): New option.
3715         * config/nds32/nds32.c (nds32_asm_file_start): Display
3716         flag_unaligned_access status.
3718 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3720         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3721         -mno-relax is present.
3722         * config/riscv/linux.h (LINK_SPEC): Ditto.
3724 2018-04-20  Martin Sebor  <msebor@redhat.com>
3726         PR c/85365
3727         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3728         for null pointers.
3729         (gimple_fold_builtin_stxcpy_chk): Same.
3730         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3732 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
3734         PR target/85456
3735         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3736         __powikf2 when long double is IEEE 128-bit.
3738 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
3740         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3741         step to make sure stack always aligned.
3743 2018-04-20  Carl Love  <cel@us.ibm.com>
3745         PR target/83402
3746         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3747         size check for arg0.
3749 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3750             Tom de Vries  <tom@codesourcery.com>
3752         PR target/85445
3753         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3754         Emit insns for calls too.
3755         (nvptx_find_par): Always look for worker-level predecessor insn.
3756         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
3757         calls.
3758         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3759         (nvptx_process_pars): Propagate frames for calls.
3761 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3763         PR target/85469
3764         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3765         Removed.
3766         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3767         (ix86_handle_option): Don't handle OPT_mibt.
3768         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3769         __SHSTK__.
3770         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3771         has_ibt and ibt.
3772         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3773         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3774         (ix86_target_macros): Define __CET__ with flag_cf_protection
3775         for -fcf-protection.
3776         * config/i386/i386.c (isa2_opts): Remove -mibt.
3777         * config/i386/i386.h (TARGET_IBT): Removed.
3778         (TARGET_IBT_P): Likewise.
3779         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3780         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3781         * config/i386/i386.opt (mcet): Update help message.
3782         (mshstk): Likewise.
3783         (mibt): Removed.
3784         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
3785         -mcet as an alias for -mshstk.
3787 2018-04-20  Richard Biener <rguenther@suse.de>
3789         PR middle-end/85475
3790         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3791         complexity by forcing a single use of the multiply operand.
3793 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3795         ipa/85449
3796         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3797         recursion dependency to only apply to non-clones.
3799 2018-04-20  Martin Jambor  <mjambor@suse.cz>
3801         ipa/85447
3802         * ipa-cp.c (create_specialized_node): Check that clones of
3803         self-recursive edges exist during IPA-CP.
3805 2018-04-19  Toon Moene  <toon@moene.org>
3807         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3808         by -O3. 
3810 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3812         PR tree-optimization/85467
3813         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3814         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
3815         VECTOR_CST element to type.
3817 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3819         PR target/85397
3820         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3821         * config/i386/i386.md (builtin_setjmp_setup): Removed.
3822         (builtin_longjmp): Likewise.
3823         (save_stack_nonlocal): New pattern.
3824         (restore_stack_nonlocal): Likewise.
3826 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3828         PR target/85404
3829         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3830         Replace ASM_OUTPUT_LABEL with fprintf.
3832 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
3834         PR target/85417
3835         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3836         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3837         * config/i386/i386-c.c (ix86_target_macros_internal): Also
3838         define __IBT__ and __SHSTK__ for -fcf-protection.
3839         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3840         TARGET_IBT.
3841         (ix86_trampoline_init): Likewise.
3842         (x86_output_mi_thunk): Likewise.
3843         (ix86_notrack_prefixed_insn_p): Likewise.
3844         (ix86_option_override_internal): Don't disallow -fcf-protection.
3845         * config/i386/i386.md (rdssp<mode>): Also enable for
3846         -fcf-protection.
3847         (incssp<mode>): Likewise.
3848         (nop_endbr): Likewise.
3849         * config/i386/i386.opt (mcet): Change help message to built-in
3850         functions only.
3851         (mibt): Likewise.
3852         (mshstk): Likewise.
3853         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3854         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
3855         enable CET built-in functions.
3857 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
3859         * common/config/i386/i386-common.c 
3860         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3861         OPTION_MASK_ISA_MOVDIRI_UNSET,
3862         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3863         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3864         * config.gcc (movdirintrin.h): New header.
3865         * config/i386/cpuid.h (bit_MOVDIRI,
3866         bit_MOVDIR64B): New bits.
3867         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3868         and -mmvodir64b.
3869         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3870         (VOID, PVOID, PCVOID)): New function types.
3871         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3872         __builtin_ia32_directstoreu_u64,
3873          __builtin_ia32_movdir64b): New builtins.
3874         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3875         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3876         and -mmovdiri.
3877         (ix86_valid_target_attribute_inner_p): Ditto.
3878         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3879         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3880         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3881         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3882         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3883         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3884         (movdiri<mode>, movdir64b_<mode>): New.
3885         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3886         * config/i386/immintrin.h: Include movdirintrin.h.
3887         * config/i386/movdirintrin.h: New file.
3888         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3890 2018-04-19  Richard Biener  <rguenther@suse.de>
3892         PR middle-end/85455
3893         * cfg.c (clear_bb_flags): When loop state says we have
3894         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3896 2018-04-19  Richard Biener  <rguenther@suse.de>
3898         PR tree-optimization/84737
3899         * tree-vect-data-refs.c (vect_copy_ref_info): New function
3900         copying restrict info.
3901         (vect_setup_realignment): Use it.
3902         * tree-vectorizer.h (vect_copy_ref_info): Declare.
3903         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3904         the first DR to all generated stores.
3905         (vectorizable_load): Likewise for loads.
3907 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
3909         PR tree-optimization/85446
3910         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3911         the integral and pointer types to have the same precision.
3913         * doc/install.texi: Document --disable-cet being the default and
3914         --enable-cet=auto.
3916 2018-04-18  Martin Liska  <mliska@suse.cz>
3918         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3919         style.
3921 2018-04-18  Martin Liska  <mliska@suse.cz>
3923         Revert
3924         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
3926         PR ipa/83983
3927         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3928         arguments if they are comparable.
3930 2018-04-18  Martin Liska  <mliska@suse.cz>
3932         Revert
3933         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3935         PR lto/84805
3936         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3937         incomplete types.
3939 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
3941         PR target/85388
3942         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3943         ENDBR after calling __morestack.
3945 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
3947         PR jit/85384
3948         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3949         by using gcc_base_ver to generate a gcc_driver_version, and use
3950         it when generating GCC_DRIVER_NAME.
3951         * configure: Regenerate.
3953 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
3955         PR target/81084
3956         * config.gcc: Obsolete powerpc*-*-*spe*.
3958 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3960         PR debug/84637
3961         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3962         (stabstr_D): Change type of unum from unsigned int to
3963         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
3964         type.
3966 2018-04-17  Jim Wilson  <jimw@sifive.com>
3968         PR 84856
3969         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3970         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3971         Set arg_pointer_offset after using pretend_args_size.
3973 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
3975         PR rtl-optimization/85431
3976         * dse.c (record_store): Ignore zero width stores.
3978         PR sanitizer/85230
3979         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
3980         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3981         __builtin_stack_restore rather than after it.
3982         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3983         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3984         argument instead of virtual_dynamic_stack_rtx.
3986 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3988         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3989         New prototype.
3990         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3991         Add note to error message to explain internal mapping of overloaded
3992         built-in function name to non-overloaded built-in function name.
3993         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3994         function.
3996 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
3998         PR target/85424
3999         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
4000         where the inputs overlap with the output.
4002 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
4004         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
4005         (=v, v) alternative and explicit "memory" attribute.
4006         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
4007         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4008         attributes.
4009         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
4010         "sselog1" type instead of "sselog".
4011         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
4012         "sselog".  Remove explicit "memory" attribute.
4013         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
4014         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4015         attributes.
4016         (vec_extract_hi_v32hi): Merge all alternatives into one, use
4017         "sselog1" type instead of "sselog".  Remove explicit "memory"
4018         attribute.
4019         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
4020         use "sselog1" type instead of "sselog".  Remove explicit "memory"
4021         attribute.
4022         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
4023         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4024         attributes.
4025         (vec_extract_hi_v64qi): Merge all alternatives into one, use
4026         "sselog1" type instead of "sselog".  Remove explicit "memory"
4027         attribute.
4028         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
4029         use "sselog1" type instead of "sselog".  Remove explicit "memory"
4030         attribute.
4032         PR target/85430
4033         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
4035         PR middle-end/85414
4036         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
4037         on a SUBREG.
4039 2018-04-17  Martin Jambor  <mjambor@suse.cz>
4041         PR ipa/85421
4042         * ipa-cp.c (create_specialized_node): Call
4043         expand_all_artificial_thunks if necessary.
4045 2018-04-17  Martin Liska  <mliska@suse.cz>
4047         PR lto/85405
4048         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
4049         in message, remote space in between '_G' and '('.
4051 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
4053         PR target/85281
4054         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
4055         avx512f_vmcmp<mode>3<round_saeonly_name>,
4056         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
4057         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
4058         avx512f_rndscale<mode><round_saeonly_name>,
4059         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
4060         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
4061         Use %<iptr>2 instead of %2 for -masm=intel.
4062         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
4063         avx512f_vcvttss2usi<round_saeonly_name>,
4064         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
4065         -masm=intel.
4066         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
4067         avx512f_vcvttsd2usi<round_saeonly_name>,
4068         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
4069         Use %q1 instead of %1 for -masm=intel.
4070         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
4071         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
4072         of %3 for -masm=intel.
4073         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
4074         -masm=intel.
4075         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
4076         -masm=intel.
4077         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
4078         -masm=intel.
4079         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
4080         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
4081         %g1.
4082         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
4083         -masm=intel.
4084         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
4085         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
4086         %g1 and one with %0 and %1.
4087         (avx512er_vmrcp28<mode><round_saeonly_name>,
4088         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
4089         %1 for -masm=intel.
4090         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
4091         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
4092         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
4093         of %0 and %{%4%} for -masm=intel.
4094         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
4095         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
4096         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
4097         order of %0 and %{%5%}%{z%} for -masm=intel.
4099 2018-04-17  Jan Hubicka  <jh@suse.cz>
4101         PR lto/85405
4102         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
4104 2018-04-17  Martin Liska  <mliska@suse.cz>
4106         PR ipa/85329
4107         * multiple_target.c (create_dispatcher_calls): Set apostrophes
4108         for target_clone error message.  Make default implementation
4109         clone to be a local declaration.
4110         (separate_attrs): Add new argument and check for an empty
4111         string.
4112         (expand_target_clones): Handle it.
4113         (ipa_target_clone): Make redirection just for target_clones
4114         functions.
4116 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
4117             Tom de Vries  <tom@codesourcery.com>
4119         PR middle-end/84955
4120         * omp-expand.c (expand_oacc_for): Add dummy false branch for
4121         tiled basic blocks without omp continue statements.
4123 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
4125         PR target/83660
4126         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
4127         vec_extract expression as having side effects to make sure it gets
4128         a cleanup point.
4130 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
4132         PR target/85403
4133         * config/i386/i386.c (get_builtin_code_for_version): Check
4134         error_mark_node.
4136 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
4138         PR target/84331
4139         * gcc/config.gcc: Support "skylake".
4140         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
4141         PROCESSOR_SKYLAKE.
4142         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
4143         (processor_target_table): Add "skylake".
4144         (ix86_option_override_internal): Add "skylake".
4145         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
4146         PROCESSOR_CANNONLAKE.
4147         (get_builtin_code_for_version): Fix priority for
4148         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
4149         PROCESSOR_SKYLAKE-AVX512.
4150         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
4151         (processor_type): Add PROCESSOR_SKYLAKE.
4153 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
4154             Jason Merrill  <jason@redhat.com>
4156         PR c++/85112
4157         * convert.c (convert_to_integer_1): Use direct recursion for
4158         enumeral types and types with a precision less than the number
4159         of bits in their mode.
4161 2018-04-16  Julia Koval  <julia.koval@intel.com>
4163         PR target/84413
4164         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
4165         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
4167 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
4169         PR target/85293
4170         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
4171         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
4172         and -mno-direct-move.
4174 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
4176         PR target/83402
4177         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
4178         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
4179         Ensure negative shifts result in {0}.
4181 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
4183         PR rtl-optimization/79916
4184         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
4185         regs (if any) to define how to gnerate SD moves when LRA is in
4186         progress.
4188 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
4190         PR rtl-optimization/85393
4191         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
4192         * except.c (expand_dw2_landing_pad_for_region): Make static.
4193         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
4194         a label and unconditional jump to old_bb, rather than
4195         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
4196         basic block.
4198         PR rtl-optimization/85376
4199         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
4200         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
4201         instead of a specific value.
4203 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
4204             Bin Cheng  <bin.cheng@arm.com>
4206         PR tree-optimization/82965
4207         PR tree-optimization/83991
4208         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
4209         by_profile_only parameter.
4210         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
4211         information if the loop was predicted to iterate too many times.
4212         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
4214 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
4216         PR lto/71991
4217         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
4218         always inline.
4220 2018-04-13  Martin Liska  <mliska@suse.cz>
4221             Jakub Jelinek  <jakub@redhat.com>
4223         PR middle-end/81657
4224         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
4225         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
4226         * builtins.c (expand_builtin_memory_copy_args): Use
4227         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
4228         handle dest_addr == pc_rtx.
4230 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
4232         PR target/85291
4233         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
4234         asked to not generate direct moves.
4235         (fix_trunc<mode>si2_stfiwx): Similar.
4236         (fix_trunc<mode>si2_internal): Similar.
4238 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4240         PR debug/83157
4241         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
4242         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
4243         lookup if dest in some wider mode is known to be const0_rtx and
4244         if so, record permanent equivalence for it to be ZERO_EXTEND of
4245         the narrower mode destination.
4247 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4249         * lto-streamer-out.c (output_function): Revert 259346.
4250         * omp-expand.c (expand_oacc_for): Likewise.
4252 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
4254         PR rtl-optimization/85354
4255         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
4256         * sel-sched.c (sel_global_init): ... here.
4258 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
4260         PR target/85238
4261         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
4262         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4263         mode for PE-COFF targets.
4264         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
4265         (i386_pe_asm_lto_end): Likewise.
4266         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
4267         (TARGET_ASM_LTO_END): Likewise.
4268         * config/i386/winnt.c (saved_debug_info_level): New static variable.
4269         (i386_pe_asm_lto_start): New function.
4270         (i386_pe_asm_lto_end): Likewise.
4272 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
4273             Richard Biener  <rguenther@suse.de>
4275         PR middle-end/84955
4276         * lto-streamer-out.c (output_function): Fix CFG loop state before
4277         streaming out.
4278         * omp-expand.c (expand_oacc_for): Handle calls to internal
4279         functions like regular functions.
4281 2018-04-12  Richard Biener  <rguenther@suse.de>
4283         PR lto/85371
4284         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
4285         for the early LTO debug to properly generate references to it
4286         during DIE emission.  Do not re-use that for the skeleton for
4287         split-dwarf.
4288         (dwarf2out_early_finish): Likewise.
4290 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4292         PR target/85328
4293         * config/i386/sse.md
4294         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
4295         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
4296         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
4297         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
4298         and output is a reg, avoid creating invalid lowpart subreg, but
4299         instead split into a 512-bit move.  Don't split if not AVX512VL,
4300         input is xmm16+ reg and output is a mem.
4301         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
4302         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
4303         xmm16+ reg and output is a mem.
4305 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4307         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
4308         also for flag_dwarf2_cfi_asm.
4310 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
4312         PR rtl-optimization/85342
4313         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
4314         a bool scalar var inside of the loop instead.  Don't try to update
4315         recog_data.operand after failed apply_change_group.
4317 2018-04-12  Tom de Vries  <tom@codesourcery.com>
4319         PR target/85296
4320         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
4321         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
4322         array with flexible array member as array without given dimension.
4323         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
4324         argument for undefined param to true.
4326 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
4328         PR target/85321
4329         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4330         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
4331         from PowerPC section.
4332         * config/rs6000/sysv4.opt (mcall-): Improve help text.
4333         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
4334         help text that is too long.
4335         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
4336         help text that is too long.
4337         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
4338         help text that is too long.
4340 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
4342         * config/alpha/alpha.md (stack_probe_internal): Rename
4343         from "probe_stack".  Update all callers.
4345 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4347         PR rtl-optimization/84566
4348         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
4349         sched_macro_fuse_insns.
4351 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4353         PR target/84301
4354         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
4355         (compute_block_dependences): ... from here.
4357 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4359         PR tree-optimization/85331
4360         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
4361         from int to HOST_WIDE_INT.
4363 2018-04-11  Martin Jambor  <mjambor@suse.cz>
4365         PR ipa/84149
4366         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
4367         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
4368         not the same as the source val.
4369         (cgraph_edge_brings_value_p): New parameter.
4370         (gather_edges_for_value): Pass destination value to
4371         cgraph_edge_brings_value_p.
4372         (perhaps_add_new_callers): Likewise.
4373         (get_info_about_necessary_edges): Likewise and exclude values brought
4374         only by self-recursive edges.
4375         (create_specialized_node): Redirect only clones of self-calling edges.
4376         (+self_recursive_pass_through_p): New function.
4377         (find_more_scalar_values_for_callers_subset): Use it.
4378         (find_aggregate_values_for_callers_subset): Likewise.
4379         (known_aggs_to_agg_replacement_list): Removed.
4380         (decide_whether_version_node): Re-calculate known constants for all
4381         remaining context clones.
4383 2018-04-11  Richard Biener  <rguenther@suse.de>
4385         PR lto/85339
4386         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
4387         from early DWARF output.
4388         (dwarf2out_early_finish): Output line info unconditionally into
4389         early DWARF and add reference to it.
4391 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4393         PR target/85281
4394         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
4395         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
4396         other than V2DFmode using iptr mode attribute.
4397         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
4399 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
4401         PR rtl-optimization/84659
4402         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
4404 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
4406         PR debug/85302
4407         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
4408         SIZEP is NULL.
4409         (output_loc_list): Pass address of a dummy size variable even in the
4410         locview handling loop.
4411         (index_location_lists): Add comment on why skip_loc_list_entry can't
4412         call size_of_locs.
4414 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4416         PR target/85261
4417         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
4418         into register.
4420 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
4422         PR target/85321
4423         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4424         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
4425         and -mstring-compare-inline-limit.
4427 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4429         PR target/85287
4430         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
4431         for stack clash protection in a register whenever we need it to be in
4432         a register.
4434 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4436         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
4437         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
4439 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
4441         PR target/85321
4442         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
4443         the help text.
4444         (mlong-double-): Ditto.
4445         * config/rs6000/sysv4.opt (msdata=): Ditto.
4446         (mtls-size=): Ditto.
4448 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4450         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4451         erroneous entries for
4452         "vector int vec_ldl (int, long int *)", and
4453         "vector unsigned int vec_ldl (int, unsigned long int *)".
4454         Add comments and entries for
4455         "vector bool char vec_ldl (int, bool char *)",
4456         "vector bool short vec_ldl (int, bool short *)",
4457         "vector bool int vec_ldl (int, bool int *)",
4458         "vector bool long long vec_ldl (int, bool long long *)",
4459         "vector pixel vec_ldl (int, pixel *)",
4460         "vector long long vec_ldl (int, long long *)",
4461         "vector unsigned long long vec_ldl (int, unsigned long long *)".
4462         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
4463         type tree bool_long_long_type_node and correct definition of
4464         bool_V2DI_type_node to make reference to this new type tree.
4465         (rs6000_mangle_type): Replace erroneous reference to
4466         bool_long_type_node with bool_long_long_type_node.
4467         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
4468         comments to emphasize sign distinctions for char and int types and
4469         replace RS6000_BTI_bool_long constant with
4470         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
4471         use of RS6000_BTI_pixel.
4472         (bool_long_type_node): Remove this macro definition.
4473         (bool_long_long_type_node): New macro definition
4475 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4477         PR rtl-optimization/85300
4478         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
4479         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
4480         simplify_unary_operation fails.
4482 2018-04-10  Martin Liska  <mliska@suse.cz>
4484         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
4485         cgraph_edge and ipa_ref.
4487 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
4489         PR target/85177
4490         PR target/85255
4491         * config/i386/sse.md
4492         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
4493         computation of the VEC_MERGE selector from mask.
4494         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
4495         Fix decoding of the VEC_MERGE selector into mask.
4497 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4499         PR tree-optimization/85286
4500         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
4502 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
4504         * final.c (final_1): Set insn_last_address as well as
4505         insn_current_address.
4507 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4509         PR target/85173
4510         * explow.c (emit_stack_probe): Call validize_mem on memory location
4511         before passing it to gen_probe_stack.  Create address operand and
4512         legitimize it for the probe_stack_address case.
4514 2018-04-09  Jan Hubicka  <jh@suse.cz>
4516         PR lto/85078
4517         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4518         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4519         * tree.c (free_lang_data_in_type): Fix handling of binfos;
4520         walk basetypes.
4521         (free_lang_data): Rebuild type inheritance graph.
4523 2018-04-09  Martin Sebor  <msebor@redhat.com>
4525         * invoke.texi (-finline-small-functions): Mention other optimization
4526         options.
4527         (-findirect-inlining, -fpartial-inlining): Same.
4528         (-finline-functions-called-once): Same.
4529         (-freorder-blocks-and-partition): Same.
4531 2018-04-09  Jan Hubicka  <jh@suse.cz>
4533         PR rtl/84058
4534         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4535         jumps; choose last target that matches the criteria (i.e.
4536         no partition changes for non-crossing jumps).
4537         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4538         support for redirecting crossing jumps to non-crossing.
4540 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
4542         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4543         also for naked functions.
4545 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
4547         * config/arc/arc.md (add_shift): New pattern.
4548         (add_shift2): Likewise.
4549         (sub_shift): Likewise.
4550         (sub_shift_cmp0_noout): Likewise.
4551         (compare_si_ashiftsi): Likewise.
4552         (xbfu_cmp0_noout): New combine pattern.
4553         (xbfu_cmp0"): Likewise.
4554         (movsi_set_cc_insn): Place the predicable variant first.
4555         (commutative_binary_cmp0_noout): Remove clobber.
4556         (commutative_binary_cmp0): New pattern.
4557         (noncommutative_binary_cmp0): Likewise.
4558         (noncommutative_binary_cmp0_noout): Likewise.
4559         (noncommutative_binary_comparison_result_used): Removed.
4560         (rsub_cmp0): New pattern.
4561         (rsub_cmp0_noout): Likewise.
4562         (extzvsi): Changed, keep only meaningful variants.
4563         (SQH, SEZ): New iterators.
4564         (SQH_postfix): New mode attribute.
4565         (SEZ_prefix): New code attribute.
4566         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
4567         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
4568         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
4569         of numerical value.
4570         (noncommutative_operator): Check the availability of barrel
4571         shifter option.
4573 2018-04-09  Richard Biener  <rguenther@suse.de>
4575         PR tree-optimization/85284
4576         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
4577         Only use the niter constraining form of simple_iv when the exit
4578         is always executed.
4580 2018-04-09  Tom de Vries  <tom@codesourcery.com>
4582         PR target/84041
4583         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4584         (define_expand "*memory_barrier"): New define_expand.
4585         (define_insn "memory_barrier"): New insn.
4587 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4589         PR rtl-optimization/80463
4590         PR rtl-optimization/83972
4591         PR rtl-optimization/83480
4593         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
4594         correct producer for the insn.
4595         (tidy_control_flow): Fixup seqnos in case of debug insns.
4597 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4599         PR rtl-optimization/83913
4601         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
4602         different sched-times when merging exprs.
4604 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4606         PR rtl-optimization/83962
4608         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
4609         tidy_fallthru_edge and tidy_control_flow.
4611 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
4613         PR rtl-optimization/83530
4615         * sel-sched.c (force_next_insn): New global variable.
4616         (remove_insn_for_debug): When force_next_insn is true, also leave only
4617         next insn in the ready list.
4618         (sel_sched_region): When the region wasn't scheduled, make another pass
4619         over it with force_next_insn set to 1.
4621 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4623         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4624         into tm_file.
4625         * config/nds32/constants.md (unspec_volatile_element): Add enum values
4626         for interrupt control.
4627         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4628         functions for interrupt control.
4629         * config/nds32/nds32-intrinsic.md: Likewise.
4630         * config/nds32/nds32_intrinsic.h: Likewise.
4631         * config/nds32/nds32.h (nds32_builtins): Likewise.
4633 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4635         * config/nds32/nds32.c (nds32_init_machine_status,
4636         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4637         strict_aligned_p field.
4638         (nds32_expand_to_rtl_hook): New function.
4639         (TARGET_EXPAND_TO_RTL_HOOK): Define.
4640         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4642 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4643             Chung-Ju Wu  <jasonwucj@gmail.com>
4645         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4646         * config/nds32/nds32-n7.md: New file.
4647         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4648         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4649         pipeline.
4650         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4651         * config/nds32/nds32.md (pipeline_model): Add n7.
4652         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4653         * config/nds32/pipelines.md: Include n7 settings.
4655 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4656             Chung-Ju Wu  <jasonwucj@gmail.com>
4658         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4659         * config/nds32/nds32-e8.md: New file.
4660         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4661         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4662         pipeline.
4663         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4664         * config/nds32/nds32.md (pipeline_model): Add e8.
4665         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4666         * config/nds32/pipelines.md: Include e8 settings.
4668 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4669             Chung-Ju Wu  <jasonwucj@gmail.com>
4671         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4672         * config/nds32/nds32-n8.md: New file.
4673         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4674         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4675         pipeline.
4676         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4677         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4678         * config/nds32/nds32.md (pipeline_model): Add n8.
4679         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4680         * config/nds32/pipelines.md: Include n8 settings.
4682 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
4683             Chung-Ju Wu  <jasonwucj@gmail.com>
4685         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4686         * config/nds32/nds32-n9-2r1w.md: New file.
4687         * config/nds32/nds32-n9-3r2w.md: New file.
4688         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4689         nds32_register_ports): New or modify for cpu n9.
4690         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4691         pipeline.
4692         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4693         * config/nds32/nds32-utils.c: New file.
4694         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4695         TARGET_MUL_SLOW): Define.
4696         * config/nds32/nds32.md (pipeline_model): New attribute.
4697         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4698         New options that support cpu n9.
4699         * config/nds32/pipelines.md: Include n9 settings.
4700         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4702 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
4704         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4705         information if necessary.
4706         (output_cond_branch_compare_zero): Likewise.
4707         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4708         (nds32_target_alignment): Refine for alignment.
4709         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4710         (FUNCTION_BOUNDARY): Modify.
4711         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4712         align case.
4713         * config/nds32/nds32.opt (malways-align, malign-functions): New.
4715 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
4717         * config/nds32/constants.md (unspec_volatile_element): Add values for
4718         TLB operation and data prefetch.
4719         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4720         functions for TLB operation and data prefetch.
4721         * config/nds32/nds32-intrinsic.md: Likewise.
4722         * config/nds32/nds32_intrinsic.h: Likewise.
4723         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4724         (nds32_print_operand): Likewise.
4725         * config/nds32/nds32.h (nds32_builtins): Likewise.
4727 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
4728         Andrew Pinski <pinsika@gcc.gnu.org>
4730         PR middle-end/82976
4731         * match.pd: Use constant_boolean_node of correct type instead of
4732         boolean_true_node or boolean_false_node for simplifying
4733         pointer comparisons to zero.
4735 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4737         PR tree-optimization/80021
4738         * tree.c (verify_type_variant): Make error call in verify_variant_match
4739         translatable and remove final full stop.
4741 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4743         * config/nds32/constants.md (unspec_volatile_element): Add
4744         UNSPEC_VOLATILE_EH_RETURN.
4745         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4746         nds32_output_stack_pop): Support dwarf exception handling process.
4747         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4748         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4749         exception handling process.
4750         (nds32_compute_stack_frame): Likewise.
4751         (nds32_return_addr_rtx): Likewise.
4752         (nds32_initial_elimination_offset): Likewise.
4753         (nds32_expand_prologue): Likewise.
4754         (nds32_expand_epilogue): Likewise.
4755         (nds32_dynamic_chain_address): New function.
4756         * config/nds32/nds32.h (machine_function): Add fields for dwarf
4757         exception handling.
4758         (DYNAMIC_CHAIN_ADDRESS): Define.
4759         (EH_RETURN_DATA_REGNO): Define.
4760         (EH_RETURN_STACKADJ_RTX): Define.
4761         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4762         patterns for dwarf exception handling.
4764 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4766         * config/nds32/nds32.h: Clean up obsolete macros.
4768 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4770         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4771         Add enum values for particular instructions.
4772         * config/nds32/nds32-intrinsic.c: Implementation of expanding
4773         particular intrinsic functions.
4774         * config/nds32/nds32-intrinsic.md: Likewise.
4775         * config/nds32/nds32_intrinsic.h: Likewise.
4776         * config/nds32/nds32.h (nds32_builtins): Likewise.
4777         * config/nds32/nds32.md (type): Add pbsad and pbsada.
4778         (btst, ave): New patterns for particular instructions.
4780 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4782         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4783         Add enum values for atomic load/store and memory sync.
4784         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4785         and memory sync.
4786         * config/nds32/nds32-intrinsic.md: Likewise.
4787         * config/nds32/nds32_intrinsic.h: Likewise.
4788         * config/nds32/nds32.h (nds32_builtins): Likewise.
4790 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
4792         PR tree-optimization/85257
4793         * fold-const.c (native_encode_vector): If not all elts could fit
4794         and off is -1, return 0 rather than offset.
4795         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4796         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4797         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
4798         adjust buffer in native_interpret_expr call.
4800 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4802         * config/nds32/constants.md (unspec_volatile_element): Add cache
4803         control enum values.
4804         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4805         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4806         * config/nds32/nds32.c (nds32_cctl_names): New.
4807         (nds32_print_operand): Handle cache control register names.
4808         * config/nds32/nds32.h (nds32_builtins): New enum values.
4809         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4810         macros.
4811         * config/nds32/nds32.md (type): Add mmu.
4812         * config/nds32/pipelines.md (simple_insn): Add mmu.
4814 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4816         * config/nds32/nds32.md (type): Remove call.
4817         * config/nds32/pipelines.md (simple_insn): Likewise.
4819 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4821         * config/nds32/constants.md (unspec_volatile_element): Add
4822         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4823         UNSPEC_VOLATILE_FMFCFG.
4824         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4825         description for fmfcfg and fmfcsr.
4826         (bdesc_1arg): Add fmtcsr.
4827         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4828         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4829         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4830         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4831         unspec_fmfcfg): New patterns.
4832         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4833         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4834         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4835         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4836         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4837         __nds32__fmfcfg): Define.
4839 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
4841         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4842         intrinsic register names.
4843         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4844         intrinsic register enum values and macros.
4846 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
4848         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4849         for load/store addressing form.
4850         (nds32_print_operand_address): Likewise.
4852 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
4854         PR target/85196
4855         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4856         based on LABEL_REF.  Remove useless assertion.
4857         (pic_address_needs_scratch): Fix formatting.
4858         (sparc_legitimize_pic_address): Minor tweaks.
4859         (sparc_delegitimize_address): Adjust assertion accordingly.
4860         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4861         into symbolic_operand.
4862         (movsi_high_pic_label_ref): Likewise.
4863         (movsi_lo_sum_pic_label_ref): Likewise.
4864         (movdi_pic_label_ref): Likewise.
4865         (movdi_high_pic_label_ref): Likewise.
4866         (movdi_lo_sum_pic_label_ref): Likewise.
4868 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
4870         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4871         custom LIB_SPEC setup.
4873 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
4874             Kito Cheng  <kito.cheng@gmail.com>
4876         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4877         * config/riscv/freebsd.h: New.
4879 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4881         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4882         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4883         file.
4885 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4886             Kito Cheng  <kito.cheng@gmail.com>
4888         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4889         nds32_output_call, nds32_symbol_binds_local_p): New functions.
4890         * config/nds32/nds32-protos.h (nds32_output_call,
4891         nds32_output_return): Declare.
4892         * config/nds32/nds32.md: Refine all the call and return patterns.
4894 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4896         PR debug/85252
4897         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4898         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4900         PR rtl-optimization/84872
4901         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4902         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4903         EDGE_CROSSING edge.
4905 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
4907         * expr.c (copy_blkmode_to_reg): Revert 254862.
4908         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4910 2018-04-06  Richard Biener  <rguenther@suse.de>
4912         PR middle-end/85244
4913         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4914         after seeing a component reference with an adjacent field.  Treat
4915         refs to arrays at struct end of external decls similar to
4916         refs to unconstrained commons.
4918 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
4920         PR sanitizer/85213
4921         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4922         look through SAVE_EXPRs with non-side-effects argument.  Adjust
4923         recursive calls.
4924         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4925         save_p here.
4927 2018-04-06  Richard Biener  <rguenther@suse.de>
4929         PR middle-end/85180
4930         * alias.c (find_base_term): New wrapper around find_base_term
4931         unwinding CSELIB_VAL_PTR changes.
4932         (find_base_term): Do not restore CSELIB_VAL_PTR during the
4933         recursion.
4935 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4937         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4938         instructions.
4939         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4940         constant definitions.
4941         ("nop"): lr 0,0 -> nopr r0
4942         ("nop_lr0", "nop_lr1"): New insn definitions.
4944 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
4946         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4947         NDS32_V3PUSH_AVAILABLE_P macro.
4949 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
4950             Chung-Ju Wu  <jasonwucj@gmail.com>
4952         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4953         (nds32*-*-*): Add float and fpu_config into supported_defaults.
4954         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4955         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4956         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4957         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4958         * config/nds32/constraints.md: New constraints and checking for hard
4959         float configuration.
4960         * config/nds32/iterators.md: New mode iterator and attribute for hard
4961         float configuration.
4962         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4963         patterns.
4964         * config/nds32/nds32-fpu.md: New file.
4965         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4966         deal with hard float code generation.
4967         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4968         ARCH_V3S.
4969         (abi_type, float_reg_number): New enum type.
4970         * config/nds32/nds32-predicates.c: New predicates for hard float.
4971         * config/nds32/nds32-protos.h: Declare functions for hard float.
4972         * config/nds32/nds32.c: Implementation for hard float configuration.
4973         * config/nds32/nds32.h: Definitions for hard float configuration.
4974         * config/nds32/nds32.md: Include hard float machine description and
4975         modify patterns for hard float configuration.
4976         * config/nds32/nds32.opt: New options for hard float configuration.
4977         * config/nds32/predicates.md: New predicates for hard float
4978         configuration.
4980 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
4982         * common/config/nds32/nds32-common.c
4983         (nds32_option_optimization_table): Enable -mreleax-hint by default.
4985 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
4987         PR middle-end/85195
4988         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4989         CONSTRUCTOR_ELT (ctor, ...)->value.
4991 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
4993         PR target/85193
4994         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4996 2018-04-05  Tom de Vries  <tom@codesourcery.com>
4998         PR target/85204
4999         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
5000         cond jump.
5002 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
5003             Kito Cheng  <kito.cheng@gmail.com>
5005         * config/nds32/constraints.md (U33): Fine-tune checking condition.
5006         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
5007         * config/nds32/nds32.h (nds32_16bit_address_type): Add
5008         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
5010 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
5011             Kito Cheng  <kito.cheng@gmail.com>
5013         * config/nds32/constraints.md (Ufe): New memory constraint.
5014         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
5015         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
5016         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
5017         operands.
5018         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
5019         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
5021 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5023         * config/nds32/nds32.md: Use optimize_size in the condition for
5024         alu-shift instructions.
5026 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5028         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
5030 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5032         * config/nds32/nds32.md (negsi2): Refine pattern.
5034 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
5035             Chung-Ju Wu  <jasonwucj@gmail.com>
5037         * config/nds32/iterators.md (shift_rotate): New code iterator.
5038         (shift): New code attribute.
5039         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
5040         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
5041         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
5042         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
5043         bit-wise operations.
5044         (andsi3, *andsi3): Ditto.
5045         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
5046         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
5047         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
5048         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
5049         nds32_ior_operand, nds32_xor_operand): New predicates.
5051 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5053         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
5054         (addsi3, subsi3): ... this.
5056 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5058         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
5060 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5062         * config/nds32/nds32.md: Adjust indention.
5064 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
5066         * config/nds32/nds32.md (feature): New attribute.
5068 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
5070         * config/nds32/nds32.md (subtype): New attribute.
5072 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5074         PR target/85203
5075         * config/arm/arm-builtins.c (arm_expand_builtin): Change
5076         expansion to perform a bitwise AND of the argument followed by a
5077         boolean negation of the result.
5079 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
5081         PR rtl-optimization/84878
5082         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
5083         the basic block.  Assert the use reference is not artificial and that
5084         it has an associated insn.
5086 2018-04-04  Michael Matz  <matz@suse.de>
5088         * builtins.c (compute_objsize): Pass correct operand
5089         to array_at_struct_end_p.
5091 2018-04-04  Richard Biener  <rguenther@suse.de>
5093         PR lto/85176
5094         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
5095         from contexts for DINFO_LEVEL_TERSE and below.
5097 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
5099         * config/nds32/nds32-doubleword.md (move_<mode>): Require
5100         resiter_operand condition.
5101         * config/nds32/nds32.md (*move<mode>): Ditto.
5103 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
5104             Monk Chiang  <sh.chiang04@gmail.com>
5106         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
5108 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5110         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
5112 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5113             Kito Cheng  <kito.cheng@gmail.com>
5115         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
5116         nds32_cond_code_str, output_cond_branch,
5117         output_cond_branch_compare_zero, nds32_expand_cbranch,
5118         nds32_expand_cstore, nds32_expand_movcc,
5119         nds32_output_cbranchsi4_equality_zero,
5120         nds32_output_cbranchsi4_equality_reg,
5121         nds32_output_cbranchsi4_equality_reg_or_const_int,
5122         nds32_output_cbranchsi4_greater_less_zero: New functions.
5123         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
5124         nds32_expand_cstore, nds32_expand_movcc,
5125         nds32_output_cbranchsi4_equality_zero,
5126         nds32_output_cbranchsi4_equality_reg,
5127         nds32_output_cbranchsi4_equality_reg_or_const_int,
5128         nds32_output_cbranchsi4_greater_less_zero): Declare.
5129         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
5130         nds32_rimm11s_operand): New predicates.
5131         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
5132         * config/nds32/nds32.md: Rewrite all the branch and conditional move
5133         patterns.
5135 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
5137         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
5138         * config/nds32/nds32.md: Ditto.
5139         * config/nds32/pipelines.md: Ditto.
5141 2018-04-04  Richard Biener  <rguenther@suse.de>
5143         PR tree-optimization/85168
5144         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
5145         propagating abnormals.
5147 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5149         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
5151 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
5152             Kito Cheng  <kito.cheng@gmail.com>
5154         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
5155         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
5156         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
5157         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
5158         * config/nds32/nds32.md (sibcall_internal): New.
5159         (sibcall_register): Remove.
5160         (sibcall_immediate): Remove.
5161         (sibcall_value_internal): New.
5162         (sibcall_value_register): Remove.
5163         (sibcall_value_immediate): Remove.
5164         * config/nds32/predicates.md (nds32_general_register_operand): New.
5165         (nds32_call_address_operand): New.
5167 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
5169         PR rtl-optimization/85167
5170         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
5171         bb_defs if *split_p, instead preinitialize it to NULL.
5173         PR tree-optimization/85156
5174         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
5175         evaluating the argument multiple times.
5177 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
5179         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
5180         than vector.
5181         (_mm_cvtpd_ps): Likewise.
5182         (_mm_cvttpd_epi32): Likewise.
5183         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
5184         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
5185         vector, pixel, and bool following altivec.h include.
5187 2018-04-03  Martin Sebor  <msebor@redhat.com>
5189         * doc/extend.texi (Common Function Attributes): Clarify.
5190         (const attribute): Likewise.
5191         (pure attribute): Likewise.
5193 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
5195         PR target/85169
5196         * config/i386/i386.c (ix86_expand_vector_set): Use
5197         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
5199 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
5201         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
5202         instructions when changing rounding bits to preserve precision bits
5203         in the x87 control word.
5205 2018-04-03  Martin Liska  <mliska@suse.cz>
5207         PR tree-optimization/82491
5208         * rtl.h (strip_offset_and_add): Replace += suboffset with
5209         poly_uint64 () + suboffset.
5211 2018-03-29  Martin Liska  <mliska@suse.cz>
5212             Martin Jambor  <mjambor@suse.cz>
5214         PR ipa/84947
5215         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
5216         param_type is not an integral or pointer type.
5218 2018-04-03  Richard Biener  <rguenther@suse.de>
5220         * sese.h (recompute_all_dominators): Remove.
5222 2018-04-02  Martin Sebor  <msebor@redhat.com>
5224         * doc/invoke.texi (-Wrestrict): Fix typos.
5226 2018-04-02  Jim Wilson  <jimw@sifive.com>
5228         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
5229         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
5230         (<optab>di3, <optab>si3_extend): Likewise.
5231         (<optab>si3_mask, <optab>si3_mask_1): New.
5232         (<optab>di3_mask, <optab>di3_mask_1): New.
5233         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
5234         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
5235         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
5237 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
5239         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
5240         example.
5242 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
5244         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
5245         (nds32_canonicalize_comparison): New function.
5247 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5248             Kito Cheng  <kito.cheng@gmail.com>
5249             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
5251         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
5252         * config/nds32/constants.md (unspec_volatile_element): Add
5253         UNSPEC_VOLATILE_RELAX_GROUP.
5254         * config/nds32/nds32-relax-opt.c: New file.
5255         * config/nds32/nds32-predicates.c
5256         (nds32_symbol_load_store_p): New function.
5257         * config/nds32/nds32-protos.h
5258         (nds32_symbol_load_store_p): Declare function.
5259         (make_pass_nds32_relax_opt): Declare new rtl pass function.
5260         * config/nds32/nds32.c
5261         (nds32_register_pass): New function to register pass.
5262         (nds32_register_passes): New function to register passes.
5263         * config/nds32/nds32.md (relax_group): New pattern.
5264         * config/nds32/nds32.opt (mrelax-hint): New option.
5265         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
5267 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
5269         * config/nds32/t-nds32: Modify files dependency.
5271 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5273         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
5274         (PROFILE_HOOK): Define its implementation.
5276 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
5278         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
5279         type and 32-bit size.
5281 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
5283         PR middle-end/85090
5284         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
5285         (V_128_256): New mode iterator.
5286         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
5287         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
5288         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
5289         of V.
5290         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
5291         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
5293 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
5295         PR target/83315
5296         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
5297         NaN inputs correctly.
5299 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
5301         PR target/80546
5302         * config/rs6000/vsx.md (??r): New mode attribute.
5303         (*vsx_mov<mode>_64bit): Use it.
5304         (*vsx_mov<mode>_32bit): Likewise.
5306 2018-03-30  Martin Sebor  <msebor@redhat.com>
5308         PR tree-optimization/84818
5309         * builtins.c (check_access): Use warning_n.
5311 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
5313         PR target/83822
5314         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
5315         condition.
5316         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
5317         condition.
5319 2018-03-30  Julia Koval  <julia.koval@intel.com>
5321         PR target/84413
5322         * x86-tune.def (movx, partial_reg_dependency): Enable for
5323         m_SKYLAKE_AVX512.
5325 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
5327         PR inline-asm/84985
5328         * lra-constraints.c (process_alt_operands): Move setting
5329         this_alternative_matches below.
5331 2018-03-29  Martin Liska  <mliska@suse.cz>
5333         PR lto/84995.
5334         * doc/invoke.texi: Document how LTO works with debug info.
5335         Describe auto-load support of binutils.  Mention 'x86-64'
5336         as valid option value of -march option.
5338 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
5340         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
5342         PR c/85094
5343         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
5344         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
5345         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
5346         checking.
5348 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5350         PR target/84912
5351         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
5352         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
5353         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
5354         for RS6000_BTM_POWERPC64.
5355         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
5356         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
5357         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
5358         definition.
5359         (DIVDE): Use it.
5360         (DIVDEU): Likewise.
5362 2018-03-28 Carl Love  <cel@us.ibm.com>
5364         Revert
5365         2017-09-27  Carl Love  <cel@us.ibm.com>
5367         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
5368         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
5369         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
5370         fctiw instruction.
5372 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5374         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
5375         instead of __vector bool.
5376         (_mm_max_pu8): Likewise.
5377         (_mm_min_pi16): Likewise.
5379 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
5381         PR target/84912
5382         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
5383         (DIVWEUO): Likewise.
5384         (DIVDEO): Likewise.
5385         (DIVDEUO): Likewise.
5386         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
5387         DIVWEUO and DIVDEUO.
5388         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
5389         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
5390         (div_extend): Likewise.
5391         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
5392         builtin function.
5393         (__builtin_divweuo): Likewise.
5394         (__builtin_divdeo): Likewise.
5395         (__builtin_divdeuo): Likewise.
5397 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5399         PR target/85095
5400         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
5401         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
5403         PR tree-optimization/82004
5404         * gimple-match-head.c (optimize_pow_to_exp): New function.
5405         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
5406         Don't fold to exp if optimize_pow_to_exp is false.
5408 2018-03-28  Martin Liska  <mliska@suse.cz>
5410         PR other/84819
5411         * calls.c (initialize_argument_information): Fix trailing space.
5412         * common.opt: Fix typo and provide better explanation for
5413         -fsanitize-coverage option.
5414         * config/i386/i386.opt: Fix typo.
5416 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
5417             Martin Liska  <mliska@suse.cz>
5419         PR sanitizer/85081
5420         * gimplify.c (asan_poison_variable): Don't do the check for
5421         gimplify_omp_ctxp here.
5422         (gimplify_decl_expr): Do it here.
5423         (gimplify_target_expr): Likewise.
5425 2018-03-28  Martin Liska  <mliska@suse.cz>
5427         PR target/84988
5428         * config/i386/i386.c (ix86_function_arg_advance): Do not call
5429         chkp_type_bounds_count if MPX is not enabled.
5431 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5433         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
5435 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
5437         PR target/84914
5438         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
5439         function to create the function decl for complex long double
5440         multiply and divide for -mabi=ieeelongdouble.
5441         (init_float128_ieee): Call it.
5443 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
5445         PR target/85044
5446         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
5447         -fcf-protection=branch -mibt.
5448         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
5450 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5452         PR target/81863
5453         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
5455 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
5457         PR target/85056
5458         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
5459         extern array declarations.
5461 2018-03-27  Richard Biener  <rguenther@suse.de>
5463         PR middle-end/84067
5464         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
5465         explicit single_use checks.
5467 2018-03-27  Richard Biener  <rguenther@suse.de>
5469         PR tree-optimization/85082
5470         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
5471         Valueize the VUSE.
5473 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5475         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
5476         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
5477         Turn on fasynchronous-unwind-tables and funwind-tables.
5479 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
5481         PR target/85073
5482         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
5483         (*bmi_blsr_<mode>_ccz): Ditto.
5485 2018-03-26  Tom de Vries  <tom@codesourcery.com>
5487         PR tree-optimization/85063
5488         * omp-general.c (offloading_function_p): New function.  Factor out
5489         of ...
5490         * omp-offload.c (pass_omp_target_link::gate): ... here.
5491         * omp-general.h (offloading_function_p): Declare.
5492         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
5493         with attribute omp declare target for offloading functions.
5495 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
5497         PR tree-optimization/84005
5498         * tree-data-ref.h (get_base_for_alignment): Declare.
5499         * tree-data-ref.c (get_base_for_alignment_1): New function.
5500         (get_base_for_alignment): Likewise.
5501         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
5502         get_base_for_alignment to find a suitable base object, instead
5503         of always using drb->base_address.
5505 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5507         PR inline-asm/85022
5508         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5509         known size by default.
5511 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
5513         PR inline-asm/85030
5514         * lra-constraints.c (process_alt_operands): Don't match BLKmode
5515         and non BLKmode operands.
5517 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5519         PR target/85026
5520         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5521         Clean up attributes.
5523 2018-03-23  Richard Biener  <rguenther@suse.de>
5525         PR debug/85020
5526         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5527         we are going to emit early debug for LTO.
5529 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
5531         PR inline-asm/85034
5532         * function.c (match_asm_constraints_1): Don't optimize if input
5533         doesn't satisfy general_operand predicate for output's mode.
5535         PR inline-asm/85022
5536         * alias.c (write_dependence_p): Don't require for x_canonicalized
5537         non-VOIDmode if x has VOIDmode.
5539         PR sanitizer/85029
5540         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5541         just don't try to optimize it rather than assert it never happens.
5543 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5545         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5546         macro expansions for definition of ST_INTERNAL_<mode> and
5547         LD_INTERNAL_<mode> builtins.
5548         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5549         Remove prototype.
5550         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5551         function.
5552         (altivec_expand_st_builtin): Likewise.
5553         (altivec_expand_builtin): Remove calls to deleted functions.
5554         (rs6000_address_for_altivec): Delete this function.
5555         * config/rs6000/vector.md: Remove expands for
5556         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
5558 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
5560         PR target/84826
5561         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
5562         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
5563         re-computing once computed.
5564         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
5565         (arm_init_machine_status): Initialize
5566         machine->static_chain_stack_bytes.
5568 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5570         PR target/84760
5571         * doc/extend.texi: Add four new prototypes for vec_ld.
5572         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
5573         definitions for more logical presentation.
5574         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
5575         entries for V1TI variants of __builtin_altivec_ld builtin.
5576         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
5577         handling of V1TI variant of LVX icode pattern.
5578         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
5579         (rs6000_gimple_fold_builtin): Likewise.
5580         (altivec_init_builtins): Add code to define
5581         __builtin_altivec_lvx_v1ti function.
5583 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5585         PR inline-asm/84941
5586         * function.c (match_asm_constraints_1): Don't do the optimization
5587         if input isn't a REG, SUBREG, MEM or constant.
5589 2018-03-22  Tom de Vries  <tom@codesourcery.com>
5591         PR tree-optimization/84956
5592         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
5593         bb_has_abnormal_pred.
5595 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
5597         PR sanitizer/85018
5598         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
5599         DECL_INITIAL (decl) to decl at the end.
5600         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
5601         adjust the comment.
5603 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
5605         * doc/extend.texi (__builtin_tgmath): Document when complex
5606         integer types are treated as _Complex _Float64.
5608 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5610         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
5612 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5614         PR tree-optimization/84960
5615         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
5616         if it is ENTRY block, move them into single succ of ENTRY in that case.
5618 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
5620         PR tree-optimization/84811
5621         * poly-int.h (poly_span_traits): Remove the T3 parameter and
5622         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5623         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5624         (known_subrange_p): Update accordingly.  Cast each value involved
5625         in the size comparison, rather than casting the result of the
5626         subtraction.
5628 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5630         PR tree-optimization/84982
5631         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5632         by flipping the least significant bit rather than all bits from
5633         bitpos to bitpos + bitsize - 1.
5635 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5637         * doc/extend.texi (Deprecated Features): Remove mention of
5638         long-deleted deprecations.
5640 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5642         PR jit/84288
5643         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5644         * configure: Regenerate.
5646 2018-03-21  Tom de Vries  <tom@codesourcery.com>
5648         PR tree-optimization/83126
5649         * tree-parloops.c (num_phis): New function.
5650         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5652 2018-03-21  Nathan Sidwell  <nathan@acm.org>
5654         * doc/extend.texi (Deprecated Features): Update deprecated flags,
5655         mention anon-struct/union members and trailing attributes.
5657 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
5659         PR tree-optimization/84969
5660         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5661         builtin memset partitions if they set different rhs values.
5663 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
5665         PR rtl-optimization/84989
5666         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5667         VEC_DUPLICATE with scalar result mode.
5669 2018-03-21  Martin Liska  <mliska@suse.cz>
5671         PR ipa/84963
5672         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5673         not intended return statement.
5675 2018-03-21  Martin Liska  <mliska@suse.cz>
5677         PR target/84988
5678         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5679         (chkp_find_bound_slots_1): Limit number of iterations.
5681 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
5683         PR target/84838
5684         * Minor grammar fixes for x86 options.
5686 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5688         PR debug/84875
5689         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5690         holding REG_CFA_RESTORE notes, instead turn them into a USE.
5692 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
5694         PR target/83789
5695         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5696         (altivec_lvx_<mode>_1op): Likewise.
5697         (altivec_stvx_<mode>_2op): Likewise.
5698         (altivec_stvx_<mode>_1op): Likewise.
5699         (altivec_lvx_<VM2:mode>): New define_expand.
5700         (altivec_stvx_<VM2:mode>): Likewise.
5701         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5702         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5703         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5704         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5705         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5706         (rs6000_gen_lvx): Likewise.
5707         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5708         (altivec_expand_stv_builtin): Likewise.
5709         (altivec_expand_builtin): Likewise.
5710         * config/rs6000/vector.md: Likewise.
5712 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5714         PR target/82518
5715         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5716         BYTES_BIG_ENDIAN.
5718 2018-03-20  Richard Biener  <rguenther@suse.de>
5720         PR target/84986
5721         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5722         sign-conversions as zero, fall back to standard scalar_stmt
5723         cost for the rest.
5725 2018-03-20  Martin Liska  <mliska@suse.cz>
5727         PR ipa/84825
5728         * predict.c (rebuild_frequencies): Handle case when we have
5729         PROFILE_ABSENT, but flag_guess_branch_prob is false.
5731 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5733         PR target/84990
5734         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5735         flag_section_anchors.
5736         * varasm.c (use_blocks_for_decl_p): Remove hack for
5737         dw2_force_const_mem.
5739         PR target/84845
5740         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5741         to ...
5742         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
5743         be created, use lowpart_subreg of operands[0] rather than operands[0]
5744         itself.
5745         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5746         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5747         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5748         and n constraint instead of aarch64_shift_imm_di and Usd.
5749         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5750         (*aarch64_<optab>_reg_minus<mode>3): ... this.
5752 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
5754         PR target/82989
5755         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5756         to favor GPR over NEON registers.
5757         (<shift>di3_neon): Likewise.
5759 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5761         PR target/84952
5762         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5763         (nvptx_process_pars): Emit bar.sync asap and alap.
5765 2018-03-20  Tom de Vries  <tom@codesourcery.com>
5767         PR target/84954
5768         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5769         seen_label if seen_label is already set.
5771 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
5773         PR target/84945
5774         * config/i386/i386.c (fold_builtin_cpu): For features above 31
5775         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5776         Use 1U instead of 1.  Formatting fixes.
5778         PR c/84953
5779         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5780         instead of TREE_TYPE (s1) for the return value.
5782 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
5784         PR tree-optimization/84946
5785         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5786         bitsize + bitsize in poly_uint64 rather than poly_int64.
5788         PR sanitizer/78651
5789         * dwarf2asm.c: Include fold-const.c.
5790         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5791         of decl rather than decl itself.
5793         PR rtl-optimization/84643
5794         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5796 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
5798         PR sanitizer/78651
5799         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5800         calling assemble_variable.
5802 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
5804         PR target/81647
5805         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5806         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5808 2018-03-19  Jim Wilson  <jimw@sifive.com>
5810         PR bootstrap/84856
5811         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5812         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5813         (riscv_first_stack_step): Likewise.
5814         (riscv_option_override): Use STACK_BOUNDARY instead of
5815         MIN_STACK_BOUNDARY.
5816         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5817         MIN_STACK_BOUNDARY.
5818         (BIGGEST_ALIGNMENT): Set to 128.
5819         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5820         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5821         STACK_BOUNDARY.
5823 2018-03-19  Richard Biener  <rguenther@suse.de>
5825         PR tree-optimization/84933
5826         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5827         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5829 2018-03-19  Richard Biener  <rguenther@suse.de>
5831         PR tree-optimization/84859
5832         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5833         (cond_if_else_store_replacement): Perform sinking operation on
5834         single-store BBs regardless of MAX_STORES_TO_SINK setting.
5835         Generalize what a BB with a single eligible store is.
5837 2018-03-19  Richard Biener  <rguenther@suse.de>
5839         PR tree-optimization/84929
5840         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5841         chrec_is_positive against non-chrec arg.
5843 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
5845         PR target/84711
5846         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5848 2018-03-18  Martin Liska  <mliska@suse.cz>
5850         PR rtl-optimization/84635
5851         * regrename.c (build_def_use): Use matches_mode only when
5852         matches >= 0.
5854 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
5856         PR tree-optimization/84913
5857         * tree-vect-loop.c (vectorizable_reduction): Don't try to
5858         vectorize chains of COND_EXPRs.
5860 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5862         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5864 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5866         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5868 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
5870         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5872 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5873             Kito Cheng  <kito.cheng@gmail.com>
5875         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5876         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5877         (nds32_adjust_reg_alloc_order): New function.
5878         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5880 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
5882         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5883         nds32_print_operand, nds32_print_operand_address): Use
5884         HOST_WIDE_INT_PRINT_DEC instead.
5886 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
5888         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5890 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
5892         PR target/84902
5893         * config/i386/i386.c (initial_ix86_tune_features,
5894         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5895         unsigned long long.
5896         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5897         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5898         rather than 1u << ix86_tune.  Formatting fix.
5899         (ix86_option_override_internal): Change ix86_arch_mask from
5900         unsigned int to unsigned HOST_WIDE_INT, initialize to
5901         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5902         (ix86_function_specific_restore): Likewise.
5904 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5906         PR target/84899
5907         * postreload.c (reload_combine_recognize_pattern): Perform
5908         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5909         truncate_int_for_mode the result for the destination's mode.
5911         PR c/84909
5912         * hsa-gen.c (mem_type_for_type): Fix comment typo.
5913         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5914         Likewise.
5915         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5916         Likewise.
5918 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
5920         PR target/84876
5921         * lra-assigns.c (lra_split_hard_reg_for): Don't use
5922         regno_allocno_class_array and sorted_pseudos.
5923         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5924         insns where regno is used.
5926 2018-03-16  Martin Liska  <mliska@suse.cz>
5928         PR ipa/84833
5929         * multiple_target.c (create_dispatcher_calls): Redirect
5930         reference in the symbol table.
5932 2018-03-16  Martin Liska  <mliska@suse.cz>
5934         PR ipa/84722
5935         * multiple_target.c (create_dispatcher_calls): Redirect also
5936         an alias.
5938 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5940         PR c++/79937
5941         PR c++/82410
5942         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5943         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5944         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5946 2018-03-16  Julia Koval  <julia.koval@intel.com>
5948         * doc/invoke.texi (Skylake Server): Add CLWB.
5949         Cannonlake): Remove CLWB.
5951 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
5953         PR tree-optimization/84841
5954         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5955         1 << 3.
5956         (FLOAT_ONE_CONST_TYPE): Define.
5957         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5958         (sort_by_operand_rank): Put entries with higher constant_type last
5959         rather than first to match comments.
5961 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
5963         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
5964         split predicate.
5966 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
5968         PR c++/79085
5969         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5970         check and use address of target always.
5972 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
5974         PR target/84574
5975         * config/i386/i386.c (indirect_thunk_needed): Update comments.
5976         (indirect_thunk_bnd_needed): Likewise.
5977         (indirect_thunks_used): Likewise.
5978         (indirect_thunks_bnd_used): Likewise.
5979         (indirect_return_needed): New.
5980         (indirect_return_bnd_needed): Likewise.
5981         (output_indirect_thunk_function): Add a bool argument for
5982         function return.
5983         (output_indirect_thunk_function): Don't generate alias for
5984         function return thunk.
5985         (ix86_code_end): Call output_indirect_thunk_function to generate
5986         function return thunks.
5987         (ix86_output_function_return): Set indirect_return_bnd_needed
5988         and indirect_return_needed instead of indirect_thunk_bnd_needed
5989         and indirect_thunk_needed.
5991 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
5993         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5994         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5995         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5997 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
5998             Paul Hua <paul.hua.gm@gmail.com>
6000         PR c/84852
6001         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
6003 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
6005         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
6006         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
6007         resp. SFmode cases.
6009 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
6011         PR target/84711
6012         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6013         instead of GET_MODE_SIZE when comparing Units.
6015 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
6017         PR target/68256
6018         * varasm.c (hash_section): Return an unchangeble hash value
6019         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
6020         Return !aarch64_can_use_per_function_literal_pools_p ().
6022 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
6024         PR target/84860
6025         * optabs.c (emit_conditional_move): Pass address of cmode's copy
6026         rather than address of cmode as last argument to prepare_cmp_insn.
6028 2018-03-15  Julia Koval  <julia.koval@intel.com>
6030         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
6031         F_AVX512VNNI, F_AVX512BITALG): New.
6033 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
6035         PR target/83451
6036         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
6037         insn for floating-point loads and stores.
6039 2018-03-14  Carl Love  <cel@us.ibm.com>
6041         * config/rs6000/rs6000-c.c: Add macro definitions for
6042         ALTIVEC_BUILTIN_VEC_PERMXOR.
6043         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
6044         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
6045         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
6046         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
6047         UNSPEC_VPERMXOR.
6048         * config/doc/extend.texi: Add prototypes for vec_permxor.
6050 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
6052         PR c/84852
6053         * diagnostic-show-locus.c (class layout_point): Convert m_line
6054         from int to linenum_type.
6055         (line_span::comparator): Use linenum "compare" function when
6056         comparing line numbers.
6057         (test_line_span): New function.
6058         (layout_range::contains_point): Convert param "row" from int to
6059         linenum_type.
6060         (layout_range::intersects_line_p): Likewise.
6061         (layout::will_show_line_p): Likewise.
6062         (layout::print_source_line): Likewise.
6063         (layout::should_print_annotation_line_p): Likewise.
6064         (layout::print_annotation_line): Likewise.
6065         (layout::print_leading_fixits): Likewise.
6066         (layout::annotation_line_showed_range_p): Likewise.
6067         (struct line_corrections): Likewise for field m_row.
6068         (line_corrections::line_corrections): Likewise for param "row".
6069         (layout::print_trailing_fixits): Likewise.
6070         (layout::get_state_at_point): Likewise.
6071         (layout::get_x_bound_for_row): Likewise.
6072         (layout::print_line): Likewise.
6073         (diagnostic_show_locus): Likewise for locals "last_line" and
6074         "row".
6075         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
6076         * input.c (selftest::test_linenum_comparisons): New function.
6077         (selftest::input_c_tests): Call it.
6078         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
6079         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
6080         * selftest.h (ASSERT_GT): New macro.
6081         (ASSERT_GT_AT): New macro.
6082         (ASSERT_LT): New macro.
6083         (ASSERT_LT_AT): New macro.
6085 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
6087         PR rtl-optimization/84780
6088         * combine.c (distribute_links): Don't make a link based on pc_rtx.
6090 2018-03-14  Martin Liska  <mliska@suse.cz>
6092         * tree.c (record_node_allocation_statistics): Use
6093         get_stats_node_kind.
6094         (get_stats_node_kind): New function extracted from
6095         record_node_allocation_statistics.
6096         (free_node): Use get_stats_node_kind.
6098 2018-03-14  Richard Biener  <rguenther@suse.de>
6100         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
6101         that the value-set of ANTIC_IN doesn't grow.
6103         Revert
6104         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6105         member.
6106         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6107         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6109 2018-03-14  Julia Koval  <julia.koval@intel.com>
6111         * config.gcc (icelake-client, icelake-server): New.
6112         (icelake): Remove.
6113         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
6114         (initial_ix86_arch_features): Ditto.
6115         (PTA_SKYLAKE): Add SGX.
6116         (PTA_ICELAKE): Remove.
6117         (PTA_ICELAKE_CLIENT): New.
6118         (PTA_ICELAKE_SERVER): New.
6119         (ix86_option_override_internal): Split up icelake on icelake client and
6120         icelake server.
6121         (get_builtin_code_for_version): Ditto.
6122         (fold_builtin_cpu): Ditto.
6123         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
6124         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
6125         * config/i386/i386.h (processor_type): Ditto.
6126         * doc/invoke.texi: Ditto.
6128 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
6130         PR sanitizer/83392
6131         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
6132         INTEGER_CST offset, add it together with bitpos / 8 and
6133         sign extend based on POINTER_SIZE.
6135         PR target/84844
6136         Revert
6137         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
6139         PR target/78090
6140         * config/i386/constraints.md (Yc): New register constraint.
6141         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
6142         Use Yc constraint for alternative 2 of operand 0.  Remove
6143         preferred_for_speed attribute.
6145 2018-03-14  Richard Biener  <rguenther@suse.de>
6147         PR tree-optimization/84830
6148         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
6149         with the old one to avoid oscillations.
6151 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
6153         PR target/83712
6154         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
6155         pseudos.
6156         (assign_by_spills): Return a flag of reload assignment failure.
6157         Do not process the reload assignment failures.  Do not spill other
6158         reload pseudos if they has the same reg class.  Update n if
6159         necessary.
6160         (lra_assign): Add a return arg.  Set up from the result of
6161         assign_by_spills call.
6162         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6163         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6164         usage_insns if it is not NULL.
6165         (spill_hard_reg_in_range): New function.
6166         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6167         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6168         function prototypes.
6169         (lra_assign): Change prototype.
6170         * lra.c (lra): Add code to deal with fails by splitting hard reg
6171         live ranges.
6173 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
6175         * config/riscv/riscv.opt (mrelax): New option.
6176         * config/riscv/riscv.c (riscv_file_start): Emit ".option
6177         "norelax" when riscv_mrelax is disabled.
6178         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
6180 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
6182         PR target/84743
6183         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
6184         reassociation for int modes.
6186 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
6188         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
6189         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
6190         for big-endian.
6191         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
6192         * config/aarch64/aarch64-sve.md
6193         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
6194         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
6195         (*extend<mode><Vwide>2): Rename to...
6196         (aarch64_sve_extend<mode><Vwide>2): ...this.
6197         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
6198         renaming the old pattern to...
6199         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
6200         unsigned packs.
6201         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
6202         define_expand, renaming the old pattern to...
6203         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
6204         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
6205         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
6206         account when deciding which SVE instruction the optab should use.
6207         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
6209 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
6211         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
6212         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
6213         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
6214         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
6215         (tlsdesc_small_<mode>): Turn a define_expand and use
6216         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
6217         (tlsdesc_small_advsimd_<mode>): ...this.
6218         (tlsdesc_small_sve_<mode>): New pattern.
6220 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
6222         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
6223         (UNSPEC_UMUL_HIGHPART): New constants.
6224         (MUL_HIGHPART): New int iteraor.
6225         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
6226         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
6227         define_expand.
6228         (*<su>mul<mode>3_highpart): New define_insn.
6230 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
6232         PR lto/84805
6233         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6234         incomplete types.
6236 2018-03-13  Martin Liska  <mliska@suse.cz>
6238         PR ipa/84658.
6239         * (sem_item_optimizer::sem_item_optimizer): Initialize new
6240         vector.
6241         (sem_item_optimizer::~sem_item_optimizer): Release it.
6242         (sem_item_optimizer::merge_classes): Register variable aliases.
6243         (sem_item_optimizer::fixup_pt_set): New function.
6244         (sem_item_optimizer::fixup_points_to_sets): Likewise.
6245         * ipa-icf.h: Declare new variables and functions.
6247 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
6249         PR middle-end/84834
6250         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
6251         integer_pow2p@2 and test integer_pow2p in condition.
6252         (A < 0 ? C : 0): Similarly for @1.
6254         PR middle-end/84831
6255         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
6256         characters starting at p contain '\0' character, don't look beyond
6257         that.
6259         PR target/84827
6260         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
6261         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
6263         PR target/84828
6264         * reg-stack.c (change_stack): Change update_end var from int to
6265         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
6266         also call set_block_for_insn on the newly added insns and rescan.
6268         PR target/84786
6269         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
6270         on the last operand.
6272         PR c++/84704
6273         * tree.c (stabilize_reference_1): Return save_expr (e) for
6274         STATEMENT_LIST even if it doesn't have side-effects.
6276 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
6278         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
6280 2018-03-12  Renlin Li  <renlin.li@arm.com>
6282         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
6283         aarch64_output_scalar_simd_mov_immediate.
6285 2018-03-12  Martin Sebor  <msebor@redhat.com>
6287         PR tree-optimization/83456
6288         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
6289         for perfectly overlapping calls to memcpy.
6290         (gimple_fold_builtin_memory_chk): Same.
6291         (gimple_fold_builtin_strcpy): Handle no-warning.
6292         (gimple_fold_builtin_stxcpy_chk): Same.
6293         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
6295 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6297         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
6298         parameter.  Use it for SFmode.
6299         (rs6000_function_arg_advance_1): Adjust.
6300         (rs6000_function_arg): Adjust.
6301         (rs6000_gimplify_va_arg): Pass false for that new parameter.
6303 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
6305         PR rtl-optimization/84169
6306         PR rtl-optimization/84780
6307         * combine.c (can_combine_p): Check for a 2-insn combination whether
6308         the destination register is used between the two insns, too.
6310 2018-03-12  Richard Biener  <rguenther@suse.de>
6312         PR tree-optimization/84803
6313         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
6314         for refs DR analysis didn't process.
6316 2018-03-12  Richard Biener  <rguenther@suse.de>
6318         PR tree-optimization/84777
6319         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
6320         force-vectorize loops ignore whether we are optimizing for size.
6322 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6324         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
6325         (TARGET_MD_ASM_ADJUST): Define.
6327 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
6328             Kito Cheng  <kito.cheng@gmail.com>
6329             Chung-Ju Wu  <jasonwucj@gmail.com>
6331         * config/nds32/nds32.c (nds32_compute_stack_frame,
6332         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
6333         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
6334         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
6335         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
6336         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
6337         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
6338         * config/nds32/nds32.md (prologue, epilogue): Use macro
6339         NDS32_V3PUSH_AVAILABLE_P to do checking.
6341 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
6343         PR debug/58150
6344         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
6345         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
6346         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
6347         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
6348         addition of most attributes on !orig_type_die or the attribute not
6349         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
6351 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6352             Chung-Ju Wu  <jasonwucj@gmail.com>
6354         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
6355         __NDS32_VH__ macro.
6356         * config/nds32/nds32.opt (mvh): New option.
6358 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6359             Chung-Ju Wu  <jasonwucj@gmail.com>
6361         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
6362         function.
6363         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
6364         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
6365         definition.
6367 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
6368             Chung-Ju Wu  <jasonwucj@gmail.com>
6370         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
6371         function.
6372         * config/nds32/nds32-multiple.md (strlensi): New pattern.
6373         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
6375 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
6376             Kito Cheng  <kito.cheng@gmail.com>
6377             Chung-Ju Wu  <jasonwucj@gmail.com>
6379         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
6380         UNSPEC_FFMISM and UNSPEC_FLMISM.
6381         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
6382         for ffb, ffmism and flmism.
6383         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
6384         (unspec_ffmism): Ditto.
6385         (unspec_flmism): Ditto.
6386         (nds32_expand_builtin_impl): Check if string extension is available.
6387         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
6388         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
6390 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
6392         Reverting patch:
6393         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6395         PR target/83712
6396         * lra-assigns.c (assign_by_spills): Return a flag of reload
6397         assignment failure.  Do not process the reload assignment
6398         failures.  Do not spill other reload pseudos if they has the same
6399         reg class.
6400         (lra_assign): Add a return arg.  Set up from the result of
6401         assign_by_spills call.
6402         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6403         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6404         usage_insns if it is not NULL.
6405         (spill_hard_reg_in_range): New function.
6406         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6407         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6408         function prototypes.
6409         (lra_assign): Change prototype.
6410         * lra.c (lra): Add code to deal with fails by splitting hard reg
6411         live ranges.
6413 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
6415         PR target/84807
6416         * config/i386/i386.opt: Replace Enforcment with Enforcement.
6418 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
6420         PR debug/84620
6421         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
6422         (dw_val_node): Add val_symbolic_view.
6423         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
6424         (symview_upper_bound): New.
6425         (new_line_info_table): Initialize symviews_since_reset.
6426         (dwarf2out_source_line): Count symviews_since_reset and set
6427         symview_upper_bound.
6428         (dw_val_equal_p): Handle symview.
6429         (add_AT_symview): New.
6430         (print_dw_val): Handle symview.
6431         (attr_checksum, attr_checksum_ordered): Likewise.
6432         (same_dw_val_p, size_of_die): Likewise.
6433         (value_format, output_die): Likewise.
6434         (add_high_low_attributes): Use add_AT_symview for entry_view.
6435         (dwarf2out_finish): Reset symview_upper_bound, clear
6436         zero_view_p.
6438 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
6440         PR target/83969
6441         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
6442         Add strict argument and use it.
6443         (rs6000_split_multireg_move): Update for new strict argument.
6444         (mem_operand_gpr): Disallow all non-offsettable addresses.
6445         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
6447 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
6449         PR target/84772
6450         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
6451         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
6452         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
6454         PR c++/84767
6455         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
6456         decl, use remap_type if we want to use the type.
6458 2018-03-09  Martin Sebor  <msebor@redhat.com>
6460         PR tree-optimization/84526
6461         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6462         Remove dead code.
6463         (builtin_access::generic_overlap): Be prepared to handle non-array
6464         base objects.
6466 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
6468         PR rtl-optimization/84682
6469         * lra-constraints.c (process_address_1): Check is_address flag
6470         for address constraints.
6471         (process_alt_operands): Likewise.
6472         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
6473         preprocess_constraints.
6474         * recog.h (preprocess_constraints): Add oploc parameter.
6475         Adjust callers.
6476         * recog.c (preprocess_constraints): Test address_operand for
6477         CT_ADDRESS constraints.
6479 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
6481         PR target/83712
6482         * lra-assigns.c (assign_by_spills): Return a flag of reload
6483         assignment failure.  Do not process the reload assignment
6484         failures.  Do not spill other reload pseudos if they has the same
6485         reg class.
6486         (lra_assign): Add a return arg.  Set up from the result of
6487         assign_by_spills call.
6488         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6489         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
6490         usage_insns if it is not NULL.
6491         (spill_hard_reg_in_range): New function.
6492         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6493         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6494         function prototypes.
6495         (lra_assign): Change prototype.
6496         * lra.c (lra): Add code to deal with fails by splitting hard reg
6497         live ranges.
6499 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6501         PR target/83193
6502         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
6503         Accept complain bool parameter.  Only emit errors if it is true.
6504         (arm_parse_cpu_option_name): Likewise.
6505         (arm_target_thumb_only): Adjust callers of the above.
6506         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6507         prototype to take a default true bool parameter.
6508         (arm_parse_arch_option_name): Likewise.
6510 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
6511             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
6513         PR jit/64089
6514         PR jit/84288
6515         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6516         * configure: Regenerate.
6517         * configure.ac ("linker --version-script option"): New.
6518         ("linker soname option"): New.
6520 2018-03-09  Richard Biener  <rguenther@suse.de>
6522         PR tree-optimization/84775
6523         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6524         immediate uses of predicate stmts and mark them modified.
6526         Revert
6527         PR tree-optimization/84178
6528         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6529         to caller.
6530         (version_loop_for_if_conversion): Delay update_ssa call.
6531         (tree_if_conversion): Delay update_ssa until after predicate
6532         insertion.
6534 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
6536         PR target/84763
6537         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6538         when the function accesses prior frames.
6540 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6542         PR debug/84456
6543         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6544         gen_llsym, otherwise call maybe_gen_llsym.
6546         PR inline-asm/84742
6547         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6548         has ',' character inside of it.
6550 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6552         PR target/84748
6553         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6554         as clobbering CC_REGNUM.
6556 2018-03-08  Richard Biener  <rguenther@suse.de>
6558         PR middle-end/84552
6559         * tree-scalar-evolution.c: Include tree-into-ssa.h.
6560         (follow_copies_to_constant): Do not follow SSA names registered
6561         for update.
6563 2018-03-08  Richard Biener  <rguenther@suse.de>
6565         PR tree-optimization/84178
6566         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6567         to caller.
6568         (version_loop_for_if_conversion): Delay update_ssa call.
6569         (tree_if_conversion): Delay update_ssa until after predicate
6570         insertion.
6572 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
6574         PR tree-optimization/84178
6575         * tree-if-conv.c (release_bb_predicate): Remove the
6576         the assertion that the stmts have NULL use_ops.
6577         Discard the statements, asserting that they haven't
6578         yet been added to a BB.
6580 2018-03-08  Richard Biener  <rguenther@suse.de>
6582         PR tree-optimization/84746
6583         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
6584         (phi_translate): Pass in destination ANTIC_OUT set.
6585         (phi_translate_1): Likewise.  For a simplified result lookup
6586         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
6587         (phi_translate_set): Adjust.
6588         (do_pre_regular_insertion): Likewise.
6589         (do_pre_partial_partial_insertion): Likewise.
6591 2018-03-08  Martin Liska  <mliska@suse.cz>
6593         PR gcov-profile/84735
6594         * doc/gcov.texi: Document usage of profile files.
6595         * gcov-io.h: Document changes in the format.
6597 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
6599         PR debug/84404
6600         PR debug/84408
6601         * dwarf2out.c (struct dw_line_info_table): Update comments for
6602         view == -1.
6603         (FORCE_RESET_NEXT_VIEW): New.
6604         (FORCE_RESETTING_VIEW_P): New.
6605         (RESETTING_VIEW_P): Check for -1 too.
6606         (ZERO_VIEW_P): Likewise.
6607         (new_line_info_table): Force-reset next view.
6608         (dwarf2out_begin_function): Likewise.
6609         (dwarf2out_source_line): Simplify zero_view_p initialization.
6610         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
6611         view directly.  Omit view when omitting .loc at line 0.
6613 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
6615         PR tree-optimization/84740
6616         * tree-switch-conversion.c (process_switch): Call build_constructors
6617         only if info.phi_count is non-zero.
6619         PR tree-optimization/84739
6620         * tree-tailcall.c (find_tail_calls): Check call arguments against
6621         DECL_ARGUMENTS (current_function_decl) rather than
6622         DECL_ARGUMENTS (func) when checking for tail recursion.
6624 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6626         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6627         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6628         Volker Reichelt's entry and add entries for people that perform
6629         GCC fuzzy testing and report numerous bugs.
6631 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
6633         PR target/82411
6634         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6635         readonly data in sdata, if that is disabled.
6636         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6637         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6638         -mreadonly-in-sdata option.
6640 2018-03-07  Martin Sebor  <msebor@redhat.com>
6642         PR tree-optimization/84468
6643         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6644         basic block when looking for nul assignment.
6646 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
6648         PR target/84277
6649         * except.h (output_function_exception_table): Adjust prototype.
6650         * except.c (output_function_exception_table): Remove FNNAME parameter
6651         and add SECTION parameter.  Ouput one part of the table at a time.
6652         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6653         the first part of the exception table and emit unwind directives.
6654         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6655         (i386_pe_seh_cold_init): Likewise.
6656         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6657         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6658         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6659         (ix86_output_call_insn): Emit a nop in one more case for SEH.
6660         * config/i386/winnt.c: Include except.h.
6661         (struct seh_frame_state): Add reg_offset, after_prologue and
6662         in_cold_section fields.
6663         (i386_pe_seh_end_prologue): Set seh->after_prologue.
6664         (i386_pe_seh_cold_init): New function.
6665         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6666         to seh->in_cold_section.
6667         (seh_emit_push): Record the offset of the push.
6668         (seh_emit_save): Record the offet of the save.
6669         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6670         Test seh->after_prologue to disregard the epilogue.
6671         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6672         (i386_pe_end_cold_function): New function.
6674 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
6676         PR fortran/84565
6677         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6678         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6680         PR c++/84704
6681         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6682         on tmp_var.
6683         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6684         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6686         PR middle-end/84723
6687         * multiple_target.c: Include tree-inline.h and intl.h.
6688         (expand_target_clones): Diagnose and fail if node->definition and
6689         !tree_versionable_function_p (node->decl).
6691 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
6693         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6694         sprint_ul.
6695         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6696         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6697         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6699 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6701         PR target/84710
6702         * combine.c (try_combine): Use reg_or_subregno instead of handling
6703         just paradoxical SUBREGs and REGs.
6705 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
6707          * config/arc/arc.c (arc_finalize_pic): Remove function.
6708          (arc_must_save_register): We use single base PIC register, remove
6709          checks to save/restore the PIC register.
6710          (arc_expand_prologue): Likewise.
6711          * config/arc/arc-protos.h (arc_set_default_type_attributes):
6712          Remove.
6713          (arc_verify_short): Likewise.
6714          (arc_attr_type): Likewise.
6715          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6716          (walk_stores): Likewise.
6717          (arc_address_cost): Make it static.
6718          (arc_verify_short): Likewise.
6719          (branch_dest): Likewise.
6720          (arc_attr_type): Likewise.
6721          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6722          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6723          (arc_final_prescan_insn): Remove inserting the nops due to
6724          hardware hazards.  It is done in reorg step.
6725          (insn_length_variant_t): Remove.
6726          (insn_length_parameters_t): Likewise.
6727          (arc_insn_length_parameters): Likewise.
6728          (arc_get_insn_variants): Likewise.
6729          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6731 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
6733         PR inline-asm/84683
6734         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6735         assertion failure.
6737         PR tree-optimization/84687
6738         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6739         on new_node->decl.
6740         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6742 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6744         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6745         Rename to ppc_speculation_barrier.
6746         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6747         __builtin_ppc_speculation_barrier.
6749 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6751         PR target/84700
6752         * combine.c (combine_simplify_rtx): Don't try to simplify if
6753         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6754         are equal to x.
6756 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
6758         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6759         to 32 bytes when compiling for POWER9.
6761 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
6763         PR target/84564
6764         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6765         regparm >= 3 with no arg reg available also for calls with
6766         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
6768         PR target/84524
6769         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6770         orig,vex.
6771         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
6773 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
6775         PR target/84264
6776         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6778 2018-03-05  Richard Biener  <rguenther@suse.de>
6780         PR tree-optimization/84486
6781         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6782         When inserting a __builtin_assume_aligned call set the LHS
6783         SSA name alignment info accordingly.
6785 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
6787         PR tree-optimization/84114
6788         * config/aarch64/aarch64.c (aarch64_reassociation_width)
6789         Avoid reassociation of FLOAT_MODE addition.
6791 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
6793         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6794         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6795         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6796         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6797         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6798         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6799         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6800         and -mwbnoinvd.
6801         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6802         __builtin_ia32_wbinvd): New builtins.
6803         (SPECIAL_ARGS2): New.
6804         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6805         (SPECIAL_ARGS2): New.
6806         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6807         (ix86_valid_target_attribute_inner_p): Ditto.
6808         (ix86_init_mmx_sse_builtins): Add special_args2.
6809         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6810         TARGET_WBNOINVD_P): New.
6811         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6812         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6813         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6814         * config/i386/immintrin.h (_wbinvd): New intrinsic.
6815         * config/i386/pconfigintrin.h: New file.
6816         * config/i386/wbnoinvdintrin.h: Ditto.
6817         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6818         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6820 2018-03-05  Richard Biener  <rguenther@suse.de>
6822         PR tree-optimization/84670
6823         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6824         member.
6825         (BB_VISITED_WITH_VISITED_SUCCS): New define.
6826         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6827         (compute_antic_aux): Only assert the number of values in ANTIC_IN
6828         doesn't grow if all successors (recursively) were visited at least
6829         once.
6831 2018-03-05  Richard Biener  <rguenther@suse.de>
6833         PR tree-optimization/84650
6834         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6835         if executed in the loop pipeline.
6837 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
6839         * doc/configfiles.texi (Configuration Files): Move info about
6840         conditionalizing $target-protos.h to...
6841         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
6842         differs from $target-protos.h.
6844 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
6845             Chung-Ju Wu  <jasonwucj@gmail.com>
6847         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6848         * config/nds32/nds32-multiple.md (setmemsi): Define.
6849         * config/nds32/nds32-memory-manipulation.c
6850         (nds32_gen_dup_4_byte_to_word_value): New.
6851         (emit_setmem_word_loop): New.
6852         (emit_setmem_byte_loop): New.
6853         (nds32_expand_setmem_loop): New.
6854         (nds32_expand_setmem_loop_v3m): New.
6855         (nds32_expand_setmem_unroll): New.
6856         (nds32_expand_setmem): New.
6858 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6859             Chung-Ju Wu  <jasonwucj@gmail.com>
6861         * config/nds32/nds32-memory-manipulation.c
6862         (nds32_emit_load_store): New.
6863         (nds32_emit_post_inc_load_store): New.
6864         (nds32_emit_mem_move): New.
6865         (nds32_emit_mem_move_block): New.
6866         (nds32_expand_movmemsi_loop_unknown_size): New.
6867         (nds32_expand_movmemsi_loop_known_size): New.
6868         (nds32_expand_movmemsi_loop): New.
6869         (nds32_expand_movmemsi_unroll): New.
6870         (nds32_expand_movmemqi): Rename ...
6871         (nds32_expand_movmemsi): ... to this.
6872         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6873         (movmemsi): ... to this.
6874         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6875         (nds32_expand_movmemsi): ... to this.
6877 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6878             Monk Chiang  <sh.chiang04@gmail.com>
6879             Chung-Ju Wu  <jasonwucj@gmail.com>
6881         * config/nds32/nds32-protos.h
6882         (nds32_expand_load_multiple): New arguments.
6883         (nds32_expand_store_multiple): Ditto.
6884         (nds32_valid_multiple_load_store): Rename ...
6885         (nds32_valid_multiple_load_store_p): ... to this.
6886         * config/nds32/nds32-memory-manipulation.c
6887         (nds32_expand_load_multiple): Refine implementation.
6888         (nds32_expand_store_multiple): Ditto.
6889         * config/nds32/nds32-multiple.md
6890         (load_multiple): Update nds32_expand_load_multiple interface.
6891         (store_multiple): Update nds32_expand_store_multiple interface.
6892         * config/nds32/nds32-predicates.c
6893         (nds32_valid_multiple_load_store): Rename ...
6894         (nds32_valid_multiple_load_store_p): ... to this and refine
6895         implementation.
6896         * config/nds32/predicates.md
6897         (nds32_load_multiple_and_update_address_operation): New predicate.
6898         (nds32_store_multiple_and_update_address_operation): New predicate.
6900 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
6901             Chung-Ju Wu  <jasonwucj@gmail.com>
6903         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6904         (combo): New attribute.
6905         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6907 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6909         * config/nds32/nds32.opt: Change -mcmodel= default value.
6911 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
6912             Monk Chiang  <sh.chiang04@gmail.com>
6913             Chung-Ju Wu  <jasonwucj@gmail.com>
6915         * config/nds32/constants.md (unspec_element): New enum.
6916         * config/nds32/constraints.md (Umw): New constraint.
6917         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6918         * config/nds32/nds32-intrinsic.md: Likewise.
6919         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6920         (nds32_valid_smw_lwm_base_p): New.
6921         (nds32_output_smw_single_word): New.
6922         (nds32_output_lmw_single_word): New.
6923         (nds32_expand_unaligned_load): New.
6924         (nds32_expand_unaligned_store): New.
6925         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6926         (nds32_output_smw_single_word): Declare.
6927         (nds32_output_lmw_single_word): Declare.
6928         (nds32_expand_unaligned_load): Declare.
6929         (nds32_expand_unaligned_store): Declare.
6930         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6931         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6932         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6933         NDS32_BUILTIN_UASTORE_DW.
6934         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6935         predicate.
6937 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
6938             Kito Cheng  <kito.cheng@gmail.com>
6939             Chung-Ju Wu  <jasonwucj@gmail.com>
6941         * config/nds32/nds32-intrinsic.c
6942         (nds32_expand_builtin_null_ftype_reg): Delete.
6943         (nds32_expand_builtin_reg_ftype_imm): Ditto.
6944         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6945         (nds32_read_argument): New.
6946         (nds32_legitimize_target): Ditto.
6947         (nds32_legitimize_argument): Ditto.
6948         (nds32_check_constant_argument): Ditto.
6949         (nds32_expand_unop_builtin): Ditto.
6950         (nds32_expand_unopimm_builtin): Ditto.
6951         (nds32_expand_binop_builtin): Ditto.
6952         (nds32_builtin_decl_impl): Ditto.
6953         (builtin_description): Ditto.
6954         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6955         (nds32_init_builtins_impl): Ditto.
6956         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6957         (nds32_builtin_decl): New.
6958         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6959         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6961 2018-03-02  Jeff Law  <law@redhat.com>
6963         * reorg.c (stop_search_p): Handle DEBUG_INSN.
6964         (redundant_insn, fill_simple_delay_slots): Likewise.
6965         (fill_slots_from_thread): Likewise.
6966         * resource.c (mark_referenced_resources): Likewise.
6967         (mark_set_resources, find_dead_or_set_registers): Likewise.
6969 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6971         * substring-locations.h (format_warning_va): Formatting fix for
6972         ATTRIBUTE_GCC_DIAG.
6973         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6974         argument.
6975         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6976         * substring-locations.c: Include intl.h.
6977         (format_warning_va): Turned into small wrapper around
6978         format_warning_n_va, renamed to ...
6979         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6980         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6981         use ngettext.
6982         (format_warning_at_substring_n): New function.
6983         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6984         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
6985         format_warning_at_substring with just a shorter name instead of
6986         const function pointer.
6987         (fmtwarn_n): New function.
6988         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6989         appropriate, get rid of all the fmtstr temporaries, move conditionals
6990         with G_() wrapped string literals directly into fmtwarn arguments,
6991         cast dir.len to (int), formatting fixes.
6993 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
6995         * doc/invoke.texi: Remove "Cilk Plus" references.
6997 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
6998             Richard Biener  <rguenther@suse.de>
7000         PR ipa/84628
7001         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
7002         for error or warning attributes if CALL_FROM_THUNK_P is set.
7003         Formatting fixes.
7005 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
7007         PR target/56540
7008         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
7009         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
7011         PR target/56540
7012         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
7013         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
7015         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
7016         instead of -1U in last predictors element's probability member.
7018 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
7020         PR ipa/83983
7021         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
7022         arguments if they are comparable.
7024 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
7026         PR tree-optimization/84634
7027         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
7028         masks and masked_loop_p with a single loop_masks, making sure it's
7029         null for bb vectorization.
7031 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
7033         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7034         (vect_analyze_data_ref_access): Use loop->safe_len rather than
7035         loop->force_vectorize to check whether there is no alias.
7037 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
7039         PR target/84614
7040         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
7041         prototypes.
7042         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
7043         comments.
7044         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
7045         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
7046         instead of a loop around prev_real_insn.
7047         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
7048         prev_real_insn.
7050         PR inline-asm/84625
7051         * config/i386/i386.c (ix86_print_operand): Use conditional
7052         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
7053         zero vector.
7055 2018-03-02  Richard Biener  <rguenther@suse.de>
7057         PR tree-optimization/84427
7058         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
7059         (bitmap_set_subtract_values): Rewrite to handle multiple
7060         exprs per value.
7061         (clean): Likewise.
7062         (prune_clobbered_mems): Likewise.
7063         (phi_translate): Take edge instead of pred/phiblock.
7064         (phi_translate_1): Likewise.
7065         (phi_translate_set): Likewise.  Insert all translated
7066         exprs for a value into the set, keeping possibly multiple
7067         expressions per value.
7068         (compute_antic_aux): Adjust for phi_translate changes.
7069         When intersecting union the expressions and prune those
7070         not in the final value set, keeping possibly multiple
7071         expressions per value.  Do not use value-insertion
7072         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
7073         all expressions.  Add verification that the value-sets
7074         only shrink during iteration.
7075         (compute_partial_antic_aux): Adjust for the phi_translate changes.
7076         (do_pre_regular_insertion): Likewise.
7077         (do_pre_partial_partial_insertion): Likewise.
7079 2018-03-02  Richard Biener  <rguenther@suse.de>
7081         PR target/82005
7082         * config/darwin.c (saved_debug_info_level): New static global.
7083         (darwin_asm_lto_start): Disable debug info generation for LTO out.
7084         (darwin_asm_lto_end): Restore debug info generation settings.
7086 2018-03-01  Martin Liska  <mliska@suse.cz>
7088         PR sanitizer/82484
7089         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
7090         volatile arguments.
7092 2018-03-01  Richard Biener  <rguenther@suse.de>
7094         PR debug/84645
7095         * dwarf2out.c (gen_variable_die): Properly handle late VLA
7096         type annotation with LTO when debug was disabled at compile-time.
7098 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
7100         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
7101         XINT with INTVAL.
7102         (mips_final_postscan_insn): Likewise.
7104 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
7106         PR rtl-optimization/84528
7107         * alias.c (init_alias_target): Add commentary.
7108         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
7109         a unique base value if the frame pointer is not eliminated
7110         to the stack pointer.
7112 2018-03-01  Tom de Vries  <tom@codesourcery.com>
7114         PR rtl-optimization/83327
7115         * lra-int.h (hard_regs_spilled_into): Declare.
7116         * lra.c (hard_regs_spilled_into): Define.
7117         (init_reg_info): Init hard_regs_spilled_into.
7118         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
7119         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
7120         (process_bb_lives): Handle hard_regs_spilled_into.
7121         (lra_create_live_ranges_1): Before doing liveness propagation, clear
7122         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
7124 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
7126         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
7127         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
7128         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
7129         * config/rs6000/aix72.h: New file.
7131 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
7133         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
7134         instead of warning_at with conditional singular and plural messages
7135         where possible.
7137         PR target/52991
7138         * stor-layout.c (update_alignment_for_field): For
7139         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
7140         && !DECL_PACKED (field), do the alignment update, just use
7141         only desired_align instead of MAX (type_align, desired_align)
7142         as the alignment.
7143         (place_field): Don't do known_align < desired_align handling
7144         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
7145         is non-NULL, instead do it after rli->prev_field handling and
7146         only if not within a bitfield word.  For DECL_PACKED (field)
7147         use type_align of BITS_PER_UNIT.
7149 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
7151         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
7152         superfluous parentheses and trailing spaces.
7154 2018-02-28  Richard Biener  <rguenther@suse.de>
7156         PR tree-optimization/84584
7157         * graphite-scop-detection.c (scop_detection::add_scop): Discard
7158         SCoPs with fake exit edge.
7160 2018-02-28  Martin Liska  <mliska@suse.cz>
7162         PR testsuite/84597
7163         * timevar.c (timer::print): Fix format to properly print 100%
7164         values.
7166 2018-02-28  Richard Biener  <rguenther@suse.de>
7168         PR middle-end/84607
7169         * genmatch.c (capture_info::walk_match): Do not mark
7170         captured expressions without operands as expr_p given
7171         they act more like predicates and should be subject to
7172         "lost tail" side-effect preserving.
7174 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
7176         PR rtl-optimization/81611
7177         * auto-inc-dec.c (attempt_change): Move dead note from
7178         mem_insn if it's the next use of regno
7179         (find_address): Take address use of reg holding
7180         non-incremented value.  Add parm to limit search to the named
7181         reg only.
7182         (merge_in_block): Attempt to use a mem insn that is the next
7183         use of the original regno.
7185 2018-02-27  Martin Sebor  <msebor@redhat.com>
7187         PR c++/83871
7188         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
7189         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
7191 2018-02-27  Martin Sebor  <msebor@redhat.com>
7193         PR translation/84207
7194         * diagnostic-core.h (warning_n, error_n, inform_n): Change
7195         n argument to unsigned HOST_WIDE_INT.
7196         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
7197         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
7198         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
7199         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
7201 2018-02-27  Richard Biener  <rguenther@suse.de>
7203         PR tree-optimization/84512
7204         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7205         Do not use the estimate returned from record_stmt_cost for
7206         the scalar iteration cost but sum properly using add_stmt_cost.
7208 2018-02-27  Richard Biener  <rguenther@suse.de>
7210         PR tree-optimization/84466
7211         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7212         Adjust last change to less strictly validate use operands.
7214 2018-02-27  Martin Liska  <mliska@suse.cz>
7216         PR gcov-profile/84548
7217         * gcov.c (process_file): Allow partial overlap and consider it
7218         also as group functions.
7219         (output_lines): Properly calculate range of lines for a group.
7221 2018-02-27  Martin Liska  <mliska@suse.cz>
7223         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
7224         'ggc' suffixes.  Change first column width.
7225         (timer::print): Fix formatting of the column.
7227 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
7229         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
7230         preserve inline entry blocks for the sake of debug inline
7231         entry point markers alone.
7232         (remove_unused_locals): Suggest in comments a better place to
7233         force the preservation of inline entry blocks that are
7234         otherwise unused, but do not preserve them.
7236 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7238         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
7240 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7242         PR target/84039
7243         * config/i386/constraints.md (Bs): Replace
7244         ix86_indirect_branch_register with
7245         TARGET_INDIRECT_BRANCH_REGISTER.
7246         (Bw): Likewise.
7247         * config/i386/i386.md (indirect_jump): Likewise.
7248         (tablejump): Likewise.
7249         (*sibcall_memory): Likewise.
7250         (*sibcall_value_memory): Likewise.
7251         Peepholes of indirect call and jump via memory: Likewise.
7252         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
7253         (*sibcall_value_GOT_32): Likewise.
7254         * config/i386/predicates.md (indirect_branch_operand): Likewise.
7255         (GOT_memory_operand): Likewise.
7256         (call_insn_operand): Likewise.
7257         (sibcall_insn_operand): Likewise.
7258         (GOT32_symbol_operand): Likewise.
7259         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
7261 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7263         PR rtl-optimization/83496
7264         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
7265         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
7266         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
7267         redundant insn, if any.
7268         (relax_delay_slots): Likewise.
7269         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
7271 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
7273         PR tree-optimization/83965
7274         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
7275         that grouped statements are part of a reduction chain.  Return
7276         true if the statement is not marked as a reduction itself but
7277         is part of a group.
7278         (vect_recog_dot_prod_pattern): Don't check whether the statement
7279         is part of a group here.
7280         (vect_recog_sad_pattern): Likewise.
7281         (vect_recog_widen_sum_pattern): Likewise.
7283 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
7285         PR debug/84545
7286         * final.c (rest_of_clean_state): Also look for calls inside sequences.
7288 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
7290         PR target/84530
7291         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
7292         the bool argument.
7293         (ix86_output_indirect_function_return): New prototype.
7294         (ix86_split_simple_return_pop_internal): Likewise.
7295         * config/i386/i386.c (indirect_return_via_cx): New.
7296         (indirect_return_via_cx_bnd): Likewise.
7297         (indirect_thunk_name): Handle return va CX_REG.
7298         (output_indirect_thunk_function): Create alias for
7299         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
7300         (ix86_output_indirect_jmp): Remove the bool argument.
7301         (ix86_output_indirect_function_return): New function.
7302         (ix86_split_simple_return_pop_internal): Likewise.
7303         * config/i386/i386.md (*indirect_jump): Don't pass false
7304         to ix86_output_indirect_jmp.
7305         (*tablejump_1): Likewise.
7306         (simple_return_pop_internal): Change it to define_insn_and_split.
7307         Call ix86_split_simple_return_pop_internal to split it for
7308         -mfunction-return=.
7309         (simple_return_indirect_internal): Call
7310         ix86_output_indirect_function_return instead of
7311         ix86_output_indirect_jmp.
7313 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
7315         PR bootstrap/84405
7316         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
7317         memset and value initialization afterwards.
7319 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
7321         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
7323 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7325         PR target/84521
7326         * common/config/aarch64/aarch64-common.c
7327         (aarch_option_optimization_table[]): Switch
7328         off fomit-frame-pointer
7330 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7331             Chung-Ju Wu  <jasonwucj@gmail.com>
7333         * config/nds32/nds32-multiple.md (load_multiple): Disallow
7334         volatile memory.
7335         (store_multiple): Ditto.
7337 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
7339         * config.gcc: Add --with-cpu support for nds32 target.
7340         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
7341         * config/nds32/nds32.opt: Add -mcpu= option.
7343 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
7345         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
7346         isel=yes): Warn for these deprecated options.
7348 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
7350         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
7351         ISA_2_5_MASKS_EMBEDDED.
7353 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
7355         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
7356         p->max as pointers rather than using iterative_hash_expr.
7358 2018-02-23  Carl Love  <cel@us.ibm.com>
7360         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
7361         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
7362         BU_P8V_OVERLOAD_2.
7363         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
7364         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
7365         P8V_BUILTIN_VEC_VUNSIGNED2.
7367 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
7369         PR target/81572
7370         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
7371         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
7372         LRA_UNKNOWN_ALT.
7373         * lra-constraints.c (curr_insn_transform): Set up
7374         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
7375         LRA_UNKNOWN_ALT.
7376         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
7377         * lra-eliminations.c (spill_pseudos): Ditto.
7378         (process_insn_for_elimination): Ditto.
7379         * lra-lives.c (reg_early_clobber_p): Use the new macros.
7380         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
7381         LRA_NON_CLOBBERED_ALT.
7383 2018-02-22  Martin Sebor  <msebor@redhat.com>
7385         PR tree-optimization/84480
7386         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
7387         to maybe_diag_stxncpy_trunc.  Call it.
7388         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
7389         from gimple_fold_builtin_strcpy.  Print inlining stack.
7390         (handle_builtin_stxncpy): Print inlining stack.
7391         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
7393 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
7395         PR target/84176
7396         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
7397         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
7398         and -fcheck-pointer-bounds are used together.
7399         (indirect_thunk_prefix): New enum.
7400         (indirect_thunk_need_prefix): New function.
7401         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
7402         "_nt" instead of "_bnd" for NOTRACK prefix.
7403         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
7404         (output_indirect_thunk_function): Likewise.
7405         (): Likewise.
7406         (ix86_code_end): Update output_indirect_thunk_function calls.
7407         (ix86_output_indirect_branch_via_reg): Replace
7408         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
7409         (ix86_output_indirect_branch_via_push): Likewise.
7410         (ix86_output_function_return): Likewise.
7411         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
7412         incompatible with -fcf-protection=branch and
7413         -fcheck-pointer-bounds.
7415 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7417         PR target/83335
7418         * config/aarch64/aarch64.c (aarch64_print_address_internal):
7419         Change gcc_assert call to output_operand_lossage.
7421 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
7423         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
7425 2018-02-22  DJ Delorie  <dj@redhat.com>
7426             Sebastian Perta  <sebastian.perta@renesas.com>
7427             Oleg Endo  <olegendo@gcc.gnu.org>
7429         * config/rx/rx.c (rx_rtx_costs): New function.
7430         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
7432 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7434         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
7436 2018-02-22  Martin Liska  <mliska@suse.cz>
7438         PR driver/83193
7439         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
7440         Add "native" as a possible value.
7442 2018-02-22  Martin Liska  <mliska@suse.cz>
7444         PR driver/83193
7445         * config/i386/i386.c (ix86_option_override_internal):
7446         Add "native" as a possible value for -march and -mtune.
7448 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
7450         PR target/84502
7451         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
7452         to all type variants.
7454         PR tree-optimization/84503
7455         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
7456         width as info->bitpos + info->bitsize - start.
7457         (merged_store_group::merge_overlapping): Simplify width computation.
7458         (check_no_overlap): New function.
7459         (imm_store_chain_info::try_coalesce_bswap): Compute expected
7460         start + width and last_order of the group, fail if check_no_overlap
7461         fails.
7462         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
7463         to group if check_no_overlap fails.
7465 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7467         * config/rs6000/altivec.md: Delete contraint arguments to
7468         define_expand, define_split, and define_peephole2, and in
7469         define_insn_and_split if always unused.
7470         * config/rs6000/darwin.md: Ditto.
7471         * config/rs6000/dfp.md: Ditto.
7472         * config/rs6000/rs6000.md: Ditto.
7473         * config/rs6000/sync.md: Ditto.
7474         * config/rs6000/vector.md: Ditto.
7475         * config/rs6000/vsx.md: Ditto.
7477 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
7479         * config/rs6000/altivec.md: Write output control strings as braced
7480         blocks instead of double-quoted strings.
7481         * config/rs6000/darwin.md: Ditto.
7482         * config/rs6000/rs6000.md: Ditto.
7483         * config/rs6000/vector.md: Ditto.
7484         * config/rs6000/vsx.md: Ditto.
7486 2018-02-21  Jason Merrill  <jason@redhat.com>
7488         PR c++/84314 - ICE with templates and fastcall attribute.
7489         * attribs.c (build_type_attribute_qual_variant): Remove assert.
7491 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7493         * ipa-cp.c (determine_versionability): Fix comment typos.
7495 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
7497         PR c/84229
7498         * ipa-cp.c (determine_versionability): Do not version functions caling
7499         va_arg_pack.
7501 2018-02-21  Martin Liska  <mliska@suse.cz>
7503         PR driver/83193
7504         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7505         Add "native" as a possible value.
7506         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
7507         the macro when native cpu detection is available.
7509 2018-02-21  Martin Liska  <mliska@suse.cz>
7511         PR driver/83193
7512         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7513         Add "native" as a possible value.
7514         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7515         when native cpu detection is available.
7517 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
7518             Martin Sebor  <msebor@redhat.com>
7520         PR tree-optimization/84478
7521         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7522         false.
7523         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7524         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7525         support which is conservatively correct, for 2 only stay conservative
7526         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
7527         argument to the 2 argument get_range_strlen, adjust 6 arg
7528         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7529         false.
7530         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7531         (gimple_fold_builtin_strlen): Pass true as last argument to
7532         get_range_strlen.
7534 2018-02-20  Martin Sebor  <msebor@redhat.com>
7536         PR middle-end/84095
7537         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7538         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
7539         (builtin_memref::builtin_memref): Factor out parts into
7540         set_base_and_offset and call it.
7542 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7544         PR middle-end/84406
7545         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7546         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7547         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
7548         search at the associated MODE_INT.
7550 2018-02-20  Jeff Law  <law@redhat.com>
7552         PR middle-end/82123
7553         PR tree-optimization/81592
7554         PR middle-end/79257
7555         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
7556         for range data rather than using global data.
7557         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
7558         range data rather than using global data.
7559         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
7560         pass it to children as needed.
7561         (struct directive::fmtresult): Similarly.
7562         (struct directive::set_width): Similarly.
7563         (struct directive::set_precision): Similarly.
7564         (format_integer, format_directive, parse_directive): Similarly.
7565         (format_none): Accept unnamed vr_values parameter.
7566         (format_percent, format_floating, format_character): Similarly.
7567         (format_string, format_plain): Similarly.
7568         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
7569         the EVRP range analyzer for range data rather than using global data.
7570         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
7571         gimple-ssa-evrp-analyze.h
7572         (class sprintf_dom_walker): Add after_dom_children member function.
7573         Add evrp_range_analyzer member.
7574         (sprintf_dom_walker::before_dom_children): Call into the EVRP
7575         range analyzer as needed.
7576         (sprintf_dom_walker::after_dom_children): New member function.
7577         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
7578         if not optimizing.
7579         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
7580         (evrp_range_analyzer::pop_to_marker): Likewise.
7582 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
7584         PR tree-optimization/84419
7585         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
7586         with the required type if its current type is compatible but
7587         different.
7589 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
7591         PR middle-end/82004
7592         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
7593         after vectorization.
7595 2018-02-20  Martin Liska  <mliska@suse.cz>
7597         PR driver/83193
7598         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
7599         possible values if we don't have a hint.
7601 2018-02-20  Martin Liska  <mliska@suse.cz>
7603         PR c/84310
7604         PR target/79747
7605         * final.c (shorten_branches): Build align_tab array with one
7606         more element.
7607         * opts.c (finish_options): Add alignment option limit check.
7608         (MAX_CODE_ALIGN): Likewise.
7609         (MAX_CODE_ALIGN_VALUE): Likewise.
7610         * doc/invoke.texi: Document maximum allowed option value for
7611         all -falign-* options.
7613 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
7615         PR target/84146
7616         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
7617         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
7618         * var-tracking.c (emit_note_insn_var_location): Remove all references
7619         to NOTE_INSN_CALL_ARG_LOCATION.
7620         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7621         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7622         Use copy_rtx_if_shared.
7623         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7624         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7625         (dwarf2out_var_location): Remove handling of
7626         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7627         on call_insn.
7628         * final.c (final_scan_insn): Remove all references to
7629         NOTE_INSN_CALL_ARG_LOCATION.
7630         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
7631         before dumping final insns.
7632         * except.c (emit_note_eh_region_end): Remove all references to
7633         NOTE_INSN_CALL_ARG_LOCATION.
7634         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7635         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7636         * config/arc/arc.c (hwloop_optimize): Likewise.
7637         * config/arm/arm.c (create_fix_barrier): Likewise.
7638         * config/s390/s390.c (s390_chunkify_start): Likewise.
7639         * config/sh/sh.c (find_barrier): Likewise.
7640         * config/i386/i386.c (rest_of_insert_endbranch,
7641         ix86_seh_fixup_eh_fallthru): Likewise.
7642         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7643         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7644         * config/frv/frv.c (frv_function_prologue): Likewise.
7645         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
7646         reg note.
7647         (note_outside_basic_block_p): Remove all references to
7648         NOTE_INSN_CALL_ARG_LOCATION.
7649         * gengtype.c (adjust_field_rtx_def): Likewise.
7650         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7651         Likewise.
7652         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7653         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7655         PR c++/84444
7656         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7657         is ADDR_EXPR.
7659         PR tree-optimization/84452
7660         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7661         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7662         is NULL.
7664 2018-02-19  Martin Liska  <mliska@suse.cz>
7666         PR sanitizer/82183
7667         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7669 2018-02-19  Martin Liska  <mliska@suse.cz>
7670             Richard Sandiford  <richard.sandiford@linaro.org>
7672         PR tree-optimization/82491
7673         * gimple-fold.c (get_base_constructor): Make earlier bail out
7674         to prevent ubsan.
7676 2018-02-19  Carl Love  <cel@us.ibm.com>
7678         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7679         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7680         BU_P8V_OVERLOAD_1.
7681         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7682         P8V_BUILTIN_VEC_NEG.
7684 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
7686         * config/rl78/rl78.md (movdf): New define expand.
7688 2018-02-19  Martin Liska  <mliska@suse.cz>
7690         PR other/80589
7691         * doc/invoke.texi: Fix typo.
7692         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7694 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
7696         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7697         handle rs6000_single_float and rs6000_double_float specially for
7698         e500 family CPUs.
7700 2018-02-16  Jeff Law  <law@redhat.com>
7702         * config/rx/rx.c (add_pop_cfi_notes): New function.;
7703         (pop_regs): Use it.
7705 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7707         PR ipa/84425
7708         * ipa-inline.c (inline_small_functions): Fix a typo.
7710 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7712         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7714 2018-02-16  Carl Love  <cel@us.ibm.com>
7716         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7717         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7718         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7719         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7720         expansion to P8V_BUILTIN_VEC_FLOAT2.
7722 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
7724         PR rtl-optimization/70023
7725         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7726         src_regno into account.
7728 2018-02-16  Carl Love  <cel@us.ibm.com>
7730         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7731         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7732         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7733         * config/rs6000/rs6000.c: Remove case statements for
7734         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7735         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7736         and P9V_BUILTIN_VEC_VINSERT4B.
7737         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7738         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7739         * config/rs6000/vsx.md:
7740         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7741         vec_insert4b.
7743 2018-02-16  Carl Love  <cel@us.ibm.com>
7745         * config/rs6000/altivec.h: Add builtin names vec_extract4b
7746         vec_insert4b.
7747         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7748         definitions.
7749         * config/rs6000/rs6000-c.c: Add the definitions for
7750         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7751         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7752         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7753         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
7754         definition for insert4b and define insn *insert3b_internal.
7755         * doc/extend.texi: Add documentation for vec_extract4b.
7757 2018-02-16  Nathan Sidwell  <nathan@acm.org>
7759         * doc/extend.texi (Backwards Compatibility): Mention friend
7760         injection.  Note for-scope is deprecated.
7761         * doc/invoke.texi (-ffriend-injection): Deprecate.
7763 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
7765         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7766         that moved to I2, also allow destinations that are a paradoxical
7767         subreg (instead of a normal reg).
7769 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
7771         PR target/83831
7772         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7773         to QImode.
7775 2018-02-16  Richard Biener  <rguenther@suse.de>
7777         PR tree-optimization/84037
7778         PR tree-optimization/84016
7779         PR target/82862
7780         * config/i386/i386.c (ix86_builtin_vectorization_cost):
7781         Adjust vec_construct for the fact we need additional higher latency
7782         128bit inserts for AVX256 and AVX512 vector builds.
7783         (ix86_add_stmt_cost): Scale vector construction cost for
7784         elementwise loads.
7786 2018-02-16  Richard Biener  <rguenther@suse.de>
7788         PR tree-optimization/84417
7789         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7790         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7791         (non_rewritable_lvalue_p): Likewise, use poly-ints.
7793 2018-02-16  Martin Liska  <mliska@suse.cz>
7795         PR sanitizer/84307
7796         * internal-fn.def (ASAN_CHECK): Set proper flags.
7797         (ASAN_MARK): Likewise.
7799 2018-02-16  Julia Koval  <julia.koval@intel.com>
7801         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7802         from PTA_CANNONLAKE.
7804 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
7806         PR target/84272
7807         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7808         Use ++iter rather than iter++ for std::list iterators.
7809         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
7810         defer deleting them until all nodes in the forest are processed.  Do
7811         free even leaf nodes.  Change to_process into auto_vec.
7813         PR bootstrap/84405
7814         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7815         * vec.h (vec_default_construct): Use memset instead of placement new
7816         if BROKEN_VALUE_INITIALIZATION is defined.
7817         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7818         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7819         is defined.
7821         PR rtl-optimization/83723
7822         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7823         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
7824         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
7825         recursive calls.
7826         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7827         callers.
7828         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7830 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
7832         PR rtl-optimization/81443
7833         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7834         from inner REGs to paradoxical SUBREGs.
7836 2018-02-16  Richard Biener  <rguenther@suse.de>
7838         PR tree-optimization/84399
7839         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7840         For operands we can analyze at their definition make sure we can
7841         analyze them at each use as well.
7843 2018-02-16  Richard Biener  <rguenther@suse.de>
7845         PR tree-optimization/84190
7846         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7847         volatile accesses if the decl isn't volatile.
7849 2018-02-15  Jason Merrill  <jason@redhat.com>
7851         PR c++/84314 - ICE with templates and fastcall attribute.
7852         * attribs.c (build_type_attribute_qual_variant): Don't clobber
7853         TYPE_CANONICAL on an existing type.
7855 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
7857         PR tree-optimization/84383
7858         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7859         dstoff nor call operand_equal_p if dstbase is NULL.
7861         PR tree-optimization/84334
7862         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7863         also a CONSTANT_CLASS_P, punt.
7865 2018-02-14  Jim Wilson  <jimw@sifive.com>
7867         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7868         first SMALL_OPERAND check.  New local min_second_step.  Move assert
7869         to where locals are set.  Add TARGET_RVC support.
7870         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7872 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
7874         * doc/invoke.texi: Correct -Wformat-overflow code sample.
7876 2018-02-14  Martin Sebor  <msebor@redhat.com>
7878         PR tree-optimization/83698
7879         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7880         arrays constrain the offset range to their bounds.
7881         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7882         (builtin_access::overlap): Avoid setting the size of overlap if it's
7883         already been set.
7884         (maybe_diag_overlap): Also consider arrays when deciding what values
7885         of offsets to include in diagnostics.
7887 2018-02-14  Martin Sebor  <msebor@redhat.com>
7889         PR c/84108
7890         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7891         that correspond to the kind of a declaration.
7893 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
7895         PR target/83984
7896         * config/pa/pa.md: Load address of PIC label using the linkage table
7897         if the label is nonlocal.
7899 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7901         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7902         warning message if user requests -maltivec=be.
7903         * doc/invoke.texi: Document deprecation of -maltivec=be.
7905 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
7907         PR target/84220
7908         * config/rs6000/rs6000-c.c: Update definitions for
7909         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7910         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7912 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7914         PR target/84239
7915         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7916         add _get_ssp intrinsics. Remove argument from
7917         __builtin_ia32_rdssp[d|q].
7918         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7919         * config/i386/i386-builtin.def: Remove argument from
7920         __builtin_ia32_rdssp[d|q].
7921         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7922         ix86_expand_special_args_builtin for _rdssp[d|q].
7923         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7924         Clear register before usage.
7925         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7926         Add documentation for new _get_ssp and _inc_ssp intrinsics.
7928 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
7930         PR tree-optimization/84357
7931         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7932         operand 1 of an ARRAY_REF too.
7934 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
7936         PR target/83831
7937         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7938         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7939         declarations.
7940         (set_of_reg): New struct.
7941         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7942         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7943         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7944         functions.
7945         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7946         Split into bitclr, bitset, bitinvert patterns if appropriate.
7947         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7948         use rx_fuse_in_memory_bitop.
7949         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7950         to named insn, correct maximum insn length.
7952 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
7954         PR target/79242
7955         * machmode.def: Define a complex mode for PARTIAL_INT.
7956         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7957         MODE_PARTIAL_INT.
7958         * doc/rtl.texi: Document CSPImode.
7959         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7960         handling.
7961         (msp430_hard_regno_nregs_with_padding): Likewise.
7963 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
7965         PR target/84279
7966         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7968 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
7970         PR rtl-optimization/84169
7971         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
7972         we generated a parallel as new i3 and we split that to new i2 and i3
7973         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
7974         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
7975         those to i2, not i1.  Partially rewrite this scan code.
7977 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
7979         PR c/82210
7980         * stor-layout.c (place_field): For variable length fields, adjust
7981         offset_align afterwards not just based on the field's alignment,
7982         but also on the size.
7984         PR middle-end/84309
7985         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7986         of exps and logs in the use_exp2 case.
7988 2018-02-13  Jeff Law  <law@redhat.com>
7990         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7991         entry for "vector".
7993         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7994         ARGS as unused.
7996 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
7998         PR debug/84342
7999         PR debug/84319
8000         * common.opt (gas-loc-support, gas-locview-support): New.
8001         (ginline-points, ginternal-reset-location-views): New.
8002         * doc/invoke.texi: Document them.  Use @itemx where intended.
8003         (gvariable-location-views): Adjust.
8004         * target.def (reset_location_view): New.
8005         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
8006         (TARGET_RESET_LOCATION_VIEW): New.
8007         * doc/tm.texi: Rebuilt.
8008         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
8009         (dwarf2out_default_as_locview_support): New.
8010         (output_asm_line_debug_info): Use option variables.
8011         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
8012         (output_loc_list): Likewise.
8013         (add_high_low_attributes): Check option variables.
8014         Don't output entry view attribute in strict mode.
8015         (gen_inlined_subroutine_die): Check option variables.
8016         (dwarf2out_inline_entry): Likewise.
8017         (init_sections_and_labels): Likewise.
8018         (dwarf2out_early_finish): Likewise.
8019         (maybe_reset_location_view): New, from...
8020         (dwarf2out_var_location): ... here.  Call it.
8021         * debug.h (dwarf2out_default_as_loc_support): Declare.
8022         (dwarf2out_default_as_locview_support): Declare.
8023         * hooks.c (hook_int_rtx_insn_0): New.
8024         * hooks.h (hook_int_rtx_insn_0): Declare.
8025         * toplev.c (process_options): Take -gas-loc-support and
8026         -gas-locview-support from dwarf2out.  Enable
8027         -gvariable-location-views by default only with locview
8028         assembler support.  Enable -ginternal-reset-location-views by
8029         default only if the target defines the corresponding hook.
8030         Enable -ginline-points by default if location views are
8031         enabled; force it disabled if statement frontiers are
8032         disabled.
8033         * tree-inline.c (expand_call_inline): Check option variables.
8034         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
8036 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
8038         PR tree-optimization/84321
8039         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
8040         handling.  Also check whether the anti-range contains any values
8041         that satisfy the mask; switch to a VR_RANGE if not.
8043 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
8045         PR sanitizer/84340
8046         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
8048 2018-02-13  Martin Jambor  <mjambor@suse.cz>
8050         PR c++/83990
8051         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
8052         of call statements, also set location of a load to a temporary.
8054 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
8056         * config/rl78/rl78.c (add_vector_labels): New function.
8057         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
8058         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
8059         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
8060         which checks that no arguments are passed.
8061         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
8062         * doc/extend.texi: Documentation for the new attribute.
8064 2018-02-13  Andreas Schwab  <schwab@suse.de>
8066         * config/riscv/linux.h (CPP_SPEC): Define.
8068 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
8070         PR target/84335
8071         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
8072         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
8073         OPTION_MASK_ISA_AES as first argument to def_builtin_const
8074         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
8075         instead of OPTION_MASK_ISA_PCLMUL as first argument to
8076         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
8077         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
8078         temporarily for AES and PCLMUL builtins.
8080         PR tree-optimization/84339
8081         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
8082         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
8083         Formatting fixes.
8085         PR middle-end/84309
8086         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
8087         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
8088         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
8089         inline function.
8090         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
8091         inline function.
8092         * omp-simd-clone.h: New file.
8093         * omp-simd-clone.c: Include omp-simd-clone.h.
8094         (expand_simd_clones): No longer static.
8095         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
8096         cgraph.h and omp-simd-clone.h.
8097         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
8098         (vect_recog_widen_shift_pattern): Formatting fix.
8099         (vect_pattern_recog_1): Don't check optab for calls.
8101         PR target/84336
8102         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
8103         operands[2] into a REG before using gen_lowpart on it.
8105 2018-02-12  Jeff Law  <law@redhat.com>
8107         PR target/83760
8108         * config/sh/sh.c (find_barrier): Consider a sibling call
8109         a barrier as well.
8111         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
8112         successfully back substituting a reg.
8114 2018-02-12  Richard Biener  <rguenther@suse.de>
8116         PR tree-optimization/84037
8117         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
8118         parameter, move visited init to caller.
8119         (vect_slp_analyze_operations): Separate cost from validity
8120         check, initialize visited once for all instances.
8121         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
8122         for all instances.
8123         * tree-vect-stmts.c (vect_model_simple_cost): Make early
8124         out an assert.
8125         (vect_model_promotion_demotion_cost): Likewise.
8126         (vectorizable_bswap): Guard cost modeling with !slp_node
8127         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
8128         SLP stmts.
8129         (vectorizable_call): Likewise.
8130         (vectorizable_conversion): Likewise.
8131         (vectorizable_assignment): Likewise.
8132         (vectorizable_shift): Likewise.
8133         (vectorizable_operation): Likewise.
8134         (vectorizable_store): Likewise.
8135         (vectorizable_load): Likewise.
8136         (vectorizable_condition): Likewise.
8137         (vectorizable_comparison): Likewise.
8139 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
8141         PR sanitizer/84307
8142         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
8143         (ASAN_MARK): Fix fnspec to account for return value, change pointer
8144         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
8146 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8148         PR middle-end/83665
8149         * params.def (inline-min-speedup): Increase from 8 to 15.
8150         (max-inline-insns-auto): Decrease from 40 to 30.
8151         * ipa-split.c (consider_split): Add some buffer for function to
8152         be considered inlining candidate.
8153         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
8154         default values.
8156 2018-02-12  Richard Biener  <rguenther@suse.de>
8158         PR tree-optimization/84037
8159         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
8160         matched stmts if we cannot swap the non-matched ones.
8162 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
8164         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
8165         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
8166         _mm_maskz_scalef_round_ss): New intrinsics.
8167         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
8168         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
8169         __builtin_ia32_scalefss_round): Remove.
8170         (__builtin_ia32_scalefsd_mask_round,
8171         __builtin_ia32_scalefss_mask_round): New intrinsics.
8172         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
8173         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
8174         ((match_operand:VF_128 2 "<round_nimm_predicate>"
8175         "<round_constraint>")): Changed to ...
8176         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
8177         "<round_scalar_constraint>")): ... this.
8178         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
8179         %0, %1, %2<round_op3>}"): Changed to ...
8180         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
8181         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
8182         %2<round_scalar_mask_op3>}"): ... this.
8183         * config/i386/subst.md (round_scalar_nimm_predicate): New.
8185 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
8187         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
8188         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
8189         (_mm_maskz_sqrt_round_ss): New intrinsics.
8190         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
8191         (__builtin_ia32_sqrtsd_mask_round)
8192         (__builtin_ia32_sqrtss_mask_round): New builtins.
8193         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
8194         (__builtin_ia32_sqrtss_round): Remove.
8195         (__builtin_ia32_sqrtsd_mask_round)
8196         (__builtin_ia32_sqrtss_mask_round): New builtins.
8197         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
8198         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
8199         ((match_operand:VF_128 1 "vector_operand"
8200         "xBm,<round_constraint>")): Changed to ...
8201         ((match_operand:VF_128 1 "vector_operand"
8202         "xBm,<round_scalar_constraint>")): ... this.
8203         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
8204         %0, %2, %<iptr>1<round_op3>}): Changed to ...
8205         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
8206         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
8207         %<iptr>1<round_scalar_mask_op3>}): ... this.
8208         ((set_attr "prefix" "<round_prefix>")): Changed to ...
8209         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
8211 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
8213         PR target/84266
8214         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
8215         Cast vec_cmpeq result to correct type.
8216         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
8217         Cast vec_cmpgt result to correct type.
8219 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
8221         * final.c (final_scan_insn_1): Renamed from...
8222         (final_scan_insn): ... this.  New wrapper, to recover
8223         seen from the outermost call in recursive ones.
8224         * config/sparc/sparc.c (output_return): Drop seen from call.
8225         (output_sibcall): Likewise.
8226         * config/visium/visium.c (output_branch): Likewise.
8228 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
8230         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
8231         function label.
8233 2018-02-10  Alan Modra  <amodra@gmail.com>
8235         PR target/84300
8236         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
8237         Specify LR as an input.
8239 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
8241         PR sanitizer/83987
8242         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
8243         remove_member_access_dummy_vars): New functions.
8244         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
8245         lower_omp_1, execute_lower_omp): Use them.
8247         PR rtl-optimization/84308
8248         * shrink-wrap.c (spread_components): Release todo vector.
8250 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
8252         PR rtl-optimization/57193
8253         * ira-color.c (struct allocno_color_data): Add member
8254         conflict_allocno_hard_prefs.
8255         (update_conflict_allocno_hard_prefs): New.
8256         (bucket_allocno_compare_func): Add a preference based on
8257         conflict_allocno_hard_prefs.
8258         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
8259         (color_allocnos): Remove a dead code.  Initiate
8260         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
8262 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8264         PR target/84226
8265         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
8266         constraint from =wa to wa.  Avoid a subreg on the output operand,
8267         instead use a pseudo and subreg it in a move.
8268         (p9_xxbrd_<mode>): Changed to ...
8269         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
8270         (p9_xxbrd_v2df): New expander.
8271         (p9_xxbrw_<mode>): Changed to ...
8272         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
8273         (p9_xxbrw_v4sf): New expander.
8275 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8277         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
8279 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
8281         PR target/83926
8282         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
8283         multiply in 32-bit mode.
8284         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
8285         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
8286         mode.
8288 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
8290         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
8291         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
8292         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
8293         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
8295 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
8297         PR lto/84213
8298         * dwarf2out.c (is_trivial_indirect_ref): New function.
8299         (dwarf2out_late_global_decl): Do not generate a location
8300         attribute for variables that have a non-trivial DECL_VALUE_EXPR
8301         and that are not defined in the current unit.
8303 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8305         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
8306         instead of a libcall for UNORDERED.
8308 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
8310         PR target/82641
8311         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
8312         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
8314 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8316         PR target/PR84295
8317         * config/s390/s390.c (s390_set_current_function): Invoke
8318         s390_indirect_branch_settings also if fndecl didn't change.
8320 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8322         * config/rs6000/rs6000.md (blockage): Set length to zero.
8324 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
8326         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
8328 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
8330         PR sanitizer/84285
8331         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
8332         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
8333         -static-lib*san.
8335         PR debug/84252
8336         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
8337         PARALLEL incoming that failed vt_get_decl_and_offset check.
8339         PR middle-end/84237
8340         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
8341         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
8342         TREE_READONLY bit.
8343         (get_variable_section): For decls in named .bss* sections pass true as
8344         second argument to bss_initializer_p.
8346 2018-02-09  Marek Polacek  <polacek@redhat.com>
8347             Jakub Jelinek  <jakub@redhat.com>
8349         PR c++/83659
8350         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
8351         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
8352         Sync some changes from cxx_fold_indirect_ref.
8354 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
8356         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
8357         markers.
8358         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
8359         (BLOCK_INLINE_ENTRY_LABEL): New.
8360         (dwarf2out_var_location): Disregard inline entry markers.
8361         (inline_entry_data): New struct.
8362         (inline_entry_data_hasher): New hashtable type.
8363         (inline_entry_data_hasher::hash): New.
8364         (inline_entry_data_hasher::equal): New.
8365         (inline_entry_data_table): New variable.
8366         (add_high_low_attributes): Add DW_AT_entry_pc and
8367         DW_AT_GNU_entry_view attributes if a pending entry is found
8368         in inline_entry_data_table.  Add old entry_pc attribute only
8369         if debug nonbinding markers are disabled.
8370         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
8371         markers are enabled.
8372         (block_within_block_p, dwarf2out_inline_entry): New.
8373         (dwarf2out_finish): Check that no entries remained in
8374         inline_entry_data_table.
8375         * final.c (reemit_insn_block_notes): Handle inline entry notes.
8376         (final_scan_insn, notice_source_line): Likewise.
8377         (rest_of_clean_state): Skip inline entry markers.
8378         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
8379         markers.
8380         * gimple.c (gimple_build_debug_inline_entry): New.
8381         * gimple.h (enum gimple_debug_subcode): Add
8382         GIMPLE_DEBUG_INLINE_ENTRY.
8383         (gimple_build_debug_inline_entry): Declare.
8384         (gimple_debug_inline_entry_p): New.
8385         (gimple_debug_nonbind_marker_p): Adjust.
8386         * insn-notes.def (INLINE_ENTRY): New.
8387         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
8388         inline entry marker notes.
8389         (print_insn): Likewise.
8390         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
8391         (INSN_DEBUG_MARKER_KIND): Likewise.
8392         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
8393         * tree-inline.c (expand_call_inline): Build and insert
8394         debug_inline_entry stmt.
8395         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
8396         inline entry blocks early, if nonbind markers are enabled.
8397         (dump_scope_block): Dump fragment info.
8398         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
8399         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
8400         (gimple_build_debug_inline_entry): New.
8401         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
8402         Enable/disable inline entry points too.
8403         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
8404         (DEBUG_INSN): Describe inline entry markers.
8406         * common.opt (gvariable-location-views): New.
8407         (gvariable-location-views=incompat5): New.
8408         * config.in: Rebuilt.
8409         * configure: Rebuilt.
8410         * configure.ac: Test assembler for view support.
8411         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
8412         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
8413         * dwarf2out.c (var_loc_view): New typedef.
8414         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
8415         (dwarf2out_locviews_in_attribute): New.
8416         (dwarf2out_locviews_in_loclist): New.
8417         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
8418         (enum dw_line_info_opcode): Add LI_adv_address.
8419         (struct dw_line_info_table): Add view.
8420         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
8421         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
8422         (zero_view_p): New variable.
8423         (ZERO_VIEW_P): New macro.
8424         (output_asm_line_debug_info): New.
8425         (struct var_loc_node): Add view.
8426         (add_AT_view_list, AT_loc_list): New.
8427         (add_var_loc_to_decl): Add view param.  Test it against last.
8428         (new_loc_list): Add view params.  Record them.
8429         (AT_loc_list_ptr): Handle loc and view lists.
8430         (view_list_to_loc_list_val_node): New.
8431         (print_dw_val): Handle dw_val_class_view_list.
8432         (size_of_die): Likewise.
8433         (value_format): Likewise.
8434         (loc_list_has_views): New.
8435         (gen_llsym): Set vl_symbol too.
8436         (maybe_gen_llsym, skip_loc_list_entry): New.
8437         (dwarf2out_maybe_output_loclist_view_pair): New.
8438         (output_loc_list): Output view list or entries too.
8439         (output_view_list_offset): New.
8440         (output_die): Handle dw_val_class_view_list.
8441         (output_dwarf_version): New.
8442         (output_compilation_unit_header): Use it.
8443         (output_skeleton_debug_sections): Likewise.
8444         (output_rnglists, output_line_info): Likewise.
8445         (output_pubnames, output_aranges): Update version comments.
8446         (output_one_line_info_table): Output view numbers in asm comments.
8447         (dw_loc_list): Determine current endview, pass it to new_loc_list.
8448         Call maybe_gen_llsym.
8449         (loc_list_from_tree_1): Adjust.
8450         (add_AT_location_description): Create view list attribute if
8451         needed, check it's absent otherwise.
8452         (convert_cfa_to_fb_loc_list): Adjust.
8453         (maybe_emit_file): Call output_asm_line_debug_info for test.
8454         (dwarf2out_var_location): Reset views as needed.  Precompute
8455         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
8456         attribute.  Set view.
8457         (new_line_info_table): Reset next view.
8458         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
8459         (dwarf2out_source_line): Likewise.  Output view resets and labels to
8460         the assembler, or select appropriate line info opcodes.
8461         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
8462         (optimize_string_length): Catch it.  Adjust.
8463         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
8464         dw_val_class_view_list, and remove it if no longer needed.
8465         (hash_loc_list): Hash view numbers.
8466         (loc_list_hasher::equal): Compare them.
8467         (optimize_location_lists): Check whether a view list symbol is
8468         needed, and whether the locview attribute is present, and
8469         whether they match.  Remove the locview attribute if no longer
8470         needed.
8471         (index_location_lists): Call skip_loc_list_entry for test.
8472         (dwarf2out_finish): Call output_asm_line_debug_info for test.
8473         Use output_dwarf_version.
8474         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
8475         (struct dw_val_node): Add val_view_list.
8476         * final.c (SEEN_NEXT_VIEW): New.
8477         (set_next_view_needed): New.
8478         (clear_next_view_needed): New.
8479         (maybe_output_next_view): New.
8480         (final_start_function): Rename to...
8481         (final_start_function_1): ... this.  Take pointer to FIRST,
8482         add SEEN parameter.  Emit param bindings in the initial view.
8483         (final_start_function): Reintroduce SEEN-less interface.
8484         (final): Rename to...
8485         (final_1): ... this.  Take SEEN parameter.  Output final pending
8486         next view at the end.
8487         (final): Reintroduce seen-less interface.
8488         (final_scan_insn): Output pending next view before switching
8489         sections or ending a block.  Mark the next view as needed when
8490         outputting variable locations.  Notify debug backend of section
8491         changes, and of location view changes.
8492         (rest_of_handle_final): Adjust.
8493         * toplev.c (process_options): Autodetect value for debug variable
8494         location views option.  Warn on incompat5 without -gdwarf-5.
8495         * doc/invoke.texi (gvariable-location-views): New.
8496         (gvariable-location-views=incompat5): New.
8497         (gno-variable-location-views): New.
8499 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
8501         PR tree-optimization/84136
8502         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
8503         that the result of find_edge is non-NULL.
8505 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8507         PR target/83008
8508         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8509         storing integer register in SImode.  Fix cost of 256 and 512
8510         byte aligned SSE register store.
8512 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
8514         * config/i386/i386.c (ix86_multiplication_cost): Fix
8515         multiplication cost for TARGET_AVX512DQ.
8517 2018-02-08  Marek Polacek  <polacek@redhat.com>
8519         PR tree-optimization/84238
8520         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8521         get_range_strlen.
8523 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8525         PR tree-optimization/84265
8526         * tree-vect-stmts.c (vectorizable_store): Don't treat
8527         VMAT_CONTIGUOUS accesses as grouped.
8528         (vectorizable_load): Likewise.
8530 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8532         PR tree-optimization/81635
8533         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8534         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8535         (test_round_for_mask): New functions.
8536         (wide_int_cc_tests): Call test_round_for_mask.
8537         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8538         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8539         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8540         range returned by get_range_info.
8542 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
8544         PR ipa/81360
8545         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8546         * symtab.c: Include builtins.h
8547         (symtab_node::output_to_lto_symbol_table_p): Move here
8548         from lto-streamer-out.c:output_symbol_p.
8549         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8550         (output_symbol_p): Move all logic to symtab.c
8551         (produce_symtab): Update.
8553 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8555         * config/s390/s390-opts.h (enum indirect_branch): Define.
8556         * config/s390/s390-protos.h (s390_return_addr_from_memory)
8557         (s390_indirect_branch_via_thunk)
8558         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
8559         (enum s390_indirect_branch_type): Define.
8560         * config/s390/s390.c (struct s390_frame_layout, struct
8561         machine_function): Remove.
8562         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
8563         (indirect_branch_table_label_no, indirect_branch_table_name):
8564         Define variables.
8565         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
8566         (enum s390_indirect_branch_option): Define.
8567         (s390_return_addr_from_memory): New function.
8568         (s390_handle_string_attribute): New function.
8569         (s390_attribute_table): Add new attribute handler.
8570         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
8571         (s390_indirect_branch_via_thunk): New function.
8572         (s390_indirect_branch_via_inline_thunk): New function.
8573         (s390_function_ok_for_sibcall): When jumping via thunk disallow
8574         sibling call optimization for non z10 compiles.
8575         (s390_emit_call): Force indirect branch target to be a single
8576         register.  Add r1 clobber for non-z10 compiles.
8577         (s390_emit_epilogue): Emit return jump via return_use expander.
8578         (s390_reorg): Handle JUMP_INSNs as execute targets.
8579         (s390_option_override_internal): Perform validity checks for the
8580         new command line options.
8581         (s390_indirect_branch_attrvalue): New function.
8582         (s390_indirect_branch_settings): New function.
8583         (s390_set_current_function): Invoke s390_indirect_branch_settings.
8584         (s390_output_indirect_thunk_function):  New function.
8585         (s390_code_end): Implement target hook.
8586         (s390_case_values_threshold): Implement target hook.
8587         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
8588         macros.
8589         * config/s390/s390.h (struct s390_frame_layout)
8590         (struct machine_function): Move here from s390.c.
8591         (TARGET_INDIRECT_BRANCH_NOBP_RET)
8592         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
8593         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
8594         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
8595         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
8596         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
8597         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
8598         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
8599         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
8600         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
8601         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
8602         (mnemonic attribute): Add values which aren't recognized
8603         automatically.
8604         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
8605         pattern for branch conversion.  Fix mnemonic attribute.
8606         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
8607         indirect branch via thunk if requested.
8608         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
8609         ("*indirect_jump"): Disable for branch conversion using out of
8610         line thunks.
8611         ("indirect_jump_via_thunk<mode>_z10")
8612         ("indirect_jump_via_thunk<mode>")
8613         ("indirect_jump_via_inlinethunk<mode>_z10")
8614         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
8615         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
8616         ("casesi_jump_via_inlinethunk<mode>_z10")
8617         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
8618         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
8619         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8620         ("*indirect2_jump"): Disable for branch conversion.
8621         ("casesi_jump"): Turn into expander and expand patterns for branch
8622         conversion.
8623         ("return_use"): New expander.
8624         ("*return"): Emit return via thunk and rename it to ...
8625         ("*return<mode>"): ... this one.
8626         * config/s390/s390.opt: Add new options and and enum for the
8627         option values.
8629 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
8631         * lra-constraints.c (match_reload): Unconditionally use
8632         gen_lowpart_SUBREG, rather than selecting between that
8633         and equivalent gen_rtx_SUBREG code.
8635 2018-02-08  Richard Biener  <rguenther@suse.de>
8637         PR tree-optimization/84233
8638         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8639         changed flag instead of boguously re-using phi_inserted.
8641 2018-02-08  Martin Jambor  <mjambor@suse.cz>
8643         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8644         static local variables.
8646 2018-02-08  Richard Biener  <rguenther@suse.de>
8648         PR tree-optimization/84278
8649         * tree-vect-stmts.c (vectorizable_store): When looking for
8650         smaller vector types to perform grouped strided loads/stores
8651         make sure the mode is supported by the target.
8652         (vectorizable_load): Likewise.
8654 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8656         * config/aarch64/aarch64.c (aarch64_components_for_bb):
8657         Increase LDP/STP opportunities by adding adjacent callee-saves.
8659 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
8661         PR rtl-optimization/84068
8662         PR rtl-optimization/83459
8663         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8665 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
8667         PR tree-optimization/84224
8668         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8669         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8670         non-zero arguments.
8672 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
8674         PR target/84113
8675         * config/rs6000/altivec.md (*restore_world): Remove LR use.
8676         * config/rs6000/predicates.md (restore_world_operation): Adjust op
8677         count, remove one USE.
8679 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
8681         * doc/install.texi (Configuration): Document the
8682         --with-long-double-format={ibm,ieee} PowerPC configuration
8683         options.
8685         PR target/84154
8686         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8687         Convert from define_expand to be define_insn_and_split.  Rework
8688         float/double/_Float128 conversions to QI/HI/SImode to work with
8689         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
8690         conversions to QI/HImode types did a store and then a load to
8691         truncate the value.  For conversions to VSX registers, don't split
8692         the insn, instead emit the code directly.  Use the code iterator
8693         any_fix to combine signed and unsigned conversions.
8694         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8695         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8696         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8697         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8698         (fix_<mode>di2_hw): Likewise.
8699         (fixuns_<mode>di2_hw): Likewise.
8700         (fix_<mode>si2_hw): Likewise.
8701         (fixuns_<mode>si2_hw): Likewise.
8702         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8703         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8704         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8705         fix<uns>_trunc<SFDF:mode>si2_p8.
8706         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8707         used.
8708         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8709         (fix<uns>_<mode>_mem): Likewise.
8710         (fctiw<u>z_<mode>_mem): Likewise.
8711         (fix<uns>_<mode>_mem): Likewise.
8712         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8713         the register allocator from doing a direct move to the GPRs to do
8714         a store, and instead use the ISA 3.0 store byte/half-word from
8715         vector register instruction.  For IEEE 128-bit floating point,
8716         also optimize stores of 32-bit ints.
8717         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8719 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
8721         * genextract.c (push_pathstr_operand): New function to support
8722         [a-zA-Z].
8723         (walk_rtx): Call push_pathstr_operand.
8724         (print_path): Support [a-zA-Z].
8726 2018-02-07  Richard Biener  <rguenther@suse.de>
8728         PR tree-optimization/84037
8729         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8730         (cse_and_gimplify_to_preheader): Declare.
8731         (vect_get_place_in_interleaving_chain): Likewise.
8732         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8733         ivexpr_map.
8734         (_loop_vec_info::~_loop_vec_info): Delete it.
8735         (cse_and_gimplify_to_preheader): New function.
8736         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8737         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8738         (vectorizable_load): Likewise.  For grouped stores always base
8739         the IV on the first element.
8740         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8741         condition before gimplifying.
8743 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8745         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8746         *DIV_EXPR and *MOD_EXPR.
8748 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
8750         PR target/84248
8751         * config/i386/i386.c (ix86_option_override_internal): Mask out
8752         the CF_SET bit when checking -fcf-protection.
8754 2018-02-07  Tom de Vries  <tom@codesourcery.com>
8756         PR libgomp/84217
8757         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8758         enough.
8760 2018-02-07  Richard Biener  <rguenther@suse.de>
8762         PR tree-optimization/84204
8763         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8764         this place.
8766         PR tree-optimization/84205
8767         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8768         special-case isl_ast_op_zdiv_r.
8770         PR tree-optimization/84223
8771         * graphite-scop-detection.c (gather_bbs::before_dom_children):
8772         Only add conditions from within the region.
8773         (gather_bbs::after_dom_children): Adjust.
8775 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
8777         PR target/84209
8778         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8779         * config/avr/avr.md: Only post-reload split REG-REG moves if
8780         either register is GENERAL_REG_P.
8782 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
8784         PR tree-optimization/84235
8785         * tree-ssa-scopedtables.c
8786         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8787         if the subtraction is performed in floating point type where NaNs are
8788         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8789         build 1.  Formatting fix.
8791 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
8793         PR target/84146
8794         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8795         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8796         and skip it regardless of bb boundaries.  Use CALL_P macro,
8797         don't test INSN_P (insn) together with CALL_P or JUMP_P check
8798         unnecessarily, formatting fix.
8800 2018-02-06  Michael Collison  <michael.collison@arm.com>
8802         * config/arm/thumb2.md:
8803         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8804         (*thumb_mov_notscc): Ditto.
8806 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8808         PR target/84154
8809         * config/rs6000/rs6000.md (su code attribute): Use "u" for
8810         unsigned_fix, not "s".
8812 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8814         * configure.ac (gcc_fn_eh_frame_ro): New function.
8815         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8816         correct .eh_frame permissions.
8817         * configure: Regenerate.
8819 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
8821         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8822         irrelevant options.
8824 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8826         * config/rs6000/rs6000.c (rs6000_option_override_internal):
8827         Display warning message for -mno-speculate-indirect-jumps.
8829 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
8831         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8832         Undocumented.
8833         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8835 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
8837         PR tree-optimization/84225
8838         * tree-eh.c (find_trapping_overflow): Only call
8839         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8841 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8843         PR target/84145
8844         * config/i386/i386.c: Reimplement the check of possible options
8845         -mibt/-mshstk conbination. Change error messages.
8846         * doc/invoke.texi: Fix a typo: remove extra '='.
8848 2018-02-06  Marek Polacek  <polacek@redhat.com>
8850         PR tree-optimization/84228
8851         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8853 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
8855         PR target/82641
8856         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8857         emitted arch directives.
8858         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8859         __ARM_FEATURE_COPROC before changing architectures.
8861 2018-02-06  Richard Biener  <rguenther@suse.de>
8863         * config/i386/i386.c (print_reg): Fix typo.
8864         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8866 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
8868         * configure: Regenerate.
8870 2018-02-05  Martin Sebor  <msebor@redhat.com>
8872         PR tree-optimization/83369
8873         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8874         inlining context.
8876 2018-02-05  Martin Liska  <mliska@suse.cz>
8878         * doc/invoke.texi: Cherry-pick upstream r323995.
8880 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
8882         * ira.c (ira_init_register_move_cost): Adjust comment.
8884 2018-02-05  Martin Liska  <mliska@suse.cz>
8886         PR gcov-profile/84137
8887         * doc/gcov.texi: Fix typo in documentation.
8889 2018-02-05  Martin Liska  <mliska@suse.cz>
8891         PR gcov-profile/83879
8892         * doc/gcov.texi: Document necessity of --dynamic-list-data when
8893         using dlopen functionality.
8895 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
8897         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8898         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8899         _mm_maskz_range_ss, _mm_mask_range_round_ss,
8900         _mm_maskz_range_round_ss): New intrinsics.
8901         (__builtin_ia32_rangesd128_round)
8902         (__builtin_ia32_rangess128_round): Remove.
8903         (__builtin_ia32_rangesd128_mask_round,
8904         __builtin_ia32_rangess128_mask_round): New builtins.
8905         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8906         __builtin_ia32_rangess128_round): Remove.
8907         (__builtin_ia32_rangesd128_mask_round,
8908         __builtin_ia32_rangess128_mask_round): New builtins.
8909         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8910         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8911         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8912         "<round_saeonly_constraint>")): Changed to ...
8913         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8914         "<round_saeonly_scalar_constraint>")): ... this.
8915         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8916         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8917         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8918         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8919         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8921 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
8923         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8924         options.
8925         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8926         Remove all values except native, 8540 and 8548.
8928 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
8930         * config/i386/i386.c (ix86_output_function_return): Pass
8931         INVALID_REGNUM, instead of -1, as invalid register number to
8932         indirect_thunk_name and output_indirect_thunk.
8934 2018-02-02  Julia Koval  <julia.koval@intel.com>
8936         * config.gcc: Add -march=icelake.
8937         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8938         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8939         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8940         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8941         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8942         (processor_target_table): Add icelake.
8943         (ix86_option_override_internal): Handle new PTAs.
8944         (get_builtin_code_for_version): Handle icelake.
8945         (M_INTEL_COREI7_ICELAKE): New.
8946         (fold_builtin_cpu): Handle icelake.
8947         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8948         * doc/invoke.texi: Add -march=icelake.
8950 2018-02-02  Julia Koval  <julia.koval@intel.com>
8952         * config/i386/i386.c (ix86_option_override_internal): Change flags type
8953         to wide_int_bitmask.
8954         * wide-int-bitmask.h: New.
8956 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8958         PR target/84066
8959         * config/i386/i386.md: Replace Pmode with word_mode in
8960         builtin_setjmp_setup and builtin_longjmp to support x32.
8962 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
8964         PR target/56010
8965         PR target/83743
8966         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8967         #include "opts.h".
8968         (rs6000_supported_cpu_names): New static variable.
8969         (linux_cpu_translation_table): Likewise.
8970         (elf_platform) <cpu>: Define new static variable and use it.
8971         Translate kernel AT_PLATFORM name to canonical name if needed.
8972         Error if platform name is unknown.
8974 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
8976         PR target/84089
8977         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8979 2018-02-01  Jeff Law  <law@redhat.com>
8981         PR target/84128
8982         * config/i386/i386.c (release_scratch_register_on_entry): Add new
8983         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
8984         the scratch if RELEASE_VIA_POP is false.
8985         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8986         If we have to save a temporary register, decrement SIZE appropriately.
8987         Pass new arguments to release_scratch_register_on_entry.
8988         (ix86_adjust_stack_and_probe): Likewise.
8989         (ix86_emit_probe_stack_range): Pass new arguments to
8990         release_scratch_register_on_entry.
8992 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
8994         PR rtl-optimization/84157
8995         * combine.c (change_zero_ext): Use REG_P predicate in
8996         front of HARD_REGISTER_P predicate.
8998 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
9000         * config/avr/avr.c (avr_option_override): Move disabling of
9001         -fdelete-null-pointer-checks to...
9002         * common/config/avr/avr-common.c (avr_option_optimization_table):
9003         ...here.
9005 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9007         PR tree-optimization/81635
9008         * tree-data-ref.c (split_constant_offset_1): For types that
9009         wrap on overflow, try to use range info to prove that wrapping
9010         cannot occur.
9012 2018-02-01  Renlin Li  <renlin.li@arm.com>
9014         PR target/83370
9015         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
9016         TAILCALL_ADDR_REGS.
9017         (aarch64_register_move_cost): Likewise.
9018         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
9019         TAILCALL_ADDR_REGS.
9020         (REG_CLASS_NAMES): Likewise.
9021         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
9022         TAILCALL_ADDR_REGS. Remove IP registers.
9023         * config/aarch64/aarch64.md (Ucs): Update register constraint.
9025 2018-02-01  Richard Biener  <rguenther@suse.de>
9027         * domwalk.h (dom_walker::dom_walker): Add additional constructor
9028         for specifying RPO order and allow NULL for that.
9029         * domwalk.c (dom_walker::dom_walker): Likewise.
9030         (dom_walker::walk): Handle NULL RPO order.
9031         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
9032         in RPO order.
9033         (rewrite_update_dom_walker): Likewise.
9034         (mark_def_dom_walker): Likewise.
9036 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9038         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
9039         (aarch64_maybe_expand_sve_subreg_move): Declare.
9040         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
9041         * config/aarch64/predicates.md (aarch64_any_register_operand): New
9042         predicate.
9043         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
9044         that are semantically a reverse operation.
9045         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
9046         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
9047         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
9048         functions.
9049         (aarch64_can_change_mode_class): For big-endian, forbid changes
9050         between two SVE modes if they have different element sizes.
9052 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9054         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
9055         the TImode handling for big-endian targets.
9057 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9059         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
9060         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
9061         not just bytes.
9062         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
9063         Remove BSWAP handing for big-endian targets and use the form of
9064         LD1RQ appropariate for the mode.
9066 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9068         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
9069         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
9070         duplicated element.
9072 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
9074         PR tearget/83845
9075         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
9076         check for operands that need to go through aarch64_sve_reload_be.
9078 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
9080         PR tree-optimization/81661
9081         PR tree-optimization/84117
9082         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
9083         * tree-eh.c: Include gimplify.h.
9084         (find_trapping_overflow, replace_trapping_overflow,
9085         rewrite_to_non_trapping_overflow): New functions.
9086         * tree-vect-loop.c: Include tree-eh.h.
9087         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
9088         * tree-data-ref.c: Include tree-eh.h.
9089         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
9091 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
9093         PR rtl-optimization/84123
9094         * combine.c (change_zero_ext): Check if hard register satisfies
9095         can_change_dest_mode before calling gen_lowpart_SUBREG.
9097 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
9099         PR target/82444
9100         * ira.c (ira_init_register_move_cost): Remove assert.
9102 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
9104         PR rtl-optimization/84071
9105         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
9106         * doc/tm.texi: Regenerate.
9108 2018-01-31  Richard Biener  <rguenther@suse.de>
9110         PR tree-optimization/84132
9111         * tree-data-ref.c (analyze_miv_subscript): Properly
9112         check whether evolution_function_is_affine_multivariate_p
9113         before calling gcd_of_steps_may_divide_p.
9115 2018-01-31  Julia Koval  <julia.koval@intel.com>
9117         PR target/83618
9118         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
9119         * config/i386/i386.md (rdpid_rex64) New.
9120         (rdpid): Make 32bit only.
9122 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
9124         PR lto/84105
9125         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
9126         an IDENTIFIER_NODE for FUNCTION_TYPE's.
9128 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
9130         Revert
9131         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
9133         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
9135 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
9137         PR rtl-optimization/84071
9138         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
9139         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
9141 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
9143         * config/arc/arc.c (arc_handle_aux_attribute): New function.
9144         (arc_attribute_table): Add 'aux' attribute.
9145         (arc_in_small_data_p): Consider aux like variables.
9146         (arc_is_aux_reg_p): New function.
9147         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
9148         (arc_get_aux_arg): New function.
9149         (prepare_move_operands): Handle aux-register access.
9150         (arc_handle_aux_attribute): New function.
9151         * doc/extend.texi (ARC Variable attributes): Add subsection.
9153 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
9155         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
9156         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
9157         (arc_attribute_table): Add 'uncached' attribute.
9158         (arc_print_operand): Print '.di' flag for uncached memory
9159         accesses.
9160         (arc_in_small_data_p): Do not consider for small data the uncached
9161         types.
9162         (arc_is_uncached_mem_p): New function.
9163         * config/arc/predicates.md (compact_store_memory_operand): Check
9164         for uncached memory accesses.
9165         (nonvol_nonimm_operand): Likewise.
9166         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
9168 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
9170         PR c/84100
9171         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
9172         falign-loops=): Add Optimization flag.
9174 2018-01-30  Jeff Law  <law@redhat.com>
9176         PR target/84064
9177         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
9178         INT_REGISTERS_SAVED.  Check it prior to calling
9179         get_scratch_register_on_entry.
9180         (ix86_adjust_stack_and_probe): Similarly.
9181         (ix86_emit_probe_stack_range): Similarly.
9182         (ix86_expand_prologue): Corresponding changes.
9184 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9186         PR target/40411
9187         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
9188         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
9190 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
9192         PR target/84112
9193         * lra-constraints.c (curr_insn_transform): Process AND in the
9194         address.
9196 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
9198         PR rtl-optimization/83986
9199         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
9200         dependence against last_pending_memory_flush in addition to
9201         pending_jump_insns.
9203 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
9205         PR tree-optimization/81611
9206         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
9207         copies.
9209 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9211         PR target/83758
9212         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
9213         a reg rtx.
9215 2018-01-30  Richard Biener  <rguenther@suse.de>
9216             Jakub Jelinek  <jakub@redhat.com>
9218         PR tree-optimization/84111
9219         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
9220         inner loops added during recursion, as they don't have up-to-date
9221         SSA form.
9223 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
9225         PR ipa/81360
9226         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
9227         (can_inline_edge_by_limits_p): ... here.
9228         (can_early_inline_edge_p, check_callers,
9229         update_caller_keys, update_callee_keys, recursive_inlining,
9230         add_new_edges_to_heap, speculation_useful_p,
9231         inline_small_functions,
9232         inline_small_functions, flatten_function,
9233         inline_to_all_callers_1): Update.
9235 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
9237         * profile-count.c (profile_count::combine_with_ipa_count): Handle
9238         zeros correctly.
9240 2018-01-30  Richard Biener  <rguenther@suse.de>
9242         PR tree-optimization/83008
9243         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
9244         invariant and constant vector uses in stmts when they need
9245         more than one stmt.
9247 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9249         PR bootstrap/84017
9250         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
9251         * configure: Regenerate.
9253 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9255         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
9256         pattern.
9257         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
9258         Use gen_rtx_REG rather than gen_lowpart.
9260 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9262         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
9263         rather than 0 when creating partial subregs.
9265 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
9267         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
9268         of usage.
9270 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
9272         PR target/81550
9273         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
9274         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
9275         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
9276         flags.  This restores the settings used before the 2017-07-24.
9277         Turning off pre increment/decrement/modify allows IVOPTS to
9278         optimize DF/SF loops where the index is an int.
9280 2018-01-29  Richard Biener  <rguenther@suse.de>
9281             Kelvin Nilsen  <kelvin@gcc.gnu.org>
9283         PR bootstrap/80867
9284         * tree-vect-stmts.c (vectorizable_call): Don't call
9285         targetm.vectorize_builtin_md_vectorized_function if callee is
9286         NULL.
9288 2018-01-22  Carl Love  <cel@us.ibm.com>
9290         * doc/extend.tex: Fix typo in second arg in
9291         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
9293 2018-01-29  Richard Biener  <rguenther@suse.de>
9295         PR tree-optimization/84086
9296         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
9297         (flush_ssaname_freelist): When SSA names were released reset
9298         the SCEV hash table.
9300 2018-01-29  Richard Biener  <rguenther@suse.de>
9302         PR tree-optimization/84057
9303         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
9304         removed paths when removing edges.
9306 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
9308         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
9309         -mfunction-return=@var{choice}.
9311 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9313         PR diagnostic/84034
9314         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
9315         Handle CR like TAB.
9316         (layout::print_source_line): Likewise.
9317         (test_get_line_width_without_trailing_whitespace): Add test cases.
9319 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
9321         PR middle-end/84040
9322         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
9323         debug insns.
9325 2018-01-26  Jim Wilson  <jimw@sifive.com>
9327         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
9329         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
9330         specified.
9332 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9334         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
9335         and CMP + SUB-immediate -> SUBS.
9337 2018-01-26  Martin Sebor  <msebor@redhat.com>
9339         PR tree-optimization/83896
9340         * tree-ssa-strlen.c (get_string_len): Rename...
9341         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
9342         Avoid assuming length is constant.
9343         (handle_char_store): Use HOST_WIDE_INT for string length.
9345 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
9347         PR target/81763
9348         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
9349         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
9351 2018-01-26  Richard Biener  <rguenther@suse.de>
9353         PR rtl-optimization/84003
9354         * dse.c (record_store): Only record redundant stores when
9355         the earlier store aliases at least all accesses the later one does.
9357 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
9359         PR rtl-optimization/83985
9360         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
9361         REG_CFA_RESTORE insns.
9362         (delete_unmarked_insns): Don't ignore separate shrink wrapping
9363         REG_CFA_RESTORE insns here.
9365         PR c/83989
9366         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
9367         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
9369 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9371         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
9372         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
9373         (arc_init): Likewise.
9374         (arc_override_options): Likewise.
9375         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
9376         value.
9377         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
9378         support.
9379         * config/arc/arc.h (TARGET_DBNZ): Define.
9380         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
9381         properly set the tune attribute.
9382         (dbnz): Use TARGET_DBNZ guard.
9383         * config/arc/arc.opt (mtune): Add core3 option.
9385 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9387         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
9388         recognize new pic like addresses.
9389         (arc_delegitimize_address): Clean up.
9391 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9393         * config/arc/arc-arches.def: Option mrf16 valid for all
9394         architectures.
9395         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
9396         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
9397         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
9398         * config/arc/arc-tables.opt: Regenerate.
9399         * config/arc/arc.c (arc_conditional_register_usage): Handle
9400         reduced register file case.
9401         (arc_file_start): Set must have build attributes.
9402         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
9403         mrf16 option value.
9404         * config/arc/arc.opt (mrf16): Add new option.
9405         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
9406         * config/arc/genmultilib.awk: Handle new mrf16 option.
9407         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
9408         * config/arc/t-multilib: Regenerate.
9409         * doc/invoke.texi (ARC Options): Document mrf16 option.
9411 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9413         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
9414         * config/arc/arc.c (arc_handle_secure_attribute): New function.
9415         (arc_attribute_table): Add 'secure_call' attribute.
9416         (arc_print_operand): Print secure call operand.
9417         (arc_function_ok_for_sibcall): Don't optimize tail calls when
9418         secure.
9419         (arc_is_secure_call_p): New function.  * config/arc/arc.md
9420         (call_i): Add support for sjli instruction.
9421         (call_value_i): Likewise.
9422         * config/arc/constraints.md (Csc): New constraint.
9424 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
9425             John Eric Martin  <John.Martin@emmicro-us.com>
9427         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
9428         * config/arc/arc.c (_arc_jli_section): New struct.
9429         (arc_jli_section): New type.
9430         (rc_jli_sections): New static variable.
9431         (arc_handle_jli_attribute): New function.
9432         (arc_attribute_table): Add jli_always and jli_fixed attribute.
9433         (arc_file_end): New function.
9434         (TARGET_ASM_FILE_END): Define.
9435         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
9436         (arc_add_jli_section): New function.
9437         (jli_call_scan): Likewise.
9438         (arc_reorg): Call jli_call_scan.
9439         (arc_output_addsi): Remove 'S' from printing asm operand.
9440         (arc_is_jli_call_p): New function.
9441         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
9442         operand.
9443         (movhi_insn): Likewise.
9444         (movsi_insn): Likewise.
9445         (movsi_set_cc_insn): Likewise.
9446         (loadqi_update): Likewise.
9447         (load_zeroextendqisi_update): Likewise.
9448         (load_signextendqisi_update): Likewise.
9449         (loadhi_update): Likewise.
9450         (load_zeroextendhisi_update): Likewise.
9451         (load_signextendhisi_update): Likewise.
9452         (loadsi_update): Likewise.
9453         (loadsf_update): Likewise.
9454         (movsicc_insn): Likewise.
9455         (bset_insn): Likewise.
9456         (bxor_insn): Likewise.
9457         (bclr_insn): Likewise.
9458         (bmsk_insn): Likewise.
9459         (bicsi3_insn): Likewise.
9460         (cmpsi_cc_c_insn): Likewise.
9461         (movsi_ne): Likewise.
9462         (movsi_cond_exec): Likewise.
9463         (clrsbsi2): Likewise.
9464         (norm_f): Likewise.
9465         (normw): Likewise.
9466         (swap): Likewise.
9467         (divaw): Likewise.
9468         (flag): Likewise.
9469         (sr): Likewise.
9470         (kflag): Likewise.
9471         (ffs): Likewise.
9472         (ffs_f): Likewise.
9473         (fls): Likewise.
9474         (call_i): Remove 'S' asm letter, add jli instruction.
9475         (call_value_i): Likewise.
9476         * config/arc/arc.op (mjli-always): New option.
9477         * config/arc/constraints.md (Cji): New constraint.
9478         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
9479         operand.
9480         (subsf3_fpx): Likewise.
9481         (mulsf3_fpx): Likewise.
9482         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
9483         asm operand.
9484         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
9485         function attrbutes.
9486         * doc/invoke.texi (ARC): Document mjli-always option.
9488 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
9490         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
9491         avoid addition with 0 and use incw and decw where possible.
9493 2018-01-26  Richard Biener  <rguenther@suse.de>
9495         PR tree-optimization/81082
9496         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
9497         association if it requires casting to unsigned.
9498         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
9499         from fold_plusminus_mult_expr to catch important cases late when
9500         range info is available.
9502 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9504         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9505         * configure.ac (hidden_linkonce): New test.
9506         * configure: Regenerate.
9507         * config.in: Regenerate.
9509 2018-01-26  Julia Koval  <julia.koval@intel.com>
9511         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9512         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9513         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9514         _mm_mask_bitshuffle_epi64_mask): Fix type.
9515         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9516         USI_FTYPE_V4DI_V4DI_USI): Remove.
9517         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9518         __builtin_ia32_vpshufbitqmb256_mask,
9519         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9520         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9521         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9523 2018-01-26  Alan Modra  <amodra@gmail.com>
9525         PR target/84033
9526         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9527         UNSPEC_VBPERMQ.  Sort other unspecs.
9529 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
9531         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9533 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
9535         PR middle-end/83055
9536         * predict.c (drop_profile): Do not push/pop cfun; update also
9537         node->count.
9538         (handle_missing_profiles): Fix logic looking for zero profiles.
9540 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
9542         PR middle-end/83977
9543         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9544         on functions with #pragma omp declare simd or functions with simd
9545         attribute.
9546         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9547         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9548         Remove trailing \n from warning_at calls.
9550 2018-01-25  Tom de Vries  <tom@codesourcery.com>
9552         PR target/84028
9553         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9554         for neutered workers.
9556 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
9558         PR target/68467
9559         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
9560         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
9562 2018-01-24  Jeff Law  <law@redhat.com>
9564         PR target/83994
9565         * i386.c (get_probe_interval): Move to earlier point.
9566         (ix86_compute_frame_layout): If -fstack-clash-protection and
9567         the frame is larger than the probe interval, then use pushes
9568         to save registers rather than reg->mem moves.
9569         (ix86_expand_prologue): Remove conditional for int_registers_saved
9570         assertion.
9572 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
9574         PR target/84014
9575         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
9576         min/max for never referenced object.
9578 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
9580         PR middle-end/83977
9581         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
9582         here.
9583         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
9584         attributes from DECL_ATTRIBUTES (decl) without affecting
9585         DECL_ATTRIBUTES (current_function_decl).
9586         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
9587         functions with non-NULL DECL_ABSTRACT_ORIGIN.
9589 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
9591         PR tree-optimization/83979
9592         * fold-const.c (fold_comparison): Use constant_boolean_node
9593         instead of boolean_{true,false}_node.
9595 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
9597         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
9598         with zero counts.
9600 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9602         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9603         Simplify the clause that sets the length attribute.
9604         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9605         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
9606         clause that sets the length attribute.
9607         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9609 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9611         PR target/83589
9612         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
9613         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
9614         Add strict parameter.
9615         (prevent_branch_around_nothing): Insert dummy insn between branch to
9616         label and label with no ptx insn inbetween.
9617         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
9619 2018-01-24  Tom de Vries  <tom@codesourcery.com>
9621         PR target/81352
9622         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9623         for neutered threads in warp.
9624         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9626 2018-01-24  Richard Biener  <rguenther@suse.de>
9628         PR tree-optimization/83176
9629         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9630         operands.
9632 2018-01-24  Richard Biener  <rguenther@suse.de>
9634         PR tree-optimization/82819
9635         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9636         code generating pluses that are no-ops in the target precision.
9638 2018-01-24  Richard Biener  <rguenther@suse.de>
9640         PR middle-end/84000
9641         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9643 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9645         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9646         to merge probabilities.
9647         * predict.c (probably_never_executed): Also mark as cold functions
9648         with global 0 profile and guessed local profile.
9649         * profile-count.c (profile_probability::combine_with_count): New
9650         member function.
9651         * profile-count.h (profile_probability::operator*,
9652         profile_probability::operator*=, profile_probability::operator/,
9653         profile_probability::operator/=): Reduce precision to adjusted
9654         and set value to guessed on contradictory divisions.
9655         (profile_probability::combine_with_freq): Remove.
9656         (profile_probability::combine_wiht_count): Declare.
9657         (profile_count::force_nonzero):: Set to adjusted.
9658         (profile_count::probability_in):: Set quality to adjusted.
9659         * tree-ssa-tail-merge.c (replace_block_by): Use
9660         combine_with_count.
9662 2018-01-23  Andrew Waterman  <andrew@sifive.com>
9663             Jim Wilson  <jimw@sifive.com>
9665         * config/riscv/riscv.c (riscv_stack_boundary): New.
9666         (riscv_option_override): Set riscv_stack_boundary.  Handle
9667         riscv_preferred_stack_boundary_arg.
9668         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9669         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9670         (STACK_BOUNDARY): Set to riscv_stack_boundary.
9671         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9672         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9673         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9675 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
9677         PR target/83905
9678         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9679         of struct ix86_frame.
9680         (ix86_expand_epilogue): Likewise.  Add a local variable for
9681         the reg_save_offset field in struct ix86_frame.
9683 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
9685         PR tree-optimization/82604
9686         * tree-loop-distribution.c (enum partition_kind): New enum item
9687         PKIND_PARTIAL_MEMSET.
9688         (partition_builtin_p): Support above new enum item.
9689         (generate_code_for_partition): Ditto.
9690         (compute_access_range): Differentiate cases that equality can be
9691         proven at all loops, the innermost loops or no loops.
9692         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9693         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
9694         (finalize_partitions, distribute_loop): Don't fuse partition of
9695         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9696         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9697         parloop is enabled.
9699 2018-01-23  Martin Liska  <mliska@suse.cz>
9701         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9702         order to ignore the predictor.
9703         (PRED_POLYMORPHIC_CALL): Likewise.
9704         (PRED_RECURSIVE_CALL): Likewise.
9706 2018-01-23  Martin Liska  <mliska@suse.cz>
9708         * tree-profile.c (tree_profiling): Print function header to
9709         aware reader which function we are working on.
9710         * value-prof.c (gimple_find_values_to_profile): Do not print
9711         not interesting value histograms.
9713 2018-01-23  Martin Liska  <mliska@suse.cz>
9715         * profile-count.h (enum profile_quality): Add
9716         profile_uninitialized as the first value. Do not number values
9717         as they are zero based.
9718         (profile_count::verify): Update sanity check.
9719         (profile_probability::verify): Likewise.
9721 2018-01-23  Nathan Sidwell  <nathan@acm.org>
9723         * doc/invoke.texi (ffor-scope): Deprecate.
9725 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9727         PR tree-optimization/83510
9728         * domwalk.c (set_all_edges_as_executable): New function.
9729         (dom_walker::dom_walker): Convert bool param
9730         "skip_unreachable_blocks" to enum reachability.  Move setup of
9731         edge flags to set_all_edges_as_executable and only do it when
9732         reachability is REACHABLE_BLOCKS.
9733         * domwalk.h (enum dom_walker::reachability): New enum.
9734         (dom_walker::dom_walker): Convert bool param
9735         "skip_unreachable_blocks" to enum reachability.
9736         (set_all_edges_as_executable): New decl.
9737         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
9738         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9739         "reachability".
9740         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9741         but converting true to REACHABLE_BLOCKS.
9742         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9743         * tree-vrp.c
9744         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9745         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9746         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9747         REACHABLE_BLOCKS.
9748         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9749         if check_all_array_refs will be called.
9751 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9753         * tree.c (selftest::test_location_wrappers): Add more test
9754         coverage.
9756 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
9758         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9759         (selftest::test_bit_in_range): Likewise.
9761 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9763         PR testsuite/83888
9764         * doc/sourcebuild.texi (vect_float): Say that the selector
9765         only describes the situation when -funsafe-math-optimizations is on.
9766         (vect_float_strict): Document.
9768 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
9770         PR tree-optimization/83965
9771         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9772         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9773         instead of checking only for a reduction.
9774         (vect_recog_widen_sum_pattern): Likewise.
9776 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9778         * predict.c (probably_never_executed): Only use precise profile info.
9779         (compute_function_frequency): Skip after inlining hack since we now
9780         have quality checking.
9782 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
9784         * profile-count.h (profile_probability::very_unlikely,
9785         profile_probability::unlikely, profile_probability::even): Set
9786         precision to guessed.
9788 2018-01-23  Richard Biener  <rguenther@suse.de>
9790         PR tree-optimization/83963
9791         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9792         Properly terminate dominator walk when crossing the exit edge not
9793         when visiting its source block.
9795 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
9797         PR c++/83918
9798         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9799         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9801 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
9803         PR tree-optimization/83957
9804         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
9805         semicolon after for body surrounded by braces.
9807         PR tree-optimization/83081
9808         * profile-count.h (profile_probability::split): New method.
9809         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9810         Use profile_probability::split.
9811         (do_compare_rtx_and_jump): Fix adjustment of probabilities
9812         when splitting a single conditional jump into 2.
9814 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
9816         PR tree-optimization/69452
9817         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9818         decl.
9820 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9822         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9823         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9824         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9826 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9828         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9829         * config/rl78/rl78.md (movdi): New define_expand.
9830         * config/rl78/rl78.c (rl78_split_movdi): New function.
9832 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
9834         PR target/83862
9835         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9836         no longer used.
9837         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9838         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9839         128-bit to produce an UNSPEC move to get the double word with the
9840         signbit and then a shift directly to do signbit.
9841         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9842         implementation with a new version that just does either a direct
9843         move or a regular move.  Move memory interface to separate insns.
9844         Move insns so they are next to the expander.
9845         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9846         with signbit move.  Split big and little endian case.
9847         (signbit<mode>2_dm_mem_le): Likewise.
9848         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9849         (signbit<mode>2_dm2): Likewise.
9851 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9853         * config/rl78/rl78.md (anddi3): New define_expand.
9855 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9857         * config/rl78/rl78.md (umindi3): New define_expand.
9859 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9861         * config/rl78/rl78.md (smindi3): New define_expand.
9863 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9865         * config/rl78/rl78.md (smaxdi3): New define_expand.
9867 2018-01-22  Carl Love  <cel@us.ibm.com>
9869         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9870         LVX_V1TI): Add macro expansion.
9871         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9872         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9873         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9874         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9875         Change check to determine if the instruction is a byte reversing
9876         entry.  Fix typo in comment.
9877         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9878         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9879         Add def_builtin calls for new builtins.
9880         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9881         Add define_insn expansion.
9883 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9885         * config/rl78/rl78.md (umaxdi3): New define_expand.
9887 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
9889         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9890         for non-QImode registers.
9892 2018-01-22  Richard Biener  <rguenther@suse.de>
9894         PR tree-optimization/83963
9895         * graphite-scop-detection.c (scop_detection::get_sese): Delay
9896         including the loop exit block.
9897         (scop_detection::merge_sese): Likewise.
9898         (scop_detection::add_scop): Do it here instead.
9900 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9902         * doc/sourcebuild.texi (arm_softfloat): Document.
9904 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
9906         PR gcc/77734
9907         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9908         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9909         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9911 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9912             David Edelsohn  <dje.gcc@gmail.com>
9914         PR target/83946
9915         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9916         Change "crset eq" to "crset 2".
9917         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9918         (*call_indirect_aix<mode>_nospec): Likewise.
9919         (*call_value_indirect_aix<mode>_nospec): Likewise.
9920         (*call_indirect_elfv2<mode>_nospec): Likewise.
9921         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9922         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9923         change assembly output from . to $.
9924         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9925         (indirect_jump<mode>_nospec): Change assembly output from . to $.
9926         (*tablejump<mode>_internal1_nospec): Likewise.
9928 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
9930         PR target/80870
9931         * config/sh/sh_optimize_sett_clrt.cc:
9932         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9934 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
9936         PR tree-optimization/83940
9937         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9938         offset_dt to vect_constant_def rather than vect_unknown_def_type.
9939         (vect_check_load_store_mask): Add a mask_dt_out parameter and
9940         use it to pass back the definition type.
9941         (vect_check_store_rhs): Likewise rhs_dt_out.
9942         (vect_build_gather_load_calls): Add a mask_dt argument and use
9943         it instead of a call to vect_is_simple_use.
9944         (vectorizable_store): Update calls to vect_check_load_store_mask
9945         and vect_check_store_rhs.  Use the dt returned by the latter instead
9946         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
9947         instead of calls to vect_is_simple_use.  Pass the scalar rather
9948         than the vector operand to vect_is_simple_use when handling
9949         second and subsequent copies of an rhs value.
9950         (vectorizable_load): Update calls to vect_check_load_store_mask
9951         and vect_build_gather_load_calls.  Use the cached mask_dt and
9952         gs_info.offset_dt instead of calls to vect_is_simple_use.
9954 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
9956         PR middle-end/83945
9957         * tree-emutls.c: Include gimplify.h.
9958         (lower_emutls_2): New function.
9959         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9960         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9961         it before further processing.
9963         PR target/83930
9964         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9965         UINTVAL (trueop1) instead of INTVAL (op1).
9967 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
9969         PR debug/81570
9970         PR debug/83728
9971         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9972         INCOMING_FRAME_SP_OFFSET if not defined.
9973         (scan_trace): Add ENTRY argument.  If true and
9974         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9975         emit a note to adjust the CFA offset.
9976         (create_cfi_notes): Adjust scan_trace callers.
9977         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9978         INCOMING_FRAME_SP_OFFSET in the CIE.
9979         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9980         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9981         Likewise.
9982         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9983         * doc/tm.texi: Regenerated.
9985 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9987         PR rtl-optimization/83147
9988         * lra-constraints.c (remove_inheritance_pseudos): Use
9989         lra_substitute_pseudo_within_insn.
9991 2018-01-19  Tom de Vries  <tom@codesourcery.com>
9992             Cesar Philippidis  <cesar@codesourcery.com>
9994         PR target/83920
9995         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9997 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
9999         PR target/83790
10000         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
10001         spaces for function labels.
10003 2018-01-19  Martin Liska  <mliska@suse.cz>
10005         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
10006         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
10007         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
10008         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
10009         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
10010         (PRED_CONST_RETURN): Change from 69 to 65.
10011         (PRED_NULL_RETURN): Change from 91 to 71.
10012         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
10013         (PRED_LOOP_GUARD): Change from 66 to 73.
10015 2018-01-19  Martin Liska  <mliska@suse.cz>
10017         * predict.c (predict_insn_def): Add new assert.
10018         (struct branch_predictor): Change type to signed integer.
10019         (test_prediction_value_range): Amend test to cover
10020         PROB_UNINITIALIZED.
10021         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
10022         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
10023         (PRED_LOOP_ITERATIONS_MAX): Likewise.
10024         (PRED_LOOP_IV_COMPARE): Likewise.
10025         * predict.h (PROB_UNINITIALIZED): Define new constant.
10027 2018-01-19  Martin Liska  <mliska@suse.cz>
10029         * predict.c (dump_prediction): Add new format for
10030         analyze_brprob.py script which is enabled with -details
10031         suboption.
10032         * profile-count.h (precise_p): New function.
10034 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
10036         PR tree-optimization/83922
10037         * tree-vect-loop.c (vect_verify_full_masking): Return false if
10038         there are no statements that need masking.
10039         (vect_active_double_reduction_p): New function.
10040         (vect_analyze_loop_operations): Use it when handling phis that
10041         are not in the loop header.
10043 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
10045         PR tree-optimization/83914
10046         * tree-vect-loop.c (vectorizable_induction): Don't convert
10047         init_expr or apply the peeling adjustment for inductions
10048         that are nested within the vectorized loop.
10050 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10052         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
10053         instead of NEG.
10055 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
10057         PR sanitizer/81715
10058         PR testsuite/83882
10059         * function.h (gimplify_parameters): Add gimple_seq * argument.
10060         * function.c: Include gimple.h and options.h.
10061         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
10062         for the added local temporaries if needed.
10063         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
10064         if there are any parameter cleanups, wrap whole body into a
10065         try/finally with the cleanups.
10067 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
10069         PR target/82964
10070         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
10071         Use GET_MODE_CLASS for scalar floating point.
10073 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
10075         PR ipa/82256
10076         patch by PaX Team
10077         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
10078         Fix call of call_cgraph_insertion_hooks.
10080 2018-01-18  Martin Sebor  <msebor@redhat.com>
10082         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
10084 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
10086         PR ipa/83619
10087         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
10088         frequencies.
10090 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
10092         PR other/70268
10093         * common.opt: (-ffile-prefix-map): New option.
10094         * opts.c (common_handle_option): Defer it.
10095         * opts-global.c (handle_common_deferred_options): Handle it.
10096         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
10097         * file-prefix-map.h: New file.
10098         (remap_debug_filename, add_debug_prefix_map): ...here.
10099         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
10100         * final.c (debug_prefix_map, add_debug_prefix_map
10101         remap_debug_filename): Move to...
10102         * file-prefix-map.c: New file.
10103         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
10104         generalize, get rid of alloca(), use strrchr() instead of strchr().
10105         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
10106         Implement in terms of add_prefix_map().
10107         (remap_macro_filename, remap_debug_filename): Implement in term of
10108         remap_filename().
10109         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
10110         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
10111         * dbxout.c: Include file-prefix-map.h.
10112         * varasm.c: Likewise.
10113         * vmsdbgout.c: Likewise.
10114         * xcoffout.c: Likewise.
10115         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
10116         * doc/cppopts.texi (-fmacro-prefix-map): Document.
10117         * doc/invoke.texi (-ffile-prefix-map): Document.
10118         (-fdebug-prefix-map): Update description.
10120 2018-01-18  Martin Liska  <mliska@suse.cz>
10122         * config/i386/i386.c (indirect_thunk_name): Document that also
10123         lfence is emitted.
10124         (output_indirect_thunk): Document why both instructions
10125         (pause and lfence) are generated.
10127 2018-01-18  Richard Biener  <rguenther@suse.de>
10129         PR tree-optimization/83887
10130         * graphite-scop-detection.c
10131         (scop_detection::get_nearest_dom_with_single_entry): Remove.
10132         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
10133         (scop_detection::merge_sese): Re-implement with a flood-fill
10134         algorithm that properly finds a SESE region if it exists.
10136 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
10138         PR c/61240
10139         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
10140         pointer_diff optimizations use view_convert instead of convert.
10142 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10144         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10145         Generate different code for -mno-speculate-indirect-jumps.
10146         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10147         (*call_indirect_aix<mode>): Disable for
10148         -mno-speculate-indirect-jumps.
10149         (*call_indirect_aix<mode>_nospec): New define_insn.
10150         (*call_value_indirect_aix<mode>): Disable for
10151         -mno-speculate-indirect-jumps.
10152         (*call_value_indirect_aix<mode>_nospec): New define_insn.
10153         (*sibcall_nonlocal_sysv<mode>): Generate different code for
10154         -mno-speculate-indirect-jumps.
10155         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10157 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
10159         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
10160         long double type, set the flags for noting the default long double
10161         type, even if we don't pass or return a long double type.
10163 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
10165         PR ipa/83051
10166         * ipa-inline.c (flatten_function): Do not overwrite final inlining
10167         failure.
10169 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
10171         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
10172         support for merge[hl].
10173         (fold_mergehl_helper): New helper function.
10174         (tree-vector-builder.h): New #include for tree_vector_builder usage.
10175         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
10176         (altivec_vmrglw_direct): Add xxmrglw insn.
10178 2018-01-17  Andrew Waterman  <andrew@sifive.com>
10180         * config/riscv/riscv.c (riscv_conditional_register_usage): If
10181         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
10183 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
10185         PR lto/83121
10186         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
10187         call the lto_location_cache before reading the
10188         DECL_SOURCE_LOCATION of the types.
10190 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
10191             Richard Sandiford  <richard.sandiford@linaro.org>
10193         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
10194         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
10195         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
10196         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
10197         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
10198         Add declaration.
10199         * config/aarch64/constraints.md (aarch64_movti_operand):
10200         Limit immediates.
10201         * config/aarch64/predicates.md (Uti): Add new constraint.
10203 2018-01-17 Carl Love  <cel@us.ibm.com>
10205         * config/rs6000/vsx.md (define_expand xl_len_r,
10206         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
10207         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
10208         lxvll.
10209         (define_expand, define_insn): Move the shift left from  the
10210         define_insn to the define_expand for lxvl and stxvl instructions.
10211         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
10212         and XL_LEN_R definitions to PURE.
10214 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
10216         * config/i386/i386.c (indirect_thunk_name): Declare regno
10217         as unsigned int.  Compare regno with INVALID_REGNUM.
10218         (output_indirect_thunk): Ditto.
10219         (output_indirect_thunk_function): Ditto.
10220         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
10221         in the call to output_indirect_thunk_function.
10223 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
10225         PR middle-end/83884
10226         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
10227         rather than the size of inner_type to determine the stack slot size
10228         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
10230 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
10232         PR target/83546
10233         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
10234         to PTA_SILVERMONT.
10236 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
10238         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
10239         endian Linux systems to optionally enable multilibs for selecting
10240         the long double type if the user configured an explicit type.
10241         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
10242         have no long double multilibs if not defined.
10243         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
10244         warn if the user used -mabi={ieee,ibm}longdouble and we built
10245         multilibs for long double.
10246         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
10247         appropriate multilib option.
10248         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
10249         multilib options.
10250         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
10251         for building long double multilibs.
10252         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
10254 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
10256         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
10257         copies.
10259         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
10260         64 bits.
10261         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
10262         128 bits.
10264         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
10265         variables.
10267         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
10268         return value.
10270 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10272         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
10273         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
10275 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10277         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
10278         different rtl trees depending on TARGET_64BIT.
10279         (rs6000_gen_lvx): Likewise.
10281 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
10283         * config/visium/visium.md (nop): Tweak comment.
10284         (hazard_nop): Likewise.
10286 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10288         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
10289         -mspeculate-indirect-jumps.
10290         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
10291         for -mno-speculate-indirect-jumps.
10292         (*call_indirect_elfv2<mode>_nospec): New define_insn.
10293         (*call_value_indirect_elfv2<mode>): Disable for
10294         -mno-speculate-indirect-jumps.
10295         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
10296         (indirect_jump): Emit different RTL for
10297         -mno-speculate-indirect-jumps.
10298         (*indirect_jump<mode>): Disable for
10299         -mno-speculate-indirect-jumps.
10300         (*indirect_jump<mode>_nospec): New define_insn.
10301         (tablejump): Emit different RTL for
10302         -mno-speculate-indirect-jumps.
10303         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
10304         (tablejumpsi_nospec): New define_expand.
10305         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
10306         (tablejumpdi_nospec): New define_expand.
10307         (*tablejump<mode>_internal1): Disable for
10308         -mno-speculate-indirect-jumps.
10309         (*tablejump<mode>_internal1_nospec): New define_insn.
10310         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
10311         option.
10313 2018-01-16  Artyom Skrobov tyomitch@gmail.com
10315         * caller-save.c (insert_save): Drop unnecessary parameter.  All
10316         callers updated.
10318 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10319             Richard Biener  <rguenth@suse.de>
10321         PR libgomp/83590
10322         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
10323         return early, inline manually is_gimple_sizepos.  Make sure if we
10324         call gimplify_expr we don't end up with a gimple constant.
10325         * tree.c (variably_modified_type_p): Don't return true for
10326         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
10327         * gimplify.h (is_gimple_sizepos): Remove.
10329 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10331         PR tree-optimization/83857
10332         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
10333         vectorizable_live_operation for pure SLP statements.
10334         (vectorizable_live_operation): Handle PHIs.
10336 2018-01-16  Richard Biener  <rguenther@suse.de>
10338         PR tree-optimization/83867
10339         * tree-vect-stmts.c (vect_transform_stmt): Precompute
10340         nested_in_vect_loop_p since the scalar stmt may get invalidated.
10342 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10344         PR c/83844
10345         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
10346         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
10347         If off is not INTEGER_CST, issue a may not be aligned warning
10348         rather than isn't aligned.  Use isn%'t rather than isn't.
10349         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
10350         into MULT_EXPR.
10351         <case MULT_EXPR>: Improve the case when bottom and one of the
10352         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
10353         operand, in that case check if the other operand is multiple of
10354         bottom divided by the INTEGER_CST operand.
10356 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10358         PR target/83858
10359         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
10360         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
10361         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
10362         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
10363         * config/pa/pa.c (pa_function_arg_advance): Likewise.
10364         (pa_function_arg, pa_arg_partial_bytes): Likewise.
10365         (pa_function_arg_size): New function.
10367 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10369         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
10370         in a separate statement.
10372 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
10374         PR tree-optimization/83847
10375         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
10376         group gathers and scatters.
10378 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
10380         PR rtl-optimization/86620
10381         * params.def (max-sched-ready-insns): Bump minimum value to 1.
10383         PR rtl-optimization/83213
10384         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
10385         to last if both are JUMP_INSNs.
10387         PR tree-optimization/83843
10388         * gimple-ssa-store-merging.c
10389         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
10390         store_immediate_info for bswap/nop orig_stores.
10392 2018-01-15  Andrew Waterman  <andrew@sifive.com>
10394         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
10395         !TARGET_MUL.
10396         <UDIV>: Increase cost if !TARGET_DIV.
10398 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
10400         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
10401         (define_attr "cr_logical_3op"): New.
10402         (cceq_ior_compare): Adjust.
10403         (cceq_ior_compare_complement): Adjust.
10404         (*cceq_rev_compare): Adjust.
10405         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
10406         (is_cracked_insn): Adjust.
10407         (insn_must_be_first_in_group): Adjust.
10408         * config/rs6000/40x.md: Adjust.
10409         * config/rs6000/440.md: Adjust.
10410         * config/rs6000/476.md: Adjust.
10411         * config/rs6000/601.md: Adjust.
10412         * config/rs6000/603.md: Adjust.
10413         * config/rs6000/6xx.md: Adjust.
10414         * config/rs6000/7450.md: Adjust.
10415         * config/rs6000/7xx.md: Adjust.
10416         * config/rs6000/8540.md: Adjust.
10417         * config/rs6000/cell.md: Adjust.
10418         * config/rs6000/e300c2c3.md: Adjust.
10419         * config/rs6000/e500mc.md: Adjust.
10420         * config/rs6000/e500mc64.md: Adjust.
10421         * config/rs6000/e5500.md: Adjust.
10422         * config/rs6000/e6500.md: Adjust.
10423         * config/rs6000/mpc.md: Adjust.
10424         * config/rs6000/power4.md: Adjust.
10425         * config/rs6000/power5.md: Adjust.
10426         * config/rs6000/power6.md: Adjust.
10427         * config/rs6000/power7.md: Adjust.
10428         * config/rs6000/power8.md: Adjust.
10429         * config/rs6000/power9.md: Adjust.
10430         * config/rs6000/rs64.md: Adjust.
10431         * config/rs6000/titan.md: Adjust.
10433 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10435         * config/i386/predicates.md (indirect_branch_operand): Rewrite
10436         ix86_indirect_branch_register logic.
10438 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10440         * config/i386/constraints.md (Bs): Update
10441         ix86_indirect_branch_register check.  Don't check
10442         ix86_indirect_branch_register with GOT_memory_operand.
10443         (Bw): Likewise.
10444         * config/i386/predicates.md (GOT_memory_operand): Don't check
10445         ix86_indirect_branch_register here.
10446         (GOT32_symbol_operand): Likewise.
10448 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10450         * config/i386/predicates.md (constant_call_address_operand):
10451         Rewrite ix86_indirect_branch_register logic.
10452         (sibcall_insn_operand): Likewise.
10454 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10456         * config/i386/constraints.md (Bs): Replace
10457         ix86_indirect_branch_thunk_register with
10458         ix86_indirect_branch_register.
10459         (Bw): Likewise.
10460         * config/i386/i386.md (indirect_jump): Likewise.
10461         (tablejump): Likewise.
10462         (*sibcall_memory): Likewise.
10463         (*sibcall_value_memory): Likewise.
10464         Peepholes of indirect call and jump via memory: Likewise.
10465         * config/i386/i386.opt: Likewise.
10466         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10467         (GOT_memory_operand): Likewise.
10468         (call_insn_operand): Likewise.
10469         (sibcall_insn_operand): Likewise.
10470         (GOT32_symbol_operand): Likewise.
10472 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10474         PR middle-end/83837
10475         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
10476         type rather than type addr's type points to.
10477         (expand_omp_atomic_mutex): Likewise.
10478         (expand_omp_atomic): Likewise.
10480 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
10482         PR target/83839
10483         * config/i386/i386.c (output_indirect_thunk_function): Use
10484         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
10485         for  __x86_return_thunk.
10487 2018-01-15  Richard Biener  <rguenther@suse.de>
10489         PR middle-end/83850
10490         * expmed.c (extract_bit_field_1): Fix typo.
10492 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10494         PR target/83687
10495         * config/arm/iterators.md (VF): New mode iterator.
10496         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
10497         Remove integer-related logic from pattern.
10498         (neon_vabd<mode>_3): Likewise.
10500 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
10502         PR middle-end/82694
10503         * common.opt (fstrict-overflow): No longer an alias.
10504         (fwrapv-pointer): New option.
10505         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10506         also for pointer types based on flag_wrapv_pointer.
10507         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10508         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10509         opts->x_flag_wrapv got set.
10510         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10511         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10512         POINTER_TYPE_OVERFLOW_UNDEFINED.
10513         * match.pd: Likewise in address comparison pattern.
10514         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10516 2018-01-15  Richard Biener  <rguenther@suse.de>
10518         PR lto/83804
10519         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10520         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
10521         Reset type names to their identifier if their TYPE_DECL doesn't
10522         have linkage (and thus is used for ODR and devirt).
10523         (save_debug_info_for_decl): Remove.
10524         (save_debug_info_for_type): Likewise.
10525         (add_tree_to_fld_list): Adjust.
10526         * tree-pretty-print.c (dump_generic_node): Make dumping of
10527         type names more robust.
10529 2018-01-15  Richard Biener  <rguenther@suse.de>
10531         * BASE-VER: Bump to 8.0.1.
10533 2018-01-14  Martin Sebor  <msebor@redhat.com>
10535         PR other/83508
10536         * builtins.c (check_access): Avoid warning when the no-warning bit
10537         is set.
10539 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
10541         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10542         * ira-color (allocno_hard_regs_compare): Likewise.
10544 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
10546         PR target/83013
10547         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10548         Use .pushsection/.popsection.
10550 2018-01-14  Martin Sebor  <msebor@redhat.com>
10552         PR c++/81327
10553         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10555 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
10557         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
10558         entry from extra_headers.
10559         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
10560         extra_headers, make the list bitwise identical to the i?86-*-* one.
10562 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10564         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
10565         -mcmodel=large with -mindirect-branch=thunk,
10566         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
10567         -mfunction-return=thunk-extern.
10568         * doc/invoke.texi: Document -mcmodel=large is incompatible with
10569         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
10570         -mfunction-return=thunk and -mfunction-return=thunk-extern.
10572 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10574         * config/i386/i386.c (print_reg): Print the name of the full
10575         integer register without '%'.
10576         (ix86_print_operand): Handle 'V'.
10577          * doc/extend.texi: Document 'V' modifier.
10579 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10581         * config/i386/constraints.md (Bs): Disallow memory operand for
10582         -mindirect-branch-register.
10583         (Bw): Likewise.
10584         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10585         (GOT_memory_operand): Likewise.
10586         (call_insn_operand): Likewise.
10587         (sibcall_insn_operand): Likewise.
10588         (GOT32_symbol_operand): Likewise.
10589         * config/i386/i386.md (indirect_jump): Call convert_memory_address
10590         for -mindirect-branch-register.
10591         (tablejump): Likewise.
10592         (*sibcall_memory): Likewise.
10593         (*sibcall_value_memory): Likewise.
10594         Disallow peepholes of indirect call and jump via memory for
10595         -mindirect-branch-register.
10596         (*call_pop): Replace m with Bw.
10597         (*call_value_pop): Likewise.
10598         (*sibcall_pop_memory): Replace m with Bs.
10599         * config/i386/i386.opt (mindirect-branch-register): New option.
10600         * doc/invoke.texi: Document -mindirect-branch-register option.
10602 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10604         * config/i386/i386-protos.h (ix86_output_function_return): New.
10605         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
10606         set function_return_type.
10607         (indirect_thunk_name): Add ret_p to indicate thunk for function
10608         return.
10609         (output_indirect_thunk_function): Pass false to
10610         indirect_thunk_name.
10611         (ix86_output_indirect_branch_via_reg): Likewise.
10612         (ix86_output_indirect_branch_via_push): Likewise.
10613         (output_indirect_thunk_function): Create alias for function
10614         return thunk if regno < 0.
10615         (ix86_output_function_return): New function.
10616         (ix86_handle_fndecl_attribute): Handle function_return.
10617         (ix86_attribute_table): Add function_return.
10618         * config/i386/i386.h (machine_function): Add
10619         function_return_type.
10620         * config/i386/i386.md (simple_return_internal): Use
10621         ix86_output_function_return.
10622         (simple_return_internal_long): Likewise.
10623         * config/i386/i386.opt (mfunction-return=): New option.
10624         (indirect_branch): Mention -mfunction-return=.
10625         * doc/extend.texi: Document function_return function attribute.
10626         * doc/invoke.texi: Document -mfunction-return= option.
10628 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
10630         * config/i386/i386-opts.h (indirect_branch): New.
10631         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10632         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10633         with local indirect jump when converting indirect call and jump.
10634         (ix86_set_indirect_branch_type): New.
10635         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10636         (indirectlabelno): New.
10637         (indirect_thunk_needed): Likewise.
10638         (indirect_thunk_bnd_needed): Likewise.
10639         (indirect_thunks_used): Likewise.
10640         (indirect_thunks_bnd_used): Likewise.
10641         (INDIRECT_LABEL): Likewise.
10642         (indirect_thunk_name): Likewise.
10643         (output_indirect_thunk): Likewise.
10644         (output_indirect_thunk_function): Likewise.
10645         (ix86_output_indirect_branch_via_reg): Likewise.
10646         (ix86_output_indirect_branch_via_push): Likewise.
10647         (ix86_output_indirect_branch): Likewise.
10648         (ix86_output_indirect_jmp): Likewise.
10649         (ix86_code_end): Call output_indirect_thunk_function if needed.
10650         (ix86_output_call_insn): Call ix86_output_indirect_branch if
10651         needed.
10652         (ix86_handle_fndecl_attribute): Handle indirect_branch.
10653         (ix86_attribute_table): Add indirect_branch.
10654         * config/i386/i386.h (machine_function): Add indirect_branch_type
10655         and has_local_indirect_jump.
10656         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10657         to true.
10658         (tablejump): Likewise.
10659         (*indirect_jump): Use ix86_output_indirect_jmp.
10660         (*tablejump_1): Likewise.
10661         (simple_return_indirect_internal): Likewise.
10662         * config/i386/i386.opt (mindirect-branch=): New option.
10663         (indirect_branch): New.
10664         (keep): Likewise.
10665         (thunk): Likewise.
10666         (thunk-inline): Likewise.
10667         (thunk-extern): Likewise.
10668         * doc/extend.texi: Document indirect_branch function attribute.
10669         * doc/invoke.texi: Document -mindirect-branch= option.
10671 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
10673         PR ipa/83051
10674         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10676 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
10678         * ipa-inline.c (want_inline_small_function_p): Return false if
10679         inlining has already failed with CIF_FINAL_ERROR.
10680         (update_caller_keys): Call want_inline_small_function_p before
10681         can_inline_edge_p.
10682         (update_callee_keys): Likewise.
10684 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10686         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10687         New function.
10688         (rs6000_quadword_masked_address_p): Likewise.
10689         (quad_aligned_load_p): Likewise.
10690         (quad_aligned_store_p): Likewise.
10691         (const_load_sequence_p): Add comment to describe the outer-most loop.
10692         (mimic_memory_attributes_and_flags): New function.
10693         (rs6000_gen_stvx): Likewise.
10694         (replace_swapped_aligned_store): Likewise.
10695         (rs6000_gen_lvx): Likewise.
10696         (replace_swapped_aligned_load): Likewise.
10697         (replace_swapped_load_constant): Capitalize argument name in
10698         comment describing this function.
10699         (rs6000_analyze_swaps): Add a third pass to search for vector loads
10700         and stores that access quad-word aligned addresses and replace
10701         with stvx or lvx instructions when appropriate.
10702         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10703         New function prototype.
10704         (rs6000_quadword_masked_address_p): Likewise.
10705         (rs6000_gen_lvx): Likewise.
10706         (rs6000_gen_stvx): Likewise.
10707         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10708         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10709         when memory address is aligned.
10710         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10711         this split to select lvx instruction when memory address is aligned.
10712         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10713         instruction when memory address is aligned.
10714         (*vsx_le_perm_load_v16qi): Likewise.
10715         (four unnamed splitters): Modify to select the stvx instruction
10716         when memory is aligned.
10718 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
10720         * predict.c (determine_unlikely_bbs): Handle correctly BBs
10721         which appears in the queue multiple times.
10723 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10724             Alan Hayward  <alan.hayward@arm.com>
10725             David Sherwood  <david.sherwood@arm.com>
10727         * tree-vectorizer.h (vec_lower_bound): New structure.
10728         (_loop_vec_info): Add check_nonzero and lower_bounds.
10729         (LOOP_VINFO_CHECK_NONZERO): New macro.
10730         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10731         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10732         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10733         fields.  Make seg_len the distance travelled, not including the
10734         access size.
10735         (dr_direction_indicator): Declare.
10736         (dr_zero_step_indicator): Likewise.
10737         (dr_known_forward_stride_p): Likewise.
10738         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10739         tree-ssanames.h.
10740         (runtime_alias_check_p): Allow runtime alias checks with
10741         variable strides.
10742         (operator ==): Compare access_size and align.
10743         (prune_runtime_alias_test_list): Rework for new distinction between
10744         the access_size and seg_len.
10745         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
10746         segment lengths.
10747         (get_segment_min_max): New function.
10748         (create_intersect_range_checks): Use it.
10749         (dr_step_indicator): New function.
10750         (dr_direction_indicator): Likewise.
10751         (dr_zero_step_indicator): Likewise.
10752         (dr_known_forward_stride_p): Likewise.
10753         * tree-loop-distribution.c (data_ref_segment_size): Return
10754         DR_STEP * (niters - 1).
10755         (compute_alias_check_pairs): Update call to the dr_with_seg_len
10756         constructor.
10757         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10758         (vect_preserves_scalar_order_p): New function, split out from...
10759         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
10760         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10761         (vect_vfa_access_size): New function.
10762         (vect_vfa_align): Likewise.
10763         (vect_compile_time_alias): Take access_size_a and access_b arguments.
10764         (dump_lower_bound): New function.
10765         (vect_check_lower_bound): Likewise.
10766         (vect_small_gap_p): Likewise.
10767         (vectorizable_with_step_bound_p): Likewise.
10768         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10769         depencies if the vectorization factor is 1.  Convert the checks
10770         for nonzero steps into checks on the bounds of DR_STEP.  Try using
10771         a bunds check for variable steps if the minimum required step is
10772         relatively small. Update calls to the dr_with_seg_len
10773         constructor and to vect_compile_time_alias.
10774         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10775         function.
10776         (vect_loop_versioning): Call it.
10777         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10778         when retrying.
10779         (vect_estimate_min_profitable_iters): Account for any bounds checks.
10781 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10782             Alan Hayward  <alan.hayward@arm.com>
10783             David Sherwood  <david.sherwood@arm.com>
10785         * doc/sourcebuild.texi (vect_scatter_store): Document.
10786         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10787         optabs.
10788         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10789         Document.
10790         * genopinit.c (main): Add supports_vec_scatter_store and
10791         supports_vec_scatter_store_cached to target_optabs.
10792         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10793         IFN_MASK_SCATTER_STORE.
10794         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10795         functions.
10796         * internal-fn.h (internal_store_fn_p): Declare.
10797         (internal_fn_stored_value_index): Likewise.
10798         * internal-fn.c (scatter_store_direct): New macro.
10799         (expand_scatter_store_optab_fn): New function.
10800         (direct_scatter_store_optab_supported_p): New macro.
10801         (internal_store_fn_p): New function.
10802         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10803         IFN_MASK_SCATTER_STORE.
10804         (internal_fn_mask_index): Likewise.
10805         (internal_fn_stored_value_index): New function.
10806         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10807         for scatter stores.
10808         * optabs-query.h (supports_vec_scatter_store_p): Declare.
10809         * optabs-query.c (supports_vec_scatter_store_p): New function.
10810         * tree-vectorizer.h (vect_get_store_rhs): Declare.
10811         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10812         true for scatter stores.
10813         (vect_gather_scatter_fn_p): Handle scatter stores too.
10814         (vect_check_gather_scatter): Consider using scatter stores if
10815         supports_vec_scatter_store_p.
10816         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10817         scatter stores too.
10818         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10819         internal_fn_stored_value_index.
10820         (check_load_store_masking): Handle scatter stores too.
10821         (vect_get_store_rhs): Make public.
10822         (vectorizable_call): Use internal_store_fn_p.
10823         (vectorizable_store): Handle scatter store internal functions.
10824         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10825         when deciding whether the end of the group has been reached.
10826         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10827         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10828         (mask_scatter_store<mode>): New insns.
10830 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10831             Alan Hayward  <alan.hayward@arm.com>
10832             David Sherwood  <david.sherwood@arm.com>
10834         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10835         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10836         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10837         function.
10838         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10839         Use vect_truncate_gather_scatter_offset if we can't treat the
10840         operation as a normal gather load or scatter store.
10841         (get_group_load_store_type): Take the gather_scatter_info
10842         as argument.  Try using a gather load or scatter store for
10843         single-element groups.
10844         (get_load_store_type): Update calls to get_group_load_store_type
10845         and vect_use_strided_gather_scatters_p.
10847 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10848             Alan Hayward  <alan.hayward@arm.com>
10849             David Sherwood  <david.sherwood@arm.com>
10851         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10852         optional tree argument.
10853         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10854         null target hooks.
10855         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10856         but continue to use the current value as a fallback.
10857         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10858         to compare the updates.
10859         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10860         (get_load_store_type): Use it when handling a strided access.
10861         (vect_get_strided_load_store_ops): New function.
10862         (vect_get_data_ptr_increment): Likewise.
10863         (vectorizable_load): Handle strided gather loads.  Always pass
10864         a step to vect_create_data_ref_ptr and bump_vector_ptr.
10866 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10867             Alan Hayward  <alan.hayward@arm.com>
10868             David Sherwood  <david.sherwood@arm.com>
10870         * doc/md.texi (gather_load@var{m}): Document.
10871         (mask_gather_load@var{m}): Likewise.
10872         * genopinit.c (main): Add supports_vec_gather_load and
10873         supports_vec_gather_load_cached to target_optabs.
10874         * optabs-tree.c (init_tree_optimization_optabs): Use
10875         ggc_cleared_alloc to allocate target_optabs.
10876         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10877         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10878         functions.
10879         * internal-fn.h (internal_load_fn_p): Declare.
10880         (internal_gather_scatter_fn_p): Likewise.
10881         (internal_fn_mask_index): Likewise.
10882         (internal_gather_scatter_fn_supported_p): Likewise.
10883         * internal-fn.c (gather_load_direct): New macro.
10884         (expand_gather_load_optab_fn): New function.
10885         (direct_gather_load_optab_supported_p): New macro.
10886         (direct_internal_fn_optab): New function.
10887         (internal_load_fn_p): Likewise.
10888         (internal_gather_scatter_fn_p): Likewise.
10889         (internal_fn_mask_index): Likewise.
10890         (internal_gather_scatter_fn_supported_p): Likewise.
10891         * optabs-query.c (supports_at_least_one_mode_p): New function.
10892         (supports_vec_gather_load_p): Likewise.
10893         * optabs-query.h (supports_vec_gather_load_p): Declare.
10894         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10895         and memory_type field.
10896         (NUM_PATTERNS): Bump to 15.
10897         * tree-vect-data-refs.c: Include internal-fn.h.
10898         (vect_gather_scatter_fn_p): New function.
10899         (vect_describe_gather_scatter_call): Likewise.
10900         (vect_check_gather_scatter): Try using internal functions for
10901         gather loads.  Recognize existing calls to a gather load function.
10902         (vect_analyze_data_refs): Consider using gather loads if
10903         supports_vec_gather_load_p.
10904         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10905         (vect_get_gather_scatter_offset_type): Likewise.
10906         (vect_convert_mask_for_vectype): Likewise.
10907         (vect_add_conversion_to_patterm): Likewise.
10908         (vect_try_gather_scatter_pattern): Likewise.
10909         (vect_recog_gather_scatter_pattern): New pattern recognizer.
10910         (vect_vect_recog_func_ptrs): Add it.
10911         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10912         internal_fn_mask_index and internal_gather_scatter_fn_p.
10913         (check_load_store_masking): Take the gather_scatter_info as an
10914         argument and handle gather loads.
10915         (vect_get_gather_scatter_ops): New function.
10916         (vectorizable_call): Check internal_load_fn_p.
10917         (vectorizable_load): Likewise.  Handle gather load internal
10918         functions.
10919         (vectorizable_store): Update call to check_load_store_masking.
10920         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10921         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10922         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10923         (aarch64_gather_scale_operand_d): New predicates.
10924         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10925         (mask_gather_load<mode>): New insns.
10927 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10928             Alan Hayward  <alan.hayward@arm.com>
10929             David Sherwood  <david.sherwood@arm.com>
10931         * optabs.def (fold_left_plus_optab): New optab.
10932         * doc/md.texi (fold_left_plus_@var{m}): Document.
10933         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10934         * internal-fn.c (fold_left_direct): Define.
10935         (expand_fold_left_optab_fn): Likewise.
10936         (direct_fold_left_optab_supported_p): Likewise.
10937         * fold-const-call.c (fold_const_fold_left): New function.
10938         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10939         * tree-parloops.c (valid_reduction_p): New function.
10940         (gather_scalar_reductions): Use it.
10941         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10942         (vect_finish_replace_stmt): Declare.
10943         * tree-vect-loop.c (fold_left_reduction_fn): New function.
10944         (needs_fold_left_reduction_p): New function, split out from...
10945         (vect_is_simple_reduction): ...here.  Accept reductions that
10946         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10947         (vect_force_simple_reduction): Also store the reduction type in
10948         the assignment's STMT_VINFO_REDUC_TYPE.
10949         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10950         (merge_with_identity): New function.
10951         (vect_expand_fold_left): Likewise.
10952         (vectorize_fold_left_reduction): Likewise.
10953         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
10954         scalar phi in place for it.  Check for target support and reject
10955         cases that would reassociate the operation.  Defer the transform
10956         phase to vectorize_fold_left_reduction.
10957         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10958         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10959         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10961 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10963         * tree-if-conv.c (predicate_mem_writes): Remove redundant
10964         call to ifc_temp_var.
10966 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10967             Alan Hayward  <alan.hayward@arm.com>
10968             David Sherwood  <david.sherwood@arm.com>
10970         * target.def (legitimize_address_displacement): Take the original
10971         offset as a poly_int.
10972         * targhooks.h (default_legitimize_address_displacement): Update
10973         accordingly.
10974         * targhooks.c (default_legitimize_address_displacement): Likewise.
10975         * doc/tm.texi: Regenerate.
10976         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10977         as an argument, moving assert of ad->disp == ad->disp_term to...
10978         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
10979         Try calling targetm.legitimize_address_displacement before expanding
10980         the address rather than afterwards, and adjust for the new interface.
10981         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10982         Match the new hook interface.  Handle SVE addresses.
10983         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10984         new hook interface.
10986 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
10988         * Makefile.in (OBJS): Add early-remat.o.
10989         * target.def (select_early_remat_modes): New hook.
10990         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10991         * doc/tm.texi: Regenerate.
10992         * targhooks.h (default_select_early_remat_modes): Declare.
10993         * targhooks.c (default_select_early_remat_modes): New function.
10994         * timevar.def (TV_EARLY_REMAT): New timevar.
10995         * passes.def (pass_early_remat): New pass.
10996         * tree-pass.h (make_pass_early_remat): Declare.
10997         * early-remat.c: New file.
10998         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10999         function.
11000         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
11002 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11003             Alan Hayward  <alan.hayward@arm.com>
11004             David Sherwood  <david.sherwood@arm.com>
11006         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
11007         vfm1 with a bound_epilog parameter.
11008         (vect_do_peeling): Update calls accordingly, and move the prologue
11009         call earlier in the function.  Treat the base bound_epilog as 0 for
11010         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
11011         this base when peeling for gaps.
11012         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
11013         with fully-masked loops.
11014         (vect_estimate_min_profitable_iters): Handle the single peeled
11015         iteration in that case.
11017 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11018             Alan Hayward  <alan.hayward@arm.com>
11019             David Sherwood  <david.sherwood@arm.com>
11021         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
11022         single-element interleaving even if the size is not a power of 2.
11023         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
11024         accesses for single-element interleaving if the group size is
11025         not a power of 2.
11027 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11028             Alan Hayward  <alan.hayward@arm.com>
11029             David Sherwood  <david.sherwood@arm.com>
11031         * doc/md.texi (fold_extract_last_@var{m}): Document.
11032         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
11033         * optabs.def (fold_extract_last_optab): New optab.
11034         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
11035         * internal-fn.c (fold_extract_direct): New macro.
11036         (expand_fold_extract_optab_fn): Likewise.
11037         (direct_fold_extract_optab_supported_p): Likewise.
11038         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
11039         * tree-vect-loop.c (vect_model_reduction_cost): Handle
11040         EXTRACT_LAST_REDUCTION.
11041         (get_initial_def_for_reduction): Do not create an initial vector
11042         for EXTRACT_LAST_REDUCTION reductions.
11043         (vectorizable_reduction): Leave the scalar phi in place for
11044         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
11045         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
11046         epilogue code for EXTRACT_LAST_REDUCTION and defer the
11047         transform phase to vectorizable_condition.
11048         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
11049         split out from...
11050         (vect_finish_stmt_generation): ...here.
11051         (vect_finish_replace_stmt): New function.
11052         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
11053         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
11054         pattern.
11055         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
11057 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11058             Alan Hayward  <alan.hayward@arm.com>
11059             David Sherwood  <david.sherwood@arm.com>
11061         * doc/md.texi (extract_last_@var{m}): Document.
11062         * optabs.def (extract_last_optab): New optab.
11063         * internal-fn.def (EXTRACT_LAST): New internal function.
11064         * internal-fn.c (cond_unary_direct): New macro.
11065         (expand_cond_unary_optab_fn): Likewise.
11066         (direct_cond_unary_optab_supported_p): Likewise.
11067         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
11068         loops using EXTRACT_LAST.
11069         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
11070         (extract_last_<mode>): ...this optab.
11071         (vec_extract<mode><Vel>): Update accordingly.
11073 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11074             Alan Hayward  <alan.hayward@arm.com>
11075             David Sherwood  <david.sherwood@arm.com>
11077         * target.def (empty_mask_is_expensive): New hook.
11078         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
11079         * doc/tm.texi: Regenerate.
11080         * targhooks.h (default_empty_mask_is_expensive): Declare.
11081         * targhooks.c (default_empty_mask_is_expensive): New function.
11082         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
11083         if the target says that empty masks are expensive.
11084         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
11085         New function.
11086         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
11088 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11089             Alan Hayward  <alan.hayward@arm.com>
11090             David Sherwood  <david.sherwood@arm.com>
11092         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
11093         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
11094         (vect_use_loop_mask_for_alignment_p): New function.
11095         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
11096         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
11097         niters_skip argument.  Make sure that the first niters_skip elements
11098         of the first iteration are inactive.
11099         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
11100         Update call to vect_set_loop_masks_directly.
11101         (get_misalign_in_elems): New function, split out from...
11102         (vect_gen_prolog_loop_niters): ...here.
11103         (vect_update_init_of_dr): Take a code argument that specifies whether
11104         the adjustment should be added or subtracted.
11105         (vect_update_init_of_drs): Likewise.
11106         (vect_prepare_for_masked_peels): New function.
11107         (vect_do_peeling): Skip prologue peeling if we're using a mask
11108         instead.  Update call to vect_update_inits_of_drs.
11109         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11110         mask_skip_niters.
11111         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
11112         alignment.  Do not include the number of peeled iterations in
11113         the minimum threshold in that case.
11114         (vectorizable_induction): Adjust the start value down by
11115         LOOP_VINFO_MASK_SKIP_NITERS iterations.
11116         (vect_transform_loop): Call vect_prepare_for_masked_peels.
11117         Take the number of skipped iterations into account when calculating
11118         the loop bounds.
11119         * tree-vect-stmts.c (vect_gen_while_not): New function.
11121 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11122             Alan Hayward  <alan.hayward@arm.com>
11123             David Sherwood  <david.sherwood@arm.com>
11125         * doc/sourcebuild.texi (vect_fully_masked): Document.
11126         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
11127         default value to 0.
11128         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
11129         split out from...
11130         (vect_analyze_loop_2): ...here. Don't check the vectorization
11131         factor against the number of loop iterations if the loop is
11132         fully-masked.
11134 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11135             Alan Hayward  <alan.hayward@arm.com>
11136             David Sherwood  <david.sherwood@arm.com>
11138         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
11139         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
11140         (dump_groups): Update accordingly.
11141         (iv_use::mem_type): New member variable.
11142         (address_p): New function.
11143         (record_use): Add a mem_type argument and initialize the new
11144         mem_type field.
11145         (record_group_use): Add a mem_type argument.  Use address_p.
11146         Remove obsolete null checks of base_object.  Update call to record_use.
11147         (find_interesting_uses_op): Update call to record_group_use.
11148         (find_interesting_uses_cond): Likewise.
11149         (find_interesting_uses_address): Likewise.
11150         (get_mem_type_for_internal_fn): New function.
11151         (find_address_like_use): Likewise.
11152         (find_interesting_uses_stmt): Try find_address_like_use before
11153         calling find_interesting_uses_op.
11154         (addr_offset_valid_p): Use the iv mem_type field as the type
11155         of the addressed memory.
11156         (add_autoinc_candidates): Likewise.
11157         (get_address_cost): Likewise.
11158         (split_small_address_groups_p): Use address_p.
11159         (split_address_groups): Likewise.
11160         (add_iv_candidate_for_use): Likewise.
11161         (autoinc_possible_for_pair): Likewise.
11162         (rewrite_groups): Likewise.
11163         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
11164         (determine_group_iv_cost): Update after split of USE_ADDRESS.
11165         (get_alias_ptr_type_for_ptr_address): New function.
11166         (rewrite_use_address): Rewrite address uses in calls that were
11167         identified by find_address_like_use.
11169 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11170             Alan Hayward  <alan.hayward@arm.com>
11171             David Sherwood  <david.sherwood@arm.com>
11173         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
11174         TARGET_MEM_REFs.
11175         * gimple-expr.h (is_gimple_addressable: Likewise.
11176         * gimple-expr.c (is_gimple_address): Likewise.
11177         * internal-fn.c (expand_call_mem_ref): New function.
11178         (expand_mask_load_optab_fn): Use it.
11179         (expand_mask_store_optab_fn): Likewise.
11181 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11182             Alan Hayward  <alan.hayward@arm.com>
11183             David Sherwood  <david.sherwood@arm.com>
11185         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
11186         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
11187         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
11188         (cond_umax@var{mode}): Document.
11189         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
11190         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
11191         (cond_umin_optab, cond_umax_optab): New optabs.
11192         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
11193         (COND_IOR, COND_XOR): New internal functions.
11194         * internal-fn.h (get_conditional_internal_fn): Declare.
11195         * internal-fn.c (cond_binary_direct): New macro.
11196         (expand_cond_binary_optab_fn): Likewise.
11197         (direct_cond_binary_optab_supported_p): Likewise.
11198         (get_conditional_internal_fn): New function.
11199         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
11200         Cope with reduction statements that are vectorized as calls rather
11201         than assignments.
11202         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
11203         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
11204         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
11205         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11206         (UNSPEC_COND_EOR): New unspecs.
11207         (optab): Add mappings for them.
11208         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
11209         (sve_int_op, sve_fp_op): New int attributes.
11211 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11212             Alan Hayward  <alan.hayward@arm.com>
11213             David Sherwood  <david.sherwood@arm.com>
11215         * optabs.def (while_ult_optab): New optab.
11216         * doc/md.texi (while_ult@var{m}@var{n}): Document.
11217         * internal-fn.def (WHILE_ULT): New internal function.
11218         * internal-fn.h (direct_internal_fn_supported_p): New override
11219         that takes two types as argument.
11220         * internal-fn.c (while_direct): New macro.
11221         (expand_while_optab_fn): New function.
11222         (convert_optab_supported_p): Likewise.
11223         (direct_while_optab_supported_p): New macro.
11224         * wide-int.h (wi::udiv_ceil): New function.
11225         * tree-vectorizer.h (rgroup_masks): New structure.
11226         (vec_loop_masks): New typedef.
11227         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
11228         and fully_masked_p.
11229         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
11230         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
11231         (vect_max_vf): New function.
11232         (slpeel_make_loop_iterate_ntimes): Delete.
11233         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
11234         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
11235         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
11236         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
11237         internal-fn.h, stor-layout.h and optabs-query.h.
11238         (vect_set_loop_mask): New function.
11239         (add_preheader_seq): Likewise.
11240         (add_header_seq): Likewise.
11241         (interleave_supported_p): Likewise.
11242         (vect_maybe_permute_loop_masks): Likewise.
11243         (vect_set_loop_masks_directly): Likewise.
11244         (vect_set_loop_condition_masked): Likewise.
11245         (vect_set_loop_condition_unmasked): New function, split out from
11246         slpeel_make_loop_iterate_ntimes.
11247         (slpeel_make_loop_iterate_ntimes): Rename to..
11248         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
11249         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
11250         (vect_do_peeling): Update call accordingly.
11251         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
11252         loops.
11253         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11254         mask_compare_type, can_fully_mask_p and fully_masked_p.
11255         (release_vec_loop_masks): New function.
11256         (_loop_vec_info): Use it to free the loop masks.
11257         (can_produce_all_loop_masks_p): New function.
11258         (vect_get_max_nscalars_per_iter): Likewise.
11259         (vect_verify_full_masking): Likewise.
11260         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
11261         retries, and free the mask rgroups before retrying.  Check loop-wide
11262         reasons for disallowing fully-masked loops.  Make the final decision
11263         about whether use a fully-masked loop or not.
11264         (vect_estimate_min_profitable_iters): Do not assume that peeling
11265         for the number of iterations will be needed for fully-masked loops.
11266         (vectorizable_reduction): Disable fully-masked loops.
11267         (vectorizable_live_operation): Likewise.
11268         (vect_halve_mask_nunits): New function.
11269         (vect_double_mask_nunits): Likewise.
11270         (vect_record_loop_mask): Likewise.
11271         (vect_get_loop_mask): Likewise.
11272         (vect_transform_loop): Handle the case in which the final loop
11273         iteration might handle a partial vector.  Call vect_set_loop_condition
11274         instead of slpeel_make_loop_iterate_ntimes.
11275         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
11276         (check_load_store_masking): New function.
11277         (prepare_load_store_mask): Likewise.
11278         (vectorizable_store): Handle fully-masked loops.
11279         (vectorizable_load): Likewise.
11280         (supportable_widening_operation): Use vect_halve_mask_nunits for
11281         booleans.
11282         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
11283         (vect_gen_while): New function.
11284         * config/aarch64/aarch64.md (umax<mode>3): New expander.
11285         (aarch64_uqdec<mode>): New insn.
11287 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11288             Alan Hayward  <alan.hayward@arm.com>
11289             David Sherwood  <david.sherwood@arm.com>
11291         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
11292         (reduc_xor_scal_optab): New optabs.
11293         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
11294         (reduc_xor_scal_@var{m}): Document.
11295         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
11296         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
11297         internal functions.
11298         * fold-const-call.c (fold_const_call): Handle them.
11299         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
11300         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
11301         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
11302         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
11303         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
11304         (UNSPEC_XORV): New unspecs.
11305         (optab): Add entries for them.
11306         (BITWISEV): New int iterator.
11307         (bit_reduc_op): New int attributes.
11309 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11310             Alan Hayward  <alan.hayward@arm.com>
11311             David Sherwood  <david.sherwood@arm.com>
11313         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
11314         * internal-fn.def (VEC_SHL_INSERT): New internal function.
11315         * optabs.def (vec_shl_insert_optab): New optab.
11316         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
11317         (duplicate_and_interleave): Likewise.
11318         * tree-vect-loop.c: Include internal-fn.h.
11319         (neutral_op_for_slp_reduction): New function, split out from
11320         get_initial_defs_for_reduction.
11321         (get_initial_def_for_reduction): Handle option 2 for variable-length
11322         vectors by loading the neutral value into a vector and then shifting
11323         the initial value into element 0.
11324         (get_initial_defs_for_reduction): Replace the code argument with
11325         the neutral value calculated by neutral_op_for_slp_reduction.
11326         Use gimple_build_vector for constant-length vectors.
11327         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
11328         but the first group_size elements have a neutral value.
11329         Use duplicate_and_interleave otherwise.
11330         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
11331         Update call to get_initial_defs_for_reduction.  Handle SLP
11332         reductions for variable-length vectors by creating one vector
11333         result for each scalar result, with the elements associated
11334         with other scalar results stubbed out with the neutral value.
11335         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
11336         Require IFN_VEC_SHL_INSERT for double reductions on
11337         variable-length vectors, or SLP reductions that have
11338         a neutral value.  Require can_duplicate_and_interleave_p
11339         support for variable-length unchained SLP reductions if there
11340         is no neutral value, such as for MIN/MAX reductions.  Also require
11341         the number of vector elements to be a multiple of the number of
11342         SLP statements when doing variable-length unchained SLP reductions.
11343         Update call to vect_create_epilog_for_reduction.
11344         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
11345         and remove initial values.
11346         (duplicate_and_interleave): Make public.
11347         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
11348         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
11350 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11351             Alan Hayward  <alan.hayward@arm.com>
11352             David Sherwood  <david.sherwood@arm.com>
11354         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
11355         (can_duplicate_and_interleave_p): New function.
11356         (vect_get_and_check_slp_defs): Take the vector of statements
11357         rather than just the current one.  Remove excess parentheses.
11358         Restriction rejectinon of vect_constant_def and vect_external_def
11359         for variable-length vectors to boolean types, or types for which
11360         can_duplicate_and_interleave_p is false.
11361         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
11362         (duplicate_and_interleave): New function.
11363         (vect_get_constant_vectors): Use gimple_build_vector for
11364         constant-length vectors and suitable variable-length constant
11365         vectors.  Use duplicate_and_interleave for other variable-length
11366         vectors.  Don't defer the update when inserting new statements.
11368 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11369             Alan Hayward  <alan.hayward@arm.com>
11370             David Sherwood  <david.sherwood@arm.com>
11372         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
11373         min_profitable_iters doesn't go negative.
11375 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11376             Alan Hayward  <alan.hayward@arm.com>
11377             David Sherwood  <david.sherwood@arm.com>
11379         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
11380         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
11381         * optabs.def (vec_mask_load_lanes_optab): New optab.
11382         (vec_mask_store_lanes_optab): Likewise.
11383         * internal-fn.def (MASK_LOAD_LANES): New internal function.
11384         (MASK_STORE_LANES): Likewise.
11385         * internal-fn.c (mask_load_lanes_direct): New macro.
11386         (mask_store_lanes_direct): Likewise.
11387         (expand_mask_load_optab_fn): Handle masked operations.
11388         (expand_mask_load_lanes_optab_fn): New macro.
11389         (expand_mask_store_optab_fn): Handle masked operations.
11390         (expand_mask_store_lanes_optab_fn): New macro.
11391         (direct_mask_load_lanes_optab_supported_p): Likewise.
11392         (direct_mask_store_lanes_optab_supported_p): Likewise.
11393         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
11394         parameter.
11395         (vect_load_lanes_supported): Likewise.
11396         * tree-vect-data-refs.c (strip_conversion): New function.
11397         (can_group_stmts_p): Likewise.
11398         (vect_analyze_data_ref_accesses): Use it instead of checking
11399         for a pair of assignments.
11400         (vect_store_lanes_supported): Take a masked_p parameter.
11401         (vect_load_lanes_supported): Likewise.
11402         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
11403         vect_store_lanes_supported and vect_load_lanes_supported.
11404         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11405         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
11406         parameter.  Don't allow gaps for masked accesses.
11407         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
11408         and vect_load_lanes_supported.
11409         (get_load_store_type): Take a masked_p parameter and update
11410         call to get_group_load_store_type.
11411         (vectorizable_store): Update call to get_load_store_type.
11412         Handle IFN_MASK_STORE_LANES.
11413         (vectorizable_load): Update call to get_load_store_type.
11414         Handle IFN_MASK_LOAD_LANES.
11416 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11417             Alan Hayward  <alan.hayward@arm.com>
11418             David Sherwood  <david.sherwood@arm.com>
11420         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
11421         modes for SVE.
11422         * config/aarch64/aarch64-protos.h
11423         (aarch64_sve_struct_memory_operand_p): Declare.
11424         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
11425         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
11426         (VPRED, vpred): Handle SVE structure modes.
11427         * config/aarch64/constraints.md (Utx): New constraint.
11428         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
11429         (aarch64_sve_struct_nonimmediate_operand): New predicates.
11430         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
11431         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
11432         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
11433         structure modes.  Split into pieces after RA.
11434         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
11435         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
11436         New patterns.
11437         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
11438         SVE structure modes.
11439         (aarch64_classify_address): Likewise.
11440         (sizetochar): Move earlier in file.
11441         (aarch64_print_operand): Handle SVE register lists.
11442         (aarch64_array_mode): New function.
11443         (aarch64_sve_struct_memory_operand_p): Likewise.
11444         (TARGET_ARRAY_MODE): Redefine.
11446 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11447             Alan Hayward  <alan.hayward@arm.com>
11448             David Sherwood  <david.sherwood@arm.com>
11450         * target.def (array_mode): New target hook.
11451         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
11452         * doc/tm.texi: Regenerate.
11453         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
11454         * hooks.c (hook_optmode_mode_uhwi_none): New function.
11455         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
11456         targetm.array_mode.
11457         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
11458         type sizes.
11460 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11461             Alan Hayward  <alan.hayward@arm.com>
11462             David Sherwood  <david.sherwood@arm.com>
11464         * fold-const.c (fold_binary_loc): Check the argument types
11465         rather than the result type when testing for a vector operation.
11467 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11469         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
11470         * doc/tm.texi: Regenerate.
11472 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11473             Alan Hayward  <alan.hayward@arm.com>
11474             David Sherwood  <david.sherwood@arm.com>
11476         * doc/invoke.texi (-msve-vector-bits=): Document new option.
11477         (sve): Document new AArch64 extension.
11478         * doc/md.texi (w): Extend the description of the AArch64
11479         constraint to include SVE vectors.
11480         (Upl, Upa): Document new AArch64 predicate constraints.
11481         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
11482         enum.
11483         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
11484         (msve-vector-bits=): New option.
11485         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
11486         SVE when these are disabled.
11487         (sve): New extension.
11488         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
11489         modes.  Adjust their number of units based on aarch64_sve_vg.
11490         (MAX_BITSIZE_MODE_ANY_MODE): Define.
11491         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
11492         aarch64_addr_query_type.
11493         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
11494         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
11495         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
11496         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
11497         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
11498         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
11499         (aarch64_simd_imm_zero_p): Delete.
11500         (aarch64_check_zero_based_sve_index_immediate): Declare.
11501         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11502         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11503         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11504         (aarch64_sve_float_mul_immediate_p): Likewise.
11505         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11506         rather than an rtx.
11507         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11508         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11509         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11510         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11511         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11512         (aarch64_regmode_natural_size): Likewise.
11513         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11514         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11515         left one place.
11516         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11517         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11518         for VG and the SVE predicate registers.
11519         (V_ALIASES): Add a "z"-prefixed alias.
11520         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11521         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11522         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11523         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11524         (REG_CLASS_NAMES): Add entries for them.
11525         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
11526         and the predicate registers.
11527         (aarch64_sve_vg): Declare.
11528         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11529         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11530         (REGMODE_NATURAL_SIZE): Define.
11531         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11532         SVE macros.
11533         * config/aarch64/aarch64.c: Include cfgrtl.h.
11534         (simd_immediate_info): Add a constructor for series vectors,
11535         and an associated step field.
11536         (aarch64_sve_vg): New variable.
11537         (aarch64_dbx_register_number): Handle VG and the predicate registers.
11538         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11539         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11540         (VEC_ANY_DATA, VEC_STRUCT): New constants.
11541         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11542         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11543         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11544         (aarch64_get_mask_mode): New functions.
11545         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11546         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11547         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
11548         predicate modes and predicate registers.  Explicitly restrict
11549         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
11550         to store a vector mode if it is recognized by
11551         aarch64_classify_vector_mode.
11552         (aarch64_regmode_natural_size): New function.
11553         (aarch64_hard_regno_caller_save_mode): Return the original mode
11554         for predicates.
11555         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
11556         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
11557         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
11558         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
11559         functions.
11560         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
11561         does not overlap dest if the function is frame-related.  Handle
11562         SVE constants.
11563         (aarch64_split_add_offset): New function.
11564         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
11565         them aarch64_add_offset.
11566         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
11567         and update call to aarch64_sub_sp.
11568         (aarch64_add_cfa_expression): New function.
11569         (aarch64_expand_prologue): Pass extra temporary registers to the
11570         functions above.  Handle the case in which we need to emit new
11571         DW_CFA_expressions for registers that were originally saved
11572         relative to the stack pointer, but now have to be expressed
11573         relative to the frame pointer.
11574         (aarch64_output_mi_thunk): Pass extra temporary registers to the
11575         functions above.
11576         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
11577         IP0 and IP1 values for SVE frames.
11578         (aarch64_expand_vec_series): New function.
11579         (aarch64_expand_sve_widened_duplicate): Likewise.
11580         (aarch64_expand_sve_const_vector): Likewise.
11581         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
11582         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
11583         into the register, rather than emitting a SET directly.
11584         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
11585         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
11586         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
11587         (offset_9bit_signed_scaled_p): New functions.
11588         (aarch64_replicate_bitmask_imm): New function.
11589         (aarch64_bitmask_imm): Use it.
11590         (aarch64_cannot_force_const_mem): Reject expressions involving
11591         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
11592         (aarch64_classify_index): Handle SVE indices, by requiring
11593         a plain register index with a scale that matches the element size.
11594         (aarch64_classify_address): Handle SVE addresses.  Assert that
11595         the mode of the address is VOIDmode or an integer mode.
11596         Update call to aarch64_classify_symbol.
11597         (aarch64_classify_symbolic_expression): Update call to
11598         aarch64_classify_symbol.
11599         (aarch64_const_vec_all_in_range_p): New function.
11600         (aarch64_print_vector_float_operand): Likewise.
11601         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
11602         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
11603         and the FP immediates 1.0 and 0.5.
11604         (aarch64_print_address_internal): Handle SVE addresses.
11605         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
11606         (aarch64_regno_regclass): Handle predicate registers.
11607         (aarch64_secondary_reload): Handle big-endian reloads of SVE
11608         data modes.
11609         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
11610         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
11611         (aarch64_convert_sve_vector_bits): New function.
11612         (aarch64_override_options): Use it to handle -msve-vector-bits=.
11613         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11614         rather than an rtx.
11615         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
11616         Handle SVE vector and predicate modes.  Accept VL-based constants
11617         that need only one temporary register, and VL offsets that require
11618         no temporary registers.
11619         (aarch64_conditional_register_usage): Mark the predicate registers
11620         as fixed if SVE isn't available.
11621         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11622         Return true for SVE vector and predicate modes.
11623         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11624         rather than an unsigned int.  Handle SVE modes.
11625         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
11626         SVE modes.
11627         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11628         if SVE is enabled.
11629         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11630         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11631         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11632         (aarch64_sve_float_mul_immediate_p): New functions.
11633         (aarch64_sve_valid_immediate): New function.
11634         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11635         Explicitly reject structure modes.  Check for INDEX constants.
11636         Handle PTRUE and PFALSE constants.
11637         (aarch64_check_zero_based_sve_index_immediate): New function.
11638         (aarch64_simd_imm_zero_p): Delete.
11639         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11640         vector modes.  Accept constants in the range of CNT[BHWD].
11641         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11642         ask for an Advanced SIMD mode.
11643         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11644         (aarch64_simd_vector_alignment): Handle SVE predicates.
11645         (aarch64_vectorize_preferred_vector_alignment): New function.
11646         (aarch64_simd_vector_alignment_reachable): Use it instead of
11647         the vector size.
11648         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11649         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11650         functions.
11651         (MAX_VECT_LEN): Delete.
11652         (expand_vec_perm_d): Add a vec_flags field.
11653         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11654         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11655         (aarch64_evpc_ext): Don't apply a big-endian lane correction
11656         for SVE modes.
11657         (aarch64_evpc_rev): Rename to...
11658         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
11659         (aarch64_evpc_rev_global): New function.
11660         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11661         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11662         MAX_VECT_LEN.
11663         (aarch64_evpc_sve_tbl): New function.
11664         (aarch64_expand_vec_perm_const_1): Update after rename of
11665         aarch64_evpc_rev.  Handle SVE permutes too, trying
11666         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11667         than aarch64_evpc_tbl.
11668         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11669         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11670         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11671         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11672         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11673         (aarch64_expand_sve_vcond): New functions.
11674         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11675         of aarch64_vector_mode_p.
11676         (aarch64_dwarf_poly_indeterminate_value): New function.
11677         (aarch64_compute_pressure_classes): Likewise.
11678         (aarch64_can_change_mode_class): Likewise.
11679         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11680         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11681         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11682         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11683         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11684         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11685         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11686         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11687         constraints.
11688         (Dn, Dl, Dr): Accept const as well as const_vector.
11689         (Dz): Likewise.  Compare against CONST0_RTX.
11690         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11691         of "vector" where appropriate.
11692         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11693         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11694         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11695         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11696         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11697         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11698         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11699         (v_int_equiv): Extend to SVE modes.
11700         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11701         mode attributes.
11702         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11703         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11704         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11705         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11706         (SVE_COND_FP_CMP): New int iterators.
11707         (perm_hilo): Handle the new unpack unspecs.
11708         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11709         attributes.
11710         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11711         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11712         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11713         (aarch64_equality_operator, aarch64_constant_vector_operand)
11714         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11715         (aarch64_sve_nonimmediate_operand): Likewise.
11716         (aarch64_sve_general_operand): Likewise.
11717         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11718         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11719         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11720         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11721         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11722         (aarch64_sve_float_arith_immediate): Likewise.
11723         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11724         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11725         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11726         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11727         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11728         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11729         (aarch64_sve_float_arith_operand): Likewise.
11730         (aarch64_sve_float_arith_with_sub_operand): Likewise.
11731         (aarch64_sve_float_mul_operand): Likewise.
11732         (aarch64_sve_vec_perm_operand): Likewise.
11733         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11734         (aarch64_mov_operand): Accept const_poly_int and const_vector.
11735         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11736         as well as const_vector.
11737         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11738         in file.  Use CONST0_RTX and CONSTM1_RTX.
11739         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
11740         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11741         Use aarch64_simd_imm_zero.
11742         * config/aarch64/aarch64-sve.md: New file.
11743         * config/aarch64/aarch64.md: Include it.
11744         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11745         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11746         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11747         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11748         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11749         (sve): New attribute.
11750         (enabled): Disable instructions with the sve attribute unless
11751         TARGET_SVE.
11752         (movqi, movhi): Pass CONST_POLY_INT operaneds through
11753         aarch64_expand_mov_immediate.
11754         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11755         CNT[BHSD] immediates.
11756         (movti): Split CONST_POLY_INT moves into two halves.
11757         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11758         Split additions that need a temporary here if the destination
11759         is the stack pointer.
11760         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11761         (*add<mode>3_poly_1): New instruction.
11762         (set_clobber_cc): New expander.
11764 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11766         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11767         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
11768         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11769         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11770         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
11771         Change innermode from fixed_mode_size to machine_mode.
11772         (simplify_subreg): Update call accordingly.  Handle a constant-sized
11773         subreg of a variable-length CONST_VECTOR.
11775 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
11776             Alan Hayward  <alan.hayward@arm.com>
11777             David Sherwood  <david.sherwood@arm.com>
11779         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11780         (add_offset_to_base): New function, split out from...
11781         (create_mem_ref): ...here.  When handling a scale other than 1,
11782         check first whether the address is valid without the offset.
11783         Add it into the base if so, leaving the index and scale as-is.
11785 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11787         PR c++/83778
11788         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11789         fold_for_warn before checking if arg2 is INTEGER_CST.
11791 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
11793         * config/rs6000/predicates.md (load_multiple_operation): Delete.
11794         (store_multiple_operation): Delete.
11795         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11796         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11797         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11798         guarded by TARGET_STRING.
11799         (rs6000_output_load_multiple): Delete.
11800         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11801         OPTION_MASK_STRING / TARGET_STRING handling.
11802         (print_operand) <'N', 'O'>: Add comment that these are unused now.
11803         (const rs6000_opt_masks) <"string">: Change mask to 0.
11804         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11805         (MASK_STRING): Delete.
11806         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11807         parts.  Simplify.
11808         (load_multiple): Delete.
11809         (*ldmsi8): Delete.
11810         (*ldmsi7): Delete.
11811         (*ldmsi6): Delete.
11812         (*ldmsi5): Delete.
11813         (*ldmsi4): Delete.
11814         (*ldmsi3): Delete.
11815         (store_multiple): Delete.
11816         (*stmsi8): Delete.
11817         (*stmsi7): Delete.
11818         (*stmsi6): Delete.
11819         (*stmsi5): Delete.
11820         (*stmsi4): Delete.
11821         (*stmsi3): Delete.
11822         (movmemsi_8reg): Delete.
11823         (corresponding unnamed define_insn): Delete.
11824         (movmemsi_6reg): Delete.
11825         (corresponding unnamed define_insn): Delete.
11826         (movmemsi_4reg): Delete.
11827         (corresponding unnamed define_insn): Delete.
11828         (movmemsi_2reg): Delete.
11829         (corresponding unnamed define_insn): Delete.
11830         (movmemsi_1reg): Delete.
11831         (corresponding unnamed define_insn): Delete.
11832         * config/rs6000/rs6000.opt (mno-string): New.
11833         (mstring): Replace by deprecation warning stub.
11834         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11836 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
11838         * regrename.c (regrename_do_replace): If replacing the same
11839         reg multiple times, try to reuse last created gen_raw_REG.
11841         PR debug/81155
11842         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11843         main to workaround a bug in GDB.
11845 2018-01-12  Tom de Vries  <tom@codesourcery.com>
11847         PR target/83737
11848         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11850 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
11852         PR rtl-optimization/80481
11853         * ira-color.c (get_cap_member): New function.
11854         (allocnos_conflict_by_live_ranges_p): Use it.
11855         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11856         (setup_slot_coalesced_allocno_live_ranges): Ditto.
11858 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
11860         PR target/83628
11861         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11862         (*saddl_se_1): Ditto.
11863         (*ssubsi_1): Ditto.
11864         (*ssubl_se_1): Ditto.
11866 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11868         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11869         rather than wi::to_widest for DR_INITs.
11870         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11871         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11872         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11873         INTEGER_CSTs.
11874         (vect_analyze_group_access_1): Note that here.
11876 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11878         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11879         polynomial type sizes.
11881 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
11883         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11884         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11885         (gimple_add_tmp_var): Likewise.
11887 2018-01-12  Martin Liska  <mliska@suse.cz>
11889         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11890         (gimple_alloc_sizes): Likewise.
11891         (dump_gimple_statistics): Use PRIu64 in printf format.
11892         * gimple.h: Change uint64_t to int.
11894 2018-01-12  Martin Liska  <mliska@suse.cz>
11896         * tree-core.h: Use uint64_t instead of int.
11897         * tree.c (tree_node_counts): Likewise.
11898         (tree_node_sizes): Likewise.
11899         (dump_tree_statistics): Use PRIu64 in printf format.
11901 2018-01-12  Martin Liska  <mliska@suse.cz>
11903         * Makefile.in: As qsort_chk is implemented in vec.c, add
11904         vec.o to linkage of gencfn-macros.
11905         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11906         passing the info to record_node_allocation_statistics.
11907         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11908         and pass the info.
11909         * ggc-common.c (struct ggc_usage): Add operator== and use
11910         it in operator< and compare function.
11911         * mem-stats.h (struct mem_usage): Likewise.
11912         * vec.c (struct vec_usage): Remove operator< and compare
11913         function. Can be simply inherited.
11915 2018-01-12  Martin Jambor  <mjambor@suse.cz>
11917         PR target/81616
11918         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11919         * tree-ssa-math-opts.c: Include domwalk.h.
11920         (convert_mult_to_fma_1): New function.
11921         (fma_transformation_info): New type.
11922         (fma_deferring_state): Likewise.
11923         (cancel_fma_deferring): New function.
11924         (result_of_phi): Likewise.
11925         (last_fma_candidate_feeds_initial_phi): Likewise.
11926         (convert_mult_to_fma): Added deferring logic, split actual
11927         transformation to convert_mult_to_fma_1.
11928         (math_opts_dom_walker): New type.
11929         (math_opts_dom_walker::after_dom_children): New method, body moved
11930         here from pass_optimize_widening_mul::execute, added deferring logic
11931         bits.
11932         (pass_optimize_widening_mul::execute): Moved most of code to
11933         math_opts_dom_walker::after_dom_children.
11934         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11935         * config/i386/i386.c (ix86_option_override_internal): Added
11936         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11938 2018-01-12  Richard Biener  <rguenther@suse.de>
11940         PR debug/83157
11941         * dwarf2out.c (gen_variable_die): Do not reset old_die for
11942         inline instance vars.
11944 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
11946         PR target/81819
11947         * config/rx/rx.c (rx_is_restricted_memory_address):
11948         Handle SUBREG case.
11950 2018-01-12  Richard Biener  <rguenther@suse.de>
11952         PR tree-optimization/80846
11953         * target.def (split_reduction): New target hook.
11954         * targhooks.c (default_split_reduction): New function.
11955         * targhooks.h (default_split_reduction): Declare.
11956         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11957         target requests first reduce vectors by combining low and high
11958         parts.
11959         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11960         (get_vectype_for_scalar_type_and_size): Export.
11961         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11962         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11963         * doc/tm.texi: Regenerate.
11964         * config/i386/i386.c (ix86_split_reduction): Implement
11965         TARGET_VECTORIZE_SPLIT_REDUCTION.
11967 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11969         PR target/83368
11970         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11971         in PIC mode except for TARGET_VXWORKS_RTP.
11972         * config/sparc/sparc.c: Include cfgrtl.h.
11973         (TARGET_INIT_PIC_REG): Define.
11974         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11975         (sparc_pic_register_p): New predicate.
11976         (sparc_legitimate_address_p): Use it.
11977         (sparc_legitimize_pic_address): Likewise.
11978         (sparc_delegitimize_address): Likewise.
11979         (sparc_mode_dependent_address_p): Likewise.
11980         (gen_load_pcrel_sym): Remove 4th parameter.
11981         (load_got_register): Adjust call to above.  Remove obsolete stuff.
11982         (sparc_expand_prologue): Do not call load_got_register here.
11983         (sparc_flat_expand_prologue): Likewise.
11984         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11985         (sparc_use_pseudo_pic_reg): New function.
11986         (sparc_init_pic_reg): Likewise.
11987         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11988         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11990 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
11992         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11993         Add item for branch_cost.
11995 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11997         PR rtl-optimization/83565
11998         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11999         not extend the result to a larger mode for rotate operations.
12000         (num_sign_bit_copies1): Likewise.
12002 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12004         PR target/40411
12005         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
12006         -symbolic.
12007         Use values-Xc.o for -pedantic.
12008         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
12010 2018-01-12  Martin Liska  <mliska@suse.cz>
12012         PR ipa/83054
12013         * ipa-devirt.c (final_warning_record::grow_type_warnings):
12014         New function.
12015         (possible_polymorphic_call_targets): Use it.
12016         (ipa_devirt): Likewise.
12018 2018-01-12  Martin Liska  <mliska@suse.cz>
12020         * profile-count.h (enum profile_quality): Use 0 as invalid
12021         enum value of profile_quality.
12023 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12025         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
12026         -mext-string options.
12028 2018-01-12  Richard Biener  <rguenther@suse.de>
12030         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
12031         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
12032         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
12033         Likewise.
12034         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
12036 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
12038         * configure.ac (--with-long-double-format): Add support for the
12039         configuration option to change the default long double format on
12040         PowerPC systems.
12041         * config.gcc (powerpc*-linux*-*): Likewise.
12042         * configure: Regenerate.
12043         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
12044         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
12045         used without modification.
12047 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12049         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
12050         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
12051         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
12052         MISC_BUILTIN_SPEC_BARRIER.
12053         (rs6000_init_builtins): Likewise.
12054         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
12055         enum value.
12056         (speculation_barrier): New define_insn.
12057         * doc/extend.texi: Document __builtin_speculation_barrier.
12059 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
12061         PR target/83203
12062         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
12063         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
12064         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
12065         iterators.
12066         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
12067         integral modes instead of "ss" and "sd".
12068         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
12069         vectors with 32-bit and 64-bit elements.
12070         (vecdupssescalarmodesuffix): New mode attribute.
12071         (vec_dup<mode>): Use it.
12073 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
12075         PR target/83330
12076         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
12077         frame if argument is passed on stack.
12079 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
12081         PR target/82682
12082         * ree.c (combine_reaching_defs): Optimize also
12083         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
12084         reg2=any_extend(exp); reg1=reg2;, formatting fix.
12086 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
12088         PR middle-end/83189
12089         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
12091 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
12093         PR middle-end/83718
12094         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
12095         after they are computed.
12097 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
12099         PR tree-optimization/83695
12100         * gimple-loop-linterchange.cc
12101         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
12102         reset cached scev information after interchange.
12103         (pass_linterchange::execute): Remove call to scev_reset_htab.
12105 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12107         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
12108         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
12109         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
12110         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
12111         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
12112         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
12113         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
12114         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
12115         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
12116         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
12117         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
12118         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
12119         (V_lane_reg): Likewise.
12120         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
12121         New define_expand.
12122         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
12123         (vfmal_lane_low<mode>_intrinsic,
12124         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
12125         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
12126         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
12127         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
12128         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
12129         vfmsl_lane_high<mode>_intrinsic): New define_insns.
12131 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12133         * config/arm/arm-cpus.in (fp16fml): New feature.
12134         (ALL_SIMD): Add fp16fml.
12135         (armv8.2-a): Add fp16fml as an option.
12136         (armv8.3-a): Likewise.
12137         (armv8.4-a): Add fp16fml as part of fp16.
12138         * config/arm/arm.h (TARGET_FP16FML): Define.
12139         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
12140         when appropriate.
12141         * config/arm/arm-modes.def (V2HF): Define.
12142         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
12143         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
12144         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
12145         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
12146         vfmsl_low, vfmsl_high): New set of builtins.
12147         * config/arm/iterators.md (PLUSMINUS): New code iterator.
12148         (vfml_op): New code attribute.
12149         (VFMLHALVES): New int iterator.
12150         (VFML, VFMLSEL): New mode attributes.
12151         (V_reg): Define mapping for V2HF.
12152         (V_hi, V_lo): New mode attributes.
12153         (VF_constraint): Likewise.
12154         (vfml_half, vfml_half_selector): New int attributes.
12155         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
12156         define_expand.
12157         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
12158         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
12159         New define_insn.
12160         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
12161         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
12162         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
12163         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
12164         documentation.
12165         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
12166         Document new effective target and option set.
12168 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12170         * config/arm/arm-cpus.in (armv8_4): New feature.
12171         (ARMv8_4a): New fgroup.
12172         (armv8.4-a): New arch.
12173         * config/arm/arm-tables.opt: Regenerate.
12174         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
12175         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
12176         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
12177         Add matching rules for -march=armv8.4-a and extensions.
12178         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
12180 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
12182         PR target/81821
12183         * config/rx/rx.md (BW): New mode attribute.
12184         (sync_lock_test_and_setsi): Add mode suffix to insn output.
12186 2018-01-11  Richard Biener  <rguenther@suse.de>
12188         PR tree-optimization/83435
12189         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
12190         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
12191         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
12193 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12194             Alan Hayward  <alan.hayward@arm.com>
12195             David Sherwood  <david.sherwood@arm.com>
12197         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
12198         field.
12199         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
12200         (aarch64_print_address_internal): Use it to check for a zero offset.
12202 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12203             Alan Hayward  <alan.hayward@arm.com>
12204             David Sherwood  <david.sherwood@arm.com>
12206         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
12207         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
12208         Return a poly_int64 rather than a HOST_WIDE_INT.
12209         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
12210         rather than a HOST_WIDE_INT.
12211         * config/aarch64/aarch64.h (aarch64_frame): Protect with
12212         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
12213         hard_fp_offset, frame_size, initial_adjust, callee_offset and
12214         final_offset from HOST_WIDE_INT to poly_int64.
12215         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
12216         to_constant when getting the number of units in an Advanced SIMD
12217         mode.
12218         (aarch64_builtin_vectorized_function): Check for a constant number
12219         of units.
12220         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
12221         GET_MODE_SIZE.
12222         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
12223         attribute instead of GET_MODE_NUNITS.
12224         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
12225         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
12226         GET_MODE_SIZE for fixed-size registers.
12227         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
12228         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
12229         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
12230         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
12231         (aarch64_print_operand, aarch64_print_address_internal)
12232         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
12233         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
12234         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
12235         Handle polynomial GET_MODE_SIZE.
12236         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
12237         wider than SImode without modification.
12238         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
12239         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
12240         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
12241         passing and returning SVE modes.
12242         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
12243         rather than GEN_INT.
12244         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
12245         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
12246         (aarch64_allocate_and_probe_stack_space): Likewise.
12247         (aarch64_layout_frame): Cope with polynomial offsets.
12248         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
12249         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
12250         polynomial offsets.
12251         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
12252         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
12253         poly_int64 rather than a HOST_WIDE_INT.
12254         (aarch64_get_separate_components, aarch64_process_components)
12255         (aarch64_expand_prologue, aarch64_expand_epilogue)
12256         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
12257         (aarch64_anchor_offset): New function, split out from...
12258         (aarch64_legitimize_address): ...here.
12259         (aarch64_builtin_vectorization_cost): Handle polynomial
12260         TYPE_VECTOR_SUBPARTS.
12261         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
12262         GET_MODE_NUNITS.
12263         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
12264         number of elements from the PARALLEL rather than the mode.
12265         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
12266         rather than GET_MODE_BITSIZE.
12267         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
12268         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
12269         (aarch64_expand_vec_perm_const_1): Handle polynomial
12270         d->perm.length () and d->perm elements.
12271         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
12272         Apply to_constant to d->perm elements.
12273         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
12274         polynomial CONST_VECTOR_NUNITS.
12275         (aarch64_move_pointer): Take amount as a poly_int64 rather
12276         than an int.
12277         (aarch64_progress_pointer): Avoid temporary variable.
12278         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
12279         the mode attribute instead of GET_MODE.
12281 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12282             Alan Hayward  <alan.hayward@arm.com>
12283             David Sherwood  <david.sherwood@arm.com>
12285         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
12286         x exists before using it.
12287         (aarch64_add_constant_internal): Rename to...
12288         (aarch64_add_offset_1): ...this.  Replace regnum with separate
12289         src and dest rtxes.  Handle the case in which they're different,
12290         including when the offset is zero.  Replace scratchreg with an rtx.
12291         Use 2 additions if there is no spare register into which we can
12292         move a 16-bit constant.
12293         (aarch64_add_constant): Delete.
12294         (aarch64_add_offset): Replace reg with separate src and dest
12295         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
12296         Use aarch64_add_offset_1.
12297         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
12298         an rtx rather than an int.  Take the delta as a poly_int64
12299         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
12300         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
12301         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
12302         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
12303         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
12304         and aarch64_add_sp.
12305         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
12306         aarch64_add_constant.
12308 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12310         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
12311         Use scalar_float_mode.
12313 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12315         * config/aarch64/aarch64-simd.md
12316         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
12317         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
12318         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
12319         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
12320         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
12321         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
12322         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
12323         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
12324         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
12325         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
12327 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12329         PR target/83514
12330         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
12331         targ_options->x_arm_arch_string is non NULL.
12333 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
12335         * config/aarch64/aarch64.h
12336         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
12338 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
12340         PR target/82096
12341         * expmed.c (emit_store_flag_force): Swap if const op0
12342         and change VOIDmode to mode of op0.
12344 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
12346         PR rtl-optimization/83761
12347         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
12348         than bytes to mode_for_size.
12350 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12352         PR middle-end/83189
12353         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
12354         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
12355         profile.
12357 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12359         PR middle-end/83575
12360         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
12361         when in layout mode.
12362         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
12363         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
12364         partition fixup.
12366 2018-01-10  Michael Collison  <michael.collison@arm.com>
12368         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
12369         * config/aarch64/aarch64-option-extension.def: Add
12370         AARCH64_OPT_EXTENSION of 'fp16fml'.
12371         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12372         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
12373         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
12374         * config/aarch64/constraints.md (Ui7): New constraint.
12375         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
12376         (VFMLA_SEL_W): Ditto.
12377         (f16quad): Ditto.
12378         (f16mac1): Ditto.
12379         (VFMLA16_LOW): New int iterator.
12380         (VFMLA16_HIGH): Ditto.
12381         (UNSPEC_FMLAL): New unspec.
12382         (UNSPEC_FMLSL): Ditto.
12383         (UNSPEC_FMLAL2): Ditto.
12384         (UNSPEC_FMLSL2): Ditto.
12385         (f16mac): New code attribute.
12386         * config/aarch64/aarch64-simd-builtins.def
12387         (aarch64_fmlal_lowv2sf): Ditto.
12388         (aarch64_fmlsl_lowv2sf): Ditto.
12389         (aarch64_fmlalq_lowv4sf): Ditto.
12390         (aarch64_fmlslq_lowv4sf): Ditto.
12391         (aarch64_fmlal_highv2sf): Ditto.
12392         (aarch64_fmlsl_highv2sf): Ditto.
12393         (aarch64_fmlalq_highv4sf): Ditto.
12394         (aarch64_fmlslq_highv4sf): Ditto.
12395         (aarch64_fmlal_lane_lowv2sf): Ditto.
12396         (aarch64_fmlsl_lane_lowv2sf): Ditto.
12397         (aarch64_fmlal_laneq_lowv2sf): Ditto.
12398         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
12399         (aarch64_fmlalq_lane_lowv4sf): Ditto.
12400         (aarch64_fmlsl_lane_lowv4sf): Ditto.
12401         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
12402         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
12403         (aarch64_fmlal_lane_highv2sf): Ditto.
12404         (aarch64_fmlsl_lane_highv2sf): Ditto.
12405         (aarch64_fmlal_laneq_highv2sf): Ditto.
12406         (aarch64_fmlsl_laneq_highv2sf): Ditto.
12407         (aarch64_fmlalq_lane_highv4sf): Ditto.
12408         (aarch64_fmlsl_lane_highv4sf): Ditto.
12409         (aarch64_fmlalq_laneq_highv4sf): Ditto.
12410         (aarch64_fmlsl_laneq_highv4sf): Ditto.
12411         * config/aarch64/aarch64-simd.md:
12412         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
12413         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12414         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
12415         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12416         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
12417         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
12418         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
12419         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
12420         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
12421         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
12422         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
12423         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
12424         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
12425         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
12426         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
12427         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
12428         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
12429         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
12430         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
12431         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
12432         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
12433         (vfmlsl_low_u32): Ditto.
12434         (vfmlalq_low_u32): Ditto.
12435         (vfmlslq_low_u32): Ditto.
12436         (vfmlal_high_u32): Ditto.
12437         (vfmlsl_high_u32): Ditto.
12438         (vfmlalq_high_u32): Ditto.
12439         (vfmlslq_high_u32): Ditto.
12440         (vfmlal_lane_low_u32): Ditto.
12441         (vfmlsl_lane_low_u32): Ditto.
12442         (vfmlal_laneq_low_u32): Ditto.
12443         (vfmlsl_laneq_low_u32): Ditto.
12444         (vfmlalq_lane_low_u32): Ditto.
12445         (vfmlslq_lane_low_u32): Ditto.
12446         (vfmlalq_laneq_low_u32): Ditto.
12447         (vfmlslq_laneq_low_u32): Ditto.
12448         (vfmlal_lane_high_u32): Ditto.
12449         (vfmlsl_lane_high_u32): Ditto.
12450         (vfmlal_laneq_high_u32): Ditto.
12451         (vfmlsl_laneq_high_u32): Ditto.
12452         (vfmlalq_lane_high_u32): Ditto.
12453         (vfmlslq_lane_high_u32): Ditto.
12454         (vfmlalq_laneq_high_u32): Ditto.
12455         (vfmlslq_laneq_high_u32): Ditto.
12456         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
12457         (AARCH64_FL_FOR_ARCH8_4): New.
12458         (AARCH64_ISA_F16FML): New ISA flag.
12459         (TARGET_F16FML): New feature flag for fp16fml.
12460         (doc/invoke.texi): Document new fp16fml option.
12462 2018-01-10  Michael Collison  <michael.collison@arm.com>
12464         * config/aarch64/aarch64-builtins.c:
12465         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
12466         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12467         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
12468         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
12469         (AARCH64_ISA_SHA3): New ISA flag.
12470         (TARGET_SHA3): New feature flag for sha3.
12471         * config/aarch64/iterators.md (sha512_op): New int attribute.
12472         (CRYPTO_SHA512): New int iterator.
12473         (UNSPEC_SHA512H): New unspec.
12474         (UNSPEC_SHA512H2): Ditto.
12475         (UNSPEC_SHA512SU0): Ditto.
12476         (UNSPEC_SHA512SU1): Ditto.
12477         * config/aarch64/aarch64-simd-builtins.def
12478         (aarch64_crypto_sha512hqv2di): New builtin.
12479         (aarch64_crypto_sha512h2qv2di): Ditto.
12480         (aarch64_crypto_sha512su0qv2di): Ditto.
12481         (aarch64_crypto_sha512su1qv2di): Ditto.
12482         (aarch64_eor3qv8hi): Ditto.
12483         (aarch64_rax1qv2di): Ditto.
12484         (aarch64_xarqv2di): Ditto.
12485         (aarch64_bcaxqv8hi): Ditto.
12486         * config/aarch64/aarch64-simd.md:
12487         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
12488         (aarch64_crypto_sha512su0qv2di): Ditto.
12489         (aarch64_crypto_sha512su1qv2di): Ditto.
12490         (aarch64_eor3qv8hi): Ditto.
12491         (aarch64_rax1qv2di): Ditto.
12492         (aarch64_xarqv2di): Ditto.
12493         (aarch64_bcaxqv8hi): Ditto.
12494         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
12495         (vsha512h2q_u64): Ditto.
12496         (vsha512su0q_u64): Ditto.
12497         (vsha512su1q_u64): Ditto.
12498         (veor3q_u16): Ditto.
12499         (vrax1q_u64): Ditto.
12500         (vxarq_u64): Ditto.
12501         (vbcaxq_u16): Ditto.
12502         * config/arm/types.md (crypto_sha512): New type attribute.
12503         (crypto_sha3): Ditto.
12504         (doc/invoke.texi): Document new sha3 option.
12506 2018-01-10  Michael Collison  <michael.collison@arm.com>
12508         * config/aarch64/aarch64-builtins.c:
12509         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12510         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12511         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12512         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12513         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12514         (AARCH64_ISA_SM4): New ISA flag.
12515         (TARGET_SM4): New feature flag for sm4.
12516         * config/aarch64/aarch64-simd-builtins.def
12517         (aarch64_sm3ss1qv4si): Ditto.
12518         (aarch64_sm3tt1aq4si): Ditto.
12519         (aarch64_sm3tt1bq4si): Ditto.
12520         (aarch64_sm3tt2aq4si): Ditto.
12521         (aarch64_sm3tt2bq4si): Ditto.
12522         (aarch64_sm3partw1qv4si): Ditto.
12523         (aarch64_sm3partw2qv4si): Ditto.
12524         (aarch64_sm4eqv4si): Ditto.
12525         (aarch64_sm4ekeyqv4si): Ditto.
12526         * config/aarch64/aarch64-simd.md:
12527         (aarch64_sm3ss1qv4si): Ditto.
12528         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12529         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12530         (aarch64_sm4eqv4si): Ditto.
12531         (aarch64_sm4ekeyqv4si): Ditto.
12532         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12533         (sm3part_op): Ditto.
12534         (CRYPTO_SM3TT): Ditto.
12535         (CRYPTO_SM3PART): Ditto.
12536         (UNSPEC_SM3SS1): New unspec.
12537         (UNSPEC_SM3TT1A): Ditto.
12538         (UNSPEC_SM3TT1B): Ditto.
12539         (UNSPEC_SM3TT2A): Ditto.
12540         (UNSPEC_SM3TT2B): Ditto.
12541         (UNSPEC_SM3PARTW1): Ditto.
12542         (UNSPEC_SM3PARTW2): Ditto.
12543         (UNSPEC_SM4E): Ditto.
12544         (UNSPEC_SM4EKEY): Ditto.
12545         * config/aarch64/constraints.md (Ui2): New constraint.
12546         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12547         * config/arm/types.md (crypto_sm3): New type attribute.
12548         (crypto_sm4): Ditto.
12549         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12550         (vsm3tt1aq_u32): Ditto.
12551         (vsm3tt1bq_u32): Ditto.
12552         (vsm3tt2aq_u32): Ditto.
12553         (vsm3tt2bq_u32): Ditto.
12554         (vsm3partw1q_u32): Ditto.
12555         (vsm3partw2q_u32): Ditto.
12556         (vsm4eq_u32): Ditto.
12557         (vsm4ekeyq_u32): Ditto.
12558         (doc/invoke.texi): Document new sm4 option.
12560 2018-01-10  Michael Collison  <michael.collison@arm.com>
12562         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
12563         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
12564         (AARCH64_FL_FOR_ARCH8_4): New.
12565         (AARCH64_FL_V8_4): New flag.
12566         (doc/invoke.texi): Document new armv8.4-a option.
12568 2018-01-10  Michael Collison  <michael.collison@arm.com>
12570         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12571         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
12572         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
12573         * config/aarch64/aarch64-option-extension.def: Add
12574         AARCH64_OPT_EXTENSION of 'sha2'.
12575         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
12576         (crypto): Disable sha2 and aes if crypto disabled.
12577         (crypto): Enable aes and sha2 if enabled.
12578         (simd): Disable sha2 and aes if simd disabled.
12579         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
12580         New flags.
12581         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
12582         (TARGET_SHA2): New feature flag for sha2.
12583         (TARGET_AES): New feature flag for aes.
12584         * config/aarch64/aarch64-simd.md:
12585         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
12586         conditional on TARGET_AES.
12587         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
12588         (aarch64_crypto_sha1hsi): Make pattern conditional
12589         on TARGET_SHA2.
12590         (aarch64_crypto_sha1hv4si): Ditto.
12591         (aarch64_be_crypto_sha1hv4si): Ditto.
12592         (aarch64_crypto_sha1su1v4si): Ditto.
12593         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
12594         (aarch64_crypto_sha1su0v4si): Ditto.
12595         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
12596         (aarch64_crypto_sha256su0v4si): Ditto.
12597         (aarch64_crypto_sha256su1v4si): Ditto.
12598         (doc/invoke.texi): Document new aes and sha2 options.
12600 2018-01-10  Martin Sebor  <msebor@redhat.com>
12602         PR tree-optimization/83781
12603         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
12604         as string arrays.
12606 2018-01-11  Martin Sebor  <msebor@gmail.com>
12607             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12609         PR tree-optimization/83501
12610         PR tree-optimization/81703
12612         * tree-ssa-strlen.c (get_string_cst): Rename...
12613         (get_string_len): ...to this.  Handle global constants.
12614         (handle_char_store): Adjust.
12616 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
12617             Jim Wilson  <jimw@sifive.com>
12619         * config/riscv/riscv-protos.h (riscv_output_return): New.
12620         * config/riscv/riscv.c (struct machine_function): New naked_p field.
12621         (riscv_attribute_table, riscv_output_return),
12622         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12623         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12624         (riscv_compute_frame_info): Only compute frame->mask if not a naked
12625         function.
12626         (riscv_expand_prologue): Add early return for naked function.
12627         (riscv_expand_epilogue): Likewise.
12628         (riscv_function_ok_for_sibcall): Return false for naked function.
12629         (riscv_set_current_function): New.
12630         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12631         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12632         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12633         * doc/extend.texi (RISC-V Function Attributes): New.
12635 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12637         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12638         check for 128-bit long double before checking TCmode.
12639         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12640         128-bit long doubles before checking TFmode or TCmode.
12641         (FLOAT128_IBM_P): Likewise.
12643 2018-01-10  Martin Sebor  <msebor@redhat.com>
12645         PR tree-optimization/83671
12646         * builtins.c (c_strlen): Unconditionally return zero for the empty
12647         string.
12648         Use -Warray-bounds for warnings.
12649         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12650         for non-constant array indices with COMPONENT_REF, arrays of
12651         arrays, and pointers to arrays.
12652         (gimple_fold_builtin_strlen): Determine and set length range for
12653         non-constant character arrays.
12655 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
12657         PR middle-end/81897
12658         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12659         empty blocks.
12661 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
12663         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12665 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12667         PR target/83399
12668         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12669         VECTOR_MEM_ALTIVEC_OR_VSX_P.
12670         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12671         indexed_or_indirect_operand predicate.
12672         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12673         (*vsx_le_perm_load_v8hi): Likewise.
12674         (*vsx_le_perm_load_v16qi): Likewise.
12675         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12676         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12677         (*vsx_le_perm_store_v8hi): Likewise.
12678         (*vsx_le_perm_store_v16qi): Likewise.
12679         (eight unnamed splitters): Likewise.
12681 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
12683         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12684         * config/rs6000/emmintrin.h: Likewise.
12685         * config/rs6000/mmintrin.h: Likewise.
12686         * config/rs6000/xmmintrin.h: Likewise.
12688 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
12690         PR c++/43486
12691         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12692         "public_flag".
12693         * tree.c (tree_nop_conversion): Return true for location wrapper
12694         nodes.
12695         (maybe_wrap_with_location): New function.
12696         (selftest::check_strip_nops): New function.
12697         (selftest::test_location_wrappers): New function.
12698         (selftest::tree_c_tests): Call it.
12699         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12700         (maybe_wrap_with_location): New decl.
12701         (EXPR_LOCATION_WRAPPER_P): New macro.
12702         (location_wrapper_p): New inline function.
12703         (tree_strip_any_location_wrapper): New inline function.
12705 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
12707         PR target/83735
12708         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12709         stack_realign_offset for the largest alignment of stack slot
12710         actually used.
12711         (ix86_find_max_used_stack_alignment): New function.
12712         (ix86_finalize_stack_frame_flags): Use it.  Set
12713         max_used_stack_alignment if we don't realign stack.
12714         * config/i386/i386.h (machine_function): Add
12715         max_used_stack_alignment.
12717 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
12719         * config/arm/arm.opt (-mbranch-cost): New option.
12720         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12721         account.
12723 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
12725         PR target/83629
12726         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12727         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12729 2018-01-10  Richard Biener  <rguenther@suse.de>
12731         PR debug/83765
12732         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12733         early out so it also covers the case where we have a non-NULL
12734         origin.
12736 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12738         PR tree-optimization/83753
12739         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12740         for non-strided grouped accesses if the number of elements is 1.
12742 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
12744         PR target/81616
12745         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12746         * i386.h (TARGET_USE_GATHER): Define.
12747         * x86-tune.def (X86_TUNE_USE_GATHER): New.
12749 2018-01-10  Martin Liska  <mliska@suse.cz>
12751         PR bootstrap/82831
12752         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12753         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12754         partitioning.
12755         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12756         CLEANUP_NO_PARTITIONING is not set.
12758 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
12760         * doc/rtl.texi: Remove documentation of (const ...) wrappers
12761         for vectors, as a partial revert of r254296.
12762         * rtl.h (const_vec_p): Delete.
12763         (const_vec_duplicate_p): Don't test for vector CONSTs.
12764         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12765         * expmed.c (make_tree): Likewise.
12767         Revert:
12768         * common.md (E, F): Use CONSTANT_P instead of checking for
12769         CONST_VECTOR.
12770         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12771         checking for CONST_VECTOR.
12773 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12775         PR middle-end/83575
12776         * predict.c (force_edge_cold): Handle in more sane way edges
12777         with no prediction.
12779 2018-01-09  Carl Love  <cel@us.ibm.com>
12781         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12782         V4SI, V4SF types.
12783         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12784         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12785         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12786         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
12787         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12788         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
12789         * config/rs6000/rs6000-protos.h: Add extern defition for
12790         rs6000_generate_float2_double_code.
12791         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12792         function.
12793         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12794         (float2_v2df): Add define_expand.
12796 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
12798         PR target/83628
12799         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12800         op_mode in the force_to_mode call.
12802 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12804         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12805         instead of checking each element individually.
12806         (aarch64_evpc_uzp): Likewise.
12807         (aarch64_evpc_zip): Likewise.
12808         (aarch64_evpc_ext): Likewise.
12809         (aarch64_evpc_rev): Likewise.
12810         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12811         instead of checking each element individually.  Return true without
12812         generating rtl if
12813         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12814         whether all selected elements come from the same input, instead of
12815         checking each element individually.  Remove calls to gen_rtx_REG,
12816         start_sequence and end_sequence and instead assert that no rtl is
12817         generated.
12819 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12821         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12822         order of HIGH and CONST checks.
12824 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
12826         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12827         if the destination isn't an SSA_NAME.
12829 2018-01-09  Richard Biener  <rguenther@suse.de>
12831         PR tree-optimization/83668
12832         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12833         move prologue...
12834         (canonicalize_loop_form): ... here, renamed from ...
12835         (canonicalize_loop_closed_ssa_form): ... this and amended to
12836         swap successor edges for loop exit blocks to make us use
12837         the RPO order we need for initial schedule generation.
12839 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
12841         PR tree-optimization/64811
12842         * match.pd: When optimizing comparisons with Inf, avoid
12843         introducing or losing exceptions from comparisons with NaN.
12845 2018-01-09  Martin Liska  <mliska@suse.cz>
12847         PR sanitizer/82517
12848         * asan.c (shadow_mem_size): Add gcc_assert.
12850 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
12852         Don't save registers in main().
12854         PR target/83738
12855         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12856         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12857         * config/avr/avr.c (avr_set_current_function): Don't error if
12858         naked, OS_task or OS_main are specified at the same time.
12859         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12860         OS_main.
12861         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12862         attribute.
12863         * common/config/avr/avr-common.c (avr_option_optimization_table):
12864         Switch on -mmain-is-OS_task for optimizing compilations.
12866 2018-01-09  Richard Biener  <rguenther@suse.de>
12868         PR tree-optimization/83572
12869         * graphite.c: Include cfganal.h.
12870         (graphite_transform_loops): Connect infinite loops to exit
12871         and remove fake edges at the end.
12873 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12875         * ipa-inline.c (edge_badness): Revert accidental checkin.
12877 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
12879         PR ipa/80763
12880         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12881         symbols; not inline clones.
12883 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
12885         PR target/83507
12886         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12887         hard registers.  Formatting fixes.
12889         PR preprocessor/83722
12890         * gcc.c (try_generate_repro): Pass
12891         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12892         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12893         do_report_bug.
12895 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
12896             Kito Cheng  <kito.cheng@gmail.com>
12898         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12899         (riscv_leaf_function_p): Delete.
12900         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12902 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12904         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12905         function.
12906         (do_ifelse): New function.
12907         (do_isel): New function.
12908         (do_sub3): New function.
12909         (do_add3): New function.
12910         (do_load_mask_compare): New function.
12911         (do_overlap_load_compare): New function.
12912         (expand_compare_loop): New function.
12913         (expand_block_compare): Call expand_compare_loop() when appropriate.
12914         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12915         option description.
12916         (-mblock-compare-inline-loop-limit): New option.
12918 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12920         PR target/83677
12921         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12922         Reverse order of second and third operands in first alternative.
12923         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12924         of first and second elements in UNSPEC_VPERMR vector.
12925         (altivec_expand_vec_perm_le): Likewise.
12927 2018-01-08  Jeff Law  <law@redhat.com>
12929         PR rtl-optimizatin/81308
12930         * tree-switch-conversion.c (cfg_altered): New file scoped static.
12931         (process_switch): If group_case_labels makes a change, then set
12932         cfg_altered.
12933         (pass_convert_switch::execute): If a switch is converted, then
12934         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
12936         PR rtl-optimization/81308
12937         * recog.c (split_all_insns): Conditionally cleanup the CFG after
12938         splitting insns.
12940 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
12942         PR target/83663 - Revert r255946
12943         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12944         generation for cases where splatting a value is not useful.
12945         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12946         across a vec_duplicate and a paradoxical subreg forming a vector
12947         mode to a vec_concat.
12949 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12951         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12952         -march=armv8.3-a variants.
12953         * config/arm/t-multilib: Likewise.
12954         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
12956 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12958         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12959         to generate rtl.
12960         (cceq_ior_compare_complement): Give it a name so I can use it, and
12961         change boolean_or_operator predicate to boolean_operator so it can
12962         be used to generate a crand.
12963         (eqne): New code iterator.
12964         (bd/bd_neg): New code_attrs.
12965         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12966         a single define_insn.
12967         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12968         decrement (bdnzt/bdnzf/bdzt/bdzf).
12969         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12970         with the new names of the branch decrement patterns, and added the
12971         names of the branch decrement conditional patterns.
12973 2018-01-08  Richard Biener  <rguenther@suse.de>
12975         PR tree-optimization/83563
12976         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12977         cache.
12979 2018-01-08  Richard Biener  <rguenther@suse.de>
12981         PR middle-end/83713
12982         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12984 2018-01-08  Richard Biener  <rguenther@suse.de>
12986         PR tree-optimization/83685
12987         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12988         references to abnormals.
12990 2018-01-08  Richard Biener  <rguenther@suse.de>
12992         PR lto/83719
12993         * dwarf2out.c (output_indirect_strings): Handle empty
12994         skeleton_debug_str_hash.
12995         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12997 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
12999         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
13000         (emit_store_direct): Likewise.
13001         (arc_trampoline_adjust_address): Likewise.
13002         (arc_asm_trampoline_template): New function.
13003         (arc_initialize_trampoline): Use asm_trampoline_template.
13004         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
13005         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
13006         * config/arc/arc.md (flush_icache): Delete pattern.
13008 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
13010         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
13011         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
13012         munaligned-access.
13014 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13016         PR target/83681
13017         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
13018         by not USED_FOR_TARGET.
13019         (make_pass_resolve_sw_modes): Likewise.
13021 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13023         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
13024         USED_FOR_TARGET.
13026 2018-01-08  Richard Biener  <rguenther@suse.de>
13028         PR middle-end/83580
13029         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
13031 2018-01-08  Richard Biener  <rguenther@suse.de>
13033         PR middle-end/83517
13034         * match.pd ((t * 2) / 2) -> t): Add missing :c.
13036 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
13038         PR middle-end/81897
13039         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
13040         basic blocks with a small number of successors.
13041         (convert_control_dep_chain_into_preds): Improve handling of
13042         forwarder blocks.
13043         (dump_predicates): Split apart into...
13044         (dump_pred_chain): ...here...
13045         (dump_pred_info): ...and here.
13046         (can_one_predicate_be_invalidated_p): Add debugging printfs.
13047         (can_chain_union_be_invalidated_p): Improve check for invalidation
13048         of paths.
13049         (uninit_uses_cannot_happen): Avoid unnecessary if
13050         convert_control_dep_chain_into_preds yielded nothing.
13052 2018-01-06  Martin Sebor  <msebor@redhat.com>
13054         PR tree-optimization/83640
13055         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
13056         subtracting negative offset from size.
13057         (builtin_access::overlap): Adjust offset bounds of the access to fall
13058         within the size of the object if possible.
13060 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
13062         PR rtl-optimization/83699
13063         * expmed.c (extract_bit_field_1): Restrict the vector usage of
13064         extract_bit_field_as_subreg to cases in which the extracted
13065         value is also a vector.
13067         * lra-constraints.c (process_alt_operands): Test for the equivalence
13068         substitutions when detecting a possible reload cycle.
13070 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
13072         PR debug/83480
13073         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
13074         by default if flag_selective_schedling{,2}.  Formatting fixes.
13076         PR rtl-optimization/83682
13077         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
13078         if it has non-VECTOR_MODE element mode.
13079         (vec_duplicate_p): Likewise.
13081         PR middle-end/83694
13082         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
13083         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
13085 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
13087         PR target/83604
13088         * config/i386/i386-builtin.def
13089         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
13090         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
13091         Require also OPTION_MASK_ISA_AVX512F in addition to
13092         OPTION_MASK_ISA_GFNI.
13093         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
13094         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
13095         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
13096         to OPTION_MASK_ISA_GFNI.
13097         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
13098         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
13099         OPTION_MASK_ISA_AVX512BW.
13100         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
13101         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
13102         addition to OPTION_MASK_ISA_GFNI.
13103         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
13104         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
13105         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
13106         to OPTION_MASK_ISA_GFNI.
13107         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
13108         a requirement for all ISAs rather than any of them with a few
13109         exceptions.
13110         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
13111         processing.
13112         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
13113         bitmasks to be enabled with 3 exceptions, instead of requiring any
13114         enabled ISA with lots of exceptions.
13115         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
13116         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
13117         Change avx512bw in isa attribute to avx512f.
13118         * config/i386/sgxintrin.h: Add license boilerplate.
13119         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
13120         to __AVX512F__ and __AVX512VL to __AVX512VL__.
13121         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
13122         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
13123         defined.
13124         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
13125         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
13126         temporarily sse2 rather than sse if not enabled already.
13128         PR target/83604
13129         * config/i386/sse.md (VI248_VLBW): Rename to ...
13130         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
13131         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
13132         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
13133         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
13134         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
13135         mode iterator instead of VI248_VLBW.
13137 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
13139         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
13140         (record_modified): Skip clobbers; add debug output.
13141         (param_change_prob): Use sreal frequencies.
13143 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
13145         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
13146         punt for user-aligned variables.
13148 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
13150         * tree-chrec.c (chrec_contains_symbols): Return true for
13151         POLY_INT_CST.
13153 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
13155         PR target/82439
13156         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
13157         of (x|y) == x for BICS pattern.
13159 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
13161         PR tree-optimization/83605
13162         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
13163         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
13164         can throw.
13166 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13168         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
13169         * config/epiphany/rtems.h: New file.
13171 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13172             Uros Bizjak  <ubizjak@gmail.com>
13174         PR target/83554
13175         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
13176         QIreg_operand instead of register_operand predicate.
13177         * config/i386/i386.c (ix86_rop_should_change_byte_p,
13178         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
13179         comments instead of -fmitigate[-_]rop.
13181 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13183         PR bootstrap/81926
13184         * cgraphunit.c (symbol_table::compile): Switch to text_section
13185         before calling assembly_start debug hook.
13186         * run-rtl-passes.c (run_rtl_passes): Likewise.
13187         Include output.h.
13189 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13191         * tree-vrp.c (extract_range_from_binary_expr_1): Check
13192         range_int_cst_p rather than !symbolic_range_p before calling
13193         extract_range_from_multiplicative_op_1.
13195 2018-01-04  Jeff Law  <law@redhat.com>
13197         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
13198         redundant test in assertion.
13200 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13202         * doc/rtl.texi: Document machine_mode wrapper classes.
13204 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13206         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
13207         using tree_to_uhwi.
13209 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13211         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
13212         the VEC_PERM_EXPR fold to fail.
13214 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13216         PR debug/83585
13217         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
13218         to switched_sections.
13220 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13222         PR target/83680
13223         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
13224         test for d.testing.
13226 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
13228         PR target/83387
13229         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
13230         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
13232 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13234         PR debug/83666
13235         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
13236         is BLKmode and bitpos not zero or mode change is needed.
13238 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
13240         PR target/83675
13241         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
13242         TARGET_VIS2.
13244 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
13246         PR target/83628
13247         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
13248         instead of MULT rtx.  Update all corresponding splitters.
13249         (*saddl_se): Ditto.
13250         (*ssub<modesuffix>): Ditto.
13251         (*ssubl_se): Ditto.
13252         (*cmp_sadd_di): Update split patterns.
13253         (*cmp_sadd_si): Ditto.
13254         (*cmp_sadd_sidi): Ditto.
13255         (*cmp_ssub_di): Ditto.
13256         (*cmp_ssub_si): Ditto.
13257         (*cmp_ssub_sidi): Ditto.
13258         * config/alpha/predicates.md (const23_operand): New predicate.
13259         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
13260         Look for ASHIFT, not MULT inner operand.
13261         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
13263 2018-01-04  Martin Liska  <mliska@suse.cz>
13265         PR gcov-profile/83669
13266         * gcov.c (output_intermediate_file): Add version to intermediate
13267         gcov file.
13268         * doc/gcov.texi: Document new field 'version' in intermediate
13269         file format. Fix location of '-k' option of gcov command.
13271 2018-01-04  Martin Liska  <mliska@suse.cz>
13273         PR ipa/82352
13274         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
13276 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
13278         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
13280 2018-01-03  Martin Sebor  <msebor@redhat.com>
13282         PR tree-optimization/83655
13283         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
13284         checking calls with invalid arguments.
13286 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13288         * tree-vect-stmts.c (vect_get_store_rhs): New function.
13289         (vectorizable_mask_load_store): Delete.
13290         (vectorizable_call): Return false for masked loads and stores.
13291         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
13292         instead of gimple_assign_rhs1.
13293         (vectorizable_load): Handle IFN_MASK_LOAD.
13294         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
13296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13298         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
13299         split out from..,
13300         (vectorizable_mask_load_store): ...here.
13301         (vectorizable_load): ...and here.
13303 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13305         * tree-vect-stmts.c (vect_build_all_ones_mask)
13306         (vect_build_zero_merge_argument): New functions, split out from...
13307         (vectorizable_load): ...here.
13309 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13311         * tree-vect-stmts.c (vect_check_store_rhs): New function,
13312         split out from...
13313         (vectorizable_mask_load_store): ...here.
13314         (vectorizable_store): ...and here.
13316 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13318         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
13319         split out from...
13320         (vectorizable_mask_load_store): ...here.
13322 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13324         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
13325         (vect_model_store_cost): Take a vec_load_store_type instead of a
13326         vect_def_type.
13327         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
13328         (vect_model_store_cost): Take a vec_load_store_type instead of a
13329         vect_def_type.
13330         (vectorizable_mask_load_store): Update accordingly.
13331         (vectorizable_store): Likewise.
13332         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
13334 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13336         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
13337         IFN_MASK_LOAD calls here rather than...
13338         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
13340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13341             Alan Hayward  <alan.hayward@arm.com>
13342             David Sherwood  <david.sherwood@arm.com>
13344         * expmed.c (extract_bit_field_1): For vector extracts,
13345         fall back to extract_bit_field_as_subreg if vec_extract
13346         isn't available.
13348 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13349             Alan Hayward  <alan.hayward@arm.com>
13350             David Sherwood  <david.sherwood@arm.com>
13352         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
13353         they are variable or constant sized.
13354         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
13355         slots for constant-sized data.
13357 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13358             Alan Hayward  <alan.hayward@arm.com>
13359             David Sherwood  <david.sherwood@arm.com>
13361         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
13362         handling COND_EXPRs with boolean comparisons, try to find a better
13363         basis for the mask type than the boolean itself.
13365 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13367         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
13368         is calculated and how it can be overridden.
13369         * genmodes.c (max_bitsize_mode_any_mode): New variable.
13370         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
13371         if defined.
13372         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
13373         if nonzero.
13375 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13376             Alan Hayward  <alan.hayward@arm.com>
13377             David Sherwood  <david.sherwood@arm.com>
13379         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
13380         Remove the mode argument.
13381         (aarch64_simd_valid_immediate): Remove the mode and inverse
13382         arguments.
13383         * config/aarch64/iterators.md (bitsize): New iterator.
13384         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
13385         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
13386         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
13387         aarch64_simd_valid_immediate.
13388         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
13389         (aarch64_reg_or_bic_imm): Likewise.
13390         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
13391         with an insn_type enum and msl with a modifier_type enum.
13392         Replace element_width with a scalar_mode.  Change the shift
13393         to unsigned int.  Add constructors for scalar_float_mode and
13394         scalar_int_mode elements.
13395         (aarch64_vect_float_const_representable_p): Delete.
13396         (aarch64_can_const_movi_rtx_p)
13397         (aarch64_simd_scalar_immediate_valid_for_move)
13398         (aarch64_simd_make_constant): Update call to
13399         aarch64_simd_valid_immediate.
13400         (aarch64_advsimd_valid_immediate_hs): New function.
13401         (aarch64_advsimd_valid_immediate): Likewise.
13402         (aarch64_simd_valid_immediate): Remove mode and inverse
13403         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
13404         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
13405         and aarch64_float_const_representable_p on the result.
13406         (aarch64_output_simd_mov_immediate): Remove mode argument.
13407         Update call to aarch64_simd_valid_immediate and use of
13408         simd_immediate_info.
13409         (aarch64_output_scalar_simd_mov_immediate): Update call
13410         accordingly.
13412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13413             Alan Hayward  <alan.hayward@arm.com>
13414             David Sherwood  <david.sherwood@arm.com>
13416         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
13417         (mode_nunits): Likewise CONST_MODE_NUNITS.
13418         * machmode.def (ADJUST_NUNITS): Document.
13419         * genmodes.c (mode_data::need_nunits_adj): New field.
13420         (blank_mode): Update accordingly.
13421         (adj_nunits): New variable.
13422         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
13423         parameter.
13424         (emit_mode_size_inline): Set need_bytesize_adj for all modes
13425         listed in adj_nunits.
13426         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
13427         listed in adj_nunits.  Don't emit case statements for such modes.
13428         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
13429         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
13430         nothing if adj_nunits is nonnull.
13431         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
13432         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
13433         (emit_mode_fbit): Update use of print_maybe_const_decl.
13434         (emit_move_size): Likewise.  Treat the array as non-const
13435         if adj_nunits.
13436         (emit_mode_adjustments): Handle adj_nunits.
13438 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13440         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
13441         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
13442         (VECTOR_MODES): Use it.
13443         (make_vector_modes): Take the prefix as an argument.
13445 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13446             Alan Hayward  <alan.hayward@arm.com>
13447             David Sherwood  <david.sherwood@arm.com>
13449         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
13450         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
13451         for MODE_VECTOR_BOOL.
13452         * machmode.def (VECTOR_BOOL_MODE): Document.
13453         * genmodes.c (VECTOR_BOOL_MODE): New macro.
13454         (make_vector_bool_mode): New function.
13455         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
13456         MODE_VECTOR_BOOL.
13457         * lto-streamer-in.c (lto_input_mode_table): Likewise.
13458         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
13459         Likewise.
13460         * stor-layout.c (int_mode_for_mode): Likewise.
13461         * tree.c (build_vector_type_for_mode): Likewise.
13462         * varasm.c (output_constant_pool_2): Likewise.
13463         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
13464         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
13465         for MODE_VECTOR_BOOL.
13466         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
13467         of mode class checks.
13468         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
13469         instead of a list of mode class checks.
13470         (expand_vector_scalar_condition): Likewise.
13471         (type_for_widest_vector_mode): Handle BImode as an inner mode.
13473 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13474             Alan Hayward  <alan.hayward@arm.com>
13475             David Sherwood  <david.sherwood@arm.com>
13477         * machmode.h (mode_size): Change from unsigned short to
13478         poly_uint16_pod.
13479         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
13480         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13481         or if measurement_type is not polynomial.
13482         (fixed_size_mode::includes_p): Check for constant-sized modes.
13483         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
13484         return a poly_uint16 rather than an unsigned short.
13485         (emit_mode_size): Change the type of mode_size from unsigned short
13486         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
13487         (emit_mode_adjustments): Cope with polynomial vector sizes.
13488         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13489         for GET_MODE_SIZE.
13490         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13491         for GET_MODE_SIZE.
13492         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
13493         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
13494         * caller-save.c (setup_save_areas): Likewise.
13495         (replace_reg_with_saved_mem): Likewise.
13496         * calls.c (emit_library_call_value_1): Likewise.
13497         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
13498         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
13499         (gen_lowpart_for_combine): Likewise.
13500         * convert.c (convert_to_integer_1): Likewise.
13501         * cse.c (equiv_constant, cse_insn): Likewise.
13502         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
13503         (cselib_subst_to_values): Likewise.
13504         * dce.c (word_dce_process_block): Likewise.
13505         * df-problems.c (df_word_lr_mark_ref): Likewise.
13506         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13507         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13508         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13509         (rtl_for_decl_location): Likewise.
13510         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13511         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13512         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13513         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13514         (expand_expr_real_1): Likewise.
13515         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13516         (pad_below): Likewise.
13517         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13518         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13519         * ira.c (get_subreg_tracking_sizes): Likewise.
13520         * ira-build.c (ira_create_allocno_objects): Likewise.
13521         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13522         (ira_sort_regnos_for_alter_reg): Likewise.
13523         * ira-costs.c (record_operand_costs): Likewise.
13524         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13525         (resolve_simple_move): Likewise.
13526         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13527         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13528         (lra_constraints): Likewise.
13529         (CONST_POOL_OK_P): Reject variable-sized modes.
13530         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13531         (add_pseudo_to_slot, lra_spill): Likewise.
13532         * omp-low.c (omp_clause_aligned_alignment): Likewise.
13533         * optabs-query.c (get_best_extraction_insn): Likewise.
13534         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13535         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13536         (expand_mult_highpart, valid_multiword_target_p): Likewise.
13537         * recog.c (offsettable_address_addr_space_p): Likewise.
13538         * regcprop.c (maybe_mode_change): Likewise.
13539         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13540         * regrename.c (build_def_use): Likewise.
13541         * regstat.c (dump_reg_info): Likewise.
13542         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13543         (find_reloads, find_reloads_subreg_address): Likewise.
13544         * reload1.c (eliminate_regs_1): Likewise.
13545         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13546         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13547         (simplify_binary_operation_1, simplify_subreg): Likewise.
13548         * targhooks.c (default_function_arg_padding): Likewise.
13549         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13550         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13551         (verify_gimple_assign_ternary): Likewise.
13552         * tree-inline.c (estimate_move_cost): Likewise.
13553         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13554         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
13555         (get_address_cost_ainc): Likewise.
13556         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
13557         (vect_supportable_dr_alignment): Likewise.
13558         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13559         (vectorizable_reduction): Likewise.
13560         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
13561         (vectorizable_operation, vectorizable_load): Likewise.
13562         * tree.c (build_same_sized_truth_vector_type): Likewise.
13563         * valtrack.c (cleanup_auto_inc_dec): Likewise.
13564         * var-tracking.c (emit_note_insn_var_location): Likewise.
13565         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
13566         (ADDR_VEC_ALIGN): Likewise.
13568 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13569             Alan Hayward  <alan.hayward@arm.com>
13570             David Sherwood  <david.sherwood@arm.com>
13572         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
13573         unsigned short.
13574         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13575         or if measurement_type is polynomial.
13576         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
13577         * combine.c (make_extraction): Likewise.
13578         * dse.c (find_shift_sequence): Likewise.
13579         * dwarf2out.c (mem_loc_descriptor): Likewise.
13580         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
13581         (extract_bit_field, extract_low_bits): Likewise.
13582         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
13583         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
13584         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
13585         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
13586         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13587         * reload.c (find_reloads): Likewise.
13588         * reload1.c (alter_reg): Likewise.
13589         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
13590         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
13591         * tree-if-conv.c (predicate_mem_writes): Likewise.
13592         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13593         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
13594         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13595         * valtrack.c (dead_debug_insert_temp): Likewise.
13596         * varasm.c (mergeable_constant_section): Likewise.
13597         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
13599 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13600             Alan Hayward  <alan.hayward@arm.com>
13601             David Sherwood  <david.sherwood@arm.com>
13603         * expr.c (expand_assignment): Cope with polynomial mode sizes
13604         when assigning to a CONCAT.
13606 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13607             Alan Hayward  <alan.hayward@arm.com>
13608             David Sherwood  <david.sherwood@arm.com>
13610         * machmode.h (mode_precision): Change from unsigned short to
13611         poly_uint16_pod.
13612         (mode_to_precision): Return a poly_uint16 rather than an unsigned
13613         short.
13614         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
13615         or if measurement_type is not polynomial.
13616         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
13617         in which the mode is already known to be a scalar_int_mode.
13618         * genmodes.c (emit_mode_precision): Change the type of mode_precision
13619         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
13620         initializer.
13621         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13622         for GET_MODE_PRECISION.
13623         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13624         for GET_MODE_PRECISION.
13625         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13626         as polynomial.
13627         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13628         (expand_field_assignment, make_extraction): Likewise.
13629         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13630         (get_last_value): Likewise.
13631         * convert.c (convert_to_integer_1): Likewise.
13632         * cse.c (cse_insn): Likewise.
13633         * expr.c (expand_expr_real_1): Likewise.
13634         * lra-constraints.c (simplify_operand_subreg): Likewise.
13635         * optabs-query.c (can_atomic_load_p): Likewise.
13636         * optabs.c (expand_atomic_load): Likewise.
13637         (expand_atomic_store): Likewise.
13638         * ree.c (combine_reaching_defs): Likewise.
13639         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13640         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13641         * tree.h (type_has_mode_precision_p): Likewise.
13642         * ubsan.c (instrument_si_overflow): Likewise.
13644 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13645             Alan Hayward  <alan.hayward@arm.com>
13646             David Sherwood  <david.sherwood@arm.com>
13648         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13649         polynomial numbers of units.
13650         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13651         (valid_vector_subparts_p): New function.
13652         (build_vector_type): Remove temporary shim and take the number
13653         of units as a poly_uint64 rather than an int.
13654         (build_opaque_vector_type): Take the number of units as a
13655         poly_uint64 rather than an int.
13656         * tree.c (build_vector_from_ctor): Handle polynomial
13657         TYPE_VECTOR_SUBPARTS.
13658         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13659         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13660         (build_vector_from_val): If the number of units is variable,
13661         use build_vec_duplicate_cst for constant operands and
13662         VEC_DUPLICATE_EXPR otherwise.
13663         (make_vector_type): Remove temporary is_constant ().
13664         (build_vector_type, build_opaque_vector_type): Take the number of
13665         units as a poly_uint64 rather than an int.
13666         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13667         VECTOR_CST_NELTS.
13668         * cfgexpand.c (expand_debug_expr): Likewise.
13669         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13670         (store_constructor, expand_expr_real_1): Likewise.
13671         (const_scalar_mask_from_tree): Likewise.
13672         * fold-const-call.c (fold_const_reduction): Likewise.
13673         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13674         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13675         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13676         (fold_relational_const): Likewise.
13677         (native_interpret_vector): Likewise.  Change the size from an
13678         int to an unsigned int.
13679         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13680         TYPE_VECTOR_SUBPARTS.
13681         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13682         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13683         duplicating a non-constant operand into a variable-length vector.
13684         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13685         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13686         * ipa-icf.c (sem_variable::equals): Likewise.
13687         * match.pd: Likewise.
13688         * omp-simd-clone.c (simd_clone_subparts): Likewise.
13689         * print-tree.c (print_node): Likewise.
13690         * stor-layout.c (layout_type): Likewise.
13691         * targhooks.c (default_builtin_vectorization_cost): Likewise.
13692         * tree-cfg.c (verify_gimple_comparison): Likewise.
13693         (verify_gimple_assign_binary): Likewise.
13694         (verify_gimple_assign_ternary): Likewise.
13695         (verify_gimple_assign_single): Likewise.
13696         * tree-pretty-print.c (dump_generic_node): Likewise.
13697         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13698         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13699         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13700         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13701         (vect_shift_permute_load_chain): Likewise.
13702         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13703         (expand_vector_condition, optimize_vector_constructor): Likewise.
13704         (lower_vec_perm, get_compute_type): Likewise.
13705         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13706         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13707         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13708         (vect_recog_mask_conversion_pattern): Likewise.
13709         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13710         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13711         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13712         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13713         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13714         (vectorizable_shift, vectorizable_operation, vectorizable_store)
13715         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13716         (supportable_widening_operation): Likewise.
13717         (supportable_narrowing_operation): Likewise.
13718         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13719         Likewise.
13720         * varasm.c (output_constant): Likewise.
13722 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13723             Alan Hayward  <alan.hayward@arm.com>
13724             David Sherwood  <david.sherwood@arm.com>
13726         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13727         so that both the length == 3 and length != 3 cases set up their
13728         own permute vectors.  Add comments explaining why we know the
13729         number of elements is constant.
13730         (vect_permute_load_chain): Likewise.
13732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13733             Alan Hayward  <alan.hayward@arm.com>
13734             David Sherwood  <david.sherwood@arm.com>
13736         * machmode.h (mode_nunits): Change from unsigned char to
13737         poly_uint16_pod.
13738         (ONLY_FIXED_SIZE_MODES): New macro.
13739         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13740         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13741         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13742         New typedefs.
13743         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13744         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13745         or if measurement_type is not polynomial.
13746         * genmodes.c (ZERO_COEFFS): New macro.
13747         (emit_mode_nunits_inline): Make mode_nunits_inline return a
13748         poly_uint16.
13749         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13750         Use ZERO_COEFFS when emitting initializers.
13751         * data-streamer.h (bp_pack_poly_value): New function.
13752         (bp_unpack_poly_value): Likewise.
13753         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13754         for GET_MODE_NUNITS.
13755         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13756         for GET_MODE_NUNITS.
13757         * tree.c (make_vector_type): Remove temporary shim and make
13758         the real function take the number of units as a poly_uint64
13759         rather than an int.
13760         (build_vector_type_for_mode): Handle polynomial nunits.
13761         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13762         * emit-rtl.c (const_vec_series_p_1): Likewise.
13763         (gen_rtx_CONST_VECTOR): Likewise.
13764         * fold-const.c (test_vec_duplicate_folding): Likewise.
13765         * genrecog.c (validate_pattern): Likewise.
13766         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13767         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13768         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13769         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13770         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13771         * rtlanal.c (subreg_get_info): Likewise.
13772         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13773         (vect_grouped_load_supported): Likewise.
13774         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13775         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13776         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13777         (simplify_const_unary_operation, simplify_binary_operation_1)
13778         (simplify_const_binary_operation, simplify_ternary_operation)
13779         (test_vector_ops_duplicate, test_vector_ops): Likewise.
13780         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13781         instead of CONST_VECTOR_NUNITS.
13782         * varasm.c (output_constant_pool_2): Likewise.
13783         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13784         explicit-encoded elements in the XVEC for variable-length vectors.
13786 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13788         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13790 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13791             Alan Hayward  <alan.hayward@arm.com>
13792             David Sherwood  <david.sherwood@arm.com>
13794         * coretypes.h (fixed_size_mode): Declare.
13795         (fixed_size_mode_pod): New typedef.
13796         * builtins.h (target_builtins::x_apply_args_mode)
13797         (target_builtins::x_apply_result_mode): Change type to
13798         fixed_size_mode_pod.
13799         * builtins.c (apply_args_size, apply_result_size, result_vector)
13800         (expand_builtin_apply_args_1, expand_builtin_apply)
13801         (expand_builtin_return): Update accordingly.
13803 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13805         * cse.c (hash_rtx_cb): Hash only the encoded elements.
13806         * cselib.c (cselib_hash_rtx): Likewise.
13807         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13808         CONST_VECTOR encoding.
13810 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13811             Jeff Law  <law@redhat.com>
13813         PR target/83641
13814         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13815         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13816         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13817         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13819         PR target/83641
13820         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13821         explicitly probe *sp in a noreturn function if there were any callee
13822         register saves or frame pointer is needed.
13824 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13826         PR debug/83621
13827         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13828         BLKmode for ternary, binary or unary expressions.
13830         PR debug/83645
13831         * var-tracking.c (delete_vta_debug_insn): New inline function.
13832         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13833         insns from get_insns () to NULL instead of each bb separately.
13834         Use delete_vta_debug_insn.  No longer static.
13835         (vt_debug_insns_local, variable_tracking_main_1): Adjust
13836         delete_vta_debug_insns callers.
13837         * rtl.h (delete_vta_debug_insns): Declare.
13838         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13839         instead of variable_tracking_main.
13841 2018-01-03  Martin Sebor  <msebor@redhat.com>
13843         PR tree-optimization/83603
13844         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13845         arguments past the endof the argument list in functions declared
13846         without a prototype.
13847         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13848         Avoid checking when arguments are null.
13850 2018-01-03  Martin Sebor  <msebor@redhat.com>
13852         PR c/83559
13853         * doc/extend.texi (attribute const): Fix a typo.
13854         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13855         issuing -Wsuggest-attribute for void functions.
13857 2018-01-03  Martin Sebor  <msebor@redhat.com>
13859         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13860         offset_int::from instead of wide_int::to_shwi.
13861         (maybe_diag_overlap): Remove assertion.
13862         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13863         * gimple-ssa-sprintf.c (format_directive): Same.
13864         (parse_directive): Same.
13865         (sprintf_dom_walker::compute_format_length): Same.
13866         (try_substitute_return_value): Same.
13868 2018-01-03  Jeff Law  <law@redhat.com>
13870         PR middle-end/83654
13871         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13872         non-constant residual for zero at runtime and avoid probing in
13873         that case.  Reorganize code for trailing problem to mirror handling
13874         of the residual.
13876 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13878         PR tree-optimization/83501
13879         * tree-ssa-strlen.c (get_string_cst): New.
13880         (handle_char_store): Call get_string_cst.
13882 2018-01-03  Martin Liska  <mliska@suse.cz>
13884         PR tree-optimization/83593
13885         * tree-ssa-strlen.c: Include tree-cfg.h.
13886         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13887         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13888         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13889         to false.
13890         (strlen_dom_walker::before_dom_children): Call
13891         gimple_purge_dead_eh_edges. Dump tranformation with details
13892         dump flags.
13893         (strlen_dom_walker::before_dom_children): Update call by adding
13894         new argument cleanup_eh.
13895         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13897 2018-01-03  Martin Liska  <mliska@suse.cz>
13899         PR ipa/83549
13900         * cif-code.def (VARIADIC_THUNK): New enum value.
13901         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13902         thunks.
13904 2018-01-03  Jan Beulich  <jbeulich@suse.com>
13906         * sse.md (mov<mode>_internal): Tighten condition for when to use
13907         vmovdqu<ssescalarsize> for TI and OI modes.
13909 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13911         Update copyright years.
13913 2018-01-03  Martin Liska  <mliska@suse.cz>
13915         PR ipa/83594
13916         * ipa-visibility.c (function_and_variable_visibility): Skip
13917         functions with noipa attribure.
13919 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
13921         * gcc.c (process_command): Update copyright notice dates.
13922         * gcov-dump.c (print_version): Ditto.
13923         * gcov.c (print_version): Ditto.
13924         * gcov-tool.c (print_version): Ditto.
13925         * gengtype.c (create_file): Ditto.
13926         * doc/cpp.texi: Bump @copying's copyright year.
13927         * doc/cppinternals.texi: Ditto.
13928         * doc/gcc.texi: Ditto.
13929         * doc/gccint.texi: Ditto.
13930         * doc/gcov.texi: Ditto.
13931         * doc/install.texi: Ditto.
13932         * doc/invoke.texi: Ditto.
13934 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13936         * vector-builder.h (vector_builder::m_full_nelts): Change from
13937         unsigned int to poly_uint64.
13938         (vector_builder::full_nelts): Update prototype accordingly.
13939         (vector_builder::new_vector): Likewise.
13940         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13941         (vector_builder::operator ==): Likewise.
13942         (vector_builder::finalize): Likewise.
13943         * int-vector-builder.h (int_vector_builder::int_vector_builder):
13944         Take the number of elements as a poly_uint64 rather than an
13945         unsigned int.
13946         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13947         from unsigned int to poly_uint64.
13948         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13949         (vec_perm_indices::new_vector): Likewise.
13950         (vec_perm_indices::length): Likewise.
13951         (vec_perm_indices::nelts_per_input): Likewise.
13952         (vec_perm_indices::input_nelts): Likewise.
13953         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13954         number of elements per input as a poly_uint64 rather than an
13955         unsigned int.  Use the original encoding for variable-length
13956         vectors, rather than clamping each individual element.
13957         For the second and subsequent elements in each pattern,
13958         clamp the step and base before clamping their sum.
13959         (vec_perm_indices::series_p): Handle polynomial element counts.
13960         (vec_perm_indices::all_in_range_p): Likewise.
13961         (vec_perm_indices_to_tree): Likewise.
13962         (vec_perm_indices_to_rtx): Likewise.
13963         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13964         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13965         (tree_vector_builder::new_binary_operation): Handle polynomial
13966         element counts.  Return false if we need to know the number
13967         of elements at compile time.
13968         * fold-const.c (fold_vec_perm): Punt if the number of elements
13969         isn't known at compile time.
13971 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13973         * vec-perm-indices.h (vec_perm_builder): Change element type
13974         from HOST_WIDE_INT to poly_int64.
13975         (vec_perm_indices::element_type): Update accordingly.
13976         (vec_perm_indices::clamp): Handle polynomial element_types.
13977         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13978         (vec_perm_indices::all_in_range_p): Likewise.
13979         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13980         than shwi trees.
13981         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13982         polynomial vec_perm_indices element types.
13983         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13984         * fold-const.c (fold_vec_perm): Likewise.
13985         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13986         * tree-vect-generic.c (lower_vec_perm): Likewise.
13987         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13988         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13989         element type to HOST_WIDE_INT.
13991 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
13992             Alan Hayward  <alan.hayward@arm.com>
13993             David Sherwood  <david.sherwood@arm.com>
13995         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13996         rather than an int.  Use plus_constant.
13997         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13998         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
14000 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14001             Alan Hayward  <alan.hayward@arm.com>
14002             David Sherwood  <david.sherwood@arm.com>
14004         * calls.c (emit_call_1, expand_call): Change struct_value_size from
14005         a HOST_WIDE_INT to a poly_int64.
14007 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14008             Alan Hayward  <alan.hayward@arm.com>
14009             David Sherwood  <david.sherwood@arm.com>
14011         * calls.c (load_register_parameters): Cope with polynomial
14012         mode sizes.  Require a constant size for BLKmode parameters
14013         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
14014         forces a parameter to be padded at the lsb end in order to
14015         fill a complete number of words, require the parameter size
14016         to be ordered wrt UNITS_PER_WORD.
14018 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14019             Alan Hayward  <alan.hayward@arm.com>
14020             David Sherwood  <david.sherwood@arm.com>
14022         * reload1.c (spill_stack_slot_width): Change element type
14023         from unsigned int to poly_uint64_pod.
14024         (alter_reg): Treat mode sizes as polynomial.
14026 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14027             Alan Hayward  <alan.hayward@arm.com>
14028             David Sherwood  <david.sherwood@arm.com>
14030         * reload.c (complex_word_subreg_p): New function.
14031         (reload_inner_reg_of_subreg, push_reload): Use it.
14033 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14034             Alan Hayward  <alan.hayward@arm.com>
14035             David Sherwood  <david.sherwood@arm.com>
14037         * lra-constraints.c (process_alt_operands): Reject matched
14038         operands whose sizes aren't ordered.
14039         (match_reload): Refer to this check here.
14041 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14042             Alan Hayward  <alan.hayward@arm.com>
14043             David Sherwood  <david.sherwood@arm.com>
14045         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
14046         that the mode size is in the set {1, 2, 4, 8, 16}.
14048 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14049             Alan Hayward  <alan.hayward@arm.com>
14050             David Sherwood  <david.sherwood@arm.com>
14052         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
14053         Use plus_constant instead of gen_rtx_PLUS.
14055 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14056             Alan Hayward  <alan.hayward@arm.com>
14057             David Sherwood  <david.sherwood@arm.com>
14059         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
14060         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
14061         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
14062         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
14063         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
14064         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
14065         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
14066         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
14067         * config/i386/i386.c (ix86_push_rounding): ...this new function.
14068         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
14069         a poly_int64.
14070         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
14071         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
14072         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
14073         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
14074         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
14075         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
14076         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
14077         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
14078         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
14079         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
14080         function.
14081         * expr.c (emit_move_resolve_push): Treat the input and result
14082         of PUSH_ROUNDING as a poly_int64.
14083         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
14084         (emit_push_insn): Likewise.
14085         * lra-eliminations.c (mark_not_eliminable): Likewise.
14086         * recog.c (push_operand): Likewise.
14087         * reload1.c (elimination_effects): Likewise.
14088         * rtlanal.c (nonzero_bits1): Likewise.
14089         * calls.c (store_one_arg): Likewise.  Require the padding to be
14090         known at compile time.
14092 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14093             Alan Hayward  <alan.hayward@arm.com>
14094             David Sherwood  <david.sherwood@arm.com>
14096         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
14097         Use plus_constant instead of gen_rtx_PLUS.
14099 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14100             Alan Hayward  <alan.hayward@arm.com>
14101             David Sherwood  <david.sherwood@arm.com>
14103         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
14104         rather than an int.
14106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14107             Alan Hayward  <alan.hayward@arm.com>
14108             David Sherwood  <david.sherwood@arm.com>
14110         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
14111         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
14112         via stack temporaries.  Treat the mode size as polynomial too.
14114 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14115             Alan Hayward  <alan.hayward@arm.com>
14116             David Sherwood  <david.sherwood@arm.com>
14118         * expr.c (expand_expr_real_2): When handling conversions involving
14119         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
14120         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
14121         as a poly_uint64 too.
14123 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14124             Alan Hayward  <alan.hayward@arm.com>
14125             David Sherwood  <david.sherwood@arm.com>
14127         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
14129 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14130             Alan Hayward  <alan.hayward@arm.com>
14131             David Sherwood  <david.sherwood@arm.com>
14133         * combine.c (can_change_dest_mode): Handle polynomial
14134         REGMODE_NATURAL_SIZE.
14135         * expmed.c (store_bit_field_1): Likewise.
14136         * expr.c (store_constructor): Likewise.
14137         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
14138         and polynomial REGMODE_NATURAL_SIZE.
14139         (gen_lowpart_common): Likewise.
14140         * reginfo.c (record_subregs_of_mode): Likewise.
14141         * rtlanal.c (read_modify_subreg_p): Likewise.
14143 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14144             Alan Hayward  <alan.hayward@arm.com>
14145             David Sherwood  <david.sherwood@arm.com>
14147         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
14148         numbers of elements.
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         * match.pd: Cope with polynomial numbers of vector elements.
14156 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14157             Alan Hayward  <alan.hayward@arm.com>
14158             David Sherwood  <david.sherwood@arm.com>
14160         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
14161         in a POINTER_PLUS_EXPR.
14163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14164             Alan Hayward  <alan.hayward@arm.com>
14165             David Sherwood  <david.sherwood@arm.com>
14167         * omp-simd-clone.c (simd_clone_subparts): New function.
14168         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
14169         (ipa_simd_modify_function_body): Likewise.
14171 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14172             Alan Hayward  <alan.hayward@arm.com>
14173             David Sherwood  <david.sherwood@arm.com>
14175         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
14176         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
14177         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
14178         (expand_vector_condition, vector_element): Likewise.
14179         (subparts_gt): New function.
14180         (get_compute_type): Use subparts_gt.
14181         (count_type_subparts): Delete.
14182         (expand_vector_operations_1): Use subparts_gt instead of
14183         count_type_subparts.
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-data-refs.c (vect_no_alias_p): Replace with...
14190         (vect_compile_time_alias): ...this new function.  Do the calculation
14191         on poly_ints rather than trees.
14192         (vect_prune_runtime_alias_test_list): Update call accordingly.
14194 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14195             Alan Hayward  <alan.hayward@arm.com>
14196             David Sherwood  <david.sherwood@arm.com>
14198         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
14199         numbers of units.
14200         (vect_schedule_slp_instance): Likewise.
14202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14203             Alan Hayward  <alan.hayward@arm.com>
14204             David Sherwood  <david.sherwood@arm.com>
14206         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
14207         constant and extern definitions for variable-length vectors.
14208         (vect_get_constant_vectors): Note that the number of units
14209         is known to be constant.
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-stmts.c (vectorizable_conversion): Treat the number
14216         of units as polynomial.  Choose between WIDE and NARROW based
14217         on multiple_p.
14219 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14220             Alan Hayward  <alan.hayward@arm.com>
14221             David Sherwood  <david.sherwood@arm.com>
14223         * tree-vect-stmts.c (simd_clone_subparts): New function.
14224         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
14226 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14227             Alan Hayward  <alan.hayward@arm.com>
14228             David Sherwood  <david.sherwood@arm.com>
14230         * tree-vect-stmts.c (vectorizable_call): Treat the number of
14231         vectors as polynomial.  Use build_index_vector for
14232         IFN_GOMP_SIMD_LANE.
14234 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14235             Alan Hayward  <alan.hayward@arm.com>
14236             David Sherwood  <david.sherwood@arm.com>
14238         * tree-vect-stmts.c (get_load_store_type): Treat the number of
14239         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
14240         for variable-length vectors.
14241         (vectorizable_mask_load_store): Treat the number of units as
14242         polynomial, asserting that it is constant if the condition has
14243         already been enforced.
14244         (vectorizable_store, vectorizable_load): Likewise.
14246 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14247             Alan Hayward  <alan.hayward@arm.com>
14248             David Sherwood  <david.sherwood@arm.com>
14250         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
14251         of units as polynomial.  Punt if we can't tell at compile time
14252         which vector contains the final result.
14254 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14255             Alan Hayward  <alan.hayward@arm.com>
14256             David Sherwood  <david.sherwood@arm.com>
14258         * tree-vect-loop.c (vectorizable_induction): Treat the number
14259         of units as polynomial.  Punt on SLP inductions.  Use an integer
14260         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
14261         cast of such a series for variable-length floating-point
14262         reductions.
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         * tree.h (build_index_vector): Declare.
14269         * tree.c (build_index_vector): New function.
14270         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
14271         of units as polynomial, forcibly converting it to a constant if
14272         vectorizable_reduction has already enforced the condition.
14273         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
14274         to create a {1,2,3,...} vector.
14275         (vectorizable_reduction): Treat the number of units as polynomial.
14276         Choose vectype_in based on the largest scalar element size rather
14277         than the smallest number of units.  Enforce the restrictions
14278         relied on above.
14280 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14281             Alan Hayward  <alan.hayward@arm.com>
14282             David Sherwood  <david.sherwood@arm.com>
14284         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
14285         number of units as polynomial.
14287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14288             Alan Hayward  <alan.hayward@arm.com>
14289             David Sherwood  <david.sherwood@arm.com>
14291         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
14292         * target.def (autovectorize_vector_sizes): Return the vector sizes
14293         by pointer, using vector_sizes rather than a bitmask.
14294         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
14295         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
14296         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
14297         Likewise.
14298         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
14299         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
14300         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
14301         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
14302         * omp-general.c (omp_max_vf): Likewise.
14303         * omp-low.c (omp_clause_aligned_alignment): Likewise.
14304         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
14305         * tree-vect-loop.c (vect_analyze_loop): Likewise.
14306         * tree-vect-slp.c (vect_slp_bb): Likewise.
14307         * doc/tm.texi: Regenerate.
14308         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
14309         to a poly_uint64.
14310         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
14311         the vector size as a poly_uint64 rather than an unsigned int.
14312         (current_vector_size): Change from an unsigned int to a poly_uint64.
14313         (get_vectype_for_scalar_type): Update accordingly.
14314         * tree.h (build_truth_vector_type): Take the size and number of
14315         units as a poly_uint64 rather than an unsigned int.
14316         (build_vector_type): Add a temporary overload that takes
14317         the number of units as a poly_uint64 rather than an unsigned int.
14318         * tree.c (make_vector_type): Likewise.
14319         (build_truth_vector_type): Take the number of units as a poly_uint64
14320         rather than an unsigned int.
14322 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14323             Alan Hayward  <alan.hayward@arm.com>
14324             David Sherwood  <david.sherwood@arm.com>
14326         * target.def (get_mask_mode): Take the number of units and length
14327         as poly_uint64s rather than unsigned ints.
14328         * targhooks.h (default_get_mask_mode): Update accordingly.
14329         * targhooks.c (default_get_mask_mode): Likewise.
14330         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14331         * doc/tm.texi: Regenerate.
14333 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14334             Alan Hayward  <alan.hayward@arm.com>
14335             David Sherwood  <david.sherwood@arm.com>
14337         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
14338         * omp-general.c (omp_max_vf): Likewise.
14339         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
14340         (expand_omp_simd): Handle polynomial safelen.
14341         * omp-low.c (omplow_simd_context): Add a default constructor.
14342         (omplow_simd_context::max_vf): Change from int to poly_uint64.
14343         (lower_rec_simd_input_clauses): Update accordingly.
14344         (lower_rec_input_clauses): Likewise.
14346 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14347             Alan Hayward  <alan.hayward@arm.com>
14348             David Sherwood  <david.sherwood@arm.com>
14350         * tree-vectorizer.h (vect_nunits_for_cost): New function.
14351         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
14352         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
14353         (vect_analyze_slp_cost): Likewise.
14354         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
14355         (vect_model_load_cost): Likewise.
14357 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14358             Alan Hayward  <alan.hayward@arm.com>
14359             David Sherwood  <david.sherwood@arm.com>
14361         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
14362         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
14363         from an unsigned int * to a poly_uint64_pod *.
14364         (calculate_unrolling_factor): New function.
14365         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
14367 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14368             Alan Hayward  <alan.hayward@arm.com>
14369             David Sherwood  <david.sherwood@arm.com>
14371         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
14372         from an unsigned int to a poly_uint64.
14373         (_loop_vec_info::slp_unrolling_factor): Likewise.
14374         (_loop_vec_info::vectorization_factor): Change from an int
14375         to a poly_uint64.
14376         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
14377         (vect_get_num_vectors): New function.
14378         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
14379         (vect_get_num_copies): Use vect_get_num_vectors.
14380         (vect_analyze_data_ref_dependences): Change max_vf from an int *
14381         to an unsigned int *.
14382         (vect_analyze_data_refs): Change min_vf from an int * to a
14383         poly_uint64 *.
14384         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14385         than an unsigned HOST_WIDE_INT.
14386         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14387         (vect_analyze_data_ref_dependence): Change max_vf from an int *
14388         to an unsigned int *.
14389         (vect_analyze_data_ref_dependences): Likewise.
14390         (vect_compute_data_ref_alignment): Handle polynomial vf.
14391         (vect_enhance_data_refs_alignment): Likewise.
14392         (vect_prune_runtime_alias_test_list): Likewise.
14393         (vect_shift_permute_load_chain): Likewise.
14394         (vect_supportable_dr_alignment): Likewise.
14395         (dependence_distance_ge_vf): Take the vectorization factor as a
14396         poly_uint64 rather than an unsigned HOST_WIDE_INT.
14397         (vect_analyze_data_refs): Change min_vf from an int * to a
14398         poly_uint64 *.
14399         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
14400         vfm1 as a poly_uint64 rather than an int.  Make the same change
14401         for the returned bound_scalar.
14402         (vect_gen_vector_loop_niters): Handle polynomial vf.
14403         (vect_do_peeling): Likewise.  Update call to
14404         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
14405         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
14406         be constant.
14407         * tree-vect-loop.c (vect_determine_vectorization_factor)
14408         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
14409         (vect_get_known_peeling_cost): Likewise.
14410         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
14411         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
14412         (vect_transform_loop): Likewise.  Use the lowest possible VF when
14413         updating the upper bounds of the loop.
14414         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
14415         rather than an int.
14416         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
14417         polynomial unroll factors.
14418         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
14419         (vect_make_slp_decision): Likewise.
14420         (vect_supported_load_permutation_p): Likewise, and polynomial
14421         vf too.
14422         (vect_analyze_slp_cost): Handle polynomial vf.
14423         (vect_slp_analyze_node_operations): Likewise.
14424         (vect_slp_analyze_bb_1): Likewise.
14425         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14426         than an unsigned HOST_WIDE_INT.
14427         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
14428         (vectorizable_load): Handle polynomial vf.
14429         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
14430         a poly_uint64.
14431         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
14433 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14434             Alan Hayward  <alan.hayward@arm.com>
14435             David Sherwood  <david.sherwood@arm.com>
14437         * match.pd: Handle bit operations involving three constants
14438         and try to fold one pair.
14440 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
14442         * tree-vect-loop-manip.c: Include gimple-fold.h.
14443         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
14444         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
14445         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
14446         Add a path that uses a step of VF instead of 1, but disable it
14447         for now.
14448         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
14449         and niters_no_overflow parameters.  Update calls to
14450         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
14451         Create a new SSA name if the latter choses to use a ste other
14452         than zero, and return it via niters_vector_mult_vf_var.
14453         * tree-vect-loop.c (vect_transform_loop): Update calls to
14454         vect_do_peeling, vect_gen_vector_loop_niters and
14455         slpeel_make_loop_iterate_ntimes.
14456         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
14457         (vect_gen_vector_loop_niters): Update declarations after above changes.
14459 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
14461         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
14462         128-bit round to integer instructions.
14463         (ceil<mode>2): Likewise.
14464         (btrunc<mode>2): Likewise.
14465         (round<mode>2): Likewise.
14467 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14469         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
14470         unaligned VSX load/store on P8/P9.
14471         (expand_block_clear): Allow the use of unaligned VSX
14472         load/store on P8/P9.
14474 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14476         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
14477         New function.
14478         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
14479         swap associated with both a load and a store.
14481 2018-01-02  Andrew Waterman  <andrew@sifive.com>
14483         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
14484         * config/riscv/riscv.md (clear_cache): Use it.
14486 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
14488         * web.c: Remove out-of-date comment.
14490 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14492         * expr.c (fixup_args_size_notes): Check that any existing
14493         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
14494         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
14495         (emit_single_push_insn): ...here.
14497 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14499         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
14500         (const_vector_encoded_nelts): New function.
14501         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
14502         (const_vector_int_elt, const_vector_elt): Declare.
14503         * emit-rtl.c (const_vector_int_elt_1): New function.
14504         (const_vector_elt): Likewise.
14505         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14506         of CONST_VECTOR_ELT.
14508 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14510         * expr.c: Include rtx-vector-builder.h.
14511         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14512         directly on the tree encoding.
14513         (const_vector_from_tree): Likewise.
14514         * optabs.c: Include rtx-vector-builder.h.
14515         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14516         sequence of "u" values.
14517         * vec-perm-indices.c: Include rtx-vector-builder.h.
14518         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14519         directly on the vec_perm_indices encoding.
14521 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14523         * doc/rtl.texi (const_vector): Describe new encoding scheme.
14524         * Makefile.in (OBJS): Add rtx-vector-builder.o.
14525         * rtx-vector-builder.h: New file.
14526         * rtx-vector-builder.c: Likewise.
14527         * rtl.h (rtx_def::u2): Add a const_vector field.
14528         (CONST_VECTOR_NPATTERNS): New macro.
14529         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14530         (CONST_VECTOR_DUPLICATE_P): Likewise.
14531         (CONST_VECTOR_STEPPED_P): Likewise.
14532         (CONST_VECTOR_ENCODED_ELT): Likewise.
14533         (const_vec_duplicate_p): Check for a duplicated vector encoding.
14534         (unwrap_const_vec_duplicate): Likewise.
14535         (const_vec_series_p): Check for a non-duplicated vector encoding.
14536         Say that the function only returns true for integer vectors.
14537         * emit-rtl.c: Include rtx-vector-builder.h.
14538         (gen_const_vec_duplicate_1): Delete.
14539         (gen_const_vector): Call gen_const_vec_duplicate instead of
14540         gen_const_vec_duplicate_1.
14541         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14542         (gen_const_vec_duplicate): Use rtx_vector_builder.
14543         (gen_const_vec_series): Likewise.
14544         (gen_rtx_CONST_VECTOR): Likewise.
14545         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
14546         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14547         Build a new vector rather than modifying a CONST_VECTOR in-place.
14548         (handle_special_swappables): Update call accordingly.
14549         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14550         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14551         Build a new vector rather than modifying a CONST_VECTOR in-place.
14552         (handle_special_swappables): Update call accordingly.
14554 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14556         * simplify-rtx.c (simplify_const_binary_operation): Use
14557         CONST_VECTOR_ELT instead of XVECEXP.
14559 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14561         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
14562         the selector elements to be different from the data elements
14563         if the selector is a VECTOR_CST.
14564         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
14565         ssizetype for the selector.
14567 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14569         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
14570         before testing each element individually.
14571         * tree-vect-generic.c (lower_vec_perm): Likewise.
14573 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14575         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
14576         * selftest-run-tests.c (selftest::run_tests): Call it.
14577         * vector-builder.h (vector_builder::operator ==): New function.
14578         (vector_builder::operator !=): Likewise.
14579         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
14580         (vec_perm_indices::all_from_input_p): New function.
14581         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14582         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
14583         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
14584         instead of reading the VECTOR_CST directly.  Detect whether both
14585         vector inputs are the same before constructing the vec_perm_indices,
14586         and update the number of inputs argument accordingly.  Use the
14587         utility functions added above.  Only construct sel2 if we need to.
14589 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14591         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
14592         the broadcast of the low byte.
14593         (expand_mult_highpart): Use an explicit encoding for the permutes.
14594         * optabs-query.c (can_mult_highpart_p): Likewise.
14595         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14596         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14597         (vectorizable_bswap): Likewise.
14598         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
14599         explicit encoding for the power-of-2 permutes.
14600         (vect_permute_store_chain): Likewise.
14601         (vect_grouped_load_supported): Likewise.
14602         (vect_permute_load_chain): Likewise.
14604 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14606         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
14607         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
14608         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
14609         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14610         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14611         (vect_gen_perm_mask_any): Likewise.
14613 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14615         * int-vector-builder.h: New file.
14616         * vec-perm-indices.h: Include int-vector-builder.h.
14617         (vec_perm_indices): Redefine as an int_vector_builder.
14618         (auto_vec_perm_indices): Delete.
14619         (vec_perm_builder): Redefine as a stand-alone class.
14620         (vec_perm_indices::vec_perm_indices): New function.
14621         (vec_perm_indices::clamp): Likewise.
14622         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14623         (vec_perm_indices::new_vector): New function.
14624         (vec_perm_indices::new_expanded_vector): Update for new
14625         vec_perm_indices class.
14626         (vec_perm_indices::rotate_inputs): New function.
14627         (vec_perm_indices::all_in_range_p): Operate directly on the
14628         encoded form, without computing elided elements.
14629         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14630         encoding.  Update for new vec_perm_indices class.
14631         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14632         the given vec_perm_builder.
14633         (expand_vec_perm_var): Update vec_perm_builder constructor.
14634         (expand_mult_highpart): Use vec_perm_builder instead of
14635         auto_vec_perm_indices.
14636         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14637         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
14638         or double series encoding as appropriate.
14639         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14640         vec_perm_indices instead of auto_vec_perm_indices.
14641         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14642         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14643         (vect_permute_store_chain): Likewise.
14644         (vect_grouped_load_supported): Likewise.
14645         (vect_permute_load_chain): Likewise.
14646         (vect_shift_permute_load_chain): Likewise.
14647         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14648         (vect_transform_slp_perm_load): Likewise.
14649         (vect_schedule_slp_instance): Likewise.
14650         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14651         (vectorizable_mask_load_store): Likewise.
14652         (vectorizable_bswap): Likewise.
14653         (vectorizable_store): Likewise.
14654         (vectorizable_load): Likewise.
14655         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14656         vec_perm_indices instead of auto_vec_perm_indices.  Use
14657         tree_to_vec_perm_builder to read the vector from a tree.
14658         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14659         vec_perm_builder instead of a vec_perm_indices.
14660         (have_whole_vector_shift): Use vec_perm_builder and
14661         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
14662         truncation to calc_vec_perm_mask_for_shift.
14663         (vect_create_epilog_for_reduction): Likewise.
14664         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14665         from auto_vec_perm_indices to vec_perm_indices.
14666         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14667         instead of changing individual elements.
14668         (aarch64_vectorize_vec_perm_const): Use new_vector to install
14669         the vector in d.perm.
14670         * config/arm/arm.c (expand_vec_perm_d::perm): Change
14671         from auto_vec_perm_indices to vec_perm_indices.
14672         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14673         instead of changing individual elements.
14674         (arm_vectorize_vec_perm_const): Use new_vector to install
14675         the vector in d.perm.
14676         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14677         Update vec_perm_builder constructor.
14678         (rs6000_expand_interleave): Likewise.
14679         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14680         (rs6000_expand_interleave): Likewise.
14682 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14684         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14685         to qimode could truncate the indices.
14686         * optabs.c (expand_vec_perm_var): Likewise.
14688 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14690         * Makefile.in (OBJS): Add vec-perm-indices.o.
14691         * vec-perm-indices.h: New file.
14692         * vec-perm-indices.c: Likewise.
14693         * target.h (vec_perm_indices): Replace with a forward class
14694         declaration.
14695         (auto_vec_perm_indices): Move to vec-perm-indices.h.
14696         * optabs.h: Include vec-perm-indices.h.
14697         (expand_vec_perm): Delete.
14698         (selector_fits_mode_p, expand_vec_perm_var): Declare.
14699         (expand_vec_perm_const): Declare.
14700         * target.def (vec_perm_const_ok): Replace with...
14701         (vec_perm_const): ...this new hook.
14702         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14703         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14704         * doc/tm.texi: Regenerate.
14705         * optabs.def (vec_perm_const): Delete.
14706         * doc/md.texi (vec_perm_const): Likewise.
14707         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14708         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14709         expand_vec_perm for constant permutation vectors.  Assert that
14710         the mode of variable permutation vectors is the integer equivalent
14711         of the mode that is being permuted.
14712         * optabs-query.h (selector_fits_mode_p): Declare.
14713         * optabs-query.c: Include vec-perm-indices.h.
14714         (selector_fits_mode_p): New function.
14715         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14716         is defined, instead of checking whether the vec_perm_const_optab
14717         exists.  Use targetm.vectorize.vec_perm_const instead of
14718         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
14719         fit in the vector mode before using a variable permute.
14720         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14721         vec_perm_indices instead of an rtx.
14722         (expand_vec_perm): Replace with...
14723         (expand_vec_perm_const): ...this new function.  Take the selector
14724         as a vec_perm_indices rather than an rtx.  Also take the mode of
14725         the selector.  Update call to shift_amt_for_vec_perm_mask.
14726         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14727         Use vec_perm_indices::new_expanded_vector to expand the original
14728         selector into bytes.  Check whether the indices fit in the vector
14729         mode before using a variable permute.
14730         (expand_vec_perm_var): Make global.
14731         (expand_mult_highpart): Use expand_vec_perm_const.
14732         * fold-const.c: Includes vec-perm-indices.h.
14733         * tree-ssa-forwprop.c: Likewise.
14734         * tree-vect-data-refs.c: Likewise.
14735         * tree-vect-generic.c: Likewise.
14736         * tree-vect-loop.c: Likewise.
14737         * tree-vect-slp.c: Likewise.
14738         * tree-vect-stmts.c: Likewise.
14739         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14740         Delete.
14741         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14742         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14743         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14744         (aarch64_vectorize_vec_perm_const): ...this new function.
14745         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14746         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14747         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14748         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14749         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14750         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14751         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14752         into...
14753         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
14754         check for NEON modes.
14755         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14756         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14757         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14758         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14759         into...
14760         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
14761         the old VEC_PERM_CONST conditions.
14762         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14763         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14764         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14765         (ia64_vectorize_vec_perm_const_ok): Merge into...
14766         (ia64_vectorize_vec_perm_const): ...this new function.
14767         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14768         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14769         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14770         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14771         * config/mips/mips.c (mips_expand_vec_perm_const)
14772         (mips_vectorize_vec_perm_const_ok): Merge into...
14773         (mips_vectorize_vec_perm_const): ...this new function.
14774         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14775         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14776         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14777         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14778         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14779         (rs6000_expand_vec_perm_const): Delete.
14780         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14781         Delete.
14782         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14783         (altivec_expand_vec_perm_const_le): Take each operand individually.
14784         Operate on constant selectors rather than rtxes.
14785         (altivec_expand_vec_perm_const): Likewise.  Update call to
14786         altivec_expand_vec_perm_const_le.
14787         (rs6000_expand_vec_perm_const): Delete.
14788         (rs6000_vectorize_vec_perm_const_ok): Delete.
14789         (rs6000_vectorize_vec_perm_const): New function.
14790         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14791         an element count and rtx array.
14792         (rs6000_expand_extract_even): Update call accordingly.
14793         (rs6000_expand_interleave): Likewise.
14794         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14795         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14796         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14797         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14798         (rs6000_expand_vec_perm_const): Delete.
14799         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14800         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14801         (altivec_expand_vec_perm_const_le): Take each operand individually.
14802         Operate on constant selectors rather than rtxes.
14803         (altivec_expand_vec_perm_const): Likewise.  Update call to
14804         altivec_expand_vec_perm_const_le.
14805         (rs6000_expand_vec_perm_const): Delete.
14806         (rs6000_vectorize_vec_perm_const_ok): Delete.
14807         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
14808         reference to the SPE evmerge intructions.
14809         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14810         an element count and rtx array.
14811         (rs6000_expand_extract_even): Update call accordingly.
14812         (rs6000_expand_interleave): Likewise.
14813         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14814         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14815         new function.
14816         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14818 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14820         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14821         vector mode and that that mode matches the mode of the data
14822         being permuted.
14823         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14824         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
14825         directly using expand_vec_perm_1 when forcing selectors into
14826         registers.
14827         (expand_vec_perm_var): New function, split out from expand_vec_perm.
14829 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14831         * optabs-query.h (can_vec_perm_p): Delete.
14832         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14833         * optabs-query.c (can_vec_perm_p): Split into...
14834         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14835         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14836         particular selector is valid.
14837         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14838         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14839         (vect_grouped_load_supported): Likewise.
14840         (vect_shift_permute_load_chain): Likewise.
14841         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14842         (vect_transform_slp_perm_load): Likewise.
14843         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14844         (vectorizable_bswap): Likewise.
14845         (vect_gen_perm_mask_checked): Likewise.
14846         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
14847         implementations of variable permutation vectors into account
14848         when deciding which selector to use.
14849         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14850         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14851         with a false third argument.
14852         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14853         to test whether the constant selector is valid and can_vec_perm_var_p
14854         to test whether a variable selector is valid.
14856 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14858         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14859         * optabs-query.c (can_vec_perm_p): Likewise.
14860         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14861         instead of vec_perm_indices.
14862         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14863         (vect_gen_perm_mask_checked): Likewise,
14864         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14865         (vect_gen_perm_mask_checked): Likewise,
14867 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
14869         * optabs-query.h (qimode_for_vec_perm): Declare.
14870         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14871         (qimode_for_vec_perm): ...this new function.
14872         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14874 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14876         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14877         does not have a conditional at the top.
14879 2018-01-02  Richard Biener  <rguenther@suse.de>
14881         * ipa-inline.c (big_speedup_p): Fix expression.
14883 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14885         PR target/81616
14886         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14887         for generic 4->6.
14889 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
14891         PR target/81616
14892         Generic tuning.
14893         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14894         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14895         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14896         cond_taken_branch_cost 3->4.
14898 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
14900         PR tree-optimization/83581
14901         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14902         TODO_cleanup_cfg if any changes have been made.
14904         PR middle-end/83608
14905         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14906         convert_modes if target mode has the right side, but different mode
14907         class.
14909         PR middle-end/83609
14910         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14911         last argument when extracting from CONCAT.  If either from_real or
14912         from_imag is NULL, use expansion through memory.  If result is not
14913         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14914         the parts directly to inner mode, if even that fails, use expansion
14915         through memory.
14917         PR middle-end/83623
14918         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14919         check for bswap in mode rather than HImode and use that in expand_unop
14920         too.
14922 Copyright (C) 2018 Free Software Foundation, Inc.
14924 Copying and distribution of this file, with or without modification,
14925 are permitted in any medium without royalty provided the copyright
14926 notice and this notice are preserved.