/cp
[official-gcc.git] / gcc / ChangeLog
blobbe9c255a4b6c643756ee1909f525cb980fa163b8
1 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
3         PR target/85193
4         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
6 2018-04-05  Tom de Vries  <tom@codesourcery.com>
8         PR target/85204
9         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
10         cond jump.
12 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13             Kito Cheng  <kito.cheng@gmail.com>
15         * config/nds32/constraints.md (U33): Fine-tune checking condition.
16         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
17         * config/nds32/nds32.h (nds32_16bit_address_type): Add
18         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
21             Kito Cheng  <kito.cheng@gmail.com>
23         * config/nds32/constraints.md (Ufe): New memory constraint.
24         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
25         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
26         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
27         operands.
28         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
29         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
31 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
33         * config/nds32/nds32.md: Use optimize_size in the condition for
34         alu-shift instructions.
36 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
38         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
40 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
42         * config/nds32/nds32.md (negsi2): Refine pattern.
44 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
45             Chung-Ju Wu  <jasonwucj@gmail.com>
47         * config/nds32/iterators.md (shift_rotate): New code iterator.
48         (shift): New code attribute.
49         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
50         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
51         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
52         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
53         bit-wise operations.
54         (andsi3, *andsi3): Ditto.
55         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
56         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
57         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
58         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
59         nds32_ior_operand, nds32_xor_operand): New predicates.
61 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
63         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
64         (addsi3, subsi3): ... this.
66 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
68         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
70 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
72         * config/nds32/nds32.md: Adjust indention.
74 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
76         * config/nds32/nds32.md (feature): New attribute.
78 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
80         * config/nds32/nds32.md (subtype): New attribute.
82 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
84         PR target/85203
85         * config/arm/arm-builtins.c (arm_expand_builtin): Change
86         expansion to perform a bitwise AND of the argument followed by a
87         boolean negation of the result.
89 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
91         PR rtl-optimization/84878
92         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
93         the basic block.  Assert the use reference is not artificial and that
94         it has an associated insn.
96 2018-04-04  Michael Matz  <matz@suse.de>
98         * builtins.c (compute_objsize): Pass correct operand
99         to array_at_struct_end_p.
101 2018-04-04  Richard Biener  <rguenther@suse.de>
103         PR lto/85176
104         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
105         from contexts for DINFO_LEVEL_TERSE and below.
107 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
109         * config/nds32/nds32-doubleword.md (move_<mode>): Require
110         resiter_operand condition.
111         * config/nds32/nds32.md (*move<mode>): Ditto.
113 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
114             Monk Chiang  <sh.chiang04@gmail.com>
116         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
118 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
120         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
122 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
123             Kito Cheng  <kito.cheng@gmail.com>
125         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
126         nds32_cond_code_str, output_cond_branch,
127         output_cond_branch_compare_zero, nds32_expand_cbranch,
128         nds32_expand_cstore, nds32_expand_movcc,
129         nds32_output_cbranchsi4_equality_zero,
130         nds32_output_cbranchsi4_equality_reg,
131         nds32_output_cbranchsi4_equality_reg_or_const_int,
132         nds32_output_cbranchsi4_greater_less_zero: New functions.
133         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
134         nds32_expand_cstore, nds32_expand_movcc,
135         nds32_output_cbranchsi4_equality_zero,
136         nds32_output_cbranchsi4_equality_reg,
137         nds32_output_cbranchsi4_equality_reg_or_const_int,
138         nds32_output_cbranchsi4_greater_less_zero): Declare.
139         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
140         nds32_rimm11s_operand): New predicates.
141         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
142         * config/nds32/nds32.md: Rewrite all the branch and conditional move
143         patterns.
145 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
147         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
148         * config/nds32/nds32.md: Ditto.
149         * config/nds32/pipelines.md: Ditto.
151 2018-04-04  Richard Biener  <rguenther@suse.de>
153         PR tree-optimization/85168
154         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
155         propagating abnormals.
157 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
159         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
161 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
162             Kito Cheng  <kito.cheng@gmail.com>
164         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
165         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
166         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
167         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
168         * config/nds32/nds32.md (sibcall_internal): New.
169         (sibcall_register): Remove.
170         (sibcall_immediate): Remove.
171         (sibcall_value_internal): New.
172         (sibcall_value_register): Remove.
173         (sibcall_value_immediate): Remove.
174         * config/nds32/predicates.md (nds32_general_register_operand): New.
175         (nds32_call_address_operand): New.
177 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
179         PR rtl-optimization/85167
180         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
181         bb_defs if *split_p, instead preinitialize it to NULL.
183         PR tree-optimization/85156
184         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
185         evaluating the argument multiple times.
187 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
189         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
190         than vector.
191         (_mm_cvtpd_ps): Likewise.
192         (_mm_cvttpd_epi32): Likewise.
193         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
194         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
195         vector, pixel, and bool following altivec.h include.
197 2018-04-03  Martin Sebor  <msebor@redhat.com>
199         * doc/extend.texi (Common Function Attributes): Clarify.
200         (const attribute): Likewise.
201         (pure attribute): Likewise.
203 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
205         PR target/85169
206         * config/i386/i386.c (ix86_expand_vector_set): Use
207         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
209 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
211         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
212         instructions when changing rounding bits to preserve precision bits
213         in the x87 control word.
215 2018-04-03  Martin Liska  <mliska@suse.cz>
217         PR tree-optimization/82491
218         * rtl.h (strip_offset_and_add): Replace += suboffset with
219         poly_uint64 () + suboffset.
221 2018-03-29  Martin Liska  <mliska@suse.cz>
222             Martin Jambor  <mjambor@suse.cz>
224         PR ipa/84947
225         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
226         param_type is not an integral or pointer type.
228 2018-04-03  Richard Biener  <rguenther@suse.de>
230         * sese.h (recompute_all_dominators): Remove.
232 2018-04-02  Martin Sebor  <msebor@redhat.com>
234         * doc/invoke.texi (-Wrestrict): Fix typos.
236 2018-04-02  Jim Wilson  <jimw@sifive.com>
238         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
239         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
240         (<optab>di3, <optab>si3_extend): Likewise.
241         (<optab>si3_mask, <optab>si3_mask_1): New.
242         (<optab>di3_mask, <optab>di3_mask_1): New.
243         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
244         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
245         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
247 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
249         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
250         example.
252 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
254         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
255         (nds32_canonicalize_comparison): New function.
257 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
258             Kito Cheng  <kito.cheng@gmail.com>
259             Kuan-Lin Chen <kuanlinchentw@gmail.com>
261         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
262         * config/nds32/constants.md (unspec_volatile_element): Add
263         UNSPEC_VOLATILE_RELAX_GROUP.
264         * config/nds32/nds32-relax-opt.c: New file.
265         * config/nds32/nds32-predicates.c
266         (nds32_symbol_load_store_p): New function.
267         * config/nds32/nds32-protos.h
268         (nds32_symbol_load_store_p): Declare function.
269         (make_pass_nds32_relax_opt): Declare new rtl pass function.
270         * config/nds32/nds32.c
271         (nds32_register_pass): New function to register pass.
272         (nds32_register_passes): New function to register passes.
273         * config/nds32/nds32.md (relax_group): New pattern.
274         * config/nds32/nds32.opt (mrelax-hint): New option.
275         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
277 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
279         * config/nds32/t-nds32: Modify files dependency.
281 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
283         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
284         (PROFILE_HOOK): Define its implementation.
286 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
288         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
289         type and 32-bit size.
291 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
293         PR middle-end/85090
294         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
295         (V_128_256): New mode iterator.
296         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
297         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
298         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
299         of V.
300         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
301         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
303 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
305         PR target/83315
306         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
307         NaN inputs correctly.
309 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
311         PR target/80546
312         * config/rs6000/vsx.md (??r): New mode attribute.
313         (*vsx_mov<mode>_64bit): Use it.
314         (*vsx_mov<mode>_32bit): Likewise.
316 2018-03-30  Martin Sebor  <msebor@redhat.com>
318         PR tree-optimization/84818
319         * builtins.c (check_access): Use warning_n.
321 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
323         PR target/83822
324         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
325         condition.
326         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
327         condition.
329 2018-03-30  Julia Koval  <julia.koval@intel.com>
331         PR target/84413
332         * x86-tune.def (movx, partial_reg_dependency): Enable for
333         m_SKYLAKE_AVX512.
335 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
337         PR inline-asm/84985
338         * lra-constraints.c (process_alt_operands): Move setting
339         this_alternative_matches below.
341 2018-03-29  Martin Liska  <mliska@suse.cz>
343         PR lto/84995.
344         * doc/invoke.texi: Document how LTO works with debug info.
345         Describe auto-load support of binutils.  Mention 'x86-64'
346         as valid option value of -march option.
348 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
350         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
352         PR c/85094
353         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
354         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
355         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
356         checking.
358 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
360         PR target/84912
361         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
362         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
363         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
364         for RS6000_BTM_POWERPC64.
365         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
366         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
367         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
368         definition.
369         (DIVDE): Use it.
370         (DIVDEU): Likewise.
372 2018-03-28 Carl Love  <cel@us.ibm.com>
374         Revert
375         2017-09-27  Carl Love  <cel@us.ibm.com>
377         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
378         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
379         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
380         fctiw instruction.
382 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
384         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
385         instead of __vector bool.
386         (_mm_max_pu8): Likewise.
387         (_mm_min_pi16): Likewise.
389 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
391         PR target/84912
392         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
393         (DIVWEUO): Likewise.
394         (DIVDEO): Likewise.
395         (DIVDEUO): Likewise.
396         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
397         DIVWEUO and DIVDEUO.
398         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
399         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
400         (div_extend): Likewise.
401         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
402         builtin function.
403         (__builtin_divweuo): Likewise.
404         (__builtin_divdeo): Likewise.
405         (__builtin_divdeuo): Likewise.
407 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
409         PR target/85095
410         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
411         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
413         PR tree-optimization/82004
414         * gimple-match-head.c (optimize_pow_to_exp): New function.
415         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
416         Don't fold to exp if optimize_pow_to_exp is false.
418 2018-03-28  Martin Liska  <mliska@suse.cz>
420         PR other/84819
421         * calls.c (initialize_argument_information): Fix trailing space.
422         * common.opt: Fix typo and provide better explanation for
423         -fsanitize-coverage option.
424         * config/i386/i386.opt: Fix typo.
426 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
427             Martin Liska  <mliska@suse.cz>
429         PR sanitizer/85081
430         * gimplify.c (asan_poison_variable): Don't do the check for
431         gimplify_omp_ctxp here.
432         (gimplify_decl_expr): Do it here.
433         (gimplify_target_expr): Likewise.
435 2018-03-28  Martin Liska  <mliska@suse.cz>
437         PR target/84988
438         * config/i386/i386.c (ix86_function_arg_advance): Do not call
439         chkp_type_bounds_count if MPX is not enabled.
441 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
443         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
445 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
447         PR target/84914
448         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
449         function to create the function decl for complex long double
450         multiply and divide for -mabi=ieeelongdouble.
451         (init_float128_ieee): Call it.
453 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
455         PR target/85044
456         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
457         -fcf-protection=branch -mibt.
458         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
460 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
462         PR target/81863
463         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
465 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
467         PR target/85056
468         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
469         extern array declarations.
471 2018-03-27  Richard Biener  <rguenther@suse.de>
473         PR middle-end/84067
474         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
475         explicit single_use checks.
477 2018-03-27  Richard Biener  <rguenther@suse.de>
479         PR tree-optimization/85082
480         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
481         Valueize the VUSE.
483 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
485         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
486         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
487         Turn on fasynchronous-unwind-tables and funwind-tables.
489 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
491         PR target/85073
492         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
493         (*bmi_blsr_<mode>_ccz): Ditto.
495 2018-03-26  Tom de Vries  <tom@codesourcery.com>
497         PR tree-optimization/85063
498         * omp-general.c (offloading_function_p): New function.  Factor out
499         of ...
500         * omp-offload.c (pass_omp_target_link::gate): ... here.
501         * omp-general.h (offloading_function_p): Declare.
502         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
503         with attribute omp declare target for offloading functions.
505 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
507         PR tree-optimization/84005
508         * tree-data-ref.h (get_base_for_alignment): Declare.
509         * tree-data-ref.c (get_base_for_alignment_1): New function.
510         (get_base_for_alignment): Likewise.
511         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
512         get_base_for_alignment to find a suitable base object, instead
513         of always using drb->base_address.
515 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
517         PR inline-asm/85022
518         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
519         known size by default.
521 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
523         PR inline-asm/85030
524         * lra-constraints.c (process_alt_operands): Don't match BLKmode
525         and non BLKmode operands.
527 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
529         PR target/85026
530         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
531         Clean up attributes.
533 2018-03-23  Richard Biener  <rguenther@suse.de>
535         PR debug/85020
536         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
537         we are going to emit early debug for LTO.
539 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
541         PR inline-asm/85034
542         * function.c (match_asm_constraints_1): Don't optimize if input
543         doesn't satisfy general_operand predicate for output's mode.
545         PR inline-asm/85022
546         * alias.c (write_dependence_p): Don't require for x_canonicalized
547         non-VOIDmode if x has VOIDmode.
549         PR sanitizer/85029
550         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
551         just don't try to optimize it rather than assert it never happens.
553 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
555         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
556         macro expansions for definition of ST_INTERNAL_<mode> and
557         LD_INTERNAL_<mode> builtins.
558         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
559         Remove prototype.
560         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
561         function.
562         (altivec_expand_st_builtin): Likewise.
563         (altivec_expand_builtin): Remove calls to deleted functions.
564         (rs6000_address_for_altivec): Delete this function.
565         * config/rs6000/vector.md: Remove expands for
566         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
568 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
570         PR target/84826
571         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
572         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
573         re-computing once computed.
574         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
575         (arm_init_machine_status): Initialize
576         machine->static_chain_stack_bytes.
578 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
580         PR target/84760
581         * doc/extend.texi: Add four new prototypes for vec_ld.
582         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
583         definitions for more logical presentation.
584         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
585         entries for V1TI variants of __builtin_altivec_ld builtin.
586         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
587         handling of V1TI variant of LVX icode pattern.
588         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
589         (rs6000_gimple_fold_builtin): Likewise.
590         (altivec_init_builtins): Add code to define
591         __builtin_altivec_lvx_v1ti function.
593 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
595         PR inline-asm/84941
596         * function.c (match_asm_constraints_1): Don't do the optimization
597         if input isn't a REG, SUBREG, MEM or constant.
599 2018-03-22  Tom de Vries  <tom@codesourcery.com>
601         PR tree-optimization/84956
602         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
603         bb_has_abnormal_pred.
605 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
607         PR sanitizer/85018
608         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
609         DECL_INITIAL (decl) to decl at the end.
610         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
611         adjust the comment.
613 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
615         * doc/extend.texi (__builtin_tgmath): Document when complex
616         integer types are treated as _Complex _Float64.
618 2018-03-21  Tom de Vries  <tom@codesourcery.com>
620         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
622 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
624         PR tree-optimization/84960
625         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
626         if it is ENTRY block, move them into single succ of ENTRY in that case.
628 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
630         PR tree-optimization/84811
631         * poly-int.h (poly_span_traits): Remove the T3 parameter and
632         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
633         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
634         (known_subrange_p): Update accordingly.  Cast each value involved
635         in the size comparison, rather than casting the result of the
636         subtraction.
638 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
640         PR tree-optimization/84982
641         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
642         by flipping the least significant bit rather than all bits from
643         bitpos to bitpos + bitsize - 1.
645 2018-03-21  Nathan Sidwell  <nathan@acm.org>
647         * doc/extend.texi (Deprecated Features): Remove mention of
648         long-deleted deprecations.
650 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
652         PR jit/84288
653         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
654         * configure: Regenerate.
656 2018-03-21  Tom de Vries  <tom@codesourcery.com>
658         PR tree-optimization/83126
659         * tree-parloops.c (num_phis): New function.
660         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
662 2018-03-21  Nathan Sidwell  <nathan@acm.org>
664         * doc/extend.texi (Deprecated Features): Update deprecated flags,
665         mention anon-struct/union members and trailing attributes.
667 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
669         PR tree-optimization/84969
670         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
671         builtin memset partitions if they set different rhs values.
673 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
675         PR rtl-optimization/84989
676         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
677         VEC_DUPLICATE with scalar result mode.
679 2018-03-21  Martin Liska  <mliska@suse.cz>
681         PR ipa/84963
682         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
683         not intended return statement.
685 2018-03-21  Martin Liska  <mliska@suse.cz>
687         PR target/84988
688         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
689         (chkp_find_bound_slots_1): Limit number of iterations.
691 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
693         PR target/84838
694         * Minor grammar fixes for x86 options.
696 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
698         PR debug/84875
699         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
700         holding REG_CFA_RESTORE notes, instead turn them into a USE.
702 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
704         PR target/83789
705         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
706         (altivec_lvx_<mode>_1op): Likewise.
707         (altivec_stvx_<mode>_2op): Likewise.
708         (altivec_stvx_<mode>_1op): Likewise.
709         (altivec_lvx_<VM2:mode>): New define_expand.
710         (altivec_stvx_<VM2:mode>): Likewise.
711         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
712         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
713         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
714         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
715         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
716         (rs6000_gen_lvx): Likewise.
717         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
718         (altivec_expand_stv_builtin): Likewise.
719         (altivec_expand_builtin): Likewise.
720         * config/rs6000/vector.md: Likewise.
722 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
724         PR target/82518
725         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
726         BYTES_BIG_ENDIAN.
728 2018-03-20  Richard Biener  <rguenther@suse.de>
730         PR target/84986
731         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
732         sign-conversions as zero, fall back to standard scalar_stmt
733         cost for the rest.
735 2018-03-20  Martin Liska  <mliska@suse.cz>
737         PR ipa/84825
738         * predict.c (rebuild_frequencies): Handle case when we have
739         PROFILE_ABSENT, but flag_guess_branch_prob is false.
741 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
743         PR target/84990
744         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
745         flag_section_anchors.
746         * varasm.c (use_blocks_for_decl_p): Remove hack for
747         dw2_force_const_mem.
749         PR target/84845
750         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
751         to ...
752         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
753         be created, use lowpart_subreg of operands[0] rather than operands[0]
754         itself.
755         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
756         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
757         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
758         and n constraint instead of aarch64_shift_imm_di and Usd.
759         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
760         (*aarch64_<optab>_reg_minus<mode>3): ... this.
762 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
764         PR target/82989
765         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
766         to favor GPR over NEON registers.
767         (<shift>di3_neon): Likewise.
769 2018-03-20  Tom de Vries  <tom@codesourcery.com>
771         PR target/84952
772         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
773         (nvptx_process_pars): Emit bar.sync asap and alap.
775 2018-03-20  Tom de Vries  <tom@codesourcery.com>
777         PR target/84954
778         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
779         seen_label if seen_label is already set.
781 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
783         PR target/84945
784         * config/i386/i386.c (fold_builtin_cpu): For features above 31
785         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
786         Use 1U instead of 1.  Formatting fixes.
788         PR c/84953
789         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
790         instead of TREE_TYPE (s1) for the return value.
792 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
794         PR tree-optimization/84946
795         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
796         bitsize + bitsize in poly_uint64 rather than poly_int64.
798         PR sanitizer/78651
799         * dwarf2asm.c: Include fold-const.c.
800         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
801         of decl rather than decl itself.
803         PR rtl-optimization/84643
804         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
806 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
808         PR sanitizer/78651
809         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
810         calling assemble_variable.
812 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
814         PR target/81647
815         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
816         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
818 2018-03-19  Jim Wilson  <jimw@sifive.com>
820         PR bootstrap/84856
821         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
822         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
823         (riscv_first_stack_step): Likewise.
824         (riscv_option_override): Use STACK_BOUNDARY instead of
825         MIN_STACK_BOUNDARY.
826         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
827         MIN_STACK_BOUNDARY.
828         (BIGGEST_ALIGNMENT): Set to 128.
829         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
830         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
831         STACK_BOUNDARY.
833 2018-03-19  Richard Biener  <rguenther@suse.de>
835         PR tree-optimization/84933
836         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
837         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
839 2018-03-19  Richard Biener  <rguenther@suse.de>
841         PR tree-optimization/84859
842         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
843         (cond_if_else_store_replacement): Perform sinking operation on
844         single-store BBs regardless of MAX_STORES_TO_SINK setting.
845         Generalize what a BB with a single eligible store is.
847 2018-03-19  Richard Biener  <rguenther@suse.de>
849         PR tree-optimization/84929
850         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
851         chrec_is_positive against non-chrec arg.
853 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
855         PR target/84711
856         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
858 2018-03-18  Martin Liska  <mliska@suse.cz>
860         PR rtl-optimization/84635
861         * regrename.c (build_def_use): Use matches_mode only when
862         matches >= 0.
864 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
866         PR tree-optimization/84913
867         * tree-vect-loop.c (vectorizable_reduction): Don't try to
868         vectorize chains of COND_EXPRs.
870 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
872         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
874 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
876         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
878 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
880         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
882 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
883             Kito Cheng  <kito.cheng@gmail.com>
885         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
886         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
887         (nds32_adjust_reg_alloc_order): New function.
888         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
890 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
892         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
893         nds32_print_operand, nds32_print_operand_address): Use
894         HOST_WIDE_INT_PRINT_DEC instead.
896 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
898         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
900 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
902         PR target/84902
903         * config/i386/i386.c (initial_ix86_tune_features,
904         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
905         unsigned long long.
906         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
907         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
908         rather than 1u << ix86_tune.  Formatting fix.
909         (ix86_option_override_internal): Change ix86_arch_mask from
910         unsigned int to unsigned HOST_WIDE_INT, initialize to
911         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
912         (ix86_function_specific_restore): Likewise.
914 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
916         PR target/84899
917         * postreload.c (reload_combine_recognize_pattern): Perform
918         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
919         truncate_int_for_mode the result for the destination's mode.
921         PR c/84909
922         * hsa-gen.c (mem_type_for_type): Fix comment typo.
923         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
924         Likewise.
925         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
926         Likewise.
928 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
930         PR target/84876
931         * lra-assigns.c (lra_split_hard_reg_for): Don't use
932         regno_allocno_class_array and sorted_pseudos.
933         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
934         insns where regno is used.
936 2018-03-16  Martin Liska  <mliska@suse.cz>
938         PR ipa/84833
939         * multiple_target.c (create_dispatcher_calls): Redirect
940         reference in the symbol table.
942 2018-03-16  Martin Liska  <mliska@suse.cz>
944         PR ipa/84722
945         * multiple_target.c (create_dispatcher_calls): Redirect also
946         an alias.
948 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
950         PR c++/79937
951         PR c++/82410
952         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
953         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
954         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
956 2018-03-16  Julia Koval  <julia.koval@intel.com>
958         * doc/invoke.texi (Skylake Server): Add CLWB.
959         Cannonlake): Remove CLWB.
961 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
963         PR tree-optimization/84841
964         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
965         1 << 3.
966         (FLOAT_ONE_CONST_TYPE): Define.
967         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
968         (sort_by_operand_rank): Put entries with higher constant_type last
969         rather than first to match comments.
971 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
973         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
974         split predicate.
976 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
978         PR c++/79085
979         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
980         check and use address of target always.
982 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
984         PR target/84574
985         * config/i386/i386.c (indirect_thunk_needed): Update comments.
986         (indirect_thunk_bnd_needed): Likewise.
987         (indirect_thunks_used): Likewise.
988         (indirect_thunks_bnd_used): Likewise.
989         (indirect_return_needed): New.
990         (indirect_return_bnd_needed): Likewise.
991         (output_indirect_thunk_function): Add a bool argument for
992         function return.
993         (output_indirect_thunk_function): Don't generate alias for
994         function return thunk.
995         (ix86_code_end): Call output_indirect_thunk_function to generate
996         function return thunks.
997         (ix86_output_function_return): Set indirect_return_bnd_needed
998         and indirect_return_needed instead of indirect_thunk_bnd_needed
999         and indirect_thunk_needed.
1001 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
1003         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
1004         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
1005         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
1007 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
1008             Paul Hua <paul.hua.gm@gmail.com>
1010         PR c/84852
1011         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
1013 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
1015         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
1016         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
1017         resp. SFmode cases.
1019 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
1021         PR target/84711
1022         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1023         instead of GET_MODE_SIZE when comparing Units.
1025 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
1027         PR target/68256
1028         * varasm.c (hash_section): Return an unchangeble hash value
1029         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
1030         Return !aarch64_can_use_per_function_literal_pools_p ().
1032 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
1034         PR target/84860
1035         * optabs.c (emit_conditional_move): Pass address of cmode's copy
1036         rather than address of cmode as last argument to prepare_cmp_insn.
1038 2018-03-15  Julia Koval  <julia.koval@intel.com>
1040         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
1041         F_AVX512VNNI, F_AVX512BITALG): New.
1043 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
1045         PR target/83451
1046         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
1047         insn for floating-point loads and stores.
1049 2018-03-14  Carl Love  <cel@us.ibm.com>
1051         * config/rs6000/rs6000-c.c: Add macro definitions for
1052         ALTIVEC_BUILTIN_VEC_PERMXOR.
1053         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
1054         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
1055         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
1056         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
1057         UNSPEC_VPERMXOR.
1058         * config/doc/extend.texi: Add prototypes for vec_permxor.
1060 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
1062         PR c/84852
1063         * diagnostic-show-locus.c (class layout_point): Convert m_line
1064         from int to linenum_type.
1065         (line_span::comparator): Use linenum "compare" function when
1066         comparing line numbers.
1067         (test_line_span): New function.
1068         (layout_range::contains_point): Convert param "row" from int to
1069         linenum_type.
1070         (layout_range::intersects_line_p): Likewise.
1071         (layout::will_show_line_p): Likewise.
1072         (layout::print_source_line): Likewise.
1073         (layout::should_print_annotation_line_p): Likewise.
1074         (layout::print_annotation_line): Likewise.
1075         (layout::print_leading_fixits): Likewise.
1076         (layout::annotation_line_showed_range_p): Likewise.
1077         (struct line_corrections): Likewise for field m_row.
1078         (line_corrections::line_corrections): Likewise for param "row".
1079         (layout::print_trailing_fixits): Likewise.
1080         (layout::get_state_at_point): Likewise.
1081         (layout::get_x_bound_for_row): Likewise.
1082         (layout::print_line): Likewise.
1083         (diagnostic_show_locus): Likewise for locals "last_line" and
1084         "row".
1085         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
1086         * input.c (selftest::test_linenum_comparisons): New function.
1087         (selftest::input_c_tests): Call it.
1088         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
1089         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
1090         * selftest.h (ASSERT_GT): New macro.
1091         (ASSERT_GT_AT): New macro.
1092         (ASSERT_LT): New macro.
1093         (ASSERT_LT_AT): New macro.
1095 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
1097         PR rtl-optimization/84780
1098         * combine.c (distribute_links): Don't make a link based on pc_rtx.
1100 2018-03-14  Martin Liska  <mliska@suse.cz>
1102         * tree.c (record_node_allocation_statistics): Use
1103         get_stats_node_kind.
1104         (get_stats_node_kind): New function extracted from
1105         record_node_allocation_statistics.
1106         (free_node): Use get_stats_node_kind.
1108 2018-03-14  Richard Biener  <rguenther@suse.de>
1110         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
1111         that the value-set of ANTIC_IN doesn't grow.
1113         Revert
1114         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
1115         member.
1116         (BB_VISITED_WITH_VISITED_SUCCS): New define.
1117         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
1119 2018-03-14  Julia Koval  <julia.koval@intel.com>
1121         * config.gcc (icelake-client, icelake-server): New.
1122         (icelake): Remove.
1123         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
1124         (initial_ix86_arch_features): Ditto.
1125         (PTA_SKYLAKE): Add SGX.
1126         (PTA_ICELAKE): Remove.
1127         (PTA_ICELAKE_CLIENT): New.
1128         (PTA_ICELAKE_SERVER): New.
1129         (ix86_option_override_internal): Split up icelake on icelake client and
1130         icelake server.
1131         (get_builtin_code_for_version): Ditto.
1132         (fold_builtin_cpu): Ditto.
1133         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
1134         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
1135         * config/i386/i386.h (processor_type): Ditto.
1136         * doc/invoke.texi: Ditto.
1138 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
1140         PR sanitizer/83392
1141         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
1142         INTEGER_CST offset, add it together with bitpos / 8 and
1143         sign extend based on POINTER_SIZE.
1145         PR target/84844
1146         Revert
1147         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
1149         PR target/78090
1150         * config/i386/constraints.md (Yc): New register constraint.
1151         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
1152         Use Yc constraint for alternative 2 of operand 0.  Remove
1153         preferred_for_speed attribute.
1155 2018-03-14  Richard Biener  <rguenther@suse.de>
1157         PR tree-optimization/84830
1158         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
1159         with the old one to avoid oscillations.
1161 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
1163         PR target/83712
1164         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
1165         pseudos.
1166         (assign_by_spills): Return a flag of reload assignment failure.
1167         Do not process the reload assignment failures.  Do not spill other
1168         reload pseudos if they has the same reg class.  Update n if
1169         necessary.
1170         (lra_assign): Add a return arg.  Set up from the result of
1171         assign_by_spills call.
1172         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
1173         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
1174         usage_insns if it is not NULL.
1175         (spill_hard_reg_in_range): New function.
1176         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
1177         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
1178         function prototypes.
1179         (lra_assign): Change prototype.
1180         * lra.c (lra): Add code to deal with fails by splitting hard reg
1181         live ranges.
1183 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
1185         * config/riscv/riscv.opt (mrelax): New option.
1186         * config/riscv/riscv.c (riscv_file_start): Emit ".option
1187         "norelax" when riscv_mrelax is disabled.
1188         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
1190 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
1192         PR target/84743
1193         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
1194         reassociation for int modes.
1196 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
1198         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
1199         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
1200         for big-endian.
1201         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
1202         * config/aarch64/aarch64-sve.md
1203         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
1204         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
1205         (*extend<mode><Vwide>2): Rename to...
1206         (aarch64_sve_extend<mode><Vwide>2): ...this.
1207         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
1208         renaming the old pattern to...
1209         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
1210         unsigned packs.
1211         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
1212         define_expand, renaming the old pattern to...
1213         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
1214         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
1215         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
1216         account when deciding which SVE instruction the optab should use.
1217         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
1219 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
1221         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
1222         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
1223         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
1224         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
1225         (tlsdesc_small_<mode>): Turn a define_expand and use
1226         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
1227         (tlsdesc_small_advsimd_<mode>): ...this.
1228         (tlsdesc_small_sve_<mode>): New pattern.
1230 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
1232         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
1233         (UNSPEC_UMUL_HIGHPART): New constants.
1234         (MUL_HIGHPART): New int iteraor.
1235         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
1236         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
1237         define_expand.
1238         (*<su>mul<mode>3_highpart): New define_insn.
1240 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
1242         PR lto/84805
1243         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
1244         incomplete types.
1246 2018-03-13  Martin Liska  <mliska@suse.cz>
1248         PR ipa/84658.
1249         * (sem_item_optimizer::sem_item_optimizer): Initialize new
1250         vector.
1251         (sem_item_optimizer::~sem_item_optimizer): Release it.
1252         (sem_item_optimizer::merge_classes): Register variable aliases.
1253         (sem_item_optimizer::fixup_pt_set): New function.
1254         (sem_item_optimizer::fixup_points_to_sets): Likewise.
1255         * ipa-icf.h: Declare new variables and functions.
1257 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
1259         PR middle-end/84834
1260         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
1261         integer_pow2p@2 and test integer_pow2p in condition.
1262         (A < 0 ? C : 0): Similarly for @1.
1264         PR middle-end/84831
1265         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
1266         characters starting at p contain '\0' character, don't look beyond
1267         that.
1269         PR target/84827
1270         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
1271         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
1273         PR target/84828
1274         * reg-stack.c (change_stack): Change update_end var from int to
1275         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
1276         also call set_block_for_insn on the newly added insns and rescan.
1278         PR target/84786
1279         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
1280         on the last operand.
1282         PR c++/84704
1283         * tree.c (stabilize_reference_1): Return save_expr (e) for
1284         STATEMENT_LIST even if it doesn't have side-effects.
1286 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
1288         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
1290 2018-03-12  Renlin Li  <renlin.li@arm.com>
1292         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
1293         aarch64_output_scalar_simd_mov_immediate.
1295 2018-03-12  Martin Sebor  <msebor@redhat.com>
1297         PR tree-optimization/83456
1298         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
1299         for perfectly overlapping calls to memcpy.
1300         (gimple_fold_builtin_memory_chk): Same.
1301         (gimple_fold_builtin_strcpy): Handle no-warning.
1302         (gimple_fold_builtin_stxcpy_chk): Same.
1303         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
1305 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
1307         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
1308         parameter.  Use it for SFmode.
1309         (rs6000_function_arg_advance_1): Adjust.
1310         (rs6000_function_arg): Adjust.
1311         (rs6000_gimplify_va_arg): Pass false for that new parameter.
1313 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
1315         PR rtl-optimization/84169
1316         PR rtl-optimization/84780
1317         * combine.c (can_combine_p): Check for a 2-insn combination whether
1318         the destination register is used between the two insns, too.
1320 2018-03-12  Richard Biener  <rguenther@suse.de>
1322         PR tree-optimization/84803
1323         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
1324         for refs DR analysis didn't process.
1326 2018-03-12  Richard Biener  <rguenther@suse.de>
1328         PR tree-optimization/84777
1329         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
1330         force-vectorize loops ignore whether we are optimizing for size.
1332 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
1334         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
1335         (TARGET_MD_ASM_ADJUST): Define.
1337 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
1338             Kito Cheng  <kito.cheng@gmail.com>
1339             Chung-Ju Wu  <jasonwucj@gmail.com>
1341         * config/nds32/nds32.c (nds32_compute_stack_frame,
1342         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
1343         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
1344         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
1345         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
1346         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
1347         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
1348         * config/nds32/nds32.md (prologue, epilogue): Use macro
1349         NDS32_V3PUSH_AVAILABLE_P to do checking.
1351 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
1353         PR debug/58150
1354         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
1355         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
1356         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
1357         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
1358         addition of most attributes on !orig_type_die or the attribute not
1359         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
1361 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
1362             Chung-Ju Wu  <jasonwucj@gmail.com>
1364         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
1365         __NDS32_VH__ macro.
1366         * config/nds32/nds32.opt (mvh): New option.
1368 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
1369             Chung-Ju Wu  <jasonwucj@gmail.com>
1371         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
1372         function.
1373         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
1374         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
1375         definition.
1377 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
1378             Chung-Ju Wu  <jasonwucj@gmail.com>
1380         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
1381         function.
1382         * config/nds32/nds32-multiple.md (strlensi): New pattern.
1383         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
1385 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
1386             Kito Cheng  <kito.cheng@gmail.com>
1387             Chung-Ju Wu  <jasonwucj@gmail.com>
1389         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
1390         UNSPEC_FFMISM and UNSPEC_FLMISM.
1391         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
1392         for ffb, ffmism and flmism.
1393         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
1394         (unspec_ffmism): Ditto.
1395         (unspec_flmism): Ditto.
1396         (nds32_expand_builtin_impl): Check if string extension is available.
1397         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
1398         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
1400 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
1402         Reverting patch:
1403         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
1405         PR target/83712
1406         * lra-assigns.c (assign_by_spills): Return a flag of reload
1407         assignment failure.  Do not process the reload assignment
1408         failures.  Do not spill other reload pseudos if they has the same
1409         reg class.
1410         (lra_assign): Add a return arg.  Set up from the result of
1411         assign_by_spills call.
1412         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
1413         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
1414         usage_insns if it is not NULL.
1415         (spill_hard_reg_in_range): New function.
1416         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
1417         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
1418         function prototypes.
1419         (lra_assign): Change prototype.
1420         * lra.c (lra): Add code to deal with fails by splitting hard reg
1421         live ranges.
1423 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
1425         PR target/84807
1426         * config/i386/i386.opt: Replace Enforcment with Enforcement.
1428 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
1430         PR debug/84620
1431         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
1432         (dw_val_node): Add val_symbolic_view.
1433         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
1434         (symview_upper_bound): New.
1435         (new_line_info_table): Initialize symviews_since_reset.
1436         (dwarf2out_source_line): Count symviews_since_reset and set
1437         symview_upper_bound.
1438         (dw_val_equal_p): Handle symview.
1439         (add_AT_symview): New.
1440         (print_dw_val): Handle symview.
1441         (attr_checksum, attr_checksum_ordered): Likewise.
1442         (same_dw_val_p, size_of_die): Likewise.
1443         (value_format, output_die): Likewise.
1444         (add_high_low_attributes): Use add_AT_symview for entry_view.
1445         (dwarf2out_finish): Reset symview_upper_bound, clear
1446         zero_view_p.
1448 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
1450         PR target/83969
1451         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
1452         Add strict argument and use it.
1453         (rs6000_split_multireg_move): Update for new strict argument.
1454         (mem_operand_gpr): Disallow all non-offsettable addresses.
1455         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
1457 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
1459         PR target/84772
1460         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
1461         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
1462         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
1464         PR c++/84767
1465         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
1466         decl, use remap_type if we want to use the type.
1468 2018-03-09  Martin Sebor  <msebor@redhat.com>
1470         PR tree-optimization/84526
1471         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
1472         Remove dead code.
1473         (builtin_access::generic_overlap): Be prepared to handle non-array
1474         base objects.
1476 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
1478         PR rtl-optimization/84682
1479         * lra-constraints.c (process_address_1): Check is_address flag
1480         for address constraints.
1481         (process_alt_operands): Likewise.
1482         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
1483         preprocess_constraints.
1484         * recog.h (preprocess_constraints): Add oploc parameter.
1485         Adjust callers.
1486         * recog.c (preprocess_constraints): Test address_operand for
1487         CT_ADDRESS constraints.
1489 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
1491         PR target/83712
1492         * lra-assigns.c (assign_by_spills): Return a flag of reload
1493         assignment failure.  Do not process the reload assignment
1494         failures.  Do not spill other reload pseudos if they has the same
1495         reg class.
1496         (lra_assign): Add a return arg.  Set up from the result of
1497         assign_by_spills call.
1498         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
1499         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
1500         usage_insns if it is not NULL.
1501         (spill_hard_reg_in_range): New function.
1502         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
1503         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
1504         function prototypes.
1505         (lra_assign): Change prototype.
1506         * lra.c (lra): Add code to deal with fails by splitting hard reg
1507         live ranges.
1509 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1511         PR target/83193
1512         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
1513         Accept complain bool parameter.  Only emit errors if it is true.
1514         (arm_parse_cpu_option_name): Likewise.
1515         (arm_target_thumb_only): Adjust callers of the above.
1516         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
1517         prototype to take a default true bool parameter.
1518         (arm_parse_arch_option_name): Likewise.
1520 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
1521             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1523         PR jit/64089
1524         PR jit/84288
1525         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
1526         * configure: Regenerate.
1527         * configure.ac ("linker --version-script option"): New.
1528         ("linker soname option"): New.
1530 2018-03-09  Richard Biener  <rguenther@suse.de>
1532         PR tree-optimization/84775
1533         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
1534         immediate uses of predicate stmts and mark them modified.
1536         Revert
1537         PR tree-optimization/84178
1538         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
1539         to caller.
1540         (version_loop_for_if_conversion): Delay update_ssa call.
1541         (tree_if_conversion): Delay update_ssa until after predicate
1542         insertion.
1544 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
1546         PR target/84763
1547         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
1548         when the function accesses prior frames.
1550 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
1552         PR debug/84456
1553         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
1554         gen_llsym, otherwise call maybe_gen_llsym.
1556         PR inline-asm/84742
1557         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
1558         has ',' character inside of it.
1560 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1562         PR target/84748
1563         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
1564         as clobbering CC_REGNUM.
1566 2018-03-08  Richard Biener  <rguenther@suse.de>
1568         PR middle-end/84552
1569         * tree-scalar-evolution.c: Include tree-into-ssa.h.
1570         (follow_copies_to_constant): Do not follow SSA names registered
1571         for update.
1573 2018-03-08  Richard Biener  <rguenther@suse.de>
1575         PR tree-optimization/84178
1576         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
1577         to caller.
1578         (version_loop_for_if_conversion): Delay update_ssa call.
1579         (tree_if_conversion): Delay update_ssa until after predicate
1580         insertion.
1582 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
1584         PR tree-optimization/84178
1585         * tree-if-conv.c (release_bb_predicate): Remove the
1586         the assertion that the stmts have NULL use_ops.
1587         Discard the statements, asserting that they haven't
1588         yet been added to a BB.
1590 2018-03-08  Richard Biener  <rguenther@suse.de>
1592         PR tree-optimization/84746
1593         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
1594         (phi_translate): Pass in destination ANTIC_OUT set.
1595         (phi_translate_1): Likewise.  For a simplified result lookup
1596         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
1597         (phi_translate_set): Adjust.
1598         (do_pre_regular_insertion): Likewise.
1599         (do_pre_partial_partial_insertion): Likewise.
1601 2018-03-08  Martin Liska  <mliska@suse.cz>
1603         PR gcov-profile/84735
1604         * doc/gcov.texi: Document usage of profile files.
1605         * gcov-io.h: Document changes in the format.
1607 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
1609         PR debug/84404
1610         PR debug/84408
1611         * dwarf2out.c (struct dw_line_info_table): Update comments for
1612         view == -1.
1613         (FORCE_RESET_NEXT_VIEW): New.
1614         (FORCE_RESETTING_VIEW_P): New.
1615         (RESETTING_VIEW_P): Check for -1 too.
1616         (ZERO_VIEW_P): Likewise.
1617         (new_line_info_table): Force-reset next view.
1618         (dwarf2out_begin_function): Likewise.
1619         (dwarf2out_source_line): Simplify zero_view_p initialization.
1620         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
1621         view directly.  Omit view when omitting .loc at line 0.
1623 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
1625         PR tree-optimization/84740
1626         * tree-switch-conversion.c (process_switch): Call build_constructors
1627         only if info.phi_count is non-zero.
1629         PR tree-optimization/84739
1630         * tree-tailcall.c (find_tail_calls): Check call arguments against
1631         DECL_ARGUMENTS (current_function_decl) rather than
1632         DECL_ARGUMENTS (func) when checking for tail recursion.
1634 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
1636         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
1637         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
1638         Volker Reichelt's entry and add entries for people that perform
1639         GCC fuzzy testing and report numerous bugs.
1641 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
1643         PR target/82411
1644         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
1645         readonly data in sdata, if that is disabled.
1646         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
1647         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
1648         -mreadonly-in-sdata option.
1650 2018-03-07  Martin Sebor  <msebor@redhat.com>
1652         PR tree-optimization/84468
1653         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
1654         basic block when looking for nul assignment.
1656 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
1658         PR target/84277
1659         * except.h (output_function_exception_table): Adjust prototype.
1660         * except.c (output_function_exception_table): Remove FNNAME parameter
1661         and add SECTION parameter.  Ouput one part of the table at a time.
1662         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
1663         the first part of the exception table and emit unwind directives.
1664         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
1665         (i386_pe_seh_cold_init): Likewise.
1666         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
1667         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
1668         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
1669         (ix86_output_call_insn): Emit a nop in one more case for SEH.
1670         * config/i386/winnt.c: Include except.h.
1671         (struct seh_frame_state): Add reg_offset, after_prologue and
1672         in_cold_section fields.
1673         (i386_pe_seh_end_prologue): Set seh->after_prologue.
1674         (i386_pe_seh_cold_init): New function.
1675         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
1676         to seh->in_cold_section.
1677         (seh_emit_push): Record the offset of the push.
1678         (seh_emit_save): Record the offet of the save.
1679         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
1680         Test seh->after_prologue to disregard the epilogue.
1681         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
1682         (i386_pe_end_cold_function): New function.
1684 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
1686         PR fortran/84565
1687         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
1688         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
1690         PR c++/84704
1691         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
1692         on tmp_var.
1693         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
1694         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
1696         PR middle-end/84723
1697         * multiple_target.c: Include tree-inline.h and intl.h.
1698         (expand_target_clones): Diagnose and fail if node->definition and
1699         !tree_versionable_function_p (node->decl).
1701 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
1703         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
1704         sprint_ul.
1705         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
1706         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
1707         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
1709 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
1711         PR target/84710
1712         * combine.c (try_combine): Use reg_or_subregno instead of handling
1713         just paradoxical SUBREGs and REGs.
1715 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
1717          * config/arc/arc.c (arc_finalize_pic): Remove function.
1718          (arc_must_save_register): We use single base PIC register, remove
1719          checks to save/restore the PIC register.
1720          (arc_expand_prologue): Likewise.
1721          * config/arc/arc-protos.h (arc_set_default_type_attributes):
1722          Remove.
1723          (arc_verify_short): Likewise.
1724          (arc_attr_type): Likewise.
1725          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
1726          (walk_stores): Likewise.
1727          (arc_address_cost): Make it static.
1728          (arc_verify_short): Likewise.
1729          (branch_dest): Likewise.
1730          (arc_attr_type): Likewise.
1731          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
1732          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
1733          (arc_final_prescan_insn): Remove inserting the nops due to
1734          hardware hazards.  It is done in reorg step.
1735          (insn_length_variant_t): Remove.
1736          (insn_length_parameters_t): Likewise.
1737          (arc_insn_length_parameters): Likewise.
1738          (arc_get_insn_variants): Likewise.
1739          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
1741 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
1743         PR inline-asm/84683
1744         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
1745         assertion failure.
1747         PR tree-optimization/84687
1748         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
1749         on new_node->decl.
1750         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
1752 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
1754         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
1755         Rename to ppc_speculation_barrier.
1756         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
1757         __builtin_ppc_speculation_barrier.
1759 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
1761         PR target/84700
1762         * combine.c (combine_simplify_rtx): Don't try to simplify if
1763         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
1764         are equal to x.
1766 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
1768         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
1769         to 32 bytes when compiling for POWER9.
1771 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
1773         PR target/84564
1774         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
1775         regparm >= 3 with no arg reg available also for calls with
1776         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
1778         PR target/84524
1779         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
1780         orig,vex.
1781         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
1783 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
1785         PR target/84264
1786         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
1788 2018-03-05  Richard Biener  <rguenther@suse.de>
1790         PR tree-optimization/84486
1791         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
1792         When inserting a __builtin_assume_aligned call set the LHS
1793         SSA name alignment info accordingly.
1795 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
1797         PR tree-optimization/84114
1798         * config/aarch64/aarch64.c (aarch64_reassociation_width)
1799         Avoid reassociation of FLOAT_MODE addition.
1801 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
1803         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
1804         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
1805         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
1806         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
1807         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
1808         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
1809         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
1810         and -mwbnoinvd.
1811         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
1812         __builtin_ia32_wbinvd): New builtins.
1813         (SPECIAL_ARGS2): New.
1814         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
1815         (SPECIAL_ARGS2): New.
1816         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
1817         (ix86_valid_target_attribute_inner_p): Ditto.
1818         (ix86_init_mmx_sse_builtins): Add special_args2.
1819         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
1820         TARGET_WBNOINVD_P): New.
1821         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
1822         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
1823         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
1824         * config/i386/immintrin.h (_wbinvd): New intrinsic.
1825         * config/i386/pconfigintrin.h: New file.
1826         * config/i386/wbnoinvdintrin.h: Ditto.
1827         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
1828         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
1830 2018-03-05  Richard Biener  <rguenther@suse.de>
1832         PR tree-optimization/84670
1833         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
1834         member.
1835         (BB_VISITED_WITH_VISITED_SUCCS): New define.
1836         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
1837         (compute_antic_aux): Only assert the number of values in ANTIC_IN
1838         doesn't grow if all successors (recursively) were visited at least
1839         once.
1841 2018-03-05  Richard Biener  <rguenther@suse.de>
1843         PR tree-optimization/84650
1844         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
1845         if executed in the loop pipeline.
1847 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
1849         * doc/configfiles.texi (Configuration Files): Move info about
1850         conditionalizing $target-protos.h to...
1851         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
1852         differs from $target-protos.h.
1854 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
1855             Chung-Ju Wu  <jasonwucj@gmail.com>
1857         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
1858         * config/nds32/nds32-multiple.md (setmemsi): Define.
1859         * config/nds32/nds32-memory-manipulation.c
1860         (nds32_gen_dup_4_byte_to_word_value): New.
1861         (emit_setmem_word_loop): New.
1862         (emit_setmem_byte_loop): New.
1863         (nds32_expand_setmem_loop): New.
1864         (nds32_expand_setmem_loop_v3m): New.
1865         (nds32_expand_setmem_unroll): New.
1866         (nds32_expand_setmem): New.
1868 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
1869             Chung-Ju Wu  <jasonwucj@gmail.com>
1871         * config/nds32/nds32-memory-manipulation.c
1872         (nds32_emit_load_store): New.
1873         (nds32_emit_post_inc_load_store): New.
1874         (nds32_emit_mem_move): New.
1875         (nds32_emit_mem_move_block): New.
1876         (nds32_expand_movmemsi_loop_unknown_size): New.
1877         (nds32_expand_movmemsi_loop_known_size): New.
1878         (nds32_expand_movmemsi_loop): New.
1879         (nds32_expand_movmemsi_unroll): New.
1880         (nds32_expand_movmemqi): Rename ...
1881         (nds32_expand_movmemsi): ... to this.
1882         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
1883         (movmemsi): ... to this.
1884         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
1885         (nds32_expand_movmemsi): ... to this.
1887 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
1888             Monk Chiang  <sh.chiang04@gmail.com>
1889             Chung-Ju Wu  <jasonwucj@gmail.com>
1891         * config/nds32/nds32-protos.h
1892         (nds32_expand_load_multiple): New arguments.
1893         (nds32_expand_store_multiple): Ditto.
1894         (nds32_valid_multiple_load_store): Rename ...
1895         (nds32_valid_multiple_load_store_p): ... to this.
1896         * config/nds32/nds32-memory-manipulation.c
1897         (nds32_expand_load_multiple): Refine implementation.
1898         (nds32_expand_store_multiple): Ditto.
1899         * config/nds32/nds32-multiple.md
1900         (load_multiple): Update nds32_expand_load_multiple interface.
1901         (store_multiple): Update nds32_expand_store_multiple interface.
1902         * config/nds32/nds32-predicates.c
1903         (nds32_valid_multiple_load_store): Rename ...
1904         (nds32_valid_multiple_load_store_p): ... to this and refine
1905         implementation.
1906         * config/nds32/predicates.md
1907         (nds32_load_multiple_and_update_address_operation): New predicate.
1908         (nds32_store_multiple_and_update_address_operation): New predicate.
1910 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
1911             Chung-Ju Wu  <jasonwucj@gmail.com>
1913         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
1914         (combo): New attribute.
1915         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
1917 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
1919         * config/nds32/nds32.opt: Change -mcmodel= default value.
1921 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
1922             Monk Chiang  <sh.chiang04@gmail.com>
1923             Chung-Ju Wu  <jasonwucj@gmail.com>
1925         * config/nds32/constants.md (unspec_element): New enum.
1926         * config/nds32/constraints.md (Umw): New constraint.
1927         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
1928         * config/nds32/nds32-intrinsic.md: Likewise.
1929         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
1930         (nds32_valid_smw_lwm_base_p): New.
1931         (nds32_output_smw_single_word): New.
1932         (nds32_output_lmw_single_word): New.
1933         (nds32_expand_unaligned_load): New.
1934         (nds32_expand_unaligned_store): New.
1935         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
1936         (nds32_output_smw_single_word): Declare.
1937         (nds32_output_lmw_single_word): Declare.
1938         (nds32_expand_unaligned_load): Declare.
1939         (nds32_expand_unaligned_store): Declare.
1940         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
1941         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
1942         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
1943         NDS32_BUILTIN_UASTORE_DW.
1944         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
1945         predicate.
1947 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
1948             Kito Cheng  <kito.cheng@gmail.com>
1949             Chung-Ju Wu  <jasonwucj@gmail.com>
1951         * config/nds32/nds32-intrinsic.c
1952         (nds32_expand_builtin_null_ftype_reg): Delete.
1953         (nds32_expand_builtin_reg_ftype_imm): Ditto.
1954         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
1955         (nds32_read_argument): New.
1956         (nds32_legitimize_target): Ditto.
1957         (nds32_legitimize_argument): Ditto.
1958         (nds32_check_constant_argument): Ditto.
1959         (nds32_expand_unop_builtin): Ditto.
1960         (nds32_expand_unopimm_builtin): Ditto.
1961         (nds32_expand_binop_builtin): Ditto.
1962         (nds32_builtin_decl_impl): Ditto.
1963         (builtin_description): Ditto.
1964         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
1965         (nds32_init_builtins_impl): Ditto.
1966         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
1967         (nds32_builtin_decl): New.
1968         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
1969         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
1971 2018-03-02  Jeff Law  <law@redhat.com>
1973         * reorg.c (stop_search_p): Handle DEBUG_INSN.
1974         (redundant_insn, fill_simple_delay_slots): Likewise.
1975         (fill_slots_from_thread): Likewise.
1976         * resource.c (mark_referenced_resources): Likewise.
1977         (mark_set_resources, find_dead_or_set_registers): Likewise.
1979 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
1981         * substring-locations.h (format_warning_va): Formatting fix for
1982         ATTRIBUTE_GCC_DIAG.
1983         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
1984         argument.
1985         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
1986         * substring-locations.c: Include intl.h.
1987         (format_warning_va): Turned into small wrapper around
1988         format_warning_n_va, renamed to ...
1989         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
1990         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
1991         use ngettext.
1992         (format_warning_at_substring_n): New function.
1993         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
1994         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
1995         format_warning_at_substring with just a shorter name instead of
1996         const function pointer.
1997         (fmtwarn_n): New function.
1998         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
1999         appropriate, get rid of all the fmtstr temporaries, move conditionals
2000         with G_() wrapped string literals directly into fmtwarn arguments,
2001         cast dir.len to (int), formatting fixes.
2003 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
2005         * doc/invoke.texi: Remove "Cilk Plus" references.
2007 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
2008             Richard Biener  <rguenther@suse.de>
2010         PR ipa/84628
2011         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
2012         for error or warning attributes if CALL_FROM_THUNK_P is set.
2013         Formatting fixes.
2015 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
2017         PR target/56540
2018         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
2019         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
2021         PR target/56540
2022         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
2023         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
2025         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
2026         instead of -1U in last predictors element's probability member.
2028 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
2030         PR ipa/83983
2031         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
2032         arguments if they are comparable.
2034 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
2036         PR tree-optimization/84634
2037         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
2038         masks and masked_loop_p with a single loop_masks, making sure it's
2039         null for bb vectorization.
2041 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
2043         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2044         (vect_analyze_data_ref_access): Use loop->safe_len rather than
2045         loop->force_vectorize to check whether there is no alias.
2047 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
2049         PR target/84614
2050         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
2051         prototypes.
2052         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
2053         comments.
2054         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
2055         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
2056         instead of a loop around prev_real_insn.
2057         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
2058         prev_real_insn.
2060         PR inline-asm/84625
2061         * config/i386/i386.c (ix86_print_operand): Use conditional
2062         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
2063         zero vector.
2065 2018-03-02  Richard Biener  <rguenther@suse.de>
2067         PR tree-optimization/84427
2068         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
2069         (bitmap_set_subtract_values): Rewrite to handle multiple
2070         exprs per value.
2071         (clean): Likewise.
2072         (prune_clobbered_mems): Likewise.
2073         (phi_translate): Take edge instead of pred/phiblock.
2074         (phi_translate_1): Likewise.
2075         (phi_translate_set): Likewise.  Insert all translated
2076         exprs for a value into the set, keeping possibly multiple
2077         expressions per value.
2078         (compute_antic_aux): Adjust for phi_translate changes.
2079         When intersecting union the expressions and prune those
2080         not in the final value set, keeping possibly multiple
2081         expressions per value.  Do not use value-insertion
2082         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
2083         all expressions.  Add verification that the value-sets
2084         only shrink during iteration.
2085         (compute_partial_antic_aux): Adjust for the phi_translate changes.
2086         (do_pre_regular_insertion): Likewise.
2087         (do_pre_partial_partial_insertion): Likewise.
2089 2018-03-02  Richard Biener  <rguenther@suse.de>
2091         PR target/82005
2092         * config/darwin.c (saved_debug_info_level): New static global.
2093         (darwin_asm_lto_start): Disable debug info generation for LTO out.
2094         (darwin_asm_lto_end): Restore debug info generation settings.
2096 2018-03-01  Martin Liska  <mliska@suse.cz>
2098         PR sanitizer/82484
2099         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
2100         volatile arguments.
2102 2018-03-01  Richard Biener  <rguenther@suse.de>
2104         PR debug/84645
2105         * dwarf2out.c (gen_variable_die): Properly handle late VLA
2106         type annotation with LTO when debug was disabled at compile-time.
2108 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
2110         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
2111         XINT with INTVAL.
2112         (mips_final_postscan_insn): Likewise.
2114 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
2116         PR rtl-optimization/84528
2117         * alias.c (init_alias_target): Add commentary.
2118         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
2119         a unique base value if the frame pointer is not eliminated
2120         to the stack pointer.
2122 2018-03-01  Tom de Vries  <tom@codesourcery.com>
2124         PR rtl-optimization/83327
2125         * lra-int.h (hard_regs_spilled_into): Declare.
2126         * lra.c (hard_regs_spilled_into): Define.
2127         (init_reg_info): Init hard_regs_spilled_into.
2128         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
2129         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
2130         (process_bb_lives): Handle hard_regs_spilled_into.
2131         (lra_create_live_ranges_1): Before doing liveness propagation, clear
2132         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
2134 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
2136         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
2137         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
2138         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
2139         * config/rs6000/aix72.h: New file.
2141 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
2143         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
2144         instead of warning_at with conditional singular and plural messages
2145         where possible.
2147         PR target/52991
2148         * stor-layout.c (update_alignment_for_field): For
2149         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
2150         && !DECL_PACKED (field), do the alignment update, just use
2151         only desired_align instead of MAX (type_align, desired_align)
2152         as the alignment.
2153         (place_field): Don't do known_align < desired_align handling
2154         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
2155         is non-NULL, instead do it after rli->prev_field handling and
2156         only if not within a bitfield word.  For DECL_PACKED (field)
2157         use type_align of BITS_PER_UNIT.
2159 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
2161         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
2162         superfluous parentheses and trailing spaces.
2164 2018-02-28  Richard Biener  <rguenther@suse.de>
2166         PR tree-optimization/84584
2167         * graphite-scop-detection.c (scop_detection::add_scop): Discard
2168         SCoPs with fake exit edge.
2170 2018-02-28  Martin Liska  <mliska@suse.cz>
2172         PR testsuite/84597
2173         * timevar.c (timer::print): Fix format to properly print 100%
2174         values.
2176 2018-02-28  Richard Biener  <rguenther@suse.de>
2178         PR middle-end/84607
2179         * genmatch.c (capture_info::walk_match): Do not mark
2180         captured expressions without operands as expr_p given
2181         they act more like predicates and should be subject to
2182         "lost tail" side-effect preserving.
2184 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
2186         PR rtl-optimization/81611
2187         * auto-inc-dec.c (attempt_change): Move dead note from
2188         mem_insn if it's the next use of regno
2189         (find_address): Take address use of reg holding
2190         non-incremented value.  Add parm to limit search to the named
2191         reg only.
2192         (merge_in_block): Attempt to use a mem insn that is the next
2193         use of the original regno.
2195 2018-02-27  Martin Sebor  <msebor@redhat.com>
2197         PR c++/83871
2198         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
2199         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
2201 2018-02-27  Martin Sebor  <msebor@redhat.com>
2203         PR translation/84207
2204         * diagnostic-core.h (warning_n, error_n, inform_n): Change
2205         n argument to unsigned HOST_WIDE_INT.
2206         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
2207         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
2208         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
2209         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
2211 2018-02-27  Richard Biener  <rguenther@suse.de>
2213         PR tree-optimization/84512
2214         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2215         Do not use the estimate returned from record_stmt_cost for
2216         the scalar iteration cost but sum properly using add_stmt_cost.
2218 2018-02-27  Richard Biener  <rguenther@suse.de>
2220         PR tree-optimization/84466
2221         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
2222         Adjust last change to less strictly validate use operands.
2224 2018-02-27  Martin Liska  <mliska@suse.cz>
2226         PR gcov-profile/84548
2227         * gcov.c (process_file): Allow partial overlap and consider it
2228         also as group functions.
2229         (output_lines): Properly calculate range of lines for a group.
2231 2018-02-27  Martin Liska  <mliska@suse.cz>
2233         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
2234         'ggc' suffixes.  Change first column width.
2235         (timer::print): Fix formatting of the column.
2237 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
2239         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
2240         preserve inline entry blocks for the sake of debug inline
2241         entry point markers alone.
2242         (remove_unused_locals): Suggest in comments a better place to
2243         force the preservation of inline entry blocks that are
2244         otherwise unused, but do not preserve them.
2246 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
2248         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
2250 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
2252         PR target/84039
2253         * config/i386/constraints.md (Bs): Replace
2254         ix86_indirect_branch_register with
2255         TARGET_INDIRECT_BRANCH_REGISTER.
2256         (Bw): Likewise.
2257         * config/i386/i386.md (indirect_jump): Likewise.
2258         (tablejump): Likewise.
2259         (*sibcall_memory): Likewise.
2260         (*sibcall_value_memory): Likewise.
2261         Peepholes of indirect call and jump via memory: Likewise.
2262         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
2263         (*sibcall_value_GOT_32): Likewise.
2264         * config/i386/predicates.md (indirect_branch_operand): Likewise.
2265         (GOT_memory_operand): Likewise.
2266         (call_insn_operand): Likewise.
2267         (sibcall_insn_operand): Likewise.
2268         (GOT32_symbol_operand): Likewise.
2269         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
2271 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
2273         PR rtl-optimization/83496
2274         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
2275         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
2276         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
2277         redundant insn, if any.
2278         (relax_delay_slots): Likewise.
2279         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
2281 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
2283         PR tree-optimization/83965
2284         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
2285         that grouped statements are part of a reduction chain.  Return
2286         true if the statement is not marked as a reduction itself but
2287         is part of a group.
2288         (vect_recog_dot_prod_pattern): Don't check whether the statement
2289         is part of a group here.
2290         (vect_recog_sad_pattern): Likewise.
2291         (vect_recog_widen_sum_pattern): Likewise.
2293 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
2295         PR debug/84545
2296         * final.c (rest_of_clean_state): Also look for calls inside sequences.
2298 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
2300         PR target/84530
2301         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
2302         the bool argument.
2303         (ix86_output_indirect_function_return): New prototype.
2304         (ix86_split_simple_return_pop_internal): Likewise.
2305         * config/i386/i386.c (indirect_return_via_cx): New.
2306         (indirect_return_via_cx_bnd): Likewise.
2307         (indirect_thunk_name): Handle return va CX_REG.
2308         (output_indirect_thunk_function): Create alias for
2309         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
2310         (ix86_output_indirect_jmp): Remove the bool argument.
2311         (ix86_output_indirect_function_return): New function.
2312         (ix86_split_simple_return_pop_internal): Likewise.
2313         * config/i386/i386.md (*indirect_jump): Don't pass false
2314         to ix86_output_indirect_jmp.
2315         (*tablejump_1): Likewise.
2316         (simple_return_pop_internal): Change it to define_insn_and_split.
2317         Call ix86_split_simple_return_pop_internal to split it for
2318         -mfunction-return=.
2319         (simple_return_indirect_internal): Call
2320         ix86_output_indirect_function_return instead of
2321         ix86_output_indirect_jmp.
2323 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
2325         PR bootstrap/84405
2326         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
2327         memset and value initialization afterwards.
2329 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
2331         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
2333 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2335         PR target/84521
2336         * common/config/aarch64/aarch64-common.c
2337         (aarch_option_optimization_table[]): Switch
2338         off fomit-frame-pointer
2340 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
2341             Chung-Ju Wu  <jasonwucj@gmail.com>
2343         * config/nds32/nds32-multiple.md (load_multiple): Disallow
2344         volatile memory.
2345         (store_multiple): Ditto.
2347 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
2349         * config.gcc: Add --with-cpu support for nds32 target.
2350         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
2351         * config/nds32/nds32.opt: Add -mcpu= option.
2353 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
2355         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
2356         isel=yes): Warn for these deprecated options.
2358 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
2360         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
2361         ISA_2_5_MASKS_EMBEDDED.
2363 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
2365         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
2366         p->max as pointers rather than using iterative_hash_expr.
2368 2018-02-23  Carl Love  <cel@us.ibm.com>
2370         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
2371         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
2372         BU_P8V_OVERLOAD_2.
2373         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
2374         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
2375         P8V_BUILTIN_VEC_VUNSIGNED2.
2377 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
2379         PR target/81572
2380         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
2381         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
2382         LRA_UNKNOWN_ALT.
2383         * lra-constraints.c (curr_insn_transform): Set up
2384         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
2385         LRA_UNKNOWN_ALT.
2386         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
2387         * lra-eliminations.c (spill_pseudos): Ditto.
2388         (process_insn_for_elimination): Ditto.
2389         * lra-lives.c (reg_early_clobber_p): Use the new macros.
2390         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
2391         LRA_NON_CLOBBERED_ALT.
2393 2018-02-22  Martin Sebor  <msebor@redhat.com>
2395         PR tree-optimization/84480
2396         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
2397         to maybe_diag_stxncpy_trunc.  Call it.
2398         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
2399         from gimple_fold_builtin_strcpy.  Print inlining stack.
2400         (handle_builtin_stxncpy): Print inlining stack.
2401         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
2403 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
2405         PR target/84176
2406         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
2407         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
2408         and -fcheck-pointer-bounds are used together.
2409         (indirect_thunk_prefix): New enum.
2410         (indirect_thunk_need_prefix): New function.
2411         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
2412         "_nt" instead of "_bnd" for NOTRACK prefix.
2413         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
2414         (output_indirect_thunk_function): Likewise.
2415         (): Likewise.
2416         (ix86_code_end): Update output_indirect_thunk_function calls.
2417         (ix86_output_indirect_branch_via_reg): Replace
2418         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
2419         (ix86_output_indirect_branch_via_push): Likewise.
2420         (ix86_output_function_return): Likewise.
2421         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
2422         incompatible with -fcf-protection=branch and
2423         -fcheck-pointer-bounds.
2425 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
2427         PR target/83335
2428         * config/aarch64/aarch64.c (aarch64_print_address_internal):
2429         Change gcc_assert call to output_operand_lossage.
2431 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
2433         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
2435 2018-02-22  DJ Delorie  <dj@redhat.com>
2436             Sebastian Perta  <sebastian.perta@renesas.com>
2437             Oleg Endo  <olegendo@gcc.gnu.org>
2439         * config/rx/rx.c (rx_rtx_costs): New function.
2440         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
2442 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2444         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
2446 2018-02-22  Martin Liska  <mliska@suse.cz>
2448         PR driver/83193
2449         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
2450         Add "native" as a possible value.
2452 2018-02-22  Martin Liska  <mliska@suse.cz>
2454         PR driver/83193
2455         * config/i386/i386.c (ix86_option_override_internal):
2456         Add "native" as a possible value for -march and -mtune.
2458 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
2460         PR target/84502
2461         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
2462         to all type variants.
2464         PR tree-optimization/84503
2465         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
2466         width as info->bitpos + info->bitsize - start.
2467         (merged_store_group::merge_overlapping): Simplify width computation.
2468         (check_no_overlap): New function.
2469         (imm_store_chain_info::try_coalesce_bswap): Compute expected
2470         start + width and last_order of the group, fail if check_no_overlap
2471         fails.
2472         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
2473         to group if check_no_overlap fails.
2475 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
2477         * config/rs6000/altivec.md: Delete contraint arguments to
2478         define_expand, define_split, and define_peephole2, and in
2479         define_insn_and_split if always unused.
2480         * config/rs6000/darwin.md: Ditto.
2481         * config/rs6000/dfp.md: Ditto.
2482         * config/rs6000/rs6000.md: Ditto.
2483         * config/rs6000/sync.md: Ditto.
2484         * config/rs6000/vector.md: Ditto.
2485         * config/rs6000/vsx.md: Ditto.
2487 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
2489         * config/rs6000/altivec.md: Write output control strings as braced
2490         blocks instead of double-quoted strings.
2491         * config/rs6000/darwin.md: Ditto.
2492         * config/rs6000/rs6000.md: Ditto.
2493         * config/rs6000/vector.md: Ditto.
2494         * config/rs6000/vsx.md: Ditto.
2496 2018-02-21  Jason Merrill  <jason@redhat.com>
2498         PR c++/84314 - ICE with templates and fastcall attribute.
2499         * attribs.c (build_type_attribute_qual_variant): Remove assert.
2501 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
2503         * ipa-cp.c (determine_versionability): Fix comment typos.
2505 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
2507         PR c/84229
2508         * ipa-cp.c (determine_versionability): Do not version functions caling
2509         va_arg_pack.
2511 2018-02-21  Martin Liska  <mliska@suse.cz>
2513         PR driver/83193
2514         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
2515         Add "native" as a possible value.
2516         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
2517         the macro when native cpu detection is available.
2519 2018-02-21  Martin Liska  <mliska@suse.cz>
2521         PR driver/83193
2522         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
2523         Add "native" as a possible value.
2524         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
2525         when native cpu detection is available.
2527 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
2528             Martin Sebor  <msebor@redhat.com>
2530         PR tree-optimization/84478
2531         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
2532         false.
2533         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
2534         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
2535         support which is conservatively correct, for 2 only stay conservative
2536         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
2537         argument to the 2 argument get_range_strlen, adjust 6 arg
2538         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
2539         false.
2540         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
2541         (gimple_fold_builtin_strlen): Pass true as last argument to
2542         get_range_strlen.
2544 2018-02-20  Martin Sebor  <msebor@redhat.com>
2546         PR middle-end/84095
2547         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
2548         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
2549         (builtin_memref::builtin_memref): Factor out parts into
2550         set_base_and_offset and call it.
2552 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
2554         PR middle-end/84406
2555         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
2556         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
2557         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
2558         search at the associated MODE_INT.
2560 2018-02-20  Jeff Law  <law@redhat.com>
2562         PR middle-end/82123
2563         PR tree-optimization/81592
2564         PR middle-end/79257
2565         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
2566         for range data rather than using global data.
2567         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
2568         range data rather than using global data.
2569         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
2570         pass it to children as needed.
2571         (struct directive::fmtresult): Similarly.
2572         (struct directive::set_width): Similarly.
2573         (struct directive::set_precision): Similarly.
2574         (format_integer, format_directive, parse_directive): Similarly.
2575         (format_none): Accept unnamed vr_values parameter.
2576         (format_percent, format_floating, format_character): Similarly.
2577         (format_string, format_plain): Similarly.
2578         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
2579         the EVRP range analyzer for range data rather than using global data.
2580         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
2581         gimple-ssa-evrp-analyze.h
2582         (class sprintf_dom_walker): Add after_dom_children member function.
2583         Add evrp_range_analyzer member.
2584         (sprintf_dom_walker::before_dom_children): Call into the EVRP
2585         range analyzer as needed.
2586         (sprintf_dom_walker::after_dom_children): New member function.
2587         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
2588         if not optimizing.
2589         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
2590         (evrp_range_analyzer::pop_to_marker): Likewise.
2592 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
2594         PR tree-optimization/84419
2595         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
2596         with the required type if its current type is compatible but
2597         different.
2599 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
2601         PR middle-end/82004
2602         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
2603         after vectorization.
2605 2018-02-20  Martin Liska  <mliska@suse.cz>
2607         PR driver/83193
2608         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
2609         possible values if we don't have a hint.
2611 2018-02-20  Martin Liska  <mliska@suse.cz>
2613         PR c/84310
2614         PR target/79747
2615         * final.c (shorten_branches): Build align_tab array with one
2616         more element.
2617         * opts.c (finish_options): Add alignment option limit check.
2618         (MAX_CODE_ALIGN): Likewise.
2619         (MAX_CODE_ALIGN_VALUE): Likewise.
2620         * doc/invoke.texi: Document maximum allowed option value for
2621         all -falign-* options.
2623 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
2625         PR target/84146
2626         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
2627         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
2628         * var-tracking.c (emit_note_insn_var_location): Remove all references
2629         to NOTE_INSN_CALL_ARG_LOCATION.
2630         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
2631         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
2632         Use copy_rtx_if_shared.
2633         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
2634         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
2635         (dwarf2out_var_location): Remove handling of
2636         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
2637         on call_insn.
2638         * final.c (final_scan_insn): Remove all references to
2639         NOTE_INSN_CALL_ARG_LOCATION.
2640         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
2641         before dumping final insns.
2642         * except.c (emit_note_eh_region_end): Remove all references to
2643         NOTE_INSN_CALL_ARG_LOCATION.
2644         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
2645         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
2646         * config/arc/arc.c (hwloop_optimize): Likewise.
2647         * config/arm/arm.c (create_fix_barrier): Likewise.
2648         * config/s390/s390.c (s390_chunkify_start): Likewise.
2649         * config/sh/sh.c (find_barrier): Likewise.
2650         * config/i386/i386.c (rest_of_insert_endbranch,
2651         ix86_seh_fixup_eh_fallthru): Likewise.
2652         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
2653         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
2654         * config/frv/frv.c (frv_function_prologue): Likewise.
2655         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
2656         reg note.
2657         (note_outside_basic_block_p): Remove all references to
2658         NOTE_INSN_CALL_ARG_LOCATION.
2659         * gengtype.c (adjust_field_rtx_def): Likewise.
2660         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
2661         Likewise.
2662         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
2663         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
2665         PR c++/84444
2666         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
2667         is ADDR_EXPR.
2669         PR tree-optimization/84452
2670         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
2671         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
2672         is NULL.
2674 2018-02-19  Martin Liska  <mliska@suse.cz>
2676         PR sanitizer/82183
2677         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
2679 2018-02-19  Martin Liska  <mliska@suse.cz>
2680             Richard Sandiford  <richard.sandiford@linaro.org>
2682         PR tree-optimization/82491
2683         * gimple-fold.c (get_base_constructor): Make earlier bail out
2684         to prevent ubsan.
2686 2018-02-19  Carl Love  <cel@us.ibm.com>
2688         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
2689         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
2690         BU_P8V_OVERLOAD_1.
2691         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
2692         P8V_BUILTIN_VEC_NEG.
2694 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
2696         * config/rl78/rl78.md (movdf): New define expand.
2698 2018-02-19  Martin Liska  <mliska@suse.cz>
2700         PR other/80589
2701         * doc/invoke.texi: Fix typo.
2702         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
2704 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
2706         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
2707         handle rs6000_single_float and rs6000_double_float specially for
2708         e500 family CPUs.
2710 2018-02-16  Jeff Law  <law@redhat.com>
2712         * config/rx/rx.c (add_pop_cfi_notes): New function.;
2713         (pop_regs): Use it.
2715 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
2717         PR ipa/84425
2718         * ipa-inline.c (inline_small_functions): Fix a typo.
2720 2018-02-16  Nathan Sidwell  <nathan@acm.org>
2722         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
2724 2018-02-16  Carl Love  <cel@us.ibm.com>
2726         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
2727         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
2728         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
2729         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
2730         expansion to P8V_BUILTIN_VEC_FLOAT2.
2732 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
2734         PR rtl-optimization/70023
2735         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
2736         src_regno into account.
2738 2018-02-16  Carl Love  <cel@us.ibm.com>
2740         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
2741         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
2742         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
2743         * config/rs6000/rs6000.c: Remove case statements for
2744         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
2745         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
2746         and P9V_BUILTIN_VEC_VINSERT4B.
2747         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
2748         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
2749         * config/rs6000/vsx.md:
2750         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
2751         vec_insert4b.
2753 2018-02-16  Carl Love  <cel@us.ibm.com>
2755         * config/rs6000/altivec.h: Add builtin names vec_extract4b
2756         vec_insert4b.
2757         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
2758         definitions.
2759         * config/rs6000/rs6000-c.c: Add the definitions for
2760         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
2761         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
2762         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
2763         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
2764         definition for insert4b and define insn *insert3b_internal.
2765         * doc/extend.texi: Add documentation for vec_extract4b.
2767 2018-02-16  Nathan Sidwell  <nathan@acm.org>
2769         * doc/extend.texi (Backwards Compatibility): Mention friend
2770         injection.  Note for-scope is deprecated.
2771         * doc/invoke.texi (-ffriend-injection): Deprecate.
2773 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
2775         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
2776         that moved to I2, also allow destinations that are a paradoxical
2777         subreg (instead of a normal reg).
2779 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
2781         PR target/83831
2782         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
2783         to QImode.
2785 2018-02-16  Richard Biener  <rguenther@suse.de>
2787         PR tree-optimization/84037
2788         PR tree-optimization/84016
2789         PR target/82862
2790         * config/i386/i386.c (ix86_builtin_vectorization_cost):
2791         Adjust vec_construct for the fact we need additional higher latency
2792         128bit inserts for AVX256 and AVX512 vector builds.
2793         (ix86_add_stmt_cost): Scale vector construction cost for
2794         elementwise loads.
2796 2018-02-16  Richard Biener  <rguenther@suse.de>
2798         PR tree-optimization/84417
2799         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
2800         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
2801         (non_rewritable_lvalue_p): Likewise, use poly-ints.
2803 2018-02-16  Martin Liska  <mliska@suse.cz>
2805         PR sanitizer/84307
2806         * internal-fn.def (ASAN_CHECK): Set proper flags.
2807         (ASAN_MARK): Likewise.
2809 2018-02-16  Julia Koval  <julia.koval@intel.com>
2811         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
2812         from PTA_CANNONLAKE.
2814 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
2816         PR target/84272
2817         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
2818         Use ++iter rather than iter++ for std::list iterators.
2819         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
2820         defer deleting them until all nodes in the forest are processed.  Do
2821         free even leaf nodes.  Change to_process into auto_vec.
2823         PR bootstrap/84405
2824         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
2825         * vec.h (vec_default_construct): Use memset instead of placement new
2826         if BROKEN_VALUE_INITIALIZATION is defined.
2827         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
2828         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
2829         is defined.
2831         PR rtl-optimization/83723
2832         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
2833         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
2834         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
2835         recursive calls.
2836         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
2837         callers.
2838         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
2840 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
2842         PR rtl-optimization/81443
2843         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
2844         from inner REGs to paradoxical SUBREGs.
2846 2018-02-16  Richard Biener  <rguenther@suse.de>
2848         PR tree-optimization/84399
2849         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
2850         For operands we can analyze at their definition make sure we can
2851         analyze them at each use as well.
2853 2018-02-16  Richard Biener  <rguenther@suse.de>
2855         PR tree-optimization/84190
2856         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
2857         volatile accesses if the decl isn't volatile.
2859 2018-02-15  Jason Merrill  <jason@redhat.com>
2861         PR c++/84314 - ICE with templates and fastcall attribute.
2862         * attribs.c (build_type_attribute_qual_variant): Don't clobber
2863         TYPE_CANONICAL on an existing type.
2865 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
2867         PR tree-optimization/84383
2868         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
2869         dstoff nor call operand_equal_p if dstbase is NULL.
2871         PR tree-optimization/84334
2872         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
2873         also a CONSTANT_CLASS_P, punt.
2875 2018-02-14  Jim Wilson  <jimw@sifive.com>
2877         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
2878         first SMALL_OPERAND check.  New local min_second_step.  Move assert
2879         to where locals are set.  Add TARGET_RVC support.
2880         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
2882 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
2884         * doc/invoke.texi: Correct -Wformat-overflow code sample.
2886 2018-02-14  Martin Sebor  <msebor@redhat.com>
2888         PR tree-optimization/83698
2889         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
2890         arrays constrain the offset range to their bounds.
2891         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
2892         (builtin_access::overlap): Avoid setting the size of overlap if it's
2893         already been set.
2894         (maybe_diag_overlap): Also consider arrays when deciding what values
2895         of offsets to include in diagnostics.
2897 2018-02-14  Martin Sebor  <msebor@redhat.com>
2899         PR c/84108
2900         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
2901         that correspond to the kind of a declaration.
2903 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
2905         PR target/83984
2906         * config/pa/pa.md: Load address of PIC label using the linkage table
2907         if the label is nonlocal.
2909 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2911         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
2912         warning message if user requests -maltivec=be.
2913         * doc/invoke.texi: Document deprecation of -maltivec=be.
2915 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
2917         PR target/84220
2918         * config/rs6000/rs6000-c.c: Update definitions for
2919         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
2920         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
2922 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
2924         PR target/84239
2925         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
2926         add _get_ssp intrinsics. Remove argument from
2927         __builtin_ia32_rdssp[d|q].
2928         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
2929         * config/i386/i386-builtin.def: Remove argument from
2930         __builtin_ia32_rdssp[d|q].
2931         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
2932         ix86_expand_special_args_builtin for _rdssp[d|q].
2933         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
2934         Clear register before usage.
2935         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
2936         Add documentation for new _get_ssp and _inc_ssp intrinsics.
2938 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
2940         PR tree-optimization/84357
2941         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
2942         operand 1 of an ARRAY_REF too.
2944 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
2946         PR target/83831
2947         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
2948         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
2949         declarations.
2950         (set_of_reg): New struct.
2951         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
2952         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
2953         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
2954         functions.
2955         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
2956         Split into bitclr, bitset, bitinvert patterns if appropriate.
2957         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
2958         use rx_fuse_in_memory_bitop.
2959         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
2960         to named insn, correct maximum insn length.
2962 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
2964         PR target/79242
2965         * machmode.def: Define a complex mode for PARTIAL_INT.
2966         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
2967         MODE_PARTIAL_INT.
2968         * doc/rtl.texi: Document CSPImode.
2969         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
2970         handling.
2971         (msp430_hard_regno_nregs_with_padding): Likewise.
2973 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
2975         PR target/84279
2976         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
2978 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
2980         PR rtl-optimization/84169
2981         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
2982         we generated a parallel as new i3 and we split that to new i2 and i3
2983         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
2984         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
2985         those to i2, not i1.  Partially rewrite this scan code.
2987 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
2989         PR c/82210
2990         * stor-layout.c (place_field): For variable length fields, adjust
2991         offset_align afterwards not just based on the field's alignment,
2992         but also on the size.
2994         PR middle-end/84309
2995         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
2996         of exps and logs in the use_exp2 case.
2998 2018-02-13  Jeff Law  <law@redhat.com>
3000         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
3001         entry for "vector".
3003         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
3004         ARGS as unused.
3006 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
3008         PR debug/84342
3009         PR debug/84319
3010         * common.opt (gas-loc-support, gas-locview-support): New.
3011         (ginline-points, ginternal-reset-location-views): New.
3012         * doc/invoke.texi: Document them.  Use @itemx where intended.
3013         (gvariable-location-views): Adjust.
3014         * target.def (reset_location_view): New.
3015         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
3016         (TARGET_RESET_LOCATION_VIEW): New.
3017         * doc/tm.texi: Rebuilt.
3018         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
3019         (dwarf2out_default_as_locview_support): New.
3020         (output_asm_line_debug_info): Use option variables.
3021         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
3022         (output_loc_list): Likewise.
3023         (add_high_low_attributes): Check option variables.
3024         Don't output entry view attribute in strict mode.
3025         (gen_inlined_subroutine_die): Check option variables.
3026         (dwarf2out_inline_entry): Likewise.
3027         (init_sections_and_labels): Likewise.
3028         (dwarf2out_early_finish): Likewise.
3029         (maybe_reset_location_view): New, from...
3030         (dwarf2out_var_location): ... here.  Call it.
3031         * debug.h (dwarf2out_default_as_loc_support): Declare.
3032         (dwarf2out_default_as_locview_support): Declare.
3033         * hooks.c (hook_int_rtx_insn_0): New.
3034         * hooks.h (hook_int_rtx_insn_0): Declare.
3035         * toplev.c (process_options): Take -gas-loc-support and
3036         -gas-locview-support from dwarf2out.  Enable
3037         -gvariable-location-views by default only with locview
3038         assembler support.  Enable -ginternal-reset-location-views by
3039         default only if the target defines the corresponding hook.
3040         Enable -ginline-points by default if location views are
3041         enabled; force it disabled if statement frontiers are
3042         disabled.
3043         * tree-inline.c (expand_call_inline): Check option variables.
3044         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3046 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
3048         PR tree-optimization/84321
3049         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
3050         handling.  Also check whether the anti-range contains any values
3051         that satisfy the mask; switch to a VR_RANGE if not.
3053 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
3055         PR sanitizer/84340
3056         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
3058 2018-02-13  Martin Jambor  <mjambor@suse.cz>
3060         PR c++/83990
3061         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
3062         of call statements, also set location of a load to a temporary.
3064 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
3066         * config/rl78/rl78.c (add_vector_labels): New function.
3067         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
3068         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
3069         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
3070         which checks that no arguments are passed.
3071         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
3072         * doc/extend.texi: Documentation for the new attribute.
3074 2018-02-13  Andreas Schwab  <schwab@suse.de>
3076         * config/riscv/linux.h (CPP_SPEC): Define.
3078 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
3080         PR target/84335
3081         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
3082         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
3083         OPTION_MASK_ISA_AES as first argument to def_builtin_const
3084         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
3085         instead of OPTION_MASK_ISA_PCLMUL as first argument to
3086         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
3087         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
3088         temporarily for AES and PCLMUL builtins.
3090         PR tree-optimization/84339
3091         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
3092         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
3093         Formatting fixes.
3095         PR middle-end/84309
3096         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
3097         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
3098         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
3099         inline function.
3100         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
3101         inline function.
3102         * omp-simd-clone.h: New file.
3103         * omp-simd-clone.c: Include omp-simd-clone.h.
3104         (expand_simd_clones): No longer static.
3105         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
3106         cgraph.h and omp-simd-clone.h.
3107         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
3108         (vect_recog_widen_shift_pattern): Formatting fix.
3109         (vect_pattern_recog_1): Don't check optab for calls.
3111         PR target/84336
3112         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
3113         operands[2] into a REG before using gen_lowpart on it.
3115 2018-02-12  Jeff Law  <law@redhat.com>
3117         PR target/83760
3118         * config/sh/sh.c (find_barrier): Consider a sibling call
3119         a barrier as well.
3121         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
3122         successfully back substituting a reg.
3124 2018-02-12  Richard Biener  <rguenther@suse.de>
3126         PR tree-optimization/84037
3127         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
3128         parameter, move visited init to caller.
3129         (vect_slp_analyze_operations): Separate cost from validity
3130         check, initialize visited once for all instances.
3131         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
3132         for all instances.
3133         * tree-vect-stmts.c (vect_model_simple_cost): Make early
3134         out an assert.
3135         (vect_model_promotion_demotion_cost): Likewise.
3136         (vectorizable_bswap): Guard cost modeling with !slp_node
3137         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
3138         SLP stmts.
3139         (vectorizable_call): Likewise.
3140         (vectorizable_conversion): Likewise.
3141         (vectorizable_assignment): Likewise.
3142         (vectorizable_shift): Likewise.
3143         (vectorizable_operation): Likewise.
3144         (vectorizable_store): Likewise.
3145         (vectorizable_load): Likewise.
3146         (vectorizable_condition): Likewise.
3147         (vectorizable_comparison): Likewise.
3149 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
3151         PR sanitizer/84307
3152         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
3153         (ASAN_MARK): Fix fnspec to account for return value, change pointer
3154         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
3156 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
3158         PR middle-end/83665
3159         * params.def (inline-min-speedup): Increase from 8 to 15.
3160         (max-inline-insns-auto): Decrease from 40 to 30.
3161         * ipa-split.c (consider_split): Add some buffer for function to
3162         be considered inlining candidate.
3163         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
3164         default values.
3166 2018-02-12  Richard Biener  <rguenther@suse.de>
3168         PR tree-optimization/84037
3169         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
3170         matched stmts if we cannot swap the non-matched ones.
3172 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
3174         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
3175         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
3176         _mm_maskz_scalef_round_ss): New intrinsics.
3177         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
3178         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
3179         __builtin_ia32_scalefss_round): Remove.
3180         (__builtin_ia32_scalefsd_mask_round,
3181         __builtin_ia32_scalefss_mask_round): New intrinsics.
3182         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
3183         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
3184         ((match_operand:VF_128 2 "<round_nimm_predicate>"
3185         "<round_constraint>")): Changed to ...
3186         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
3187         "<round_scalar_constraint>")): ... this.
3188         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
3189         %0, %1, %2<round_op3>}"): Changed to ...
3190         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
3191         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
3192         %2<round_scalar_mask_op3>}"): ... this.
3193         * config/i386/subst.md (round_scalar_nimm_predicate): New.
3195 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
3197         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
3198         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
3199         (_mm_maskz_sqrt_round_ss): New intrinsics.
3200         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
3201         (__builtin_ia32_sqrtsd_mask_round)
3202         (__builtin_ia32_sqrtss_mask_round): New builtins.
3203         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
3204         (__builtin_ia32_sqrtss_round): Remove.
3205         (__builtin_ia32_sqrtsd_mask_round)
3206         (__builtin_ia32_sqrtss_mask_round): New builtins.
3207         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
3208         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
3209         ((match_operand:VF_128 1 "vector_operand"
3210         "xBm,<round_constraint>")): Changed to ...
3211         ((match_operand:VF_128 1 "vector_operand"
3212         "xBm,<round_scalar_constraint>")): ... this.
3213         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
3214         %0, %2, %<iptr>1<round_op3>}): Changed to ...
3215         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
3216         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
3217         %<iptr>1<round_scalar_mask_op3>}): ... this.
3218         ((set_attr "prefix" "<round_prefix>")): Changed to ...
3219         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
3221 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
3223         PR target/84266
3224         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
3225         Cast vec_cmpeq result to correct type.
3226         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
3227         Cast vec_cmpgt result to correct type.
3229 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
3231         * final.c (final_scan_insn_1): Renamed from...
3232         (final_scan_insn): ... this.  New wrapper, to recover
3233         seen from the outermost call in recursive ones.
3234         * config/sparc/sparc.c (output_return): Drop seen from call.
3235         (output_sibcall): Likewise.
3236         * config/visium/visium.c (output_branch): Likewise.
3238 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
3240         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
3241         function label.
3243 2018-02-10  Alan Modra  <amodra@gmail.com>
3245         PR target/84300
3246         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
3247         Specify LR as an input.
3249 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
3251         PR sanitizer/83987
3252         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
3253         remove_member_access_dummy_vars): New functions.
3254         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
3255         lower_omp_1, execute_lower_omp): Use them.
3257         PR rtl-optimization/84308
3258         * shrink-wrap.c (spread_components): Release todo vector.
3260 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
3262         PR rtl-optimization/57193
3263         * ira-color.c (struct allocno_color_data): Add member
3264         conflict_allocno_hard_prefs.
3265         (update_conflict_allocno_hard_prefs): New.
3266         (bucket_allocno_compare_func): Add a preference based on
3267         conflict_allocno_hard_prefs.
3268         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
3269         (color_allocnos): Remove a dead code.  Initiate
3270         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
3272 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
3274         PR target/84226
3275         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
3276         constraint from =wa to wa.  Avoid a subreg on the output operand,
3277         instead use a pseudo and subreg it in a move.
3278         (p9_xxbrd_<mode>): Changed to ...
3279         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
3280         (p9_xxbrd_v2df): New expander.
3281         (p9_xxbrw_<mode>): Changed to ...
3282         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
3283         (p9_xxbrw_v4sf): New expander.
3285 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
3287         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
3289 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
3291         PR target/83926
3292         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
3293         multiply in 32-bit mode.
3294         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
3295         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
3296         mode.
3298 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
3300         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
3301         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
3302         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
3303         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
3305 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
3307         PR lto/84213
3308         * dwarf2out.c (is_trivial_indirect_ref): New function.
3309         (dwarf2out_late_global_decl): Do not generate a location
3310         attribute for variables that have a non-trivial DECL_VALUE_EXPR
3311         and that are not defined in the current unit.
3313 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
3315         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
3316         instead of a libcall for UNORDERED.
3318 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
3320         PR target/82641
3321         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
3322         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
3324 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3326         PR target/PR84295
3327         * config/s390/s390.c (s390_set_current_function): Invoke
3328         s390_indirect_branch_settings also if fndecl didn't change.
3330 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
3332         * config/rs6000/rs6000.md (blockage): Set length to zero.
3334 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
3336         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
3338 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
3340         PR sanitizer/84285
3341         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
3342         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
3343         -static-lib*san.
3345         PR debug/84252
3346         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
3347         PARALLEL incoming that failed vt_get_decl_and_offset check.
3349         PR middle-end/84237
3350         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
3351         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
3352         TREE_READONLY bit.
3353         (get_variable_section): For decls in named .bss* sections pass true as
3354         second argument to bss_initializer_p.
3356 2018-02-09  Marek Polacek  <polacek@redhat.com>
3357             Jakub Jelinek  <jakub@redhat.com>
3359         PR c++/83659
3360         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
3361         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
3362         Sync some changes from cxx_fold_indirect_ref.
3364 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
3366         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
3367         markers.
3368         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
3369         (BLOCK_INLINE_ENTRY_LABEL): New.
3370         (dwarf2out_var_location): Disregard inline entry markers.
3371         (inline_entry_data): New struct.
3372         (inline_entry_data_hasher): New hashtable type.
3373         (inline_entry_data_hasher::hash): New.
3374         (inline_entry_data_hasher::equal): New.
3375         (inline_entry_data_table): New variable.
3376         (add_high_low_attributes): Add DW_AT_entry_pc and
3377         DW_AT_GNU_entry_view attributes if a pending entry is found
3378         in inline_entry_data_table.  Add old entry_pc attribute only
3379         if debug nonbinding markers are disabled.
3380         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
3381         markers are enabled.
3382         (block_within_block_p, dwarf2out_inline_entry): New.
3383         (dwarf2out_finish): Check that no entries remained in
3384         inline_entry_data_table.
3385         * final.c (reemit_insn_block_notes): Handle inline entry notes.
3386         (final_scan_insn, notice_source_line): Likewise.
3387         (rest_of_clean_state): Skip inline entry markers.
3388         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
3389         markers.
3390         * gimple.c (gimple_build_debug_inline_entry): New.
3391         * gimple.h (enum gimple_debug_subcode): Add
3392         GIMPLE_DEBUG_INLINE_ENTRY.
3393         (gimple_build_debug_inline_entry): Declare.
3394         (gimple_debug_inline_entry_p): New.
3395         (gimple_debug_nonbind_marker_p): Adjust.
3396         * insn-notes.def (INLINE_ENTRY): New.
3397         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
3398         inline entry marker notes.
3399         (print_insn): Likewise.
3400         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
3401         (INSN_DEBUG_MARKER_KIND): Likewise.
3402         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
3403         * tree-inline.c (expand_call_inline): Build and insert
3404         debug_inline_entry stmt.
3405         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
3406         inline entry blocks early, if nonbind markers are enabled.
3407         (dump_scope_block): Dump fragment info.
3408         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
3409         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
3410         (gimple_build_debug_inline_entry): New.
3411         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
3412         Enable/disable inline entry points too.
3413         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
3414         (DEBUG_INSN): Describe inline entry markers.
3416         * common.opt (gvariable-location-views): New.
3417         (gvariable-location-views=incompat5): New.
3418         * config.in: Rebuilt.
3419         * configure: Rebuilt.
3420         * configure.ac: Test assembler for view support.
3421         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
3422         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
3423         * dwarf2out.c (var_loc_view): New typedef.
3424         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
3425         (dwarf2out_locviews_in_attribute): New.
3426         (dwarf2out_locviews_in_loclist): New.
3427         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
3428         (enum dw_line_info_opcode): Add LI_adv_address.
3429         (struct dw_line_info_table): Add view.
3430         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
3431         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
3432         (zero_view_p): New variable.
3433         (ZERO_VIEW_P): New macro.
3434         (output_asm_line_debug_info): New.
3435         (struct var_loc_node): Add view.
3436         (add_AT_view_list, AT_loc_list): New.
3437         (add_var_loc_to_decl): Add view param.  Test it against last.
3438         (new_loc_list): Add view params.  Record them.
3439         (AT_loc_list_ptr): Handle loc and view lists.
3440         (view_list_to_loc_list_val_node): New.
3441         (print_dw_val): Handle dw_val_class_view_list.
3442         (size_of_die): Likewise.
3443         (value_format): Likewise.
3444         (loc_list_has_views): New.
3445         (gen_llsym): Set vl_symbol too.
3446         (maybe_gen_llsym, skip_loc_list_entry): New.
3447         (dwarf2out_maybe_output_loclist_view_pair): New.
3448         (output_loc_list): Output view list or entries too.
3449         (output_view_list_offset): New.
3450         (output_die): Handle dw_val_class_view_list.
3451         (output_dwarf_version): New.
3452         (output_compilation_unit_header): Use it.
3453         (output_skeleton_debug_sections): Likewise.
3454         (output_rnglists, output_line_info): Likewise.
3455         (output_pubnames, output_aranges): Update version comments.
3456         (output_one_line_info_table): Output view numbers in asm comments.
3457         (dw_loc_list): Determine current endview, pass it to new_loc_list.
3458         Call maybe_gen_llsym.
3459         (loc_list_from_tree_1): Adjust.
3460         (add_AT_location_description): Create view list attribute if
3461         needed, check it's absent otherwise.
3462         (convert_cfa_to_fb_loc_list): Adjust.
3463         (maybe_emit_file): Call output_asm_line_debug_info for test.
3464         (dwarf2out_var_location): Reset views as needed.  Precompute
3465         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
3466         attribute.  Set view.
3467         (new_line_info_table): Reset next view.
3468         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
3469         (dwarf2out_source_line): Likewise.  Output view resets and labels to
3470         the assembler, or select appropriate line info opcodes.
3471         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
3472         (optimize_string_length): Catch it.  Adjust.
3473         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
3474         dw_val_class_view_list, and remove it if no longer needed.
3475         (hash_loc_list): Hash view numbers.
3476         (loc_list_hasher::equal): Compare them.
3477         (optimize_location_lists): Check whether a view list symbol is
3478         needed, and whether the locview attribute is present, and
3479         whether they match.  Remove the locview attribute if no longer
3480         needed.
3481         (index_location_lists): Call skip_loc_list_entry for test.
3482         (dwarf2out_finish): Call output_asm_line_debug_info for test.
3483         Use output_dwarf_version.
3484         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
3485         (struct dw_val_node): Add val_view_list.
3486         * final.c (SEEN_NEXT_VIEW): New.
3487         (set_next_view_needed): New.
3488         (clear_next_view_needed): New.
3489         (maybe_output_next_view): New.
3490         (final_start_function): Rename to...
3491         (final_start_function_1): ... this.  Take pointer to FIRST,
3492         add SEEN parameter.  Emit param bindings in the initial view.
3493         (final_start_function): Reintroduce SEEN-less interface.
3494         (final): Rename to...
3495         (final_1): ... this.  Take SEEN parameter.  Output final pending
3496         next view at the end.
3497         (final): Reintroduce seen-less interface.
3498         (final_scan_insn): Output pending next view before switching
3499         sections or ending a block.  Mark the next view as needed when
3500         outputting variable locations.  Notify debug backend of section
3501         changes, and of location view changes.
3502         (rest_of_handle_final): Adjust.
3503         * toplev.c (process_options): Autodetect value for debug variable
3504         location views option.  Warn on incompat5 without -gdwarf-5.
3505         * doc/invoke.texi (gvariable-location-views): New.
3506         (gvariable-location-views=incompat5): New.
3507         (gno-variable-location-views): New.
3509 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
3511         PR tree-optimization/84136
3512         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
3513         that the result of find_edge is non-NULL.
3515 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
3517         PR target/83008
3518         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
3519         storing integer register in SImode.  Fix cost of 256 and 512
3520         byte aligned SSE register store.
3522 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
3524         * config/i386/i386.c (ix86_multiplication_cost): Fix
3525         multiplication cost for TARGET_AVX512DQ.
3527 2018-02-08  Marek Polacek  <polacek@redhat.com>
3529         PR tree-optimization/84238
3530         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
3531         get_range_strlen.
3533 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
3535         PR tree-optimization/84265
3536         * tree-vect-stmts.c (vectorizable_store): Don't treat
3537         VMAT_CONTIGUOUS accesses as grouped.
3538         (vectorizable_load): Likewise.
3540 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
3542         PR tree-optimization/81635
3543         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
3544         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
3545         (test_round_for_mask): New functions.
3546         (wide_int_cc_tests): Call test_round_for_mask.
3547         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
3548         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
3549         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
3550         range returned by get_range_info.
3552 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
3554         PR ipa/81360
3555         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
3556         * symtab.c: Include builtins.h
3557         (symtab_node::output_to_lto_symbol_table_p): Move here
3558         from lto-streamer-out.c:output_symbol_p.
3559         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
3560         (output_symbol_p): Move all logic to symtab.c
3561         (produce_symtab): Update.
3563 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3565         * config/s390/s390-opts.h (enum indirect_branch): Define.
3566         * config/s390/s390-protos.h (s390_return_addr_from_memory)
3567         (s390_indirect_branch_via_thunk)
3568         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
3569         (enum s390_indirect_branch_type): Define.
3570         * config/s390/s390.c (struct s390_frame_layout, struct
3571         machine_function): Remove.
3572         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
3573         (indirect_branch_table_label_no, indirect_branch_table_name):
3574         Define variables.
3575         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
3576         (enum s390_indirect_branch_option): Define.
3577         (s390_return_addr_from_memory): New function.
3578         (s390_handle_string_attribute): New function.
3579         (s390_attribute_table): Add new attribute handler.
3580         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
3581         (s390_indirect_branch_via_thunk): New function.
3582         (s390_indirect_branch_via_inline_thunk): New function.
3583         (s390_function_ok_for_sibcall): When jumping via thunk disallow
3584         sibling call optimization for non z10 compiles.
3585         (s390_emit_call): Force indirect branch target to be a single
3586         register.  Add r1 clobber for non-z10 compiles.
3587         (s390_emit_epilogue): Emit return jump via return_use expander.
3588         (s390_reorg): Handle JUMP_INSNs as execute targets.
3589         (s390_option_override_internal): Perform validity checks for the
3590         new command line options.
3591         (s390_indirect_branch_attrvalue): New function.
3592         (s390_indirect_branch_settings): New function.
3593         (s390_set_current_function): Invoke s390_indirect_branch_settings.
3594         (s390_output_indirect_thunk_function):  New function.
3595         (s390_code_end): Implement target hook.
3596         (s390_case_values_threshold): Implement target hook.
3597         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
3598         macros.
3599         * config/s390/s390.h (struct s390_frame_layout)
3600         (struct machine_function): Move here from s390.c.
3601         (TARGET_INDIRECT_BRANCH_NOBP_RET)
3602         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
3603         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
3604         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
3605         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
3606         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
3607         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
3608         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
3609         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
3610         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
3611         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
3612         (mnemonic attribute): Add values which aren't recognized
3613         automatically.
3614         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
3615         pattern for branch conversion.  Fix mnemonic attribute.
3616         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
3617         indirect branch via thunk if requested.
3618         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
3619         ("*indirect_jump"): Disable for branch conversion using out of
3620         line thunks.
3621         ("indirect_jump_via_thunk<mode>_z10")
3622         ("indirect_jump_via_thunk<mode>")
3623         ("indirect_jump_via_inlinethunk<mode>_z10")
3624         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
3625         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
3626         ("casesi_jump_via_inlinethunk<mode>_z10")
3627         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
3628         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
3629         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
3630         ("*indirect2_jump"): Disable for branch conversion.
3631         ("casesi_jump"): Turn into expander and expand patterns for branch
3632         conversion.
3633         ("return_use"): New expander.
3634         ("*return"): Emit return via thunk and rename it to ...
3635         ("*return<mode>"): ... this one.
3636         * config/s390/s390.opt: Add new options and and enum for the
3637         option values.
3639 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
3641         * lra-constraints.c (match_reload): Unconditionally use
3642         gen_lowpart_SUBREG, rather than selecting between that
3643         and equivalent gen_rtx_SUBREG code.
3645 2018-02-08  Richard Biener  <rguenther@suse.de>
3647         PR tree-optimization/84233
3648         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
3649         changed flag instead of boguously re-using phi_inserted.
3651 2018-02-08  Martin Jambor  <mjambor@suse.cz>
3653         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
3654         static local variables.
3656 2018-02-08  Richard Biener  <rguenther@suse.de>
3658         PR tree-optimization/84278
3659         * tree-vect-stmts.c (vectorizable_store): When looking for
3660         smaller vector types to perform grouped strided loads/stores
3661         make sure the mode is supported by the target.
3662         (vectorizable_load): Likewise.
3664 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
3666         * config/aarch64/aarch64.c (aarch64_components_for_bb):
3667         Increase LDP/STP opportunities by adding adjacent callee-saves.
3669 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
3671         PR rtl-optimization/84068
3672         PR rtl-optimization/83459
3673         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
3675 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
3677         PR tree-optimization/84224
3678         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
3679         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
3680         non-zero arguments.
3682 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
3684         PR target/84113
3685         * config/rs6000/altivec.md (*restore_world): Remove LR use.
3686         * config/rs6000/predicates.md (restore_world_operation): Adjust op
3687         count, remove one USE.
3689 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
3691         * doc/install.texi (Configuration): Document the
3692         --with-long-double-format={ibm,ieee} PowerPC configuration
3693         options.
3695         PR target/84154
3696         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
3697         Convert from define_expand to be define_insn_and_split.  Rework
3698         float/double/_Float128 conversions to QI/HI/SImode to work with
3699         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
3700         conversions to QI/HImode types did a store and then a load to
3701         truncate the value.  For conversions to VSX registers, don't split
3702         the insn, instead emit the code directly.  Use the code iterator
3703         any_fix to combine signed and unsigned conversions.
3704         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
3705         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
3706         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
3707         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
3708         (fix_<mode>di2_hw): Likewise.
3709         (fixuns_<mode>di2_hw): Likewise.
3710         (fix_<mode>si2_hw): Likewise.
3711         (fixuns_<mode>si2_hw): Likewise.
3712         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
3713         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
3714         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
3715         fix<uns>_trunc<SFDF:mode>si2_p8.
3716         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
3717         used.
3718         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
3719         (fix<uns>_<mode>_mem): Likewise.
3720         (fctiw<u>z_<mode>_mem): Likewise.
3721         (fix<uns>_<mode>_mem): Likewise.
3722         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
3723         the register allocator from doing a direct move to the GPRs to do
3724         a store, and instead use the ISA 3.0 store byte/half-word from
3725         vector register instruction.  For IEEE 128-bit floating point,
3726         also optimize stores of 32-bit ints.
3727         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
3729 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
3731         * genextract.c (push_pathstr_operand): New function to support
3732         [a-zA-Z].
3733         (walk_rtx): Call push_pathstr_operand.
3734         (print_path): Support [a-zA-Z].
3736 2018-02-07  Richard Biener  <rguenther@suse.de>
3738         PR tree-optimization/84037
3739         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
3740         (cse_and_gimplify_to_preheader): Declare.
3741         (vect_get_place_in_interleaving_chain): Likewise.
3742         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
3743         ivexpr_map.
3744         (_loop_vec_info::~_loop_vec_info): Delete it.
3745         (cse_and_gimplify_to_preheader): New function.
3746         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
3747         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
3748         (vectorizable_load): Likewise.  For grouped stores always base
3749         the IV on the first element.
3750         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
3751         condition before gimplifying.
3753 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
3755         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
3756         *DIV_EXPR and *MOD_EXPR.
3758 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
3760         PR target/84248
3761         * config/i386/i386.c (ix86_option_override_internal): Mask out
3762         the CF_SET bit when checking -fcf-protection.
3764 2018-02-07  Tom de Vries  <tom@codesourcery.com>
3766         PR libgomp/84217
3767         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
3768         enough.
3770 2018-02-07  Richard Biener  <rguenther@suse.de>
3772         PR tree-optimization/84204
3773         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3774         this place.
3776         PR tree-optimization/84205
3777         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
3778         special-case isl_ast_op_zdiv_r.
3780         PR tree-optimization/84223
3781         * graphite-scop-detection.c (gather_bbs::before_dom_children):
3782         Only add conditions from within the region.
3783         (gather_bbs::after_dom_children): Adjust.
3785 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
3787         PR target/84209
3788         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
3789         * config/avr/avr.md: Only post-reload split REG-REG moves if
3790         either register is GENERAL_REG_P.
3792 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
3794         PR tree-optimization/84235
3795         * tree-ssa-scopedtables.c
3796         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
3797         if the subtraction is performed in floating point type where NaNs are
3798         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
3799         build 1.  Formatting fix.
3801 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
3803         PR target/84146
3804         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
3805         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
3806         and skip it regardless of bb boundaries.  Use CALL_P macro,
3807         don't test INSN_P (insn) together with CALL_P or JUMP_P check
3808         unnecessarily, formatting fix.
3810 2018-02-06  Michael Collison  <michael.collison@arm.com>
3812         * config/arm/thumb2.md:
3813         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
3814         (*thumb_mov_notscc): Ditto.
3816 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
3818         PR target/84154
3819         * config/rs6000/rs6000.md (su code attribute): Use "u" for
3820         unsigned_fix, not "s".
3822 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3824         * configure.ac (gcc_fn_eh_frame_ro): New function.
3825         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
3826         correct .eh_frame permissions.
3827         * configure: Regenerate.
3829 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
3831         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
3832         irrelevant options.
3834 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3836         * config/rs6000/rs6000.c (rs6000_option_override_internal):
3837         Display warning message for -mno-speculate-indirect-jumps.
3839 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
3841         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
3842         Undocumented.
3843         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
3845 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
3847         PR tree-optimization/84225
3848         * tree-eh.c (find_trapping_overflow): Only call
3849         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
3851 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
3853         PR target/84145
3854         * config/i386/i386.c: Reimplement the check of possible options
3855         -mibt/-mshstk conbination. Change error messages.
3856         * doc/invoke.texi: Fix a typo: remove extra '='.
3858 2018-02-06  Marek Polacek  <polacek@redhat.com>
3860         PR tree-optimization/84228
3861         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
3863 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
3865         PR target/82641
3866         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
3867         emitted arch directives.
3868         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
3869         __ARM_FEATURE_COPROC before changing architectures.
3871 2018-02-06  Richard Biener  <rguenther@suse.de>
3873         * config/i386/i386.c (print_reg): Fix typo.
3874         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
3876 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
3878         * configure: Regenerate.
3880 2018-02-05  Martin Sebor  <msebor@redhat.com>
3882         PR tree-optimization/83369
3883         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
3884         inlining context.
3886 2018-02-05  Martin Liska  <mliska@suse.cz>
3888         * doc/invoke.texi: Cherry-pick upstream r323995.
3890 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
3892         * ira.c (ira_init_register_move_cost): Adjust comment.
3894 2018-02-05  Martin Liska  <mliska@suse.cz>
3896         PR gcov-profile/84137
3897         * doc/gcov.texi: Fix typo in documentation.
3899 2018-02-05  Martin Liska  <mliska@suse.cz>
3901         PR gcov-profile/83879
3902         * doc/gcov.texi: Document necessity of --dynamic-list-data when
3903         using dlopen functionality.
3905 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
3907         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
3908         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
3909         _mm_maskz_range_ss, _mm_mask_range_round_ss,
3910         _mm_maskz_range_round_ss): New intrinsics.
3911         (__builtin_ia32_rangesd128_round)
3912         (__builtin_ia32_rangess128_round): Remove.
3913         (__builtin_ia32_rangesd128_mask_round,
3914         __builtin_ia32_rangess128_mask_round): New builtins.
3915         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
3916         __builtin_ia32_rangess128_round): Remove.
3917         (__builtin_ia32_rangesd128_mask_round,
3918         __builtin_ia32_rangess128_mask_round): New builtins.
3919         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
3920         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
3921         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
3922         "<round_saeonly_constraint>")): Changed to ...
3923         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
3924         "<round_saeonly_scalar_constraint>")): ... this.
3925         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
3926         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
3927         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
3928         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
3929         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
3931 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
3933         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
3934         options.
3935         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
3936         Remove all values except native, 8540 and 8548.
3938 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
3940         * config/i386/i386.c (ix86_output_function_return): Pass
3941         INVALID_REGNUM, instead of -1, as invalid register number to
3942         indirect_thunk_name and output_indirect_thunk.
3944 2018-02-02  Julia Koval  <julia.koval@intel.com>
3946         * config.gcc: Add -march=icelake.
3947         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
3948         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
3949         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
3950         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
3951         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
3952         (processor_target_table): Add icelake.
3953         (ix86_option_override_internal): Handle new PTAs.
3954         (get_builtin_code_for_version): Handle icelake.
3955         (M_INTEL_COREI7_ICELAKE): New.
3956         (fold_builtin_cpu): Handle icelake.
3957         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
3958         * doc/invoke.texi: Add -march=icelake.
3960 2018-02-02  Julia Koval  <julia.koval@intel.com>
3962         * config/i386/i386.c (ix86_option_override_internal): Change flags type
3963         to wide_int_bitmask.
3964         * wide-int-bitmask.h: New.
3966 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
3968         PR target/84066
3969         * config/i386/i386.md: Replace Pmode with word_mode in
3970         builtin_setjmp_setup and builtin_longjmp to support x32.
3972 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
3974         PR target/56010
3975         PR target/83743
3976         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
3977         #include "opts.h".
3978         (rs6000_supported_cpu_names): New static variable.
3979         (linux_cpu_translation_table): Likewise.
3980         (elf_platform) <cpu>: Define new static variable and use it.
3981         Translate kernel AT_PLATFORM name to canonical name if needed.
3982         Error if platform name is unknown.
3984 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
3986         PR target/84089
3987         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
3989 2018-02-01  Jeff Law  <law@redhat.com>
3991         PR target/84128
3992         * config/i386/i386.c (release_scratch_register_on_entry): Add new
3993         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
3994         the scratch if RELEASE_VIA_POP is false.
3995         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
3996         If we have to save a temporary register, decrement SIZE appropriately.
3997         Pass new arguments to release_scratch_register_on_entry.
3998         (ix86_adjust_stack_and_probe): Likewise.
3999         (ix86_emit_probe_stack_range): Pass new arguments to
4000         release_scratch_register_on_entry.
4002 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
4004         PR rtl-optimization/84157
4005         * combine.c (change_zero_ext): Use REG_P predicate in
4006         front of HARD_REGISTER_P predicate.
4008 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
4010         * config/avr/avr.c (avr_option_override): Move disabling of
4011         -fdelete-null-pointer-checks to...
4012         * common/config/avr/avr-common.c (avr_option_optimization_table):
4013         ...here.
4015 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
4017         PR tree-optimization/81635
4018         * tree-data-ref.c (split_constant_offset_1): For types that
4019         wrap on overflow, try to use range info to prove that wrapping
4020         cannot occur.
4022 2018-02-01  Renlin Li  <renlin.li@arm.com>
4024         PR target/83370
4025         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
4026         TAILCALL_ADDR_REGS.
4027         (aarch64_register_move_cost): Likewise.
4028         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
4029         TAILCALL_ADDR_REGS.
4030         (REG_CLASS_NAMES): Likewise.
4031         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
4032         TAILCALL_ADDR_REGS. Remove IP registers.
4033         * config/aarch64/aarch64.md (Ucs): Update register constraint.
4035 2018-02-01  Richard Biener  <rguenther@suse.de>
4037         * domwalk.h (dom_walker::dom_walker): Add additional constructor
4038         for specifying RPO order and allow NULL for that.
4039         * domwalk.c (dom_walker::dom_walker): Likewise.
4040         (dom_walker::walk): Handle NULL RPO order.
4041         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
4042         in RPO order.
4043         (rewrite_update_dom_walker): Likewise.
4044         (mark_def_dom_walker): Likewise.
4046 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
4048         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
4049         (aarch64_maybe_expand_sve_subreg_move): Declare.
4050         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
4051         * config/aarch64/predicates.md (aarch64_any_register_operand): New
4052         predicate.
4053         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
4054         that are semantically a reverse operation.
4055         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
4056         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
4057         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
4058         functions.
4059         (aarch64_can_change_mode_class): For big-endian, forbid changes
4060         between two SVE modes if they have different element sizes.
4062 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
4064         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
4065         the TImode handling for big-endian targets.
4067 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
4069         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
4070         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
4071         not just bytes.
4072         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
4073         Remove BSWAP handing for big-endian targets and use the form of
4074         LD1RQ appropariate for the mode.
4076 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
4078         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
4079         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
4080         duplicated element.
4082 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
4084         PR tearget/83845
4085         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
4086         check for operands that need to go through aarch64_sve_reload_be.
4088 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
4090         PR tree-optimization/81661
4091         PR tree-optimization/84117
4092         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
4093         * tree-eh.c: Include gimplify.h.
4094         (find_trapping_overflow, replace_trapping_overflow,
4095         rewrite_to_non_trapping_overflow): New functions.
4096         * tree-vect-loop.c: Include tree-eh.h.
4097         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
4098         * tree-data-ref.c: Include tree-eh.h.
4099         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
4101 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
4103         PR rtl-optimization/84123
4104         * combine.c (change_zero_ext): Check if hard register satisfies
4105         can_change_dest_mode before calling gen_lowpart_SUBREG.
4107 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
4109         PR target/82444
4110         * ira.c (ira_init_register_move_cost): Remove assert.
4112 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
4114         PR rtl-optimization/84071
4115         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
4116         * doc/tm.texi: Regenerate.
4118 2018-01-31  Richard Biener  <rguenther@suse.de>
4120         PR tree-optimization/84132
4121         * tree-data-ref.c (analyze_miv_subscript): Properly
4122         check whether evolution_function_is_affine_multivariate_p
4123         before calling gcd_of_steps_may_divide_p.
4125 2018-01-31  Julia Koval  <julia.koval@intel.com>
4127         PR target/83618
4128         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
4129         * config/i386/i386.md (rdpid_rex64) New.
4130         (rdpid): Make 32bit only.
4132 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
4134         PR lto/84105
4135         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
4136         an IDENTIFIER_NODE for FUNCTION_TYPE's.
4138 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
4140         Revert
4141         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
4143         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
4145 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
4147         PR rtl-optimization/84071
4148         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
4149         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
4151 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
4153         * config/arc/arc.c (arc_handle_aux_attribute): New function.
4154         (arc_attribute_table): Add 'aux' attribute.
4155         (arc_in_small_data_p): Consider aux like variables.
4156         (arc_is_aux_reg_p): New function.
4157         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
4158         (arc_get_aux_arg): New function.
4159         (prepare_move_operands): Handle aux-register access.
4160         (arc_handle_aux_attribute): New function.
4161         * doc/extend.texi (ARC Variable attributes): Add subsection.
4163 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
4165         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
4166         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
4167         (arc_attribute_table): Add 'uncached' attribute.
4168         (arc_print_operand): Print '.di' flag for uncached memory
4169         accesses.
4170         (arc_in_small_data_p): Do not consider for small data the uncached
4171         types.
4172         (arc_is_uncached_mem_p): New function.
4173         * config/arc/predicates.md (compact_store_memory_operand): Check
4174         for uncached memory accesses.
4175         (nonvol_nonimm_operand): Likewise.
4176         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
4178 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
4180         PR c/84100
4181         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
4182         falign-loops=): Add Optimization flag.
4184 2018-01-30  Jeff Law  <law@redhat.com>
4186         PR target/84064
4187         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
4188         INT_REGISTERS_SAVED.  Check it prior to calling
4189         get_scratch_register_on_entry.
4190         (ix86_adjust_stack_and_probe): Similarly.
4191         (ix86_emit_probe_stack_range): Similarly.
4192         (ix86_expand_prologue): Corresponding changes.
4194 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4196         PR target/40411
4197         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
4198         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
4200 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
4202         PR target/84112
4203         * lra-constraints.c (curr_insn_transform): Process AND in the
4204         address.
4206 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
4208         PR rtl-optimization/83986
4209         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
4210         dependence against last_pending_memory_flush in addition to
4211         pending_jump_insns.
4213 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
4215         PR tree-optimization/81611
4216         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
4217         copies.
4219 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
4221         PR target/83758
4222         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
4223         a reg rtx.
4225 2018-01-30  Richard Biener  <rguenther@suse.de>
4226             Jakub Jelinek  <jakub@redhat.com>
4228         PR tree-optimization/84111
4229         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
4230         inner loops added during recursion, as they don't have up-to-date
4231         SSA form.
4233 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
4235         PR ipa/81360
4236         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
4237         (can_inline_edge_by_limits_p): ... here.
4238         (can_early_inline_edge_p, check_callers,
4239         update_caller_keys, update_callee_keys, recursive_inlining,
4240         add_new_edges_to_heap, speculation_useful_p,
4241         inline_small_functions,
4242         inline_small_functions, flatten_function,
4243         inline_to_all_callers_1): Update.
4245 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
4247         * profile-count.c (profile_count::combine_with_ipa_count): Handle
4248         zeros correctly.
4250 2018-01-30  Richard Biener  <rguenther@suse.de>
4252         PR tree-optimization/83008
4253         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
4254         invariant and constant vector uses in stmts when they need
4255         more than one stmt.
4257 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4259         PR bootstrap/84017
4260         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
4261         * configure: Regenerate.
4263 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
4265         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
4266         pattern.
4267         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
4268         Use gen_rtx_REG rather than gen_lowpart.
4270 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
4272         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
4273         rather than 0 when creating partial subregs.
4275 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
4277         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
4278         of usage.
4280 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
4282         PR target/81550
4283         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
4284         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
4285         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
4286         flags.  This restores the settings used before the 2017-07-24.
4287         Turning off pre increment/decrement/modify allows IVOPTS to
4288         optimize DF/SF loops where the index is an int.
4290 2018-01-29  Richard Biener  <rguenther@suse.de>
4291             Kelvin Nilsen  <kelvin@gcc.gnu.org>
4293         PR bootstrap/80867
4294         * tree-vect-stmts.c (vectorizable_call): Don't call
4295         targetm.vectorize_builtin_md_vectorized_function if callee is
4296         NULL.
4298 2018-01-22  Carl Love  <cel@us.ibm.com>
4300         * doc/extend.tex: Fix typo in second arg in
4301         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
4303 2018-01-29  Richard Biener  <rguenther@suse.de>
4305         PR tree-optimization/84086
4306         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
4307         (flush_ssaname_freelist): When SSA names were released reset
4308         the SCEV hash table.
4310 2018-01-29  Richard Biener  <rguenther@suse.de>
4312         PR tree-optimization/84057
4313         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
4314         removed paths when removing edges.
4316 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
4318         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
4319         -mfunction-return=@var{choice}.
4321 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4323         PR diagnostic/84034
4324         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
4325         Handle CR like TAB.
4326         (layout::print_source_line): Likewise.
4327         (test_get_line_width_without_trailing_whitespace): Add test cases.
4329 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
4331         PR middle-end/84040
4332         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
4333         debug insns.
4335 2018-01-26  Jim Wilson  <jimw@sifive.com>
4337         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
4339         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
4340         specified.
4342 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4344         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
4345         and CMP + SUB-immediate -> SUBS.
4347 2018-01-26  Martin Sebor  <msebor@redhat.com>
4349         PR tree-optimization/83896
4350         * tree-ssa-strlen.c (get_string_len): Rename...
4351         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
4352         Avoid assuming length is constant.
4353         (handle_char_store): Use HOST_WIDE_INT for string length.
4355 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
4357         PR target/81763
4358         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
4359         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
4361 2018-01-26  Richard Biener  <rguenther@suse.de>
4363         PR rtl-optimization/84003
4364         * dse.c (record_store): Only record redundant stores when
4365         the earlier store aliases at least all accesses the later one does.
4367 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
4369         PR rtl-optimization/83985
4370         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
4371         REG_CFA_RESTORE insns.
4372         (delete_unmarked_insns): Don't ignore separate shrink wrapping
4373         REG_CFA_RESTORE insns here.
4375         PR c/83989
4376         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
4377         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
4379 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
4381         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
4382         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
4383         (arc_init): Likewise.
4384         (arc_override_options): Likewise.
4385         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
4386         value.
4387         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
4388         support.
4389         * config/arc/arc.h (TARGET_DBNZ): Define.
4390         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
4391         properly set the tune attribute.
4392         (dbnz): Use TARGET_DBNZ guard.
4393         * config/arc/arc.opt (mtune): Add core3 option.
4395 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
4397         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
4398         recognize new pic like addresses.
4399         (arc_delegitimize_address): Clean up.
4401 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
4403         * config/arc/arc-arches.def: Option mrf16 valid for all
4404         architectures.
4405         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
4406         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
4407         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
4408         * config/arc/arc-tables.opt: Regenerate.
4409         * config/arc/arc.c (arc_conditional_register_usage): Handle
4410         reduced register file case.
4411         (arc_file_start): Set must have build attributes.
4412         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
4413         mrf16 option value.
4414         * config/arc/arc.opt (mrf16): Add new option.
4415         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
4416         * config/arc/genmultilib.awk: Handle new mrf16 option.
4417         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
4418         * config/arc/t-multilib: Regenerate.
4419         * doc/invoke.texi (ARC Options): Document mrf16 option.
4421 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
4423         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
4424         * config/arc/arc.c (arc_handle_secure_attribute): New function.
4425         (arc_attribute_table): Add 'secure_call' attribute.
4426         (arc_print_operand): Print secure call operand.
4427         (arc_function_ok_for_sibcall): Don't optimize tail calls when
4428         secure.
4429         (arc_is_secure_call_p): New function.  * config/arc/arc.md
4430         (call_i): Add support for sjli instruction.
4431         (call_value_i): Likewise.
4432         * config/arc/constraints.md (Csc): New constraint.
4434 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
4435             John Eric Martin  <John.Martin@emmicro-us.com>
4437         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
4438         * config/arc/arc.c (_arc_jli_section): New struct.
4439         (arc_jli_section): New type.
4440         (rc_jli_sections): New static variable.
4441         (arc_handle_jli_attribute): New function.
4442         (arc_attribute_table): Add jli_always and jli_fixed attribute.
4443         (arc_file_end): New function.
4444         (TARGET_ASM_FILE_END): Define.
4445         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
4446         (arc_add_jli_section): New function.
4447         (jli_call_scan): Likewise.
4448         (arc_reorg): Call jli_call_scan.
4449         (arc_output_addsi): Remove 'S' from printing asm operand.
4450         (arc_is_jli_call_p): New function.
4451         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
4452         operand.
4453         (movhi_insn): Likewise.
4454         (movsi_insn): Likewise.
4455         (movsi_set_cc_insn): Likewise.
4456         (loadqi_update): Likewise.
4457         (load_zeroextendqisi_update): Likewise.
4458         (load_signextendqisi_update): Likewise.
4459         (loadhi_update): Likewise.
4460         (load_zeroextendhisi_update): Likewise.
4461         (load_signextendhisi_update): Likewise.
4462         (loadsi_update): Likewise.
4463         (loadsf_update): Likewise.
4464         (movsicc_insn): Likewise.
4465         (bset_insn): Likewise.
4466         (bxor_insn): Likewise.
4467         (bclr_insn): Likewise.
4468         (bmsk_insn): Likewise.
4469         (bicsi3_insn): Likewise.
4470         (cmpsi_cc_c_insn): Likewise.
4471         (movsi_ne): Likewise.
4472         (movsi_cond_exec): Likewise.
4473         (clrsbsi2): Likewise.
4474         (norm_f): Likewise.
4475         (normw): Likewise.
4476         (swap): Likewise.
4477         (divaw): Likewise.
4478         (flag): Likewise.
4479         (sr): Likewise.
4480         (kflag): Likewise.
4481         (ffs): Likewise.
4482         (ffs_f): Likewise.
4483         (fls): Likewise.
4484         (call_i): Remove 'S' asm letter, add jli instruction.
4485         (call_value_i): Likewise.
4486         * config/arc/arc.op (mjli-always): New option.
4487         * config/arc/constraints.md (Cji): New constraint.
4488         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
4489         operand.
4490         (subsf3_fpx): Likewise.
4491         (mulsf3_fpx): Likewise.
4492         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
4493         asm operand.
4494         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
4495         function attrbutes.
4496         * doc/invoke.texi (ARC): Document mjli-always option.
4498 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
4500         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
4501         avoid addition with 0 and use incw and decw where possible.
4503 2018-01-26  Richard Biener  <rguenther@suse.de>
4505         PR tree-optimization/81082
4506         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
4507         association if it requires casting to unsigned.
4508         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
4509         from fold_plusminus_mult_expr to catch important cases late when
4510         range info is available.
4512 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4514         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
4515         * configure.ac (hidden_linkonce): New test.
4516         * configure: Regenerate.
4517         * config.in: Regenerate.
4519 2018-01-26  Julia Koval  <julia.koval@intel.com>
4521         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
4522         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
4523         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
4524         _mm_mask_bitshuffle_epi64_mask): Fix type.
4525         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
4526         USI_FTYPE_V4DI_V4DI_USI): Remove.
4527         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
4528         __builtin_ia32_vpshufbitqmb256_mask,
4529         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
4530         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
4531         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
4533 2018-01-26  Alan Modra  <amodra@gmail.com>
4535         PR target/84033
4536         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
4537         UNSPEC_VBPERMQ.  Sort other unspecs.
4539 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
4541         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
4543 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
4545         PR middle-end/83055
4546         * predict.c (drop_profile): Do not push/pop cfun; update also
4547         node->count.
4548         (handle_missing_profiles): Fix logic looking for zero profiles.
4550 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
4552         PR middle-end/83977
4553         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
4554         on functions with #pragma omp declare simd or functions with simd
4555         attribute.
4556         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
4557         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
4558         Remove trailing \n from warning_at calls.
4560 2018-01-25  Tom de Vries  <tom@codesourcery.com>
4562         PR target/84028
4563         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
4564         for neutered workers.
4566 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
4568         PR target/68467
4569         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
4570         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
4572 2018-01-24  Jeff Law  <law@redhat.com>
4574         PR target/83994
4575         * i386.c (get_probe_interval): Move to earlier point.
4576         (ix86_compute_frame_layout): If -fstack-clash-protection and
4577         the frame is larger than the probe interval, then use pushes
4578         to save registers rather than reg->mem moves.
4579         (ix86_expand_prologue): Remove conditional for int_registers_saved
4580         assertion.
4582 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
4584         PR target/84014
4585         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
4586         min/max for never referenced object.
4588 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
4590         PR middle-end/83977
4591         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
4592         here.
4593         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
4594         attributes from DECL_ATTRIBUTES (decl) without affecting
4595         DECL_ATTRIBUTES (current_function_decl).
4596         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
4597         functions with non-NULL DECL_ABSTRACT_ORIGIN.
4599 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
4601         PR tree-optimization/83979
4602         * fold-const.c (fold_comparison): Use constant_boolean_node
4603         instead of boolean_{true,false}_node.
4605 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
4607         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
4608         with zero counts.
4610 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4612         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
4613         Simplify the clause that sets the length attribute.
4614         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
4615         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
4616         clause that sets the length attribute.
4617         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
4619 2018-01-24  Tom de Vries  <tom@codesourcery.com>
4621         PR target/83589
4622         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
4623         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
4624         Add strict parameter.
4625         (prevent_branch_around_nothing): Insert dummy insn between branch to
4626         label and label with no ptx insn inbetween.
4627         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
4629 2018-01-24  Tom de Vries  <tom@codesourcery.com>
4631         PR target/81352
4632         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
4633         for neutered threads in warp.
4634         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
4636 2018-01-24  Richard Biener  <rguenther@suse.de>
4638         PR tree-optimization/83176
4639         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
4640         operands.
4642 2018-01-24  Richard Biener  <rguenther@suse.de>
4644         PR tree-optimization/82819
4645         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
4646         code generating pluses that are no-ops in the target precision.
4648 2018-01-24  Richard Biener  <rguenther@suse.de>
4650         PR middle-end/84000
4651         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
4653 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
4655         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
4656         to merge probabilities.
4657         * predict.c (probably_never_executed): Also mark as cold functions
4658         with global 0 profile and guessed local profile.
4659         * profile-count.c (profile_probability::combine_with_count): New
4660         member function.
4661         * profile-count.h (profile_probability::operator*,
4662         profile_probability::operator*=, profile_probability::operator/,
4663         profile_probability::operator/=): Reduce precision to adjusted
4664         and set value to guessed on contradictory divisions.
4665         (profile_probability::combine_with_freq): Remove.
4666         (profile_probability::combine_wiht_count): Declare.
4667         (profile_count::force_nonzero):: Set to adjusted.
4668         (profile_count::probability_in):: Set quality to adjusted.
4669         * tree-ssa-tail-merge.c (replace_block_by): Use
4670         combine_with_count.
4672 2018-01-23  Andrew Waterman  <andrew@sifive.com>
4673             Jim Wilson  <jimw@sifive.com>
4675         * config/riscv/riscv.c (riscv_stack_boundary): New.
4676         (riscv_option_override): Set riscv_stack_boundary.  Handle
4677         riscv_preferred_stack_boundary_arg.
4678         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
4679         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
4680         (STACK_BOUNDARY): Set to riscv_stack_boundary.
4681         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
4682         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
4683         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
4685 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
4687         PR target/83905
4688         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
4689         of struct ix86_frame.
4690         (ix86_expand_epilogue): Likewise.  Add a local variable for
4691         the reg_save_offset field in struct ix86_frame.
4693 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
4695         PR tree-optimization/82604
4696         * tree-loop-distribution.c (enum partition_kind): New enum item
4697         PKIND_PARTIAL_MEMSET.
4698         (partition_builtin_p): Support above new enum item.
4699         (generate_code_for_partition): Ditto.
4700         (compute_access_range): Differentiate cases that equality can be
4701         proven at all loops, the innermost loops or no loops.
4702         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
4703         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
4704         (finalize_partitions, distribute_loop): Don't fuse partition of
4705         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
4706         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
4707         parloop is enabled.
4709 2018-01-23  Martin Liska  <mliska@suse.cz>
4711         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
4712         order to ignore the predictor.
4713         (PRED_POLYMORPHIC_CALL): Likewise.
4714         (PRED_RECURSIVE_CALL): Likewise.
4716 2018-01-23  Martin Liska  <mliska@suse.cz>
4718         * tree-profile.c (tree_profiling): Print function header to
4719         aware reader which function we are working on.
4720         * value-prof.c (gimple_find_values_to_profile): Do not print
4721         not interesting value histograms.
4723 2018-01-23  Martin Liska  <mliska@suse.cz>
4725         * profile-count.h (enum profile_quality): Add
4726         profile_uninitialized as the first value. Do not number values
4727         as they are zero based.
4728         (profile_count::verify): Update sanity check.
4729         (profile_probability::verify): Likewise.
4731 2018-01-23  Nathan Sidwell  <nathan@acm.org>
4733         * doc/invoke.texi (ffor-scope): Deprecate.
4735 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
4737         PR tree-optimization/83510
4738         * domwalk.c (set_all_edges_as_executable): New function.
4739         (dom_walker::dom_walker): Convert bool param
4740         "skip_unreachable_blocks" to enum reachability.  Move setup of
4741         edge flags to set_all_edges_as_executable and only do it when
4742         reachability is REACHABLE_BLOCKS.
4743         * domwalk.h (enum dom_walker::reachability): New enum.
4744         (dom_walker::dom_walker): Convert bool param
4745         "skip_unreachable_blocks" to enum reachability.
4746         (set_all_edges_as_executable): New decl.
4747         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
4748         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
4749         "reachability".
4750         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
4751         but converting true to REACHABLE_BLOCKS.
4752         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
4753         * tree-vrp.c
4754         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
4755         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
4756         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
4757         REACHABLE_BLOCKS.
4758         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
4759         if check_all_array_refs will be called.
4761 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
4763         * tree.c (selftest::test_location_wrappers): Add more test
4764         coverage.
4766 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
4768         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
4769         (selftest::test_bit_in_range): Likewise.
4771 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
4773         PR testsuite/83888
4774         * doc/sourcebuild.texi (vect_float): Say that the selector
4775         only describes the situation when -funsafe-math-optimizations is on.
4776         (vect_float_strict): Document.
4778 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
4780         PR tree-optimization/83965
4781         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4782         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
4783         instead of checking only for a reduction.
4784         (vect_recog_widen_sum_pattern): Likewise.
4786 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
4788         * predict.c (probably_never_executed): Only use precise profile info.
4789         (compute_function_frequency): Skip after inlining hack since we now
4790         have quality checking.
4792 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
4794         * profile-count.h (profile_probability::very_unlikely,
4795         profile_probability::unlikely, profile_probability::even): Set
4796         precision to guessed.
4798 2018-01-23  Richard Biener  <rguenther@suse.de>
4800         PR tree-optimization/83963
4801         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
4802         Properly terminate dominator walk when crossing the exit edge not
4803         when visiting its source block.
4805 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
4807         PR c++/83918
4808         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
4809         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
4811 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
4813         PR tree-optimization/83957
4814         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
4815         semicolon after for body surrounded by braces.
4817         PR tree-optimization/83081
4818         * profile-count.h (profile_probability::split): New method.
4819         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
4820         Use profile_probability::split.
4821         (do_compare_rtx_and_jump): Fix adjustment of probabilities
4822         when splitting a single conditional jump into 2.
4824 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
4826         PR tree-optimization/69452
4827         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
4828         decl.
4830 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
4832         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
4833         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
4834         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
4836 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
4838         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
4839         * config/rl78/rl78.md (movdi): New define_expand.
4840         * config/rl78/rl78.c (rl78_split_movdi): New function.
4842 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
4844         PR target/83862
4845         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
4846         no longer used.
4847         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
4848         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
4849         128-bit to produce an UNSPEC move to get the double word with the
4850         signbit and then a shift directly to do signbit.
4851         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
4852         implementation with a new version that just does either a direct
4853         move or a regular move.  Move memory interface to separate insns.
4854         Move insns so they are next to the expander.
4855         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
4856         with signbit move.  Split big and little endian case.
4857         (signbit<mode>2_dm_mem_le): Likewise.
4858         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
4859         (signbit<mode>2_dm2): Likewise.
4861 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
4863         * config/rl78/rl78.md (anddi3): New define_expand.
4865 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
4867         * config/rl78/rl78.md (umindi3): New define_expand.
4869 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
4871         * config/rl78/rl78.md (smindi3): New define_expand.
4873 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
4875         * config/rl78/rl78.md (smaxdi3): New define_expand.
4877 2018-01-22  Carl Love  <cel@us.ibm.com>
4879         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
4880         LVX_V1TI): Add macro expansion.
4881         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
4882         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
4883         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
4884         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
4885         Change check to determine if the instruction is a byte reversing
4886         entry.  Fix typo in comment.
4887         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
4888         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
4889         Add def_builtin calls for new builtins.
4890         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
4891         Add define_insn expansion.
4893 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
4895         * config/rl78/rl78.md (umaxdi3): New define_expand.
4897 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
4899         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
4900         for non-QImode registers.
4902 2018-01-22  Richard Biener  <rguenther@suse.de>
4904         PR tree-optimization/83963
4905         * graphite-scop-detection.c (scop_detection::get_sese): Delay
4906         including the loop exit block.
4907         (scop_detection::merge_sese): Likewise.
4908         (scop_detection::add_scop): Do it here instead.
4910 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4912         * doc/sourcebuild.texi (arm_softfloat): Document.
4914 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
4916         PR gcc/77734
4917         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
4918         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
4919         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
4921 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4922             David Edelsohn  <dje.gcc@gmail.com>
4924         PR target/83946
4925         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
4926         Change "crset eq" to "crset 2".
4927         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
4928         (*call_indirect_aix<mode>_nospec): Likewise.
4929         (*call_value_indirect_aix<mode>_nospec): Likewise.
4930         (*call_indirect_elfv2<mode>_nospec): Likewise.
4931         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
4932         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
4933         change assembly output from . to $.
4934         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
4935         (indirect_jump<mode>_nospec): Change assembly output from . to $.
4936         (*tablejump<mode>_internal1_nospec): Likewise.
4938 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
4940         PR target/80870
4941         * config/sh/sh_optimize_sett_clrt.cc:
4942         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
4944 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
4946         PR tree-optimization/83940
4947         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
4948         offset_dt to vect_constant_def rather than vect_unknown_def_type.
4949         (vect_check_load_store_mask): Add a mask_dt_out parameter and
4950         use it to pass back the definition type.
4951         (vect_check_store_rhs): Likewise rhs_dt_out.
4952         (vect_build_gather_load_calls): Add a mask_dt argument and use
4953         it instead of a call to vect_is_simple_use.
4954         (vectorizable_store): Update calls to vect_check_load_store_mask
4955         and vect_check_store_rhs.  Use the dt returned by the latter instead
4956         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
4957         instead of calls to vect_is_simple_use.  Pass the scalar rather
4958         than the vector operand to vect_is_simple_use when handling
4959         second and subsequent copies of an rhs value.
4960         (vectorizable_load): Update calls to vect_check_load_store_mask
4961         and vect_build_gather_load_calls.  Use the cached mask_dt and
4962         gs_info.offset_dt instead of calls to vect_is_simple_use.
4964 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
4966         PR middle-end/83945
4967         * tree-emutls.c: Include gimplify.h.
4968         (lower_emutls_2): New function.
4969         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
4970         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
4971         it before further processing.
4973         PR target/83930
4974         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
4975         UINTVAL (trueop1) instead of INTVAL (op1).
4977 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
4979         PR debug/81570
4980         PR debug/83728
4981         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
4982         INCOMING_FRAME_SP_OFFSET if not defined.
4983         (scan_trace): Add ENTRY argument.  If true and
4984         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
4985         emit a note to adjust the CFA offset.
4986         (create_cfi_notes): Adjust scan_trace callers.
4987         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
4988         INCOMING_FRAME_SP_OFFSET in the CIE.
4989         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
4990         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
4991         Likewise.
4992         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
4993         * doc/tm.texi: Regenerated.
4995 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4997         PR rtl-optimization/83147
4998         * lra-constraints.c (remove_inheritance_pseudos): Use
4999         lra_substitute_pseudo_within_insn.
5001 2018-01-19  Tom de Vries  <tom@codesourcery.com>
5002             Cesar Philippidis  <cesar@codesourcery.com>
5004         PR target/83920
5005         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
5007 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
5009         PR target/83790
5010         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
5011         spaces for function labels.
5013 2018-01-19  Martin Liska  <mliska@suse.cz>
5015         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
5016         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
5017         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
5018         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
5019         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
5020         (PRED_CONST_RETURN): Change from 69 to 65.
5021         (PRED_NULL_RETURN): Change from 91 to 71.
5022         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
5023         (PRED_LOOP_GUARD): Change from 66 to 73.
5025 2018-01-19  Martin Liska  <mliska@suse.cz>
5027         * predict.c (predict_insn_def): Add new assert.
5028         (struct branch_predictor): Change type to signed integer.
5029         (test_prediction_value_range): Amend test to cover
5030         PROB_UNINITIALIZED.
5031         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
5032         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
5033         (PRED_LOOP_ITERATIONS_MAX): Likewise.
5034         (PRED_LOOP_IV_COMPARE): Likewise.
5035         * predict.h (PROB_UNINITIALIZED): Define new constant.
5037 2018-01-19  Martin Liska  <mliska@suse.cz>
5039         * predict.c (dump_prediction): Add new format for
5040         analyze_brprob.py script which is enabled with -details
5041         suboption.
5042         * profile-count.h (precise_p): New function.
5044 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
5046         PR tree-optimization/83922
5047         * tree-vect-loop.c (vect_verify_full_masking): Return false if
5048         there are no statements that need masking.
5049         (vect_active_double_reduction_p): New function.
5050         (vect_analyze_loop_operations): Use it when handling phis that
5051         are not in the loop header.
5053 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
5055         PR tree-optimization/83914
5056         * tree-vect-loop.c (vectorizable_induction): Don't convert
5057         init_expr or apply the peeling adjustment for inductions
5058         that are nested within the vectorized loop.
5060 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5062         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
5063         instead of NEG.
5065 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
5067         PR sanitizer/81715
5068         PR testsuite/83882
5069         * function.h (gimplify_parameters): Add gimple_seq * argument.
5070         * function.c: Include gimple.h and options.h.
5071         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
5072         for the added local temporaries if needed.
5073         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
5074         if there are any parameter cleanups, wrap whole body into a
5075         try/finally with the cleanups.
5077 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
5079         PR target/82964
5080         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
5081         Use GET_MODE_CLASS for scalar floating point.
5083 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
5085         PR ipa/82256
5086         patch by PaX Team
5087         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
5088         Fix call of call_cgraph_insertion_hooks.
5090 2018-01-18  Martin Sebor  <msebor@redhat.com>
5092         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
5094 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
5096         PR ipa/83619
5097         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
5098         frequencies.
5100 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
5102         PR other/70268
5103         * common.opt: (-ffile-prefix-map): New option.
5104         * opts.c (common_handle_option): Defer it.
5105         * opts-global.c (handle_common_deferred_options): Handle it.
5106         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
5107         * file-prefix-map.h: New file.
5108         (remap_debug_filename, add_debug_prefix_map): ...here.
5109         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
5110         * final.c (debug_prefix_map, add_debug_prefix_map
5111         remap_debug_filename): Move to...
5112         * file-prefix-map.c: New file.
5113         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
5114         generalize, get rid of alloca(), use strrchr() instead of strchr().
5115         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
5116         Implement in terms of add_prefix_map().
5117         (remap_macro_filename, remap_debug_filename): Implement in term of
5118         remap_filename().
5119         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
5120         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
5121         * dbxout.c: Include file-prefix-map.h.
5122         * varasm.c: Likewise.
5123         * vmsdbgout.c: Likewise.
5124         * xcoffout.c: Likewise.
5125         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
5126         * doc/cppopts.texi (-fmacro-prefix-map): Document.
5127         * doc/invoke.texi (-ffile-prefix-map): Document.
5128         (-fdebug-prefix-map): Update description.
5130 2018-01-18  Martin Liska  <mliska@suse.cz>
5132         * config/i386/i386.c (indirect_thunk_name): Document that also
5133         lfence is emitted.
5134         (output_indirect_thunk): Document why both instructions
5135         (pause and lfence) are generated.
5137 2018-01-18  Richard Biener  <rguenther@suse.de>
5139         PR tree-optimization/83887
5140         * graphite-scop-detection.c
5141         (scop_detection::get_nearest_dom_with_single_entry): Remove.
5142         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
5143         (scop_detection::merge_sese): Re-implement with a flood-fill
5144         algorithm that properly finds a SESE region if it exists.
5146 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
5148         PR c/61240
5149         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
5150         pointer_diff optimizations use view_convert instead of convert.
5152 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5154         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
5155         Generate different code for -mno-speculate-indirect-jumps.
5156         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
5157         (*call_indirect_aix<mode>): Disable for
5158         -mno-speculate-indirect-jumps.
5159         (*call_indirect_aix<mode>_nospec): New define_insn.
5160         (*call_value_indirect_aix<mode>): Disable for
5161         -mno-speculate-indirect-jumps.
5162         (*call_value_indirect_aix<mode>_nospec): New define_insn.
5163         (*sibcall_nonlocal_sysv<mode>): Generate different code for
5164         -mno-speculate-indirect-jumps.
5165         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
5167 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
5169         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
5170         long double type, set the flags for noting the default long double
5171         type, even if we don't pass or return a long double type.
5173 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
5175         PR ipa/83051
5176         * ipa-inline.c (flatten_function): Do not overwrite final inlining
5177         failure.
5179 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
5181         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
5182         support for merge[hl].
5183         (fold_mergehl_helper): New helper function.
5184         (tree-vector-builder.h): New #include for tree_vector_builder usage.
5185         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
5186         (altivec_vmrglw_direct): Add xxmrglw insn.
5188 2018-01-17  Andrew Waterman  <andrew@sifive.com>
5190         * config/riscv/riscv.c (riscv_conditional_register_usage): If
5191         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
5193 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
5195         PR lto/83121
5196         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
5197         call the lto_location_cache before reading the
5198         DECL_SOURCE_LOCATION of the types.
5200 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
5201             Richard Sandiford  <richard.sandiford@linaro.org>
5203         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
5204         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
5205         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
5206         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
5207         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
5208         Add declaration.
5209         * config/aarch64/constraints.md (aarch64_movti_operand):
5210         Limit immediates.
5211         * config/aarch64/predicates.md (Uti): Add new constraint.
5213 2018-01-17 Carl Love  <cel@us.ibm.com>
5215         * config/rs6000/vsx.md (define_expand xl_len_r,
5216         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
5217         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
5218         lxvll.
5219         (define_expand, define_insn): Move the shift left from  the
5220         define_insn to the define_expand for lxvl and stxvl instructions.
5221         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
5222         and XL_LEN_R definitions to PURE.
5224 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
5226         * config/i386/i386.c (indirect_thunk_name): Declare regno
5227         as unsigned int.  Compare regno with INVALID_REGNUM.
5228         (output_indirect_thunk): Ditto.
5229         (output_indirect_thunk_function): Ditto.
5230         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
5231         in the call to output_indirect_thunk_function.
5233 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
5235         PR middle-end/83884
5236         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
5237         rather than the size of inner_type to determine the stack slot size
5238         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
5240 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
5242         PR target/83546
5243         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
5244         to PTA_SILVERMONT.
5246 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
5248         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
5249         endian Linux systems to optionally enable multilibs for selecting
5250         the long double type if the user configured an explicit type.
5251         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
5252         have no long double multilibs if not defined.
5253         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
5254         warn if the user used -mabi={ieee,ibm}longdouble and we built
5255         multilibs for long double.
5256         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
5257         appropriate multilib option.
5258         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
5259         multilib options.
5260         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
5261         for building long double multilibs.
5262         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
5264 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
5266         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
5267         copies.
5269         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
5270         64 bits.
5271         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
5272         128 bits.
5274         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
5275         variables.
5277         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
5278         return value.
5280 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
5282         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
5283         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
5285 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5287         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
5288         different rtl trees depending on TARGET_64BIT.
5289         (rs6000_gen_lvx): Likewise.
5291 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
5293         * config/visium/visium.md (nop): Tweak comment.
5294         (hazard_nop): Likewise.
5296 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5298         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
5299         -mspeculate-indirect-jumps.
5300         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
5301         for -mno-speculate-indirect-jumps.
5302         (*call_indirect_elfv2<mode>_nospec): New define_insn.
5303         (*call_value_indirect_elfv2<mode>): Disable for
5304         -mno-speculate-indirect-jumps.
5305         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
5306         (indirect_jump): Emit different RTL for
5307         -mno-speculate-indirect-jumps.
5308         (*indirect_jump<mode>): Disable for
5309         -mno-speculate-indirect-jumps.
5310         (*indirect_jump<mode>_nospec): New define_insn.
5311         (tablejump): Emit different RTL for
5312         -mno-speculate-indirect-jumps.
5313         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
5314         (tablejumpsi_nospec): New define_expand.
5315         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
5316         (tablejumpdi_nospec): New define_expand.
5317         (*tablejump<mode>_internal1): Disable for
5318         -mno-speculate-indirect-jumps.
5319         (*tablejump<mode>_internal1_nospec): New define_insn.
5320         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
5321         option.
5323 2018-01-16  Artyom Skrobov tyomitch@gmail.com
5325         * caller-save.c (insert_save): Drop unnecessary parameter.  All
5326         callers updated.
5328 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
5329             Richard Biener  <rguenth@suse.de>
5331         PR libgomp/83590
5332         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
5333         return early, inline manually is_gimple_sizepos.  Make sure if we
5334         call gimplify_expr we don't end up with a gimple constant.
5335         * tree.c (variably_modified_type_p): Don't return true for
5336         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
5337         * gimplify.h (is_gimple_sizepos): Remove.
5339 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
5341         PR tree-optimization/83857
5342         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
5343         vectorizable_live_operation for pure SLP statements.
5344         (vectorizable_live_operation): Handle PHIs.
5346 2018-01-16  Richard Biener  <rguenther@suse.de>
5348         PR tree-optimization/83867
5349         * tree-vect-stmts.c (vect_transform_stmt): Precompute
5350         nested_in_vect_loop_p since the scalar stmt may get invalidated.
5352 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
5354         PR c/83844
5355         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
5356         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
5357         If off is not INTEGER_CST, issue a may not be aligned warning
5358         rather than isn't aligned.  Use isn%'t rather than isn't.
5359         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
5360         into MULT_EXPR.
5361         <case MULT_EXPR>: Improve the case when bottom and one of the
5362         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
5363         operand, in that case check if the other operand is multiple of
5364         bottom divided by the INTEGER_CST operand.
5366 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
5368         PR target/83858
5369         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
5370         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
5371         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
5372         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
5373         * config/pa/pa.c (pa_function_arg_advance): Likewise.
5374         (pa_function_arg, pa_arg_partial_bytes): Likewise.
5375         (pa_function_arg_size): New function.
5377 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
5379         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
5380         in a separate statement.
5382 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
5384         PR tree-optimization/83847
5385         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
5386         group gathers and scatters.
5388 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
5390         PR rtl-optimization/86620
5391         * params.def (max-sched-ready-insns): Bump minimum value to 1.
5393         PR rtl-optimization/83213
5394         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
5395         to last if both are JUMP_INSNs.
5397         PR tree-optimization/83843
5398         * gimple-ssa-store-merging.c
5399         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
5400         store_immediate_info for bswap/nop orig_stores.
5402 2018-01-15  Andrew Waterman  <andrew@sifive.com>
5404         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
5405         !TARGET_MUL.
5406         <UDIV>: Increase cost if !TARGET_DIV.
5408 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
5410         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
5411         (define_attr "cr_logical_3op"): New.
5412         (cceq_ior_compare): Adjust.
5413         (cceq_ior_compare_complement): Adjust.
5414         (*cceq_rev_compare): Adjust.
5415         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
5416         (is_cracked_insn): Adjust.
5417         (insn_must_be_first_in_group): Adjust.
5418         * config/rs6000/40x.md: Adjust.
5419         * config/rs6000/440.md: Adjust.
5420         * config/rs6000/476.md: Adjust.
5421         * config/rs6000/601.md: Adjust.
5422         * config/rs6000/603.md: Adjust.
5423         * config/rs6000/6xx.md: Adjust.
5424         * config/rs6000/7450.md: Adjust.
5425         * config/rs6000/7xx.md: Adjust.
5426         * config/rs6000/8540.md: Adjust.
5427         * config/rs6000/cell.md: Adjust.
5428         * config/rs6000/e300c2c3.md: Adjust.
5429         * config/rs6000/e500mc.md: Adjust.
5430         * config/rs6000/e500mc64.md: Adjust.
5431         * config/rs6000/e5500.md: Adjust.
5432         * config/rs6000/e6500.md: Adjust.
5433         * config/rs6000/mpc.md: Adjust.
5434         * config/rs6000/power4.md: Adjust.
5435         * config/rs6000/power5.md: Adjust.
5436         * config/rs6000/power6.md: Adjust.
5437         * config/rs6000/power7.md: Adjust.
5438         * config/rs6000/power8.md: Adjust.
5439         * config/rs6000/power9.md: Adjust.
5440         * config/rs6000/rs64.md: Adjust.
5441         * config/rs6000/titan.md: Adjust.
5443 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
5445         * config/i386/predicates.md (indirect_branch_operand): Rewrite
5446         ix86_indirect_branch_register logic.
5448 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
5450         * config/i386/constraints.md (Bs): Update
5451         ix86_indirect_branch_register check.  Don't check
5452         ix86_indirect_branch_register with GOT_memory_operand.
5453         (Bw): Likewise.
5454         * config/i386/predicates.md (GOT_memory_operand): Don't check
5455         ix86_indirect_branch_register here.
5456         (GOT32_symbol_operand): Likewise.
5458 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
5460         * config/i386/predicates.md (constant_call_address_operand):
5461         Rewrite ix86_indirect_branch_register logic.
5462         (sibcall_insn_operand): Likewise.
5464 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
5466         * config/i386/constraints.md (Bs): Replace
5467         ix86_indirect_branch_thunk_register with
5468         ix86_indirect_branch_register.
5469         (Bw): Likewise.
5470         * config/i386/i386.md (indirect_jump): Likewise.
5471         (tablejump): Likewise.
5472         (*sibcall_memory): Likewise.
5473         (*sibcall_value_memory): Likewise.
5474         Peepholes of indirect call and jump via memory: Likewise.
5475         * config/i386/i386.opt: Likewise.
5476         * config/i386/predicates.md (indirect_branch_operand): Likewise.
5477         (GOT_memory_operand): Likewise.
5478         (call_insn_operand): Likewise.
5479         (sibcall_insn_operand): Likewise.
5480         (GOT32_symbol_operand): Likewise.
5482 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
5484         PR middle-end/83837
5485         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
5486         type rather than type addr's type points to.
5487         (expand_omp_atomic_mutex): Likewise.
5488         (expand_omp_atomic): Likewise.
5490 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
5492         PR target/83839
5493         * config/i386/i386.c (output_indirect_thunk_function): Use
5494         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
5495         for  __x86_return_thunk.
5497 2018-01-15  Richard Biener  <rguenther@suse.de>
5499         PR middle-end/83850
5500         * expmed.c (extract_bit_field_1): Fix typo.
5502 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5504         PR target/83687
5505         * config/arm/iterators.md (VF): New mode iterator.
5506         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
5507         Remove integer-related logic from pattern.
5508         (neon_vabd<mode>_3): Likewise.
5510 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
5512         PR middle-end/82694
5513         * common.opt (fstrict-overflow): No longer an alias.
5514         (fwrapv-pointer): New option.
5515         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
5516         also for pointer types based on flag_wrapv_pointer.
5517         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
5518         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
5519         opts->x_flag_wrapv got set.
5520         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
5521         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
5522         POINTER_TYPE_OVERFLOW_UNDEFINED.
5523         * match.pd: Likewise in address comparison pattern.
5524         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
5526 2018-01-15  Richard Biener  <rguenther@suse.de>
5528         PR lto/83804
5529         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
5530         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
5531         Reset type names to their identifier if their TYPE_DECL doesn't
5532         have linkage (and thus is used for ODR and devirt).
5533         (save_debug_info_for_decl): Remove.
5534         (save_debug_info_for_type): Likewise.
5535         (add_tree_to_fld_list): Adjust.
5536         * tree-pretty-print.c (dump_generic_node): Make dumping of
5537         type names more robust.
5539 2018-01-15  Richard Biener  <rguenther@suse.de>
5541         * BASE-VER: Bump to 8.0.1.
5543 2018-01-14  Martin Sebor  <msebor@redhat.com>
5545         PR other/83508
5546         * builtins.c (check_access): Avoid warning when the no-warning bit
5547         is set.
5549 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
5551         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
5552         * ira-color (allocno_hard_regs_compare): Likewise.
5554 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
5556         PR target/83013
5557         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
5558         Use .pushsection/.popsection.
5560 2018-01-14  Martin Sebor  <msebor@redhat.com>
5562         PR c++/81327
5563         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
5565 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
5567         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
5568         entry from extra_headers.
5569         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
5570         extra_headers, make the list bitwise identical to the i?86-*-* one.
5572 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
5574         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
5575         -mcmodel=large with -mindirect-branch=thunk,
5576         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
5577         -mfunction-return=thunk-extern.
5578         * doc/invoke.texi: Document -mcmodel=large is incompatible with
5579         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
5580         -mfunction-return=thunk and -mfunction-return=thunk-extern.
5582 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
5584         * config/i386/i386.c (print_reg): Print the name of the full
5585         integer register without '%'.
5586         (ix86_print_operand): Handle 'V'.
5587          * doc/extend.texi: Document 'V' modifier.
5589 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
5591         * config/i386/constraints.md (Bs): Disallow memory operand for
5592         -mindirect-branch-register.
5593         (Bw): Likewise.
5594         * config/i386/predicates.md (indirect_branch_operand): Likewise.
5595         (GOT_memory_operand): Likewise.
5596         (call_insn_operand): Likewise.
5597         (sibcall_insn_operand): Likewise.
5598         (GOT32_symbol_operand): Likewise.
5599         * config/i386/i386.md (indirect_jump): Call convert_memory_address
5600         for -mindirect-branch-register.
5601         (tablejump): Likewise.
5602         (*sibcall_memory): Likewise.
5603         (*sibcall_value_memory): Likewise.
5604         Disallow peepholes of indirect call and jump via memory for
5605         -mindirect-branch-register.
5606         (*call_pop): Replace m with Bw.
5607         (*call_value_pop): Likewise.
5608         (*sibcall_pop_memory): Replace m with Bs.
5609         * config/i386/i386.opt (mindirect-branch-register): New option.
5610         * doc/invoke.texi: Document -mindirect-branch-register option.
5612 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
5614         * config/i386/i386-protos.h (ix86_output_function_return): New.
5615         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
5616         set function_return_type.
5617         (indirect_thunk_name): Add ret_p to indicate thunk for function
5618         return.
5619         (output_indirect_thunk_function): Pass false to
5620         indirect_thunk_name.
5621         (ix86_output_indirect_branch_via_reg): Likewise.
5622         (ix86_output_indirect_branch_via_push): Likewise.
5623         (output_indirect_thunk_function): Create alias for function
5624         return thunk if regno < 0.
5625         (ix86_output_function_return): New function.
5626         (ix86_handle_fndecl_attribute): Handle function_return.
5627         (ix86_attribute_table): Add function_return.
5628         * config/i386/i386.h (machine_function): Add
5629         function_return_type.
5630         * config/i386/i386.md (simple_return_internal): Use
5631         ix86_output_function_return.
5632         (simple_return_internal_long): Likewise.
5633         * config/i386/i386.opt (mfunction-return=): New option.
5634         (indirect_branch): Mention -mfunction-return=.
5635         * doc/extend.texi: Document function_return function attribute.
5636         * doc/invoke.texi: Document -mfunction-return= option.
5638 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
5640         * config/i386/i386-opts.h (indirect_branch): New.
5641         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
5642         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
5643         with local indirect jump when converting indirect call and jump.
5644         (ix86_set_indirect_branch_type): New.
5645         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
5646         (indirectlabelno): New.
5647         (indirect_thunk_needed): Likewise.
5648         (indirect_thunk_bnd_needed): Likewise.
5649         (indirect_thunks_used): Likewise.
5650         (indirect_thunks_bnd_used): Likewise.
5651         (INDIRECT_LABEL): Likewise.
5652         (indirect_thunk_name): Likewise.
5653         (output_indirect_thunk): Likewise.
5654         (output_indirect_thunk_function): Likewise.
5655         (ix86_output_indirect_branch_via_reg): Likewise.
5656         (ix86_output_indirect_branch_via_push): Likewise.
5657         (ix86_output_indirect_branch): Likewise.
5658         (ix86_output_indirect_jmp): Likewise.
5659         (ix86_code_end): Call output_indirect_thunk_function if needed.
5660         (ix86_output_call_insn): Call ix86_output_indirect_branch if
5661         needed.
5662         (ix86_handle_fndecl_attribute): Handle indirect_branch.
5663         (ix86_attribute_table): Add indirect_branch.
5664         * config/i386/i386.h (machine_function): Add indirect_branch_type
5665         and has_local_indirect_jump.
5666         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
5667         to true.
5668         (tablejump): Likewise.
5669         (*indirect_jump): Use ix86_output_indirect_jmp.
5670         (*tablejump_1): Likewise.
5671         (simple_return_indirect_internal): Likewise.
5672         * config/i386/i386.opt (mindirect-branch=): New option.
5673         (indirect_branch): New.
5674         (keep): Likewise.
5675         (thunk): Likewise.
5676         (thunk-inline): Likewise.
5677         (thunk-extern): Likewise.
5678         * doc/extend.texi: Document indirect_branch function attribute.
5679         * doc/invoke.texi: Document -mindirect-branch= option.
5681 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
5683         PR ipa/83051
5684         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
5686 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
5688         * ipa-inline.c (want_inline_small_function_p): Return false if
5689         inlining has already failed with CIF_FINAL_ERROR.
5690         (update_caller_keys): Call want_inline_small_function_p before
5691         can_inline_edge_p.
5692         (update_callee_keys): Likewise.
5694 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5696         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
5697         New function.
5698         (rs6000_quadword_masked_address_p): Likewise.
5699         (quad_aligned_load_p): Likewise.
5700         (quad_aligned_store_p): Likewise.
5701         (const_load_sequence_p): Add comment to describe the outer-most loop.
5702         (mimic_memory_attributes_and_flags): New function.
5703         (rs6000_gen_stvx): Likewise.
5704         (replace_swapped_aligned_store): Likewise.
5705         (rs6000_gen_lvx): Likewise.
5706         (replace_swapped_aligned_load): Likewise.
5707         (replace_swapped_load_constant): Capitalize argument name in
5708         comment describing this function.
5709         (rs6000_analyze_swaps): Add a third pass to search for vector loads
5710         and stores that access quad-word aligned addresses and replace
5711         with stvx or lvx instructions when appropriate.
5712         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
5713         New function prototype.
5714         (rs6000_quadword_masked_address_p): Likewise.
5715         (rs6000_gen_lvx): Likewise.
5716         (rs6000_gen_stvx): Likewise.
5717         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
5718         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
5719         when memory address is aligned.
5720         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
5721         this split to select lvx instruction when memory address is aligned.
5722         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
5723         instruction when memory address is aligned.
5724         (*vsx_le_perm_load_v16qi): Likewise.
5725         (four unnamed splitters): Modify to select the stvx instruction
5726         when memory is aligned.
5728 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
5730         * predict.c (determine_unlikely_bbs): Handle correctly BBs
5731         which appears in the queue multiple times.
5733 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
5734             Alan Hayward  <alan.hayward@arm.com>
5735             David Sherwood  <david.sherwood@arm.com>
5737         * tree-vectorizer.h (vec_lower_bound): New structure.
5738         (_loop_vec_info): Add check_nonzero and lower_bounds.
5739         (LOOP_VINFO_CHECK_NONZERO): New macro.
5740         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
5741         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
5742         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
5743         fields.  Make seg_len the distance travelled, not including the
5744         access size.
5745         (dr_direction_indicator): Declare.
5746         (dr_zero_step_indicator): Likewise.
5747         (dr_known_forward_stride_p): Likewise.
5748         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
5749         tree-ssanames.h.
5750         (runtime_alias_check_p): Allow runtime alias checks with
5751         variable strides.
5752         (operator ==): Compare access_size and align.
5753         (prune_runtime_alias_test_list): Rework for new distinction between
5754         the access_size and seg_len.
5755         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
5756         segment lengths.
5757         (get_segment_min_max): New function.
5758         (create_intersect_range_checks): Use it.
5759         (dr_step_indicator): New function.
5760         (dr_direction_indicator): Likewise.
5761         (dr_zero_step_indicator): Likewise.
5762         (dr_known_forward_stride_p): Likewise.
5763         * tree-loop-distribution.c (data_ref_segment_size): Return
5764         DR_STEP * (niters - 1).
5765         (compute_alias_check_pairs): Update call to the dr_with_seg_len
5766         constructor.
5767         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
5768         (vect_preserves_scalar_order_p): New function, split out from...
5769         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
5770         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
5771         (vect_vfa_access_size): New function.
5772         (vect_vfa_align): Likewise.
5773         (vect_compile_time_alias): Take access_size_a and access_b arguments.
5774         (dump_lower_bound): New function.
5775         (vect_check_lower_bound): Likewise.
5776         (vect_small_gap_p): Likewise.
5777         (vectorizable_with_step_bound_p): Likewise.
5778         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
5779         depencies if the vectorization factor is 1.  Convert the checks
5780         for nonzero steps into checks on the bounds of DR_STEP.  Try using
5781         a bunds check for variable steps if the minimum required step is
5782         relatively small. Update calls to the dr_with_seg_len
5783         constructor and to vect_compile_time_alias.
5784         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
5785         function.
5786         (vect_loop_versioning): Call it.
5787         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
5788         when retrying.
5789         (vect_estimate_min_profitable_iters): Account for any bounds checks.
5791 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
5792             Alan Hayward  <alan.hayward@arm.com>
5793             David Sherwood  <david.sherwood@arm.com>
5795         * doc/sourcebuild.texi (vect_scatter_store): Document.
5796         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
5797         optabs.
5798         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
5799         Document.
5800         * genopinit.c (main): Add supports_vec_scatter_store and
5801         supports_vec_scatter_store_cached to target_optabs.
5802         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
5803         IFN_MASK_SCATTER_STORE.
5804         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
5805         functions.
5806         * internal-fn.h (internal_store_fn_p): Declare.
5807         (internal_fn_stored_value_index): Likewise.
5808         * internal-fn.c (scatter_store_direct): New macro.
5809         (expand_scatter_store_optab_fn): New function.
5810         (direct_scatter_store_optab_supported_p): New macro.
5811         (internal_store_fn_p): New function.
5812         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
5813         IFN_MASK_SCATTER_STORE.
5814         (internal_fn_mask_index): Likewise.
5815         (internal_fn_stored_value_index): New function.
5816         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
5817         for scatter stores.
5818         * optabs-query.h (supports_vec_scatter_store_p): Declare.
5819         * optabs-query.c (supports_vec_scatter_store_p): New function.
5820         * tree-vectorizer.h (vect_get_store_rhs): Declare.
5821         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
5822         true for scatter stores.
5823         (vect_gather_scatter_fn_p): Handle scatter stores too.
5824         (vect_check_gather_scatter): Consider using scatter stores if
5825         supports_vec_scatter_store_p.
5826         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
5827         scatter stores too.
5828         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
5829         internal_fn_stored_value_index.
5830         (check_load_store_masking): Handle scatter stores too.
5831         (vect_get_store_rhs): Make public.
5832         (vectorizable_call): Use internal_store_fn_p.
5833         (vectorizable_store): Handle scatter store internal functions.
5834         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
5835         when deciding whether the end of the group has been reached.
5836         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
5837         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
5838         (mask_scatter_store<mode>): New insns.
5840 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
5841             Alan Hayward  <alan.hayward@arm.com>
5842             David Sherwood  <david.sherwood@arm.com>
5844         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
5845         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
5846         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
5847         function.
5848         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
5849         Use vect_truncate_gather_scatter_offset if we can't treat the
5850         operation as a normal gather load or scatter store.
5851         (get_group_load_store_type): Take the gather_scatter_info
5852         as argument.  Try using a gather load or scatter store for
5853         single-element groups.
5854         (get_load_store_type): Update calls to get_group_load_store_type
5855         and vect_use_strided_gather_scatters_p.
5857 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
5858             Alan Hayward  <alan.hayward@arm.com>
5859             David Sherwood  <david.sherwood@arm.com>
5861         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
5862         optional tree argument.
5863         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
5864         null target hooks.
5865         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
5866         but continue to use the current value as a fallback.
5867         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
5868         to compare the updates.
5869         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
5870         (get_load_store_type): Use it when handling a strided access.
5871         (vect_get_strided_load_store_ops): New function.
5872         (vect_get_data_ptr_increment): Likewise.
5873         (vectorizable_load): Handle strided gather loads.  Always pass
5874         a step to vect_create_data_ref_ptr and bump_vector_ptr.
5876 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
5877             Alan Hayward  <alan.hayward@arm.com>
5878             David Sherwood  <david.sherwood@arm.com>
5880         * doc/md.texi (gather_load@var{m}): Document.
5881         (mask_gather_load@var{m}): Likewise.
5882         * genopinit.c (main): Add supports_vec_gather_load and
5883         supports_vec_gather_load_cached to target_optabs.
5884         * optabs-tree.c (init_tree_optimization_optabs): Use
5885         ggc_cleared_alloc to allocate target_optabs.
5886         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
5887         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
5888         functions.
5889         * internal-fn.h (internal_load_fn_p): Declare.
5890         (internal_gather_scatter_fn_p): Likewise.
5891         (internal_fn_mask_index): Likewise.
5892         (internal_gather_scatter_fn_supported_p): Likewise.
5893         * internal-fn.c (gather_load_direct): New macro.
5894         (expand_gather_load_optab_fn): New function.
5895         (direct_gather_load_optab_supported_p): New macro.
5896         (direct_internal_fn_optab): New function.
5897         (internal_load_fn_p): Likewise.
5898         (internal_gather_scatter_fn_p): Likewise.
5899         (internal_fn_mask_index): Likewise.
5900         (internal_gather_scatter_fn_supported_p): Likewise.
5901         * optabs-query.c (supports_at_least_one_mode_p): New function.
5902         (supports_vec_gather_load_p): Likewise.
5903         * optabs-query.h (supports_vec_gather_load_p): Declare.
5904         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
5905         and memory_type field.
5906         (NUM_PATTERNS): Bump to 15.
5907         * tree-vect-data-refs.c: Include internal-fn.h.
5908         (vect_gather_scatter_fn_p): New function.
5909         (vect_describe_gather_scatter_call): Likewise.
5910         (vect_check_gather_scatter): Try using internal functions for
5911         gather loads.  Recognize existing calls to a gather load function.
5912         (vect_analyze_data_refs): Consider using gather loads if
5913         supports_vec_gather_load_p.
5914         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
5915         (vect_get_gather_scatter_offset_type): Likewise.
5916         (vect_convert_mask_for_vectype): Likewise.
5917         (vect_add_conversion_to_patterm): Likewise.
5918         (vect_try_gather_scatter_pattern): Likewise.
5919         (vect_recog_gather_scatter_pattern): New pattern recognizer.
5920         (vect_vect_recog_func_ptrs): Add it.
5921         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
5922         internal_fn_mask_index and internal_gather_scatter_fn_p.
5923         (check_load_store_masking): Take the gather_scatter_info as an
5924         argument and handle gather loads.
5925         (vect_get_gather_scatter_ops): New function.
5926         (vectorizable_call): Check internal_load_fn_p.
5927         (vectorizable_load): Likewise.  Handle gather load internal
5928         functions.
5929         (vectorizable_store): Update call to check_load_store_masking.
5930         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
5931         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
5932         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
5933         (aarch64_gather_scale_operand_d): New predicates.
5934         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
5935         (mask_gather_load<mode>): New insns.
5937 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
5938             Alan Hayward  <alan.hayward@arm.com>
5939             David Sherwood  <david.sherwood@arm.com>
5941         * optabs.def (fold_left_plus_optab): New optab.
5942         * doc/md.texi (fold_left_plus_@var{m}): Document.
5943         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
5944         * internal-fn.c (fold_left_direct): Define.
5945         (expand_fold_left_optab_fn): Likewise.
5946         (direct_fold_left_optab_supported_p): Likewise.
5947         * fold-const-call.c (fold_const_fold_left): New function.
5948         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
5949         * tree-parloops.c (valid_reduction_p): New function.
5950         (gather_scalar_reductions): Use it.
5951         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
5952         (vect_finish_replace_stmt): Declare.
5953         * tree-vect-loop.c (fold_left_reduction_fn): New function.
5954         (needs_fold_left_reduction_p): New function, split out from...
5955         (vect_is_simple_reduction): ...here.  Accept reductions that
5956         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
5957         (vect_force_simple_reduction): Also store the reduction type in
5958         the assignment's STMT_VINFO_REDUC_TYPE.
5959         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
5960         (merge_with_identity): New function.
5961         (vect_expand_fold_left): Likewise.
5962         (vectorize_fold_left_reduction): Likewise.
5963         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
5964         scalar phi in place for it.  Check for target support and reject
5965         cases that would reassociate the operation.  Defer the transform
5966         phase to vectorize_fold_left_reduction.
5967         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
5968         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
5969         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
5971 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
5973         * tree-if-conv.c (predicate_mem_writes): Remove redundant
5974         call to ifc_temp_var.
5976 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
5977             Alan Hayward  <alan.hayward@arm.com>
5978             David Sherwood  <david.sherwood@arm.com>
5980         * target.def (legitimize_address_displacement): Take the original
5981         offset as a poly_int.
5982         * targhooks.h (default_legitimize_address_displacement): Update
5983         accordingly.
5984         * targhooks.c (default_legitimize_address_displacement): Likewise.
5985         * doc/tm.texi: Regenerate.
5986         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
5987         as an argument, moving assert of ad->disp == ad->disp_term to...
5988         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
5989         Try calling targetm.legitimize_address_displacement before expanding
5990         the address rather than afterwards, and adjust for the new interface.
5991         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
5992         Match the new hook interface.  Handle SVE addresses.
5993         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
5994         new hook interface.
5996 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
5998         * Makefile.in (OBJS): Add early-remat.o.
5999         * target.def (select_early_remat_modes): New hook.
6000         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
6001         * doc/tm.texi: Regenerate.
6002         * targhooks.h (default_select_early_remat_modes): Declare.
6003         * targhooks.c (default_select_early_remat_modes): New function.
6004         * timevar.def (TV_EARLY_REMAT): New timevar.
6005         * passes.def (pass_early_remat): New pass.
6006         * tree-pass.h (make_pass_early_remat): Declare.
6007         * early-remat.c: New file.
6008         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
6009         function.
6010         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
6012 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6013             Alan Hayward  <alan.hayward@arm.com>
6014             David Sherwood  <david.sherwood@arm.com>
6016         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
6017         vfm1 with a bound_epilog parameter.
6018         (vect_do_peeling): Update calls accordingly, and move the prologue
6019         call earlier in the function.  Treat the base bound_epilog as 0 for
6020         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
6021         this base when peeling for gaps.
6022         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
6023         with fully-masked loops.
6024         (vect_estimate_min_profitable_iters): Handle the single peeled
6025         iteration in that case.
6027 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6028             Alan Hayward  <alan.hayward@arm.com>
6029             David Sherwood  <david.sherwood@arm.com>
6031         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
6032         single-element interleaving even if the size is not a power of 2.
6033         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
6034         accesses for single-element interleaving if the group size is
6035         not a power of 2.
6037 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6038             Alan Hayward  <alan.hayward@arm.com>
6039             David Sherwood  <david.sherwood@arm.com>
6041         * doc/md.texi (fold_extract_last_@var{m}): Document.
6042         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
6043         * optabs.def (fold_extract_last_optab): New optab.
6044         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
6045         * internal-fn.c (fold_extract_direct): New macro.
6046         (expand_fold_extract_optab_fn): Likewise.
6047         (direct_fold_extract_optab_supported_p): Likewise.
6048         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
6049         * tree-vect-loop.c (vect_model_reduction_cost): Handle
6050         EXTRACT_LAST_REDUCTION.
6051         (get_initial_def_for_reduction): Do not create an initial vector
6052         for EXTRACT_LAST_REDUCTION reductions.
6053         (vectorizable_reduction): Leave the scalar phi in place for
6054         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
6055         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
6056         epilogue code for EXTRACT_LAST_REDUCTION and defer the
6057         transform phase to vectorizable_condition.
6058         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
6059         split out from...
6060         (vect_finish_stmt_generation): ...here.
6061         (vect_finish_replace_stmt): New function.
6062         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
6063         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
6064         pattern.
6065         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
6067 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6068             Alan Hayward  <alan.hayward@arm.com>
6069             David Sherwood  <david.sherwood@arm.com>
6071         * doc/md.texi (extract_last_@var{m}): Document.
6072         * optabs.def (extract_last_optab): New optab.
6073         * internal-fn.def (EXTRACT_LAST): New internal function.
6074         * internal-fn.c (cond_unary_direct): New macro.
6075         (expand_cond_unary_optab_fn): Likewise.
6076         (direct_cond_unary_optab_supported_p): Likewise.
6077         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
6078         loops using EXTRACT_LAST.
6079         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
6080         (extract_last_<mode>): ...this optab.
6081         (vec_extract<mode><Vel>): Update accordingly.
6083 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6084             Alan Hayward  <alan.hayward@arm.com>
6085             David Sherwood  <david.sherwood@arm.com>
6087         * target.def (empty_mask_is_expensive): New hook.
6088         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
6089         * doc/tm.texi: Regenerate.
6090         * targhooks.h (default_empty_mask_is_expensive): Declare.
6091         * targhooks.c (default_empty_mask_is_expensive): New function.
6092         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
6093         if the target says that empty masks are expensive.
6094         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
6095         New function.
6096         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
6098 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6099             Alan Hayward  <alan.hayward@arm.com>
6100             David Sherwood  <david.sherwood@arm.com>
6102         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
6103         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
6104         (vect_use_loop_mask_for_alignment_p): New function.
6105         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
6106         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
6107         niters_skip argument.  Make sure that the first niters_skip elements
6108         of the first iteration are inactive.
6109         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
6110         Update call to vect_set_loop_masks_directly.
6111         (get_misalign_in_elems): New function, split out from...
6112         (vect_gen_prolog_loop_niters): ...here.
6113         (vect_update_init_of_dr): Take a code argument that specifies whether
6114         the adjustment should be added or subtracted.
6115         (vect_update_init_of_drs): Likewise.
6116         (vect_prepare_for_masked_peels): New function.
6117         (vect_do_peeling): Skip prologue peeling if we're using a mask
6118         instead.  Update call to vect_update_inits_of_drs.
6119         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
6120         mask_skip_niters.
6121         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
6122         alignment.  Do not include the number of peeled iterations in
6123         the minimum threshold in that case.
6124         (vectorizable_induction): Adjust the start value down by
6125         LOOP_VINFO_MASK_SKIP_NITERS iterations.
6126         (vect_transform_loop): Call vect_prepare_for_masked_peels.
6127         Take the number of skipped iterations into account when calculating
6128         the loop bounds.
6129         * tree-vect-stmts.c (vect_gen_while_not): New function.
6131 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6132             Alan Hayward  <alan.hayward@arm.com>
6133             David Sherwood  <david.sherwood@arm.com>
6135         * doc/sourcebuild.texi (vect_fully_masked): Document.
6136         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
6137         default value to 0.
6138         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
6139         split out from...
6140         (vect_analyze_loop_2): ...here. Don't check the vectorization
6141         factor against the number of loop iterations if the loop is
6142         fully-masked.
6144 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6145             Alan Hayward  <alan.hayward@arm.com>
6146             David Sherwood  <david.sherwood@arm.com>
6148         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
6149         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
6150         (dump_groups): Update accordingly.
6151         (iv_use::mem_type): New member variable.
6152         (address_p): New function.
6153         (record_use): Add a mem_type argument and initialize the new
6154         mem_type field.
6155         (record_group_use): Add a mem_type argument.  Use address_p.
6156         Remove obsolete null checks of base_object.  Update call to record_use.
6157         (find_interesting_uses_op): Update call to record_group_use.
6158         (find_interesting_uses_cond): Likewise.
6159         (find_interesting_uses_address): Likewise.
6160         (get_mem_type_for_internal_fn): New function.
6161         (find_address_like_use): Likewise.
6162         (find_interesting_uses_stmt): Try find_address_like_use before
6163         calling find_interesting_uses_op.
6164         (addr_offset_valid_p): Use the iv mem_type field as the type
6165         of the addressed memory.
6166         (add_autoinc_candidates): Likewise.
6167         (get_address_cost): Likewise.
6168         (split_small_address_groups_p): Use address_p.
6169         (split_address_groups): Likewise.
6170         (add_iv_candidate_for_use): Likewise.
6171         (autoinc_possible_for_pair): Likewise.
6172         (rewrite_groups): Likewise.
6173         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
6174         (determine_group_iv_cost): Update after split of USE_ADDRESS.
6175         (get_alias_ptr_type_for_ptr_address): New function.
6176         (rewrite_use_address): Rewrite address uses in calls that were
6177         identified by find_address_like_use.
6179 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6180             Alan Hayward  <alan.hayward@arm.com>
6181             David Sherwood  <david.sherwood@arm.com>
6183         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
6184         TARGET_MEM_REFs.
6185         * gimple-expr.h (is_gimple_addressable: Likewise.
6186         * gimple-expr.c (is_gimple_address): Likewise.
6187         * internal-fn.c (expand_call_mem_ref): New function.
6188         (expand_mask_load_optab_fn): Use it.
6189         (expand_mask_store_optab_fn): Likewise.
6191 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6192             Alan Hayward  <alan.hayward@arm.com>
6193             David Sherwood  <david.sherwood@arm.com>
6195         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
6196         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
6197         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
6198         (cond_umax@var{mode}): Document.
6199         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
6200         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
6201         (cond_umin_optab, cond_umax_optab): New optabs.
6202         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
6203         (COND_IOR, COND_XOR): New internal functions.
6204         * internal-fn.h (get_conditional_internal_fn): Declare.
6205         * internal-fn.c (cond_binary_direct): New macro.
6206         (expand_cond_binary_optab_fn): Likewise.
6207         (direct_cond_binary_optab_supported_p): Likewise.
6208         (get_conditional_internal_fn): New function.
6209         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
6210         Cope with reduction statements that are vectorized as calls rather
6211         than assignments.
6212         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
6213         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
6214         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
6215         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6216         (UNSPEC_COND_EOR): New unspecs.
6217         (optab): Add mappings for them.
6218         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
6219         (sve_int_op, sve_fp_op): New int attributes.
6221 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6222             Alan Hayward  <alan.hayward@arm.com>
6223             David Sherwood  <david.sherwood@arm.com>
6225         * optabs.def (while_ult_optab): New optab.
6226         * doc/md.texi (while_ult@var{m}@var{n}): Document.
6227         * internal-fn.def (WHILE_ULT): New internal function.
6228         * internal-fn.h (direct_internal_fn_supported_p): New override
6229         that takes two types as argument.
6230         * internal-fn.c (while_direct): New macro.
6231         (expand_while_optab_fn): New function.
6232         (convert_optab_supported_p): Likewise.
6233         (direct_while_optab_supported_p): New macro.
6234         * wide-int.h (wi::udiv_ceil): New function.
6235         * tree-vectorizer.h (rgroup_masks): New structure.
6236         (vec_loop_masks): New typedef.
6237         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
6238         and fully_masked_p.
6239         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
6240         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
6241         (vect_max_vf): New function.
6242         (slpeel_make_loop_iterate_ntimes): Delete.
6243         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
6244         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
6245         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
6246         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
6247         internal-fn.h, stor-layout.h and optabs-query.h.
6248         (vect_set_loop_mask): New function.
6249         (add_preheader_seq): Likewise.
6250         (add_header_seq): Likewise.
6251         (interleave_supported_p): Likewise.
6252         (vect_maybe_permute_loop_masks): Likewise.
6253         (vect_set_loop_masks_directly): Likewise.
6254         (vect_set_loop_condition_masked): Likewise.
6255         (vect_set_loop_condition_unmasked): New function, split out from
6256         slpeel_make_loop_iterate_ntimes.
6257         (slpeel_make_loop_iterate_ntimes): Rename to..
6258         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
6259         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
6260         (vect_do_peeling): Update call accordingly.
6261         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
6262         loops.
6263         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
6264         mask_compare_type, can_fully_mask_p and fully_masked_p.
6265         (release_vec_loop_masks): New function.
6266         (_loop_vec_info): Use it to free the loop masks.
6267         (can_produce_all_loop_masks_p): New function.
6268         (vect_get_max_nscalars_per_iter): Likewise.
6269         (vect_verify_full_masking): Likewise.
6270         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
6271         retries, and free the mask rgroups before retrying.  Check loop-wide
6272         reasons for disallowing fully-masked loops.  Make the final decision
6273         about whether use a fully-masked loop or not.
6274         (vect_estimate_min_profitable_iters): Do not assume that peeling
6275         for the number of iterations will be needed for fully-masked loops.
6276         (vectorizable_reduction): Disable fully-masked loops.
6277         (vectorizable_live_operation): Likewise.
6278         (vect_halve_mask_nunits): New function.
6279         (vect_double_mask_nunits): Likewise.
6280         (vect_record_loop_mask): Likewise.
6281         (vect_get_loop_mask): Likewise.
6282         (vect_transform_loop): Handle the case in which the final loop
6283         iteration might handle a partial vector.  Call vect_set_loop_condition
6284         instead of slpeel_make_loop_iterate_ntimes.
6285         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
6286         (check_load_store_masking): New function.
6287         (prepare_load_store_mask): Likewise.
6288         (vectorizable_store): Handle fully-masked loops.
6289         (vectorizable_load): Likewise.
6290         (supportable_widening_operation): Use vect_halve_mask_nunits for
6291         booleans.
6292         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
6293         (vect_gen_while): New function.
6294         * config/aarch64/aarch64.md (umax<mode>3): New expander.
6295         (aarch64_uqdec<mode>): New insn.
6297 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6298             Alan Hayward  <alan.hayward@arm.com>
6299             David Sherwood  <david.sherwood@arm.com>
6301         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
6302         (reduc_xor_scal_optab): New optabs.
6303         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
6304         (reduc_xor_scal_@var{m}): Document.
6305         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
6306         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
6307         internal functions.
6308         * fold-const-call.c (fold_const_call): Handle them.
6309         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
6310         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
6311         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
6312         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
6313         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
6314         (UNSPEC_XORV): New unspecs.
6315         (optab): Add entries for them.
6316         (BITWISEV): New int iterator.
6317         (bit_reduc_op): New int attributes.
6319 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6320             Alan Hayward  <alan.hayward@arm.com>
6321             David Sherwood  <david.sherwood@arm.com>
6323         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
6324         * internal-fn.def (VEC_SHL_INSERT): New internal function.
6325         * optabs.def (vec_shl_insert_optab): New optab.
6326         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
6327         (duplicate_and_interleave): Likewise.
6328         * tree-vect-loop.c: Include internal-fn.h.
6329         (neutral_op_for_slp_reduction): New function, split out from
6330         get_initial_defs_for_reduction.
6331         (get_initial_def_for_reduction): Handle option 2 for variable-length
6332         vectors by loading the neutral value into a vector and then shifting
6333         the initial value into element 0.
6334         (get_initial_defs_for_reduction): Replace the code argument with
6335         the neutral value calculated by neutral_op_for_slp_reduction.
6336         Use gimple_build_vector for constant-length vectors.
6337         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
6338         but the first group_size elements have a neutral value.
6339         Use duplicate_and_interleave otherwise.
6340         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
6341         Update call to get_initial_defs_for_reduction.  Handle SLP
6342         reductions for variable-length vectors by creating one vector
6343         result for each scalar result, with the elements associated
6344         with other scalar results stubbed out with the neutral value.
6345         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
6346         Require IFN_VEC_SHL_INSERT for double reductions on
6347         variable-length vectors, or SLP reductions that have
6348         a neutral value.  Require can_duplicate_and_interleave_p
6349         support for variable-length unchained SLP reductions if there
6350         is no neutral value, such as for MIN/MAX reductions.  Also require
6351         the number of vector elements to be a multiple of the number of
6352         SLP statements when doing variable-length unchained SLP reductions.
6353         Update call to vect_create_epilog_for_reduction.
6354         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
6355         and remove initial values.
6356         (duplicate_and_interleave): Make public.
6357         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
6358         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
6360 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6361             Alan Hayward  <alan.hayward@arm.com>
6362             David Sherwood  <david.sherwood@arm.com>
6364         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
6365         (can_duplicate_and_interleave_p): New function.
6366         (vect_get_and_check_slp_defs): Take the vector of statements
6367         rather than just the current one.  Remove excess parentheses.
6368         Restriction rejectinon of vect_constant_def and vect_external_def
6369         for variable-length vectors to boolean types, or types for which
6370         can_duplicate_and_interleave_p is false.
6371         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
6372         (duplicate_and_interleave): New function.
6373         (vect_get_constant_vectors): Use gimple_build_vector for
6374         constant-length vectors and suitable variable-length constant
6375         vectors.  Use duplicate_and_interleave for other variable-length
6376         vectors.  Don't defer the update when inserting new statements.
6378 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6379             Alan Hayward  <alan.hayward@arm.com>
6380             David Sherwood  <david.sherwood@arm.com>
6382         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
6383         min_profitable_iters doesn't go negative.
6385 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6386             Alan Hayward  <alan.hayward@arm.com>
6387             David Sherwood  <david.sherwood@arm.com>
6389         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
6390         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
6391         * optabs.def (vec_mask_load_lanes_optab): New optab.
6392         (vec_mask_store_lanes_optab): Likewise.
6393         * internal-fn.def (MASK_LOAD_LANES): New internal function.
6394         (MASK_STORE_LANES): Likewise.
6395         * internal-fn.c (mask_load_lanes_direct): New macro.
6396         (mask_store_lanes_direct): Likewise.
6397         (expand_mask_load_optab_fn): Handle masked operations.
6398         (expand_mask_load_lanes_optab_fn): New macro.
6399         (expand_mask_store_optab_fn): Handle masked operations.
6400         (expand_mask_store_lanes_optab_fn): New macro.
6401         (direct_mask_load_lanes_optab_supported_p): Likewise.
6402         (direct_mask_store_lanes_optab_supported_p): Likewise.
6403         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
6404         parameter.
6405         (vect_load_lanes_supported): Likewise.
6406         * tree-vect-data-refs.c (strip_conversion): New function.
6407         (can_group_stmts_p): Likewise.
6408         (vect_analyze_data_ref_accesses): Use it instead of checking
6409         for a pair of assignments.
6410         (vect_store_lanes_supported): Take a masked_p parameter.
6411         (vect_load_lanes_supported): Likewise.
6412         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
6413         vect_store_lanes_supported and vect_load_lanes_supported.
6414         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6415         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
6416         parameter.  Don't allow gaps for masked accesses.
6417         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
6418         and vect_load_lanes_supported.
6419         (get_load_store_type): Take a masked_p parameter and update
6420         call to get_group_load_store_type.
6421         (vectorizable_store): Update call to get_load_store_type.
6422         Handle IFN_MASK_STORE_LANES.
6423         (vectorizable_load): Update call to get_load_store_type.
6424         Handle IFN_MASK_LOAD_LANES.
6426 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6427             Alan Hayward  <alan.hayward@arm.com>
6428             David Sherwood  <david.sherwood@arm.com>
6430         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
6431         modes for SVE.
6432         * config/aarch64/aarch64-protos.h
6433         (aarch64_sve_struct_memory_operand_p): Declare.
6434         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
6435         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
6436         (VPRED, vpred): Handle SVE structure modes.
6437         * config/aarch64/constraints.md (Utx): New constraint.
6438         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
6439         (aarch64_sve_struct_nonimmediate_operand): New predicates.
6440         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
6441         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
6442         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
6443         structure modes.  Split into pieces after RA.
6444         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
6445         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
6446         New patterns.
6447         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
6448         SVE structure modes.
6449         (aarch64_classify_address): Likewise.
6450         (sizetochar): Move earlier in file.
6451         (aarch64_print_operand): Handle SVE register lists.
6452         (aarch64_array_mode): New function.
6453         (aarch64_sve_struct_memory_operand_p): Likewise.
6454         (TARGET_ARRAY_MODE): Redefine.
6456 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6457             Alan Hayward  <alan.hayward@arm.com>
6458             David Sherwood  <david.sherwood@arm.com>
6460         * target.def (array_mode): New target hook.
6461         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
6462         * doc/tm.texi: Regenerate.
6463         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
6464         * hooks.c (hook_optmode_mode_uhwi_none): New function.
6465         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
6466         targetm.array_mode.
6467         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
6468         type sizes.
6470 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6471             Alan Hayward  <alan.hayward@arm.com>
6472             David Sherwood  <david.sherwood@arm.com>
6474         * fold-const.c (fold_binary_loc): Check the argument types
6475         rather than the result type when testing for a vector operation.
6477 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6479         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
6480         * doc/tm.texi: Regenerate.
6482 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6483             Alan Hayward  <alan.hayward@arm.com>
6484             David Sherwood  <david.sherwood@arm.com>
6486         * doc/invoke.texi (-msve-vector-bits=): Document new option.
6487         (sve): Document new AArch64 extension.
6488         * doc/md.texi (w): Extend the description of the AArch64
6489         constraint to include SVE vectors.
6490         (Upl, Upa): Document new AArch64 predicate constraints.
6491         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
6492         enum.
6493         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
6494         (msve-vector-bits=): New option.
6495         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
6496         SVE when these are disabled.
6497         (sve): New extension.
6498         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
6499         modes.  Adjust their number of units based on aarch64_sve_vg.
6500         (MAX_BITSIZE_MODE_ANY_MODE): Define.
6501         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
6502         aarch64_addr_query_type.
6503         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
6504         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
6505         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
6506         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
6507         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
6508         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
6509         (aarch64_simd_imm_zero_p): Delete.
6510         (aarch64_check_zero_based_sve_index_immediate): Declare.
6511         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
6512         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
6513         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
6514         (aarch64_sve_float_mul_immediate_p): Likewise.
6515         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
6516         rather than an rtx.
6517         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
6518         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
6519         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
6520         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
6521         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
6522         (aarch64_regmode_natural_size): Likewise.
6523         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
6524         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
6525         left one place.
6526         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
6527         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
6528         for VG and the SVE predicate registers.
6529         (V_ALIASES): Add a "z"-prefixed alias.
6530         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
6531         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
6532         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
6533         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
6534         (REG_CLASS_NAMES): Add entries for them.
6535         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
6536         and the predicate registers.
6537         (aarch64_sve_vg): Declare.
6538         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
6539         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
6540         (REGMODE_NATURAL_SIZE): Define.
6541         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
6542         SVE macros.
6543         * config/aarch64/aarch64.c: Include cfgrtl.h.
6544         (simd_immediate_info): Add a constructor for series vectors,
6545         and an associated step field.
6546         (aarch64_sve_vg): New variable.
6547         (aarch64_dbx_register_number): Handle VG and the predicate registers.
6548         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
6549         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
6550         (VEC_ANY_DATA, VEC_STRUCT): New constants.
6551         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
6552         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
6553         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
6554         (aarch64_get_mask_mode): New functions.
6555         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
6556         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
6557         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
6558         predicate modes and predicate registers.  Explicitly restrict
6559         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
6560         to store a vector mode if it is recognized by
6561         aarch64_classify_vector_mode.
6562         (aarch64_regmode_natural_size): New function.
6563         (aarch64_hard_regno_caller_save_mode): Return the original mode
6564         for predicates.
6565         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
6566         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
6567         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
6568         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
6569         functions.
6570         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
6571         does not overlap dest if the function is frame-related.  Handle
6572         SVE constants.
6573         (aarch64_split_add_offset): New function.
6574         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
6575         them aarch64_add_offset.
6576         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
6577         and update call to aarch64_sub_sp.
6578         (aarch64_add_cfa_expression): New function.
6579         (aarch64_expand_prologue): Pass extra temporary registers to the
6580         functions above.  Handle the case in which we need to emit new
6581         DW_CFA_expressions for registers that were originally saved
6582         relative to the stack pointer, but now have to be expressed
6583         relative to the frame pointer.
6584         (aarch64_output_mi_thunk): Pass extra temporary registers to the
6585         functions above.
6586         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
6587         IP0 and IP1 values for SVE frames.
6588         (aarch64_expand_vec_series): New function.
6589         (aarch64_expand_sve_widened_duplicate): Likewise.
6590         (aarch64_expand_sve_const_vector): Likewise.
6591         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
6592         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
6593         into the register, rather than emitting a SET directly.
6594         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
6595         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
6596         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
6597         (offset_9bit_signed_scaled_p): New functions.
6598         (aarch64_replicate_bitmask_imm): New function.
6599         (aarch64_bitmask_imm): Use it.
6600         (aarch64_cannot_force_const_mem): Reject expressions involving
6601         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
6602         (aarch64_classify_index): Handle SVE indices, by requiring
6603         a plain register index with a scale that matches the element size.
6604         (aarch64_classify_address): Handle SVE addresses.  Assert that
6605         the mode of the address is VOIDmode or an integer mode.
6606         Update call to aarch64_classify_symbol.
6607         (aarch64_classify_symbolic_expression): Update call to
6608         aarch64_classify_symbol.
6609         (aarch64_const_vec_all_in_range_p): New function.
6610         (aarch64_print_vector_float_operand): Likewise.
6611         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
6612         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
6613         and the FP immediates 1.0 and 0.5.
6614         (aarch64_print_address_internal): Handle SVE addresses.
6615         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
6616         (aarch64_regno_regclass): Handle predicate registers.
6617         (aarch64_secondary_reload): Handle big-endian reloads of SVE
6618         data modes.
6619         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
6620         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
6621         (aarch64_convert_sve_vector_bits): New function.
6622         (aarch64_override_options): Use it to handle -msve-vector-bits=.
6623         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
6624         rather than an rtx.
6625         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
6626         Handle SVE vector and predicate modes.  Accept VL-based constants
6627         that need only one temporary register, and VL offsets that require
6628         no temporary registers.
6629         (aarch64_conditional_register_usage): Mark the predicate registers
6630         as fixed if SVE isn't available.
6631         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
6632         Return true for SVE vector and predicate modes.
6633         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
6634         rather than an unsigned int.  Handle SVE modes.
6635         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
6636         SVE modes.
6637         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
6638         if SVE is enabled.
6639         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
6640         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
6641         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
6642         (aarch64_sve_float_mul_immediate_p): New functions.
6643         (aarch64_sve_valid_immediate): New function.
6644         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
6645         Explicitly reject structure modes.  Check for INDEX constants.
6646         Handle PTRUE and PFALSE constants.
6647         (aarch64_check_zero_based_sve_index_immediate): New function.
6648         (aarch64_simd_imm_zero_p): Delete.
6649         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
6650         vector modes.  Accept constants in the range of CNT[BHWD].
6651         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
6652         ask for an Advanced SIMD mode.
6653         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
6654         (aarch64_simd_vector_alignment): Handle SVE predicates.
6655         (aarch64_vectorize_preferred_vector_alignment): New function.
6656         (aarch64_simd_vector_alignment_reachable): Use it instead of
6657         the vector size.
6658         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
6659         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
6660         functions.
6661         (MAX_VECT_LEN): Delete.
6662         (expand_vec_perm_d): Add a vec_flags field.
6663         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
6664         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
6665         (aarch64_evpc_ext): Don't apply a big-endian lane correction
6666         for SVE modes.
6667         (aarch64_evpc_rev): Rename to...
6668         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
6669         (aarch64_evpc_rev_global): New function.
6670         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
6671         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
6672         MAX_VECT_LEN.
6673         (aarch64_evpc_sve_tbl): New function.
6674         (aarch64_expand_vec_perm_const_1): Update after rename of
6675         aarch64_evpc_rev.  Handle SVE permutes too, trying
6676         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
6677         than aarch64_evpc_tbl.
6678         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
6679         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
6680         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
6681         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
6682         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
6683         (aarch64_expand_sve_vcond): New functions.
6684         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
6685         of aarch64_vector_mode_p.
6686         (aarch64_dwarf_poly_indeterminate_value): New function.
6687         (aarch64_compute_pressure_classes): Likewise.
6688         (aarch64_can_change_mode_class): Likewise.
6689         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
6690         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
6691         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
6692         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
6693         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
6694         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
6695         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
6696         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
6697         constraints.
6698         (Dn, Dl, Dr): Accept const as well as const_vector.
6699         (Dz): Likewise.  Compare against CONST0_RTX.
6700         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
6701         of "vector" where appropriate.
6702         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
6703         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
6704         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
6705         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
6706         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
6707         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
6708         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
6709         (v_int_equiv): Extend to SVE modes.
6710         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
6711         mode attributes.
6712         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
6713         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
6714         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
6715         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
6716         (SVE_COND_FP_CMP): New int iterators.
6717         (perm_hilo): Handle the new unpack unspecs.
6718         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
6719         attributes.
6720         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
6721         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
6722         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
6723         (aarch64_equality_operator, aarch64_constant_vector_operand)
6724         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
6725         (aarch64_sve_nonimmediate_operand): Likewise.
6726         (aarch64_sve_general_operand): Likewise.
6727         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
6728         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
6729         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
6730         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
6731         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
6732         (aarch64_sve_float_arith_immediate): Likewise.
6733         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
6734         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
6735         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
6736         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
6737         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
6738         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
6739         (aarch64_sve_float_arith_operand): Likewise.
6740         (aarch64_sve_float_arith_with_sub_operand): Likewise.
6741         (aarch64_sve_float_mul_operand): Likewise.
6742         (aarch64_sve_vec_perm_operand): Likewise.
6743         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
6744         (aarch64_mov_operand): Accept const_poly_int and const_vector.
6745         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
6746         as well as const_vector.
6747         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
6748         in file.  Use CONST0_RTX and CONSTM1_RTX.
6749         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
6750         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
6751         Use aarch64_simd_imm_zero.
6752         * config/aarch64/aarch64-sve.md: New file.
6753         * config/aarch64/aarch64.md: Include it.
6754         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
6755         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
6756         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
6757         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
6758         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
6759         (sve): New attribute.
6760         (enabled): Disable instructions with the sve attribute unless
6761         TARGET_SVE.
6762         (movqi, movhi): Pass CONST_POLY_INT operaneds through
6763         aarch64_expand_mov_immediate.
6764         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
6765         CNT[BHSD] immediates.
6766         (movti): Split CONST_POLY_INT moves into two halves.
6767         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
6768         Split additions that need a temporary here if the destination
6769         is the stack pointer.
6770         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
6771         (*add<mode>3_poly_1): New instruction.
6772         (set_clobber_cc): New expander.
6774 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6776         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
6777         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
6778         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
6779         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
6780         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
6781         Change innermode from fixed_mode_size to machine_mode.
6782         (simplify_subreg): Update call accordingly.  Handle a constant-sized
6783         subreg of a variable-length CONST_VECTOR.
6785 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
6786             Alan Hayward  <alan.hayward@arm.com>
6787             David Sherwood  <david.sherwood@arm.com>
6789         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
6790         (add_offset_to_base): New function, split out from...
6791         (create_mem_ref): ...here.  When handling a scale other than 1,
6792         check first whether the address is valid without the offset.
6793         Add it into the base if so, leaving the index and scale as-is.
6795 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
6797         PR c++/83778
6798         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
6799         fold_for_warn before checking if arg2 is INTEGER_CST.
6801 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
6803         * config/rs6000/predicates.md (load_multiple_operation): Delete.
6804         (store_multiple_operation): Delete.
6805         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
6806         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
6807         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
6808         guarded by TARGET_STRING.
6809         (rs6000_output_load_multiple): Delete.
6810         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
6811         OPTION_MASK_STRING / TARGET_STRING handling.
6812         (print_operand) <'N', 'O'>: Add comment that these are unused now.
6813         (const rs6000_opt_masks) <"string">: Change mask to 0.
6814         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
6815         (MASK_STRING): Delete.
6816         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
6817         parts.  Simplify.
6818         (load_multiple): Delete.
6819         (*ldmsi8): Delete.
6820         (*ldmsi7): Delete.
6821         (*ldmsi6): Delete.
6822         (*ldmsi5): Delete.
6823         (*ldmsi4): Delete.
6824         (*ldmsi3): Delete.
6825         (store_multiple): Delete.
6826         (*stmsi8): Delete.
6827         (*stmsi7): Delete.
6828         (*stmsi6): Delete.
6829         (*stmsi5): Delete.
6830         (*stmsi4): Delete.
6831         (*stmsi3): Delete.
6832         (movmemsi_8reg): Delete.
6833         (corresponding unnamed define_insn): Delete.
6834         (movmemsi_6reg): Delete.
6835         (corresponding unnamed define_insn): Delete.
6836         (movmemsi_4reg): Delete.
6837         (corresponding unnamed define_insn): Delete.
6838         (movmemsi_2reg): Delete.
6839         (corresponding unnamed define_insn): Delete.
6840         (movmemsi_1reg): Delete.
6841         (corresponding unnamed define_insn): Delete.
6842         * config/rs6000/rs6000.opt (mno-string): New.
6843         (mstring): Replace by deprecation warning stub.
6844         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
6846 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
6848         * regrename.c (regrename_do_replace): If replacing the same
6849         reg multiple times, try to reuse last created gen_raw_REG.
6851         PR debug/81155
6852         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
6853         main to workaround a bug in GDB.
6855 2018-01-12  Tom de Vries  <tom@codesourcery.com>
6857         PR target/83737
6858         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
6860 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
6862         PR rtl-optimization/80481
6863         * ira-color.c (get_cap_member): New function.
6864         (allocnos_conflict_by_live_ranges_p): Use it.
6865         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
6866         (setup_slot_coalesced_allocno_live_ranges): Ditto.
6868 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
6870         PR target/83628
6871         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
6872         (*saddl_se_1): Ditto.
6873         (*ssubsi_1): Ditto.
6874         (*ssubl_se_1): Ditto.
6876 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
6878         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
6879         rather than wi::to_widest for DR_INITs.
6880         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
6881         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
6882         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
6883         INTEGER_CSTs.
6884         (vect_analyze_group_access_1): Note that here.
6886 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
6888         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
6889         polynomial type sizes.
6891 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
6893         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
6894         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
6895         (gimple_add_tmp_var): Likewise.
6897 2018-01-12  Martin Liska  <mliska@suse.cz>
6899         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
6900         (gimple_alloc_sizes): Likewise.
6901         (dump_gimple_statistics): Use PRIu64 in printf format.
6902         * gimple.h: Change uint64_t to int.
6904 2018-01-12  Martin Liska  <mliska@suse.cz>
6906         * tree-core.h: Use uint64_t instead of int.
6907         * tree.c (tree_node_counts): Likewise.
6908         (tree_node_sizes): Likewise.
6909         (dump_tree_statistics): Use PRIu64 in printf format.
6911 2018-01-12  Martin Liska  <mliska@suse.cz>
6913         * Makefile.in: As qsort_chk is implemented in vec.c, add
6914         vec.o to linkage of gencfn-macros.
6915         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
6916         passing the info to record_node_allocation_statistics.
6917         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
6918         and pass the info.
6919         * ggc-common.c (struct ggc_usage): Add operator== and use
6920         it in operator< and compare function.
6921         * mem-stats.h (struct mem_usage): Likewise.
6922         * vec.c (struct vec_usage): Remove operator< and compare
6923         function. Can be simply inherited.
6925 2018-01-12  Martin Jambor  <mjambor@suse.cz>
6927         PR target/81616
6928         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
6929         * tree-ssa-math-opts.c: Include domwalk.h.
6930         (convert_mult_to_fma_1): New function.
6931         (fma_transformation_info): New type.
6932         (fma_deferring_state): Likewise.
6933         (cancel_fma_deferring): New function.
6934         (result_of_phi): Likewise.
6935         (last_fma_candidate_feeds_initial_phi): Likewise.
6936         (convert_mult_to_fma): Added deferring logic, split actual
6937         transformation to convert_mult_to_fma_1.
6938         (math_opts_dom_walker): New type.
6939         (math_opts_dom_walker::after_dom_children): New method, body moved
6940         here from pass_optimize_widening_mul::execute, added deferring logic
6941         bits.
6942         (pass_optimize_widening_mul::execute): Moved most of code to
6943         math_opts_dom_walker::after_dom_children.
6944         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
6945         * config/i386/i386.c (ix86_option_override_internal): Added
6946         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
6948 2018-01-12  Richard Biener  <rguenther@suse.de>
6950         PR debug/83157
6951         * dwarf2out.c (gen_variable_die): Do not reset old_die for
6952         inline instance vars.
6954 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
6956         PR target/81819
6957         * config/rx/rx.c (rx_is_restricted_memory_address):
6958         Handle SUBREG case.
6960 2018-01-12  Richard Biener  <rguenther@suse.de>
6962         PR tree-optimization/80846
6963         * target.def (split_reduction): New target hook.
6964         * targhooks.c (default_split_reduction): New function.
6965         * targhooks.h (default_split_reduction): Declare.
6966         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
6967         target requests first reduce vectors by combining low and high
6968         parts.
6969         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
6970         (get_vectype_for_scalar_type_and_size): Export.
6971         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
6972         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
6973         * doc/tm.texi: Regenerate.
6974         * config/i386/i386.c (ix86_split_reduction): Implement
6975         TARGET_VECTORIZE_SPLIT_REDUCTION.
6977 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
6979         PR target/83368
6980         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
6981         in PIC mode except for TARGET_VXWORKS_RTP.
6982         * config/sparc/sparc.c: Include cfgrtl.h.
6983         (TARGET_INIT_PIC_REG): Define.
6984         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
6985         (sparc_pic_register_p): New predicate.
6986         (sparc_legitimate_address_p): Use it.
6987         (sparc_legitimize_pic_address): Likewise.
6988         (sparc_delegitimize_address): Likewise.
6989         (sparc_mode_dependent_address_p): Likewise.
6990         (gen_load_pcrel_sym): Remove 4th parameter.
6991         (load_got_register): Adjust call to above.  Remove obsolete stuff.
6992         (sparc_expand_prologue): Do not call load_got_register here.
6993         (sparc_flat_expand_prologue): Likewise.
6994         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
6995         (sparc_use_pseudo_pic_reg): New function.
6996         (sparc_init_pic_reg): Likewise.
6997         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
6998         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
7000 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
7002         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
7003         Add item for branch_cost.
7005 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
7007         PR rtl-optimization/83565
7008         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
7009         not extend the result to a larger mode for rotate operations.
7010         (num_sign_bit_copies1): Likewise.
7012 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7014         PR target/40411
7015         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
7016         -symbolic.
7017         Use values-Xc.o for -pedantic.
7018         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
7020 2018-01-12  Martin Liska  <mliska@suse.cz>
7022         PR ipa/83054
7023         * ipa-devirt.c (final_warning_record::grow_type_warnings):
7024         New function.
7025         (possible_polymorphic_call_targets): Use it.
7026         (ipa_devirt): Likewise.
7028 2018-01-12  Martin Liska  <mliska@suse.cz>
7030         * profile-count.h (enum profile_quality): Use 0 as invalid
7031         enum value of profile_quality.
7033 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
7035         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
7036         -mext-string options.
7038 2018-01-12  Richard Biener  <rguenther@suse.de>
7040         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
7041         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
7042         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
7043         Likewise.
7044         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
7046 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
7048         * configure.ac (--with-long-double-format): Add support for the
7049         configuration option to change the default long double format on
7050         PowerPC systems.
7051         * config.gcc (powerpc*-linux*-*): Likewise.
7052         * configure: Regenerate.
7053         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
7054         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
7055         used without modification.
7057 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7059         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
7060         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
7061         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
7062         MISC_BUILTIN_SPEC_BARRIER.
7063         (rs6000_init_builtins): Likewise.
7064         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
7065         enum value.
7066         (speculation_barrier): New define_insn.
7067         * doc/extend.texi: Document __builtin_speculation_barrier.
7069 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
7071         PR target/83203
7072         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
7073         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
7074         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
7075         iterators.
7076         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
7077         integral modes instead of "ss" and "sd".
7078         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
7079         vectors with 32-bit and 64-bit elements.
7080         (vecdupssescalarmodesuffix): New mode attribute.
7081         (vec_dup<mode>): Use it.
7083 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
7085         PR target/83330
7086         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
7087         frame if argument is passed on stack.
7089 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
7091         PR target/82682
7092         * ree.c (combine_reaching_defs): Optimize also
7093         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
7094         reg2=any_extend(exp); reg1=reg2;, formatting fix.
7096 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
7098         PR middle-end/83189
7099         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
7101 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
7103         PR middle-end/83718
7104         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
7105         after they are computed.
7107 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
7109         PR tree-optimization/83695
7110         * gimple-loop-linterchange.cc
7111         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
7112         reset cached scev information after interchange.
7113         (pass_linterchange::execute): Remove call to scev_reset_htab.
7115 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7117         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
7118         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
7119         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
7120         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
7121         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
7122         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
7123         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
7124         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
7125         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
7126         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
7127         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
7128         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
7129         (V_lane_reg): Likewise.
7130         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
7131         New define_expand.
7132         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
7133         (vfmal_lane_low<mode>_intrinsic,
7134         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
7135         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
7136         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
7137         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
7138         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
7139         vfmsl_lane_high<mode>_intrinsic): New define_insns.
7141 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7143         * config/arm/arm-cpus.in (fp16fml): New feature.
7144         (ALL_SIMD): Add fp16fml.
7145         (armv8.2-a): Add fp16fml as an option.
7146         (armv8.3-a): Likewise.
7147         (armv8.4-a): Add fp16fml as part of fp16.
7148         * config/arm/arm.h (TARGET_FP16FML): Define.
7149         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
7150         when appropriate.
7151         * config/arm/arm-modes.def (V2HF): Define.
7152         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
7153         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
7154         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
7155         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
7156         vfmsl_low, vfmsl_high): New set of builtins.
7157         * config/arm/iterators.md (PLUSMINUS): New code iterator.
7158         (vfml_op): New code attribute.
7159         (VFMLHALVES): New int iterator.
7160         (VFML, VFMLSEL): New mode attributes.
7161         (V_reg): Define mapping for V2HF.
7162         (V_hi, V_lo): New mode attributes.
7163         (VF_constraint): Likewise.
7164         (vfml_half, vfml_half_selector): New int attributes.
7165         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
7166         define_expand.
7167         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
7168         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
7169         New define_insn.
7170         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
7171         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
7172         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
7173         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
7174         documentation.
7175         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
7176         Document new effective target and option set.
7178 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7180         * config/arm/arm-cpus.in (armv8_4): New feature.
7181         (ARMv8_4a): New fgroup.
7182         (armv8.4-a): New arch.
7183         * config/arm/arm-tables.opt: Regenerate.
7184         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
7185         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
7186         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
7187         Add matching rules for -march=armv8.4-a and extensions.
7188         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
7190 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
7192         PR target/81821
7193         * config/rx/rx.md (BW): New mode attribute.
7194         (sync_lock_test_and_setsi): Add mode suffix to insn output.
7196 2018-01-11  Richard Biener  <rguenther@suse.de>
7198         PR tree-optimization/83435
7199         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
7200         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
7201         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
7203 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
7204             Alan Hayward  <alan.hayward@arm.com>
7205             David Sherwood  <david.sherwood@arm.com>
7207         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
7208         field.
7209         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
7210         (aarch64_print_address_internal): Use it to check for a zero offset.
7212 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
7213             Alan Hayward  <alan.hayward@arm.com>
7214             David Sherwood  <david.sherwood@arm.com>
7216         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
7217         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
7218         Return a poly_int64 rather than a HOST_WIDE_INT.
7219         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
7220         rather than a HOST_WIDE_INT.
7221         * config/aarch64/aarch64.h (aarch64_frame): Protect with
7222         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
7223         hard_fp_offset, frame_size, initial_adjust, callee_offset and
7224         final_offset from HOST_WIDE_INT to poly_int64.
7225         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
7226         to_constant when getting the number of units in an Advanced SIMD
7227         mode.
7228         (aarch64_builtin_vectorized_function): Check for a constant number
7229         of units.
7230         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
7231         GET_MODE_SIZE.
7232         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
7233         attribute instead of GET_MODE_NUNITS.
7234         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
7235         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
7236         GET_MODE_SIZE for fixed-size registers.
7237         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
7238         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
7239         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
7240         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
7241         (aarch64_print_operand, aarch64_print_address_internal)
7242         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
7243         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
7244         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
7245         Handle polynomial GET_MODE_SIZE.
7246         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
7247         wider than SImode without modification.
7248         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
7249         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
7250         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
7251         passing and returning SVE modes.
7252         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
7253         rather than GEN_INT.
7254         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
7255         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
7256         (aarch64_allocate_and_probe_stack_space): Likewise.
7257         (aarch64_layout_frame): Cope with polynomial offsets.
7258         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
7259         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
7260         polynomial offsets.
7261         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
7262         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
7263         poly_int64 rather than a HOST_WIDE_INT.
7264         (aarch64_get_separate_components, aarch64_process_components)
7265         (aarch64_expand_prologue, aarch64_expand_epilogue)
7266         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
7267         (aarch64_anchor_offset): New function, split out from...
7268         (aarch64_legitimize_address): ...here.
7269         (aarch64_builtin_vectorization_cost): Handle polynomial
7270         TYPE_VECTOR_SUBPARTS.
7271         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
7272         GET_MODE_NUNITS.
7273         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
7274         number of elements from the PARALLEL rather than the mode.
7275         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
7276         rather than GET_MODE_BITSIZE.
7277         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
7278         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
7279         (aarch64_expand_vec_perm_const_1): Handle polynomial
7280         d->perm.length () and d->perm elements.
7281         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
7282         Apply to_constant to d->perm elements.
7283         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
7284         polynomial CONST_VECTOR_NUNITS.
7285         (aarch64_move_pointer): Take amount as a poly_int64 rather
7286         than an int.
7287         (aarch64_progress_pointer): Avoid temporary variable.
7288         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
7289         the mode attribute instead of GET_MODE.
7291 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
7292             Alan Hayward  <alan.hayward@arm.com>
7293             David Sherwood  <david.sherwood@arm.com>
7295         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
7296         x exists before using it.
7297         (aarch64_add_constant_internal): Rename to...
7298         (aarch64_add_offset_1): ...this.  Replace regnum with separate
7299         src and dest rtxes.  Handle the case in which they're different,
7300         including when the offset is zero.  Replace scratchreg with an rtx.
7301         Use 2 additions if there is no spare register into which we can
7302         move a 16-bit constant.
7303         (aarch64_add_constant): Delete.
7304         (aarch64_add_offset): Replace reg with separate src and dest
7305         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
7306         Use aarch64_add_offset_1.
7307         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
7308         an rtx rather than an int.  Take the delta as a poly_int64
7309         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
7310         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
7311         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
7312         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
7313         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
7314         and aarch64_add_sp.
7315         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
7316         aarch64_add_constant.
7318 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
7320         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
7321         Use scalar_float_mode.
7323 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
7325         * config/aarch64/aarch64-simd.md
7326         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
7327         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
7328         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
7329         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
7330         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
7331         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
7332         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
7333         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
7334         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
7335         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
7337 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7339         PR target/83514
7340         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
7341         targ_options->x_arm_arch_string is non NULL.
7343 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
7345         * config/aarch64/aarch64.h
7346         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
7348 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
7350         PR target/82096
7351         * expmed.c (emit_store_flag_force): Swap if const op0
7352         and change VOIDmode to mode of op0.
7354 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
7356         PR rtl-optimization/83761
7357         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
7358         than bytes to mode_for_size.
7360 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
7362         PR middle-end/83189
7363         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
7364         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
7365         profile.
7367 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
7369         PR middle-end/83575
7370         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
7371         when in layout mode.
7372         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
7373         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
7374         partition fixup.
7376 2018-01-10  Michael Collison  <michael.collison@arm.com>
7378         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
7379         * config/aarch64/aarch64-option-extension.def: Add
7380         AARCH64_OPT_EXTENSION of 'fp16fml'.
7381         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
7382         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
7383         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
7384         * config/aarch64/constraints.md (Ui7): New constraint.
7385         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
7386         (VFMLA_SEL_W): Ditto.
7387         (f16quad): Ditto.
7388         (f16mac1): Ditto.
7389         (VFMLA16_LOW): New int iterator.
7390         (VFMLA16_HIGH): Ditto.
7391         (UNSPEC_FMLAL): New unspec.
7392         (UNSPEC_FMLSL): Ditto.
7393         (UNSPEC_FMLAL2): Ditto.
7394         (UNSPEC_FMLSL2): Ditto.
7395         (f16mac): New code attribute.
7396         * config/aarch64/aarch64-simd-builtins.def
7397         (aarch64_fmlal_lowv2sf): Ditto.
7398         (aarch64_fmlsl_lowv2sf): Ditto.
7399         (aarch64_fmlalq_lowv4sf): Ditto.
7400         (aarch64_fmlslq_lowv4sf): Ditto.
7401         (aarch64_fmlal_highv2sf): Ditto.
7402         (aarch64_fmlsl_highv2sf): Ditto.
7403         (aarch64_fmlalq_highv4sf): Ditto.
7404         (aarch64_fmlslq_highv4sf): Ditto.
7405         (aarch64_fmlal_lane_lowv2sf): Ditto.
7406         (aarch64_fmlsl_lane_lowv2sf): Ditto.
7407         (aarch64_fmlal_laneq_lowv2sf): Ditto.
7408         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
7409         (aarch64_fmlalq_lane_lowv4sf): Ditto.
7410         (aarch64_fmlsl_lane_lowv4sf): Ditto.
7411         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
7412         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
7413         (aarch64_fmlal_lane_highv2sf): Ditto.
7414         (aarch64_fmlsl_lane_highv2sf): Ditto.
7415         (aarch64_fmlal_laneq_highv2sf): Ditto.
7416         (aarch64_fmlsl_laneq_highv2sf): Ditto.
7417         (aarch64_fmlalq_lane_highv4sf): Ditto.
7418         (aarch64_fmlsl_lane_highv4sf): Ditto.
7419         (aarch64_fmlalq_laneq_highv4sf): Ditto.
7420         (aarch64_fmlsl_laneq_highv4sf): Ditto.
7421         * config/aarch64/aarch64-simd.md:
7422         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
7423         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
7424         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
7425         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
7426         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
7427         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
7428         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
7429         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
7430         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
7431         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
7432         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
7433         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
7434         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
7435         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
7436         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
7437         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
7438         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
7439         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
7440         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
7441         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
7442         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
7443         (vfmlsl_low_u32): Ditto.
7444         (vfmlalq_low_u32): Ditto.
7445         (vfmlslq_low_u32): Ditto.
7446         (vfmlal_high_u32): Ditto.
7447         (vfmlsl_high_u32): Ditto.
7448         (vfmlalq_high_u32): Ditto.
7449         (vfmlslq_high_u32): Ditto.
7450         (vfmlal_lane_low_u32): Ditto.
7451         (vfmlsl_lane_low_u32): Ditto.
7452         (vfmlal_laneq_low_u32): Ditto.
7453         (vfmlsl_laneq_low_u32): Ditto.
7454         (vfmlalq_lane_low_u32): Ditto.
7455         (vfmlslq_lane_low_u32): Ditto.
7456         (vfmlalq_laneq_low_u32): Ditto.
7457         (vfmlslq_laneq_low_u32): Ditto.
7458         (vfmlal_lane_high_u32): Ditto.
7459         (vfmlsl_lane_high_u32): Ditto.
7460         (vfmlal_laneq_high_u32): Ditto.
7461         (vfmlsl_laneq_high_u32): Ditto.
7462         (vfmlalq_lane_high_u32): Ditto.
7463         (vfmlslq_lane_high_u32): Ditto.
7464         (vfmlalq_laneq_high_u32): Ditto.
7465         (vfmlslq_laneq_high_u32): Ditto.
7466         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
7467         (AARCH64_FL_FOR_ARCH8_4): New.
7468         (AARCH64_ISA_F16FML): New ISA flag.
7469         (TARGET_F16FML): New feature flag for fp16fml.
7470         (doc/invoke.texi): Document new fp16fml option.
7472 2018-01-10  Michael Collison  <michael.collison@arm.com>
7474         * config/aarch64/aarch64-builtins.c:
7475         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
7476         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
7477         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
7478         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
7479         (AARCH64_ISA_SHA3): New ISA flag.
7480         (TARGET_SHA3): New feature flag for sha3.
7481         * config/aarch64/iterators.md (sha512_op): New int attribute.
7482         (CRYPTO_SHA512): New int iterator.
7483         (UNSPEC_SHA512H): New unspec.
7484         (UNSPEC_SHA512H2): Ditto.
7485         (UNSPEC_SHA512SU0): Ditto.
7486         (UNSPEC_SHA512SU1): Ditto.
7487         * config/aarch64/aarch64-simd-builtins.def
7488         (aarch64_crypto_sha512hqv2di): New builtin.
7489         (aarch64_crypto_sha512h2qv2di): Ditto.
7490         (aarch64_crypto_sha512su0qv2di): Ditto.
7491         (aarch64_crypto_sha512su1qv2di): Ditto.
7492         (aarch64_eor3qv8hi): Ditto.
7493         (aarch64_rax1qv2di): Ditto.
7494         (aarch64_xarqv2di): Ditto.
7495         (aarch64_bcaxqv8hi): Ditto.
7496         * config/aarch64/aarch64-simd.md:
7497         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
7498         (aarch64_crypto_sha512su0qv2di): Ditto.
7499         (aarch64_crypto_sha512su1qv2di): Ditto.
7500         (aarch64_eor3qv8hi): Ditto.
7501         (aarch64_rax1qv2di): Ditto.
7502         (aarch64_xarqv2di): Ditto.
7503         (aarch64_bcaxqv8hi): Ditto.
7504         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
7505         (vsha512h2q_u64): Ditto.
7506         (vsha512su0q_u64): Ditto.
7507         (vsha512su1q_u64): Ditto.
7508         (veor3q_u16): Ditto.
7509         (vrax1q_u64): Ditto.
7510         (vxarq_u64): Ditto.
7511         (vbcaxq_u16): Ditto.
7512         * config/arm/types.md (crypto_sha512): New type attribute.
7513         (crypto_sha3): Ditto.
7514         (doc/invoke.texi): Document new sha3 option.
7516 2018-01-10  Michael Collison  <michael.collison@arm.com>
7518         * config/aarch64/aarch64-builtins.c:
7519         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
7520         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
7521         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
7522         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
7523         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
7524         (AARCH64_ISA_SM4): New ISA flag.
7525         (TARGET_SM4): New feature flag for sm4.
7526         * config/aarch64/aarch64-simd-builtins.def
7527         (aarch64_sm3ss1qv4si): Ditto.
7528         (aarch64_sm3tt1aq4si): Ditto.
7529         (aarch64_sm3tt1bq4si): Ditto.
7530         (aarch64_sm3tt2aq4si): Ditto.
7531         (aarch64_sm3tt2bq4si): Ditto.
7532         (aarch64_sm3partw1qv4si): Ditto.
7533         (aarch64_sm3partw2qv4si): Ditto.
7534         (aarch64_sm4eqv4si): Ditto.
7535         (aarch64_sm4ekeyqv4si): Ditto.
7536         * config/aarch64/aarch64-simd.md:
7537         (aarch64_sm3ss1qv4si): Ditto.
7538         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
7539         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
7540         (aarch64_sm4eqv4si): Ditto.
7541         (aarch64_sm4ekeyqv4si): Ditto.
7542         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
7543         (sm3part_op): Ditto.
7544         (CRYPTO_SM3TT): Ditto.
7545         (CRYPTO_SM3PART): Ditto.
7546         (UNSPEC_SM3SS1): New unspec.
7547         (UNSPEC_SM3TT1A): Ditto.
7548         (UNSPEC_SM3TT1B): Ditto.
7549         (UNSPEC_SM3TT2A): Ditto.
7550         (UNSPEC_SM3TT2B): Ditto.
7551         (UNSPEC_SM3PARTW1): Ditto.
7552         (UNSPEC_SM3PARTW2): Ditto.
7553         (UNSPEC_SM4E): Ditto.
7554         (UNSPEC_SM4EKEY): Ditto.
7555         * config/aarch64/constraints.md (Ui2): New constraint.
7556         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
7557         * config/arm/types.md (crypto_sm3): New type attribute.
7558         (crypto_sm4): Ditto.
7559         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
7560         (vsm3tt1aq_u32): Ditto.
7561         (vsm3tt1bq_u32): Ditto.
7562         (vsm3tt2aq_u32): Ditto.
7563         (vsm3tt2bq_u32): Ditto.
7564         (vsm3partw1q_u32): Ditto.
7565         (vsm3partw2q_u32): Ditto.
7566         (vsm4eq_u32): Ditto.
7567         (vsm4ekeyq_u32): Ditto.
7568         (doc/invoke.texi): Document new sm4 option.
7570 2018-01-10  Michael Collison  <michael.collison@arm.com>
7572         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
7573         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
7574         (AARCH64_FL_FOR_ARCH8_4): New.
7575         (AARCH64_FL_V8_4): New flag.
7576         (doc/invoke.texi): Document new armv8.4-a option.
7578 2018-01-10  Michael Collison  <michael.collison@arm.com>
7580         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
7581         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
7582         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
7583         * config/aarch64/aarch64-option-extension.def: Add
7584         AARCH64_OPT_EXTENSION of 'sha2'.
7585         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
7586         (crypto): Disable sha2 and aes if crypto disabled.
7587         (crypto): Enable aes and sha2 if enabled.
7588         (simd): Disable sha2 and aes if simd disabled.
7589         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
7590         New flags.
7591         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
7592         (TARGET_SHA2): New feature flag for sha2.
7593         (TARGET_AES): New feature flag for aes.
7594         * config/aarch64/aarch64-simd.md:
7595         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
7596         conditional on TARGET_AES.
7597         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
7598         (aarch64_crypto_sha1hsi): Make pattern conditional
7599         on TARGET_SHA2.
7600         (aarch64_crypto_sha1hv4si): Ditto.
7601         (aarch64_be_crypto_sha1hv4si): Ditto.
7602         (aarch64_crypto_sha1su1v4si): Ditto.
7603         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
7604         (aarch64_crypto_sha1su0v4si): Ditto.
7605         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
7606         (aarch64_crypto_sha256su0v4si): Ditto.
7607         (aarch64_crypto_sha256su1v4si): Ditto.
7608         (doc/invoke.texi): Document new aes and sha2 options.
7610 2018-01-10  Martin Sebor  <msebor@redhat.com>
7612         PR tree-optimization/83781
7613         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
7614         as string arrays.
7616 2018-01-11  Martin Sebor  <msebor@gmail.com>
7617             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7619         PR tree-optimization/83501
7620         PR tree-optimization/81703
7622         * tree-ssa-strlen.c (get_string_cst): Rename...
7623         (get_string_len): ...to this.  Handle global constants.
7624         (handle_char_store): Adjust.
7626 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
7627             Jim Wilson  <jimw@sifive.com>
7629         * config/riscv/riscv-protos.h (riscv_output_return): New.
7630         * config/riscv/riscv.c (struct machine_function): New naked_p field.
7631         (riscv_attribute_table, riscv_output_return),
7632         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
7633         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
7634         (riscv_compute_frame_info): Only compute frame->mask if not a naked
7635         function.
7636         (riscv_expand_prologue): Add early return for naked function.
7637         (riscv_expand_epilogue): Likewise.
7638         (riscv_function_ok_for_sibcall): Return false for naked function.
7639         (riscv_set_current_function): New.
7640         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
7641         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
7642         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
7643         * doc/extend.texi (RISC-V Function Attributes): New.
7645 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
7647         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
7648         check for 128-bit long double before checking TCmode.
7649         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
7650         128-bit long doubles before checking TFmode or TCmode.
7651         (FLOAT128_IBM_P): Likewise.
7653 2018-01-10  Martin Sebor  <msebor@redhat.com>
7655         PR tree-optimization/83671
7656         * builtins.c (c_strlen): Unconditionally return zero for the empty
7657         string.
7658         Use -Warray-bounds for warnings.
7659         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
7660         for non-constant array indices with COMPONENT_REF, arrays of
7661         arrays, and pointers to arrays.
7662         (gimple_fold_builtin_strlen): Determine and set length range for
7663         non-constant character arrays.
7665 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
7667         PR middle-end/81897
7668         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
7669         empty blocks.
7671 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
7673         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
7675 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
7677         PR target/83399
7678         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
7679         VECTOR_MEM_ALTIVEC_OR_VSX_P.
7680         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
7681         indexed_or_indirect_operand predicate.
7682         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
7683         (*vsx_le_perm_load_v8hi): Likewise.
7684         (*vsx_le_perm_load_v16qi): Likewise.
7685         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
7686         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
7687         (*vsx_le_perm_store_v8hi): Likewise.
7688         (*vsx_le_perm_store_v16qi): Likewise.
7689         (eight unnamed splitters): Likewise.
7691 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
7693         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
7694         * config/rs6000/emmintrin.h: Likewise.
7695         * config/rs6000/mmintrin.h: Likewise.
7696         * config/rs6000/xmmintrin.h: Likewise.
7698 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
7700         PR c++/43486
7701         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
7702         "public_flag".
7703         * tree.c (tree_nop_conversion): Return true for location wrapper
7704         nodes.
7705         (maybe_wrap_with_location): New function.
7706         (selftest::check_strip_nops): New function.
7707         (selftest::test_location_wrappers): New function.
7708         (selftest::tree_c_tests): Call it.
7709         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
7710         (maybe_wrap_with_location): New decl.
7711         (EXPR_LOCATION_WRAPPER_P): New macro.
7712         (location_wrapper_p): New inline function.
7713         (tree_strip_any_location_wrapper): New inline function.
7715 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
7717         PR target/83735
7718         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
7719         stack_realign_offset for the largest alignment of stack slot
7720         actually used.
7721         (ix86_find_max_used_stack_alignment): New function.
7722         (ix86_finalize_stack_frame_flags): Use it.  Set
7723         max_used_stack_alignment if we don't realign stack.
7724         * config/i386/i386.h (machine_function): Add
7725         max_used_stack_alignment.
7727 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
7729         * config/arm/arm.opt (-mbranch-cost): New option.
7730         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
7731         account.
7733 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
7735         PR target/83629
7736         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
7737         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
7739 2018-01-10  Richard Biener  <rguenther@suse.de>
7741         PR debug/83765
7742         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
7743         early out so it also covers the case where we have a non-NULL
7744         origin.
7746 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
7748         PR tree-optimization/83753
7749         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
7750         for non-strided grouped accesses if the number of elements is 1.
7752 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
7754         PR target/81616
7755         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
7756         * i386.h (TARGET_USE_GATHER): Define.
7757         * x86-tune.def (X86_TUNE_USE_GATHER): New.
7759 2018-01-10  Martin Liska  <mliska@suse.cz>
7761         PR bootstrap/82831
7762         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
7763         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
7764         partitioning.
7765         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
7766         CLEANUP_NO_PARTITIONING is not set.
7768 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
7770         * doc/rtl.texi: Remove documentation of (const ...) wrappers
7771         for vectors, as a partial revert of r254296.
7772         * rtl.h (const_vec_p): Delete.
7773         (const_vec_duplicate_p): Don't test for vector CONSTs.
7774         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
7775         * expmed.c (make_tree): Likewise.
7777         Revert:
7778         * common.md (E, F): Use CONSTANT_P instead of checking for
7779         CONST_VECTOR.
7780         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
7781         checking for CONST_VECTOR.
7783 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
7785         PR middle-end/83575
7786         * predict.c (force_edge_cold): Handle in more sane way edges
7787         with no prediction.
7789 2018-01-09  Carl Love  <cel@us.ibm.com>
7791         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
7792         V4SI, V4SF types.
7793         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
7794         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
7795         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
7796         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
7797         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
7798         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
7799         * config/rs6000/rs6000-protos.h: Add extern defition for
7800         rs6000_generate_float2_double_code.
7801         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
7802         function.
7803         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
7804         (float2_v2df): Add define_expand.
7806 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
7808         PR target/83628
7809         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
7810         op_mode in the force_to_mode call.
7812 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
7814         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
7815         instead of checking each element individually.
7816         (aarch64_evpc_uzp): Likewise.
7817         (aarch64_evpc_zip): Likewise.
7818         (aarch64_evpc_ext): Likewise.
7819         (aarch64_evpc_rev): Likewise.
7820         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
7821         instead of checking each element individually.  Return true without
7822         generating rtl if
7823         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
7824         whether all selected elements come from the same input, instead of
7825         checking each element individually.  Remove calls to gen_rtx_REG,
7826         start_sequence and end_sequence and instead assert that no rtl is
7827         generated.
7829 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
7831         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
7832         order of HIGH and CONST checks.
7834 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
7836         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
7837         if the destination isn't an SSA_NAME.
7839 2018-01-09  Richard Biener  <rguenther@suse.de>
7841         PR tree-optimization/83668
7842         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
7843         move prologue...
7844         (canonicalize_loop_form): ... here, renamed from ...
7845         (canonicalize_loop_closed_ssa_form): ... this and amended to
7846         swap successor edges for loop exit blocks to make us use
7847         the RPO order we need for initial schedule generation.
7849 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
7851         PR tree-optimization/64811
7852         * match.pd: When optimizing comparisons with Inf, avoid
7853         introducing or losing exceptions from comparisons with NaN.
7855 2018-01-09  Martin Liska  <mliska@suse.cz>
7857         PR sanitizer/82517
7858         * asan.c (shadow_mem_size): Add gcc_assert.
7860 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
7862         Don't save registers in main().
7864         PR target/83738
7865         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
7866         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
7867         * config/avr/avr.c (avr_set_current_function): Don't error if
7868         naked, OS_task or OS_main are specified at the same time.
7869         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
7870         OS_main.
7871         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
7872         attribute.
7873         * common/config/avr/avr-common.c (avr_option_optimization_table):
7874         Switch on -mmain-is-OS_task for optimizing compilations.
7876 2018-01-09  Richard Biener  <rguenther@suse.de>
7878         PR tree-optimization/83572
7879         * graphite.c: Include cfganal.h.
7880         (graphite_transform_loops): Connect infinite loops to exit
7881         and remove fake edges at the end.
7883 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
7885         * ipa-inline.c (edge_badness): Revert accidental checkin.
7887 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
7889         PR ipa/80763
7890         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
7891         symbols; not inline clones.
7893 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
7895         PR target/83507
7896         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
7897         hard registers.  Formatting fixes.
7899         PR preprocessor/83722
7900         * gcc.c (try_generate_repro): Pass
7901         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
7902         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
7903         do_report_bug.
7905 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
7906             Kito Cheng  <kito.cheng@gmail.com>
7908         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
7909         (riscv_leaf_function_p): Delete.
7910         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
7912 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
7914         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
7915         function.
7916         (do_ifelse): New function.
7917         (do_isel): New function.
7918         (do_sub3): New function.
7919         (do_add3): New function.
7920         (do_load_mask_compare): New function.
7921         (do_overlap_load_compare): New function.
7922         (expand_compare_loop): New function.
7923         (expand_block_compare): Call expand_compare_loop() when appropriate.
7924         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
7925         option description.
7926         (-mblock-compare-inline-loop-limit): New option.
7928 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7930         PR target/83677
7931         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
7932         Reverse order of second and third operands in first alternative.
7933         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
7934         of first and second elements in UNSPEC_VPERMR vector.
7935         (altivec_expand_vec_perm_le): Likewise.
7937 2018-01-08  Jeff Law  <law@redhat.com>
7939         PR rtl-optimizatin/81308
7940         * tree-switch-conversion.c (cfg_altered): New file scoped static.
7941         (process_switch): If group_case_labels makes a change, then set
7942         cfg_altered.
7943         (pass_convert_switch::execute): If a switch is converted, then
7944         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
7946         PR rtl-optimization/81308
7947         * recog.c (split_all_insns): Conditionally cleanup the CFG after
7948         splitting insns.
7950 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
7952         PR target/83663 - Revert r255946
7953         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
7954         generation for cases where splatting a value is not useful.
7955         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
7956         across a vec_duplicate and a paradoxical subreg forming a vector
7957         mode to a vec_concat.
7959 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7961         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
7962         -march=armv8.3-a variants.
7963         * config/arm/t-multilib: Likewise.
7964         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
7966 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
7968         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
7969         to generate rtl.
7970         (cceq_ior_compare_complement): Give it a name so I can use it, and
7971         change boolean_or_operator predicate to boolean_operator so it can
7972         be used to generate a crand.
7973         (eqne): New code iterator.
7974         (bd/bd_neg): New code_attrs.
7975         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
7976         a single define_insn.
7977         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
7978         decrement (bdnzt/bdnzf/bdzt/bdzf).
7979         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
7980         with the new names of the branch decrement patterns, and added the
7981         names of the branch decrement conditional patterns.
7983 2018-01-08  Richard Biener  <rguenther@suse.de>
7985         PR tree-optimization/83563
7986         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
7987         cache.
7989 2018-01-08  Richard Biener  <rguenther@suse.de>
7991         PR middle-end/83713
7992         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
7994 2018-01-08  Richard Biener  <rguenther@suse.de>
7996         PR tree-optimization/83685
7997         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
7998         references to abnormals.
8000 2018-01-08  Richard Biener  <rguenther@suse.de>
8002         PR lto/83719
8003         * dwarf2out.c (output_indirect_strings): Handle empty
8004         skeleton_debug_str_hash.
8005         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
8007 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
8009         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
8010         (emit_store_direct): Likewise.
8011         (arc_trampoline_adjust_address): Likewise.
8012         (arc_asm_trampoline_template): New function.
8013         (arc_initialize_trampoline): Use asm_trampoline_template.
8014         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
8015         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
8016         * config/arc/arc.md (flush_icache): Delete pattern.
8018 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
8020         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
8021         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
8022         munaligned-access.
8024 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8026         PR target/83681
8027         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
8028         by not USED_FOR_TARGET.
8029         (make_pass_resolve_sw_modes): Likewise.
8031 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8033         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
8034         USED_FOR_TARGET.
8036 2018-01-08  Richard Biener  <rguenther@suse.de>
8038         PR middle-end/83580
8039         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
8041 2018-01-08  Richard Biener  <rguenther@suse.de>
8043         PR middle-end/83517
8044         * match.pd ((t * 2) / 2) -> t): Add missing :c.
8046 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
8048         PR middle-end/81897
8049         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
8050         basic blocks with a small number of successors.
8051         (convert_control_dep_chain_into_preds): Improve handling of
8052         forwarder blocks.
8053         (dump_predicates): Split apart into...
8054         (dump_pred_chain): ...here...
8055         (dump_pred_info): ...and here.
8056         (can_one_predicate_be_invalidated_p): Add debugging printfs.
8057         (can_chain_union_be_invalidated_p): Improve check for invalidation
8058         of paths.
8059         (uninit_uses_cannot_happen): Avoid unnecessary if
8060         convert_control_dep_chain_into_preds yielded nothing.
8062 2018-01-06  Martin Sebor  <msebor@redhat.com>
8064         PR tree-optimization/83640
8065         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
8066         subtracting negative offset from size.
8067         (builtin_access::overlap): Adjust offset bounds of the access to fall
8068         within the size of the object if possible.
8070 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
8072         PR rtl-optimization/83699
8073         * expmed.c (extract_bit_field_1): Restrict the vector usage of
8074         extract_bit_field_as_subreg to cases in which the extracted
8075         value is also a vector.
8077         * lra-constraints.c (process_alt_operands): Test for the equivalence
8078         substitutions when detecting a possible reload cycle.
8080 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
8082         PR debug/83480
8083         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
8084         by default if flag_selective_schedling{,2}.  Formatting fixes.
8086         PR rtl-optimization/83682
8087         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
8088         if it has non-VECTOR_MODE element mode.
8089         (vec_duplicate_p): Likewise.
8091         PR middle-end/83694
8092         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
8093         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
8095 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
8097         PR target/83604
8098         * config/i386/i386-builtin.def
8099         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
8100         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
8101         Require also OPTION_MASK_ISA_AVX512F in addition to
8102         OPTION_MASK_ISA_GFNI.
8103         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
8104         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
8105         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
8106         to OPTION_MASK_ISA_GFNI.
8107         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
8108         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
8109         OPTION_MASK_ISA_AVX512BW.
8110         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
8111         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
8112         addition to OPTION_MASK_ISA_GFNI.
8113         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
8114         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
8115         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
8116         to OPTION_MASK_ISA_GFNI.
8117         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
8118         a requirement for all ISAs rather than any of them with a few
8119         exceptions.
8120         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
8121         processing.
8122         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
8123         bitmasks to be enabled with 3 exceptions, instead of requiring any
8124         enabled ISA with lots of exceptions.
8125         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
8126         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
8127         Change avx512bw in isa attribute to avx512f.
8128         * config/i386/sgxintrin.h: Add license boilerplate.
8129         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
8130         to __AVX512F__ and __AVX512VL to __AVX512VL__.
8131         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
8132         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
8133         defined.
8134         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
8135         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
8136         temporarily sse2 rather than sse if not enabled already.
8138         PR target/83604
8139         * config/i386/sse.md (VI248_VLBW): Rename to ...
8140         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
8141         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
8142         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
8143         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
8144         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
8145         mode iterator instead of VI248_VLBW.
8147 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
8149         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
8150         (record_modified): Skip clobbers; add debug output.
8151         (param_change_prob): Use sreal frequencies.
8153 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
8155         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
8156         punt for user-aligned variables.
8158 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
8160         * tree-chrec.c (chrec_contains_symbols): Return true for
8161         POLY_INT_CST.
8163 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
8165         PR target/82439
8166         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
8167         of (x|y) == x for BICS pattern.
8169 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
8171         PR tree-optimization/83605
8172         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
8173         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
8174         can throw.
8176 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8178         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
8179         * config/epiphany/rtems.h: New file.
8181 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
8182             Uros Bizjak  <ubizjak@gmail.com>
8184         PR target/83554
8185         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
8186         QIreg_operand instead of register_operand predicate.
8187         * config/i386/i386.c (ix86_rop_should_change_byte_p,
8188         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
8189         comments instead of -fmitigate[-_]rop.
8191 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8193         PR bootstrap/81926
8194         * cgraphunit.c (symbol_table::compile): Switch to text_section
8195         before calling assembly_start debug hook.
8196         * run-rtl-passes.c (run_rtl_passes): Likewise.
8197         Include output.h.
8199 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
8201         * tree-vrp.c (extract_range_from_binary_expr_1): Check
8202         range_int_cst_p rather than !symbolic_range_p before calling
8203         extract_range_from_multiplicative_op_1.
8205 2018-01-04  Jeff Law  <law@redhat.com>
8207         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
8208         redundant test in assertion.
8210 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
8212         * doc/rtl.texi: Document machine_mode wrapper classes.
8214 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
8216         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
8217         using tree_to_uhwi.
8219 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
8221         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
8222         the VEC_PERM_EXPR fold to fail.
8224 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
8226         PR debug/83585
8227         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
8228         to switched_sections.
8230 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
8232         PR target/83680
8233         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
8234         test for d.testing.
8236 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
8238         PR target/83387
8239         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
8240         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
8242 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
8244         PR debug/83666
8245         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
8246         is BLKmode and bitpos not zero or mode change is needed.
8248 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
8250         PR target/83675
8251         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
8252         TARGET_VIS2.
8254 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
8256         PR target/83628
8257         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
8258         instead of MULT rtx.  Update all corresponding splitters.
8259         (*saddl_se): Ditto.
8260         (*ssub<modesuffix>): Ditto.
8261         (*ssubl_se): Ditto.
8262         (*cmp_sadd_di): Update split patterns.
8263         (*cmp_sadd_si): Ditto.
8264         (*cmp_sadd_sidi): Ditto.
8265         (*cmp_ssub_di): Ditto.
8266         (*cmp_ssub_si): Ditto.
8267         (*cmp_ssub_sidi): Ditto.
8268         * config/alpha/predicates.md (const23_operand): New predicate.
8269         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
8270         Look for ASHIFT, not MULT inner operand.
8271         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
8273 2018-01-04  Martin Liska  <mliska@suse.cz>
8275         PR gcov-profile/83669
8276         * gcov.c (output_intermediate_file): Add version to intermediate
8277         gcov file.
8278         * doc/gcov.texi: Document new field 'version' in intermediate
8279         file format. Fix location of '-k' option of gcov command.
8281 2018-01-04  Martin Liska  <mliska@suse.cz>
8283         PR ipa/82352
8284         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
8286 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
8288         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
8290 2018-01-03  Martin Sebor  <msebor@redhat.com>
8292         PR tree-optimization/83655
8293         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
8294         checking calls with invalid arguments.
8296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8298         * tree-vect-stmts.c (vect_get_store_rhs): New function.
8299         (vectorizable_mask_load_store): Delete.
8300         (vectorizable_call): Return false for masked loads and stores.
8301         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
8302         instead of gimple_assign_rhs1.
8303         (vectorizable_load): Handle IFN_MASK_LOAD.
8304         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
8306 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8308         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
8309         split out from..,
8310         (vectorizable_mask_load_store): ...here.
8311         (vectorizable_load): ...and here.
8313 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8315         * tree-vect-stmts.c (vect_build_all_ones_mask)
8316         (vect_build_zero_merge_argument): New functions, split out from...
8317         (vectorizable_load): ...here.
8319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8321         * tree-vect-stmts.c (vect_check_store_rhs): New function,
8322         split out from...
8323         (vectorizable_mask_load_store): ...here.
8324         (vectorizable_store): ...and here.
8326 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8328         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
8329         split out from...
8330         (vectorizable_mask_load_store): ...here.
8332 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8334         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
8335         (vect_model_store_cost): Take a vec_load_store_type instead of a
8336         vect_def_type.
8337         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
8338         (vect_model_store_cost): Take a vec_load_store_type instead of a
8339         vect_def_type.
8340         (vectorizable_mask_load_store): Update accordingly.
8341         (vectorizable_store): Likewise.
8342         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
8344 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8346         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
8347         IFN_MASK_LOAD calls here rather than...
8348         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
8350 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8351             Alan Hayward  <alan.hayward@arm.com>
8352             David Sherwood  <david.sherwood@arm.com>
8354         * expmed.c (extract_bit_field_1): For vector extracts,
8355         fall back to extract_bit_field_as_subreg if vec_extract
8356         isn't available.
8358 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8359             Alan Hayward  <alan.hayward@arm.com>
8360             David Sherwood  <david.sherwood@arm.com>
8362         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
8363         they are variable or constant sized.
8364         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
8365         slots for constant-sized data.
8367 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8368             Alan Hayward  <alan.hayward@arm.com>
8369             David Sherwood  <david.sherwood@arm.com>
8371         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
8372         handling COND_EXPRs with boolean comparisons, try to find a better
8373         basis for the mask type than the boolean itself.
8375 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8377         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
8378         is calculated and how it can be overridden.
8379         * genmodes.c (max_bitsize_mode_any_mode): New variable.
8380         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
8381         if defined.
8382         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
8383         if nonzero.
8385 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8386             Alan Hayward  <alan.hayward@arm.com>
8387             David Sherwood  <david.sherwood@arm.com>
8389         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
8390         Remove the mode argument.
8391         (aarch64_simd_valid_immediate): Remove the mode and inverse
8392         arguments.
8393         * config/aarch64/iterators.md (bitsize): New iterator.
8394         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
8395         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
8396         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
8397         aarch64_simd_valid_immediate.
8398         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
8399         (aarch64_reg_or_bic_imm): Likewise.
8400         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
8401         with an insn_type enum and msl with a modifier_type enum.
8402         Replace element_width with a scalar_mode.  Change the shift
8403         to unsigned int.  Add constructors for scalar_float_mode and
8404         scalar_int_mode elements.
8405         (aarch64_vect_float_const_representable_p): Delete.
8406         (aarch64_can_const_movi_rtx_p)
8407         (aarch64_simd_scalar_immediate_valid_for_move)
8408         (aarch64_simd_make_constant): Update call to
8409         aarch64_simd_valid_immediate.
8410         (aarch64_advsimd_valid_immediate_hs): New function.
8411         (aarch64_advsimd_valid_immediate): Likewise.
8412         (aarch64_simd_valid_immediate): Remove mode and inverse
8413         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
8414         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
8415         and aarch64_float_const_representable_p on the result.
8416         (aarch64_output_simd_mov_immediate): Remove mode argument.
8417         Update call to aarch64_simd_valid_immediate and use of
8418         simd_immediate_info.
8419         (aarch64_output_scalar_simd_mov_immediate): Update call
8420         accordingly.
8422 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8423             Alan Hayward  <alan.hayward@arm.com>
8424             David Sherwood  <david.sherwood@arm.com>
8426         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
8427         (mode_nunits): Likewise CONST_MODE_NUNITS.
8428         * machmode.def (ADJUST_NUNITS): Document.
8429         * genmodes.c (mode_data::need_nunits_adj): New field.
8430         (blank_mode): Update accordingly.
8431         (adj_nunits): New variable.
8432         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
8433         parameter.
8434         (emit_mode_size_inline): Set need_bytesize_adj for all modes
8435         listed in adj_nunits.
8436         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
8437         listed in adj_nunits.  Don't emit case statements for such modes.
8438         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
8439         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
8440         nothing if adj_nunits is nonnull.
8441         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
8442         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
8443         (emit_mode_fbit): Update use of print_maybe_const_decl.
8444         (emit_move_size): Likewise.  Treat the array as non-const
8445         if adj_nunits.
8446         (emit_mode_adjustments): Handle adj_nunits.
8448 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8450         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
8451         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
8452         (VECTOR_MODES): Use it.
8453         (make_vector_modes): Take the prefix as an argument.
8455 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8456             Alan Hayward  <alan.hayward@arm.com>
8457             David Sherwood  <david.sherwood@arm.com>
8459         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
8460         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
8461         for MODE_VECTOR_BOOL.
8462         * machmode.def (VECTOR_BOOL_MODE): Document.
8463         * genmodes.c (VECTOR_BOOL_MODE): New macro.
8464         (make_vector_bool_mode): New function.
8465         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
8466         MODE_VECTOR_BOOL.
8467         * lto-streamer-in.c (lto_input_mode_table): Likewise.
8468         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
8469         Likewise.
8470         * stor-layout.c (int_mode_for_mode): Likewise.
8471         * tree.c (build_vector_type_for_mode): Likewise.
8472         * varasm.c (output_constant_pool_2): Likewise.
8473         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
8474         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
8475         for MODE_VECTOR_BOOL.
8476         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
8477         of mode class checks.
8478         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
8479         instead of a list of mode class checks.
8480         (expand_vector_scalar_condition): Likewise.
8481         (type_for_widest_vector_mode): Handle BImode as an inner mode.
8483 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8484             Alan Hayward  <alan.hayward@arm.com>
8485             David Sherwood  <david.sherwood@arm.com>
8487         * machmode.h (mode_size): Change from unsigned short to
8488         poly_uint16_pod.
8489         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
8490         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
8491         or if measurement_type is not polynomial.
8492         (fixed_size_mode::includes_p): Check for constant-sized modes.
8493         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
8494         return a poly_uint16 rather than an unsigned short.
8495         (emit_mode_size): Change the type of mode_size from unsigned short
8496         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
8497         (emit_mode_adjustments): Cope with polynomial vector sizes.
8498         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
8499         for GET_MODE_SIZE.
8500         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
8501         for GET_MODE_SIZE.
8502         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
8503         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
8504         * caller-save.c (setup_save_areas): Likewise.
8505         (replace_reg_with_saved_mem): Likewise.
8506         * calls.c (emit_library_call_value_1): Likewise.
8507         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
8508         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
8509         (gen_lowpart_for_combine): Likewise.
8510         * convert.c (convert_to_integer_1): Likewise.
8511         * cse.c (equiv_constant, cse_insn): Likewise.
8512         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
8513         (cselib_subst_to_values): Likewise.
8514         * dce.c (word_dce_process_block): Likewise.
8515         * df-problems.c (df_word_lr_mark_ref): Likewise.
8516         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
8517         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
8518         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
8519         (rtl_for_decl_location): Likewise.
8520         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
8521         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
8522         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
8523         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
8524         (expand_expr_real_1): Likewise.
8525         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
8526         (pad_below): Likewise.
8527         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
8528         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
8529         * ira.c (get_subreg_tracking_sizes): Likewise.
8530         * ira-build.c (ira_create_allocno_objects): Likewise.
8531         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
8532         (ira_sort_regnos_for_alter_reg): Likewise.
8533         * ira-costs.c (record_operand_costs): Likewise.
8534         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
8535         (resolve_simple_move): Likewise.
8536         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
8537         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
8538         (lra_constraints): Likewise.
8539         (CONST_POOL_OK_P): Reject variable-sized modes.
8540         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
8541         (add_pseudo_to_slot, lra_spill): Likewise.
8542         * omp-low.c (omp_clause_aligned_alignment): Likewise.
8543         * optabs-query.c (get_best_extraction_insn): Likewise.
8544         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
8545         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
8546         (expand_mult_highpart, valid_multiword_target_p): Likewise.
8547         * recog.c (offsettable_address_addr_space_p): Likewise.
8548         * regcprop.c (maybe_mode_change): Likewise.
8549         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
8550         * regrename.c (build_def_use): Likewise.
8551         * regstat.c (dump_reg_info): Likewise.
8552         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
8553         (find_reloads, find_reloads_subreg_address): Likewise.
8554         * reload1.c (eliminate_regs_1): Likewise.
8555         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
8556         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
8557         (simplify_binary_operation_1, simplify_subreg): Likewise.
8558         * targhooks.c (default_function_arg_padding): Likewise.
8559         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
8560         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
8561         (verify_gimple_assign_ternary): Likewise.
8562         * tree-inline.c (estimate_move_cost): Likewise.
8563         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
8564         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
8565         (get_address_cost_ainc): Likewise.
8566         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
8567         (vect_supportable_dr_alignment): Likewise.
8568         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8569         (vectorizable_reduction): Likewise.
8570         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
8571         (vectorizable_operation, vectorizable_load): Likewise.
8572         * tree.c (build_same_sized_truth_vector_type): Likewise.
8573         * valtrack.c (cleanup_auto_inc_dec): Likewise.
8574         * var-tracking.c (emit_note_insn_var_location): Likewise.
8575         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
8576         (ADDR_VEC_ALIGN): Likewise.
8578 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8579             Alan Hayward  <alan.hayward@arm.com>
8580             David Sherwood  <david.sherwood@arm.com>
8582         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
8583         unsigned short.
8584         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
8585         or if measurement_type is polynomial.
8586         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
8587         * combine.c (make_extraction): Likewise.
8588         * dse.c (find_shift_sequence): Likewise.
8589         * dwarf2out.c (mem_loc_descriptor): Likewise.
8590         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
8591         (extract_bit_field, extract_low_bits): Likewise.
8592         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
8593         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
8594         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
8595         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
8596         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
8597         * reload.c (find_reloads): Likewise.
8598         * reload1.c (alter_reg): Likewise.
8599         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
8600         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
8601         * tree-if-conv.c (predicate_mem_writes): Likewise.
8602         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
8603         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
8604         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
8605         * valtrack.c (dead_debug_insert_temp): Likewise.
8606         * varasm.c (mergeable_constant_section): Likewise.
8607         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
8609 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8610             Alan Hayward  <alan.hayward@arm.com>
8611             David Sherwood  <david.sherwood@arm.com>
8613         * expr.c (expand_assignment): Cope with polynomial mode sizes
8614         when assigning to a CONCAT.
8616 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8617             Alan Hayward  <alan.hayward@arm.com>
8618             David Sherwood  <david.sherwood@arm.com>
8620         * machmode.h (mode_precision): Change from unsigned short to
8621         poly_uint16_pod.
8622         (mode_to_precision): Return a poly_uint16 rather than an unsigned
8623         short.
8624         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
8625         or if measurement_type is not polynomial.
8626         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
8627         in which the mode is already known to be a scalar_int_mode.
8628         * genmodes.c (emit_mode_precision): Change the type of mode_precision
8629         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
8630         initializer.
8631         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
8632         for GET_MODE_PRECISION.
8633         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
8634         for GET_MODE_PRECISION.
8635         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
8636         as polynomial.
8637         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
8638         (expand_field_assignment, make_extraction): Likewise.
8639         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
8640         (get_last_value): Likewise.
8641         * convert.c (convert_to_integer_1): Likewise.
8642         * cse.c (cse_insn): Likewise.
8643         * expr.c (expand_expr_real_1): Likewise.
8644         * lra-constraints.c (simplify_operand_subreg): Likewise.
8645         * optabs-query.c (can_atomic_load_p): Likewise.
8646         * optabs.c (expand_atomic_load): Likewise.
8647         (expand_atomic_store): Likewise.
8648         * ree.c (combine_reaching_defs): Likewise.
8649         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
8650         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
8651         * tree.h (type_has_mode_precision_p): Likewise.
8652         * ubsan.c (instrument_si_overflow): Likewise.
8654 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8655             Alan Hayward  <alan.hayward@arm.com>
8656             David Sherwood  <david.sherwood@arm.com>
8658         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
8659         polynomial numbers of units.
8660         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
8661         (valid_vector_subparts_p): New function.
8662         (build_vector_type): Remove temporary shim and take the number
8663         of units as a poly_uint64 rather than an int.
8664         (build_opaque_vector_type): Take the number of units as a
8665         poly_uint64 rather than an int.
8666         * tree.c (build_vector_from_ctor): Handle polynomial
8667         TYPE_VECTOR_SUBPARTS.
8668         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
8669         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
8670         (build_vector_from_val): If the number of units is variable,
8671         use build_vec_duplicate_cst for constant operands and
8672         VEC_DUPLICATE_EXPR otherwise.
8673         (make_vector_type): Remove temporary is_constant ().
8674         (build_vector_type, build_opaque_vector_type): Take the number of
8675         units as a poly_uint64 rather than an int.
8676         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
8677         VECTOR_CST_NELTS.
8678         * cfgexpand.c (expand_debug_expr): Likewise.
8679         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
8680         (store_constructor, expand_expr_real_1): Likewise.
8681         (const_scalar_mask_from_tree): Likewise.
8682         * fold-const-call.c (fold_const_reduction): Likewise.
8683         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
8684         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
8685         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
8686         (fold_relational_const): Likewise.
8687         (native_interpret_vector): Likewise.  Change the size from an
8688         int to an unsigned int.
8689         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
8690         TYPE_VECTOR_SUBPARTS.
8691         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
8692         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
8693         duplicating a non-constant operand into a variable-length vector.
8694         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
8695         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
8696         * ipa-icf.c (sem_variable::equals): Likewise.
8697         * match.pd: Likewise.
8698         * omp-simd-clone.c (simd_clone_subparts): Likewise.
8699         * print-tree.c (print_node): Likewise.
8700         * stor-layout.c (layout_type): Likewise.
8701         * targhooks.c (default_builtin_vectorization_cost): Likewise.
8702         * tree-cfg.c (verify_gimple_comparison): Likewise.
8703         (verify_gimple_assign_binary): Likewise.
8704         (verify_gimple_assign_ternary): Likewise.
8705         (verify_gimple_assign_single): Likewise.
8706         * tree-pretty-print.c (dump_generic_node): Likewise.
8707         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
8708         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
8709         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
8710         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
8711         (vect_shift_permute_load_chain): Likewise.
8712         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
8713         (expand_vector_condition, optimize_vector_constructor): Likewise.
8714         (lower_vec_perm, get_compute_type): Likewise.
8715         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8716         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
8717         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
8718         (vect_recog_mask_conversion_pattern): Likewise.
8719         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
8720         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
8721         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
8722         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
8723         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
8724         (vectorizable_shift, vectorizable_operation, vectorizable_store)
8725         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
8726         (supportable_widening_operation): Likewise.
8727         (supportable_narrowing_operation): Likewise.
8728         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
8729         Likewise.
8730         * varasm.c (output_constant): Likewise.
8732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8733             Alan Hayward  <alan.hayward@arm.com>
8734             David Sherwood  <david.sherwood@arm.com>
8736         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
8737         so that both the length == 3 and length != 3 cases set up their
8738         own permute vectors.  Add comments explaining why we know the
8739         number of elements is constant.
8740         (vect_permute_load_chain): Likewise.
8742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8743             Alan Hayward  <alan.hayward@arm.com>
8744             David Sherwood  <david.sherwood@arm.com>
8746         * machmode.h (mode_nunits): Change from unsigned char to
8747         poly_uint16_pod.
8748         (ONLY_FIXED_SIZE_MODES): New macro.
8749         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
8750         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
8751         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
8752         New typedefs.
8753         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
8754         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
8755         or if measurement_type is not polynomial.
8756         * genmodes.c (ZERO_COEFFS): New macro.
8757         (emit_mode_nunits_inline): Make mode_nunits_inline return a
8758         poly_uint16.
8759         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
8760         Use ZERO_COEFFS when emitting initializers.
8761         * data-streamer.h (bp_pack_poly_value): New function.
8762         (bp_unpack_poly_value): Likewise.
8763         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
8764         for GET_MODE_NUNITS.
8765         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
8766         for GET_MODE_NUNITS.
8767         * tree.c (make_vector_type): Remove temporary shim and make
8768         the real function take the number of units as a poly_uint64
8769         rather than an int.
8770         (build_vector_type_for_mode): Handle polynomial nunits.
8771         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
8772         * emit-rtl.c (const_vec_series_p_1): Likewise.
8773         (gen_rtx_CONST_VECTOR): Likewise.
8774         * fold-const.c (test_vec_duplicate_folding): Likewise.
8775         * genrecog.c (validate_pattern): Likewise.
8776         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
8777         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
8778         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
8779         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
8780         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
8781         * rtlanal.c (subreg_get_info): Likewise.
8782         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
8783         (vect_grouped_load_supported): Likewise.
8784         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
8785         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
8786         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
8787         (simplify_const_unary_operation, simplify_binary_operation_1)
8788         (simplify_const_binary_operation, simplify_ternary_operation)
8789         (test_vector_ops_duplicate, test_vector_ops): Likewise.
8790         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
8791         instead of CONST_VECTOR_NUNITS.
8792         * varasm.c (output_constant_pool_2): Likewise.
8793         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
8794         explicit-encoded elements in the XVEC for variable-length vectors.
8796 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8798         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
8800 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8801             Alan Hayward  <alan.hayward@arm.com>
8802             David Sherwood  <david.sherwood@arm.com>
8804         * coretypes.h (fixed_size_mode): Declare.
8805         (fixed_size_mode_pod): New typedef.
8806         * builtins.h (target_builtins::x_apply_args_mode)
8807         (target_builtins::x_apply_result_mode): Change type to
8808         fixed_size_mode_pod.
8809         * builtins.c (apply_args_size, apply_result_size, result_vector)
8810         (expand_builtin_apply_args_1, expand_builtin_apply)
8811         (expand_builtin_return): Update accordingly.
8813 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8815         * cse.c (hash_rtx_cb): Hash only the encoded elements.
8816         * cselib.c (cselib_hash_rtx): Likewise.
8817         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
8818         CONST_VECTOR encoding.
8820 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
8821             Jeff Law  <law@redhat.com>
8823         PR target/83641
8824         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
8825         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
8826         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
8827         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
8829         PR target/83641
8830         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
8831         explicitly probe *sp in a noreturn function if there were any callee
8832         register saves or frame pointer is needed.
8834 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
8836         PR debug/83621
8837         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
8838         BLKmode for ternary, binary or unary expressions.
8840         PR debug/83645
8841         * var-tracking.c (delete_vta_debug_insn): New inline function.
8842         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
8843         insns from get_insns () to NULL instead of each bb separately.
8844         Use delete_vta_debug_insn.  No longer static.
8845         (vt_debug_insns_local, variable_tracking_main_1): Adjust
8846         delete_vta_debug_insns callers.
8847         * rtl.h (delete_vta_debug_insns): Declare.
8848         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
8849         instead of variable_tracking_main.
8851 2018-01-03  Martin Sebor  <msebor@redhat.com>
8853         PR tree-optimization/83603
8854         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
8855         arguments past the endof the argument list in functions declared
8856         without a prototype.
8857         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8858         Avoid checking when arguments are null.
8860 2018-01-03  Martin Sebor  <msebor@redhat.com>
8862         PR c/83559
8863         * doc/extend.texi (attribute const): Fix a typo.
8864         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
8865         issuing -Wsuggest-attribute for void functions.
8867 2018-01-03  Martin Sebor  <msebor@redhat.com>
8869         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
8870         offset_int::from instead of wide_int::to_shwi.
8871         (maybe_diag_overlap): Remove assertion.
8872         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
8873         * gimple-ssa-sprintf.c (format_directive): Same.
8874         (parse_directive): Same.
8875         (sprintf_dom_walker::compute_format_length): Same.
8876         (try_substitute_return_value): Same.
8878 2018-01-03  Jeff Law  <law@redhat.com>
8880         PR middle-end/83654
8881         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
8882         non-constant residual for zero at runtime and avoid probing in
8883         that case.  Reorganize code for trailing problem to mirror handling
8884         of the residual.
8886 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8888         PR tree-optimization/83501
8889         * tree-ssa-strlen.c (get_string_cst): New.
8890         (handle_char_store): Call get_string_cst.
8892 2018-01-03  Martin Liska  <mliska@suse.cz>
8894         PR tree-optimization/83593
8895         * tree-ssa-strlen.c: Include tree-cfg.h.
8896         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
8897         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
8898         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
8899         to false.
8900         (strlen_dom_walker::before_dom_children): Call
8901         gimple_purge_dead_eh_edges. Dump tranformation with details
8902         dump flags.
8903         (strlen_dom_walker::before_dom_children): Update call by adding
8904         new argument cleanup_eh.
8905         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
8907 2018-01-03  Martin Liska  <mliska@suse.cz>
8909         PR ipa/83549
8910         * cif-code.def (VARIADIC_THUNK): New enum value.
8911         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
8912         thunks.
8914 2018-01-03  Jan Beulich  <jbeulich@suse.com>
8916         * sse.md (mov<mode>_internal): Tighten condition for when to use
8917         vmovdqu<ssescalarsize> for TI and OI modes.
8919 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
8921         Update copyright years.
8923 2018-01-03  Martin Liska  <mliska@suse.cz>
8925         PR ipa/83594
8926         * ipa-visibility.c (function_and_variable_visibility): Skip
8927         functions with noipa attribure.
8929 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
8931         * gcc.c (process_command): Update copyright notice dates.
8932         * gcov-dump.c (print_version): Ditto.
8933         * gcov.c (print_version): Ditto.
8934         * gcov-tool.c (print_version): Ditto.
8935         * gengtype.c (create_file): Ditto.
8936         * doc/cpp.texi: Bump @copying's copyright year.
8937         * doc/cppinternals.texi: Ditto.
8938         * doc/gcc.texi: Ditto.
8939         * doc/gccint.texi: Ditto.
8940         * doc/gcov.texi: Ditto.
8941         * doc/install.texi: Ditto.
8942         * doc/invoke.texi: Ditto.
8944 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8946         * vector-builder.h (vector_builder::m_full_nelts): Change from
8947         unsigned int to poly_uint64.
8948         (vector_builder::full_nelts): Update prototype accordingly.
8949         (vector_builder::new_vector): Likewise.
8950         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
8951         (vector_builder::operator ==): Likewise.
8952         (vector_builder::finalize): Likewise.
8953         * int-vector-builder.h (int_vector_builder::int_vector_builder):
8954         Take the number of elements as a poly_uint64 rather than an
8955         unsigned int.
8956         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
8957         from unsigned int to poly_uint64.
8958         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
8959         (vec_perm_indices::new_vector): Likewise.
8960         (vec_perm_indices::length): Likewise.
8961         (vec_perm_indices::nelts_per_input): Likewise.
8962         (vec_perm_indices::input_nelts): Likewise.
8963         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
8964         number of elements per input as a poly_uint64 rather than an
8965         unsigned int.  Use the original encoding for variable-length
8966         vectors, rather than clamping each individual element.
8967         For the second and subsequent elements in each pattern,
8968         clamp the step and base before clamping their sum.
8969         (vec_perm_indices::series_p): Handle polynomial element counts.
8970         (vec_perm_indices::all_in_range_p): Likewise.
8971         (vec_perm_indices_to_tree): Likewise.
8972         (vec_perm_indices_to_rtx): Likewise.
8973         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
8974         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
8975         (tree_vector_builder::new_binary_operation): Handle polynomial
8976         element counts.  Return false if we need to know the number
8977         of elements at compile time.
8978         * fold-const.c (fold_vec_perm): Punt if the number of elements
8979         isn't known at compile time.
8981 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
8983         * vec-perm-indices.h (vec_perm_builder): Change element type
8984         from HOST_WIDE_INT to poly_int64.
8985         (vec_perm_indices::element_type): Update accordingly.
8986         (vec_perm_indices::clamp): Handle polynomial element_types.
8987         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
8988         (vec_perm_indices::all_in_range_p): Likewise.
8989         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
8990         than shwi trees.
8991         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
8992         polynomial vec_perm_indices element types.
8993         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
8994         * fold-const.c (fold_vec_perm): Likewise.
8995         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
8996         * tree-vect-generic.c (lower_vec_perm): Likewise.
8997         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
8998         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
8999         element type to HOST_WIDE_INT.
9001 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9002             Alan Hayward  <alan.hayward@arm.com>
9003             David Sherwood  <david.sherwood@arm.com>
9005         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
9006         rather than an int.  Use plus_constant.
9007         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
9008         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
9010 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9011             Alan Hayward  <alan.hayward@arm.com>
9012             David Sherwood  <david.sherwood@arm.com>
9014         * calls.c (emit_call_1, expand_call): Change struct_value_size from
9015         a HOST_WIDE_INT to a poly_int64.
9017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9018             Alan Hayward  <alan.hayward@arm.com>
9019             David Sherwood  <david.sherwood@arm.com>
9021         * calls.c (load_register_parameters): Cope with polynomial
9022         mode sizes.  Require a constant size for BLKmode parameters
9023         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
9024         forces a parameter to be padded at the lsb end in order to
9025         fill a complete number of words, require the parameter size
9026         to be ordered wrt UNITS_PER_WORD.
9028 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9029             Alan Hayward  <alan.hayward@arm.com>
9030             David Sherwood  <david.sherwood@arm.com>
9032         * reload1.c (spill_stack_slot_width): Change element type
9033         from unsigned int to poly_uint64_pod.
9034         (alter_reg): Treat mode sizes as polynomial.
9036 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9037             Alan Hayward  <alan.hayward@arm.com>
9038             David Sherwood  <david.sherwood@arm.com>
9040         * reload.c (complex_word_subreg_p): New function.
9041         (reload_inner_reg_of_subreg, push_reload): Use it.
9043 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9044             Alan Hayward  <alan.hayward@arm.com>
9045             David Sherwood  <david.sherwood@arm.com>
9047         * lra-constraints.c (process_alt_operands): Reject matched
9048         operands whose sizes aren't ordered.
9049         (match_reload): Refer to this check here.
9051 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9052             Alan Hayward  <alan.hayward@arm.com>
9053             David Sherwood  <david.sherwood@arm.com>
9055         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
9056         that the mode size is in the set {1, 2, 4, 8, 16}.
9058 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9059             Alan Hayward  <alan.hayward@arm.com>
9060             David Sherwood  <david.sherwood@arm.com>
9062         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
9063         Use plus_constant instead of gen_rtx_PLUS.
9065 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9066             Alan Hayward  <alan.hayward@arm.com>
9067             David Sherwood  <david.sherwood@arm.com>
9069         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
9070         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
9071         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
9072         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
9073         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
9074         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
9075         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
9076         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
9077         * config/i386/i386.c (ix86_push_rounding): ...this new function.
9078         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
9079         a poly_int64.
9080         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
9081         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
9082         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
9083         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
9084         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
9085         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
9086         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
9087         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
9088         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
9089         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
9090         function.
9091         * expr.c (emit_move_resolve_push): Treat the input and result
9092         of PUSH_ROUNDING as a poly_int64.
9093         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
9094         (emit_push_insn): Likewise.
9095         * lra-eliminations.c (mark_not_eliminable): Likewise.
9096         * recog.c (push_operand): Likewise.
9097         * reload1.c (elimination_effects): Likewise.
9098         * rtlanal.c (nonzero_bits1): Likewise.
9099         * calls.c (store_one_arg): Likewise.  Require the padding to be
9100         known at compile time.
9102 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9103             Alan Hayward  <alan.hayward@arm.com>
9104             David Sherwood  <david.sherwood@arm.com>
9106         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
9107         Use plus_constant instead of gen_rtx_PLUS.
9109 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9110             Alan Hayward  <alan.hayward@arm.com>
9111             David Sherwood  <david.sherwood@arm.com>
9113         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
9114         rather than an int.
9116 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9117             Alan Hayward  <alan.hayward@arm.com>
9118             David Sherwood  <david.sherwood@arm.com>
9120         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
9121         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
9122         via stack temporaries.  Treat the mode size as polynomial too.
9124 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9125             Alan Hayward  <alan.hayward@arm.com>
9126             David Sherwood  <david.sherwood@arm.com>
9128         * expr.c (expand_expr_real_2): When handling conversions involving
9129         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
9130         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
9131         as a poly_uint64 too.
9133 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9134             Alan Hayward  <alan.hayward@arm.com>
9135             David Sherwood  <david.sherwood@arm.com>
9137         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
9139 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9140             Alan Hayward  <alan.hayward@arm.com>
9141             David Sherwood  <david.sherwood@arm.com>
9143         * combine.c (can_change_dest_mode): Handle polynomial
9144         REGMODE_NATURAL_SIZE.
9145         * expmed.c (store_bit_field_1): Likewise.
9146         * expr.c (store_constructor): Likewise.
9147         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
9148         and polynomial REGMODE_NATURAL_SIZE.
9149         (gen_lowpart_common): Likewise.
9150         * reginfo.c (record_subregs_of_mode): Likewise.
9151         * rtlanal.c (read_modify_subreg_p): Likewise.
9153 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9154             Alan Hayward  <alan.hayward@arm.com>
9155             David Sherwood  <david.sherwood@arm.com>
9157         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
9158         numbers of elements.
9160 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9161             Alan Hayward  <alan.hayward@arm.com>
9162             David Sherwood  <david.sherwood@arm.com>
9164         * match.pd: Cope with polynomial numbers of vector elements.
9166 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9167             Alan Hayward  <alan.hayward@arm.com>
9168             David Sherwood  <david.sherwood@arm.com>
9170         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
9171         in a POINTER_PLUS_EXPR.
9173 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9174             Alan Hayward  <alan.hayward@arm.com>
9175             David Sherwood  <david.sherwood@arm.com>
9177         * omp-simd-clone.c (simd_clone_subparts): New function.
9178         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
9179         (ipa_simd_modify_function_body): Likewise.
9181 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9182             Alan Hayward  <alan.hayward@arm.com>
9183             David Sherwood  <david.sherwood@arm.com>
9185         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
9186         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
9187         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
9188         (expand_vector_condition, vector_element): Likewise.
9189         (subparts_gt): New function.
9190         (get_compute_type): Use subparts_gt.
9191         (count_type_subparts): Delete.
9192         (expand_vector_operations_1): Use subparts_gt instead of
9193         count_type_subparts.
9195 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9196             Alan Hayward  <alan.hayward@arm.com>
9197             David Sherwood  <david.sherwood@arm.com>
9199         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
9200         (vect_compile_time_alias): ...this new function.  Do the calculation
9201         on poly_ints rather than trees.
9202         (vect_prune_runtime_alias_test_list): Update call accordingly.
9204 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9205             Alan Hayward  <alan.hayward@arm.com>
9206             David Sherwood  <david.sherwood@arm.com>
9208         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
9209         numbers of units.
9210         (vect_schedule_slp_instance): Likewise.
9212 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9213             Alan Hayward  <alan.hayward@arm.com>
9214             David Sherwood  <david.sherwood@arm.com>
9216         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
9217         constant and extern definitions for variable-length vectors.
9218         (vect_get_constant_vectors): Note that the number of units
9219         is known to be constant.
9221 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9222             Alan Hayward  <alan.hayward@arm.com>
9223             David Sherwood  <david.sherwood@arm.com>
9225         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
9226         of units as polynomial.  Choose between WIDE and NARROW based
9227         on multiple_p.
9229 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9230             Alan Hayward  <alan.hayward@arm.com>
9231             David Sherwood  <david.sherwood@arm.com>
9233         * tree-vect-stmts.c (simd_clone_subparts): New function.
9234         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
9236 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9237             Alan Hayward  <alan.hayward@arm.com>
9238             David Sherwood  <david.sherwood@arm.com>
9240         * tree-vect-stmts.c (vectorizable_call): Treat the number of
9241         vectors as polynomial.  Use build_index_vector for
9242         IFN_GOMP_SIMD_LANE.
9244 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9245             Alan Hayward  <alan.hayward@arm.com>
9246             David Sherwood  <david.sherwood@arm.com>
9248         * tree-vect-stmts.c (get_load_store_type): Treat the number of
9249         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
9250         for variable-length vectors.
9251         (vectorizable_mask_load_store): Treat the number of units as
9252         polynomial, asserting that it is constant if the condition has
9253         already been enforced.
9254         (vectorizable_store, vectorizable_load): Likewise.
9256 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9257             Alan Hayward  <alan.hayward@arm.com>
9258             David Sherwood  <david.sherwood@arm.com>
9260         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
9261         of units as polynomial.  Punt if we can't tell at compile time
9262         which vector contains the final result.
9264 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9265             Alan Hayward  <alan.hayward@arm.com>
9266             David Sherwood  <david.sherwood@arm.com>
9268         * tree-vect-loop.c (vectorizable_induction): Treat the number
9269         of units as polynomial.  Punt on SLP inductions.  Use an integer
9270         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
9271         cast of such a series for variable-length floating-point
9272         reductions.
9274 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9275             Alan Hayward  <alan.hayward@arm.com>
9276             David Sherwood  <david.sherwood@arm.com>
9278         * tree.h (build_index_vector): Declare.
9279         * tree.c (build_index_vector): New function.
9280         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
9281         of units as polynomial, forcibly converting it to a constant if
9282         vectorizable_reduction has already enforced the condition.
9283         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
9284         to create a {1,2,3,...} vector.
9285         (vectorizable_reduction): Treat the number of units as polynomial.
9286         Choose vectype_in based on the largest scalar element size rather
9287         than the smallest number of units.  Enforce the restrictions
9288         relied on above.
9290 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9291             Alan Hayward  <alan.hayward@arm.com>
9292             David Sherwood  <david.sherwood@arm.com>
9294         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
9295         number of units as polynomial.
9297 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9298             Alan Hayward  <alan.hayward@arm.com>
9299             David Sherwood  <david.sherwood@arm.com>
9301         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
9302         * target.def (autovectorize_vector_sizes): Return the vector sizes
9303         by pointer, using vector_sizes rather than a bitmask.
9304         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
9305         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
9306         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
9307         Likewise.
9308         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
9309         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
9310         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
9311         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
9312         * omp-general.c (omp_max_vf): Likewise.
9313         * omp-low.c (omp_clause_aligned_alignment): Likewise.
9314         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
9315         * tree-vect-loop.c (vect_analyze_loop): Likewise.
9316         * tree-vect-slp.c (vect_slp_bb): Likewise.
9317         * doc/tm.texi: Regenerate.
9318         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
9319         to a poly_uint64.
9320         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
9321         the vector size as a poly_uint64 rather than an unsigned int.
9322         (current_vector_size): Change from an unsigned int to a poly_uint64.
9323         (get_vectype_for_scalar_type): Update accordingly.
9324         * tree.h (build_truth_vector_type): Take the size and number of
9325         units as a poly_uint64 rather than an unsigned int.
9326         (build_vector_type): Add a temporary overload that takes
9327         the number of units as a poly_uint64 rather than an unsigned int.
9328         * tree.c (make_vector_type): Likewise.
9329         (build_truth_vector_type): Take the number of units as a poly_uint64
9330         rather than an unsigned int.
9332 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9333             Alan Hayward  <alan.hayward@arm.com>
9334             David Sherwood  <david.sherwood@arm.com>
9336         * target.def (get_mask_mode): Take the number of units and length
9337         as poly_uint64s rather than unsigned ints.
9338         * targhooks.h (default_get_mask_mode): Update accordingly.
9339         * targhooks.c (default_get_mask_mode): Likewise.
9340         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
9341         * doc/tm.texi: Regenerate.
9343 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9344             Alan Hayward  <alan.hayward@arm.com>
9345             David Sherwood  <david.sherwood@arm.com>
9347         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
9348         * omp-general.c (omp_max_vf): Likewise.
9349         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
9350         (expand_omp_simd): Handle polynomial safelen.
9351         * omp-low.c (omplow_simd_context): Add a default constructor.
9352         (omplow_simd_context::max_vf): Change from int to poly_uint64.
9353         (lower_rec_simd_input_clauses): Update accordingly.
9354         (lower_rec_input_clauses): Likewise.
9356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9357             Alan Hayward  <alan.hayward@arm.com>
9358             David Sherwood  <david.sherwood@arm.com>
9360         * tree-vectorizer.h (vect_nunits_for_cost): New function.
9361         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
9362         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
9363         (vect_analyze_slp_cost): Likewise.
9364         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
9365         (vect_model_load_cost): Likewise.
9367 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9368             Alan Hayward  <alan.hayward@arm.com>
9369             David Sherwood  <david.sherwood@arm.com>
9371         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
9372         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
9373         from an unsigned int * to a poly_uint64_pod *.
9374         (calculate_unrolling_factor): New function.
9375         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
9377 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9378             Alan Hayward  <alan.hayward@arm.com>
9379             David Sherwood  <david.sherwood@arm.com>
9381         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
9382         from an unsigned int to a poly_uint64.
9383         (_loop_vec_info::slp_unrolling_factor): Likewise.
9384         (_loop_vec_info::vectorization_factor): Change from an int
9385         to a poly_uint64.
9386         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
9387         (vect_get_num_vectors): New function.
9388         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
9389         (vect_get_num_copies): Use vect_get_num_vectors.
9390         (vect_analyze_data_ref_dependences): Change max_vf from an int *
9391         to an unsigned int *.
9392         (vect_analyze_data_refs): Change min_vf from an int * to a
9393         poly_uint64 *.
9394         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
9395         than an unsigned HOST_WIDE_INT.
9396         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
9397         (vect_analyze_data_ref_dependence): Change max_vf from an int *
9398         to an unsigned int *.
9399         (vect_analyze_data_ref_dependences): Likewise.
9400         (vect_compute_data_ref_alignment): Handle polynomial vf.
9401         (vect_enhance_data_refs_alignment): Likewise.
9402         (vect_prune_runtime_alias_test_list): Likewise.
9403         (vect_shift_permute_load_chain): Likewise.
9404         (vect_supportable_dr_alignment): Likewise.
9405         (dependence_distance_ge_vf): Take the vectorization factor as a
9406         poly_uint64 rather than an unsigned HOST_WIDE_INT.
9407         (vect_analyze_data_refs): Change min_vf from an int * to a
9408         poly_uint64 *.
9409         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
9410         vfm1 as a poly_uint64 rather than an int.  Make the same change
9411         for the returned bound_scalar.
9412         (vect_gen_vector_loop_niters): Handle polynomial vf.
9413         (vect_do_peeling): Likewise.  Update call to
9414         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
9415         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
9416         be constant.
9417         * tree-vect-loop.c (vect_determine_vectorization_factor)
9418         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
9419         (vect_get_known_peeling_cost): Likewise.
9420         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
9421         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
9422         (vect_transform_loop): Likewise.  Use the lowest possible VF when
9423         updating the upper bounds of the loop.
9424         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
9425         rather than an int.
9426         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
9427         polynomial unroll factors.
9428         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
9429         (vect_make_slp_decision): Likewise.
9430         (vect_supported_load_permutation_p): Likewise, and polynomial
9431         vf too.
9432         (vect_analyze_slp_cost): Handle polynomial vf.
9433         (vect_slp_analyze_node_operations): Likewise.
9434         (vect_slp_analyze_bb_1): Likewise.
9435         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
9436         than an unsigned HOST_WIDE_INT.
9437         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
9438         (vectorizable_load): Handle polynomial vf.
9439         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
9440         a poly_uint64.
9441         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
9443 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9444             Alan Hayward  <alan.hayward@arm.com>
9445             David Sherwood  <david.sherwood@arm.com>
9447         * match.pd: Handle bit operations involving three constants
9448         and try to fold one pair.
9450 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
9452         * tree-vect-loop-manip.c: Include gimple-fold.h.
9453         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
9454         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
9455         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
9456         Add a path that uses a step of VF instead of 1, but disable it
9457         for now.
9458         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
9459         and niters_no_overflow parameters.  Update calls to
9460         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
9461         Create a new SSA name if the latter choses to use a ste other
9462         than zero, and return it via niters_vector_mult_vf_var.
9463         * tree-vect-loop.c (vect_transform_loop): Update calls to
9464         vect_do_peeling, vect_gen_vector_loop_niters and
9465         slpeel_make_loop_iterate_ntimes.
9466         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
9467         (vect_gen_vector_loop_niters): Update declarations after above changes.
9469 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
9471         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
9472         128-bit round to integer instructions.
9473         (ceil<mode>2): Likewise.
9474         (btrunc<mode>2): Likewise.
9475         (round<mode>2): Likewise.
9477 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9479         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
9480         unaligned VSX load/store on P8/P9.
9481         (expand_block_clear): Allow the use of unaligned VSX
9482         load/store on P8/P9.
9484 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9486         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
9487         New function.
9488         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
9489         swap associated with both a load and a store.
9491 2018-01-02  Andrew Waterman  <andrew@sifive.com>
9493         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
9494         * config/riscv/riscv.md (clear_cache): Use it.
9496 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
9498         * web.c: Remove out-of-date comment.
9500 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9502         * expr.c (fixup_args_size_notes): Check that any existing
9503         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
9504         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
9505         (emit_single_push_insn): ...here.
9507 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9509         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
9510         (const_vector_encoded_nelts): New function.
9511         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
9512         (const_vector_int_elt, const_vector_elt): Declare.
9513         * emit-rtl.c (const_vector_int_elt_1): New function.
9514         (const_vector_elt): Likewise.
9515         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
9516         of CONST_VECTOR_ELT.
9518 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9520         * expr.c: Include rtx-vector-builder.h.
9521         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
9522         directly on the tree encoding.
9523         (const_vector_from_tree): Likewise.
9524         * optabs.c: Include rtx-vector-builder.h.
9525         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
9526         sequence of "u" values.
9527         * vec-perm-indices.c: Include rtx-vector-builder.h.
9528         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
9529         directly on the vec_perm_indices encoding.
9531 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9533         * doc/rtl.texi (const_vector): Describe new encoding scheme.
9534         * Makefile.in (OBJS): Add rtx-vector-builder.o.
9535         * rtx-vector-builder.h: New file.
9536         * rtx-vector-builder.c: Likewise.
9537         * rtl.h (rtx_def::u2): Add a const_vector field.
9538         (CONST_VECTOR_NPATTERNS): New macro.
9539         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
9540         (CONST_VECTOR_DUPLICATE_P): Likewise.
9541         (CONST_VECTOR_STEPPED_P): Likewise.
9542         (CONST_VECTOR_ENCODED_ELT): Likewise.
9543         (const_vec_duplicate_p): Check for a duplicated vector encoding.
9544         (unwrap_const_vec_duplicate): Likewise.
9545         (const_vec_series_p): Check for a non-duplicated vector encoding.
9546         Say that the function only returns true for integer vectors.
9547         * emit-rtl.c: Include rtx-vector-builder.h.
9548         (gen_const_vec_duplicate_1): Delete.
9549         (gen_const_vector): Call gen_const_vec_duplicate instead of
9550         gen_const_vec_duplicate_1.
9551         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
9552         (gen_const_vec_duplicate): Use rtx_vector_builder.
9553         (gen_const_vec_series): Likewise.
9554         (gen_rtx_CONST_VECTOR): Likewise.
9555         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
9556         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
9557         Build a new vector rather than modifying a CONST_VECTOR in-place.
9558         (handle_special_swappables): Update call accordingly.
9559         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
9560         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
9561         Build a new vector rather than modifying a CONST_VECTOR in-place.
9562         (handle_special_swappables): Update call accordingly.
9564 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9566         * simplify-rtx.c (simplify_const_binary_operation): Use
9567         CONST_VECTOR_ELT instead of XVECEXP.
9569 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9571         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
9572         the selector elements to be different from the data elements
9573         if the selector is a VECTOR_CST.
9574         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
9575         ssizetype for the selector.
9577 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9579         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
9580         before testing each element individually.
9581         * tree-vect-generic.c (lower_vec_perm): Likewise.
9583 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9585         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
9586         * selftest-run-tests.c (selftest::run_tests): Call it.
9587         * vector-builder.h (vector_builder::operator ==): New function.
9588         (vector_builder::operator !=): Likewise.
9589         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
9590         (vec_perm_indices::all_from_input_p): New function.
9591         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
9592         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
9593         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
9594         instead of reading the VECTOR_CST directly.  Detect whether both
9595         vector inputs are the same before constructing the vec_perm_indices,
9596         and update the number of inputs argument accordingly.  Use the
9597         utility functions added above.  Only construct sel2 if we need to.
9599 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9601         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
9602         the broadcast of the low byte.
9603         (expand_mult_highpart): Use an explicit encoding for the permutes.
9604         * optabs-query.c (can_mult_highpart_p): Likewise.
9605         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
9606         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
9607         (vectorizable_bswap): Likewise.
9608         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
9609         explicit encoding for the power-of-2 permutes.
9610         (vect_permute_store_chain): Likewise.
9611         (vect_grouped_load_supported): Likewise.
9612         (vect_permute_load_chain): Likewise.
9614 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9616         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
9617         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
9618         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
9619         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
9620         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
9621         (vect_gen_perm_mask_any): Likewise.
9623 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9625         * int-vector-builder.h: New file.
9626         * vec-perm-indices.h: Include int-vector-builder.h.
9627         (vec_perm_indices): Redefine as an int_vector_builder.
9628         (auto_vec_perm_indices): Delete.
9629         (vec_perm_builder): Redefine as a stand-alone class.
9630         (vec_perm_indices::vec_perm_indices): New function.
9631         (vec_perm_indices::clamp): Likewise.
9632         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
9633         (vec_perm_indices::new_vector): New function.
9634         (vec_perm_indices::new_expanded_vector): Update for new
9635         vec_perm_indices class.
9636         (vec_perm_indices::rotate_inputs): New function.
9637         (vec_perm_indices::all_in_range_p): Operate directly on the
9638         encoded form, without computing elided elements.
9639         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
9640         encoding.  Update for new vec_perm_indices class.
9641         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
9642         the given vec_perm_builder.
9643         (expand_vec_perm_var): Update vec_perm_builder constructor.
9644         (expand_mult_highpart): Use vec_perm_builder instead of
9645         auto_vec_perm_indices.
9646         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
9647         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
9648         or double series encoding as appropriate.
9649         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
9650         vec_perm_indices instead of auto_vec_perm_indices.
9651         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
9652         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
9653         (vect_permute_store_chain): Likewise.
9654         (vect_grouped_load_supported): Likewise.
9655         (vect_permute_load_chain): Likewise.
9656         (vect_shift_permute_load_chain): Likewise.
9657         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
9658         (vect_transform_slp_perm_load): Likewise.
9659         (vect_schedule_slp_instance): Likewise.
9660         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
9661         (vectorizable_mask_load_store): Likewise.
9662         (vectorizable_bswap): Likewise.
9663         (vectorizable_store): Likewise.
9664         (vectorizable_load): Likewise.
9665         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
9666         vec_perm_indices instead of auto_vec_perm_indices.  Use
9667         tree_to_vec_perm_builder to read the vector from a tree.
9668         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
9669         vec_perm_builder instead of a vec_perm_indices.
9670         (have_whole_vector_shift): Use vec_perm_builder and
9671         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
9672         truncation to calc_vec_perm_mask_for_shift.
9673         (vect_create_epilog_for_reduction): Likewise.
9674         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
9675         from auto_vec_perm_indices to vec_perm_indices.
9676         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
9677         instead of changing individual elements.
9678         (aarch64_vectorize_vec_perm_const): Use new_vector to install
9679         the vector in d.perm.
9680         * config/arm/arm.c (expand_vec_perm_d::perm): Change
9681         from auto_vec_perm_indices to vec_perm_indices.
9682         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
9683         instead of changing individual elements.
9684         (arm_vectorize_vec_perm_const): Use new_vector to install
9685         the vector in d.perm.
9686         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
9687         Update vec_perm_builder constructor.
9688         (rs6000_expand_interleave): Likewise.
9689         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
9690         (rs6000_expand_interleave): Likewise.
9692 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9694         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
9695         to qimode could truncate the indices.
9696         * optabs.c (expand_vec_perm_var): Likewise.
9698 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9700         * Makefile.in (OBJS): Add vec-perm-indices.o.
9701         * vec-perm-indices.h: New file.
9702         * vec-perm-indices.c: Likewise.
9703         * target.h (vec_perm_indices): Replace with a forward class
9704         declaration.
9705         (auto_vec_perm_indices): Move to vec-perm-indices.h.
9706         * optabs.h: Include vec-perm-indices.h.
9707         (expand_vec_perm): Delete.
9708         (selector_fits_mode_p, expand_vec_perm_var): Declare.
9709         (expand_vec_perm_const): Declare.
9710         * target.def (vec_perm_const_ok): Replace with...
9711         (vec_perm_const): ...this new hook.
9712         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
9713         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
9714         * doc/tm.texi: Regenerate.
9715         * optabs.def (vec_perm_const): Delete.
9716         * doc/md.texi (vec_perm_const): Likewise.
9717         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
9718         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
9719         expand_vec_perm for constant permutation vectors.  Assert that
9720         the mode of variable permutation vectors is the integer equivalent
9721         of the mode that is being permuted.
9722         * optabs-query.h (selector_fits_mode_p): Declare.
9723         * optabs-query.c: Include vec-perm-indices.h.
9724         (selector_fits_mode_p): New function.
9725         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
9726         is defined, instead of checking whether the vec_perm_const_optab
9727         exists.  Use targetm.vectorize.vec_perm_const instead of
9728         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
9729         fit in the vector mode before using a variable permute.
9730         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
9731         vec_perm_indices instead of an rtx.
9732         (expand_vec_perm): Replace with...
9733         (expand_vec_perm_const): ...this new function.  Take the selector
9734         as a vec_perm_indices rather than an rtx.  Also take the mode of
9735         the selector.  Update call to shift_amt_for_vec_perm_mask.
9736         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
9737         Use vec_perm_indices::new_expanded_vector to expand the original
9738         selector into bytes.  Check whether the indices fit in the vector
9739         mode before using a variable permute.
9740         (expand_vec_perm_var): Make global.
9741         (expand_mult_highpart): Use expand_vec_perm_const.
9742         * fold-const.c: Includes vec-perm-indices.h.
9743         * tree-ssa-forwprop.c: Likewise.
9744         * tree-vect-data-refs.c: Likewise.
9745         * tree-vect-generic.c: Likewise.
9746         * tree-vect-loop.c: Likewise.
9747         * tree-vect-slp.c: Likewise.
9748         * tree-vect-stmts.c: Likewise.
9749         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
9750         Delete.
9751         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
9752         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
9753         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
9754         (aarch64_vectorize_vec_perm_const): ...this new function.
9755         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
9756         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
9757         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
9758         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
9759         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
9760         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
9761         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
9762         into...
9763         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
9764         check for NEON modes.
9765         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
9766         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
9767         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
9768         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
9769         into...
9770         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
9771         the old VEC_PERM_CONST conditions.
9772         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
9773         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
9774         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
9775         (ia64_vectorize_vec_perm_const_ok): Merge into...
9776         (ia64_vectorize_vec_perm_const): ...this new function.
9777         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
9778         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
9779         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
9780         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
9781         * config/mips/mips.c (mips_expand_vec_perm_const)
9782         (mips_vectorize_vec_perm_const_ok): Merge into...
9783         (mips_vectorize_vec_perm_const): ...this new function.
9784         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
9785         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
9786         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
9787         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
9788         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
9789         (rs6000_expand_vec_perm_const): Delete.
9790         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
9791         Delete.
9792         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
9793         (altivec_expand_vec_perm_const_le): Take each operand individually.
9794         Operate on constant selectors rather than rtxes.
9795         (altivec_expand_vec_perm_const): Likewise.  Update call to
9796         altivec_expand_vec_perm_const_le.
9797         (rs6000_expand_vec_perm_const): Delete.
9798         (rs6000_vectorize_vec_perm_const_ok): Delete.
9799         (rs6000_vectorize_vec_perm_const): New function.
9800         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
9801         an element count and rtx array.
9802         (rs6000_expand_extract_even): Update call accordingly.
9803         (rs6000_expand_interleave): Likewise.
9804         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
9805         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
9806         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
9807         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
9808         (rs6000_expand_vec_perm_const): Delete.
9809         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
9810         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
9811         (altivec_expand_vec_perm_const_le): Take each operand individually.
9812         Operate on constant selectors rather than rtxes.
9813         (altivec_expand_vec_perm_const): Likewise.  Update call to
9814         altivec_expand_vec_perm_const_le.
9815         (rs6000_expand_vec_perm_const): Delete.
9816         (rs6000_vectorize_vec_perm_const_ok): Delete.
9817         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
9818         reference to the SPE evmerge intructions.
9819         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
9820         an element count and rtx array.
9821         (rs6000_expand_extract_even): Update call accordingly.
9822         (rs6000_expand_interleave): Likewise.
9823         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
9824         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
9825         new function.
9826         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
9828 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9830         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
9831         vector mode and that that mode matches the mode of the data
9832         being permuted.
9833         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
9834         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
9835         directly using expand_vec_perm_1 when forcing selectors into
9836         registers.
9837         (expand_vec_perm_var): New function, split out from expand_vec_perm.
9839 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9841         * optabs-query.h (can_vec_perm_p): Delete.
9842         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
9843         * optabs-query.c (can_vec_perm_p): Split into...
9844         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
9845         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
9846         particular selector is valid.
9847         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
9848         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
9849         (vect_grouped_load_supported): Likewise.
9850         (vect_shift_permute_load_chain): Likewise.
9851         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
9852         (vect_transform_slp_perm_load): Likewise.
9853         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
9854         (vectorizable_bswap): Likewise.
9855         (vect_gen_perm_mask_checked): Likewise.
9856         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
9857         implementations of variable permutation vectors into account
9858         when deciding which selector to use.
9859         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
9860         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
9861         with a false third argument.
9862         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
9863         to test whether the constant selector is valid and can_vec_perm_var_p
9864         to test whether a variable selector is valid.
9866 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9868         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
9869         * optabs-query.c (can_vec_perm_p): Likewise.
9870         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
9871         instead of vec_perm_indices.
9872         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
9873         (vect_gen_perm_mask_checked): Likewise,
9874         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
9875         (vect_gen_perm_mask_checked): Likewise,
9877 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
9879         * optabs-query.h (qimode_for_vec_perm): Declare.
9880         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
9881         (qimode_for_vec_perm): ...this new function.
9882         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
9884 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9886         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
9887         does not have a conditional at the top.
9889 2018-01-02  Richard Biener  <rguenther@suse.de>
9891         * ipa-inline.c (big_speedup_p): Fix expression.
9893 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
9895         PR target/81616
9896         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
9897         for generic 4->6.
9899 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
9901         PR target/81616
9902         Generic tuning.
9903         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
9904         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
9905         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
9906         cond_taken_branch_cost 3->4.
9908 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
9910         PR tree-optimization/83581
9911         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
9912         TODO_cleanup_cfg if any changes have been made.
9914         PR middle-end/83608
9915         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
9916         convert_modes if target mode has the right side, but different mode
9917         class.
9919         PR middle-end/83609
9920         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
9921         last argument when extracting from CONCAT.  If either from_real or
9922         from_imag is NULL, use expansion through memory.  If result is not
9923         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
9924         the parts directly to inner mode, if even that fails, use expansion
9925         through memory.
9927         PR middle-end/83623
9928         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
9929         check for bswap in mode rather than HImode and use that in expand_unop
9930         too.
9932 Copyright (C) 2018 Free Software Foundation, Inc.
9934 Copying and distribu