1 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3 * config/nds32/nds32.md (type): Remove call.
4 * config/nds32/pipelines.md (simple_insn): Likewise.
6 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
8 * config/nds32/constants.md (unspec_volatile_element): Add
9 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
10 UNSPEC_VOLATILE_FMFCFG.
11 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
12 description for fmfcfg and fmfcsr.
13 (bdesc_1arg): Add fmtcsr.
14 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
16 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18 unspec_fmfcfg): New patterns.
19 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
20 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
21 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
23 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
24 __nds32__fmfcfg): Define.
26 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
28 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
29 intrinsic register names.
30 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
31 intrinsic register enum values and macros.
33 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
35 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
36 for load/store addressing form.
37 (nds32_print_operand_address): Likewise.
39 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
42 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
43 based on LABEL_REF. Remove useless assertion.
44 (pic_address_needs_scratch): Fix formatting.
45 (sparc_legitimize_pic_address): Minor tweaks.
46 (sparc_delegitimize_address): Adjust assertion accordingly.
47 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
48 into symbolic_operand.
49 (movsi_high_pic_label_ref): Likewise.
50 (movsi_lo_sum_pic_label_ref): Likewise.
51 (movdi_pic_label_ref): Likewise.
52 (movdi_high_pic_label_ref): Likewise.
53 (movdi_lo_sum_pic_label_ref): Likewise.
55 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
57 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
58 custom LIB_SPEC setup.
60 2018-04-06 Ruslan Bukin <br@bsdpad.com>
61 Kito Cheng <kito.cheng@gmail.com>
63 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
64 * config/riscv/freebsd.h: New.
66 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
68 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
69 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
72 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
73 Kito Cheng <kito.cheng@gmail.com>
75 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
76 nds32_output_call, nds32_symbol_binds_local_p): New functions.
77 * config/nds32/nds32-protos.h (nds32_output_call,
78 nds32_output_return): Declare.
79 * config/nds32/nds32.md: Refine all the call and return patterns.
81 2018-04-06 Jakub Jelinek <jakub@redhat.com>
84 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
85 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
87 PR rtl-optimization/84872
88 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
89 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
92 2018-04-06 Tamar Christina <tamar.christina@arm.com>
94 * expr.c (copy_blkmode_to_reg): Revert 254862.
95 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
97 2018-04-06 Richard Biener <rguenther@suse.de>
100 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
101 after seeing a component reference with an adjacent field. Treat
102 refs to arrays at struct end of external decls similar to
103 refs to unconstrained commons.
105 2018-04-06 Jakub Jelinek <jakub@redhat.com>
108 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
109 look through SAVE_EXPRs with non-side-effects argument. Adjust
111 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
114 2018-04-06 Richard Biener <rguenther@suse.de>
117 * alias.c (find_base_term): New wrapper around find_base_term
118 unwinding CSELIB_VAL_PTR changes.
119 (find_base_term): Do not restore CSELIB_VAL_PTR during the
122 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
124 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
126 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
127 constant definitions.
128 ("nop"): lr 0,0 -> nopr r0
129 ("nop_lr0", "nop_lr1"): New insn definitions.
131 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
133 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
134 NDS32_V3PUSH_AVAILABLE_P macro.
136 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
137 Chung-Ju Wu <jasonwucj@gmail.com>
139 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
140 (nds32*-*-*): Add float and fpu_config into supported_defaults.
141 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
142 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
143 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
144 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
145 * config/nds32/constraints.md: New constraints and checking for hard
147 * config/nds32/iterators.md: New mode iterator and attribute for hard
149 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
151 * config/nds32/nds32-fpu.md: New file.
152 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
153 deal with hard float code generation.
154 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
156 (abi_type, float_reg_number): New enum type.
157 * config/nds32/nds32-predicates.c: New predicates for hard float.
158 * config/nds32/nds32-protos.h: Declare functions for hard float.
159 * config/nds32/nds32.c: Implementation for hard float configuration.
160 * config/nds32/nds32.h: Definitions for hard float configuration.
161 * config/nds32/nds32.md: Include hard float machine description and
162 modify patterns for hard float configuration.
163 * config/nds32/nds32.opt: New options for hard float configuration.
164 * config/nds32/predicates.md: New predicates for hard float
167 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
169 * common/config/nds32/nds32-common.c
170 (nds32_option_optimization_table): Enable -mreleax-hint by default.
172 2018-04-05 Jakub Jelinek <jakub@redhat.com>
175 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
176 CONSTRUCTOR_ELT (ctor, ...)->value.
178 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
181 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
183 2018-04-05 Tom de Vries <tom@codesourcery.com>
186 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
189 2018-04-05 Shiva Chen <shiva0217@gmail.com>
190 Kito Cheng <kito.cheng@gmail.com>
192 * config/nds32/constraints.md (U33): Fine-tune checking condition.
193 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
194 * config/nds32/nds32.h (nds32_16bit_address_type): Add
195 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
197 2018-04-05 Shiva Chen <shiva0217@gmail.com>
198 Kito Cheng <kito.cheng@gmail.com>
200 * config/nds32/constraints.md (Ufe): New memory constraint.
201 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
202 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
203 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
205 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
206 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
208 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
210 * config/nds32/nds32.md: Use optimize_size in the condition for
211 alu-shift instructions.
213 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
215 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
217 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
219 * config/nds32/nds32.md (negsi2): Refine pattern.
221 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
222 Chung-Ju Wu <jasonwucj@gmail.com>
224 * config/nds32/iterators.md (shift_rotate): New code iterator.
225 (shift): New code attribute.
226 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
227 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
228 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
229 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
231 (andsi3, *andsi3): Ditto.
232 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
233 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
234 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
235 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
236 nds32_ior_operand, nds32_xor_operand): New predicates.
238 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
240 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
241 (addsi3, subsi3): ... this.
243 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
245 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
247 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
249 * config/nds32/nds32.md: Adjust indention.
251 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
253 * config/nds32/nds32.md (feature): New attribute.
255 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
257 * config/nds32/nds32.md (subtype): New attribute.
259 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
262 * config/arm/arm-builtins.c (arm_expand_builtin): Change
263 expansion to perform a bitwise AND of the argument followed by a
264 boolean negation of the result.
266 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
268 PR rtl-optimization/84878
269 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
270 the basic block. Assert the use reference is not artificial and that
271 it has an associated insn.
273 2018-04-04 Michael Matz <matz@suse.de>
275 * builtins.c (compute_objsize): Pass correct operand
276 to array_at_struct_end_p.
278 2018-04-04 Richard Biener <rguenther@suse.de>
281 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
282 from contexts for DINFO_LEVEL_TERSE and below.
284 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
286 * config/nds32/nds32-doubleword.md (move_<mode>): Require
287 resiter_operand condition.
288 * config/nds32/nds32.md (*move<mode>): Ditto.
290 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
291 Monk Chiang <sh.chiang04@gmail.com>
293 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
295 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
297 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
299 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
300 Kito Cheng <kito.cheng@gmail.com>
302 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
303 nds32_cond_code_str, output_cond_branch,
304 output_cond_branch_compare_zero, nds32_expand_cbranch,
305 nds32_expand_cstore, nds32_expand_movcc,
306 nds32_output_cbranchsi4_equality_zero,
307 nds32_output_cbranchsi4_equality_reg,
308 nds32_output_cbranchsi4_equality_reg_or_const_int,
309 nds32_output_cbranchsi4_greater_less_zero: New functions.
310 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
311 nds32_expand_cstore, nds32_expand_movcc,
312 nds32_output_cbranchsi4_equality_zero,
313 nds32_output_cbranchsi4_equality_reg,
314 nds32_output_cbranchsi4_equality_reg_or_const_int,
315 nds32_output_cbranchsi4_greater_less_zero): Declare.
316 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
317 nds32_rimm11s_operand): New predicates.
318 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
319 * config/nds32/nds32.md: Rewrite all the branch and conditional move
322 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
324 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
325 * config/nds32/nds32.md: Ditto.
326 * config/nds32/pipelines.md: Ditto.
328 2018-04-04 Richard Biener <rguenther@suse.de>
330 PR tree-optimization/85168
331 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
332 propagating abnormals.
334 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
336 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
338 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
339 Kito Cheng <kito.cheng@gmail.com>
341 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
342 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
343 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
344 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
345 * config/nds32/nds32.md (sibcall_internal): New.
346 (sibcall_register): Remove.
347 (sibcall_immediate): Remove.
348 (sibcall_value_internal): New.
349 (sibcall_value_register): Remove.
350 (sibcall_value_immediate): Remove.
351 * config/nds32/predicates.md (nds32_general_register_operand): New.
352 (nds32_call_address_operand): New.
354 2018-04-03 Jakub Jelinek <jakub@redhat.com>
356 PR rtl-optimization/85167
357 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
358 bb_defs if *split_p, instead preinitialize it to NULL.
360 PR tree-optimization/85156
361 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
362 evaluating the argument multiple times.
364 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
366 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
368 (_mm_cvtpd_ps): Likewise.
369 (_mm_cvttpd_epi32): Likewise.
370 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
371 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
372 vector, pixel, and bool following altivec.h include.
374 2018-04-03 Martin Sebor <msebor@redhat.com>
376 * doc/extend.texi (Common Function Attributes): Clarify.
377 (const attribute): Likewise.
378 (pure attribute): Likewise.
380 2018-04-03 Jakub Jelinek <jakub@redhat.com>
383 * config/i386/i386.c (ix86_expand_vector_set): Use
384 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
386 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
388 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
389 instructions when changing rounding bits to preserve precision bits
390 in the x87 control word.
392 2018-04-03 Martin Liska <mliska@suse.cz>
394 PR tree-optimization/82491
395 * rtl.h (strip_offset_and_add): Replace += suboffset with
396 poly_uint64 () + suboffset.
398 2018-03-29 Martin Liska <mliska@suse.cz>
399 Martin Jambor <mjambor@suse.cz>
402 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
403 param_type is not an integral or pointer type.
405 2018-04-03 Richard Biener <rguenther@suse.de>
407 * sese.h (recompute_all_dominators): Remove.
409 2018-04-02 Martin Sebor <msebor@redhat.com>
411 * doc/invoke.texi (-Wrestrict): Fix typos.
413 2018-04-02 Jim Wilson <jimw@sifive.com>
415 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
416 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
417 (<optab>di3, <optab>si3_extend): Likewise.
418 (<optab>si3_mask, <optab>si3_mask_1): New.
419 (<optab>di3_mask, <optab>di3_mask_1): New.
420 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
421 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
422 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
424 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
426 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
429 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
431 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
432 (nds32_canonicalize_comparison): New function.
434 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
435 Kito Cheng <kito.cheng@gmail.com>
436 Kuan-Lin Chen <kuanlinchentw@gmail.com>
438 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
439 * config/nds32/constants.md (unspec_volatile_element): Add
440 UNSPEC_VOLATILE_RELAX_GROUP.
441 * config/nds32/nds32-relax-opt.c: New file.
442 * config/nds32/nds32-predicates.c
443 (nds32_symbol_load_store_p): New function.
444 * config/nds32/nds32-protos.h
445 (nds32_symbol_load_store_p): Declare function.
446 (make_pass_nds32_relax_opt): Declare new rtl pass function.
447 * config/nds32/nds32.c
448 (nds32_register_pass): New function to register pass.
449 (nds32_register_passes): New function to register passes.
450 * config/nds32/nds32.md (relax_group): New pattern.
451 * config/nds32/nds32.opt (mrelax-hint): New option.
452 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
454 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
456 * config/nds32/t-nds32: Modify files dependency.
458 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
460 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
461 (PROFILE_HOOK): Define its implementation.
463 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
465 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
466 type and 32-bit size.
468 2018-04-01 Jakub Jelinek <jakub@redhat.com>
471 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
472 (V_128_256): New mode iterator.
473 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
474 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
475 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
477 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
478 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
480 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
483 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
484 NaN inputs correctly.
486 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
489 * config/rs6000/vsx.md (??r): New mode attribute.
490 (*vsx_mov<mode>_64bit): Use it.
491 (*vsx_mov<mode>_32bit): Likewise.
493 2018-03-30 Martin Sebor <msebor@redhat.com>
495 PR tree-optimization/84818
496 * builtins.c (check_access): Use warning_n.
498 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
501 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
503 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
506 2018-03-30 Julia Koval <julia.koval@intel.com>
509 * x86-tune.def (movx, partial_reg_dependency): Enable for
512 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
515 * lra-constraints.c (process_alt_operands): Move setting
516 this_alternative_matches below.
518 2018-03-29 Martin Liska <mliska@suse.cz>
521 * doc/invoke.texi: Document how LTO works with debug info.
522 Describe auto-load support of binutils. Mention 'x86-64'
523 as valid option value of -march option.
525 2018-03-29 Jakub Jelinek <jakub@redhat.com>
527 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
530 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
531 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
532 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
535 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
538 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
539 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
540 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
541 for RS6000_BTM_POWERPC64.
542 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
543 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
544 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
549 2018-03-28 Carl Love <cel@us.ibm.com>
552 2017-09-27 Carl Love <cel@us.ibm.com>
554 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
555 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
556 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
559 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
561 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
562 instead of __vector bool.
563 (_mm_max_pu8): Likewise.
564 (_mm_min_pi16): Likewise.
566 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
569 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
573 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
575 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
576 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
577 (div_extend): Likewise.
578 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
580 (__builtin_divweuo): Likewise.
581 (__builtin_divdeo): Likewise.
582 (__builtin_divdeuo): Likewise.
584 2018-03-28 Jakub Jelinek <jakub@redhat.com>
587 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
588 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
590 PR tree-optimization/82004
591 * gimple-match-head.c (optimize_pow_to_exp): New function.
592 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
593 Don't fold to exp if optimize_pow_to_exp is false.
595 2018-03-28 Martin Liska <mliska@suse.cz>
598 * calls.c (initialize_argument_information): Fix trailing space.
599 * common.opt: Fix typo and provide better explanation for
600 -fsanitize-coverage option.
601 * config/i386/i386.opt: Fix typo.
603 2018-03-28 Jakub Jelinek <jakub@redhat.com>
604 Martin Liska <mliska@suse.cz>
607 * gimplify.c (asan_poison_variable): Don't do the check for
608 gimplify_omp_ctxp here.
609 (gimplify_decl_expr): Do it here.
610 (gimplify_target_expr): Likewise.
612 2018-03-28 Martin Liska <mliska@suse.cz>
615 * config/i386/i386.c (ix86_function_arg_advance): Do not call
616 chkp_type_bounds_count if MPX is not enabled.
618 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
620 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
622 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
625 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
626 function to create the function decl for complex long double
627 multiply and divide for -mabi=ieeelongdouble.
628 (init_float128_ieee): Call it.
630 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
633 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
634 -fcf-protection=branch -mibt.
635 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
637 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
640 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
642 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
645 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
646 extern array declarations.
648 2018-03-27 Richard Biener <rguenther@suse.de>
651 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
652 explicit single_use checks.
654 2018-03-27 Richard Biener <rguenther@suse.de>
656 PR tree-optimization/85082
657 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
660 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
662 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
663 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
664 Turn on fasynchronous-unwind-tables and funwind-tables.
666 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
669 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
670 (*bmi_blsr_<mode>_ccz): Ditto.
672 2018-03-26 Tom de Vries <tom@codesourcery.com>
674 PR tree-optimization/85063
675 * omp-general.c (offloading_function_p): New function. Factor out
677 * omp-offload.c (pass_omp_target_link::gate): ... here.
678 * omp-general.h (offloading_function_p): Declare.
679 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
680 with attribute omp declare target for offloading functions.
682 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
684 PR tree-optimization/84005
685 * tree-data-ref.h (get_base_for_alignment): Declare.
686 * tree-data-ref.c (get_base_for_alignment_1): New function.
687 (get_base_for_alignment): Likewise.
688 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
689 get_base_for_alignment to find a suitable base object, instead
690 of always using drb->base_address.
692 2018-03-23 Jakub Jelinek <jakub@redhat.com>
695 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
696 known size by default.
698 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
701 * lra-constraints.c (process_alt_operands): Don't match BLKmode
702 and non BLKmode operands.
704 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
707 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
710 2018-03-23 Richard Biener <rguenther@suse.de>
713 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
714 we are going to emit early debug for LTO.
716 2018-03-23 Jakub Jelinek <jakub@redhat.com>
719 * function.c (match_asm_constraints_1): Don't optimize if input
720 doesn't satisfy general_operand predicate for output's mode.
723 * alias.c (write_dependence_p): Don't require for x_canonicalized
724 non-VOIDmode if x has VOIDmode.
727 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
728 just don't try to optimize it rather than assert it never happens.
730 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
732 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
733 macro expansions for definition of ST_INTERNAL_<mode> and
734 LD_INTERNAL_<mode> builtins.
735 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
737 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
739 (altivec_expand_st_builtin): Likewise.
740 (altivec_expand_builtin): Remove calls to deleted functions.
741 (rs6000_address_for_altivec): Delete this function.
742 * config/rs6000/vector.md: Remove expands for
743 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
745 2018-03-22 Sudakshina Das <sudi.das@arm.com>
748 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
749 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
750 re-computing once computed.
751 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
752 (arm_init_machine_status): Initialize
753 machine->static_chain_stack_bytes.
755 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
758 * doc/extend.texi: Add four new prototypes for vec_ld.
759 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
760 definitions for more logical presentation.
761 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
762 entries for V1TI variants of __builtin_altivec_ld builtin.
763 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
764 handling of V1TI variant of LVX icode pattern.
765 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
766 (rs6000_gimple_fold_builtin): Likewise.
767 (altivec_init_builtins): Add code to define
768 __builtin_altivec_lvx_v1ti function.
770 2018-03-22 Jakub Jelinek <jakub@redhat.com>
773 * function.c (match_asm_constraints_1): Don't do the optimization
774 if input isn't a REG, SUBREG, MEM or constant.
776 2018-03-22 Tom de Vries <tom@codesourcery.com>
778 PR tree-optimization/84956
779 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
780 bb_has_abnormal_pred.
782 2018-03-22 Jakub Jelinek <jakub@redhat.com>
785 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
786 DECL_INITIAL (decl) to decl at the end.
787 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
790 2018-03-21 Joseph Myers <joseph@codesourcery.com>
792 * doc/extend.texi (__builtin_tgmath): Document when complex
793 integer types are treated as _Complex _Float64.
795 2018-03-21 Tom de Vries <tom@codesourcery.com>
797 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
799 2018-03-21 Jakub Jelinek <jakub@redhat.com>
801 PR tree-optimization/84960
802 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
803 if it is ENTRY block, move them into single succ of ENTRY in that case.
805 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
807 PR tree-optimization/84811
808 * poly-int.h (poly_span_traits): Remove the T3 parameter and
809 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
810 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
811 (known_subrange_p): Update accordingly. Cast each value involved
812 in the size comparison, rather than casting the result of the
815 2018-03-21 Jakub Jelinek <jakub@redhat.com>
817 PR tree-optimization/84982
818 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
819 by flipping the least significant bit rather than all bits from
820 bitpos to bitpos + bitsize - 1.
822 2018-03-21 Nathan Sidwell <nathan@acm.org>
824 * doc/extend.texi (Deprecated Features): Remove mention of
825 long-deleted deprecations.
827 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
830 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
831 * configure: Regenerate.
833 2018-03-21 Tom de Vries <tom@codesourcery.com>
835 PR tree-optimization/83126
836 * tree-parloops.c (num_phis): New function.
837 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
839 2018-03-21 Nathan Sidwell <nathan@acm.org>
841 * doc/extend.texi (Deprecated Features): Update deprecated flags,
842 mention anon-struct/union members and trailing attributes.
844 2018-03-21 Bin Cheng <bin.cheng@arm.com>
846 PR tree-optimization/84969
847 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
848 builtin memset partitions if they set different rhs values.
850 2018-03-21 Jakub Jelinek <jakub@redhat.com>
852 PR rtl-optimization/84989
853 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
854 VEC_DUPLICATE with scalar result mode.
856 2018-03-21 Martin Liska <mliska@suse.cz>
859 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
860 not intended return statement.
862 2018-03-21 Martin Liska <mliska@suse.cz>
865 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
866 (chkp_find_bound_slots_1): Limit number of iterations.
868 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
871 * Minor grammar fixes for x86 options.
873 2018-03-20 Jakub Jelinek <jakub@redhat.com>
876 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
877 holding REG_CFA_RESTORE notes, instead turn them into a USE.
879 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
882 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
883 (altivec_lvx_<mode>_1op): Likewise.
884 (altivec_stvx_<mode>_2op): Likewise.
885 (altivec_stvx_<mode>_1op): Likewise.
886 (altivec_lvx_<VM2:mode>): New define_expand.
887 (altivec_stvx_<VM2:mode>): Likewise.
888 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
889 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
890 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
891 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
892 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
893 (rs6000_gen_lvx): Likewise.
894 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
895 (altivec_expand_stv_builtin): Likewise.
896 (altivec_expand_builtin): Likewise.
897 * config/rs6000/vector.md: Likewise.
899 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
902 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
905 2018-03-20 Richard Biener <rguenther@suse.de>
908 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
909 sign-conversions as zero, fall back to standard scalar_stmt
912 2018-03-20 Martin Liska <mliska@suse.cz>
915 * predict.c (rebuild_frequencies): Handle case when we have
916 PROFILE_ABSENT, but flag_guess_branch_prob is false.
918 2018-03-20 Jakub Jelinek <jakub@redhat.com>
921 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
922 flag_section_anchors.
923 * varasm.c (use_blocks_for_decl_p): Remove hack for
927 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
929 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
930 be created, use lowpart_subreg of operands[0] rather than operands[0]
932 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
933 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
934 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
935 and n constraint instead of aarch64_shift_imm_di and Usd.
936 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
937 (*aarch64_<optab>_reg_minus<mode>3): ... this.
939 2018-03-20 Sudakshina Das <sudi.das@arm.com>
942 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
943 to favor GPR over NEON registers.
944 (<shift>di3_neon): Likewise.
946 2018-03-20 Tom de Vries <tom@codesourcery.com>
949 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
950 (nvptx_process_pars): Emit bar.sync asap and alap.
952 2018-03-20 Tom de Vries <tom@codesourcery.com>
955 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
956 seen_label if seen_label is already set.
958 2018-03-20 Jakub Jelinek <jakub@redhat.com>
961 * config/i386/i386.c (fold_builtin_cpu): For features above 31
962 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
963 Use 1U instead of 1. Formatting fixes.
966 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
967 instead of TREE_TYPE (s1) for the return value.
969 2018-03-19 Jakub Jelinek <jakub@redhat.com>
971 PR tree-optimization/84946
972 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
973 bitsize + bitsize in poly_uint64 rather than poly_int64.
976 * dwarf2asm.c: Include fold-const.c.
977 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
978 of decl rather than decl itself.
980 PR rtl-optimization/84643
981 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
983 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
986 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
987 calling assemble_variable.
989 2018-03-19 Sudakshina Das <sudi.das@arm.com>
992 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
993 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
995 2018-03-19 Jim Wilson <jimw@sifive.com>
998 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
999 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
1000 (riscv_first_stack_step): Likewise.
1001 (riscv_option_override): Use STACK_BOUNDARY instead of
1003 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
1005 (BIGGEST_ALIGNMENT): Set to 128.
1006 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
1007 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
1010 2018-03-19 Richard Biener <rguenther@suse.de>
1012 PR tree-optimization/84933
1013 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
1014 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
1016 2018-03-19 Richard Biener <rguenther@suse.de>
1018 PR tree-optimization/84859
1019 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
1020 (cond_if_else_store_replacement): Perform sinking operation on
1021 single-store BBs regardless of MAX_STORES_TO_SINK setting.
1022 Generalize what a BB with a single eligible store is.
1024 2018-03-19 Richard Biener <rguenther@suse.de>
1026 PR tree-optimization/84929
1027 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
1028 chrec_is_positive against non-chrec arg.
1030 2018-03-19 Tamar Christina <tamar.christina@arm.com>
1033 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
1035 2018-03-18 Martin Liska <mliska@suse.cz>
1037 PR rtl-optimization/84635
1038 * regrename.c (build_def_use): Use matches_mode only when
1041 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
1043 PR tree-optimization/84913
1044 * tree-vect-loop.c (vectorizable_reduction): Don't try to
1045 vectorize chains of COND_EXPRs.
1047 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
1049 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
1051 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
1053 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
1055 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
1057 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
1059 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
1060 Kito Cheng <kito.cheng@gmail.com>
1062 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
1063 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
1064 (nds32_adjust_reg_alloc_order): New function.
1065 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
1067 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
1069 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
1070 nds32_print_operand, nds32_print_operand_address): Use
1071 HOST_WIDE_INT_PRINT_DEC instead.
1073 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
1075 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
1077 2018-03-17 Jakub Jelinek <jakub@redhat.com>
1080 * config/i386/i386.c (initial_ix86_tune_features,
1081 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
1083 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
1084 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
1085 rather than 1u << ix86_tune. Formatting fix.
1086 (ix86_option_override_internal): Change ix86_arch_mask from
1087 unsigned int to unsigned HOST_WIDE_INT, initialize to
1088 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
1089 (ix86_function_specific_restore): Likewise.
1091 2018-03-16 Jakub Jelinek <jakub@redhat.com>
1094 * postreload.c (reload_combine_recognize_pattern): Perform
1095 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
1096 truncate_int_for_mode the result for the destination's mode.
1099 * hsa-gen.c (mem_type_for_type): Fix comment typo.
1100 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
1102 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
1105 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
1108 * lra-assigns.c (lra_split_hard_reg_for): Don't use
1109 regno_allocno_class_array and sorted_pseudos.
1110 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
1111 insns where regno is used.
1113 2018-03-16 Martin Liska <mliska@suse.cz>
1116 * multiple_target.c (create_dispatcher_calls): Redirect
1117 reference in the symbol table.
1119 2018-03-16 Martin Liska <mliska@suse.cz>
1122 * multiple_target.c (create_dispatcher_calls): Redirect also
1125 2018-03-16 Jakub Jelinek <jakub@redhat.com>
1129 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
1130 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
1131 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
1133 2018-03-16 Julia Koval <julia.koval@intel.com>
1135 * doc/invoke.texi (Skylake Server): Add CLWB.
1136 Cannonlake): Remove CLWB.
1138 2018-03-16 Jakub Jelinek <jakub@redhat.com>
1140 PR tree-optimization/84841
1141 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
1143 (FLOAT_ONE_CONST_TYPE): Define.
1144 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
1145 (sort_by_operand_rank): Put entries with higher constant_type last
1146 rather than first to match comments.
1148 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
1150 * config/nios2/nios2.md (movsi_internal): Fix thinko in
1153 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1156 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
1157 check and use address of target always.
1159 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
1162 * config/i386/i386.c (indirect_thunk_needed): Update comments.
1163 (indirect_thunk_bnd_needed): Likewise.
1164 (indirect_thunks_used): Likewise.
1165 (indirect_thunks_bnd_used): Likewise.
1166 (indirect_return_needed): New.
1167 (indirect_return_bnd_needed): Likewise.
1168 (output_indirect_thunk_function): Add a bool argument for
1170 (output_indirect_thunk_function): Don't generate alias for
1171 function return thunk.
1172 (ix86_code_end): Call output_indirect_thunk_function to generate
1173 function return thunks.
1174 (ix86_output_function_return): Set indirect_return_bnd_needed
1175 and indirect_return_needed instead of indirect_thunk_bnd_needed
1176 and indirect_thunk_needed.
1178 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
1180 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
1181 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
1182 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
1184 2018-03-15 David Malcolm <dmalcolm@redhat.com>
1185 Paul Hua <paul.hua.gm@gmail.com>
1188 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
1190 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
1192 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
1193 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
1196 2018-03-15 Tamar Christina <tamar.christina@arm.com>
1199 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
1200 instead of GET_MODE_SIZE when comparing Units.
1202 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
1205 * varasm.c (hash_section): Return an unchangeble hash value
1206 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
1207 Return !aarch64_can_use_per_function_literal_pools_p ().
1209 2018-03-15 Jakub Jelinek <jakub@redhat.com>
1212 * optabs.c (emit_conditional_move): Pass address of cmode's copy
1213 rather than address of cmode as last argument to prepare_cmp_insn.
1215 2018-03-15 Julia Koval <julia.koval@intel.com>
1217 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
1218 F_AVX512VNNI, F_AVX512BITALG): New.
1220 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
1223 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
1224 insn for floating-point loads and stores.
1226 2018-03-14 Carl Love <cel@us.ibm.com>
1228 * config/rs6000/rs6000-c.c: Add macro definitions for
1229 ALTIVEC_BUILTIN_VEC_PERMXOR.
1230 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
1231 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
1232 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
1233 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
1235 * config/doc/extend.texi: Add prototypes for vec_permxor.
1237 2018-03-14 David Malcolm <dmalcolm@redhat.com>
1240 * diagnostic-show-locus.c (class layout_point): Convert m_line
1241 from int to linenum_type.
1242 (line_span::comparator): Use linenum "compare" function when
1243 comparing line numbers.
1244 (test_line_span): New function.
1245 (layout_range::contains_point): Convert param "row" from int to
1247 (layout_range::intersects_line_p): Likewise.
1248 (layout::will_show_line_p): Likewise.
1249 (layout::print_source_line): Likewise.
1250 (layout::should_print_annotation_line_p): Likewise.
1251 (layout::print_annotation_line): Likewise.
1252 (layout::print_leading_fixits): Likewise.
1253 (layout::annotation_line_showed_range_p): Likewise.
1254 (struct line_corrections): Likewise for field m_row.
1255 (line_corrections::line_corrections): Likewise for param "row".
1256 (layout::print_trailing_fixits): Likewise.
1257 (layout::get_state_at_point): Likewise.
1258 (layout::get_x_bound_for_row): Likewise.
1259 (layout::print_line): Likewise.
1260 (diagnostic_show_locus): Likewise for locals "last_line" and
1262 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
1263 * input.c (selftest::test_linenum_comparisons): New function.
1264 (selftest::input_c_tests): Call it.
1265 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
1266 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
1267 * selftest.h (ASSERT_GT): New macro.
1268 (ASSERT_GT_AT): New macro.
1269 (ASSERT_LT): New macro.
1270 (ASSERT_LT_AT): New macro.
1272 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
1274 PR rtl-optimization/84780
1275 * combine.c (distribute_links): Don't make a link based on pc_rtx.
1277 2018-03-14 Martin Liska <mliska@suse.cz>
1279 * tree.c (record_node_allocation_statistics): Use
1280 get_stats_node_kind.
1281 (get_stats_node_kind): New function extracted from
1282 record_node_allocation_statistics.
1283 (free_node): Use get_stats_node_kind.
1285 2018-03-14 Richard Biener <rguenther@suse.de>
1287 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
1288 that the value-set of ANTIC_IN doesn't grow.
1291 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
1293 (BB_VISITED_WITH_VISITED_SUCCS): New define.
1294 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
1296 2018-03-14 Julia Koval <julia.koval@intel.com>
1298 * config.gcc (icelake-client, icelake-server): New.
1300 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
1301 (initial_ix86_arch_features): Ditto.
1302 (PTA_SKYLAKE): Add SGX.
1303 (PTA_ICELAKE): Remove.
1304 (PTA_ICELAKE_CLIENT): New.
1305 (PTA_ICELAKE_SERVER): New.
1306 (ix86_option_override_internal): Split up icelake on icelake client and
1308 (get_builtin_code_for_version): Ditto.
1309 (fold_builtin_cpu): Ditto.
1310 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
1311 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
1312 * config/i386/i386.h (processor_type): Ditto.
1313 * doc/invoke.texi: Ditto.
1315 2018-03-14 Jakub Jelinek <jakub@redhat.com>
1318 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
1319 INTEGER_CST offset, add it together with bitpos / 8 and
1320 sign extend based on POINTER_SIZE.
1324 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
1327 * config/i386/constraints.md (Yc): New register constraint.
1328 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
1329 Use Yc constraint for alternative 2 of operand 0. Remove
1330 preferred_for_speed attribute.
1332 2018-03-14 Richard Biener <rguenther@suse.de>
1334 PR tree-optimization/84830
1335 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
1336 with the old one to avoid oscillations.
1338 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
1341 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
1343 (assign_by_spills): Return a flag of reload assignment failure.
1344 Do not process the reload assignment failures. Do not spill other
1345 reload pseudos if they has the same reg class. Update n if
1347 (lra_assign): Add a return arg. Set up from the result of
1348 assign_by_spills call.
1349 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
1350 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
1351 usage_insns if it is not NULL.
1352 (spill_hard_reg_in_range): New function.
1353 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
1354 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
1355 function prototypes.
1356 (lra_assign): Change prototype.
1357 * lra.c (lra): Add code to deal with fails by splitting hard reg
1360 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
1362 * config/riscv/riscv.opt (mrelax): New option.
1363 * config/riscv/riscv.c (riscv_file_start): Emit ".option
1364 "norelax" when riscv_mrelax is disabled.
1365 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
1367 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
1370 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
1371 reassociation for int modes.
1373 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
1375 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
1376 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
1378 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
1379 * config/aarch64/aarch64-sve.md
1380 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
1381 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
1382 (*extend<mode><Vwide>2): Rename to...
1383 (aarch64_sve_extend<mode><Vwide>2): ...this.
1384 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
1385 renaming the old pattern to...
1386 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
1388 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
1389 define_expand, renaming the old pattern to...
1390 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
1391 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
1392 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
1393 account when deciding which SVE instruction the optab should use.
1394 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
1396 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
1398 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
1399 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
1400 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
1401 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
1402 (tlsdesc_small_<mode>): Turn a define_expand and use
1403 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
1404 (tlsdesc_small_advsimd_<mode>): ...this.
1405 (tlsdesc_small_sve_<mode>): New pattern.
1407 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
1409 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
1410 (UNSPEC_UMUL_HIGHPART): New constants.
1411 (MUL_HIGHPART): New int iteraor.
1412 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
1413 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
1415 (*<su>mul<mode>3_highpart): New define_insn.
1417 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
1420 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
1423 2018-03-13 Martin Liska <mliska@suse.cz>
1426 * (sem_item_optimizer::sem_item_optimizer): Initialize new
1428 (sem_item_optimizer::~sem_item_optimizer): Release it.
1429 (sem_item_optimizer::merge_classes): Register variable aliases.
1430 (sem_item_optimizer::fixup_pt_set): New function.
1431 (sem_item_optimizer::fixup_points_to_sets): Likewise.
1432 * ipa-icf.h: Declare new variables and functions.
1434 2018-03-13 Jakub Jelinek <jakub@redhat.com>
1437 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
1438 integer_pow2p@2 and test integer_pow2p in condition.
1439 (A < 0 ? C : 0): Similarly for @1.
1442 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
1443 characters starting at p contain '\0' character, don't look beyond
1447 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
1448 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
1451 * reg-stack.c (change_stack): Change update_end var from int to
1452 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
1453 also call set_block_for_insn on the newly added insns and rescan.
1456 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
1457 on the last operand.
1460 * tree.c (stabilize_reference_1): Return save_expr (e) for
1461 STATEMENT_LIST even if it doesn't have side-effects.
1463 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
1465 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
1467 2018-03-12 Renlin Li <renlin.li@arm.com>
1469 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
1470 aarch64_output_scalar_simd_mov_immediate.
1472 2018-03-12 Martin Sebor <msebor@redhat.com>
1474 PR tree-optimization/83456
1475 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
1476 for perfectly overlapping calls to memcpy.
1477 (gimple_fold_builtin_memory_chk): Same.
1478 (gimple_fold_builtin_strcpy): Handle no-warning.
1479 (gimple_fold_builtin_stxcpy_chk): Same.
1480 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
1482 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
1484 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
1485 parameter. Use it for SFmode.
1486 (rs6000_function_arg_advance_1): Adjust.
1487 (rs6000_function_arg): Adjust.
1488 (rs6000_gimplify_va_arg): Pass false for that new parameter.
1490 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
1492 PR rtl-optimization/84169
1493 PR rtl-optimization/84780
1494 * combine.c (can_combine_p): Check for a 2-insn combination whether
1495 the destination register is used between the two insns, too.
1497 2018-03-12 Richard Biener <rguenther@suse.de>
1499 PR tree-optimization/84803
1500 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
1501 for refs DR analysis didn't process.
1503 2018-03-12 Richard Biener <rguenther@suse.de>
1505 PR tree-optimization/84777
1506 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
1507 force-vectorize loops ignore whether we are optimizing for size.
1509 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
1511 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
1512 (TARGET_MD_ASM_ADJUST): Define.
1514 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
1515 Kito Cheng <kito.cheng@gmail.com>
1516 Chung-Ju Wu <jasonwucj@gmail.com>
1518 * config/nds32/nds32.c (nds32_compute_stack_frame,
1519 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
1520 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
1521 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
1522 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
1523 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
1524 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
1525 * config/nds32/nds32.md (prologue, epilogue): Use macro
1526 NDS32_V3PUSH_AVAILABLE_P to do checking.
1528 2018-03-11 Jakub Jelinek <jakub@redhat.com>
1531 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
1532 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
1533 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
1534 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
1535 addition of most attributes on !orig_type_die or the attribute not
1536 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
1538 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
1539 Chung-Ju Wu <jasonwucj@gmail.com>
1541 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
1543 * config/nds32/nds32.opt (mvh): New option.
1545 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
1546 Chung-Ju Wu <jasonwucj@gmail.com>
1548 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
1550 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
1551 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
1554 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
1555 Chung-Ju Wu <jasonwucj@gmail.com>
1557 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
1559 * config/nds32/nds32-multiple.md (strlensi): New pattern.
1560 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
1562 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
1563 Kito Cheng <kito.cheng@gmail.com>
1564 Chung-Ju Wu <jasonwucj@gmail.com>
1566 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
1567 UNSPEC_FFMISM and UNSPEC_FLMISM.
1568 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
1569 for ffb, ffmism and flmism.
1570 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
1571 (unspec_ffmism): Ditto.
1572 (unspec_flmism): Ditto.
1573 (nds32_expand_builtin_impl): Check if string extension is available.
1574 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
1575 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
1577 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
1580 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
1583 * lra-assigns.c (assign_by_spills): Return a flag of reload
1584 assignment failure. Do not process the reload assignment
1585 failures. Do not spill other reload pseudos if they has the same
1587 (lra_assign): Add a return arg. Set up from the result of
1588 assign_by_spills call.
1589 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
1590 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
1591 usage_insns if it is not NULL.
1592 (spill_hard_reg_in_range): New function.
1593 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
1594 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
1595 function prototypes.
1596 (lra_assign): Change prototype.
1597 * lra.c (lra): Add code to deal with fails by splitting hard reg
1600 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
1603 * config/i386/i386.opt: Replace Enforcment with Enforcement.
1605 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
1608 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
1609 (dw_val_node): Add val_symbolic_view.
1610 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
1611 (symview_upper_bound): New.
1612 (new_line_info_table): Initialize symviews_since_reset.
1613 (dwarf2out_source_line): Count symviews_since_reset and set
1614 symview_upper_bound.
1615 (dw_val_equal_p): Handle symview.
1616 (add_AT_symview): New.
1617 (print_dw_val): Handle symview.
1618 (attr_checksum, attr_checksum_ordered): Likewise.
1619 (same_dw_val_p, size_of_die): Likewise.
1620 (value_format, output_die): Likewise.
1621 (add_high_low_attributes): Use add_AT_symview for entry_view.
1622 (dwarf2out_finish): Reset symview_upper_bound, clear
1625 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
1628 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
1629 Add strict argument and use it.
1630 (rs6000_split_multireg_move): Update for new strict argument.
1631 (mem_operand_gpr): Disallow all non-offsettable addresses.
1632 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
1634 2018-03-09 Jakub Jelinek <jakub@redhat.com>
1637 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
1638 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
1639 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
1642 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
1643 decl, use remap_type if we want to use the type.
1645 2018-03-09 Martin Sebor <msebor@redhat.com>
1647 PR tree-optimization/84526
1648 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
1650 (builtin_access::generic_overlap): Be prepared to handle non-array
1653 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
1655 PR rtl-optimization/84682
1656 * lra-constraints.c (process_address_1): Check is_address flag
1657 for address constraints.
1658 (process_alt_operands): Likewise.
1659 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
1660 preprocess_constraints.
1661 * recog.h (preprocess_constraints): Add oploc parameter.
1663 * recog.c (preprocess_constraints): Test address_operand for
1664 CT_ADDRESS constraints.
1666 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
1669 * lra-assigns.c (assign_by_spills): Return a flag of reload
1670 assignment failure. Do not process the reload assignment
1671 failures. Do not spill other reload pseudos if they has the same
1673 (lra_assign): Add a return arg. Set up from the result of
1674 assign_by_spills call.
1675 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
1676 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
1677 usage_insns if it is not NULL.
1678 (spill_hard_reg_in_range): New function.
1679 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
1680 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
1681 function prototypes.
1682 (lra_assign): Change prototype.
1683 * lra.c (lra): Add code to deal with fails by splitting hard reg
1686 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1689 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
1690 Accept complain bool parameter. Only emit errors if it is true.
1691 (arm_parse_cpu_option_name): Likewise.
1692 (arm_target_thumb_only): Adjust callers of the above.
1693 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
1694 prototype to take a default true bool parameter.
1695 (arm_parse_arch_option_name): Likewise.
1697 2018-03-09 David Malcolm <dmalcolm@redhat.com>
1698 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1702 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
1703 * configure: Regenerate.
1704 * configure.ac ("linker --version-script option"): New.
1705 ("linker soname option"): New.
1707 2018-03-09 Richard Biener <rguenther@suse.de>
1709 PR tree-optimization/84775
1710 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
1711 immediate uses of predicate stmts and mark them modified.
1714 PR tree-optimization/84178
1715 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
1717 (version_loop_for_if_conversion): Delay update_ssa call.
1718 (tree_if_conversion): Delay update_ssa until after predicate
1721 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
1724 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
1725 when the function accesses prior frames.
1727 2018-03-08 Jakub Jelinek <jakub@redhat.com>
1730 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
1731 gen_llsym, otherwise call maybe_gen_llsym.
1734 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
1735 has ',' character inside of it.
1737 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1740 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
1741 as clobbering CC_REGNUM.
1743 2018-03-08 Richard Biener <rguenther@suse.de>
1746 * tree-scalar-evolution.c: Include tree-into-ssa.h.
1747 (follow_copies_to_constant): Do not follow SSA names registered
1750 2018-03-08 Richard Biener <rguenther@suse.de>
1752 PR tree-optimization/84178
1753 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
1755 (version_loop_for_if_conversion): Delay update_ssa call.
1756 (tree_if_conversion): Delay update_ssa until after predicate
1759 2018-03-08 David Malcolm <dmalcolm@redhat.com>
1761 PR tree-optimization/84178
1762 * tree-if-conv.c (release_bb_predicate): Remove the
1763 the assertion that the stmts have NULL use_ops.
1764 Discard the statements, asserting that they haven't
1765 yet been added to a BB.
1767 2018-03-08 Richard Biener <rguenther@suse.de>
1769 PR tree-optimization/84746
1770 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
1771 (phi_translate): Pass in destination ANTIC_OUT set.
1772 (phi_translate_1): Likewise. For a simplified result lookup
1773 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
1774 (phi_translate_set): Adjust.
1775 (do_pre_regular_insertion): Likewise.
1776 (do_pre_partial_partial_insertion): Likewise.
1778 2018-03-08 Martin Liska <mliska@suse.cz>
1780 PR gcov-profile/84735
1781 * doc/gcov.texi: Document usage of profile files.
1782 * gcov-io.h: Document changes in the format.
1784 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
1788 * dwarf2out.c (struct dw_line_info_table): Update comments for
1790 (FORCE_RESET_NEXT_VIEW): New.
1791 (FORCE_RESETTING_VIEW_P): New.
1792 (RESETTING_VIEW_P): Check for -1 too.
1793 (ZERO_VIEW_P): Likewise.
1794 (new_line_info_table): Force-reset next view.
1795 (dwarf2out_begin_function): Likewise.
1796 (dwarf2out_source_line): Simplify zero_view_p initialization.
1797 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
1798 view directly. Omit view when omitting .loc at line 0.
1800 2018-03-08 Jakub Jelinek <jakub@redhat.com>
1802 PR tree-optimization/84740
1803 * tree-switch-conversion.c (process_switch): Call build_constructors
1804 only if info.phi_count is non-zero.
1806 PR tree-optimization/84739
1807 * tree-tailcall.c (find_tail_calls): Check call arguments against
1808 DECL_ARGUMENTS (current_function_decl) rather than
1809 DECL_ARGUMENTS (func) when checking for tail recursion.
1811 2018-03-07 Jakub Jelinek <jakub@redhat.com>
1813 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
1814 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
1815 Volker Reichelt's entry and add entries for people that perform
1816 GCC fuzzy testing and report numerous bugs.
1818 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
1821 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
1822 readonly data in sdata, if that is disabled.
1823 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
1824 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
1825 -mreadonly-in-sdata option.
1827 2018-03-07 Martin Sebor <msebor@redhat.com>
1829 PR tree-optimization/84468
1830 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
1831 basic block when looking for nul assignment.
1833 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
1836 * except.h (output_function_exception_table): Adjust prototype.
1837 * except.c (output_function_exception_table): Remove FNNAME parameter
1838 and add SECTION parameter. Ouput one part of the table at a time.
1839 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
1840 the first part of the exception table and emit unwind directives.
1841 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
1842 (i386_pe_seh_cold_init): Likewise.
1843 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
1844 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
1845 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
1846 (ix86_output_call_insn): Emit a nop in one more case for SEH.
1847 * config/i386/winnt.c: Include except.h.
1848 (struct seh_frame_state): Add reg_offset, after_prologue and
1849 in_cold_section fields.
1850 (i386_pe_seh_end_prologue): Set seh->after_prologue.
1851 (i386_pe_seh_cold_init): New function.
1852 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
1853 to seh->in_cold_section.
1854 (seh_emit_push): Record the offset of the push.
1855 (seh_emit_save): Record the offet of the save.
1856 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
1857 Test seh->after_prologue to disregard the epilogue.
1858 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
1859 (i386_pe_end_cold_function): New function.
1861 2018-03-07 Jakub Jelinek <jakub@redhat.com>
1864 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
1865 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
1868 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
1870 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
1871 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
1874 * multiple_target.c: Include tree-inline.h and intl.h.
1875 (expand_target_clones): Diagnose and fail if node->definition and
1876 !tree_versionable_function_p (node->decl).
1878 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
1880 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
1882 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
1883 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
1884 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
1886 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1889 * combine.c (try_combine): Use reg_or_subregno instead of handling
1890 just paradoxical SUBREGs and REGs.
1892 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
1894 * config/arc/arc.c (arc_finalize_pic): Remove function.
1895 (arc_must_save_register): We use single base PIC register, remove
1896 checks to save/restore the PIC register.
1897 (arc_expand_prologue): Likewise.
1898 * config/arc/arc-protos.h (arc_set_default_type_attributes):
1900 (arc_verify_short): Likewise.
1901 (arc_attr_type): Likewise.
1902 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
1903 (walk_stores): Likewise.
1904 (arc_address_cost): Make it static.
1905 (arc_verify_short): Likewise.
1906 (branch_dest): Likewise.
1907 (arc_attr_type): Likewise.
1908 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
1909 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
1910 (arc_final_prescan_insn): Remove inserting the nops due to
1911 hardware hazards. It is done in reorg step.
1912 (insn_length_variant_t): Remove.
1913 (insn_length_parameters_t): Likewise.
1914 (arc_insn_length_parameters): Likewise.
1915 (arc_get_insn_variants): Likewise.
1916 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
1918 2018-03-06 Jakub Jelinek <jakub@redhat.com>
1921 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
1924 PR tree-optimization/84687
1925 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
1927 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
1929 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
1931 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
1932 Rename to ppc_speculation_barrier.
1933 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
1934 __builtin_ppc_speculation_barrier.
1936 2018-03-05 Jakub Jelinek <jakub@redhat.com>
1939 * combine.c (combine_simplify_rtx): Don't try to simplify if
1940 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
1943 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
1945 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
1946 to 32 bytes when compiling for POWER9.
1948 2018-03-05 Jakub Jelinek <jakub@redhat.com>
1951 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
1952 regparm >= 3 with no arg reg available also for calls with
1953 flag_force_indirect_call. Pass decl to ix86_function_regparm.
1956 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
1958 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
1960 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
1963 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
1965 2018-03-05 Richard Biener <rguenther@suse.de>
1967 PR tree-optimization/84486
1968 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
1969 When inserting a __builtin_assume_aligned call set the LHS
1970 SSA name alignment info accordingly.
1972 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
1974 PR tree-optimization/84114
1975 * config/aarch64/aarch64.c (aarch64_reassociation_width)
1976 Avoid reassociation of FLOAT_MODE addition.
1978 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
1980 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
1981 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
1982 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
1983 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
1984 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
1985 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
1986 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
1988 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
1989 __builtin_ia32_wbinvd): New builtins.
1990 (SPECIAL_ARGS2): New.
1991 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
1992 (SPECIAL_ARGS2): New.
1993 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
1994 (ix86_valid_target_attribute_inner_p): Ditto.
1995 (ix86_init_mmx_sse_builtins): Add special_args2.
1996 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
1997 TARGET_WBNOINVD_P): New.
1998 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
1999 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
2000 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
2001 * config/i386/immintrin.h (_wbinvd): New intrinsic.
2002 * config/i386/pconfigintrin.h: New file.
2003 * config/i386/wbnoinvdintrin.h: Ditto.
2004 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
2005 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
2007 2018-03-05 Richard Biener <rguenther@suse.de>
2009 PR tree-optimization/84670
2010 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
2012 (BB_VISITED_WITH_VISITED_SUCCS): New define.
2013 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
2014 (compute_antic_aux): Only assert the number of values in ANTIC_IN
2015 doesn't grow if all successors (recursively) were visited at least
2018 2018-03-05 Richard Biener <rguenther@suse.de>
2020 PR tree-optimization/84650
2021 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
2022 if executed in the loop pipeline.
2024 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
2026 * doc/configfiles.texi (Configuration Files): Move info about
2027 conditionalizing $target-protos.h to...
2028 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
2029 differs from $target-protos.h.
2031 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
2032 Chung-Ju Wu <jasonwucj@gmail.com>
2034 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
2035 * config/nds32/nds32-multiple.md (setmemsi): Define.
2036 * config/nds32/nds32-memory-manipulation.c
2037 (nds32_gen_dup_4_byte_to_word_value): New.
2038 (emit_setmem_word_loop): New.
2039 (emit_setmem_byte_loop): New.
2040 (nds32_expand_setmem_loop): New.
2041 (nds32_expand_setmem_loop_v3m): New.
2042 (nds32_expand_setmem_unroll): New.
2043 (nds32_expand_setmem): New.
2045 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
2046 Chung-Ju Wu <jasonwucj@gmail.com>
2048 * config/nds32/nds32-memory-manipulation.c
2049 (nds32_emit_load_store): New.
2050 (nds32_emit_post_inc_load_store): New.
2051 (nds32_emit_mem_move): New.
2052 (nds32_emit_mem_move_block): New.
2053 (nds32_expand_movmemsi_loop_unknown_size): New.
2054 (nds32_expand_movmemsi_loop_known_size): New.
2055 (nds32_expand_movmemsi_loop): New.
2056 (nds32_expand_movmemsi_unroll): New.
2057 (nds32_expand_movmemqi): Rename ...
2058 (nds32_expand_movmemsi): ... to this.
2059 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
2060 (movmemsi): ... to this.
2061 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
2062 (nds32_expand_movmemsi): ... to this.
2064 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
2065 Monk Chiang <sh.chiang04@gmail.com>
2066 Chung-Ju Wu <jasonwucj@gmail.com>
2068 * config/nds32/nds32-protos.h
2069 (nds32_expand_load_multiple): New arguments.
2070 (nds32_expand_store_multiple): Ditto.
2071 (nds32_valid_multiple_load_store): Rename ...
2072 (nds32_valid_multiple_load_store_p): ... to this.
2073 * config/nds32/nds32-memory-manipulation.c
2074 (nds32_expand_load_multiple): Refine implementation.
2075 (nds32_expand_store_multiple): Ditto.
2076 * config/nds32/nds32-multiple.md
2077 (load_multiple): Update nds32_expand_load_multiple interface.
2078 (store_multiple): Update nds32_expand_store_multiple interface.
2079 * config/nds32/nds32-predicates.c
2080 (nds32_valid_multiple_load_store): Rename ...
2081 (nds32_valid_multiple_load_store_p): ... to this and refine
2083 * config/nds32/predicates.md
2084 (nds32_load_multiple_and_update_address_operation): New predicate.
2085 (nds32_store_multiple_and_update_address_operation): New predicate.
2087 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
2088 Chung-Ju Wu <jasonwucj@gmail.com>
2090 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
2091 (combo): New attribute.
2092 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
2094 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
2096 * config/nds32/nds32.opt: Change -mcmodel= default value.
2098 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
2099 Monk Chiang <sh.chiang04@gmail.com>
2100 Chung-Ju Wu <jasonwucj@gmail.com>
2102 * config/nds32/constants.md (unspec_element): New enum.
2103 * config/nds32/constraints.md (Umw): New constraint.
2104 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
2105 * config/nds32/nds32-intrinsic.md: Likewise.
2106 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
2107 (nds32_valid_smw_lwm_base_p): New.
2108 (nds32_output_smw_single_word): New.
2109 (nds32_output_lmw_single_word): New.
2110 (nds32_expand_unaligned_load): New.
2111 (nds32_expand_unaligned_store): New.
2112 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
2113 (nds32_output_smw_single_word): Declare.
2114 (nds32_output_lmw_single_word): Declare.
2115 (nds32_expand_unaligned_load): Declare.
2116 (nds32_expand_unaligned_store): Declare.
2117 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
2118 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
2119 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
2120 NDS32_BUILTIN_UASTORE_DW.
2121 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
2124 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
2125 Kito Cheng <kito.cheng@gmail.com>
2126 Chung-Ju Wu <jasonwucj@gmail.com>
2128 * config/nds32/nds32-intrinsic.c
2129 (nds32_expand_builtin_null_ftype_reg): Delete.
2130 (nds32_expand_builtin_reg_ftype_imm): Ditto.
2131 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
2132 (nds32_read_argument): New.
2133 (nds32_legitimize_target): Ditto.
2134 (nds32_legitimize_argument): Ditto.
2135 (nds32_check_constant_argument): Ditto.
2136 (nds32_expand_unop_builtin): Ditto.
2137 (nds32_expand_unopimm_builtin): Ditto.
2138 (nds32_expand_binop_builtin): Ditto.
2139 (nds32_builtin_decl_impl): Ditto.
2140 (builtin_description): Ditto.
2141 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
2142 (nds32_init_builtins_impl): Ditto.
2143 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
2144 (nds32_builtin_decl): New.
2145 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
2146 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
2148 2018-03-02 Jeff Law <law@redhat.com>
2150 * reorg.c (stop_search_p): Handle DEBUG_INSN.
2151 (redundant_insn, fill_simple_delay_slots): Likewise.
2152 (fill_slots_from_thread): Likewise.
2153 * resource.c (mark_referenced_resources): Likewise.
2154 (mark_set_resources, find_dead_or_set_registers): Likewise.
2156 2018-03-02 Jakub Jelinek <jakub@redhat.com>
2158 * substring-locations.h (format_warning_va): Formatting fix for
2160 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
2162 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
2163 * substring-locations.c: Include intl.h.
2164 (format_warning_va): Turned into small wrapper around
2165 format_warning_n_va, renamed to ...
2166 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
2167 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
2169 (format_warning_at_substring_n): New function.
2170 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
2171 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
2172 format_warning_at_substring with just a shorter name instead of
2173 const function pointer.
2174 (fmtwarn_n): New function.
2175 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
2176 appropriate, get rid of all the fmtstr temporaries, move conditionals
2177 with G_() wrapped string literals directly into fmtwarn arguments,
2178 cast dir.len to (int), formatting fixes.
2180 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2182 * doc/invoke.texi: Remove "Cilk Plus" references.
2184 2018-03-02 Jakub Jelinek <jakub@redhat.com>
2185 Richard Biener <rguenther@suse.de>
2188 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
2189 for error or warning attributes if CALL_FROM_THUNK_P is set.
2192 2018-03-02 Jakub Jelinek <jakub@redhat.com>
2195 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
2196 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
2199 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
2200 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
2202 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
2203 instead of -1U in last predictors element's probability member.
2205 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
2208 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
2209 arguments if they are comparable.
2211 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
2213 PR tree-optimization/84634
2214 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
2215 masks and masked_loop_p with a single loop_masks, making sure it's
2216 null for bb vectorization.
2218 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
2220 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2221 (vect_analyze_data_ref_access): Use loop->safe_len rather than
2222 loop->force_vectorize to check whether there is no alias.
2224 2018-03-02 Jakub Jelinek <jakub@redhat.com>
2227 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
2229 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
2231 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
2232 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
2233 instead of a loop around prev_real_insn.
2234 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
2238 * config/i386/i386.c (ix86_print_operand): Use conditional
2239 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
2242 2018-03-02 Richard Biener <rguenther@suse.de>
2244 PR tree-optimization/84427
2245 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
2246 (bitmap_set_subtract_values): Rewrite to handle multiple
2249 (prune_clobbered_mems): Likewise.
2250 (phi_translate): Take edge instead of pred/phiblock.
2251 (phi_translate_1): Likewise.
2252 (phi_translate_set): Likewise. Insert all translated
2253 exprs for a value into the set, keeping possibly multiple
2254 expressions per value.
2255 (compute_antic_aux): Adjust for phi_translate changes.
2256 When intersecting union the expressions and prune those
2257 not in the final value set, keeping possibly multiple
2258 expressions per value. Do not use value-insertion
2259 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
2260 all expressions. Add verification that the value-sets
2261 only shrink during iteration.
2262 (compute_partial_antic_aux): Adjust for the phi_translate changes.
2263 (do_pre_regular_insertion): Likewise.
2264 (do_pre_partial_partial_insertion): Likewise.
2266 2018-03-02 Richard Biener <rguenther@suse.de>
2269 * config/darwin.c (saved_debug_info_level): New static global.
2270 (darwin_asm_lto_start): Disable debug info generation for LTO out.
2271 (darwin_asm_lto_end): Restore debug info generation settings.
2273 2018-03-01 Martin Liska <mliska@suse.cz>
2276 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
2279 2018-03-01 Richard Biener <rguenther@suse.de>
2282 * dwarf2out.c (gen_variable_die): Properly handle late VLA
2283 type annotation with LTO when debug was disabled at compile-time.
2285 2018-03-01 Matthew Fortune <mfortune@gmail.com>
2287 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
2289 (mips_final_postscan_insn): Likewise.
2291 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
2293 PR rtl-optimization/84528
2294 * alias.c (init_alias_target): Add commentary.
2295 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
2296 a unique base value if the frame pointer is not eliminated
2297 to the stack pointer.
2299 2018-03-01 Tom de Vries <tom@codesourcery.com>
2301 PR rtl-optimization/83327
2302 * lra-int.h (hard_regs_spilled_into): Declare.
2303 * lra.c (hard_regs_spilled_into): Define.
2304 (init_reg_info): Init hard_regs_spilled_into.
2305 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
2306 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
2307 (process_bb_lives): Handle hard_regs_spilled_into.
2308 (lra_create_live_ranges_1): Before doing liveness propagation, clear
2309 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
2311 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
2313 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
2314 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
2315 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
2316 * config/rs6000/aix72.h: New file.
2318 2018-02-28 Jakub Jelinek <jakub@redhat.com>
2320 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
2321 instead of warning_at with conditional singular and plural messages
2325 * stor-layout.c (update_alignment_for_field): For
2326 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
2327 && !DECL_PACKED (field), do the alignment update, just use
2328 only desired_align instead of MAX (type_align, desired_align)
2330 (place_field): Don't do known_align < desired_align handling
2331 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
2332 is non-NULL, instead do it after rli->prev_field handling and
2333 only if not within a bitfield word. For DECL_PACKED (field)
2334 use type_align of BITS_PER_UNIT.
2336 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2338 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
2339 superfluous parentheses and trailing spaces.
2341 2018-02-28 Richard Biener <rguenther@suse.de>
2343 PR tree-optimization/84584
2344 * graphite-scop-detection.c (scop_detection::add_scop): Discard
2345 SCoPs with fake exit edge.
2347 2018-02-28 Martin Liska <mliska@suse.cz>
2350 * timevar.c (timer::print): Fix format to properly print 100%
2353 2018-02-28 Richard Biener <rguenther@suse.de>
2356 * genmatch.c (capture_info::walk_match): Do not mark
2357 captured expressions without operands as expr_p given
2358 they act more like predicates and should be subject to
2359 "lost tail" side-effect preserving.
2361 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
2363 PR rtl-optimization/81611
2364 * auto-inc-dec.c (attempt_change): Move dead note from
2365 mem_insn if it's the next use of regno
2366 (find_address): Take address use of reg holding
2367 non-incremented value. Add parm to limit search to the named
2369 (merge_in_block): Attempt to use a mem insn that is the next
2370 use of the original regno.
2372 2018-02-27 Martin Sebor <msebor@redhat.com>
2375 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
2376 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
2378 2018-02-27 Martin Sebor <msebor@redhat.com>
2380 PR translation/84207
2381 * diagnostic-core.h (warning_n, error_n, inform_n): Change
2382 n argument to unsigned HOST_WIDE_INT.
2383 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
2384 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
2385 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
2386 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
2388 2018-02-27 Richard Biener <rguenther@suse.de>
2390 PR tree-optimization/84512
2391 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2392 Do not use the estimate returned from record_stmt_cost for
2393 the scalar iteration cost but sum properly using add_stmt_cost.
2395 2018-02-27 Richard Biener <rguenther@suse.de>
2397 PR tree-optimization/84466
2398 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
2399 Adjust last change to less strictly validate use operands.
2401 2018-02-27 Martin Liska <mliska@suse.cz>
2403 PR gcov-profile/84548
2404 * gcov.c (process_file): Allow partial overlap and consider it
2405 also as group functions.
2406 (output_lines): Properly calculate range of lines for a group.
2408 2018-02-27 Martin Liska <mliska@suse.cz>
2410 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
2411 'ggc' suffixes. Change first column width.
2412 (timer::print): Fix formatting of the column.
2414 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
2416 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
2417 preserve inline entry blocks for the sake of debug inline
2418 entry point markers alone.
2419 (remove_unused_locals): Suggest in comments a better place to
2420 force the preservation of inline entry blocks that are
2421 otherwise unused, but do not preserve them.
2423 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
2425 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
2427 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
2430 * config/i386/constraints.md (Bs): Replace
2431 ix86_indirect_branch_register with
2432 TARGET_INDIRECT_BRANCH_REGISTER.
2434 * config/i386/i386.md (indirect_jump): Likewise.
2435 (tablejump): Likewise.
2436 (*sibcall_memory): Likewise.
2437 (*sibcall_value_memory): Likewise.
2438 Peepholes of indirect call and jump via memory: Likewise.
2439 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
2440 (*sibcall_value_GOT_32): Likewise.
2441 * config/i386/predicates.md (indirect_branch_operand): Likewise.
2442 (GOT_memory_operand): Likewise.
2443 (call_insn_operand): Likewise.
2444 (sibcall_insn_operand): Likewise.
2445 (GOT32_symbol_operand): Likewise.
2446 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
2448 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
2450 PR rtl-optimization/83496
2451 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
2452 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
2453 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
2454 redundant insn, if any.
2455 (relax_delay_slots): Likewise.
2456 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
2458 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
2460 PR tree-optimization/83965
2461 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
2462 that grouped statements are part of a reduction chain. Return
2463 true if the statement is not marked as a reduction itself but
2465 (vect_recog_dot_prod_pattern): Don't check whether the statement
2466 is part of a group here.
2467 (vect_recog_sad_pattern): Likewise.
2468 (vect_recog_widen_sum_pattern): Likewise.
2470 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
2473 * final.c (rest_of_clean_state): Also look for calls inside sequences.
2475 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
2478 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
2480 (ix86_output_indirect_function_return): New prototype.
2481 (ix86_split_simple_return_pop_internal): Likewise.
2482 * config/i386/i386.c (indirect_return_via_cx): New.
2483 (indirect_return_via_cx_bnd): Likewise.
2484 (indirect_thunk_name): Handle return va CX_REG.
2485 (output_indirect_thunk_function): Create alias for
2486 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
2487 (ix86_output_indirect_jmp): Remove the bool argument.
2488 (ix86_output_indirect_function_return): New function.
2489 (ix86_split_simple_return_pop_internal): Likewise.
2490 * config/i386/i386.md (*indirect_jump): Don't pass false
2491 to ix86_output_indirect_jmp.
2492 (*tablejump_1): Likewise.
2493 (simple_return_pop_internal): Change it to define_insn_and_split.
2494 Call ix86_split_simple_return_pop_internal to split it for
2496 (simple_return_indirect_internal): Call
2497 ix86_output_indirect_function_return instead of
2498 ix86_output_indirect_jmp.
2500 2018-02-26 Jakub Jelinek <jakub@redhat.com>
2503 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
2504 memset and value initialization afterwards.
2506 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
2508 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
2510 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2513 * common/config/aarch64/aarch64-common.c
2514 (aarch_option_optimization_table[]): Switch
2515 off fomit-frame-pointer
2517 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
2518 Chung-Ju Wu <jasonwucj@gmail.com>
2520 * config/nds32/nds32-multiple.md (load_multiple): Disallow
2522 (store_multiple): Ditto.
2524 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
2526 * config.gcc: Add --with-cpu support for nds32 target.
2527 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
2528 * config/nds32/nds32.opt: Add -mcpu= option.
2530 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
2532 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
2533 isel=yes): Warn for these deprecated options.
2535 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
2537 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
2538 ISA_2_5_MASKS_EMBEDDED.
2540 2018-02-23 Jakub Jelinek <jakub@redhat.com>
2542 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
2543 p->max as pointers rather than using iterative_hash_expr.
2545 2018-02-23 Carl Love <cel@us.ibm.com>
2547 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
2548 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
2550 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
2551 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
2552 P8V_BUILTIN_VEC_VUNSIGNED2.
2554 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
2557 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
2558 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
2560 * lra-constraints.c (curr_insn_transform): Set up
2561 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
2563 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
2564 * lra-eliminations.c (spill_pseudos): Ditto.
2565 (process_insn_for_elimination): Ditto.
2566 * lra-lives.c (reg_early_clobber_p): Use the new macros.
2567 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
2568 LRA_NON_CLOBBERED_ALT.
2570 2018-02-22 Martin Sebor <msebor@redhat.com>
2572 PR tree-optimization/84480
2573 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
2574 to maybe_diag_stxncpy_trunc. Call it.
2575 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
2576 from gimple_fold_builtin_strcpy. Print inlining stack.
2577 (handle_builtin_stxncpy): Print inlining stack.
2578 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
2580 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
2583 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
2584 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
2585 and -fcheck-pointer-bounds are used together.
2586 (indirect_thunk_prefix): New enum.
2587 (indirect_thunk_need_prefix): New function.
2588 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
2589 "_nt" instead of "_bnd" for NOTRACK prefix.
2590 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
2591 (output_indirect_thunk_function): Likewise.
2593 (ix86_code_end): Update output_indirect_thunk_function calls.
2594 (ix86_output_indirect_branch_via_reg): Replace
2595 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
2596 (ix86_output_indirect_branch_via_push): Likewise.
2597 (ix86_output_function_return): Likewise.
2598 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
2599 incompatible with -fcf-protection=branch and
2600 -fcheck-pointer-bounds.
2602 2018-02-22 Steve Ellcey <sellcey@cavium.com>
2605 * config/aarch64/aarch64.c (aarch64_print_address_internal):
2606 Change gcc_assert call to output_operand_lossage.
2608 2018-02-22 Steve Ellcey <sellcey@cavium.com>
2610 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
2612 2018-02-22 DJ Delorie <dj@redhat.com>
2613 Sebastian Perta <sebastian.perta@renesas.com>
2614 Oleg Endo <olegendo@gcc.gnu.org>
2616 * config/rx/rx.c (rx_rtx_costs): New function.
2617 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
2619 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
2621 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
2623 2018-02-22 Martin Liska <mliska@suse.cz>
2626 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
2627 Add "native" as a possible value.
2629 2018-02-22 Martin Liska <mliska@suse.cz>
2632 * config/i386/i386.c (ix86_option_override_internal):
2633 Add "native" as a possible value for -march and -mtune.
2635 2018-02-22 Jakub Jelinek <jakub@redhat.com>
2638 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
2639 to all type variants.
2641 PR tree-optimization/84503
2642 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
2643 width as info->bitpos + info->bitsize - start.
2644 (merged_store_group::merge_overlapping): Simplify width computation.
2645 (check_no_overlap): New function.
2646 (imm_store_chain_info::try_coalesce_bswap): Compute expected
2647 start + width and last_order of the group, fail if check_no_overlap
2649 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
2650 to group if check_no_overlap fails.
2652 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
2654 * config/rs6000/altivec.md: Delete contraint arguments to
2655 define_expand, define_split, and define_peephole2, and in
2656 define_insn_and_split if always unused.
2657 * config/rs6000/darwin.md: Ditto.
2658 * config/rs6000/dfp.md: Ditto.
2659 * config/rs6000/rs6000.md: Ditto.
2660 * config/rs6000/sync.md: Ditto.
2661 * config/rs6000/vector.md: Ditto.
2662 * config/rs6000/vsx.md: Ditto.
2664 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
2666 * config/rs6000/altivec.md: Write output control strings as braced
2667 blocks instead of double-quoted strings.
2668 * config/rs6000/darwin.md: Ditto.
2669 * config/rs6000/rs6000.md: Ditto.
2670 * config/rs6000/vector.md: Ditto.
2671 * config/rs6000/vsx.md: Ditto.
2673 2018-02-21 Jason Merrill <jason@redhat.com>
2675 PR c++/84314 - ICE with templates and fastcall attribute.
2676 * attribs.c (build_type_attribute_qual_variant): Remove assert.
2678 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
2680 * ipa-cp.c (determine_versionability): Fix comment typos.
2682 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
2685 * ipa-cp.c (determine_versionability): Do not version functions caling
2688 2018-02-21 Martin Liska <mliska@suse.cz>
2691 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
2692 Add "native" as a possible value.
2693 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
2694 the macro when native cpu detection is available.
2696 2018-02-21 Martin Liska <mliska@suse.cz>
2699 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
2700 Add "native" as a possible value.
2701 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
2702 when native cpu detection is available.
2704 2018-02-21 Jakub Jelinek <jakub@redhat.com>
2705 Martin Sebor <msebor@redhat.com>
2707 PR tree-optimization/84478
2708 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
2710 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
2711 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
2712 support which is conservatively correct, for 2 only stay conservative
2713 for maxlen. Formatting and comment capitalization fixes. Add STRICT
2714 argument to the 2 argument get_range_strlen, adjust 6 arg
2715 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
2717 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
2718 (gimple_fold_builtin_strlen): Pass true as last argument to
2721 2018-02-20 Martin Sebor <msebor@redhat.com>
2724 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
2725 (builtin_memref::set_base_and_offset): Same. Handle inner references.
2726 (builtin_memref::builtin_memref): Factor out parts into
2727 set_base_and_offset and call it.
2729 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
2732 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
2733 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
2734 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
2735 search at the associated MODE_INT.
2737 2018-02-20 Jeff Law <law@redhat.com>
2740 PR tree-optimization/81592
2742 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
2743 for range data rather than using global data.
2744 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
2745 range data rather than using global data.
2746 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
2747 pass it to children as needed.
2748 (struct directive::fmtresult): Similarly.
2749 (struct directive::set_width): Similarly.
2750 (struct directive::set_precision): Similarly.
2751 (format_integer, format_directive, parse_directive): Similarly.
2752 (format_none): Accept unnamed vr_values parameter.
2753 (format_percent, format_floating, format_character): Similarly.
2754 (format_string, format_plain): Similarly.
2755 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
2756 the EVRP range analyzer for range data rather than using global data.
2757 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
2758 gimple-ssa-evrp-analyze.h
2759 (class sprintf_dom_walker): Add after_dom_children member function.
2760 Add evrp_range_analyzer member.
2761 (sprintf_dom_walker::before_dom_children): Call into the EVRP
2762 range analyzer as needed.
2763 (sprintf_dom_walker::after_dom_children): New member function.
2764 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
2766 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
2767 (evrp_range_analyzer::pop_to_marker): Likewise.
2769 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
2771 PR tree-optimization/84419
2772 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
2773 with the required type if its current type is compatible but
2776 2018-02-20 Jakub Jelinek <jakub@redhat.com>
2779 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
2780 after vectorization.
2782 2018-02-20 Martin Liska <mliska@suse.cz>
2785 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
2786 possible values if we don't have a hint.
2788 2018-02-20 Martin Liska <mliska@suse.cz>
2792 * final.c (shorten_branches): Build align_tab array with one
2794 * opts.c (finish_options): Add alignment option limit check.
2795 (MAX_CODE_ALIGN): Likewise.
2796 (MAX_CODE_ALIGN_VALUE): Likewise.
2797 * doc/invoke.texi: Document maximum allowed option value for
2798 all -falign-* options.
2800 2018-02-19 Jakub Jelinek <jakub@redhat.com>
2803 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
2804 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
2805 * var-tracking.c (emit_note_insn_var_location): Remove all references
2806 to NOTE_INSN_CALL_ARG_LOCATION.
2807 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
2808 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
2809 Use copy_rtx_if_shared.
2810 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
2811 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
2812 (dwarf2out_var_location): Remove handling of
2813 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
2815 * final.c (final_scan_insn): Remove all references to
2816 NOTE_INSN_CALL_ARG_LOCATION.
2817 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
2818 before dumping final insns.
2819 * except.c (emit_note_eh_region_end): Remove all references to
2820 NOTE_INSN_CALL_ARG_LOCATION.
2821 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
2822 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
2823 * config/arc/arc.c (hwloop_optimize): Likewise.
2824 * config/arm/arm.c (create_fix_barrier): Likewise.
2825 * config/s390/s390.c (s390_chunkify_start): Likewise.
2826 * config/sh/sh.c (find_barrier): Likewise.
2827 * config/i386/i386.c (rest_of_insert_endbranch,
2828 ix86_seh_fixup_eh_fallthru): Likewise.
2829 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
2830 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
2831 * config/frv/frv.c (frv_function_prologue): Likewise.
2832 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
2834 (note_outside_basic_block_p): Remove all references to
2835 NOTE_INSN_CALL_ARG_LOCATION.
2836 * gengtype.c (adjust_field_rtx_def): Likewise.
2837 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
2839 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
2840 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
2843 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
2846 PR tree-optimization/84452
2847 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
2848 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
2851 2018-02-19 Martin Liska <mliska@suse.cz>
2854 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
2856 2018-02-19 Martin Liska <mliska@suse.cz>
2857 Richard Sandiford <richard.sandiford@linaro.org>
2859 PR tree-optimization/82491
2860 * gimple-fold.c (get_base_constructor): Make earlier bail out
2863 2018-02-19 Carl Love <cel@us.ibm.com>
2865 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
2866 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
2868 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
2869 P8V_BUILTIN_VEC_NEG.
2871 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
2873 * config/rl78/rl78.md (movdf): New define expand.
2875 2018-02-19 Martin Liska <mliska@suse.cz>
2878 * doc/invoke.texi: Fix typo.
2879 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
2881 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
2883 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
2884 handle rs6000_single_float and rs6000_double_float specially for
2887 2018-02-16 Jeff Law <law@redhat.com>
2889 * config/rx/rx.c (add_pop_cfi_notes): New function.;
2892 2018-02-16 Jakub Jelinek <jakub@redhat.com>
2895 * ipa-inline.c (inline_small_functions): Fix a typo.
2897 2018-02-16 Nathan Sidwell <nathan@acm.org>
2899 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
2901 2018-02-16 Carl Love <cel@us.ibm.com>
2903 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
2904 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
2905 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
2906 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
2907 expansion to P8V_BUILTIN_VEC_FLOAT2.
2909 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
2911 PR rtl-optimization/70023
2912 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
2913 src_regno into account.
2915 2018-02-16 Carl Love <cel@us.ibm.com>
2917 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
2918 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
2919 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
2920 * config/rs6000/rs6000.c: Remove case statements for
2921 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
2922 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
2923 and P9V_BUILTIN_VEC_VINSERT4B.
2924 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
2925 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
2926 * config/rs6000/vsx.md:
2927 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
2930 2018-02-16 Carl Love <cel@us.ibm.com>
2932 * config/rs6000/altivec.h: Add builtin names vec_extract4b
2934 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
2936 * config/rs6000/rs6000-c.c: Add the definitions for
2937 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
2938 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
2939 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
2940 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
2941 definition for insert4b and define insn *insert3b_internal.
2942 * doc/extend.texi: Add documentation for vec_extract4b.
2944 2018-02-16 Nathan Sidwell <nathan@acm.org>
2946 * doc/extend.texi (Backwards Compatibility): Mention friend
2947 injection. Note for-scope is deprecated.
2948 * doc/invoke.texi (-ffriend-injection): Deprecate.
2950 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
2952 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
2953 that moved to I2, also allow destinations that are a paradoxical
2954 subreg (instead of a normal reg).
2956 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
2959 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
2962 2018-02-16 Richard Biener <rguenther@suse.de>
2964 PR tree-optimization/84037
2965 PR tree-optimization/84016
2967 * config/i386/i386.c (ix86_builtin_vectorization_cost):
2968 Adjust vec_construct for the fact we need additional higher latency
2969 128bit inserts for AVX256 and AVX512 vector builds.
2970 (ix86_add_stmt_cost): Scale vector construction cost for
2973 2018-02-16 Richard Biener <rguenther@suse.de>
2975 PR tree-optimization/84417
2976 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
2977 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
2978 (non_rewritable_lvalue_p): Likewise, use poly-ints.
2980 2018-02-16 Martin Liska <mliska@suse.cz>
2983 * internal-fn.def (ASAN_CHECK): Set proper flags.
2984 (ASAN_MARK): Likewise.
2986 2018-02-16 Julia Koval <julia.koval@intel.com>
2988 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
2989 from PTA_CANNONLAKE.
2991 2018-02-16 Jakub Jelinek <jakub@redhat.com>
2994 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
2995 Use ++iter rather than iter++ for std::list iterators.
2996 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
2997 defer deleting them until all nodes in the forest are processed. Do
2998 free even leaf nodes. Change to_process into auto_vec.
3001 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
3002 * vec.h (vec_default_construct): Use memset instead of placement new
3003 if BROKEN_VALUE_INITIALIZATION is defined.
3004 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
3005 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
3008 PR rtl-optimization/83723
3009 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
3010 * lra.c (lra_substitute_pseudo): Likewise. If true, use
3011 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
3013 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
3015 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
3017 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
3019 PR rtl-optimization/81443
3020 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
3021 from inner REGs to paradoxical SUBREGs.
3023 2018-02-16 Richard Biener <rguenther@suse.de>
3025 PR tree-optimization/84399
3026 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
3027 For operands we can analyze at their definition make sure we can
3028 analyze them at each use as well.
3030 2018-02-16 Richard Biener <rguenther@suse.de>
3032 PR tree-optimization/84190
3033 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
3034 volatile accesses if the decl isn't volatile.
3036 2018-02-15 Jason Merrill <jason@redhat.com>
3038 PR c++/84314 - ICE with templates and fastcall attribute.
3039 * attribs.c (build_type_attribute_qual_variant): Don't clobber
3040 TYPE_CANONICAL on an existing type.
3042 2018-02-15 Jakub Jelinek <jakub@redhat.com>
3044 PR tree-optimization/84383
3045 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
3046 dstoff nor call operand_equal_p if dstbase is NULL.
3048 PR tree-optimization/84334
3049 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
3050 also a CONSTANT_CLASS_P, punt.
3052 2018-02-14 Jim Wilson <jimw@sifive.com>
3054 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
3055 first SMALL_OPERAND check. New local min_second_step. Move assert
3056 to where locals are set. Add TARGET_RVC support.
3057 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
3059 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
3061 * doc/invoke.texi: Correct -Wformat-overflow code sample.
3063 2018-02-14 Martin Sebor <msebor@redhat.com>
3065 PR tree-optimization/83698
3066 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
3067 arrays constrain the offset range to their bounds.
3068 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
3069 (builtin_access::overlap): Avoid setting the size of overlap if it's
3071 (maybe_diag_overlap): Also consider arrays when deciding what values
3072 of offsets to include in diagnostics.
3074 2018-02-14 Martin Sebor <msebor@redhat.com>
3077 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
3078 that correspond to the kind of a declaration.
3080 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
3083 * config/pa/pa.md: Load address of PIC label using the linkage table
3084 if the label is nonlocal.
3086 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
3088 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
3089 warning message if user requests -maltivec=be.
3090 * doc/invoke.texi: Document deprecation of -maltivec=be.
3092 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
3095 * config/rs6000/rs6000-c.c: Update definitions for
3096 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
3097 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
3099 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
3102 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
3103 add _get_ssp intrinsics. Remove argument from
3104 __builtin_ia32_rdssp[d|q].
3105 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
3106 * config/i386/i386-builtin.def: Remove argument from
3107 __builtin_ia32_rdssp[d|q].
3108 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
3109 ix86_expand_special_args_builtin for _rdssp[d|q].
3110 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
3111 Clear register before usage.
3112 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
3113 Add documentation for new _get_ssp and _inc_ssp intrinsics.
3115 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
3117 PR tree-optimization/84357
3118 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
3119 operand 1 of an ARRAY_REF too.
3121 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
3124 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
3125 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
3127 (set_of_reg): New struct.
3128 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
3129 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
3130 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
3132 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
3133 Split into bitclr, bitset, bitinvert patterns if appropriate.
3134 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
3135 use rx_fuse_in_memory_bitop.
3136 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
3137 to named insn, correct maximum insn length.
3139 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
3142 * machmode.def: Define a complex mode for PARTIAL_INT.
3143 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
3145 * doc/rtl.texi: Document CSPImode.
3146 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
3148 (msp430_hard_regno_nregs_with_padding): Likewise.
3150 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
3153 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
3155 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
3157 PR rtl-optimization/84169
3158 * combine.c (try_combine): New variable split_i2i3. Set it to true if
3159 we generated a parallel as new i3 and we split that to new i2 and i3
3160 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
3161 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
3162 those to i2, not i1. Partially rewrite this scan code.
3164 2018-02-13 Jakub Jelinek <jakub@redhat.com>
3167 * stor-layout.c (place_field): For variable length fields, adjust
3168 offset_align afterwards not just based on the field's alignment,
3169 but also on the size.
3172 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
3173 of exps and logs in the use_exp2 case.
3175 2018-02-13 Jeff Law <law@redhat.com>
3177 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
3180 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
3183 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
3187 * common.opt (gas-loc-support, gas-locview-support): New.
3188 (ginline-points, ginternal-reset-location-views): New.
3189 * doc/invoke.texi: Document them. Use @itemx where intended.
3190 (gvariable-location-views): Adjust.
3191 * target.def (reset_location_view): New.
3192 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
3193 (TARGET_RESET_LOCATION_VIEW): New.
3194 * doc/tm.texi: Rebuilt.
3195 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
3196 (dwarf2out_default_as_locview_support): New.
3197 (output_asm_line_debug_info): Use option variables.
3198 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
3199 (output_loc_list): Likewise.
3200 (add_high_low_attributes): Check option variables.
3201 Don't output entry view attribute in strict mode.
3202 (gen_inlined_subroutine_die): Check option variables.
3203 (dwarf2out_inline_entry): Likewise.
3204 (init_sections_and_labels): Likewise.
3205 (dwarf2out_early_finish): Likewise.
3206 (maybe_reset_location_view): New, from...
3207 (dwarf2out_var_location): ... here. Call it.
3208 * debug.h (dwarf2out_default_as_loc_support): Declare.
3209 (dwarf2out_default_as_locview_support): Declare.
3210 * hooks.c (hook_int_rtx_insn_0): New.
3211 * hooks.h (hook_int_rtx_insn_0): Declare.
3212 * toplev.c (process_options): Take -gas-loc-support and
3213 -gas-locview-support from dwarf2out. Enable
3214 -gvariable-location-views by default only with locview
3215 assembler support. Enable -ginternal-reset-location-views by
3216 default only if the target defines the corresponding hook.
3217 Enable -ginline-points by default if location views are
3218 enabled; force it disabled if statement frontiers are
3220 * tree-inline.c (expand_call_inline): Check option variables.
3221 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3223 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3225 PR tree-optimization/84321
3226 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
3227 handling. Also check whether the anti-range contains any values
3228 that satisfy the mask; switch to a VR_RANGE if not.
3230 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
3233 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
3235 2018-02-13 Martin Jambor <mjambor@suse.cz>
3238 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
3239 of call statements, also set location of a load to a temporary.
3241 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
3243 * config/rl78/rl78.c (add_vector_labels): New function.
3244 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
3245 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
3246 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
3247 which checks that no arguments are passed.
3248 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
3249 * doc/extend.texi: Documentation for the new attribute.
3251 2018-02-13 Andreas Schwab <schwab@suse.de>
3253 * config/riscv/linux.h (CPP_SPEC): Define.
3255 2018-02-13 Jakub Jelinek <jakub@redhat.com>
3258 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
3259 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
3260 OPTION_MASK_ISA_AES as first argument to def_builtin_const
3261 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
3262 instead of OPTION_MASK_ISA_PCLMUL as first argument to
3263 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
3264 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
3265 temporarily for AES and PCLMUL builtins.
3267 PR tree-optimization/84339
3268 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
3269 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
3273 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
3274 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
3275 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
3277 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
3279 * omp-simd-clone.h: New file.
3280 * omp-simd-clone.c: Include omp-simd-clone.h.
3281 (expand_simd_clones): No longer static.
3282 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
3283 cgraph.h and omp-simd-clone.h.
3284 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
3285 (vect_recog_widen_shift_pattern): Formatting fix.
3286 (vect_pattern_recog_1): Don't check optab for calls.
3289 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
3290 operands[2] into a REG before using gen_lowpart on it.
3292 2018-02-12 Jeff Law <law@redhat.com>
3295 * config/sh/sh.c (find_barrier): Consider a sibling call
3298 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
3299 successfully back substituting a reg.
3301 2018-02-12 Richard Biener <rguenther@suse.de>
3303 PR tree-optimization/84037
3304 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
3305 parameter, move visited init to caller.
3306 (vect_slp_analyze_operations): Separate cost from validity
3307 check, initialize visited once for all instances.
3308 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
3310 * tree-vect-stmts.c (vect_model_simple_cost): Make early
3312 (vect_model_promotion_demotion_cost): Likewise.
3313 (vectorizable_bswap): Guard cost modeling with !slp_node
3314 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
3316 (vectorizable_call): Likewise.
3317 (vectorizable_conversion): Likewise.
3318 (vectorizable_assignment): Likewise.
3319 (vectorizable_shift): Likewise.
3320 (vectorizable_operation): Likewise.
3321 (vectorizable_store): Likewise.
3322 (vectorizable_load): Likewise.
3323 (vectorizable_condition): Likewise.
3324 (vectorizable_comparison): Likewise.
3326 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
3329 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
3330 (ASAN_MARK): Fix fnspec to account for return value, change pointer
3331 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
3333 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
3336 * params.def (inline-min-speedup): Increase from 8 to 15.
3337 (max-inline-insns-auto): Decrease from 40 to 30.
3338 * ipa-split.c (consider_split): Add some buffer for function to
3339 be considered inlining candidate.
3340 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
3343 2018-02-12 Richard Biener <rguenther@suse.de>
3345 PR tree-optimization/84037
3346 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
3347 matched stmts if we cannot swap the non-matched ones.
3349 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
3351 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
3352 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
3353 _mm_maskz_scalef_round_ss): New intrinsics.
3354 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
3355 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
3356 __builtin_ia32_scalefss_round): Remove.
3357 (__builtin_ia32_scalefsd_mask_round,
3358 __builtin_ia32_scalefss_mask_round): New intrinsics.
3359 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
3360 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
3361 ((match_operand:VF_128 2 "<round_nimm_predicate>"
3362 "<round_constraint>")): Changed to ...
3363 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
3364 "<round_scalar_constraint>")): ... this.
3365 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
3366 %0, %1, %2<round_op3>}"): Changed to ...
3367 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
3368 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
3369 %2<round_scalar_mask_op3>}"): ... this.
3370 * config/i386/subst.md (round_scalar_nimm_predicate): New.
3372 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
3374 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
3375 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
3376 (_mm_maskz_sqrt_round_ss): New intrinsics.
3377 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
3378 (__builtin_ia32_sqrtsd_mask_round)
3379 (__builtin_ia32_sqrtss_mask_round): New builtins.
3380 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
3381 (__builtin_ia32_sqrtss_round): Remove.
3382 (__builtin_ia32_sqrtsd_mask_round)
3383 (__builtin_ia32_sqrtss_mask_round): New builtins.
3384 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
3385 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
3386 ((match_operand:VF_128 1 "vector_operand"
3387 "xBm,<round_constraint>")): Changed to ...
3388 ((match_operand:VF_128 1 "vector_operand"
3389 "xBm,<round_scalar_constraint>")): ... this.
3390 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
3391 %0, %2, %<iptr>1<round_op3>}): Changed to ...
3392 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
3393 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
3394 %<iptr>1<round_scalar_mask_op3>}): ... this.
3395 ((set_attr "prefix" "<round_prefix>")): Changed to ...
3396 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
3398 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
3401 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
3402 Cast vec_cmpeq result to correct type.
3403 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
3404 Cast vec_cmpgt result to correct type.
3406 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
3408 * final.c (final_scan_insn_1): Renamed from...
3409 (final_scan_insn): ... this. New wrapper, to recover
3410 seen from the outermost call in recursive ones.
3411 * config/sparc/sparc.c (output_return): Drop seen from call.
3412 (output_sibcall): Likewise.
3413 * config/visium/visium.c (output_branch): Likewise.
3415 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
3417 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
3420 2018-02-10 Alan Modra <amodra@gmail.com>
3423 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
3424 Specify LR as an input.
3426 2018-02-10 Jakub Jelinek <jakub@redhat.com>
3429 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
3430 remove_member_access_dummy_vars): New functions.
3431 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
3432 lower_omp_1, execute_lower_omp): Use them.
3434 PR rtl-optimization/84308
3435 * shrink-wrap.c (spread_components): Release todo vector.
3437 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
3439 PR rtl-optimization/57193
3440 * ira-color.c (struct allocno_color_data): Add member
3441 conflict_allocno_hard_prefs.
3442 (update_conflict_allocno_hard_prefs): New.
3443 (bucket_allocno_compare_func): Add a preference based on
3444 conflict_allocno_hard_prefs.
3445 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
3446 (color_allocnos): Remove a dead code. Initiate
3447 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
3449 2018-02-09 Jakub Jelinek <jakub@redhat.com>
3452 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
3453 constraint from =wa to wa. Avoid a subreg on the output operand,
3454 instead use a pseudo and subreg it in a move.
3455 (p9_xxbrd_<mode>): Changed to ...
3456 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
3457 (p9_xxbrd_v2df): New expander.
3458 (p9_xxbrw_<mode>): Changed to ...
3459 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
3460 (p9_xxbrw_v4sf): New expander.
3462 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
3464 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
3466 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
3469 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
3470 multiply in 32-bit mode.
3471 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
3472 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
3475 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
3477 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
3478 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
3479 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
3480 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
3482 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
3485 * dwarf2out.c (is_trivial_indirect_ref): New function.
3486 (dwarf2out_late_global_decl): Do not generate a location
3487 attribute for variables that have a non-trivial DECL_VALUE_EXPR
3488 and that are not defined in the current unit.
3490 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3492 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
3493 instead of a libcall for UNORDERED.
3495 2018-02-09 Tamar Christina <tamar.christina@arm.com>
3498 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
3499 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
3501 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3504 * config/s390/s390.c (s390_set_current_function): Invoke
3505 s390_indirect_branch_settings also if fndecl didn't change.
3507 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
3509 * config/rs6000/rs6000.md (blockage): Set length to zero.
3511 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3513 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
3515 2018-02-09 Jakub Jelinek <jakub@redhat.com>
3518 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
3519 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
3523 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
3524 PARALLEL incoming that failed vt_get_decl_and_offset check.
3527 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
3528 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
3530 (get_variable_section): For decls in named .bss* sections pass true as
3531 second argument to bss_initializer_p.
3533 2018-02-09 Marek Polacek <polacek@redhat.com>
3534 Jakub Jelinek <jakub@redhat.com>
3537 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
3538 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
3539 Sync some changes from cxx_fold_indirect_ref.
3541 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
3543 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
3545 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
3546 (BLOCK_INLINE_ENTRY_LABEL): New.
3547 (dwarf2out_var_location): Disregard inline entry markers.
3548 (inline_entry_data): New struct.
3549 (inline_entry_data_hasher): New hashtable type.
3550 (inline_entry_data_hasher::hash): New.
3551 (inline_entry_data_hasher::equal): New.
3552 (inline_entry_data_table): New variable.
3553 (add_high_low_attributes): Add DW_AT_entry_pc and
3554 DW_AT_GNU_entry_view attributes if a pending entry is found
3555 in inline_entry_data_table. Add old entry_pc attribute only
3556 if debug nonbinding markers are disabled.
3557 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
3558 markers are enabled.
3559 (block_within_block_p, dwarf2out_inline_entry): New.
3560 (dwarf2out_finish): Check that no entries remained in
3561 inline_entry_data_table.
3562 * final.c (reemit_insn_block_notes): Handle inline entry notes.
3563 (final_scan_insn, notice_source_line): Likewise.
3564 (rest_of_clean_state): Skip inline entry markers.
3565 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
3567 * gimple.c (gimple_build_debug_inline_entry): New.
3568 * gimple.h (enum gimple_debug_subcode): Add
3569 GIMPLE_DEBUG_INLINE_ENTRY.
3570 (gimple_build_debug_inline_entry): Declare.
3571 (gimple_debug_inline_entry_p): New.
3572 (gimple_debug_nonbind_marker_p): Adjust.
3573 * insn-notes.def (INLINE_ENTRY): New.
3574 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
3575 inline entry marker notes.
3576 (print_insn): Likewise.
3577 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
3578 (INSN_DEBUG_MARKER_KIND): Likewise.
3579 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
3580 * tree-inline.c (expand_call_inline): Build and insert
3581 debug_inline_entry stmt.
3582 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
3583 inline entry blocks early, if nonbind markers are enabled.
3584 (dump_scope_block): Dump fragment info.
3585 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
3586 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
3587 (gimple_build_debug_inline_entry): New.
3588 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
3589 Enable/disable inline entry points too.
3590 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
3591 (DEBUG_INSN): Describe inline entry markers.
3593 * common.opt (gvariable-location-views): New.
3594 (gvariable-location-views=incompat5): New.
3595 * config.in: Rebuilt.
3596 * configure: Rebuilt.
3597 * configure.ac: Test assembler for view support.
3598 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
3599 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
3600 * dwarf2out.c (var_loc_view): New typedef.
3601 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
3602 (dwarf2out_locviews_in_attribute): New.
3603 (dwarf2out_locviews_in_loclist): New.
3604 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
3605 (enum dw_line_info_opcode): Add LI_adv_address.
3606 (struct dw_line_info_table): Add view.
3607 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
3608 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
3609 (zero_view_p): New variable.
3610 (ZERO_VIEW_P): New macro.
3611 (output_asm_line_debug_info): New.
3612 (struct var_loc_node): Add view.
3613 (add_AT_view_list, AT_loc_list): New.
3614 (add_var_loc_to_decl): Add view param. Test it against last.
3615 (new_loc_list): Add view params. Record them.
3616 (AT_loc_list_ptr): Handle loc and view lists.
3617 (view_list_to_loc_list_val_node): New.
3618 (print_dw_val): Handle dw_val_class_view_list.
3619 (size_of_die): Likewise.
3620 (value_format): Likewise.
3621 (loc_list_has_views): New.
3622 (gen_llsym): Set vl_symbol too.
3623 (maybe_gen_llsym, skip_loc_list_entry): New.
3624 (dwarf2out_maybe_output_loclist_view_pair): New.
3625 (output_loc_list): Output view list or entries too.
3626 (output_view_list_offset): New.
3627 (output_die): Handle dw_val_class_view_list.
3628 (output_dwarf_version): New.
3629 (output_compilation_unit_header): Use it.
3630 (output_skeleton_debug_sections): Likewise.
3631 (output_rnglists, output_line_info): Likewise.
3632 (output_pubnames, output_aranges): Update version comments.
3633 (output_one_line_info_table): Output view numbers in asm comments.
3634 (dw_loc_list): Determine current endview, pass it to new_loc_list.
3635 Call maybe_gen_llsym.
3636 (loc_list_from_tree_1): Adjust.
3637 (add_AT_location_description): Create view list attribute if
3638 needed, check it's absent otherwise.
3639 (convert_cfa_to_fb_loc_list): Adjust.
3640 (maybe_emit_file): Call output_asm_line_debug_info for test.
3641 (dwarf2out_var_location): Reset views as needed. Precompute
3642 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
3643 attribute. Set view.
3644 (new_line_info_table): Reset next view.
3645 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
3646 (dwarf2out_source_line): Likewise. Output view resets and labels to
3647 the assembler, or select appropriate line info opcodes.
3648 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
3649 (optimize_string_length): Catch it. Adjust.
3650 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
3651 dw_val_class_view_list, and remove it if no longer needed.
3652 (hash_loc_list): Hash view numbers.
3653 (loc_list_hasher::equal): Compare them.
3654 (optimize_location_lists): Check whether a view list symbol is
3655 needed, and whether the locview attribute is present, and
3656 whether they match. Remove the locview attribute if no longer
3658 (index_location_lists): Call skip_loc_list_entry for test.
3659 (dwarf2out_finish): Call output_asm_line_debug_info for test.
3660 Use output_dwarf_version.
3661 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
3662 (struct dw_val_node): Add val_view_list.
3663 * final.c (SEEN_NEXT_VIEW): New.
3664 (set_next_view_needed): New.
3665 (clear_next_view_needed): New.
3666 (maybe_output_next_view): New.
3667 (final_start_function): Rename to...
3668 (final_start_function_1): ... this. Take pointer to FIRST,
3669 add SEEN parameter. Emit param bindings in the initial view.
3670 (final_start_function): Reintroduce SEEN-less interface.
3671 (final): Rename to...
3672 (final_1): ... this. Take SEEN parameter. Output final pending
3673 next view at the end.
3674 (final): Reintroduce seen-less interface.
3675 (final_scan_insn): Output pending next view before switching
3676 sections or ending a block. Mark the next view as needed when
3677 outputting variable locations. Notify debug backend of section
3678 changes, and of location view changes.
3679 (rest_of_handle_final): Adjust.
3680 * toplev.c (process_options): Autodetect value for debug variable
3681 location views option. Warn on incompat5 without -gdwarf-5.
3682 * doc/invoke.texi (gvariable-location-views): New.
3683 (gvariable-location-views=incompat5): New.
3684 (gno-variable-location-views): New.
3686 2018-02-08 David Malcolm <dmalcolm@redhat.com>
3688 PR tree-optimization/84136
3689 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
3690 that the result of find_edge is non-NULL.
3692 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
3695 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
3696 storing integer register in SImode. Fix cost of 256 and 512
3697 byte aligned SSE register store.
3699 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
3701 * config/i386/i386.c (ix86_multiplication_cost): Fix
3702 multiplication cost for TARGET_AVX512DQ.
3704 2018-02-08 Marek Polacek <polacek@redhat.com>
3706 PR tree-optimization/84238
3707 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
3710 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
3712 PR tree-optimization/84265
3713 * tree-vect-stmts.c (vectorizable_store): Don't treat
3714 VMAT_CONTIGUOUS accesses as grouped.
3715 (vectorizable_load): Likewise.
3717 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
3719 PR tree-optimization/81635
3720 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
3721 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
3722 (test_round_for_mask): New functions.
3723 (wide_int_cc_tests): Call test_round_for_mask.
3724 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
3725 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
3726 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
3727 range returned by get_range_info.
3729 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
3732 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
3733 * symtab.c: Include builtins.h
3734 (symtab_node::output_to_lto_symbol_table_p): Move here
3735 from lto-streamer-out.c:output_symbol_p.
3736 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
3737 (output_symbol_p): Move all logic to symtab.c
3738 (produce_symtab): Update.
3740 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3742 * config/s390/s390-opts.h (enum indirect_branch): Define.
3743 * config/s390/s390-protos.h (s390_return_addr_from_memory)
3744 (s390_indirect_branch_via_thunk)
3745 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
3746 (enum s390_indirect_branch_type): Define.
3747 * config/s390/s390.c (struct s390_frame_layout, struct
3748 machine_function): Remove.
3749 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
3750 (indirect_branch_table_label_no, indirect_branch_table_name):
3752 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
3753 (enum s390_indirect_branch_option): Define.
3754 (s390_return_addr_from_memory): New function.
3755 (s390_handle_string_attribute): New function.
3756 (s390_attribute_table): Add new attribute handler.
3757 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
3758 (s390_indirect_branch_via_thunk): New function.
3759 (s390_indirect_branch_via_inline_thunk): New function.
3760 (s390_function_ok_for_sibcall): When jumping via thunk disallow
3761 sibling call optimization for non z10 compiles.
3762 (s390_emit_call): Force indirect branch target to be a single
3763 register. Add r1 clobber for non-z10 compiles.
3764 (s390_emit_epilogue): Emit return jump via return_use expander.
3765 (s390_reorg): Handle JUMP_INSNs as execute targets.
3766 (s390_option_override_internal): Perform validity checks for the
3767 new command line options.
3768 (s390_indirect_branch_attrvalue): New function.
3769 (s390_indirect_branch_settings): New function.
3770 (s390_set_current_function): Invoke s390_indirect_branch_settings.
3771 (s390_output_indirect_thunk_function): New function.
3772 (s390_code_end): Implement target hook.
3773 (s390_case_values_threshold): Implement target hook.
3774 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
3776 * config/s390/s390.h (struct s390_frame_layout)
3777 (struct machine_function): Move here from s390.c.
3778 (TARGET_INDIRECT_BRANCH_NOBP_RET)
3779 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
3780 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
3781 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
3782 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
3783 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
3784 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
3785 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
3786 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
3787 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
3788 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
3789 (mnemonic attribute): Add values which aren't recognized
3791 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
3792 pattern for branch conversion. Fix mnemonic attribute.
3793 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
3794 indirect branch via thunk if requested.
3795 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
3796 ("*indirect_jump"): Disable for branch conversion using out of
3798 ("indirect_jump_via_thunk<mode>_z10")
3799 ("indirect_jump_via_thunk<mode>")
3800 ("indirect_jump_via_inlinethunk<mode>_z10")
3801 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
3802 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
3803 ("casesi_jump_via_inlinethunk<mode>_z10")
3804 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
3805 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
3806 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
3807 ("*indirect2_jump"): Disable for branch conversion.
3808 ("casesi_jump"): Turn into expander and expand patterns for branch
3810 ("return_use"): New expander.
3811 ("*return"): Emit return via thunk and rename it to ...
3812 ("*return<mode>"): ... this one.
3813 * config/s390/s390.opt: Add new options and and enum for the
3816 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
3818 * lra-constraints.c (match_reload): Unconditionally use
3819 gen_lowpart_SUBREG, rather than selecting between that
3820 and equivalent gen_rtx_SUBREG code.
3822 2018-02-08 Richard Biener <rguenther@suse.de>
3824 PR tree-optimization/84233
3825 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
3826 changed flag instead of boguously re-using phi_inserted.
3828 2018-02-08 Martin Jambor <mjambor@suse.cz>
3830 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
3831 static local variables.
3833 2018-02-08 Richard Biener <rguenther@suse.de>
3835 PR tree-optimization/84278
3836 * tree-vect-stmts.c (vectorizable_store): When looking for
3837 smaller vector types to perform grouped strided loads/stores
3838 make sure the mode is supported by the target.
3839 (vectorizable_load): Likewise.
3841 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
3843 * config/aarch64/aarch64.c (aarch64_components_for_bb):
3844 Increase LDP/STP opportunities by adding adjacent callee-saves.
3846 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
3848 PR rtl-optimization/84068
3849 PR rtl-optimization/83459
3850 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
3852 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
3854 PR tree-optimization/84224
3855 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
3856 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
3859 2018-02-07 Iain Sandoe <iain@codesourcery.com>
3862 * config/rs6000/altivec.md (*restore_world): Remove LR use.
3863 * config/rs6000/predicates.md (restore_world_operation): Adjust op
3864 count, remove one USE.
3866 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
3868 * doc/install.texi (Configuration): Document the
3869 --with-long-double-format={ibm,ieee} PowerPC configuration
3873 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
3874 Convert from define_expand to be define_insn_and_split. Rework
3875 float/double/_Float128 conversions to QI/HI/SImode to work with
3876 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
3877 conversions to QI/HImode types did a store and then a load to
3878 truncate the value. For conversions to VSX registers, don't split
3879 the insn, instead emit the code directly. Use the code iterator
3880 any_fix to combine signed and unsigned conversions.
3881 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
3882 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
3883 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
3884 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
3885 (fix_<mode>di2_hw): Likewise.
3886 (fixuns_<mode>di2_hw): Likewise.
3887 (fix_<mode>si2_hw): Likewise.
3888 (fixuns_<mode>si2_hw): Likewise.
3889 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
3890 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
3891 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
3892 fix<uns>_trunc<SFDF:mode>si2_p8.
3893 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
3895 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
3896 (fix<uns>_<mode>_mem): Likewise.
3897 (fctiw<u>z_<mode>_mem): Likewise.
3898 (fix<uns>_<mode>_mem): Likewise.
3899 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
3900 the register allocator from doing a direct move to the GPRs to do
3901 a store, and instead use the ISA 3.0 store byte/half-word from
3902 vector register instruction. For IEEE 128-bit floating point,
3903 also optimize stores of 32-bit ints.
3904 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
3906 2018-02-07 Alan Hayward <alan.hayward@arm.com>
3908 * genextract.c (push_pathstr_operand): New function to support
3910 (walk_rtx): Call push_pathstr_operand.
3911 (print_path): Support [a-zA-Z].
3913 2018-02-07 Richard Biener <rguenther@suse.de>
3915 PR tree-optimization/84037
3916 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
3917 (cse_and_gimplify_to_preheader): Declare.
3918 (vect_get_place_in_interleaving_chain): Likewise.
3919 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
3921 (_loop_vec_info::~_loop_vec_info): Delete it.
3922 (cse_and_gimplify_to_preheader): New function.
3923 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
3924 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
3925 (vectorizable_load): Likewise. For grouped stores always base
3926 the IV on the first element.
3927 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
3928 condition before gimplifying.
3930 2018-02-07 Jakub Jelinek <jakub@redhat.com>
3932 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
3933 *DIV_EXPR and *MOD_EXPR.
3935 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
3938 * config/i386/i386.c (ix86_option_override_internal): Mask out
3939 the CF_SET bit when checking -fcf-protection.
3941 2018-02-07 Tom de Vries <tom@codesourcery.com>
3944 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
3947 2018-02-07 Richard Biener <rguenther@suse.de>
3949 PR tree-optimization/84204
3950 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3953 PR tree-optimization/84205
3954 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
3955 special-case isl_ast_op_zdiv_r.
3957 PR tree-optimization/84223
3958 * graphite-scop-detection.c (gather_bbs::before_dom_children):
3959 Only add conditions from within the region.
3960 (gather_bbs::after_dom_children): Adjust.
3962 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
3965 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
3966 * config/avr/avr.md: Only post-reload split REG-REG moves if
3967 either register is GENERAL_REG_P.
3969 2018-02-07 Jakub Jelinek <jakub@redhat.com>
3971 PR tree-optimization/84235
3972 * tree-ssa-scopedtables.c
3973 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
3974 if the subtraction is performed in floating point type where NaNs are
3975 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
3976 build 1. Formatting fix.
3978 2018-02-06 Jakub Jelinek <jakub@redhat.com>
3981 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
3982 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
3983 and skip it regardless of bb boundaries. Use CALL_P macro,
3984 don't test INSN_P (insn) together with CALL_P or JUMP_P check
3985 unnecessarily, formatting fix.
3987 2018-02-06 Michael Collison <michael.collison@arm.com>
3989 * config/arm/thumb2.md:
3990 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
3991 (*thumb_mov_notscc): Ditto.
3993 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
3996 * config/rs6000/rs6000.md (su code attribute): Use "u" for
3997 unsigned_fix, not "s".
3999 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4001 * configure.ac (gcc_fn_eh_frame_ro): New function.
4002 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
4003 correct .eh_frame permissions.
4004 * configure: Regenerate.
4006 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
4008 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
4011 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
4013 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4014 Display warning message for -mno-speculate-indirect-jumps.
4016 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
4018 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
4020 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
4022 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
4024 PR tree-optimization/84225
4025 * tree-eh.c (find_trapping_overflow): Only call
4026 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
4028 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
4031 * config/i386/i386.c: Reimplement the check of possible options
4032 -mibt/-mshstk conbination. Change error messages.
4033 * doc/invoke.texi: Fix a typo: remove extra '='.
4035 2018-02-06 Marek Polacek <polacek@redhat.com>
4037 PR tree-optimization/84228
4038 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
4040 2018-02-06 Tamar Christina <tamar.christina@arm.com>
4043 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
4044 emitted arch directives.
4045 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
4046 __ARM_FEATURE_COPROC before changing architectures.
4048 2018-02-06 Richard Biener <rguenther@suse.de>
4050 * config/i386/i386.c (print_reg): Fix typo.
4051 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
4053 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
4055 * configure: Regenerate.
4057 2018-02-05 Martin Sebor <msebor@redhat.com>
4059 PR tree-optimization/83369
4060 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
4063 2018-02-05 Martin Liska <mliska@suse.cz>
4065 * doc/invoke.texi: Cherry-pick upstream r323995.
4067 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
4069 * ira.c (ira_init_register_move_cost): Adjust comment.
4071 2018-02-05 Martin Liska <mliska@suse.cz>
4073 PR gcov-profile/84137
4074 * doc/gcov.texi: Fix typo in documentation.
4076 2018-02-05 Martin Liska <mliska@suse.cz>
4078 PR gcov-profile/83879
4079 * doc/gcov.texi: Document necessity of --dynamic-list-data when
4080 using dlopen functionality.
4082 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
4084 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
4085 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
4086 _mm_maskz_range_ss, _mm_mask_range_round_ss,
4087 _mm_maskz_range_round_ss): New intrinsics.
4088 (__builtin_ia32_rangesd128_round)
4089 (__builtin_ia32_rangess128_round): Remove.
4090 (__builtin_ia32_rangesd128_mask_round,
4091 __builtin_ia32_rangess128_mask_round): New builtins.
4092 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
4093 __builtin_ia32_rangess128_round): Remove.
4094 (__builtin_ia32_rangesd128_mask_round,
4095 __builtin_ia32_rangess128_mask_round): New builtins.
4096 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
4097 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
4098 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
4099 "<round_saeonly_constraint>")): Changed to ...
4100 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
4101 "<round_saeonly_scalar_constraint>")): ... this.
4102 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
4103 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
4104 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
4105 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
4106 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
4108 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
4110 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
4112 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
4113 Remove all values except native, 8540 and 8548.
4115 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
4117 * config/i386/i386.c (ix86_output_function_return): Pass
4118 INVALID_REGNUM, instead of -1, as invalid register number to
4119 indirect_thunk_name and output_indirect_thunk.
4121 2018-02-02 Julia Koval <julia.koval@intel.com>
4123 * config.gcc: Add -march=icelake.
4124 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
4125 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
4126 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
4127 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
4128 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
4129 (processor_target_table): Add icelake.
4130 (ix86_option_override_internal): Handle new PTAs.
4131 (get_builtin_code_for_version): Handle icelake.
4132 (M_INTEL_COREI7_ICELAKE): New.
4133 (fold_builtin_cpu): Handle icelake.
4134 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
4135 * doc/invoke.texi: Add -march=icelake.
4137 2018-02-02 Julia Koval <julia.koval@intel.com>
4139 * config/i386/i386.c (ix86_option_override_internal): Change flags type
4140 to wide_int_bitmask.
4141 * wide-int-bitmask.h: New.
4143 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
4146 * config/i386/i386.md: Replace Pmode with word_mode in
4147 builtin_setjmp_setup and builtin_longjmp to support x32.
4149 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
4153 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
4155 (rs6000_supported_cpu_names): New static variable.
4156 (linux_cpu_translation_table): Likewise.
4157 (elf_platform) <cpu>: Define new static variable and use it.
4158 Translate kernel AT_PLATFORM name to canonical name if needed.
4159 Error if platform name is unknown.
4161 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
4164 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
4166 2018-02-01 Jeff Law <law@redhat.com>
4169 * config/i386/i386.c (release_scratch_register_on_entry): Add new
4170 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
4171 the scratch if RELEASE_VIA_POP is false.
4172 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
4173 If we have to save a temporary register, decrement SIZE appropriately.
4174 Pass new arguments to release_scratch_register_on_entry.
4175 (ix86_adjust_stack_and_probe): Likewise.
4176 (ix86_emit_probe_stack_range): Pass new arguments to
4177 release_scratch_register_on_entry.
4179 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
4181 PR rtl-optimization/84157
4182 * combine.c (change_zero_ext): Use REG_P predicate in
4183 front of HARD_REGISTER_P predicate.
4185 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
4187 * config/avr/avr.c (avr_option_override): Move disabling of
4188 -fdelete-null-pointer-checks to...
4189 * common/config/avr/avr-common.c (avr_option_optimization_table):
4192 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
4194 PR tree-optimization/81635
4195 * tree-data-ref.c (split_constant_offset_1): For types that
4196 wrap on overflow, try to use range info to prove that wrapping
4199 2018-02-01 Renlin Li <renlin.li@arm.com>
4202 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
4204 (aarch64_register_move_cost): Likewise.
4205 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
4207 (REG_CLASS_NAMES): Likewise.
4208 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
4209 TAILCALL_ADDR_REGS. Remove IP registers.
4210 * config/aarch64/aarch64.md (Ucs): Update register constraint.
4212 2018-02-01 Richard Biener <rguenther@suse.de>
4214 * domwalk.h (dom_walker::dom_walker): Add additional constructor
4215 for specifying RPO order and allow NULL for that.
4216 * domwalk.c (dom_walker::dom_walker): Likewise.
4217 (dom_walker::walk): Handle NULL RPO order.
4218 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
4220 (rewrite_update_dom_walker): Likewise.
4221 (mark_def_dom_walker): Likewise.
4223 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
4225 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
4226 (aarch64_maybe_expand_sve_subreg_move): Declare.
4227 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
4228 * config/aarch64/predicates.md (aarch64_any_register_operand): New
4230 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
4231 that are semantically a reverse operation.
4232 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
4233 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
4234 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
4236 (aarch64_can_change_mode_class): For big-endian, forbid changes
4237 between two SVE modes if they have different element sizes.
4239 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
4241 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
4242 the TImode handling for big-endian targets.
4244 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
4246 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
4247 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
4249 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
4250 Remove BSWAP handing for big-endian targets and use the form of
4251 LD1RQ appropariate for the mode.
4253 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
4255 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
4256 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
4259 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
4262 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
4263 check for operands that need to go through aarch64_sve_reload_be.
4265 2018-02-01 Jakub Jelinek <jakub@redhat.com>
4267 PR tree-optimization/81661
4268 PR tree-optimization/84117
4269 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
4270 * tree-eh.c: Include gimplify.h.
4271 (find_trapping_overflow, replace_trapping_overflow,
4272 rewrite_to_non_trapping_overflow): New functions.
4273 * tree-vect-loop.c: Include tree-eh.h.
4274 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
4275 * tree-data-ref.c: Include tree-eh.h.
4276 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
4278 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
4280 PR rtl-optimization/84123
4281 * combine.c (change_zero_ext): Check if hard register satisfies
4282 can_change_dest_mode before calling gen_lowpart_SUBREG.
4284 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
4287 * ira.c (ira_init_register_move_cost): Remove assert.
4289 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
4291 PR rtl-optimization/84071
4292 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
4293 * doc/tm.texi: Regenerate.
4295 2018-01-31 Richard Biener <rguenther@suse.de>
4297 PR tree-optimization/84132
4298 * tree-data-ref.c (analyze_miv_subscript): Properly
4299 check whether evolution_function_is_affine_multivariate_p
4300 before calling gcd_of_steps_may_divide_p.
4302 2018-01-31 Julia Koval <julia.koval@intel.com>
4305 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
4306 * config/i386/i386.md (rdpid_rex64) New.
4307 (rdpid): Make 32bit only.
4309 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
4312 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
4313 an IDENTIFIER_NODE for FUNCTION_TYPE's.
4315 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
4318 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
4320 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
4322 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
4324 PR rtl-optimization/84071
4325 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
4326 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
4328 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
4330 * config/arc/arc.c (arc_handle_aux_attribute): New function.
4331 (arc_attribute_table): Add 'aux' attribute.
4332 (arc_in_small_data_p): Consider aux like variables.
4333 (arc_is_aux_reg_p): New function.
4334 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
4335 (arc_get_aux_arg): New function.
4336 (prepare_move_operands): Handle aux-register access.
4337 (arc_handle_aux_attribute): New function.
4338 * doc/extend.texi (ARC Variable attributes): Add subsection.
4340 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
4342 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
4343 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
4344 (arc_attribute_table): Add 'uncached' attribute.
4345 (arc_print_operand): Print '.di' flag for uncached memory
4347 (arc_in_small_data_p): Do not consider for small data the uncached
4349 (arc_is_uncached_mem_p): New function.
4350 * config/arc/predicates.md (compact_store_memory_operand): Check
4351 for uncached memory accesses.
4352 (nonvol_nonimm_operand): Likewise.
4353 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
4355 2018-01-31 Jakub Jelinek <jakub@redhat.com>
4358 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
4359 falign-loops=): Add Optimization flag.
4361 2018-01-30 Jeff Law <law@redhat.com>
4364 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
4365 INT_REGISTERS_SAVED. Check it prior to calling
4366 get_scratch_register_on_entry.
4367 (ix86_adjust_stack_and_probe): Similarly.
4368 (ix86_emit_probe_stack_range): Similarly.
4369 (ix86_expand_prologue): Corresponding changes.
4371 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4374 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
4375 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
4377 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
4380 * lra-constraints.c (curr_insn_transform): Process AND in the
4383 2018-01-30 Jakub Jelinek <jakub@redhat.com>
4385 PR rtl-optimization/83986
4386 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
4387 dependence against last_pending_memory_flush in addition to
4390 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
4392 PR tree-optimization/81611
4393 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
4396 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
4399 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
4402 2018-01-30 Richard Biener <rguenther@suse.de>
4403 Jakub Jelinek <jakub@redhat.com>
4405 PR tree-optimization/84111
4406 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
4407 inner loops added during recursion, as they don't have up-to-date
4410 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
4413 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
4414 (can_inline_edge_by_limits_p): ... here.
4415 (can_early_inline_edge_p, check_callers,
4416 update_caller_keys, update_callee_keys, recursive_inlining,
4417 add_new_edges_to_heap, speculation_useful_p,
4418 inline_small_functions,
4419 inline_small_functions, flatten_function,
4420 inline_to_all_callers_1): Update.
4422 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
4424 * profile-count.c (profile_count::combine_with_ipa_count): Handle
4427 2018-01-30 Richard Biener <rguenther@suse.de>
4429 PR tree-optimization/83008
4430 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
4431 invariant and constant vector uses in stmts when they need
4434 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4437 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
4438 * configure: Regenerate.
4440 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
4442 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
4444 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
4445 Use gen_rtx_REG rather than gen_lowpart.
4447 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
4449 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
4450 rather than 0 when creating partial subregs.
4452 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
4454 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
4457 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
4460 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
4461 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
4462 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
4463 flags. This restores the settings used before the 2017-07-24.
4464 Turning off pre increment/decrement/modify allows IVOPTS to
4465 optimize DF/SF loops where the index is an int.
4467 2018-01-29 Richard Biener <rguenther@suse.de>
4468 Kelvin Nilsen <kelvin@gcc.gnu.org>
4471 * tree-vect-stmts.c (vectorizable_call): Don't call
4472 targetm.vectorize_builtin_md_vectorized_function if callee is
4475 2018-01-22 Carl Love <cel@us.ibm.com>
4477 * doc/extend.tex: Fix typo in second arg in
4478 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
4480 2018-01-29 Richard Biener <rguenther@suse.de>
4482 PR tree-optimization/84086
4483 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
4484 (flush_ssaname_freelist): When SSA names were released reset
4485 the SCEV hash table.
4487 2018-01-29 Richard Biener <rguenther@suse.de>
4489 PR tree-optimization/84057
4490 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
4491 removed paths when removing edges.
4493 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
4495 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
4496 -mfunction-return=@var{choice}.
4498 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4501 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
4503 (layout::print_source_line): Likewise.
4504 (test_get_line_width_without_trailing_whitespace): Add test cases.
4506 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4509 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
4512 2018-01-26 Jim Wilson <jimw@sifive.com>
4514 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
4516 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
4519 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4521 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
4522 and CMP + SUB-immediate -> SUBS.
4524 2018-01-26 Martin Sebor <msebor@redhat.com>
4526 PR tree-optimization/83896
4527 * tree-ssa-strlen.c (get_string_len): Rename...
4528 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
4529 Avoid assuming length is constant.
4530 (handle_char_store): Use HOST_WIDE_INT for string length.
4532 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
4535 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
4536 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
4538 2018-01-26 Richard Biener <rguenther@suse.de>
4540 PR rtl-optimization/84003
4541 * dse.c (record_store): Only record redundant stores when
4542 the earlier store aliases at least all accesses the later one does.
4544 2018-01-26 Jakub Jelinek <jakub@redhat.com>
4546 PR rtl-optimization/83985
4547 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
4548 REG_CFA_RESTORE insns.
4549 (delete_unmarked_insns): Don't ignore separate shrink wrapping
4550 REG_CFA_RESTORE insns here.
4553 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
4554 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
4556 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
4558 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
4559 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
4560 (arc_init): Likewise.
4561 (arc_override_options): Likewise.
4562 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
4564 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
4566 * config/arc/arc.h (TARGET_DBNZ): Define.
4567 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
4568 properly set the tune attribute.
4569 (dbnz): Use TARGET_DBNZ guard.
4570 * config/arc/arc.opt (mtune): Add core3 option.
4572 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
4574 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
4575 recognize new pic like addresses.
4576 (arc_delegitimize_address): Clean up.
4578 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
4580 * config/arc/arc-arches.def: Option mrf16 valid for all
4582 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
4583 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
4584 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
4585 * config/arc/arc-tables.opt: Regenerate.
4586 * config/arc/arc.c (arc_conditional_register_usage): Handle
4587 reduced register file case.
4588 (arc_file_start): Set must have build attributes.
4589 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
4591 * config/arc/arc.opt (mrf16): Add new option.
4592 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
4593 * config/arc/genmultilib.awk: Handle new mrf16 option.
4594 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
4595 * config/arc/t-multilib: Regenerate.
4596 * doc/invoke.texi (ARC Options): Document mrf16 option.
4598 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
4600 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
4601 * config/arc/arc.c (arc_handle_secure_attribute): New function.
4602 (arc_attribute_table): Add 'secure_call' attribute.
4603 (arc_print_operand): Print secure call operand.
4604 (arc_function_ok_for_sibcall): Don't optimize tail calls when
4606 (arc_is_secure_call_p): New function. * config/arc/arc.md
4607 (call_i): Add support for sjli instruction.
4608 (call_value_i): Likewise.
4609 * config/arc/constraints.md (Csc): New constraint.
4611 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
4612 John Eric Martin <John.Martin@emmicro-us.com>
4614 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
4615 * config/arc/arc.c (_arc_jli_section): New struct.
4616 (arc_jli_section): New type.
4617 (rc_jli_sections): New static variable.
4618 (arc_handle_jli_attribute): New function.
4619 (arc_attribute_table): Add jli_always and jli_fixed attribute.
4620 (arc_file_end): New function.
4621 (TARGET_ASM_FILE_END): Define.
4622 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
4623 (arc_add_jli_section): New function.
4624 (jli_call_scan): Likewise.
4625 (arc_reorg): Call jli_call_scan.
4626 (arc_output_addsi): Remove 'S' from printing asm operand.
4627 (arc_is_jli_call_p): New function.
4628 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
4630 (movhi_insn): Likewise.
4631 (movsi_insn): Likewise.
4632 (movsi_set_cc_insn): Likewise.
4633 (loadqi_update): Likewise.
4634 (load_zeroextendqisi_update): Likewise.
4635 (load_signextendqisi_update): Likewise.
4636 (loadhi_update): Likewise.
4637 (load_zeroextendhisi_update): Likewise.
4638 (load_signextendhisi_update): Likewise.
4639 (loadsi_update): Likewise.
4640 (loadsf_update): Likewise.
4641 (movsicc_insn): Likewise.
4642 (bset_insn): Likewise.
4643 (bxor_insn): Likewise.
4644 (bclr_insn): Likewise.
4645 (bmsk_insn): Likewise.
4646 (bicsi3_insn): Likewise.
4647 (cmpsi_cc_c_insn): Likewise.
4648 (movsi_ne): Likewise.
4649 (movsi_cond_exec): Likewise.
4650 (clrsbsi2): Likewise.
4661 (call_i): Remove 'S' asm letter, add jli instruction.
4662 (call_value_i): Likewise.
4663 * config/arc/arc.op (mjli-always): New option.
4664 * config/arc/constraints.md (Cji): New constraint.
4665 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
4667 (subsf3_fpx): Likewise.
4668 (mulsf3_fpx): Likewise.
4669 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
4671 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
4673 * doc/invoke.texi (ARC): Document mjli-always option.
4675 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
4677 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
4678 avoid addition with 0 and use incw and decw where possible.
4680 2018-01-26 Richard Biener <rguenther@suse.de>
4682 PR tree-optimization/81082
4683 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
4684 association if it requires casting to unsigned.
4685 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
4686 from fold_plusminus_mult_expr to catch important cases late when
4687 range info is available.
4689 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4691 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
4692 * configure.ac (hidden_linkonce): New test.
4693 * configure: Regenerate.
4694 * config.in: Regenerate.
4696 2018-01-26 Julia Koval <julia.koval@intel.com>
4698 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
4699 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
4700 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
4701 _mm_mask_bitshuffle_epi64_mask): Fix type.
4702 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
4703 USI_FTYPE_V4DI_V4DI_USI): Remove.
4704 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
4705 __builtin_ia32_vpshufbitqmb256_mask,
4706 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
4707 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
4708 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
4710 2018-01-26 Alan Modra <amodra@gmail.com>
4713 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
4714 UNSPEC_VBPERMQ. Sort other unspecs.
4716 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
4718 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
4720 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
4723 * predict.c (drop_profile): Do not push/pop cfun; update also
4725 (handle_missing_profiles): Fix logic looking for zero profiles.
4727 2018-01-25 Jakub Jelinek <jakub@redhat.com>
4730 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
4731 on functions with #pragma omp declare simd or functions with simd
4733 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
4734 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
4735 Remove trailing \n from warning_at calls.
4737 2018-01-25 Tom de Vries <tom@codesourcery.com>
4740 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
4741 for neutered workers.
4743 2018-01-24 Joseph Myers <joseph@codesourcery.com>
4746 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
4747 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
4749 2018-01-24 Jeff Law <law@redhat.com>
4752 * i386.c (get_probe_interval): Move to earlier point.
4753 (ix86_compute_frame_layout): If -fstack-clash-protection and
4754 the frame is larger than the probe interval, then use pushes
4755 to save registers rather than reg->mem moves.
4756 (ix86_expand_prologue): Remove conditional for int_registers_saved
4759 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
4762 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
4763 min/max for never referenced object.
4765 2018-01-24 Jakub Jelinek <jakub@redhat.com>
4768 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
4770 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
4771 attributes from DECL_ATTRIBUTES (decl) without affecting
4772 DECL_ATTRIBUTES (current_function_decl).
4773 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
4774 functions with non-NULL DECL_ABSTRACT_ORIGIN.
4776 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
4778 PR tree-optimization/83979
4779 * fold-const.c (fold_comparison): Use constant_boolean_node
4780 instead of boolean_{true,false}_node.
4782 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
4784 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
4787 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
4789 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
4790 Simplify the clause that sets the length attribute.
4791 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
4792 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
4793 clause that sets the length attribute.
4794 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
4796 2018-01-24 Tom de Vries <tom@codesourcery.com>
4799 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
4800 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
4801 Add strict parameter.
4802 (prevent_branch_around_nothing): Insert dummy insn between branch to
4803 label and label with no ptx insn inbetween.
4804 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
4806 2018-01-24 Tom de Vries <tom@codesourcery.com>
4809 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
4810 for neutered threads in warp.
4811 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
4813 2018-01-24 Richard Biener <rguenther@suse.de>
4815 PR tree-optimization/83176
4816 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
4819 2018-01-24 Richard Biener <rguenther@suse.de>
4821 PR tree-optimization/82819
4822 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
4823 code generating pluses that are no-ops in the target precision.
4825 2018-01-24 Richard Biener <rguenther@suse.de>
4828 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
4830 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
4832 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
4833 to merge probabilities.
4834 * predict.c (probably_never_executed): Also mark as cold functions
4835 with global 0 profile and guessed local profile.
4836 * profile-count.c (profile_probability::combine_with_count): New
4838 * profile-count.h (profile_probability::operator*,
4839 profile_probability::operator*=, profile_probability::operator/,
4840 profile_probability::operator/=): Reduce precision to adjusted
4841 and set value to guessed on contradictory divisions.
4842 (profile_probability::combine_with_freq): Remove.
4843 (profile_probability::combine_wiht_count): Declare.
4844 (profile_count::force_nonzero):: Set to adjusted.
4845 (profile_count::probability_in):: Set quality to adjusted.
4846 * tree-ssa-tail-merge.c (replace_block_by): Use
4849 2018-01-23 Andrew Waterman <andrew@sifive.com>
4850 Jim Wilson <jimw@sifive.com>
4852 * config/riscv/riscv.c (riscv_stack_boundary): New.
4853 (riscv_option_override): Set riscv_stack_boundary. Handle
4854 riscv_preferred_stack_boundary_arg.
4855 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
4856 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
4857 (STACK_BOUNDARY): Set to riscv_stack_boundary.
4858 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
4859 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
4860 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
4862 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
4865 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
4866 of struct ix86_frame.
4867 (ix86_expand_epilogue): Likewise. Add a local variable for
4868 the reg_save_offset field in struct ix86_frame.
4870 2018-01-23 Bin Cheng <bin.cheng@arm.com>
4872 PR tree-optimization/82604
4873 * tree-loop-distribution.c (enum partition_kind): New enum item
4874 PKIND_PARTIAL_MEMSET.
4875 (partition_builtin_p): Support above new enum item.
4876 (generate_code_for_partition): Ditto.
4877 (compute_access_range): Differentiate cases that equality can be
4878 proven at all loops, the innermost loops or no loops.
4879 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
4880 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
4881 (finalize_partitions, distribute_loop): Don't fuse partition of
4882 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
4883 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
4886 2018-01-23 Martin Liska <mliska@suse.cz>
4888 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
4889 order to ignore the predictor.
4890 (PRED_POLYMORPHIC_CALL): Likewise.
4891 (PRED_RECURSIVE_CALL): Likewise.
4893 2018-01-23 Martin Liska <mliska@suse.cz>
4895 * tree-profile.c (tree_profiling): Print function header to
4896 aware reader which function we are working on.
4897 * value-prof.c (gimple_find_values_to_profile): Do not print
4898 not interesting value histograms.
4900 2018-01-23 Martin Liska <mliska@suse.cz>
4902 * profile-count.h (enum profile_quality): Add
4903 profile_uninitialized as the first value. Do not number values
4904 as they are zero based.
4905 (profile_count::verify): Update sanity check.
4906 (profile_probability::verify): Likewise.
4908 2018-01-23 Nathan Sidwell <nathan@acm.org>
4910 * doc/invoke.texi (ffor-scope): Deprecate.
4912 2018-01-23 David Malcolm <dmalcolm@redhat.com>
4914 PR tree-optimization/83510
4915 * domwalk.c (set_all_edges_as_executable): New function.
4916 (dom_walker::dom_walker): Convert bool param
4917 "skip_unreachable_blocks" to enum reachability. Move setup of
4918 edge flags to set_all_edges_as_executable and only do it when
4919 reachability is REACHABLE_BLOCKS.
4920 * domwalk.h (enum dom_walker::reachability): New enum.
4921 (dom_walker::dom_walker): Convert bool param
4922 "skip_unreachable_blocks" to enum reachability.
4923 (set_all_edges_as_executable): New decl.
4924 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
4925 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
4927 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
4928 but converting true to REACHABLE_BLOCKS.
4929 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
4931 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
4932 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
4933 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
4935 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
4936 if check_all_array_refs will be called.
4938 2018-01-23 David Malcolm <dmalcolm@redhat.com>
4940 * tree.c (selftest::test_location_wrappers): Add more test
4943 2018-01-23 David Malcolm <dmalcolm@redhat.com>
4945 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
4946 (selftest::test_bit_in_range): Likewise.
4948 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
4951 * doc/sourcebuild.texi (vect_float): Say that the selector
4952 only describes the situation when -funsafe-math-optimizations is on.
4953 (vect_float_strict): Document.
4955 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
4957 PR tree-optimization/83965
4958 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4959 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
4960 instead of checking only for a reduction.
4961 (vect_recog_widen_sum_pattern): Likewise.
4963 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
4965 * predict.c (probably_never_executed): Only use precise profile info.
4966 (compute_function_frequency): Skip after inlining hack since we now
4967 have quality checking.
4969 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
4971 * profile-count.h (profile_probability::very_unlikely,
4972 profile_probability::unlikely, profile_probability::even): Set
4973 precision to guessed.
4975 2018-01-23 Richard Biener <rguenther@suse.de>
4977 PR tree-optimization/83963
4978 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
4979 Properly terminate dominator walk when crossing the exit edge not
4980 when visiting its source block.
4982 2018-01-23 Jakub Jelinek <jakub@redhat.com>
4985 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
4986 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
4988 2018-01-22 Jakub Jelinek <jakub@redhat.com>
4990 PR tree-optimization/83957
4991 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
4992 semicolon after for body surrounded by braces.
4994 PR tree-optimization/83081
4995 * profile-count.h (profile_probability::split): New method.
4996 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
4997 Use profile_probability::split.
4998 (do_compare_rtx_and_jump): Fix adjustment of probabilities
4999 when splitting a single conditional jump into 2.
5001 2018-01-22 David Malcolm <dmalcolm@redhat.com>
5003 PR tree-optimization/69452
5004 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
5007 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
5009 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
5010 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
5011 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
5013 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
5015 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
5016 * config/rl78/rl78.md (movdi): New define_expand.
5017 * config/rl78/rl78.c (rl78_split_movdi): New function.
5019 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
5022 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
5024 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
5025 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
5026 128-bit to produce an UNSPEC move to get the double word with the
5027 signbit and then a shift directly to do signbit.
5028 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
5029 implementation with a new version that just does either a direct
5030 move or a regular move. Move memory interface to separate insns.
5031 Move insns so they are next to the expander.
5032 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
5033 with signbit move. Split big and little endian case.
5034 (signbit<mode>2_dm_mem_le): Likewise.
5035 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
5036 (signbit<mode>2_dm2): Likewise.
5038 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
5040 * config/rl78/rl78.md (anddi3): New define_expand.
5042 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
5044 * config/rl78/rl78.md (umindi3): New define_expand.
5046 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
5048 * config/rl78/rl78.md (smindi3): New define_expand.
5050 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
5052 * config/rl78/rl78.md (smaxdi3): New define_expand.
5054 2018-01-22 Carl Love <cel@us.ibm.com>
5056 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
5057 LVX_V1TI): Add macro expansion.
5058 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
5059 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
5060 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
5061 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
5062 Change check to determine if the instruction is a byte reversing
5063 entry. Fix typo in comment.
5064 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
5065 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
5066 Add def_builtin calls for new builtins.
5067 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
5068 Add define_insn expansion.
5070 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
5072 * config/rl78/rl78.md (umaxdi3): New define_expand.
5074 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
5076 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
5077 for non-QImode registers.
5079 2018-01-22 Richard Biener <rguenther@suse.de>
5081 PR tree-optimization/83963
5082 * graphite-scop-detection.c (scop_detection::get_sese): Delay
5083 including the loop exit block.
5084 (scop_detection::merge_sese): Likewise.
5085 (scop_detection::add_scop): Do it here instead.
5087 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5089 * doc/sourcebuild.texi (arm_softfloat): Document.
5091 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
5094 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
5095 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
5096 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
5098 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5099 David Edelsohn <dje.gcc@gmail.com>
5102 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
5103 Change "crset eq" to "crset 2".
5104 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
5105 (*call_indirect_aix<mode>_nospec): Likewise.
5106 (*call_value_indirect_aix<mode>_nospec): Likewise.
5107 (*call_indirect_elfv2<mode>_nospec): Likewise.
5108 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
5109 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
5110 change assembly output from . to $.
5111 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
5112 (indirect_jump<mode>_nospec): Change assembly output from . to $.
5113 (*tablejump<mode>_internal1_nospec): Likewise.
5115 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
5118 * config/sh/sh_optimize_sett_clrt.cc:
5119 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
5121 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
5123 PR tree-optimization/83940
5124 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
5125 offset_dt to vect_constant_def rather than vect_unknown_def_type.
5126 (vect_check_load_store_mask): Add a mask_dt_out parameter and
5127 use it to pass back the definition type.
5128 (vect_check_store_rhs): Likewise rhs_dt_out.
5129 (vect_build_gather_load_calls): Add a mask_dt argument and use
5130 it instead of a call to vect_is_simple_use.
5131 (vectorizable_store): Update calls to vect_check_load_store_mask
5132 and vect_check_store_rhs. Use the dt returned by the latter instead
5133 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
5134 instead of calls to vect_is_simple_use. Pass the scalar rather
5135 than the vector operand to vect_is_simple_use when handling
5136 second and subsequent copies of an rhs value.
5137 (vectorizable_load): Update calls to vect_check_load_store_mask
5138 and vect_build_gather_load_calls. Use the cached mask_dt and
5139 gs_info.offset_dt instead of calls to vect_is_simple_use.
5141 2018-01-20 Jakub Jelinek <jakub@redhat.com>
5144 * tree-emutls.c: Include gimplify.h.
5145 (lower_emutls_2): New function.
5146 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
5147 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
5148 it before further processing.
5151 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
5152 UINTVAL (trueop1) instead of INTVAL (op1).
5154 2018-01-19 Jakub Jelinek <jakub@redhat.com>
5158 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
5159 INCOMING_FRAME_SP_OFFSET if not defined.
5160 (scan_trace): Add ENTRY argument. If true and
5161 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
5162 emit a note to adjust the CFA offset.
5163 (create_cfi_notes): Adjust scan_trace callers.
5164 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
5165 INCOMING_FRAME_SP_OFFSET in the CIE.
5166 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
5167 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
5169 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
5170 * doc/tm.texi: Regenerated.
5172 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5174 PR rtl-optimization/83147
5175 * lra-constraints.c (remove_inheritance_pseudos): Use
5176 lra_substitute_pseudo_within_insn.
5178 2018-01-19 Tom de Vries <tom@codesourcery.com>
5179 Cesar Philippidis <cesar@codesourcery.com>
5182 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
5184 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
5187 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
5188 spaces for function labels.
5190 2018-01-19 Martin Liska <mliska@suse.cz>
5192 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
5193 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
5194 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
5195 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
5196 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
5197 (PRED_CONST_RETURN): Change from 69 to 65.
5198 (PRED_NULL_RETURN): Change from 91 to 71.
5199 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
5200 (PRED_LOOP_GUARD): Change from 66 to 73.
5202 2018-01-19 Martin Liska <mliska@suse.cz>
5204 * predict.c (predict_insn_def): Add new assert.
5205 (struct branch_predictor): Change type to signed integer.
5206 (test_prediction_value_range): Amend test to cover
5208 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
5209 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
5210 (PRED_LOOP_ITERATIONS_MAX): Likewise.
5211 (PRED_LOOP_IV_COMPARE): Likewise.
5212 * predict.h (PROB_UNINITIALIZED): Define new constant.
5214 2018-01-19 Martin Liska <mliska@suse.cz>
5216 * predict.c (dump_prediction): Add new format for
5217 analyze_brprob.py script which is enabled with -details
5219 * profile-count.h (precise_p): New function.
5221 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
5223 PR tree-optimization/83922
5224 * tree-vect-loop.c (vect_verify_full_masking): Return false if
5225 there are no statements that need masking.
5226 (vect_active_double_reduction_p): New function.
5227 (vect_analyze_loop_operations): Use it when handling phis that
5228 are not in the loop header.
5230 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
5232 PR tree-optimization/83914
5233 * tree-vect-loop.c (vectorizable_induction): Don't convert
5234 init_expr or apply the peeling adjustment for inductions
5235 that are nested within the vectorized loop.
5237 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5239 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
5242 2018-01-18 Jakub Jelinek <jakub@redhat.com>
5246 * function.h (gimplify_parameters): Add gimple_seq * argument.
5247 * function.c: Include gimple.h and options.h.
5248 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
5249 for the added local temporaries if needed.
5250 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
5251 if there are any parameter cleanups, wrap whole body into a
5252 try/finally with the cleanups.
5254 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
5257 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
5258 Use GET_MODE_CLASS for scalar floating point.
5260 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
5264 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
5265 Fix call of call_cgraph_insertion_hooks.
5267 2018-01-18 Martin Sebor <msebor@redhat.com>
5269 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
5271 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
5274 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
5277 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5280 * common.opt: (-ffile-prefix-map): New option.
5281 * opts.c (common_handle_option): Defer it.
5282 * opts-global.c (handle_common_deferred_options): Handle it.
5283 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
5284 * file-prefix-map.h: New file.
5285 (remap_debug_filename, add_debug_prefix_map): ...here.
5286 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
5287 * final.c (debug_prefix_map, add_debug_prefix_map
5288 remap_debug_filename): Move to...
5289 * file-prefix-map.c: New file.
5290 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
5291 generalize, get rid of alloca(), use strrchr() instead of strchr().
5292 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
5293 Implement in terms of add_prefix_map().
5294 (remap_macro_filename, remap_debug_filename): Implement in term of
5296 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
5297 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
5298 * dbxout.c: Include file-prefix-map.h.
5299 * varasm.c: Likewise.
5300 * vmsdbgout.c: Likewise.
5301 * xcoffout.c: Likewise.
5302 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
5303 * doc/cppopts.texi (-fmacro-prefix-map): Document.
5304 * doc/invoke.texi (-ffile-prefix-map): Document.
5305 (-fdebug-prefix-map): Update description.
5307 2018-01-18 Martin Liska <mliska@suse.cz>
5309 * config/i386/i386.c (indirect_thunk_name): Document that also
5311 (output_indirect_thunk): Document why both instructions
5312 (pause and lfence) are generated.
5314 2018-01-18 Richard Biener <rguenther@suse.de>
5316 PR tree-optimization/83887
5317 * graphite-scop-detection.c
5318 (scop_detection::get_nearest_dom_with_single_entry): Remove.
5319 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
5320 (scop_detection::merge_sese): Re-implement with a flood-fill
5321 algorithm that properly finds a SESE region if it exists.
5323 2018-01-18 Jakub Jelinek <jakub@redhat.com>
5326 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
5327 pointer_diff optimizations use view_convert instead of convert.
5329 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5331 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
5332 Generate different code for -mno-speculate-indirect-jumps.
5333 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
5334 (*call_indirect_aix<mode>): Disable for
5335 -mno-speculate-indirect-jumps.
5336 (*call_indirect_aix<mode>_nospec): New define_insn.
5337 (*call_value_indirect_aix<mode>): Disable for
5338 -mno-speculate-indirect-jumps.
5339 (*call_value_indirect_aix<mode>_nospec): New define_insn.
5340 (*sibcall_nonlocal_sysv<mode>): Generate different code for
5341 -mno-speculate-indirect-jumps.
5342 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
5344 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
5346 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
5347 long double type, set the flags for noting the default long double
5348 type, even if we don't pass or return a long double type.
5350 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
5353 * ipa-inline.c (flatten_function): Do not overwrite final inlining
5356 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
5358 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
5359 support for merge[hl].
5360 (fold_mergehl_helper): New helper function.
5361 (tree-vector-builder.h): New #include for tree_vector_builder usage.
5362 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
5363 (altivec_vmrglw_direct): Add xxmrglw insn.
5365 2018-01-17 Andrew Waterman <andrew@sifive.com>
5367 * config/riscv/riscv.c (riscv_conditional_register_usage): If
5368 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
5370 2018-01-17 David Malcolm <dmalcolm@redhat.com>
5373 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
5374 call the lto_location_cache before reading the
5375 DECL_SOURCE_LOCATION of the types.
5377 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
5378 Richard Sandiford <richard.sandiford@linaro.org>
5380 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
5381 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
5382 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
5383 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
5384 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
5386 * config/aarch64/constraints.md (aarch64_movti_operand):
5388 * config/aarch64/predicates.md (Uti): Add new constraint.
5390 2018-01-17 Carl Love <cel@us.ibm.com>
5392 * config/rs6000/vsx.md (define_expand xl_len_r,
5393 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
5394 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
5396 (define_expand, define_insn): Move the shift left from the
5397 define_insn to the define_expand for lxvl and stxvl instructions.
5398 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
5399 and XL_LEN_R definitions to PURE.
5401 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
5403 * config/i386/i386.c (indirect_thunk_name): Declare regno
5404 as unsigned int. Compare regno with INVALID_REGNUM.
5405 (output_indirect_thunk): Ditto.
5406 (output_indirect_thunk_function): Ditto.
5407 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
5408 in the call to output_indirect_thunk_function.
5410 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
5413 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
5414 rather than the size of inner_type to determine the stack slot size
5415 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
5417 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
5420 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
5423 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
5425 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
5426 endian Linux systems to optionally enable multilibs for selecting
5427 the long double type if the user configured an explicit type.
5428 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
5429 have no long double multilibs if not defined.
5430 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
5431 warn if the user used -mabi={ieee,ibm}longdouble and we built
5432 multilibs for long double.
5433 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
5434 appropriate multilib option.
5435 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
5437 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
5438 for building long double multilibs.
5439 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
5441 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
5443 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
5446 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
5448 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
5451 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
5454 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
5457 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
5459 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
5460 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
5462 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
5464 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
5465 different rtl trees depending on TARGET_64BIT.
5466 (rs6000_gen_lvx): Likewise.
5468 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
5470 * config/visium/visium.md (nop): Tweak comment.
5471 (hazard_nop): Likewise.
5473 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5475 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
5476 -mspeculate-indirect-jumps.
5477 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
5478 for -mno-speculate-indirect-jumps.
5479 (*call_indirect_elfv2<mode>_nospec): New define_insn.
5480 (*call_value_indirect_elfv2<mode>): Disable for
5481 -mno-speculate-indirect-jumps.
5482 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
5483 (indirect_jump): Emit different RTL for
5484 -mno-speculate-indirect-jumps.
5485 (*indirect_jump<mode>): Disable for
5486 -mno-speculate-indirect-jumps.
5487 (*indirect_jump<mode>_nospec): New define_insn.
5488 (tablejump): Emit different RTL for
5489 -mno-speculate-indirect-jumps.
5490 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
5491 (tablejumpsi_nospec): New define_expand.
5492 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
5493 (tablejumpdi_nospec): New define_expand.
5494 (*tablejump<mode>_internal1): Disable for
5495 -mno-speculate-indirect-jumps.
5496 (*tablejump<mode>_internal1_nospec): New define_insn.
5497 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
5500 2018-01-16 Artyom Skrobov tyomitch@gmail.com
5502 * caller-save.c (insert_save): Drop unnecessary parameter. All
5505 2018-01-16 Jakub Jelinek <jakub@redhat.com>
5506 Richard Biener <rguenth@suse.de>
5509 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
5510 return early, inline manually is_gimple_sizepos. Make sure if we
5511 call gimplify_expr we don't end up with a gimple constant.
5512 * tree.c (variably_modified_type_p): Don't return true for
5513 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
5514 * gimplify.h (is_gimple_sizepos): Remove.
5516 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
5518 PR tree-optimization/83857
5519 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
5520 vectorizable_live_operation for pure SLP statements.
5521 (vectorizable_live_operation): Handle PHIs.
5523 2018-01-16 Richard Biener <rguenther@suse.de>
5525 PR tree-optimization/83867
5526 * tree-vect-stmts.c (vect_transform_stmt): Precompute
5527 nested_in_vect_loop_p since the scalar stmt may get invalidated.
5529 2018-01-16 Jakub Jelinek <jakub@redhat.com>
5532 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
5533 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
5534 If off is not INTEGER_CST, issue a may not be aligned warning
5535 rather than isn't aligned. Use isn%'t rather than isn't.
5536 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
5538 <case MULT_EXPR>: Improve the case when bottom and one of the
5539 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
5540 operand, in that case check if the other operand is multiple of
5541 bottom divided by the INTEGER_CST operand.
5543 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
5546 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
5547 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
5548 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
5549 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
5550 * config/pa/pa.c (pa_function_arg_advance): Likewise.
5551 (pa_function_arg, pa_arg_partial_bytes): Likewise.
5552 (pa_function_arg_size): New function.
5554 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
5556 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
5557 in a separate statement.
5559 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
5561 PR tree-optimization/83847
5562 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
5563 group gathers and scatters.
5565 2018-01-16 Jakub Jelinek <jakub@redhat.com>
5567 PR rtl-optimization/86620
5568 * params.def (max-sched-ready-insns): Bump minimum value to 1.
5570 PR rtl-optimization/83213
5571 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
5572 to last if both are JUMP_INSNs.
5574 PR tree-optimization/83843
5575 * gimple-ssa-store-merging.c
5576 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
5577 store_immediate_info for bswap/nop orig_stores.
5579 2018-01-15 Andrew Waterman <andrew@sifive.com>
5581 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
5583 <UDIV>: Increase cost if !TARGET_DIV.
5585 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
5587 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
5588 (define_attr "cr_logical_3op"): New.
5589 (cceq_ior_compare): Adjust.
5590 (cceq_ior_compare_complement): Adjust.
5591 (*cceq_rev_compare): Adjust.
5592 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
5593 (is_cracked_insn): Adjust.
5594 (insn_must_be_first_in_group): Adjust.
5595 * config/rs6000/40x.md: Adjust.
5596 * config/rs6000/440.md: Adjust.
5597 * config/rs6000/476.md: Adjust.
5598 * config/rs6000/601.md: Adjust.
5599 * config/rs6000/603.md: Adjust.
5600 * config/rs6000/6xx.md: Adjust.
5601 * config/rs6000/7450.md: Adjust.
5602 * config/rs6000/7xx.md: Adjust.
5603 * config/rs6000/8540.md: Adjust.
5604 * config/rs6000/cell.md: Adjust.
5605 * config/rs6000/e300c2c3.md: Adjust.
5606 * config/rs6000/e500mc.md: Adjust.
5607 * config/rs6000/e500mc64.md: Adjust.
5608 * config/rs6000/e5500.md: Adjust.
5609 * config/rs6000/e6500.md: Adjust.
5610 * config/rs6000/mpc.md: Adjust.
5611 * config/rs6000/power4.md: Adjust.
5612 * config/rs6000/power5.md: Adjust.
5613 * config/rs6000/power6.md: Adjust.
5614 * config/rs6000/power7.md: Adjust.
5615 * config/rs6000/power8.md: Adjust.
5616 * config/rs6000/power9.md: Adjust.
5617 * config/rs6000/rs64.md: Adjust.
5618 * config/rs6000/titan.md: Adjust.
5620 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
5622 * config/i386/predicates.md (indirect_branch_operand): Rewrite
5623 ix86_indirect_branch_register logic.
5625 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
5627 * config/i386/constraints.md (Bs): Update
5628 ix86_indirect_branch_register check. Don't check
5629 ix86_indirect_branch_register with GOT_memory_operand.
5631 * config/i386/predicates.md (GOT_memory_operand): Don't check
5632 ix86_indirect_branch_register here.
5633 (GOT32_symbol_operand): Likewise.
5635 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
5637 * config/i386/predicates.md (constant_call_address_operand):
5638 Rewrite ix86_indirect_branch_register logic.
5639 (sibcall_insn_operand): Likewise.
5641 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
5643 * config/i386/constraints.md (Bs): Replace
5644 ix86_indirect_branch_thunk_register with
5645 ix86_indirect_branch_register.
5647 * config/i386/i386.md (indirect_jump): Likewise.
5648 (tablejump): Likewise.
5649 (*sibcall_memory): Likewise.
5650 (*sibcall_value_memory): Likewise.
5651 Peepholes of indirect call and jump via memory: Likewise.
5652 * config/i386/i386.opt: Likewise.
5653 * config/i386/predicates.md (indirect_branch_operand): Likewise.
5654 (GOT_memory_operand): Likewise.
5655 (call_insn_operand): Likewise.
5656 (sibcall_insn_operand): Likewise.
5657 (GOT32_symbol_operand): Likewise.
5659 2018-01-15 Jakub Jelinek <jakub@redhat.com>
5662 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
5663 type rather than type addr's type points to.
5664 (expand_omp_atomic_mutex): Likewise.
5665 (expand_omp_atomic): Likewise.
5667 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
5670 * config/i386/i386.c (output_indirect_thunk_function): Use
5671 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
5672 for __x86_return_thunk.
5674 2018-01-15 Richard Biener <rguenther@suse.de>
5677 * expmed.c (extract_bit_field_1): Fix typo.
5679 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5682 * config/arm/iterators.md (VF): New mode iterator.
5683 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
5684 Remove integer-related logic from pattern.
5685 (neon_vabd<mode>_3): Likewise.
5687 2018-01-15 Jakub Jelinek <jakub@redhat.com>
5690 * common.opt (fstrict-overflow): No longer an alias.
5691 (fwrapv-pointer): New option.
5692 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
5693 also for pointer types based on flag_wrapv_pointer.
5694 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
5695 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
5696 opts->x_flag_wrapv got set.
5697 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
5698 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
5699 POINTER_TYPE_OVERFLOW_UNDEFINED.
5700 * match.pd: Likewise in address comparison pattern.
5701 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
5703 2018-01-15 Richard Biener <rguenther@suse.de>
5706 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
5707 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
5708 Reset type names to their identifier if their TYPE_DECL doesn't
5709 have linkage (and thus is used for ODR and devirt).
5710 (save_debug_info_for_decl): Remove.
5711 (save_debug_info_for_type): Likewise.
5712 (add_tree_to_fld_list): Adjust.
5713 * tree-pretty-print.c (dump_generic_node): Make dumping of
5714 type names more robust.
5716 2018-01-15 Richard Biener <rguenther@suse.de>
5718 * BASE-VER: Bump to 8.0.1.
5720 2018-01-14 Martin Sebor <msebor@redhat.com>
5723 * builtins.c (check_access): Avoid warning when the no-warning bit
5726 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
5728 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
5729 * ira-color (allocno_hard_regs_compare): Likewise.
5731 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
5734 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
5735 Use .pushsection/.popsection.
5737 2018-01-14 Martin Sebor <msebor@redhat.com>
5740 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
5742 2018-01-14 Jakub Jelinek <jakub@redhat.com>
5744 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
5745 entry from extra_headers.
5746 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
5747 extra_headers, make the list bitwise identical to the i?86-*-* one.
5749 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
5751 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
5752 -mcmodel=large with -mindirect-branch=thunk,
5753 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
5754 -mfunction-return=thunk-extern.
5755 * doc/invoke.texi: Document -mcmodel=large is incompatible with
5756 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
5757 -mfunction-return=thunk and -mfunction-return=thunk-extern.
5759 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
5761 * config/i386/i386.c (print_reg): Print the name of the full
5762 integer register without '%'.
5763 (ix86_print_operand): Handle 'V'.
5764 * doc/extend.texi: Document 'V' modifier.
5766 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
5768 * config/i386/constraints.md (Bs): Disallow memory operand for
5769 -mindirect-branch-register.
5771 * config/i386/predicates.md (indirect_branch_operand): Likewise.
5772 (GOT_memory_operand): Likewise.
5773 (call_insn_operand): Likewise.
5774 (sibcall_insn_operand): Likewise.
5775 (GOT32_symbol_operand): Likewise.
5776 * config/i386/i386.md (indirect_jump): Call convert_memory_address
5777 for -mindirect-branch-register.
5778 (tablejump): Likewise.
5779 (*sibcall_memory): Likewise.
5780 (*sibcall_value_memory): Likewise.
5781 Disallow peepholes of indirect call and jump via memory for
5782 -mindirect-branch-register.
5783 (*call_pop): Replace m with Bw.
5784 (*call_value_pop): Likewise.
5785 (*sibcall_pop_memory): Replace m with Bs.
5786 * config/i386/i386.opt (mindirect-branch-register): New option.
5787 * doc/invoke.texi: Document -mindirect-branch-register option.
5789 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
5791 * config/i386/i386-protos.h (ix86_output_function_return): New.
5792 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
5793 set function_return_type.
5794 (indirect_thunk_name): Add ret_p to indicate thunk for function
5796 (output_indirect_thunk_function): Pass false to
5797 indirect_thunk_name.
5798 (ix86_output_indirect_branch_via_reg): Likewise.
5799 (ix86_output_indirect_branch_via_push): Likewise.
5800 (output_indirect_thunk_function): Create alias for function
5801 return thunk if regno < 0.
5802 (ix86_output_function_return): New function.
5803 (ix86_handle_fndecl_attribute): Handle function_return.
5804 (ix86_attribute_table): Add function_return.
5805 * config/i386/i386.h (machine_function): Add
5806 function_return_type.
5807 * config/i386/i386.md (simple_return_internal): Use
5808 ix86_output_function_return.
5809 (simple_return_internal_long): Likewise.
5810 * config/i386/i386.opt (mfunction-return=): New option.
5811 (indirect_branch): Mention -mfunction-return=.
5812 * doc/extend.texi: Document function_return function attribute.
5813 * doc/invoke.texi: Document -mfunction-return= option.
5815 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
5817 * config/i386/i386-opts.h (indirect_branch): New.
5818 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
5819 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
5820 with local indirect jump when converting indirect call and jump.
5821 (ix86_set_indirect_branch_type): New.
5822 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
5823 (indirectlabelno): New.
5824 (indirect_thunk_needed): Likewise.
5825 (indirect_thunk_bnd_needed): Likewise.
5826 (indirect_thunks_used): Likewise.
5827 (indirect_thunks_bnd_used): Likewise.
5828 (INDIRECT_LABEL): Likewise.
5829 (indirect_thunk_name): Likewise.
5830 (output_indirect_thunk): Likewise.
5831 (output_indirect_thunk_function): Likewise.
5832 (ix86_output_indirect_branch_via_reg): Likewise.
5833 (ix86_output_indirect_branch_via_push): Likewise.
5834 (ix86_output_indirect_branch): Likewise.
5835 (ix86_output_indirect_jmp): Likewise.
5836 (ix86_code_end): Call output_indirect_thunk_function if needed.
5837 (ix86_output_call_insn): Call ix86_output_indirect_branch if
5839 (ix86_handle_fndecl_attribute): Handle indirect_branch.
5840 (ix86_attribute_table): Add indirect_branch.
5841 * config/i386/i386.h (machine_function): Add indirect_branch_type
5842 and has_local_indirect_jump.
5843 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
5845 (tablejump): Likewise.
5846 (*indirect_jump): Use ix86_output_indirect_jmp.
5847 (*tablejump_1): Likewise.
5848 (simple_return_indirect_internal): Likewise.
5849 * config/i386/i386.opt (mindirect-branch=): New option.
5850 (indirect_branch): New.
5853 (thunk-inline): Likewise.
5854 (thunk-extern): Likewise.
5855 * doc/extend.texi: Document indirect_branch function attribute.
5856 * doc/invoke.texi: Document -mindirect-branch= option.
5858 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
5861 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
5863 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
5865 * ipa-inline.c (want_inline_small_function_p): Return false if
5866 inlining has already failed with CIF_FINAL_ERROR.
5867 (update_caller_keys): Call want_inline_small_function_p before
5869 (update_callee_keys): Likewise.
5871 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
5873 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
5875 (rs6000_quadword_masked_address_p): Likewise.
5876 (quad_aligned_load_p): Likewise.
5877 (quad_aligned_store_p): Likewise.
5878 (const_load_sequence_p): Add comment to describe the outer-most loop.
5879 (mimic_memory_attributes_and_flags): New function.
5880 (rs6000_gen_stvx): Likewise.
5881 (replace_swapped_aligned_store): Likewise.
5882 (rs6000_gen_lvx): Likewise.
5883 (replace_swapped_aligned_load): Likewise.
5884 (replace_swapped_load_constant): Capitalize argument name in
5885 comment describing this function.
5886 (rs6000_analyze_swaps): Add a third pass to search for vector loads
5887 and stores that access quad-word aligned addresses and replace
5888 with stvx or lvx instructions when appropriate.
5889 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
5890 New function prototype.
5891 (rs6000_quadword_masked_address_p): Likewise.
5892 (rs6000_gen_lvx): Likewise.
5893 (rs6000_gen_stvx): Likewise.
5894 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
5895 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
5896 when memory address is aligned.
5897 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
5898 this split to select lvx instruction when memory address is aligned.
5899 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
5900 instruction when memory address is aligned.
5901 (*vsx_le_perm_load_v16qi): Likewise.
5902 (four unnamed splitters): Modify to select the stvx instruction
5903 when memory is aligned.
5905 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
5907 * predict.c (determine_unlikely_bbs): Handle correctly BBs
5908 which appears in the queue multiple times.
5910 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
5911 Alan Hayward <alan.hayward@arm.com>
5912 David Sherwood <david.sherwood@arm.com>
5914 * tree-vectorizer.h (vec_lower_bound): New structure.
5915 (_loop_vec_info): Add check_nonzero and lower_bounds.
5916 (LOOP_VINFO_CHECK_NONZERO): New macro.
5917 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
5918 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
5919 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
5920 fields. Make seg_len the distance travelled, not including the
5922 (dr_direction_indicator): Declare.
5923 (dr_zero_step_indicator): Likewise.
5924 (dr_known_forward_stride_p): Likewise.
5925 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
5927 (runtime_alias_check_p): Allow runtime alias checks with
5929 (operator ==): Compare access_size and align.
5930 (prune_runtime_alias_test_list): Rework for new distinction between
5931 the access_size and seg_len.
5932 (create_intersect_range_checks_index): Likewise. Cope with polynomial
5934 (get_segment_min_max): New function.
5935 (create_intersect_range_checks): Use it.
5936 (dr_step_indicator): New function.
5937 (dr_direction_indicator): Likewise.
5938 (dr_zero_step_indicator): Likewise.
5939 (dr_known_forward_stride_p): Likewise.
5940 * tree-loop-distribution.c (data_ref_segment_size): Return
5941 DR_STEP * (niters - 1).
5942 (compute_alias_check_pairs): Update call to the dr_with_seg_len
5944 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
5945 (vect_preserves_scalar_order_p): New function, split out from...
5946 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
5947 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
5948 (vect_vfa_access_size): New function.
5949 (vect_vfa_align): Likewise.
5950 (vect_compile_time_alias): Take access_size_a and access_b arguments.
5951 (dump_lower_bound): New function.
5952 (vect_check_lower_bound): Likewise.
5953 (vect_small_gap_p): Likewise.
5954 (vectorizable_with_step_bound_p): Likewise.
5955 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
5956 depencies if the vectorization factor is 1. Convert the checks
5957 for nonzero steps into checks on the bounds of DR_STEP. Try using
5958 a bunds check for variable steps if the minimum required step is
5959 relatively small. Update calls to the dr_with_seg_len
5960 constructor and to vect_compile_time_alias.
5961 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
5963 (vect_loop_versioning): Call it.
5964 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
5966 (vect_estimate_min_profitable_iters): Account for any bounds checks.
5968 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
5969 Alan Hayward <alan.hayward@arm.com>
5970 David Sherwood <david.sherwood@arm.com>
5972 * doc/sourcebuild.texi (vect_scatter_store): Document.
5973 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
5975 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
5977 * genopinit.c (main): Add supports_vec_scatter_store and
5978 supports_vec_scatter_store_cached to target_optabs.
5979 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
5980 IFN_MASK_SCATTER_STORE.
5981 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
5983 * internal-fn.h (internal_store_fn_p): Declare.
5984 (internal_fn_stored_value_index): Likewise.
5985 * internal-fn.c (scatter_store_direct): New macro.
5986 (expand_scatter_store_optab_fn): New function.
5987 (direct_scatter_store_optab_supported_p): New macro.
5988 (internal_store_fn_p): New function.
5989 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
5990 IFN_MASK_SCATTER_STORE.
5991 (internal_fn_mask_index): Likewise.
5992 (internal_fn_stored_value_index): New function.
5993 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
5995 * optabs-query.h (supports_vec_scatter_store_p): Declare.
5996 * optabs-query.c (supports_vec_scatter_store_p): New function.
5997 * tree-vectorizer.h (vect_get_store_rhs): Declare.
5998 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
5999 true for scatter stores.
6000 (vect_gather_scatter_fn_p): Handle scatter stores too.
6001 (vect_check_gather_scatter): Consider using scatter stores if
6002 supports_vec_scatter_store_p.
6003 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
6005 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
6006 internal_fn_stored_value_index.
6007 (check_load_store_masking): Handle scatter stores too.
6008 (vect_get_store_rhs): Make public.
6009 (vectorizable_call): Use internal_store_fn_p.
6010 (vectorizable_store): Handle scatter store internal functions.
6011 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
6012 when deciding whether the end of the group has been reached.
6013 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
6014 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
6015 (mask_scatter_store<mode>): New insns.
6017 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6018 Alan Hayward <alan.hayward@arm.com>
6019 David Sherwood <david.sherwood@arm.com>
6021 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
6022 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
6023 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
6025 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
6026 Use vect_truncate_gather_scatter_offset if we can't treat the
6027 operation as a normal gather load or scatter store.
6028 (get_group_load_store_type): Take the gather_scatter_info
6029 as argument. Try using a gather load or scatter store for
6030 single-element groups.
6031 (get_load_store_type): Update calls to get_group_load_store_type
6032 and vect_use_strided_gather_scatters_p.
6034 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6035 Alan Hayward <alan.hayward@arm.com>
6036 David Sherwood <david.sherwood@arm.com>
6038 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
6039 optional tree argument.
6040 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
6042 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
6043 but continue to use the current value as a fallback.
6044 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
6045 to compare the updates.
6046 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
6047 (get_load_store_type): Use it when handling a strided access.
6048 (vect_get_strided_load_store_ops): New function.
6049 (vect_get_data_ptr_increment): Likewise.
6050 (vectorizable_load): Handle strided gather loads. Always pass
6051 a step to vect_create_data_ref_ptr and bump_vector_ptr.
6053 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6054 Alan Hayward <alan.hayward@arm.com>
6055 David Sherwood <david.sherwood@arm.com>
6057 * doc/md.texi (gather_load@var{m}): Document.
6058 (mask_gather_load@var{m}): Likewise.
6059 * genopinit.c (main): Add supports_vec_gather_load and
6060 supports_vec_gather_load_cached to target_optabs.
6061 * optabs-tree.c (init_tree_optimization_optabs): Use
6062 ggc_cleared_alloc to allocate target_optabs.
6063 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
6064 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
6066 * internal-fn.h (internal_load_fn_p): Declare.
6067 (internal_gather_scatter_fn_p): Likewise.
6068 (internal_fn_mask_index): Likewise.
6069 (internal_gather_scatter_fn_supported_p): Likewise.
6070 * internal-fn.c (gather_load_direct): New macro.
6071 (expand_gather_load_optab_fn): New function.
6072 (direct_gather_load_optab_supported_p): New macro.
6073 (direct_internal_fn_optab): New function.
6074 (internal_load_fn_p): Likewise.
6075 (internal_gather_scatter_fn_p): Likewise.
6076 (internal_fn_mask_index): Likewise.
6077 (internal_gather_scatter_fn_supported_p): Likewise.
6078 * optabs-query.c (supports_at_least_one_mode_p): New function.
6079 (supports_vec_gather_load_p): Likewise.
6080 * optabs-query.h (supports_vec_gather_load_p): Declare.
6081 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
6082 and memory_type field.
6083 (NUM_PATTERNS): Bump to 15.
6084 * tree-vect-data-refs.c: Include internal-fn.h.
6085 (vect_gather_scatter_fn_p): New function.
6086 (vect_describe_gather_scatter_call): Likewise.
6087 (vect_check_gather_scatter): Try using internal functions for
6088 gather loads. Recognize existing calls to a gather load function.
6089 (vect_analyze_data_refs): Consider using gather loads if
6090 supports_vec_gather_load_p.
6091 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
6092 (vect_get_gather_scatter_offset_type): Likewise.
6093 (vect_convert_mask_for_vectype): Likewise.
6094 (vect_add_conversion_to_patterm): Likewise.
6095 (vect_try_gather_scatter_pattern): Likewise.
6096 (vect_recog_gather_scatter_pattern): New pattern recognizer.
6097 (vect_vect_recog_func_ptrs): Add it.
6098 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
6099 internal_fn_mask_index and internal_gather_scatter_fn_p.
6100 (check_load_store_masking): Take the gather_scatter_info as an
6101 argument and handle gather loads.
6102 (vect_get_gather_scatter_ops): New function.
6103 (vectorizable_call): Check internal_load_fn_p.
6104 (vectorizable_load): Likewise. Handle gather load internal
6106 (vectorizable_store): Update call to check_load_store_masking.
6107 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
6108 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
6109 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
6110 (aarch64_gather_scale_operand_d): New predicates.
6111 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
6112 (mask_gather_load<mode>): New insns.
6114 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6115 Alan Hayward <alan.hayward@arm.com>
6116 David Sherwood <david.sherwood@arm.com>
6118 * optabs.def (fold_left_plus_optab): New optab.
6119 * doc/md.texi (fold_left_plus_@var{m}): Document.
6120 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
6121 * internal-fn.c (fold_left_direct): Define.
6122 (expand_fold_left_optab_fn): Likewise.
6123 (direct_fold_left_optab_supported_p): Likewise.
6124 * fold-const-call.c (fold_const_fold_left): New function.
6125 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
6126 * tree-parloops.c (valid_reduction_p): New function.
6127 (gather_scalar_reductions): Use it.
6128 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
6129 (vect_finish_replace_stmt): Declare.
6130 * tree-vect-loop.c (fold_left_reduction_fn): New function.
6131 (needs_fold_left_reduction_p): New function, split out from...
6132 (vect_is_simple_reduction): ...here. Accept reductions that
6133 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
6134 (vect_force_simple_reduction): Also store the reduction type in
6135 the assignment's STMT_VINFO_REDUC_TYPE.
6136 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
6137 (merge_with_identity): New function.
6138 (vect_expand_fold_left): Likewise.
6139 (vectorize_fold_left_reduction): Likewise.
6140 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
6141 scalar phi in place for it. Check for target support and reject
6142 cases that would reassociate the operation. Defer the transform
6143 phase to vectorize_fold_left_reduction.
6144 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
6145 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
6146 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
6148 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6150 * tree-if-conv.c (predicate_mem_writes): Remove redundant
6151 call to ifc_temp_var.
6153 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6154 Alan Hayward <alan.hayward@arm.com>
6155 David Sherwood <david.sherwood@arm.com>
6157 * target.def (legitimize_address_displacement): Take the original
6158 offset as a poly_int.
6159 * targhooks.h (default_legitimize_address_displacement): Update
6161 * targhooks.c (default_legitimize_address_displacement): Likewise.
6162 * doc/tm.texi: Regenerate.
6163 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
6164 as an argument, moving assert of ad->disp == ad->disp_term to...
6165 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
6166 Try calling targetm.legitimize_address_displacement before expanding
6167 the address rather than afterwards, and adjust for the new interface.
6168 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
6169 Match the new hook interface. Handle SVE addresses.
6170 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
6173 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6175 * Makefile.in (OBJS): Add early-remat.o.
6176 * target.def (select_early_remat_modes): New hook.
6177 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
6178 * doc/tm.texi: Regenerate.
6179 * targhooks.h (default_select_early_remat_modes): Declare.
6180 * targhooks.c (default_select_early_remat_modes): New function.
6181 * timevar.def (TV_EARLY_REMAT): New timevar.
6182 * passes.def (pass_early_remat): New pass.
6183 * tree-pass.h (make_pass_early_remat): Declare.
6184 * early-remat.c: New file.
6185 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
6187 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
6189 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6190 Alan Hayward <alan.hayward@arm.com>
6191 David Sherwood <david.sherwood@arm.com>
6193 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
6194 vfm1 with a bound_epilog parameter.
6195 (vect_do_peeling): Update calls accordingly, and move the prologue
6196 call earlier in the function. Treat the base bound_epilog as 0 for
6197 fully-masked loops and retain vf - 1 for other loops. Add 1 to
6198 this base when peeling for gaps.
6199 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
6200 with fully-masked loops.
6201 (vect_estimate_min_profitable_iters): Handle the single peeled
6202 iteration in that case.
6204 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6205 Alan Hayward <alan.hayward@arm.com>
6206 David Sherwood <david.sherwood@arm.com>
6208 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
6209 single-element interleaving even if the size is not a power of 2.
6210 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
6211 accesses for single-element interleaving if the group size is
6214 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6215 Alan Hayward <alan.hayward@arm.com>
6216 David Sherwood <david.sherwood@arm.com>
6218 * doc/md.texi (fold_extract_last_@var{m}): Document.
6219 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
6220 * optabs.def (fold_extract_last_optab): New optab.
6221 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
6222 * internal-fn.c (fold_extract_direct): New macro.
6223 (expand_fold_extract_optab_fn): Likewise.
6224 (direct_fold_extract_optab_supported_p): Likewise.
6225 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
6226 * tree-vect-loop.c (vect_model_reduction_cost): Handle
6227 EXTRACT_LAST_REDUCTION.
6228 (get_initial_def_for_reduction): Do not create an initial vector
6229 for EXTRACT_LAST_REDUCTION reductions.
6230 (vectorizable_reduction): Leave the scalar phi in place for
6231 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
6232 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
6233 epilogue code for EXTRACT_LAST_REDUCTION and defer the
6234 transform phase to vectorizable_condition.
6235 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
6237 (vect_finish_stmt_generation): ...here.
6238 (vect_finish_replace_stmt): New function.
6239 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
6240 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
6242 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
6244 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6245 Alan Hayward <alan.hayward@arm.com>
6246 David Sherwood <david.sherwood@arm.com>
6248 * doc/md.texi (extract_last_@var{m}): Document.
6249 * optabs.def (extract_last_optab): New optab.
6250 * internal-fn.def (EXTRACT_LAST): New internal function.
6251 * internal-fn.c (cond_unary_direct): New macro.
6252 (expand_cond_unary_optab_fn): Likewise.
6253 (direct_cond_unary_optab_supported_p): Likewise.
6254 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
6255 loops using EXTRACT_LAST.
6256 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
6257 (extract_last_<mode>): ...this optab.
6258 (vec_extract<mode><Vel>): Update accordingly.
6260 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6261 Alan Hayward <alan.hayward@arm.com>
6262 David Sherwood <david.sherwood@arm.com>
6264 * target.def (empty_mask_is_expensive): New hook.
6265 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
6266 * doc/tm.texi: Regenerate.
6267 * targhooks.h (default_empty_mask_is_expensive): Declare.
6268 * targhooks.c (default_empty_mask_is_expensive): New function.
6269 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
6270 if the target says that empty masks are expensive.
6271 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
6273 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
6275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6276 Alan Hayward <alan.hayward@arm.com>
6277 David Sherwood <david.sherwood@arm.com>
6279 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
6280 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
6281 (vect_use_loop_mask_for_alignment_p): New function.
6282 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
6283 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
6284 niters_skip argument. Make sure that the first niters_skip elements
6285 of the first iteration are inactive.
6286 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
6287 Update call to vect_set_loop_masks_directly.
6288 (get_misalign_in_elems): New function, split out from...
6289 (vect_gen_prolog_loop_niters): ...here.
6290 (vect_update_init_of_dr): Take a code argument that specifies whether
6291 the adjustment should be added or subtracted.
6292 (vect_update_init_of_drs): Likewise.
6293 (vect_prepare_for_masked_peels): New function.
6294 (vect_do_peeling): Skip prologue peeling if we're using a mask
6295 instead. Update call to vect_update_inits_of_drs.
6296 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
6298 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
6299 alignment. Do not include the number of peeled iterations in
6300 the minimum threshold in that case.
6301 (vectorizable_induction): Adjust the start value down by
6302 LOOP_VINFO_MASK_SKIP_NITERS iterations.
6303 (vect_transform_loop): Call vect_prepare_for_masked_peels.
6304 Take the number of skipped iterations into account when calculating
6306 * tree-vect-stmts.c (vect_gen_while_not): New function.
6308 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6309 Alan Hayward <alan.hayward@arm.com>
6310 David Sherwood <david.sherwood@arm.com>
6312 * doc/sourcebuild.texi (vect_fully_masked): Document.
6313 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
6315 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
6317 (vect_analyze_loop_2): ...here. Don't check the vectorization
6318 factor against the number of loop iterations if the loop is
6321 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6322 Alan Hayward <alan.hayward@arm.com>
6323 David Sherwood <david.sherwood@arm.com>
6325 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
6326 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
6327 (dump_groups): Update accordingly.
6328 (iv_use::mem_type): New member variable.
6329 (address_p): New function.
6330 (record_use): Add a mem_type argument and initialize the new
6332 (record_group_use): Add a mem_type argument. Use address_p.
6333 Remove obsolete null checks of base_object. Update call to record_use.
6334 (find_interesting_uses_op): Update call to record_group_use.
6335 (find_interesting_uses_cond): Likewise.
6336 (find_interesting_uses_address): Likewise.
6337 (get_mem_type_for_internal_fn): New function.
6338 (find_address_like_use): Likewise.
6339 (find_interesting_uses_stmt): Try find_address_like_use before
6340 calling find_interesting_uses_op.
6341 (addr_offset_valid_p): Use the iv mem_type field as the type
6342 of the addressed memory.
6343 (add_autoinc_candidates): Likewise.
6344 (get_address_cost): Likewise.
6345 (split_small_address_groups_p): Use address_p.
6346 (split_address_groups): Likewise.
6347 (add_iv_candidate_for_use): Likewise.
6348 (autoinc_possible_for_pair): Likewise.
6349 (rewrite_groups): Likewise.
6350 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
6351 (determine_group_iv_cost): Update after split of USE_ADDRESS.
6352 (get_alias_ptr_type_for_ptr_address): New function.
6353 (rewrite_use_address): Rewrite address uses in calls that were
6354 identified by find_address_like_use.
6356 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6357 Alan Hayward <alan.hayward@arm.com>
6358 David Sherwood <david.sherwood@arm.com>
6360 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
6362 * gimple-expr.h (is_gimple_addressable: Likewise.
6363 * gimple-expr.c (is_gimple_address): Likewise.
6364 * internal-fn.c (expand_call_mem_ref): New function.
6365 (expand_mask_load_optab_fn): Use it.
6366 (expand_mask_store_optab_fn): Likewise.
6368 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6369 Alan Hayward <alan.hayward@arm.com>
6370 David Sherwood <david.sherwood@arm.com>
6372 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
6373 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
6374 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
6375 (cond_umax@var{mode}): Document.
6376 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
6377 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
6378 (cond_umin_optab, cond_umax_optab): New optabs.
6379 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
6380 (COND_IOR, COND_XOR): New internal functions.
6381 * internal-fn.h (get_conditional_internal_fn): Declare.
6382 * internal-fn.c (cond_binary_direct): New macro.
6383 (expand_cond_binary_optab_fn): Likewise.
6384 (direct_cond_binary_optab_supported_p): Likewise.
6385 (get_conditional_internal_fn): New function.
6386 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
6387 Cope with reduction statements that are vectorized as calls rather
6389 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
6390 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
6391 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
6392 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
6393 (UNSPEC_COND_EOR): New unspecs.
6394 (optab): Add mappings for them.
6395 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
6396 (sve_int_op, sve_fp_op): New int attributes.
6398 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6399 Alan Hayward <alan.hayward@arm.com>
6400 David Sherwood <david.sherwood@arm.com>
6402 * optabs.def (while_ult_optab): New optab.
6403 * doc/md.texi (while_ult@var{m}@var{n}): Document.
6404 * internal-fn.def (WHILE_ULT): New internal function.
6405 * internal-fn.h (direct_internal_fn_supported_p): New override
6406 that takes two types as argument.
6407 * internal-fn.c (while_direct): New macro.
6408 (expand_while_optab_fn): New function.
6409 (convert_optab_supported_p): Likewise.
6410 (direct_while_optab_supported_p): New macro.
6411 * wide-int.h (wi::udiv_ceil): New function.
6412 * tree-vectorizer.h (rgroup_masks): New structure.
6413 (vec_loop_masks): New typedef.
6414 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
6416 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
6417 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
6418 (vect_max_vf): New function.
6419 (slpeel_make_loop_iterate_ntimes): Delete.
6420 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
6421 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
6422 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
6423 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
6424 internal-fn.h, stor-layout.h and optabs-query.h.
6425 (vect_set_loop_mask): New function.
6426 (add_preheader_seq): Likewise.
6427 (add_header_seq): Likewise.
6428 (interleave_supported_p): Likewise.
6429 (vect_maybe_permute_loop_masks): Likewise.
6430 (vect_set_loop_masks_directly): Likewise.
6431 (vect_set_loop_condition_masked): Likewise.
6432 (vect_set_loop_condition_unmasked): New function, split out from
6433 slpeel_make_loop_iterate_ntimes.
6434 (slpeel_make_loop_iterate_ntimes): Rename to..
6435 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
6436 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
6437 (vect_do_peeling): Update call accordingly.
6438 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
6440 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
6441 mask_compare_type, can_fully_mask_p and fully_masked_p.
6442 (release_vec_loop_masks): New function.
6443 (_loop_vec_info): Use it to free the loop masks.
6444 (can_produce_all_loop_masks_p): New function.
6445 (vect_get_max_nscalars_per_iter): Likewise.
6446 (vect_verify_full_masking): Likewise.
6447 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
6448 retries, and free the mask rgroups before retrying. Check loop-wide
6449 reasons for disallowing fully-masked loops. Make the final decision
6450 about whether use a fully-masked loop or not.
6451 (vect_estimate_min_profitable_iters): Do not assume that peeling
6452 for the number of iterations will be needed for fully-masked loops.
6453 (vectorizable_reduction): Disable fully-masked loops.
6454 (vectorizable_live_operation): Likewise.
6455 (vect_halve_mask_nunits): New function.
6456 (vect_double_mask_nunits): Likewise.
6457 (vect_record_loop_mask): Likewise.
6458 (vect_get_loop_mask): Likewise.
6459 (vect_transform_loop): Handle the case in which the final loop
6460 iteration might handle a partial vector. Call vect_set_loop_condition
6461 instead of slpeel_make_loop_iterate_ntimes.
6462 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
6463 (check_load_store_masking): New function.
6464 (prepare_load_store_mask): Likewise.
6465 (vectorizable_store): Handle fully-masked loops.
6466 (vectorizable_load): Likewise.
6467 (supportable_widening_operation): Use vect_halve_mask_nunits for
6469 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
6470 (vect_gen_while): New function.
6471 * config/aarch64/aarch64.md (umax<mode>3): New expander.
6472 (aarch64_uqdec<mode>): New insn.
6474 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6475 Alan Hayward <alan.hayward@arm.com>
6476 David Sherwood <david.sherwood@arm.com>
6478 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
6479 (reduc_xor_scal_optab): New optabs.
6480 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
6481 (reduc_xor_scal_@var{m}): Document.
6482 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
6483 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
6485 * fold-const-call.c (fold_const_call): Handle them.
6486 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
6487 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
6488 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
6489 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
6490 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
6491 (UNSPEC_XORV): New unspecs.
6492 (optab): Add entries for them.
6493 (BITWISEV): New int iterator.
6494 (bit_reduc_op): New int attributes.
6496 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6497 Alan Hayward <alan.hayward@arm.com>
6498 David Sherwood <david.sherwood@arm.com>
6500 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
6501 * internal-fn.def (VEC_SHL_INSERT): New internal function.
6502 * optabs.def (vec_shl_insert_optab): New optab.
6503 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
6504 (duplicate_and_interleave): Likewise.
6505 * tree-vect-loop.c: Include internal-fn.h.
6506 (neutral_op_for_slp_reduction): New function, split out from
6507 get_initial_defs_for_reduction.
6508 (get_initial_def_for_reduction): Handle option 2 for variable-length
6509 vectors by loading the neutral value into a vector and then shifting
6510 the initial value into element 0.
6511 (get_initial_defs_for_reduction): Replace the code argument with
6512 the neutral value calculated by neutral_op_for_slp_reduction.
6513 Use gimple_build_vector for constant-length vectors.
6514 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
6515 but the first group_size elements have a neutral value.
6516 Use duplicate_and_interleave otherwise.
6517 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
6518 Update call to get_initial_defs_for_reduction. Handle SLP
6519 reductions for variable-length vectors by creating one vector
6520 result for each scalar result, with the elements associated
6521 with other scalar results stubbed out with the neutral value.
6522 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
6523 Require IFN_VEC_SHL_INSERT for double reductions on
6524 variable-length vectors, or SLP reductions that have
6525 a neutral value. Require can_duplicate_and_interleave_p
6526 support for variable-length unchained SLP reductions if there
6527 is no neutral value, such as for MIN/MAX reductions. Also require
6528 the number of vector elements to be a multiple of the number of
6529 SLP statements when doing variable-length unchained SLP reductions.
6530 Update call to vect_create_epilog_for_reduction.
6531 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
6532 and remove initial values.
6533 (duplicate_and_interleave): Make public.
6534 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
6535 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
6537 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6538 Alan Hayward <alan.hayward@arm.com>
6539 David Sherwood <david.sherwood@arm.com>
6541 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
6542 (can_duplicate_and_interleave_p): New function.
6543 (vect_get_and_check_slp_defs): Take the vector of statements
6544 rather than just the current one. Remove excess parentheses.
6545 Restriction rejectinon of vect_constant_def and vect_external_def
6546 for variable-length vectors to boolean types, or types for which
6547 can_duplicate_and_interleave_p is false.
6548 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
6549 (duplicate_and_interleave): New function.
6550 (vect_get_constant_vectors): Use gimple_build_vector for
6551 constant-length vectors and suitable variable-length constant
6552 vectors. Use duplicate_and_interleave for other variable-length
6553 vectors. Don't defer the update when inserting new statements.
6555 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6556 Alan Hayward <alan.hayward@arm.com>
6557 David Sherwood <david.sherwood@arm.com>
6559 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
6560 min_profitable_iters doesn't go negative.
6562 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6563 Alan Hayward <alan.hayward@arm.com>
6564 David Sherwood <david.sherwood@arm.com>
6566 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
6567 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
6568 * optabs.def (vec_mask_load_lanes_optab): New optab.
6569 (vec_mask_store_lanes_optab): Likewise.
6570 * internal-fn.def (MASK_LOAD_LANES): New internal function.
6571 (MASK_STORE_LANES): Likewise.
6572 * internal-fn.c (mask_load_lanes_direct): New macro.
6573 (mask_store_lanes_direct): Likewise.
6574 (expand_mask_load_optab_fn): Handle masked operations.
6575 (expand_mask_load_lanes_optab_fn): New macro.
6576 (expand_mask_store_optab_fn): Handle masked operations.
6577 (expand_mask_store_lanes_optab_fn): New macro.
6578 (direct_mask_load_lanes_optab_supported_p): Likewise.
6579 (direct_mask_store_lanes_optab_supported_p): Likewise.
6580 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
6582 (vect_load_lanes_supported): Likewise.
6583 * tree-vect-data-refs.c (strip_conversion): New function.
6584 (can_group_stmts_p): Likewise.
6585 (vect_analyze_data_ref_accesses): Use it instead of checking
6586 for a pair of assignments.
6587 (vect_store_lanes_supported): Take a masked_p parameter.
6588 (vect_load_lanes_supported): Likewise.
6589 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
6590 vect_store_lanes_supported and vect_load_lanes_supported.
6591 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6592 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
6593 parameter. Don't allow gaps for masked accesses.
6594 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
6595 and vect_load_lanes_supported.
6596 (get_load_store_type): Take a masked_p parameter and update
6597 call to get_group_load_store_type.
6598 (vectorizable_store): Update call to get_load_store_type.
6599 Handle IFN_MASK_STORE_LANES.
6600 (vectorizable_load): Update call to get_load_store_type.
6601 Handle IFN_MASK_LOAD_LANES.
6603 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6604 Alan Hayward <alan.hayward@arm.com>
6605 David Sherwood <david.sherwood@arm.com>
6607 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
6609 * config/aarch64/aarch64-protos.h
6610 (aarch64_sve_struct_memory_operand_p): Declare.
6611 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
6612 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
6613 (VPRED, vpred): Handle SVE structure modes.
6614 * config/aarch64/constraints.md (Utx): New constraint.
6615 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
6616 (aarch64_sve_struct_nonimmediate_operand): New predicates.
6617 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
6618 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
6619 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
6620 structure modes. Split into pieces after RA.
6621 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
6622 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
6624 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
6625 SVE structure modes.
6626 (aarch64_classify_address): Likewise.
6627 (sizetochar): Move earlier in file.
6628 (aarch64_print_operand): Handle SVE register lists.
6629 (aarch64_array_mode): New function.
6630 (aarch64_sve_struct_memory_operand_p): Likewise.
6631 (TARGET_ARRAY_MODE): Redefine.
6633 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6634 Alan Hayward <alan.hayward@arm.com>
6635 David Sherwood <david.sherwood@arm.com>
6637 * target.def (array_mode): New target hook.
6638 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
6639 * doc/tm.texi: Regenerate.
6640 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
6641 * hooks.c (hook_optmode_mode_uhwi_none): New function.
6642 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
6644 * stor-layout.c (mode_for_array): Likewise. Support polynomial
6647 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6648 Alan Hayward <alan.hayward@arm.com>
6649 David Sherwood <david.sherwood@arm.com>
6651 * fold-const.c (fold_binary_loc): Check the argument types
6652 rather than the result type when testing for a vector operation.
6654 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6656 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
6657 * doc/tm.texi: Regenerate.
6659 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6660 Alan Hayward <alan.hayward@arm.com>
6661 David Sherwood <david.sherwood@arm.com>
6663 * doc/invoke.texi (-msve-vector-bits=): Document new option.
6664 (sve): Document new AArch64 extension.
6665 * doc/md.texi (w): Extend the description of the AArch64
6666 constraint to include SVE vectors.
6667 (Upl, Upa): Document new AArch64 predicate constraints.
6668 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
6670 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
6671 (msve-vector-bits=): New option.
6672 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
6673 SVE when these are disabled.
6674 (sve): New extension.
6675 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
6676 modes. Adjust their number of units based on aarch64_sve_vg.
6677 (MAX_BITSIZE_MODE_ANY_MODE): Define.
6678 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
6679 aarch64_addr_query_type.
6680 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
6681 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
6682 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
6683 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
6684 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
6685 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
6686 (aarch64_simd_imm_zero_p): Delete.
6687 (aarch64_check_zero_based_sve_index_immediate): Declare.
6688 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
6689 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
6690 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
6691 (aarch64_sve_float_mul_immediate_p): Likewise.
6692 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
6694 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
6695 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
6696 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
6697 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
6698 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
6699 (aarch64_regmode_natural_size): Likewise.
6700 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
6701 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
6703 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
6704 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
6705 for VG and the SVE predicate registers.
6706 (V_ALIASES): Add a "z"-prefixed alias.
6707 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
6708 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
6709 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
6710 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
6711 (REG_CLASS_NAMES): Add entries for them.
6712 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
6713 and the predicate registers.
6714 (aarch64_sve_vg): Declare.
6715 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
6716 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
6717 (REGMODE_NATURAL_SIZE): Define.
6718 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
6720 * config/aarch64/aarch64.c: Include cfgrtl.h.
6721 (simd_immediate_info): Add a constructor for series vectors,
6722 and an associated step field.
6723 (aarch64_sve_vg): New variable.
6724 (aarch64_dbx_register_number): Handle VG and the predicate registers.
6725 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
6726 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
6727 (VEC_ANY_DATA, VEC_STRUCT): New constants.
6728 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
6729 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
6730 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
6731 (aarch64_get_mask_mode): New functions.
6732 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
6733 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
6734 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
6735 predicate modes and predicate registers. Explicitly restrict
6736 GPRs to modes of 16 bytes or smaller. Only allow FP registers
6737 to store a vector mode if it is recognized by
6738 aarch64_classify_vector_mode.
6739 (aarch64_regmode_natural_size): New function.
6740 (aarch64_hard_regno_caller_save_mode): Return the original mode
6742 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
6743 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
6744 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
6745 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
6747 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
6748 does not overlap dest if the function is frame-related. Handle
6750 (aarch64_split_add_offset): New function.
6751 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
6752 them aarch64_add_offset.
6753 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
6754 and update call to aarch64_sub_sp.
6755 (aarch64_add_cfa_expression): New function.
6756 (aarch64_expand_prologue): Pass extra temporary registers to the
6757 functions above. Handle the case in which we need to emit new
6758 DW_CFA_expressions for registers that were originally saved
6759 relative to the stack pointer, but now have to be expressed
6760 relative to the frame pointer.
6761 (aarch64_output_mi_thunk): Pass extra temporary registers to the
6763 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
6764 IP0 and IP1 values for SVE frames.
6765 (aarch64_expand_vec_series): New function.
6766 (aarch64_expand_sve_widened_duplicate): Likewise.
6767 (aarch64_expand_sve_const_vector): Likewise.
6768 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
6769 Handle SVE constants. Use emit_move_insn to move a force_const_mem
6770 into the register, rather than emitting a SET directly.
6771 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
6772 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
6773 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
6774 (offset_9bit_signed_scaled_p): New functions.
6775 (aarch64_replicate_bitmask_imm): New function.
6776 (aarch64_bitmask_imm): Use it.
6777 (aarch64_cannot_force_const_mem): Reject expressions involving
6778 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
6779 (aarch64_classify_index): Handle SVE indices, by requiring
6780 a plain register index with a scale that matches the element size.
6781 (aarch64_classify_address): Handle SVE addresses. Assert that
6782 the mode of the address is VOIDmode or an integer mode.
6783 Update call to aarch64_classify_symbol.
6784 (aarch64_classify_symbolic_expression): Update call to
6785 aarch64_classify_symbol.
6786 (aarch64_const_vec_all_in_range_p): New function.
6787 (aarch64_print_vector_float_operand): Likewise.
6788 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
6789 "vN" for FP registers with SVE modes. Handle (const ...) vectors
6790 and the FP immediates 1.0 and 0.5.
6791 (aarch64_print_address_internal): Handle SVE addresses.
6792 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
6793 (aarch64_regno_regclass): Handle predicate registers.
6794 (aarch64_secondary_reload): Handle big-endian reloads of SVE
6796 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
6797 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
6798 (aarch64_convert_sve_vector_bits): New function.
6799 (aarch64_override_options): Use it to handle -msve-vector-bits=.
6800 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
6802 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
6803 Handle SVE vector and predicate modes. Accept VL-based constants
6804 that need only one temporary register, and VL offsets that require
6805 no temporary registers.
6806 (aarch64_conditional_register_usage): Mark the predicate registers
6807 as fixed if SVE isn't available.
6808 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
6809 Return true for SVE vector and predicate modes.
6810 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
6811 rather than an unsigned int. Handle SVE modes.
6812 (aarch64_preferred_simd_mode): Update call accordingly. Handle
6814 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
6816 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
6817 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
6818 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
6819 (aarch64_sve_float_mul_immediate_p): New functions.
6820 (aarch64_sve_valid_immediate): New function.
6821 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
6822 Explicitly reject structure modes. Check for INDEX constants.
6823 Handle PTRUE and PFALSE constants.
6824 (aarch64_check_zero_based_sve_index_immediate): New function.
6825 (aarch64_simd_imm_zero_p): Delete.
6826 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
6827 vector modes. Accept constants in the range of CNT[BHWD].
6828 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
6829 ask for an Advanced SIMD mode.
6830 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
6831 (aarch64_simd_vector_alignment): Handle SVE predicates.
6832 (aarch64_vectorize_preferred_vector_alignment): New function.
6833 (aarch64_simd_vector_alignment_reachable): Use it instead of
6835 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
6836 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
6838 (MAX_VECT_LEN): Delete.
6839 (expand_vec_perm_d): Add a vec_flags field.
6840 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
6841 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
6842 (aarch64_evpc_ext): Don't apply a big-endian lane correction
6844 (aarch64_evpc_rev): Rename to...
6845 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
6846 (aarch64_evpc_rev_global): New function.
6847 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
6848 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
6850 (aarch64_evpc_sve_tbl): New function.
6851 (aarch64_expand_vec_perm_const_1): Update after rename of
6852 aarch64_evpc_rev. Handle SVE permutes too, trying
6853 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
6854 than aarch64_evpc_tbl.
6855 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
6856 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
6857 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
6858 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
6859 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
6860 (aarch64_expand_sve_vcond): New functions.
6861 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
6862 of aarch64_vector_mode_p.
6863 (aarch64_dwarf_poly_indeterminate_value): New function.
6864 (aarch64_compute_pressure_classes): Likewise.
6865 (aarch64_can_change_mode_class): Likewise.
6866 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
6867 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
6868 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
6869 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
6870 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
6871 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
6872 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
6873 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
6875 (Dn, Dl, Dr): Accept const as well as const_vector.
6876 (Dz): Likewise. Compare against CONST0_RTX.
6877 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
6878 of "vector" where appropriate.
6879 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
6880 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
6881 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
6882 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
6883 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
6884 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
6885 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
6886 (v_int_equiv): Extend to SVE modes.
6887 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
6889 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
6890 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
6891 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
6892 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
6893 (SVE_COND_FP_CMP): New int iterators.
6894 (perm_hilo): Handle the new unpack unspecs.
6895 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
6897 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
6898 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
6899 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
6900 (aarch64_equality_operator, aarch64_constant_vector_operand)
6901 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
6902 (aarch64_sve_nonimmediate_operand): Likewise.
6903 (aarch64_sve_general_operand): Likewise.
6904 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
6905 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
6906 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
6907 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
6908 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
6909 (aarch64_sve_float_arith_immediate): Likewise.
6910 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
6911 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
6912 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
6913 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
6914 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
6915 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
6916 (aarch64_sve_float_arith_operand): Likewise.
6917 (aarch64_sve_float_arith_with_sub_operand): Likewise.
6918 (aarch64_sve_float_mul_operand): Likewise.
6919 (aarch64_sve_vec_perm_operand): Likewise.
6920 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
6921 (aarch64_mov_operand): Accept const_poly_int and const_vector.
6922 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
6923 as well as const_vector.
6924 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
6925 in file. Use CONST0_RTX and CONSTM1_RTX.
6926 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
6927 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
6928 Use aarch64_simd_imm_zero.
6929 * config/aarch64/aarch64-sve.md: New file.
6930 * config/aarch64/aarch64.md: Include it.
6931 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
6932 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
6933 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
6934 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
6935 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
6936 (sve): New attribute.
6937 (enabled): Disable instructions with the sve attribute unless
6939 (movqi, movhi): Pass CONST_POLY_INT operaneds through
6940 aarch64_expand_mov_immediate.
6941 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
6942 CNT[BHSD] immediates.
6943 (movti): Split CONST_POLY_INT moves into two halves.
6944 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
6945 Split additions that need a temporary here if the destination
6946 is the stack pointer.
6947 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
6948 (*add<mode>3_poly_1): New instruction.
6949 (set_clobber_cc): New expander.
6951 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6953 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
6954 parameter and use it instead of GET_MODE_SIZE (innermode). Use
6955 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
6956 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
6957 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
6958 Change innermode from fixed_mode_size to machine_mode.
6959 (simplify_subreg): Update call accordingly. Handle a constant-sized
6960 subreg of a variable-length CONST_VECTOR.
6962 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
6963 Alan Hayward <alan.hayward@arm.com>
6964 David Sherwood <david.sherwood@arm.com>
6966 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
6967 (add_offset_to_base): New function, split out from...
6968 (create_mem_ref): ...here. When handling a scale other than 1,
6969 check first whether the address is valid without the offset.
6970 Add it into the base if so, leaving the index and scale as-is.
6972 2018-01-12 Jakub Jelinek <jakub@redhat.com>
6975 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
6976 fold_for_warn before checking if arg2 is INTEGER_CST.
6978 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
6980 * config/rs6000/predicates.md (load_multiple_operation): Delete.
6981 (store_multiple_operation): Delete.
6982 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
6983 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
6984 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
6985 guarded by TARGET_STRING.
6986 (rs6000_output_load_multiple): Delete.
6987 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
6988 OPTION_MASK_STRING / TARGET_STRING handling.
6989 (print_operand) <'N', 'O'>: Add comment that these are unused now.
6990 (const rs6000_opt_masks) <"string">: Change mask to 0.
6991 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
6992 (MASK_STRING): Delete.
6993 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
6995 (load_multiple): Delete.
7002 (store_multiple): Delete.
7009 (movmemsi_8reg): Delete.
7010 (corresponding unnamed define_insn): Delete.
7011 (movmemsi_6reg): Delete.
7012 (corresponding unnamed define_insn): Delete.
7013 (movmemsi_4reg): Delete.
7014 (corresponding unnamed define_insn): Delete.
7015 (movmemsi_2reg): Delete.
7016 (corresponding unnamed define_insn): Delete.
7017 (movmemsi_1reg): Delete.
7018 (corresponding unnamed define_insn): Delete.
7019 * config/rs6000/rs6000.opt (mno-string): New.
7020 (mstring): Replace by deprecation warning stub.
7021 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
7023 2018-01-12 Jakub Jelinek <jakub@redhat.com>
7025 * regrename.c (regrename_do_replace): If replacing the same
7026 reg multiple times, try to reuse last created gen_raw_REG.
7029 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
7030 main to workaround a bug in GDB.
7032 2018-01-12 Tom de Vries <tom@codesourcery.com>
7035 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
7037 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
7039 PR rtl-optimization/80481
7040 * ira-color.c (get_cap_member): New function.
7041 (allocnos_conflict_by_live_ranges_p): Use it.
7042 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
7043 (setup_slot_coalesced_allocno_live_ranges): Ditto.
7045 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
7048 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
7049 (*saddl_se_1): Ditto.
7051 (*ssubl_se_1): Ditto.
7053 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
7055 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
7056 rather than wi::to_widest for DR_INITs.
7057 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
7058 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
7059 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
7061 (vect_analyze_group_access_1): Note that here.
7063 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
7065 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
7066 polynomial type sizes.
7068 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
7070 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
7071 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
7072 (gimple_add_tmp_var): Likewise.
7074 2018-01-12 Martin Liska <mliska@suse.cz>
7076 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
7077 (gimple_alloc_sizes): Likewise.
7078 (dump_gimple_statistics): Use PRIu64 in printf format.
7079 * gimple.h: Change uint64_t to int.
7081 2018-01-12 Martin Liska <mliska@suse.cz>
7083 * tree-core.h: Use uint64_t instead of int.
7084 * tree.c (tree_node_counts): Likewise.
7085 (tree_node_sizes): Likewise.
7086 (dump_tree_statistics): Use PRIu64 in printf format.
7088 2018-01-12 Martin Liska <mliska@suse.cz>
7090 * Makefile.in: As qsort_chk is implemented in vec.c, add
7091 vec.o to linkage of gencfn-macros.
7092 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
7093 passing the info to record_node_allocation_statistics.
7094 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
7096 * ggc-common.c (struct ggc_usage): Add operator== and use
7097 it in operator< and compare function.
7098 * mem-stats.h (struct mem_usage): Likewise.
7099 * vec.c (struct vec_usage): Remove operator< and compare
7100 function. Can be simply inherited.
7102 2018-01-12 Martin Jambor <mjambor@suse.cz>
7105 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
7106 * tree-ssa-math-opts.c: Include domwalk.h.
7107 (convert_mult_to_fma_1): New function.
7108 (fma_transformation_info): New type.
7109 (fma_deferring_state): Likewise.
7110 (cancel_fma_deferring): New function.
7111 (result_of_phi): Likewise.
7112 (last_fma_candidate_feeds_initial_phi): Likewise.
7113 (convert_mult_to_fma): Added deferring logic, split actual
7114 transformation to convert_mult_to_fma_1.
7115 (math_opts_dom_walker): New type.
7116 (math_opts_dom_walker::after_dom_children): New method, body moved
7117 here from pass_optimize_widening_mul::execute, added deferring logic
7119 (pass_optimize_widening_mul::execute): Moved most of code to
7120 math_opts_dom_walker::after_dom_children.
7121 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
7122 * config/i386/i386.c (ix86_option_override_internal): Added
7123 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
7125 2018-01-12 Richard Biener <rguenther@suse.de>
7128 * dwarf2out.c (gen_variable_die): Do not reset old_die for
7129 inline instance vars.
7131 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
7134 * config/rx/rx.c (rx_is_restricted_memory_address):
7137 2018-01-12 Richard Biener <rguenther@suse.de>
7139 PR tree-optimization/80846
7140 * target.def (split_reduction): New target hook.
7141 * targhooks.c (default_split_reduction): New function.
7142 * targhooks.h (default_split_reduction): Declare.
7143 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
7144 target requests first reduce vectors by combining low and high
7146 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
7147 (get_vectype_for_scalar_type_and_size): Export.
7148 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
7149 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
7150 * doc/tm.texi: Regenerate.
7151 * config/i386/i386.c (ix86_split_reduction): Implement
7152 TARGET_VECTORIZE_SPLIT_REDUCTION.
7154 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
7157 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
7158 in PIC mode except for TARGET_VXWORKS_RTP.
7159 * config/sparc/sparc.c: Include cfgrtl.h.
7160 (TARGET_INIT_PIC_REG): Define.
7161 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
7162 (sparc_pic_register_p): New predicate.
7163 (sparc_legitimate_address_p): Use it.
7164 (sparc_legitimize_pic_address): Likewise.
7165 (sparc_delegitimize_address): Likewise.
7166 (sparc_mode_dependent_address_p): Likewise.
7167 (gen_load_pcrel_sym): Remove 4th parameter.
7168 (load_got_register): Adjust call to above. Remove obsolete stuff.
7169 (sparc_expand_prologue): Do not call load_got_register here.
7170 (sparc_flat_expand_prologue): Likewise.
7171 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
7172 (sparc_use_pseudo_pic_reg): New function.
7173 (sparc_init_pic_reg): Likewise.
7174 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
7175 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
7177 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
7179 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
7180 Add item for branch_cost.
7182 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
7184 PR rtl-optimization/83565
7185 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
7186 not extend the result to a larger mode for rotate operations.
7187 (num_sign_bit_copies1): Likewise.
7189 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7192 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
7194 Use values-Xc.o for -pedantic.
7195 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
7197 2018-01-12 Martin Liska <mliska@suse.cz>
7200 * ipa-devirt.c (final_warning_record::grow_type_warnings):
7202 (possible_polymorphic_call_targets): Use it.
7203 (ipa_devirt): Likewise.
7205 2018-01-12 Martin Liska <mliska@suse.cz>
7207 * profile-count.h (enum profile_quality): Use 0 as invalid
7208 enum value of profile_quality.
7210 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
7212 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
7213 -mext-string options.
7215 2018-01-12 Richard Biener <rguenther@suse.de>
7217 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
7218 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
7219 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
7221 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
7223 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7225 * configure.ac (--with-long-double-format): Add support for the
7226 configuration option to change the default long double format on
7228 * config.gcc (powerpc*-linux*-*): Likewise.
7229 * configure: Regenerate.
7230 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
7231 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
7232 used without modification.
7234 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7236 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
7237 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
7238 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
7239 MISC_BUILTIN_SPEC_BARRIER.
7240 (rs6000_init_builtins): Likewise.
7241 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
7243 (speculation_barrier): New define_insn.
7244 * doc/extend.texi: Document __builtin_speculation_barrier.
7246 2018-01-11 Jakub Jelinek <jakub@redhat.com>
7249 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
7250 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
7251 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
7253 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
7254 integral modes instead of "ss" and "sd".
7255 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
7256 vectors with 32-bit and 64-bit elements.
7257 (vecdupssescalarmodesuffix): New mode attribute.
7258 (vec_dup<mode>): Use it.
7260 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
7263 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
7264 frame if argument is passed on stack.
7266 2018-01-11 Jakub Jelinek <jakub@redhat.com>
7269 * ree.c (combine_reaching_defs): Optimize also
7270 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
7271 reg2=any_extend(exp); reg1=reg2;, formatting fix.
7273 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
7276 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
7278 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
7281 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
7282 after they are computed.
7284 2018-01-11 Bin Cheng <bin.cheng@arm.com>
7286 PR tree-optimization/83695
7287 * gimple-loop-linterchange.cc
7288 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
7289 reset cached scev information after interchange.
7290 (pass_linterchange::execute): Remove call to scev_reset_htab.
7292 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7294 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
7295 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
7296 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
7297 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
7298 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
7299 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
7300 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
7301 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
7302 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
7303 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
7304 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
7305 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
7306 (V_lane_reg): Likewise.
7307 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
7309 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
7310 (vfmal_lane_low<mode>_intrinsic,
7311 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
7312 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
7313 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
7314 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
7315 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
7316 vfmsl_lane_high<mode>_intrinsic): New define_insns.
7318 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7320 * config/arm/arm-cpus.in (fp16fml): New feature.
7321 (ALL_SIMD): Add fp16fml.
7322 (armv8.2-a): Add fp16fml as an option.
7323 (armv8.3-a): Likewise.
7324 (armv8.4-a): Add fp16fml as part of fp16.
7325 * config/arm/arm.h (TARGET_FP16FML): Define.
7326 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
7328 * config/arm/arm-modes.def (V2HF): Define.
7329 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
7330 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
7331 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
7332 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
7333 vfmsl_low, vfmsl_high): New set of builtins.
7334 * config/arm/iterators.md (PLUSMINUS): New code iterator.
7335 (vfml_op): New code attribute.
7336 (VFMLHALVES): New int iterator.
7337 (VFML, VFMLSEL): New mode attributes.
7338 (V_reg): Define mapping for V2HF.
7339 (V_hi, V_lo): New mode attributes.
7340 (VF_constraint): Likewise.
7341 (vfml_half, vfml_half_selector): New int attributes.
7342 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
7344 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
7345 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
7347 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
7348 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
7349 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
7350 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
7352 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
7353 Document new effective target and option set.
7355 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7357 * config/arm/arm-cpus.in (armv8_4): New feature.
7358 (ARMv8_4a): New fgroup.
7359 (armv8.4-a): New arch.
7360 * config/arm/arm-tables.opt: Regenerate.
7361 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
7362 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
7363 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
7364 Add matching rules for -march=armv8.4-a and extensions.
7365 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
7367 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
7370 * config/rx/rx.md (BW): New mode attribute.
7371 (sync_lock_test_and_setsi): Add mode suffix to insn output.
7373 2018-01-11 Richard Biener <rguenther@suse.de>
7375 PR tree-optimization/83435
7376 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
7377 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
7378 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
7380 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
7381 Alan Hayward <alan.hayward@arm.com>
7382 David Sherwood <david.sherwood@arm.com>
7384 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
7386 (aarch64_classify_address): Initialize it. Track polynomial offsets.
7387 (aarch64_print_address_internal): Use it to check for a zero offset.
7389 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
7390 Alan Hayward <alan.hayward@arm.com>
7391 David Sherwood <david.sherwood@arm.com>
7393 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
7394 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
7395 Return a poly_int64 rather than a HOST_WIDE_INT.
7396 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
7397 rather than a HOST_WIDE_INT.
7398 * config/aarch64/aarch64.h (aarch64_frame): Protect with
7399 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
7400 hard_fp_offset, frame_size, initial_adjust, callee_offset and
7401 final_offset from HOST_WIDE_INT to poly_int64.
7402 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
7403 to_constant when getting the number of units in an Advanced SIMD
7405 (aarch64_builtin_vectorized_function): Check for a constant number
7407 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
7409 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
7410 attribute instead of GET_MODE_NUNITS.
7411 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
7412 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
7413 GET_MODE_SIZE for fixed-size registers.
7414 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
7415 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
7416 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
7417 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
7418 (aarch64_print_operand, aarch64_print_address_internal)
7419 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
7420 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
7421 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
7422 Handle polynomial GET_MODE_SIZE.
7423 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
7424 wider than SImode without modification.
7425 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
7426 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
7427 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
7428 passing and returning SVE modes.
7429 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
7430 rather than GEN_INT.
7431 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
7432 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
7433 (aarch64_allocate_and_probe_stack_space): Likewise.
7434 (aarch64_layout_frame): Cope with polynomial offsets.
7435 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
7436 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
7438 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
7439 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
7440 poly_int64 rather than a HOST_WIDE_INT.
7441 (aarch64_get_separate_components, aarch64_process_components)
7442 (aarch64_expand_prologue, aarch64_expand_epilogue)
7443 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
7444 (aarch64_anchor_offset): New function, split out from...
7445 (aarch64_legitimize_address): ...here.
7446 (aarch64_builtin_vectorization_cost): Handle polynomial
7447 TYPE_VECTOR_SUBPARTS.
7448 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
7450 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
7451 number of elements from the PARALLEL rather than the mode.
7452 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
7453 rather than GET_MODE_BITSIZE.
7454 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
7455 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
7456 (aarch64_expand_vec_perm_const_1): Handle polynomial
7457 d->perm.length () and d->perm elements.
7458 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
7459 Apply to_constant to d->perm elements.
7460 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
7461 polynomial CONST_VECTOR_NUNITS.
7462 (aarch64_move_pointer): Take amount as a poly_int64 rather
7464 (aarch64_progress_pointer): Avoid temporary variable.
7465 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
7466 the mode attribute instead of GET_MODE.
7468 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
7469 Alan Hayward <alan.hayward@arm.com>
7470 David Sherwood <david.sherwood@arm.com>
7472 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
7473 x exists before using it.
7474 (aarch64_add_constant_internal): Rename to...
7475 (aarch64_add_offset_1): ...this. Replace regnum with separate
7476 src and dest rtxes. Handle the case in which they're different,
7477 including when the offset is zero. Replace scratchreg with an rtx.
7478 Use 2 additions if there is no spare register into which we can
7479 move a 16-bit constant.
7480 (aarch64_add_constant): Delete.
7481 (aarch64_add_offset): Replace reg with separate src and dest
7482 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
7483 Use aarch64_add_offset_1.
7484 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
7485 an rtx rather than an int. Take the delta as a poly_int64
7486 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
7487 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
7488 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
7489 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
7490 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
7492 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
7493 aarch64_add_constant.
7495 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
7497 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
7498 Use scalar_float_mode.
7500 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
7502 * config/aarch64/aarch64-simd.md
7503 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
7504 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
7505 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
7506 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
7507 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
7508 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
7509 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
7510 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
7511 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
7512 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
7514 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7517 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
7518 targ_options->x_arm_arch_string is non NULL.
7520 2018-01-11 Tamar Christina <tamar.christina@arm.com>
7522 * config/aarch64/aarch64.h
7523 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
7525 2018-01-11 Sudakshina Das <sudi.das@arm.com>
7528 * expmed.c (emit_store_flag_force): Swap if const op0
7529 and change VOIDmode to mode of op0.
7531 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
7533 PR rtl-optimization/83761
7534 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
7535 than bytes to mode_for_size.
7537 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
7540 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
7541 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
7544 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
7547 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
7548 when in layout mode.
7549 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
7550 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
7553 2018-01-10 Michael Collison <michael.collison@arm.com>
7555 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
7556 * config/aarch64/aarch64-option-extension.def: Add
7557 AARCH64_OPT_EXTENSION of 'fp16fml'.
7558 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
7559 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
7560 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
7561 * config/aarch64/constraints.md (Ui7): New constraint.
7562 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
7563 (VFMLA_SEL_W): Ditto.
7566 (VFMLA16_LOW): New int iterator.
7567 (VFMLA16_HIGH): Ditto.
7568 (UNSPEC_FMLAL): New unspec.
7569 (UNSPEC_FMLSL): Ditto.
7570 (UNSPEC_FMLAL2): Ditto.
7571 (UNSPEC_FMLSL2): Ditto.
7572 (f16mac): New code attribute.
7573 * config/aarch64/aarch64-simd-builtins.def
7574 (aarch64_fmlal_lowv2sf): Ditto.
7575 (aarch64_fmlsl_lowv2sf): Ditto.
7576 (aarch64_fmlalq_lowv4sf): Ditto.
7577 (aarch64_fmlslq_lowv4sf): Ditto.
7578 (aarch64_fmlal_highv2sf): Ditto.
7579 (aarch64_fmlsl_highv2sf): Ditto.
7580 (aarch64_fmlalq_highv4sf): Ditto.
7581 (aarch64_fmlslq_highv4sf): Ditto.
7582 (aarch64_fmlal_lane_lowv2sf): Ditto.
7583 (aarch64_fmlsl_lane_lowv2sf): Ditto.
7584 (aarch64_fmlal_laneq_lowv2sf): Ditto.
7585 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
7586 (aarch64_fmlalq_lane_lowv4sf): Ditto.
7587 (aarch64_fmlsl_lane_lowv4sf): Ditto.
7588 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
7589 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
7590 (aarch64_fmlal_lane_highv2sf): Ditto.
7591 (aarch64_fmlsl_lane_highv2sf): Ditto.
7592 (aarch64_fmlal_laneq_highv2sf): Ditto.
7593 (aarch64_fmlsl_laneq_highv2sf): Ditto.
7594 (aarch64_fmlalq_lane_highv4sf): Ditto.
7595 (aarch64_fmlsl_lane_highv4sf): Ditto.
7596 (aarch64_fmlalq_laneq_highv4sf): Ditto.
7597 (aarch64_fmlsl_laneq_highv4sf): Ditto.
7598 * config/aarch64/aarch64-simd.md:
7599 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
7600 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
7601 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
7602 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
7603 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
7604 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
7605 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
7606 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
7607 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
7608 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
7609 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
7610 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
7611 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
7612 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
7613 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
7614 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
7615 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
7616 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
7617 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
7618 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
7619 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
7620 (vfmlsl_low_u32): Ditto.
7621 (vfmlalq_low_u32): Ditto.
7622 (vfmlslq_low_u32): Ditto.
7623 (vfmlal_high_u32): Ditto.
7624 (vfmlsl_high_u32): Ditto.
7625 (vfmlalq_high_u32): Ditto.
7626 (vfmlslq_high_u32): Ditto.
7627 (vfmlal_lane_low_u32): Ditto.
7628 (vfmlsl_lane_low_u32): Ditto.
7629 (vfmlal_laneq_low_u32): Ditto.
7630 (vfmlsl_laneq_low_u32): Ditto.
7631 (vfmlalq_lane_low_u32): Ditto.
7632 (vfmlslq_lane_low_u32): Ditto.
7633 (vfmlalq_laneq_low_u32): Ditto.
7634 (vfmlslq_laneq_low_u32): Ditto.
7635 (vfmlal_lane_high_u32): Ditto.
7636 (vfmlsl_lane_high_u32): Ditto.
7637 (vfmlal_laneq_high_u32): Ditto.
7638 (vfmlsl_laneq_high_u32): Ditto.
7639 (vfmlalq_lane_high_u32): Ditto.
7640 (vfmlslq_lane_high_u32): Ditto.
7641 (vfmlalq_laneq_high_u32): Ditto.
7642 (vfmlslq_laneq_high_u32): Ditto.
7643 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
7644 (AARCH64_FL_FOR_ARCH8_4): New.
7645 (AARCH64_ISA_F16FML): New ISA flag.
7646 (TARGET_F16FML): New feature flag for fp16fml.
7647 (doc/invoke.texi): Document new fp16fml option.
7649 2018-01-10 Michael Collison <michael.collison@arm.com>
7651 * config/aarch64/aarch64-builtins.c:
7652 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
7653 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
7654 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
7655 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
7656 (AARCH64_ISA_SHA3): New ISA flag.
7657 (TARGET_SHA3): New feature flag for sha3.
7658 * config/aarch64/iterators.md (sha512_op): New int attribute.
7659 (CRYPTO_SHA512): New int iterator.
7660 (UNSPEC_SHA512H): New unspec.
7661 (UNSPEC_SHA512H2): Ditto.
7662 (UNSPEC_SHA512SU0): Ditto.
7663 (UNSPEC_SHA512SU1): Ditto.
7664 * config/aarch64/aarch64-simd-builtins.def
7665 (aarch64_crypto_sha512hqv2di): New builtin.
7666 (aarch64_crypto_sha512h2qv2di): Ditto.
7667 (aarch64_crypto_sha512su0qv2di): Ditto.
7668 (aarch64_crypto_sha512su1qv2di): Ditto.
7669 (aarch64_eor3qv8hi): Ditto.
7670 (aarch64_rax1qv2di): Ditto.
7671 (aarch64_xarqv2di): Ditto.
7672 (aarch64_bcaxqv8hi): Ditto.
7673 * config/aarch64/aarch64-simd.md:
7674 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
7675 (aarch64_crypto_sha512su0qv2di): Ditto.
7676 (aarch64_crypto_sha512su1qv2di): Ditto.
7677 (aarch64_eor3qv8hi): Ditto.
7678 (aarch64_rax1qv2di): Ditto.
7679 (aarch64_xarqv2di): Ditto.
7680 (aarch64_bcaxqv8hi): Ditto.
7681 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
7682 (vsha512h2q_u64): Ditto.
7683 (vsha512su0q_u64): Ditto.
7684 (vsha512su1q_u64): Ditto.
7685 (veor3q_u16): Ditto.
7686 (vrax1q_u64): Ditto.
7688 (vbcaxq_u16): Ditto.
7689 * config/arm/types.md (crypto_sha512): New type attribute.
7690 (crypto_sha3): Ditto.
7691 (doc/invoke.texi): Document new sha3 option.
7693 2018-01-10 Michael Collison <michael.collison@arm.com>
7695 * config/aarch64/aarch64-builtins.c:
7696 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
7697 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
7698 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
7699 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
7700 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
7701 (AARCH64_ISA_SM4): New ISA flag.
7702 (TARGET_SM4): New feature flag for sm4.
7703 * config/aarch64/aarch64-simd-builtins.def
7704 (aarch64_sm3ss1qv4si): Ditto.
7705 (aarch64_sm3tt1aq4si): Ditto.
7706 (aarch64_sm3tt1bq4si): Ditto.
7707 (aarch64_sm3tt2aq4si): Ditto.
7708 (aarch64_sm3tt2bq4si): Ditto.
7709 (aarch64_sm3partw1qv4si): Ditto.
7710 (aarch64_sm3partw2qv4si): Ditto.
7711 (aarch64_sm4eqv4si): Ditto.
7712 (aarch64_sm4ekeyqv4si): Ditto.
7713 * config/aarch64/aarch64-simd.md:
7714 (aarch64_sm3ss1qv4si): Ditto.
7715 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
7716 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
7717 (aarch64_sm4eqv4si): Ditto.
7718 (aarch64_sm4ekeyqv4si): Ditto.
7719 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
7720 (sm3part_op): Ditto.
7721 (CRYPTO_SM3TT): Ditto.
7722 (CRYPTO_SM3PART): Ditto.
7723 (UNSPEC_SM3SS1): New unspec.
7724 (UNSPEC_SM3TT1A): Ditto.
7725 (UNSPEC_SM3TT1B): Ditto.
7726 (UNSPEC_SM3TT2A): Ditto.
7727 (UNSPEC_SM3TT2B): Ditto.
7728 (UNSPEC_SM3PARTW1): Ditto.
7729 (UNSPEC_SM3PARTW2): Ditto.
7730 (UNSPEC_SM4E): Ditto.
7731 (UNSPEC_SM4EKEY): Ditto.
7732 * config/aarch64/constraints.md (Ui2): New constraint.
7733 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
7734 * config/arm/types.md (crypto_sm3): New type attribute.
7735 (crypto_sm4): Ditto.
7736 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
7737 (vsm3tt1aq_u32): Ditto.
7738 (vsm3tt1bq_u32): Ditto.
7739 (vsm3tt2aq_u32): Ditto.
7740 (vsm3tt2bq_u32): Ditto.
7741 (vsm3partw1q_u32): Ditto.
7742 (vsm3partw2q_u32): Ditto.
7743 (vsm4eq_u32): Ditto.
7744 (vsm4ekeyq_u32): Ditto.
7745 (doc/invoke.texi): Document new sm4 option.
7747 2018-01-10 Michael Collison <michael.collison@arm.com>
7749 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
7750 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
7751 (AARCH64_FL_FOR_ARCH8_4): New.
7752 (AARCH64_FL_V8_4): New flag.
7753 (doc/invoke.texi): Document new armv8.4-a option.
7755 2018-01-10 Michael Collison <michael.collison@arm.com>
7757 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
7758 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
7759 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
7760 * config/aarch64/aarch64-option-extension.def: Add
7761 AARCH64_OPT_EXTENSION of 'sha2'.
7762 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
7763 (crypto): Disable sha2 and aes if crypto disabled.
7764 (crypto): Enable aes and sha2 if enabled.
7765 (simd): Disable sha2 and aes if simd disabled.
7766 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
7768 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
7769 (TARGET_SHA2): New feature flag for sha2.
7770 (TARGET_AES): New feature flag for aes.
7771 * config/aarch64/aarch64-simd.md:
7772 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
7773 conditional on TARGET_AES.
7774 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
7775 (aarch64_crypto_sha1hsi): Make pattern conditional
7777 (aarch64_crypto_sha1hv4si): Ditto.
7778 (aarch64_be_crypto_sha1hv4si): Ditto.
7779 (aarch64_crypto_sha1su1v4si): Ditto.
7780 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
7781 (aarch64_crypto_sha1su0v4si): Ditto.
7782 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
7783 (aarch64_crypto_sha256su0v4si): Ditto.
7784 (aarch64_crypto_sha256su1v4si): Ditto.
7785 (doc/invoke.texi): Document new aes and sha2 options.
7787 2018-01-10 Martin Sebor <msebor@redhat.com>
7789 PR tree-optimization/83781
7790 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
7793 2018-01-11 Martin Sebor <msebor@gmail.com>
7794 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7796 PR tree-optimization/83501
7797 PR tree-optimization/81703
7799 * tree-ssa-strlen.c (get_string_cst): Rename...
7800 (get_string_len): ...to this. Handle global constants.
7801 (handle_char_store): Adjust.
7803 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
7804 Jim Wilson <jimw@sifive.com>
7806 * config/riscv/riscv-protos.h (riscv_output_return): New.
7807 * config/riscv/riscv.c (struct machine_function): New naked_p field.
7808 (riscv_attribute_table, riscv_output_return),
7809 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
7810 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
7811 (riscv_compute_frame_info): Only compute frame->mask if not a naked
7813 (riscv_expand_prologue): Add early return for naked function.
7814 (riscv_expand_epilogue): Likewise.
7815 (riscv_function_ok_for_sibcall): Return false for naked function.
7816 (riscv_set_current_function): New.
7817 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
7818 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
7819 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
7820 * doc/extend.texi (RISC-V Function Attributes): New.
7822 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
7824 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
7825 check for 128-bit long double before checking TCmode.
7826 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
7827 128-bit long doubles before checking TFmode or TCmode.
7828 (FLOAT128_IBM_P): Likewise.
7830 2018-01-10 Martin Sebor <msebor@redhat.com>
7832 PR tree-optimization/83671
7833 * builtins.c (c_strlen): Unconditionally return zero for the empty
7835 Use -Warray-bounds for warnings.
7836 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
7837 for non-constant array indices with COMPONENT_REF, arrays of
7838 arrays, and pointers to arrays.
7839 (gimple_fold_builtin_strlen): Determine and set length range for
7840 non-constant character arrays.
7842 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
7845 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
7848 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
7850 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
7852 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
7855 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
7856 VECTOR_MEM_ALTIVEC_OR_VSX_P.
7857 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
7858 indexed_or_indirect_operand predicate.
7859 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
7860 (*vsx_le_perm_load_v8hi): Likewise.
7861 (*vsx_le_perm_load_v16qi): Likewise.
7862 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
7863 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
7864 (*vsx_le_perm_store_v8hi): Likewise.
7865 (*vsx_le_perm_store_v16qi): Likewise.
7866 (eight unnamed splitters): Likewise.
7868 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
7870 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
7871 * config/rs6000/emmintrin.h: Likewise.
7872 * config/rs6000/mmintrin.h: Likewise.
7873 * config/rs6000/xmmintrin.h: Likewise.
7875 2018-01-10 David Malcolm <dmalcolm@redhat.com>
7878 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
7880 * tree.c (tree_nop_conversion): Return true for location wrapper
7882 (maybe_wrap_with_location): New function.
7883 (selftest::check_strip_nops): New function.
7884 (selftest::test_location_wrappers): New function.
7885 (selftest::tree_c_tests): Call it.
7886 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
7887 (maybe_wrap_with_location): New decl.
7888 (EXPR_LOCATION_WRAPPER_P): New macro.
7889 (location_wrapper_p): New inline function.
7890 (tree_strip_any_location_wrapper): New inline function.
7892 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
7895 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
7896 stack_realign_offset for the largest alignment of stack slot
7898 (ix86_find_max_used_stack_alignment): New function.
7899 (ix86_finalize_stack_frame_flags): Use it. Set
7900 max_used_stack_alignment if we don't realign stack.
7901 * config/i386/i386.h (machine_function): Add
7902 max_used_stack_alignment.
7904 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
7906 * config/arm/arm.opt (-mbranch-cost): New option.
7907 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
7910 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
7913 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
7914 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
7916 2018-01-10 Richard Biener <rguenther@suse.de>
7919 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
7920 early out so it also covers the case where we have a non-NULL
7923 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
7925 PR tree-optimization/83753
7926 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
7927 for non-strided grouped accesses if the number of elements is 1.
7929 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
7932 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
7933 * i386.h (TARGET_USE_GATHER): Define.
7934 * x86-tune.def (X86_TUNE_USE_GATHER): New.
7936 2018-01-10 Martin Liska <mliska@suse.cz>
7939 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
7940 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
7942 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
7943 CLEANUP_NO_PARTITIONING is not set.
7945 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
7947 * doc/rtl.texi: Remove documentation of (const ...) wrappers
7948 for vectors, as a partial revert of r254296.
7949 * rtl.h (const_vec_p): Delete.
7950 (const_vec_duplicate_p): Don't test for vector CONSTs.
7951 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
7952 * expmed.c (make_tree): Likewise.
7955 * common.md (E, F): Use CONSTANT_P instead of checking for
7957 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
7958 checking for CONST_VECTOR.
7960 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
7963 * predict.c (force_edge_cold): Handle in more sane way edges
7966 2018-01-09 Carl Love <cel@us.ibm.com>
7968 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
7970 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
7971 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
7972 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
7973 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
7974 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
7975 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
7976 * config/rs6000/rs6000-protos.h: Add extern defition for
7977 rs6000_generate_float2_double_code.
7978 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
7980 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
7981 (float2_v2df): Add define_expand.
7983 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
7986 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
7987 op_mode in the force_to_mode call.
7989 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
7991 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
7992 instead of checking each element individually.
7993 (aarch64_evpc_uzp): Likewise.
7994 (aarch64_evpc_zip): Likewise.
7995 (aarch64_evpc_ext): Likewise.
7996 (aarch64_evpc_rev): Likewise.
7997 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
7998 instead of checking each element individually. Return true without
8000 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
8001 whether all selected elements come from the same input, instead of
8002 checking each element individually. Remove calls to gen_rtx_REG,
8003 start_sequence and end_sequence and instead assert that no rtl is
8006 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
8008 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
8009 order of HIGH and CONST checks.
8011 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
8013 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
8014 if the destination isn't an SSA_NAME.
8016 2018-01-09 Richard Biener <rguenther@suse.de>
8018 PR tree-optimization/83668
8019 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
8021 (canonicalize_loop_form): ... here, renamed from ...
8022 (canonicalize_loop_closed_ssa_form): ... this and amended to
8023 swap successor edges for loop exit blocks to make us use
8024 the RPO order we need for initial schedule generation.
8026 2018-01-09 Joseph Myers <joseph@codesourcery.com>
8028 PR tree-optimization/64811
8029 * match.pd: When optimizing comparisons with Inf, avoid
8030 introducing or losing exceptions from comparisons with NaN.
8032 2018-01-09 Martin Liska <mliska@suse.cz>
8035 * asan.c (shadow_mem_size): Add gcc_assert.
8037 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
8039 Don't save registers in main().
8042 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
8043 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
8044 * config/avr/avr.c (avr_set_current_function): Don't error if
8045 naked, OS_task or OS_main are specified at the same time.
8046 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
8048 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
8050 * common/config/avr/avr-common.c (avr_option_optimization_table):
8051 Switch on -mmain-is-OS_task for optimizing compilations.
8053 2018-01-09 Richard Biener <rguenther@suse.de>
8055 PR tree-optimization/83572
8056 * graphite.c: Include cfganal.h.
8057 (graphite_transform_loops): Connect infinite loops to exit
8058 and remove fake edges at the end.
8060 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
8062 * ipa-inline.c (edge_badness): Revert accidental checkin.
8064 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
8067 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
8068 symbols; not inline clones.
8070 2018-01-09 Jakub Jelinek <jakub@redhat.com>
8073 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
8074 hard registers. Formatting fixes.
8076 PR preprocessor/83722
8077 * gcc.c (try_generate_repro): Pass
8078 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
8079 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
8082 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
8083 Kito Cheng <kito.cheng@gmail.com>
8085 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
8086 (riscv_leaf_function_p): Delete.
8087 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
8089 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
8091 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
8093 (do_ifelse): New function.
8094 (do_isel): New function.
8095 (do_sub3): New function.
8096 (do_add3): New function.
8097 (do_load_mask_compare): New function.
8098 (do_overlap_load_compare): New function.
8099 (expand_compare_loop): New function.
8100 (expand_block_compare): Call expand_compare_loop() when appropriate.
8101 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
8103 (-mblock-compare-inline-loop-limit): New option.
8105 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8108 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
8109 Reverse order of second and third operands in first alternative.
8110 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
8111 of first and second elements in UNSPEC_VPERMR vector.
8112 (altivec_expand_vec_perm_le): Likewise.
8114 2018-01-08 Jeff Law <law@redhat.com>
8116 PR rtl-optimizatin/81308
8117 * tree-switch-conversion.c (cfg_altered): New file scoped static.
8118 (process_switch): If group_case_labels makes a change, then set
8120 (pass_convert_switch::execute): If a switch is converted, then
8121 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
8123 PR rtl-optimization/81308
8124 * recog.c (split_all_insns): Conditionally cleanup the CFG after
8127 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
8129 PR target/83663 - Revert r255946
8130 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
8131 generation for cases where splatting a value is not useful.
8132 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
8133 across a vec_duplicate and a paradoxical subreg forming a vector
8134 mode to a vec_concat.
8136 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8138 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
8139 -march=armv8.3-a variants.
8140 * config/arm/t-multilib: Likewise.
8141 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
8143 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
8145 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
8147 (cceq_ior_compare_complement): Give it a name so I can use it, and
8148 change boolean_or_operator predicate to boolean_operator so it can
8149 be used to generate a crand.
8150 (eqne): New code iterator.
8151 (bd/bd_neg): New code_attrs.
8152 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
8153 a single define_insn.
8154 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
8155 decrement (bdnzt/bdnzf/bdzt/bdzf).
8156 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
8157 with the new names of the branch decrement patterns, and added the
8158 names of the branch decrement conditional patterns.
8160 2018-01-08 Richard Biener <rguenther@suse.de>
8162 PR tree-optimization/83563
8163 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
8166 2018-01-08 Richard Biener <rguenther@suse.de>
8169 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
8171 2018-01-08 Richard Biener <rguenther@suse.de>
8173 PR tree-optimization/83685
8174 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
8175 references to abnormals.
8177 2018-01-08 Richard Biener <rguenther@suse.de>
8180 * dwarf2out.c (output_indirect_strings): Handle empty
8181 skeleton_debug_str_hash.
8182 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
8184 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
8186 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
8187 (emit_store_direct): Likewise.
8188 (arc_trampoline_adjust_address): Likewise.
8189 (arc_asm_trampoline_template): New function.
8190 (arc_initialize_trampoline): Use asm_trampoline_template.
8191 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
8192 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
8193 * config/arc/arc.md (flush_icache): Delete pattern.
8195 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
8197 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
8198 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
8201 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
8204 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
8205 by not USED_FOR_TARGET.
8206 (make_pass_resolve_sw_modes): Likewise.
8208 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
8210 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
8213 2018-01-08 Richard Biener <rguenther@suse.de>
8216 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
8218 2018-01-08 Richard Biener <rguenther@suse.de>
8221 * match.pd ((t * 2) / 2) -> t): Add missing :c.
8223 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
8226 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
8227 basic blocks with a small number of successors.
8228 (convert_control_dep_chain_into_preds): Improve handling of
8230 (dump_predicates): Split apart into...
8231 (dump_pred_chain): ...here...
8232 (dump_pred_info): ...and here.
8233 (can_one_predicate_be_invalidated_p): Add debugging printfs.
8234 (can_chain_union_be_invalidated_p): Improve check for invalidation
8236 (uninit_uses_cannot_happen): Avoid unnecessary if
8237 convert_control_dep_chain_into_preds yielded nothing.
8239 2018-01-06 Martin Sebor <msebor@redhat.com>
8241 PR tree-optimization/83640
8242 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
8243 subtracting negative offset from size.
8244 (builtin_access::overlap): Adjust offset bounds of the access to fall
8245 within the size of the object if possible.
8247 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
8249 PR rtl-optimization/83699
8250 * expmed.c (extract_bit_field_1): Restrict the vector usage of
8251 extract_bit_field_as_subreg to cases in which the extracted
8252 value is also a vector.
8254 * lra-constraints.c (process_alt_operands): Test for the equivalence
8255 substitutions when detecting a possible reload cycle.
8257 2018-01-06 Jakub Jelinek <jakub@redhat.com>
8260 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
8261 by default if flag_selective_schedling{,2}. Formatting fixes.
8263 PR rtl-optimization/83682
8264 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
8265 if it has non-VECTOR_MODE element mode.
8266 (vec_duplicate_p): Likewise.
8269 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
8270 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
8272 2018-01-05 Jakub Jelinek <jakub@redhat.com>
8275 * config/i386/i386-builtin.def
8276 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
8277 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
8278 Require also OPTION_MASK_ISA_AVX512F in addition to
8279 OPTION_MASK_ISA_GFNI.
8280 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
8281 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
8282 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
8283 to OPTION_MASK_ISA_GFNI.
8284 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
8285 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
8286 OPTION_MASK_ISA_AVX512BW.
8287 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
8288 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
8289 addition to OPTION_MASK_ISA_GFNI.
8290 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
8291 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
8292 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
8293 to OPTION_MASK_ISA_GFNI.
8294 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
8295 a requirement for all ISAs rather than any of them with a few
8297 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
8299 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
8300 bitmasks to be enabled with 3 exceptions, instead of requiring any
8301 enabled ISA with lots of exceptions.
8302 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
8303 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
8304 Change avx512bw in isa attribute to avx512f.
8305 * config/i386/sgxintrin.h: Add license boilerplate.
8306 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
8307 to __AVX512F__ and __AVX512VL to __AVX512VL__.
8308 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
8309 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
8311 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
8312 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
8313 temporarily sse2 rather than sse if not enabled already.
8316 * config/i386/sse.md (VI248_VLBW): Rename to ...
8317 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
8318 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
8319 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
8320 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
8321 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
8322 mode iterator instead of VI248_VLBW.
8324 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
8326 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
8327 (record_modified): Skip clobbers; add debug output.
8328 (param_change_prob): Use sreal frequencies.
8330 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
8332 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
8333 punt for user-aligned variables.
8335 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
8337 * tree-chrec.c (chrec_contains_symbols): Return true for
8340 2018-01-05 Sudakshina Das <sudi.das@arm.com>
8343 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
8344 of (x|y) == x for BICS pattern.
8346 2018-01-05 Jakub Jelinek <jakub@redhat.com>
8348 PR tree-optimization/83605
8349 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
8350 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
8353 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
8355 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
8356 * config/epiphany/rtems.h: New file.
8358 2018-01-04 Jakub Jelinek <jakub@redhat.com>
8359 Uros Bizjak <ubizjak@gmail.com>
8362 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
8363 QIreg_operand instead of register_operand predicate.
8364 * config/i386/i386.c (ix86_rop_should_change_byte_p,
8365 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
8366 comments instead of -fmitigate[-_]rop.
8368 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8371 * cgraphunit.c (symbol_table::compile): Switch to text_section
8372 before calling assembly_start debug hook.
8373 * run-rtl-passes.c (run_rtl_passes): Likewise.
8376 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
8378 * tree-vrp.c (extract_range_from_binary_expr_1): Check
8379 range_int_cst_p rather than !symbolic_range_p before calling
8380 extract_range_from_multiplicative_op_1.
8382 2018-01-04 Jeff Law <law@redhat.com>
8384 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
8385 redundant test in assertion.
8387 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
8389 * doc/rtl.texi: Document machine_mode wrapper classes.
8391 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
8393 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
8396 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
8398 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
8399 the VEC_PERM_EXPR fold to fail.
8401 2018-01-04 Jakub Jelinek <jakub@redhat.com>
8404 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
8405 to switched_sections.
8407 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
8410 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
8413 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
8416 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
8417 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
8419 2018-01-04 Jakub Jelinek <jakub@redhat.com>
8422 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
8423 is BLKmode and bitpos not zero or mode change is needed.
8425 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
8428 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
8431 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
8434 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
8435 instead of MULT rtx. Update all corresponding splitters.
8437 (*ssub<modesuffix>): Ditto.
8439 (*cmp_sadd_di): Update split patterns.
8440 (*cmp_sadd_si): Ditto.
8441 (*cmp_sadd_sidi): Ditto.
8442 (*cmp_ssub_di): Ditto.
8443 (*cmp_ssub_si): Ditto.
8444 (*cmp_ssub_sidi): Ditto.
8445 * config/alpha/predicates.md (const23_operand): New predicate.
8446 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
8447 Look for ASHIFT, not MULT inner operand.
8448 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
8450 2018-01-04 Martin Liska <mliska@suse.cz>
8452 PR gcov-profile/83669
8453 * gcov.c (output_intermediate_file): Add version to intermediate
8455 * doc/gcov.texi: Document new field 'version' in intermediate
8456 file format. Fix location of '-k' option of gcov command.
8458 2018-01-04 Martin Liska <mliska@suse.cz>
8461 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
8463 2018-01-04 Jakub Jelinek <jakub@redhat.com>
8465 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
8467 2018-01-03 Martin Sebor <msebor@redhat.com>
8469 PR tree-optimization/83655
8470 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
8471 checking calls with invalid arguments.
8473 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8475 * tree-vect-stmts.c (vect_get_store_rhs): New function.
8476 (vectorizable_mask_load_store): Delete.
8477 (vectorizable_call): Return false for masked loads and stores.
8478 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
8479 instead of gimple_assign_rhs1.
8480 (vectorizable_load): Handle IFN_MASK_LOAD.
8481 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
8483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8485 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
8487 (vectorizable_mask_load_store): ...here.
8488 (vectorizable_load): ...and here.
8490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8492 * tree-vect-stmts.c (vect_build_all_ones_mask)
8493 (vect_build_zero_merge_argument): New functions, split out from...
8494 (vectorizable_load): ...here.
8496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8498 * tree-vect-stmts.c (vect_check_store_rhs): New function,
8500 (vectorizable_mask_load_store): ...here.
8501 (vectorizable_store): ...and here.
8503 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8505 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
8507 (vectorizable_mask_load_store): ...here.
8509 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8511 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
8512 (vect_model_store_cost): Take a vec_load_store_type instead of a
8514 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
8515 (vect_model_store_cost): Take a vec_load_store_type instead of a
8517 (vectorizable_mask_load_store): Update accordingly.
8518 (vectorizable_store): Likewise.
8519 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
8521 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8523 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
8524 IFN_MASK_LOAD calls here rather than...
8525 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
8527 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8528 Alan Hayward <alan.hayward@arm.com>
8529 David Sherwood <david.sherwood@arm.com>
8531 * expmed.c (extract_bit_field_1): For vector extracts,
8532 fall back to extract_bit_field_as_subreg if vec_extract
8535 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8536 Alan Hayward <alan.hayward@arm.com>
8537 David Sherwood <david.sherwood@arm.com>
8539 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
8540 they are variable or constant sized.
8541 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
8542 slots for constant-sized data.
8544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8545 Alan Hayward <alan.hayward@arm.com>
8546 David Sherwood <david.sherwood@arm.com>
8548 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
8549 handling COND_EXPRs with boolean comparisons, try to find a better
8550 basis for the mask type than the boolean itself.
8552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8554 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
8555 is calculated and how it can be overridden.
8556 * genmodes.c (max_bitsize_mode_any_mode): New variable.
8557 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
8559 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
8562 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8563 Alan Hayward <alan.hayward@arm.com>
8564 David Sherwood <david.sherwood@arm.com>
8566 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
8567 Remove the mode argument.
8568 (aarch64_simd_valid_immediate): Remove the mode and inverse
8570 * config/aarch64/iterators.md (bitsize): New iterator.
8571 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
8572 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
8573 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
8574 aarch64_simd_valid_immediate.
8575 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
8576 (aarch64_reg_or_bic_imm): Likewise.
8577 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
8578 with an insn_type enum and msl with a modifier_type enum.
8579 Replace element_width with a scalar_mode. Change the shift
8580 to unsigned int. Add constructors for scalar_float_mode and
8581 scalar_int_mode elements.
8582 (aarch64_vect_float_const_representable_p): Delete.
8583 (aarch64_can_const_movi_rtx_p)
8584 (aarch64_simd_scalar_immediate_valid_for_move)
8585 (aarch64_simd_make_constant): Update call to
8586 aarch64_simd_valid_immediate.
8587 (aarch64_advsimd_valid_immediate_hs): New function.
8588 (aarch64_advsimd_valid_immediate): Likewise.
8589 (aarch64_simd_valid_immediate): Remove mode and inverse
8590 arguments. Rewrite to use the above. Use const_vec_duplicate_p
8591 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
8592 and aarch64_float_const_representable_p on the result.
8593 (aarch64_output_simd_mov_immediate): Remove mode argument.
8594 Update call to aarch64_simd_valid_immediate and use of
8595 simd_immediate_info.
8596 (aarch64_output_scalar_simd_mov_immediate): Update call
8599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8600 Alan Hayward <alan.hayward@arm.com>
8601 David Sherwood <david.sherwood@arm.com>
8603 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
8604 (mode_nunits): Likewise CONST_MODE_NUNITS.
8605 * machmode.def (ADJUST_NUNITS): Document.
8606 * genmodes.c (mode_data::need_nunits_adj): New field.
8607 (blank_mode): Update accordingly.
8608 (adj_nunits): New variable.
8609 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
8611 (emit_mode_size_inline): Set need_bytesize_adj for all modes
8612 listed in adj_nunits.
8613 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
8614 listed in adj_nunits. Don't emit case statements for such modes.
8615 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
8616 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
8617 nothing if adj_nunits is nonnull.
8618 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
8619 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
8620 (emit_mode_fbit): Update use of print_maybe_const_decl.
8621 (emit_move_size): Likewise. Treat the array as non-const
8623 (emit_mode_adjustments): Handle adj_nunits.
8625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8627 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
8628 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
8629 (VECTOR_MODES): Use it.
8630 (make_vector_modes): Take the prefix as an argument.
8632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8633 Alan Hayward <alan.hayward@arm.com>
8634 David Sherwood <david.sherwood@arm.com>
8636 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
8637 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
8638 for MODE_VECTOR_BOOL.
8639 * machmode.def (VECTOR_BOOL_MODE): Document.
8640 * genmodes.c (VECTOR_BOOL_MODE): New macro.
8641 (make_vector_bool_mode): New function.
8642 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
8644 * lto-streamer-in.c (lto_input_mode_table): Likewise.
8645 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
8647 * stor-layout.c (int_mode_for_mode): Likewise.
8648 * tree.c (build_vector_type_for_mode): Likewise.
8649 * varasm.c (output_constant_pool_2): Likewise.
8650 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
8651 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
8652 for MODE_VECTOR_BOOL.
8653 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
8654 of mode class checks.
8655 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
8656 instead of a list of mode class checks.
8657 (expand_vector_scalar_condition): Likewise.
8658 (type_for_widest_vector_mode): Handle BImode as an inner mode.
8660 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8661 Alan Hayward <alan.hayward@arm.com>
8662 David Sherwood <david.sherwood@arm.com>
8664 * machmode.h (mode_size): Change from unsigned short to
8666 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
8667 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
8668 or if measurement_type is not polynomial.
8669 (fixed_size_mode::includes_p): Check for constant-sized modes.
8670 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
8671 return a poly_uint16 rather than an unsigned short.
8672 (emit_mode_size): Change the type of mode_size from unsigned short
8673 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
8674 (emit_mode_adjustments): Cope with polynomial vector sizes.
8675 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
8677 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
8679 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
8680 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
8681 * caller-save.c (setup_save_areas): Likewise.
8682 (replace_reg_with_saved_mem): Likewise.
8683 * calls.c (emit_library_call_value_1): Likewise.
8684 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
8685 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
8686 (gen_lowpart_for_combine): Likewise.
8687 * convert.c (convert_to_integer_1): Likewise.
8688 * cse.c (equiv_constant, cse_insn): Likewise.
8689 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
8690 (cselib_subst_to_values): Likewise.
8691 * dce.c (word_dce_process_block): Likewise.
8692 * df-problems.c (df_word_lr_mark_ref): Likewise.
8693 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
8694 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
8695 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
8696 (rtl_for_decl_location): Likewise.
8697 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
8698 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
8699 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
8700 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
8701 (expand_expr_real_1): Likewise.
8702 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
8703 (pad_below): Likewise.
8704 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
8705 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
8706 * ira.c (get_subreg_tracking_sizes): Likewise.
8707 * ira-build.c (ira_create_allocno_objects): Likewise.
8708 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
8709 (ira_sort_regnos_for_alter_reg): Likewise.
8710 * ira-costs.c (record_operand_costs): Likewise.
8711 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
8712 (resolve_simple_move): Likewise.
8713 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
8714 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
8715 (lra_constraints): Likewise.
8716 (CONST_POOL_OK_P): Reject variable-sized modes.
8717 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
8718 (add_pseudo_to_slot, lra_spill): Likewise.
8719 * omp-low.c (omp_clause_aligned_alignment): Likewise.
8720 * optabs-query.c (get_best_extraction_insn): Likewise.
8721 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
8722 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
8723 (expand_mult_highpart, valid_multiword_target_p): Likewise.
8724 * recog.c (offsettable_address_addr_space_p): Likewise.
8725 * regcprop.c (maybe_mode_change): Likewise.
8726 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
8727 * regrename.c (build_def_use): Likewise.
8728 * regstat.c (dump_reg_info): Likewise.
8729 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
8730 (find_reloads, find_reloads_subreg_address): Likewise.
8731 * reload1.c (eliminate_regs_1): Likewise.
8732 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
8733 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
8734 (simplify_binary_operation_1, simplify_subreg): Likewise.
8735 * targhooks.c (default_function_arg_padding): Likewise.
8736 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
8737 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
8738 (verify_gimple_assign_ternary): Likewise.
8739 * tree-inline.c (estimate_move_cost): Likewise.
8740 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
8741 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
8742 (get_address_cost_ainc): Likewise.
8743 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
8744 (vect_supportable_dr_alignment): Likewise.
8745 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8746 (vectorizable_reduction): Likewise.
8747 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
8748 (vectorizable_operation, vectorizable_load): Likewise.
8749 * tree.c (build_same_sized_truth_vector_type): Likewise.
8750 * valtrack.c (cleanup_auto_inc_dec): Likewise.
8751 * var-tracking.c (emit_note_insn_var_location): Likewise.
8752 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
8753 (ADDR_VEC_ALIGN): Likewise.
8755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8756 Alan Hayward <alan.hayward@arm.com>
8757 David Sherwood <david.sherwood@arm.com>
8759 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
8761 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
8762 or if measurement_type is polynomial.
8763 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
8764 * combine.c (make_extraction): Likewise.
8765 * dse.c (find_shift_sequence): Likewise.
8766 * dwarf2out.c (mem_loc_descriptor): Likewise.
8767 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
8768 (extract_bit_field, extract_low_bits): Likewise.
8769 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
8770 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
8771 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
8772 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
8773 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
8774 * reload.c (find_reloads): Likewise.
8775 * reload1.c (alter_reg): Likewise.
8776 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
8777 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
8778 * tree-if-conv.c (predicate_mem_writes): Likewise.
8779 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
8780 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
8781 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
8782 * valtrack.c (dead_debug_insert_temp): Likewise.
8783 * varasm.c (mergeable_constant_section): Likewise.
8784 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
8786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8787 Alan Hayward <alan.hayward@arm.com>
8788 David Sherwood <david.sherwood@arm.com>
8790 * expr.c (expand_assignment): Cope with polynomial mode sizes
8791 when assigning to a CONCAT.
8793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8794 Alan Hayward <alan.hayward@arm.com>
8795 David Sherwood <david.sherwood@arm.com>
8797 * machmode.h (mode_precision): Change from unsigned short to
8799 (mode_to_precision): Return a poly_uint16 rather than an unsigned
8801 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
8802 or if measurement_type is not polynomial.
8803 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
8804 in which the mode is already known to be a scalar_int_mode.
8805 * genmodes.c (emit_mode_precision): Change the type of mode_precision
8806 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
8808 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
8809 for GET_MODE_PRECISION.
8810 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
8811 for GET_MODE_PRECISION.
8812 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
8814 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
8815 (expand_field_assignment, make_extraction): Likewise.
8816 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
8817 (get_last_value): Likewise.
8818 * convert.c (convert_to_integer_1): Likewise.
8819 * cse.c (cse_insn): Likewise.
8820 * expr.c (expand_expr_real_1): Likewise.
8821 * lra-constraints.c (simplify_operand_subreg): Likewise.
8822 * optabs-query.c (can_atomic_load_p): Likewise.
8823 * optabs.c (expand_atomic_load): Likewise.
8824 (expand_atomic_store): Likewise.
8825 * ree.c (combine_reaching_defs): Likewise.
8826 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
8827 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
8828 * tree.h (type_has_mode_precision_p): Likewise.
8829 * ubsan.c (instrument_si_overflow): Likewise.
8831 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8832 Alan Hayward <alan.hayward@arm.com>
8833 David Sherwood <david.sherwood@arm.com>
8835 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
8836 polynomial numbers of units.
8837 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
8838 (valid_vector_subparts_p): New function.
8839 (build_vector_type): Remove temporary shim and take the number
8840 of units as a poly_uint64 rather than an int.
8841 (build_opaque_vector_type): Take the number of units as a
8842 poly_uint64 rather than an int.
8843 * tree.c (build_vector_from_ctor): Handle polynomial
8844 TYPE_VECTOR_SUBPARTS.
8845 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
8846 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
8847 (build_vector_from_val): If the number of units is variable,
8848 use build_vec_duplicate_cst for constant operands and
8849 VEC_DUPLICATE_EXPR otherwise.
8850 (make_vector_type): Remove temporary is_constant ().
8851 (build_vector_type, build_opaque_vector_type): Take the number of
8852 units as a poly_uint64 rather than an int.
8853 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
8855 * cfgexpand.c (expand_debug_expr): Likewise.
8856 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
8857 (store_constructor, expand_expr_real_1): Likewise.
8858 (const_scalar_mask_from_tree): Likewise.
8859 * fold-const-call.c (fold_const_reduction): Likewise.
8860 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
8861 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
8862 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
8863 (fold_relational_const): Likewise.
8864 (native_interpret_vector): Likewise. Change the size from an
8865 int to an unsigned int.
8866 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
8867 TYPE_VECTOR_SUBPARTS.
8868 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
8869 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
8870 duplicating a non-constant operand into a variable-length vector.
8871 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
8872 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
8873 * ipa-icf.c (sem_variable::equals): Likewise.
8874 * match.pd: Likewise.
8875 * omp-simd-clone.c (simd_clone_subparts): Likewise.
8876 * print-tree.c (print_node): Likewise.
8877 * stor-layout.c (layout_type): Likewise.
8878 * targhooks.c (default_builtin_vectorization_cost): Likewise.
8879 * tree-cfg.c (verify_gimple_comparison): Likewise.
8880 (verify_gimple_assign_binary): Likewise.
8881 (verify_gimple_assign_ternary): Likewise.
8882 (verify_gimple_assign_single): Likewise.
8883 * tree-pretty-print.c (dump_generic_node): Likewise.
8884 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
8885 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
8886 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
8887 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
8888 (vect_shift_permute_load_chain): Likewise.
8889 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
8890 (expand_vector_condition, optimize_vector_constructor): Likewise.
8891 (lower_vec_perm, get_compute_type): Likewise.
8892 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8893 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
8894 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
8895 (vect_recog_mask_conversion_pattern): Likewise.
8896 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
8897 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
8898 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
8899 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
8900 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
8901 (vectorizable_shift, vectorizable_operation, vectorizable_store)
8902 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
8903 (supportable_widening_operation): Likewise.
8904 (supportable_narrowing_operation): Likewise.
8905 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
8907 * varasm.c (output_constant): Likewise.
8909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8910 Alan Hayward <alan.hayward@arm.com>
8911 David Sherwood <david.sherwood@arm.com>
8913 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
8914 so that both the length == 3 and length != 3 cases set up their
8915 own permute vectors. Add comments explaining why we know the
8916 number of elements is constant.
8917 (vect_permute_load_chain): Likewise.
8919 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8920 Alan Hayward <alan.hayward@arm.com>
8921 David Sherwood <david.sherwood@arm.com>
8923 * machmode.h (mode_nunits): Change from unsigned char to
8925 (ONLY_FIXED_SIZE_MODES): New macro.
8926 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
8927 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
8928 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
8930 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
8931 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
8932 or if measurement_type is not polynomial.
8933 * genmodes.c (ZERO_COEFFS): New macro.
8934 (emit_mode_nunits_inline): Make mode_nunits_inline return a
8936 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
8937 Use ZERO_COEFFS when emitting initializers.
8938 * data-streamer.h (bp_pack_poly_value): New function.
8939 (bp_unpack_poly_value): Likewise.
8940 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
8941 for GET_MODE_NUNITS.
8942 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
8943 for GET_MODE_NUNITS.
8944 * tree.c (make_vector_type): Remove temporary shim and make
8945 the real function take the number of units as a poly_uint64
8947 (build_vector_type_for_mode): Handle polynomial nunits.
8948 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
8949 * emit-rtl.c (const_vec_series_p_1): Likewise.
8950 (gen_rtx_CONST_VECTOR): Likewise.
8951 * fold-const.c (test_vec_duplicate_folding): Likewise.
8952 * genrecog.c (validate_pattern): Likewise.
8953 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
8954 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
8955 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
8956 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
8957 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
8958 * rtlanal.c (subreg_get_info): Likewise.
8959 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
8960 (vect_grouped_load_supported): Likewise.
8961 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
8962 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
8963 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
8964 (simplify_const_unary_operation, simplify_binary_operation_1)
8965 (simplify_const_binary_operation, simplify_ternary_operation)
8966 (test_vector_ops_duplicate, test_vector_ops): Likewise.
8967 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
8968 instead of CONST_VECTOR_NUNITS.
8969 * varasm.c (output_constant_pool_2): Likewise.
8970 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
8971 explicit-encoded elements in the XVEC for variable-length vectors.
8973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8975 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
8977 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8978 Alan Hayward <alan.hayward@arm.com>
8979 David Sherwood <david.sherwood@arm.com>
8981 * coretypes.h (fixed_size_mode): Declare.
8982 (fixed_size_mode_pod): New typedef.
8983 * builtins.h (target_builtins::x_apply_args_mode)
8984 (target_builtins::x_apply_result_mode): Change type to
8985 fixed_size_mode_pod.
8986 * builtins.c (apply_args_size, apply_result_size, result_vector)
8987 (expand_builtin_apply_args_1, expand_builtin_apply)
8988 (expand_builtin_return): Update accordingly.
8990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
8992 * cse.c (hash_rtx_cb): Hash only the encoded elements.
8993 * cselib.c (cselib_hash_rtx): Likewise.
8994 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
8995 CONST_VECTOR encoding.
8997 2018-01-03 Jakub Jelinek <jakub@redhat.com>
8998 Jeff Law <law@redhat.com>
9001 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
9002 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
9003 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
9004 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
9007 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
9008 explicitly probe *sp in a noreturn function if there were any callee
9009 register saves or frame pointer is needed.
9011 2018-01-03 Jakub Jelinek <jakub@redhat.com>
9014 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
9015 BLKmode for ternary, binary or unary expressions.
9018 * var-tracking.c (delete_vta_debug_insn): New inline function.
9019 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
9020 insns from get_insns () to NULL instead of each bb separately.
9021 Use delete_vta_debug_insn. No longer static.
9022 (vt_debug_insns_local, variable_tracking_main_1): Adjust
9023 delete_vta_debug_insns callers.
9024 * rtl.h (delete_vta_debug_insns): Declare.
9025 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
9026 instead of variable_tracking_main.
9028 2018-01-03 Martin Sebor <msebor@redhat.com>
9030 PR tree-optimization/83603
9031 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
9032 arguments past the endof the argument list in functions declared
9033 without a prototype.
9034 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
9035 Avoid checking when arguments are null.
9037 2018-01-03 Martin Sebor <msebor@redhat.com>
9040 * doc/extend.texi (attribute const): Fix a typo.
9041 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
9042 issuing -Wsuggest-attribute for void functions.
9044 2018-01-03 Martin Sebor <msebor@redhat.com>
9046 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
9047 offset_int::from instead of wide_int::to_shwi.
9048 (maybe_diag_overlap): Remove assertion.
9049 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
9050 * gimple-ssa-sprintf.c (format_directive): Same.
9051 (parse_directive): Same.
9052 (sprintf_dom_walker::compute_format_length): Same.
9053 (try_substitute_return_value): Same.
9055 2018-01-03 Jeff Law <law@redhat.com>
9058 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
9059 non-constant residual for zero at runtime and avoid probing in
9060 that case. Reorganize code for trailing problem to mirror handling
9063 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9065 PR tree-optimization/83501
9066 * tree-ssa-strlen.c (get_string_cst): New.
9067 (handle_char_store): Call get_string_cst.
9069 2018-01-03 Martin Liska <mliska@suse.cz>
9071 PR tree-optimization/83593
9072 * tree-ssa-strlen.c: Include tree-cfg.h.
9073 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
9074 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
9075 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
9077 (strlen_dom_walker::before_dom_children): Call
9078 gimple_purge_dead_eh_edges. Dump tranformation with details
9080 (strlen_dom_walker::before_dom_children): Update call by adding
9081 new argument cleanup_eh.
9082 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
9084 2018-01-03 Martin Liska <mliska@suse.cz>
9087 * cif-code.def (VARIADIC_THUNK): New enum value.
9088 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
9091 2018-01-03 Jan Beulich <jbeulich@suse.com>
9093 * sse.md (mov<mode>_internal): Tighten condition for when to use
9094 vmovdqu<ssescalarsize> for TI and OI modes.
9096 2018-01-03 Jakub Jelinek <jakub@redhat.com>
9098 Update copyright years.
9100 2018-01-03 Martin Liska <mliska@suse.cz>
9103 * ipa-visibility.c (function_and_variable_visibility): Skip
9104 functions with noipa attribure.
9106 2018-01-03 Jakub Jelinek <jakub@redhat.com>
9108 * gcc.c (process_command): Update copyright notice dates.
9109 * gcov-dump.c (print_version): Ditto.
9110 * gcov.c (print_version): Ditto.
9111 * gcov-tool.c (print_version): Ditto.
9112 * gengtype.c (create_file): Ditto.
9113 * doc/cpp.texi: Bump @copying's copyright year.
9114 * doc/cppinternals.texi: Ditto.
9115 * doc/gcc.texi: Ditto.
9116 * doc/gccint.texi: Ditto.
9117 * doc/gcov.texi: Ditto.
9118 * doc/install.texi: Ditto.
9119 * doc/invoke.texi: Ditto.
9121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9123 * vector-builder.h (vector_builder::m_full_nelts): Change from
9124 unsigned int to poly_uint64.
9125 (vector_builder::full_nelts): Update prototype accordingly.
9126 (vector_builder::new_vector): Likewise.
9127 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
9128 (vector_builder::operator ==): Likewise.
9129 (vector_builder::finalize): Likewise.
9130 * int-vector-builder.h (int_vector_builder::int_vector_builder):
9131 Take the number of elements as a poly_uint64 rather than an
9133 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
9134 from unsigned int to poly_uint64.
9135 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
9136 (vec_perm_indices::new_vector): Likewise.
9137 (vec_perm_indices::length): Likewise.
9138 (vec_perm_indices::nelts_per_input): Likewise.
9139 (vec_perm_indices::input_nelts): Likewise.
9140 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
9141 number of elements per input as a poly_uint64 rather than an
9142 unsigned int. Use the original encoding for variable-length
9143 vectors, rather than clamping each individual element.
9144 For the second and subsequent elements in each pattern,
9145 clamp the step and base before clamping their sum.
9146 (vec_perm_indices::series_p): Handle polynomial element counts.
9147 (vec_perm_indices::all_in_range_p): Likewise.
9148 (vec_perm_indices_to_tree): Likewise.
9149 (vec_perm_indices_to_rtx): Likewise.
9150 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
9151 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
9152 (tree_vector_builder::new_binary_operation): Handle polynomial
9153 element counts. Return false if we need to know the number
9154 of elements at compile time.
9155 * fold-const.c (fold_vec_perm): Punt if the number of elements
9156 isn't known at compile time.
9158 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9160 * vec-perm-indices.h (vec_perm_builder): Change element type
9161 from HOST_WIDE_INT to poly_int64.
9162 (vec_perm_indices::element_type): Update accordingly.
9163 (vec_perm_indices::clamp): Handle polynomial element_types.
9164 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
9165 (vec_perm_indices::all_in_range_p): Likewise.
9166 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
9168 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
9169 polynomial vec_perm_indices element types.
9170 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
9171 * fold-const.c (fold_vec_perm): Likewise.
9172 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
9173 * tree-vect-generic.c (lower_vec_perm): Likewise.
9174 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
9175 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
9176 element type to HOST_WIDE_INT.
9178 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9179 Alan Hayward <alan.hayward@arm.com>
9180 David Sherwood <david.sherwood@arm.com>
9182 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
9183 rather than an int. Use plus_constant.
9184 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
9185 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
9187 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9188 Alan Hayward <alan.hayward@arm.com>
9189 David Sherwood <david.sherwood@arm.com>
9191 * calls.c (emit_call_1, expand_call): Change struct_value_size from
9192 a HOST_WIDE_INT to a poly_int64.
9194 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9195 Alan Hayward <alan.hayward@arm.com>
9196 David Sherwood <david.sherwood@arm.com>
9198 * calls.c (load_register_parameters): Cope with polynomial
9199 mode sizes. Require a constant size for BLKmode parameters
9200 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
9201 forces a parameter to be padded at the lsb end in order to
9202 fill a complete number of words, require the parameter size
9203 to be ordered wrt UNITS_PER_WORD.
9205 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9206 Alan Hayward <alan.hayward@arm.com>
9207 David Sherwood <david.sherwood@arm.com>
9209 * reload1.c (spill_stack_slot_width): Change element type
9210 from unsigned int to poly_uint64_pod.
9211 (alter_reg): Treat mode sizes as polynomial.
9213 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9214 Alan Hayward <alan.hayward@arm.com>
9215 David Sherwood <david.sherwood@arm.com>
9217 * reload.c (complex_word_subreg_p): New function.
9218 (reload_inner_reg_of_subreg, push_reload): Use it.
9220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9221 Alan Hayward <alan.hayward@arm.com>
9222 David Sherwood <david.sherwood@arm.com>
9224 * lra-constraints.c (process_alt_operands): Reject matched
9225 operands whose sizes aren't ordered.
9226 (match_reload): Refer to this check here.
9228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9229 Alan Hayward <alan.hayward@arm.com>
9230 David Sherwood <david.sherwood@arm.com>
9232 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
9233 that the mode size is in the set {1, 2, 4, 8, 16}.
9235 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9236 Alan Hayward <alan.hayward@arm.com>
9237 David Sherwood <david.sherwood@arm.com>
9239 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
9240 Use plus_constant instead of gen_rtx_PLUS.
9242 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9243 Alan Hayward <alan.hayward@arm.com>
9244 David Sherwood <david.sherwood@arm.com>
9246 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
9247 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
9248 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
9249 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
9250 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
9251 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
9252 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
9253 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
9254 * config/i386/i386.c (ix86_push_rounding): ...this new function.
9255 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
9257 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
9258 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
9259 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
9260 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
9261 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
9262 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
9263 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
9264 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
9265 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
9266 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
9268 * expr.c (emit_move_resolve_push): Treat the input and result
9269 of PUSH_ROUNDING as a poly_int64.
9270 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
9271 (emit_push_insn): Likewise.
9272 * lra-eliminations.c (mark_not_eliminable): Likewise.
9273 * recog.c (push_operand): Likewise.
9274 * reload1.c (elimination_effects): Likewise.
9275 * rtlanal.c (nonzero_bits1): Likewise.
9276 * calls.c (store_one_arg): Likewise. Require the padding to be
9277 known at compile time.
9279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9280 Alan Hayward <alan.hayward@arm.com>
9281 David Sherwood <david.sherwood@arm.com>
9283 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
9284 Use plus_constant instead of gen_rtx_PLUS.
9286 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9287 Alan Hayward <alan.hayward@arm.com>
9288 David Sherwood <david.sherwood@arm.com>
9290 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
9293 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9294 Alan Hayward <alan.hayward@arm.com>
9295 David Sherwood <david.sherwood@arm.com>
9297 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
9298 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
9299 via stack temporaries. Treat the mode size as polynomial too.
9301 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9302 Alan Hayward <alan.hayward@arm.com>
9303 David Sherwood <david.sherwood@arm.com>
9305 * expr.c (expand_expr_real_2): When handling conversions involving
9306 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
9307 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
9308 as a poly_uint64 too.
9310 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9311 Alan Hayward <alan.hayward@arm.com>
9312 David Sherwood <david.sherwood@arm.com>
9314 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
9316 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9317 Alan Hayward <alan.hayward@arm.com>
9318 David Sherwood <david.sherwood@arm.com>
9320 * combine.c (can_change_dest_mode): Handle polynomial
9321 REGMODE_NATURAL_SIZE.
9322 * expmed.c (store_bit_field_1): Likewise.
9323 * expr.c (store_constructor): Likewise.
9324 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
9325 and polynomial REGMODE_NATURAL_SIZE.
9326 (gen_lowpart_common): Likewise.
9327 * reginfo.c (record_subregs_of_mode): Likewise.
9328 * rtlanal.c (read_modify_subreg_p): Likewise.
9330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9331 Alan Hayward <alan.hayward@arm.com>
9332 David Sherwood <david.sherwood@arm.com>
9334 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
9335 numbers of elements.
9337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9338 Alan Hayward <alan.hayward@arm.com>
9339 David Sherwood <david.sherwood@arm.com>
9341 * match.pd: Cope with polynomial numbers of vector elements.
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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
9348 in a POINTER_PLUS_EXPR.
9350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9351 Alan Hayward <alan.hayward@arm.com>
9352 David Sherwood <david.sherwood@arm.com>
9354 * omp-simd-clone.c (simd_clone_subparts): New function.
9355 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
9356 (ipa_simd_modify_function_body): Likewise.
9358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9359 Alan Hayward <alan.hayward@arm.com>
9360 David Sherwood <david.sherwood@arm.com>
9362 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
9363 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
9364 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
9365 (expand_vector_condition, vector_element): Likewise.
9366 (subparts_gt): New function.
9367 (get_compute_type): Use subparts_gt.
9368 (count_type_subparts): Delete.
9369 (expand_vector_operations_1): Use subparts_gt instead of
9370 count_type_subparts.
9372 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9373 Alan Hayward <alan.hayward@arm.com>
9374 David Sherwood <david.sherwood@arm.com>
9376 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
9377 (vect_compile_time_alias): ...this new function. Do the calculation
9378 on poly_ints rather than trees.
9379 (vect_prune_runtime_alias_test_list): Update call accordingly.
9381 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9382 Alan Hayward <alan.hayward@arm.com>
9383 David Sherwood <david.sherwood@arm.com>
9385 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
9387 (vect_schedule_slp_instance): Likewise.
9389 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9390 Alan Hayward <alan.hayward@arm.com>
9391 David Sherwood <david.sherwood@arm.com>
9393 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
9394 constant and extern definitions for variable-length vectors.
9395 (vect_get_constant_vectors): Note that the number of units
9396 is known to be constant.
9398 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9399 Alan Hayward <alan.hayward@arm.com>
9400 David Sherwood <david.sherwood@arm.com>
9402 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
9403 of units as polynomial. Choose between WIDE and NARROW based
9406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9407 Alan Hayward <alan.hayward@arm.com>
9408 David Sherwood <david.sherwood@arm.com>
9410 * tree-vect-stmts.c (simd_clone_subparts): New function.
9411 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
9413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9414 Alan Hayward <alan.hayward@arm.com>
9415 David Sherwood <david.sherwood@arm.com>
9417 * tree-vect-stmts.c (vectorizable_call): Treat the number of
9418 vectors as polynomial. Use build_index_vector for
9421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9422 Alan Hayward <alan.hayward@arm.com>
9423 David Sherwood <david.sherwood@arm.com>
9425 * tree-vect-stmts.c (get_load_store_type): Treat the number of
9426 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
9427 for variable-length vectors.
9428 (vectorizable_mask_load_store): Treat the number of units as
9429 polynomial, asserting that it is constant if the condition has
9430 already been enforced.
9431 (vectorizable_store, vectorizable_load): Likewise.
9433 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9434 Alan Hayward <alan.hayward@arm.com>
9435 David Sherwood <david.sherwood@arm.com>
9437 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
9438 of units as polynomial. Punt if we can't tell at compile time
9439 which vector contains the final result.
9441 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9442 Alan Hayward <alan.hayward@arm.com>
9443 David Sherwood <david.sherwood@arm.com>
9445 * tree-vect-loop.c (vectorizable_induction): Treat the number
9446 of units as polynomial. Punt on SLP inductions. Use an integer
9447 VEC_SERIES_EXPR for variable-length integer reductions. Use a
9448 cast of such a series for variable-length floating-point
9451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9452 Alan Hayward <alan.hayward@arm.com>
9453 David Sherwood <david.sherwood@arm.com>
9455 * tree.h (build_index_vector): Declare.
9456 * tree.c (build_index_vector): New function.
9457 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
9458 of units as polynomial, forcibly converting it to a constant if
9459 vectorizable_reduction has already enforced the condition.
9460 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
9461 to create a {1,2,3,...} vector.
9462 (vectorizable_reduction): Treat the number of units as polynomial.
9463 Choose vectype_in based on the largest scalar element size rather
9464 than the smallest number of units. Enforce the restrictions
9467 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9468 Alan Hayward <alan.hayward@arm.com>
9469 David Sherwood <david.sherwood@arm.com>
9471 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
9472 number of units as polynomial.
9474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9475 Alan Hayward <alan.hayward@arm.com>
9476 David Sherwood <david.sherwood@arm.com>
9478 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
9479 * target.def (autovectorize_vector_sizes): Return the vector sizes
9480 by pointer, using vector_sizes rather than a bitmask.
9481 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
9482 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
9483 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
9485 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
9486 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
9487 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
9488 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
9489 * omp-general.c (omp_max_vf): Likewise.
9490 * omp-low.c (omp_clause_aligned_alignment): Likewise.
9491 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
9492 * tree-vect-loop.c (vect_analyze_loop): Likewise.
9493 * tree-vect-slp.c (vect_slp_bb): Likewise.
9494 * doc/tm.texi: Regenerate.
9495 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
9497 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
9498 the vector size as a poly_uint64 rather than an unsigned int.
9499 (current_vector_size): Change from an unsigned int to a poly_uint64.
9500 (get_vectype_for_scalar_type): Update accordingly.
9501 * tree.h (build_truth_vector_type): Take the size and number of
9502 units as a poly_uint64 rather than an unsigned int.
9503 (build_vector_type): Add a temporary overload that takes
9504 the number of units as a poly_uint64 rather than an unsigned int.
9505 * tree.c (make_vector_type): Likewise.
9506 (build_truth_vector_type): Take the number of units as a poly_uint64
9507 rather than an unsigned int.
9509 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9510 Alan Hayward <alan.hayward@arm.com>
9511 David Sherwood <david.sherwood@arm.com>
9513 * target.def (get_mask_mode): Take the number of units and length
9514 as poly_uint64s rather than unsigned ints.
9515 * targhooks.h (default_get_mask_mode): Update accordingly.
9516 * targhooks.c (default_get_mask_mode): Likewise.
9517 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
9518 * doc/tm.texi: Regenerate.
9520 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9521 Alan Hayward <alan.hayward@arm.com>
9522 David Sherwood <david.sherwood@arm.com>
9524 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
9525 * omp-general.c (omp_max_vf): Likewise.
9526 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
9527 (expand_omp_simd): Handle polynomial safelen.
9528 * omp-low.c (omplow_simd_context): Add a default constructor.
9529 (omplow_simd_context::max_vf): Change from int to poly_uint64.
9530 (lower_rec_simd_input_clauses): Update accordingly.
9531 (lower_rec_input_clauses): Likewise.
9533 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9534 Alan Hayward <alan.hayward@arm.com>
9535 David Sherwood <david.sherwood@arm.com>
9537 * tree-vectorizer.h (vect_nunits_for_cost): New function.
9538 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
9539 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
9540 (vect_analyze_slp_cost): Likewise.
9541 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
9542 (vect_model_load_cost): Likewise.
9544 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9545 Alan Hayward <alan.hayward@arm.com>
9546 David Sherwood <david.sherwood@arm.com>
9548 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
9549 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
9550 from an unsigned int * to a poly_uint64_pod *.
9551 (calculate_unrolling_factor): New function.
9552 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
9554 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9555 Alan Hayward <alan.hayward@arm.com>
9556 David Sherwood <david.sherwood@arm.com>
9558 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
9559 from an unsigned int to a poly_uint64.
9560 (_loop_vec_info::slp_unrolling_factor): Likewise.
9561 (_loop_vec_info::vectorization_factor): Change from an int
9563 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
9564 (vect_get_num_vectors): New function.
9565 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
9566 (vect_get_num_copies): Use vect_get_num_vectors.
9567 (vect_analyze_data_ref_dependences): Change max_vf from an int *
9568 to an unsigned int *.
9569 (vect_analyze_data_refs): Change min_vf from an int * to a
9571 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
9572 than an unsigned HOST_WIDE_INT.
9573 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
9574 (vect_analyze_data_ref_dependence): Change max_vf from an int *
9575 to an unsigned int *.
9576 (vect_analyze_data_ref_dependences): Likewise.
9577 (vect_compute_data_ref_alignment): Handle polynomial vf.
9578 (vect_enhance_data_refs_alignment): Likewise.
9579 (vect_prune_runtime_alias_test_list): Likewise.
9580 (vect_shift_permute_load_chain): Likewise.
9581 (vect_supportable_dr_alignment): Likewise.
9582 (dependence_distance_ge_vf): Take the vectorization factor as a
9583 poly_uint64 rather than an unsigned HOST_WIDE_INT.
9584 (vect_analyze_data_refs): Change min_vf from an int * to a
9586 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
9587 vfm1 as a poly_uint64 rather than an int. Make the same change
9588 for the returned bound_scalar.
9589 (vect_gen_vector_loop_niters): Handle polynomial vf.
9590 (vect_do_peeling): Likewise. Update call to
9591 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
9592 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
9594 * tree-vect-loop.c (vect_determine_vectorization_factor)
9595 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
9596 (vect_get_known_peeling_cost): Likewise.
9597 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
9598 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
9599 (vect_transform_loop): Likewise. Use the lowest possible VF when
9600 updating the upper bounds of the loop.
9601 (vect_min_worthwhile_factor): Make static. Return an unsigned int
9603 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
9604 polynomial unroll factors.
9605 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
9606 (vect_make_slp_decision): Likewise.
9607 (vect_supported_load_permutation_p): Likewise, and polynomial
9609 (vect_analyze_slp_cost): Handle polynomial vf.
9610 (vect_slp_analyze_node_operations): Likewise.
9611 (vect_slp_analyze_bb_1): Likewise.
9612 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
9613 than an unsigned HOST_WIDE_INT.
9614 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
9615 (vectorizable_load): Handle polynomial vf.
9616 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
9618 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
9620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9621 Alan Hayward <alan.hayward@arm.com>
9622 David Sherwood <david.sherwood@arm.com>
9624 * match.pd: Handle bit operations involving three constants
9625 and try to fold one pair.
9627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
9629 * tree-vect-loop-manip.c: Include gimple-fold.h.
9630 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
9631 niters_maybe_zero parameters. Handle other cases besides a step of 1.
9632 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
9633 Add a path that uses a step of VF instead of 1, but disable it
9635 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
9636 and niters_no_overflow parameters. Update calls to
9637 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
9638 Create a new SSA name if the latter choses to use a ste other
9639 than zero, and return it via niters_vector_mult_vf_var.
9640 * tree-vect-loop.c (vect_transform_loop): Update calls to
9641 vect_do_peeling, vect_gen_vector_loop_niters and
9642 slpeel_make_loop_iterate_ntimes.
9643 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
9644 (vect_gen_vector_loop_niters): Update declarations after above changes.
9646 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
9648 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
9649 128-bit round to integer instructions.
9650 (ceil<mode>2): Likewise.
9651 (btrunc<mode>2): Likewise.
9652 (round<mode>2): Likewise.
9654 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9656 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
9657 unaligned VSX load/store on P8/P9.
9658 (expand_block_clear): Allow the use of unaligned VSX
9659 load/store on P8/P9.
9661 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9663 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
9665 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
9666 swap associated with both a load and a store.
9668 2018-01-02 Andrew Waterman <andrew@sifive.com>
9670 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
9671 * config/riscv/riscv.md (clear_cache): Use it.
9673 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
9675 * web.c: Remove out-of-date comment.
9677 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9679 * expr.c (fixup_args_size_notes): Check that any existing
9680 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
9681 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
9682 (emit_single_push_insn): ...here.
9684 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9686 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
9687 (const_vector_encoded_nelts): New function.
9688 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
9689 (const_vector_int_elt, const_vector_elt): Declare.
9690 * emit-rtl.c (const_vector_int_elt_1): New function.
9691 (const_vector_elt): Likewise.
9692 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
9693 of CONST_VECTOR_ELT.
9695 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9697 * expr.c: Include rtx-vector-builder.h.
9698 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
9699 directly on the tree encoding.
9700 (const_vector_from_tree): Likewise.
9701 * optabs.c: Include rtx-vector-builder.h.
9702 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
9703 sequence of "u" values.
9704 * vec-perm-indices.c: Include rtx-vector-builder.h.
9705 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
9706 directly on the vec_perm_indices encoding.
9708 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9710 * doc/rtl.texi (const_vector): Describe new encoding scheme.
9711 * Makefile.in (OBJS): Add rtx-vector-builder.o.
9712 * rtx-vector-builder.h: New file.
9713 * rtx-vector-builder.c: Likewise.
9714 * rtl.h (rtx_def::u2): Add a const_vector field.
9715 (CONST_VECTOR_NPATTERNS): New macro.
9716 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
9717 (CONST_VECTOR_DUPLICATE_P): Likewise.
9718 (CONST_VECTOR_STEPPED_P): Likewise.
9719 (CONST_VECTOR_ENCODED_ELT): Likewise.
9720 (const_vec_duplicate_p): Check for a duplicated vector encoding.
9721 (unwrap_const_vec_duplicate): Likewise.
9722 (const_vec_series_p): Check for a non-duplicated vector encoding.
9723 Say that the function only returns true for integer vectors.
9724 * emit-rtl.c: Include rtx-vector-builder.h.
9725 (gen_const_vec_duplicate_1): Delete.
9726 (gen_const_vector): Call gen_const_vec_duplicate instead of
9727 gen_const_vec_duplicate_1.
9728 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
9729 (gen_const_vec_duplicate): Use rtx_vector_builder.
9730 (gen_const_vec_series): Likewise.
9731 (gen_rtx_CONST_VECTOR): Likewise.
9732 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
9733 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
9734 Build a new vector rather than modifying a CONST_VECTOR in-place.
9735 (handle_special_swappables): Update call accordingly.
9736 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
9737 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
9738 Build a new vector rather than modifying a CONST_VECTOR in-place.
9739 (handle_special_swappables): Update call accordingly.
9741 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9743 * simplify-rtx.c (simplify_const_binary_operation): Use
9744 CONST_VECTOR_ELT instead of XVECEXP.
9746 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9748 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
9749 the selector elements to be different from the data elements
9750 if the selector is a VECTOR_CST.
9751 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
9752 ssizetype for the selector.
9754 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9756 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
9757 before testing each element individually.
9758 * tree-vect-generic.c (lower_vec_perm): Likewise.
9760 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9762 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
9763 * selftest-run-tests.c (selftest::run_tests): Call it.
9764 * vector-builder.h (vector_builder::operator ==): New function.
9765 (vector_builder::operator !=): Likewise.
9766 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
9767 (vec_perm_indices::all_from_input_p): New function.
9768 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
9769 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
9770 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
9771 instead of reading the VECTOR_CST directly. Detect whether both
9772 vector inputs are the same before constructing the vec_perm_indices,
9773 and update the number of inputs argument accordingly. Use the
9774 utility functions added above. Only construct sel2 if we need to.
9776 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9778 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
9779 the broadcast of the low byte.
9780 (expand_mult_highpart): Use an explicit encoding for the permutes.
9781 * optabs-query.c (can_mult_highpart_p): Likewise.
9782 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
9783 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
9784 (vectorizable_bswap): Likewise.
9785 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
9786 explicit encoding for the power-of-2 permutes.
9787 (vect_permute_store_chain): Likewise.
9788 (vect_grouped_load_supported): Likewise.
9789 (vect_permute_load_chain): Likewise.
9791 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9793 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
9794 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
9795 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
9796 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
9797 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
9798 (vect_gen_perm_mask_any): Likewise.
9800 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9802 * int-vector-builder.h: New file.
9803 * vec-perm-indices.h: Include int-vector-builder.h.
9804 (vec_perm_indices): Redefine as an int_vector_builder.
9805 (auto_vec_perm_indices): Delete.
9806 (vec_perm_builder): Redefine as a stand-alone class.
9807 (vec_perm_indices::vec_perm_indices): New function.
9808 (vec_perm_indices::clamp): Likewise.
9809 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
9810 (vec_perm_indices::new_vector): New function.
9811 (vec_perm_indices::new_expanded_vector): Update for new
9812 vec_perm_indices class.
9813 (vec_perm_indices::rotate_inputs): New function.
9814 (vec_perm_indices::all_in_range_p): Operate directly on the
9815 encoded form, without computing elided elements.
9816 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
9817 encoding. Update for new vec_perm_indices class.
9818 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
9819 the given vec_perm_builder.
9820 (expand_vec_perm_var): Update vec_perm_builder constructor.
9821 (expand_mult_highpart): Use vec_perm_builder instead of
9822 auto_vec_perm_indices.
9823 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
9824 vec_perm_indices instead of auto_vec_perm_indices. Use a single
9825 or double series encoding as appropriate.
9826 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
9827 vec_perm_indices instead of auto_vec_perm_indices.
9828 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
9829 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
9830 (vect_permute_store_chain): Likewise.
9831 (vect_grouped_load_supported): Likewise.
9832 (vect_permute_load_chain): Likewise.
9833 (vect_shift_permute_load_chain): Likewise.
9834 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
9835 (vect_transform_slp_perm_load): Likewise.
9836 (vect_schedule_slp_instance): Likewise.
9837 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
9838 (vectorizable_mask_load_store): Likewise.
9839 (vectorizable_bswap): Likewise.
9840 (vectorizable_store): Likewise.
9841 (vectorizable_load): Likewise.
9842 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
9843 vec_perm_indices instead of auto_vec_perm_indices. Use
9844 tree_to_vec_perm_builder to read the vector from a tree.
9845 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
9846 vec_perm_builder instead of a vec_perm_indices.
9847 (have_whole_vector_shift): Use vec_perm_builder and
9848 vec_perm_indices instead of auto_vec_perm_indices. Leave the
9849 truncation to calc_vec_perm_mask_for_shift.
9850 (vect_create_epilog_for_reduction): Likewise.
9851 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
9852 from auto_vec_perm_indices to vec_perm_indices.
9853 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
9854 instead of changing individual elements.
9855 (aarch64_vectorize_vec_perm_const): Use new_vector to install
9856 the vector in d.perm.
9857 * config/arm/arm.c (expand_vec_perm_d::perm): Change
9858 from auto_vec_perm_indices to vec_perm_indices.
9859 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
9860 instead of changing individual elements.
9861 (arm_vectorize_vec_perm_const): Use new_vector to install
9862 the vector in d.perm.
9863 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
9864 Update vec_perm_builder constructor.
9865 (rs6000_expand_interleave): Likewise.
9866 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
9867 (rs6000_expand_interleave): Likewise.
9869 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9871 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
9872 to qimode could truncate the indices.
9873 * optabs.c (expand_vec_perm_var): Likewise.
9875 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
9877 * Makefile.in (OBJS): Add vec-perm-indices.o.
9878 * vec-perm-indices.h: New file.
9879 * vec-perm-indices.c: Likewise.
9880 * target.h (vec_perm_indices): Replace with a forward class
9882 (auto_vec_perm_indices): Move to vec-perm-indices.h.
9883 * optabs.h: Include vec-perm-indices.h.
9884 (expand_vec_perm): Delete.
9885 (selector_fits_mode_p, expand_vec_perm_var): Declare.
9886 (expand_vec_perm_const): Declare.
9887 * target.def (vec_perm_const_ok): Replace with...
9888 (vec_perm_const): ...this new hook.
9889 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
9890 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
9891 * doc/tm.texi: Regenerate.
9892 * optabs.def (vec_perm_const): Delete.
9893 * doc/md.texi (vec_perm_const): Likewise.
9894 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
9895 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
9896 expand_vec_perm for constant permutation vectors. Assert that
9897 the mode of variable permutation vectors is the integer equivalent
9898 of the mode that is being permuted.
9899 * optabs-query.h (selector_fits_mode_p): Declare.
9900 * optabs-query.c: Include vec-perm-indices.h.
9901 (selector_fits_mode_p): New function.
9902 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
9903 is defined, instead of checking whether the vec_perm_const_optab
9904 exists. Use targetm.vectorize.vec_perm_const instead of
9905 targetm.vectorize.vec_perm_const_ok. Check whether the indices
9906 fit in the vector mode before using a variable permute.
9907 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
9908 vec_perm_indices instead of an rtx.
9909 (expand_vec_perm): Replace with...
9910 (expand_vec_perm_const): ...this new function. Take the selector
9911 as a vec_perm_indices rather than an rtx. Also take the mode of
9912 the selector. Update call to shift_amt_for_vec_perm_mask.
9913 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
9914 Use vec_perm_indices::new_expanded_vector to expand the original
9915 selector into bytes. Check whether the indices fit in the vector
9916 mode before using a variable permute.
9917 (expand_vec_perm_var): Make global.
9918 (expand_mult_highpart): Use expand_vec_perm_const.
9919 * fold-const.c: Includes vec-perm-indices.h.
9920 * tree-ssa-forwprop.c: Likewise.
9921 * tree-vect-data-refs.c: Likewise.
9922 * tree-vect-generic.c: Likewise.
9923 * tree-vect-loop.c: Likewise.
9924 * tree-vect-slp.c: Likewise.
9925 * tree-vect-stmts.c: Likewise.
9926 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
9928 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
9929 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
9930 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
9931 (aarch64_vectorize_vec_perm_const): ...this new function.
9932 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
9933 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
9934 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
9935 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
9936 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
9937 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
9938 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
9940 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
9941 check for NEON modes.
9942 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
9943 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
9944 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
9945 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
9947 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
9948 the old VEC_PERM_CONST conditions.
9949 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
9950 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
9951 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
9952 (ia64_vectorize_vec_perm_const_ok): Merge into...
9953 (ia64_vectorize_vec_perm_const): ...this new function.
9954 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
9955 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
9956 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
9957 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
9958 * config/mips/mips.c (mips_expand_vec_perm_const)
9959 (mips_vectorize_vec_perm_const_ok): Merge into...
9960 (mips_vectorize_vec_perm_const): ...this new function.
9961 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
9962 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
9963 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
9964 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
9965 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
9966 (rs6000_expand_vec_perm_const): Delete.
9967 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
9969 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
9970 (altivec_expand_vec_perm_const_le): Take each operand individually.
9971 Operate on constant selectors rather than rtxes.
9972 (altivec_expand_vec_perm_const): Likewise. Update call to
9973 altivec_expand_vec_perm_const_le.
9974 (rs6000_expand_vec_perm_const): Delete.
9975 (rs6000_vectorize_vec_perm_const_ok): Delete.
9976 (rs6000_vectorize_vec_perm_const): New function.
9977 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
9978 an element count and rtx array.
9979 (rs6000_expand_extract_even): Update call accordingly.
9980 (rs6000_expand_interleave): Likewise.
9981 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
9982 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
9983 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
9984 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
9985 (rs6000_expand_vec_perm_const): Delete.
9986 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
9987 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
9988 (altivec_expand_vec_perm_const_le): Take each operand individually.
9989 Operate on constant selectors rather than rtxes.
9990 (altivec_expand_vec_perm_const): Likewise. Update call to
9991 altivec_expand_vec_perm_const_le.
9992 (rs6000_expand_vec_perm_const): Delete.
9993 (rs6000_vectorize_vec_perm_const_ok): Delete.
9994 (rs6000_vectorize_vec_perm_const): New function. Remove stray
9995 reference to the SPE evmerge intructions.
9996 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
9997 an element count and rtx array.
9998 (rs6000_expand_extract_even): Update call accordingly.
9999 (rs6000_expand_interleave): Likewise.
10000 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
10001 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
10003 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
10005 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
10007 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
10008 vector mode and that that mode matches the mode of the data
10010 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
10011 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
10012 directly using expand_vec_perm_1 when forcing selectors into
10014 (expand_vec_perm_var): New function, split out from expand_vec_perm.
10016 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
10018 * optabs-query.h (can_vec_perm_p): Delete.
10019 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
10020 * optabs-query.c (can_vec_perm_p): Split into...
10021 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
10022 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
10023 particular selector is valid.
10024 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
10025 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
10026 (vect_grouped_load_supported): Likewise.
10027 (vect_shift_permute_load_chain): Likewise.
10028 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
10029 (vect_transform_slp_perm_load): Likewise.
10030 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
10031 (vectorizable_bswap): Likewise.
10032 (vect_gen_perm_mask_checked): Likewise.
10033 * fold-const.c (fold_ternary_loc): Likewise. Don't take
10034 implementations of variable permutation vectors into account
10035 when deciding which selector to use.
10036 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
10037 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
10038 with a false third argument.
10039 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
10040 to test whether the constant selector is valid and can_vec_perm_var_p
10041 to test whether a variable selector is valid.
10043 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
10045 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
10046 * optabs-query.c (can_vec_perm_p): Likewise.
10047 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
10048 instead of vec_perm_indices.
10049 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
10050 (vect_gen_perm_mask_checked): Likewise,
10051 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
10052 (vect_gen_perm_mask_checked): Likewise,
10054 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
10056 * optabs-query.h (qimode_for_vec_perm): Declare.
10057 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
10058 (qimode_for_vec_perm): ...this new function.
10059 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
10061 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10063 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
10064 does not have a conditional at the top.
10066 2018-01-02 Richard Biener <rguenther@suse.de>
10068 * ipa-inline.c (big_speedup_p): Fix expression.
10070 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
10073 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
10076 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
10080 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
10081 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
10082 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
10083 cond_taken_branch_cost 3->4.
10085 2018-01-01 Jakub Jelinek <jakub@redhat.com>
10087 PR tree-optimization/83581
10088 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
10089 TODO_cleanup_cfg if any changes have been made.
10091 PR middle-end/83608
10092 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
10093 convert_modes if target mode has the right side, but different mode
10096 PR middle-end/83609
10097 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
10098 last argument when extracting from CONCAT. If either from_real or
10099 from_imag is NULL, use expansion through memory. If result is not
10100 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
10101 the parts directly to inner mode, if even that fails, use expansion
10104 PR middle-end/83623
10105 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
10106 check for bswap in mode rather than HImode and use that in expand_unop
10109 Copyright (C) 2018 Free Software Foundation, Inc.
10111 Copying and distribution of this file, with or without modification,
10112 are permitted in any medium without royalty provided the copyright
10113 notice and this notice are preserved.