Extend tree code folds to IFN_COND_*
[official-gcc.git] / gcc / ChangeLog
bloba8694e2c2341390fff6a2bdfe828d519095f9c60
1 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3         * target.def (preferred_else_value): New target hook.
4         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5         * doc/tm.texi: Regenerate.
6         * targhooks.h (default_preferred_else_value): Declare.
7         * targhooks.c (default_preferred_else_value): New function.
8         * internal-fn.h (conditional_internal_fn_code): Declare.
9         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10         (get_conditional_internal_fn): Use it.
11         (conditional_internal_fn_code): New function.
12         * gimple-match.h (gimple_match_cond): New struct.
13         (gimple_match_op): Add a cond member function.
14         (gimple_match_op::gimple_match_op): Update all forms to take a
15         gimple_match_cond.
16         * genmatch.c (expr::gen_transform): Use the same condition as res_op
17         for the suboperation, but don't specify a particular else_value.
18         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
19         (visit_nary_op, visit_reference_op_load): Pass
20         gimple_match_cond::UNCOND to the gimple_match_op constructor.
21         * gimple-match-head.c: Include tree-eh.h
22         (convert_conditional_op): New function.
23         (maybe_resimplify_conditional_op): Likewise.
24         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
25         (gimple_resimplify2): Likewise.
26         (gimple_resimplify3): Likewise.
27         (gimple_resimplify4): Likewise.
28         (maybe_push_res_to_seq): Return null for conditional operations.
29         (try_conditional_simplification): New function.
30         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
31         constructor.
32         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
33         IFN_COND_* call.
34         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
35         function.
36         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
38 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
40         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
41         DECL_FCONTEXT
42         (hash_tree): Do not hash DECL_FCONTEXT
43         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
44         Do not stream DECL_FCONTEXT.
45         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
46         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
48 2018-07-12  Richard Biener  <rguenther@suse.de>
50         PR debug/86462
51         * dwarf2out.c (gen_block_die): Only output blocks when they have
52         at least one !DECL_IGNORED_P variable.
54 2018-07-12  Richard Biener  <rguenther@suse.de>
56         PR target/84829
57         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
58         Remove -mieee-fp handling.
60 2018-07-12  Richard Biener  <rguenther@suse.de>
62         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
63         left-over from last patch.
65 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
67         PR tree-optimization/86492
68         * gimple-ssa-store-merging.c
69         (imm_store_chain_info::coalesce_immediate_stores): Call
70         check_no_overlap even for the merge_overlapping case.  Formatting fix.
72 2018-07-12  Richard Biener  <rguenther@suse.de>
74         PR middle-end/86479
75         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
76         move possibly trapping operations into the conditional.
78 2018-07-12  Richard Biener  <rguenther@suse.de>
80         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
81         (vn_lookup_simplify_result): Remove recursion limit applied
82         here.
83         (vn_nary_build_or_lookup_1): Adjust.
84         (try_to_simplify): Likewise.
85         * gimple-match-head.c (gimple_resimplify1): Instead apply one
86         here.
87         (gimple_resimplify2): Likewise.
88         (gimple_resimplify3): Likewise.
89         (gimple_resimplify4): Likewise.
91 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
93         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
94         Use __mmask64 type instead of __mmask8 for __M argument.
95         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
96         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
97         __U argument.
98         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
99         __mmask16 for __M argument.
100         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
101         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
102         to __mmask16 instead of __mmask8.
103         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
104         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
105         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
106         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
107         instead of __mmask16 for __U argument.
108         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
109         __mmask16 instead of __mmask8 for __U argument.
110         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
111         __U argument.
112         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
113         __mmask16.
114         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
115         argument.
116         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
117         __U argument.
118         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
119         __mmask16.
120         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
121         of __mmask16.
122         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
123         __U argument.
124         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
125         __U argument.
126         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
127         __U argument.
128         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
129         __U argument.
130         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
131         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
132         return type as well as __M argument type and all casts from __mmask8
133         to __mmask32.
134         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
135         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
136         return type as well as __M argument type and all casts from __mmask8
137         to __mmask16.
138         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
139         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
140         return type as well as __M argument type and all casts from __mmask8
141         to __mmask32.
142         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
143         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
144         return type as well as __M argument type and all casts from __mmask8
145         to __mmask16.
146         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
147         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
148         __mmask16.
150 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
152         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
153         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
154         for __U argument.
156 2018-07-11  Paul Koning  <ni1d@arrl.net>
158         * doc/md.texi (define_subst): Document how multiple occurrences of
159         the same argument in the replacement pattern are handled.
161 2018-07-11  Paul Koning  <ni1d@arrl.net>
163         * doc/extend.texi (Common Variable Attributes): Move "mode" into
164         alphabetical order.
165         (Common Type Attributes): Add "mode" attribute.
167 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
169         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
170         stream DECL_ORIGINAL_TYPE.
171         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
172         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
173         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
174         Do not walk original type.
175         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
176         external decls.
177         (write_ts_decl_non_common_tree_pointers): Do not stream
178         DECL_ORIGINAL_TYPE
179         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
180         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
182 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
184         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
185         thread twice from the same starting edge.
187 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
189         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
190         * gimple.c (gimple_call_nonnull_result_p): ...here...
191         (gimple_call_nonnull_arg): ...and here.
192         * gimple.h (gimple_call_nonnull_result_p): New.
193         (gimple_call_nonnull_arg): New.
195 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
197         * config/arm/arm-cpus.in: Move information from fpu field of each
198         cpu definition to the isa field.
199         * config/arm/parsecpu.awk (fpu): Delete match rule.
200         (gen_comm_data): Don't add bits from the CPU's FPU entry.
202 2018-07-11  Richard Biener  <rguenther@suse.de>
204         PR debug/86457
205         * dwarf2out.c (init_sections_and_labels): Use
206         output_asm_line_debug_info consistently.
207         (dwarf2out_early_finish): Likewise.
208         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
209         type units.
211 2018-07-11  Richard Biener  <rguenther@suse.de>
213         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
214         Rework father_bb setting in a way to avoid propagating constants
215         multiple times on a loop body.
217 2018-07-10  Mark Wielaard  <mark@klomp.org>
219         PR debug/86459
220         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
222 2018-07-10  Richard Biener  <rguenther@suse.de>
224         * hash-map.h (hash_map::iterator::operator*): Return
225         references to key and value.
227 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
229         PR c++/86443
230         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
231         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
232         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
233         (gimplify_omp_for): For composite loops, move outer
234         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
235         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
236         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
237         TREE_LIST for both the original class iterator and the "last" helper
238         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
239         loop, remember has_decl_expr from outer composite loops for the
240         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
242 2018-07-09  Martin Sebor  <msebor@redhat.com>
244         PR middle-end/77357
245         PR middle-end/86428
246         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
247         accessing implicitly initialized array elements.
248         * expr.c (string_constant): Handle string initializers of
249         character arrays within aggregates.
250         * gimple-fold.c (fold_array_ctor_reference): Add argument.
251         Store element offset.  As a special case, handle zero size.
252         (fold_nonarray_ctor_reference): Same.
253         (fold_ctor_reference): Add argument.  Store subobject offset.
254         * gimple-fold.h (fold_ctor_reference): Add argument.
256 2018-07-09  Paul Koning  <ni1d@arrl.net>
258         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
259         (pdp11_insn_cost): New function.
260         (pdp11_md_asm_adjust): New function.
261         (TARGET_INVALID_WITHIN_DOLOOP): Define.
262         (pdp11_rtx_costs): Update to match machine better.
263         (output_addr_const_pdp11): Correct format mismatch warnings.
264         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
265         * config/pdp11/pdp11.md: General change to add base_cost and/or
266         length attributes for use by new pdp11_insn_cost function.
267         (MIN_BRANCH): Correct definition.
268         (MIN_SOB): Ditto.
269         (doloop_end): Use standard pattern name for looping pattern.
270         (doloop_end_nocc): New.
271         (movsf): Add another constraint alternative.
272         (zero_extendqihi2): Add constraint alternatives for not in place
273         extend.
274         (zero_extendhisi2): Remove.
275         (shift patterns): Add CC handling variants.
276         (bswaphi2): New.
277         (bswapsi2): New.
278         (rothi3): New.
279         (define_peephole2): New peephole to recognize mov that sets CC for
280         subsequent test.
282 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
284         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
285         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
286         wi::add.
288 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
290         PR c/86420
291         * real.c (real_nextafter): Return true if result is denormal.
293 2018-07-09  Martin Liska  <mliska@suse.cz>
295         * common.opt: Add back wrongly removed attribute.
297 2018-07-09  Richard Biener  <rguenther@suse.de>
299         PR debug/86413
300         * dwarf2out.c (gen_block_die): For an early generated DIE
301         always output high/low PC attributes.
303 2018-07-09  Tom de Vries  <tdevries@suse.de>
305         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
306         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
307         onto VAR_DECL with abstract origin.
309 2018-07-07  Jim Wilson  <jimw@sifive.com>
311         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
313 2018-07-07  Tom de Vries  <tdevries@suse.de>
315         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
317 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
319         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
320         overflow_type.
321         (combine_bound): Use wide-int overflow calculation instead of
322         rolling our own.
323         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
324         overflow_type.
325         * fold-const.c (int_const_binop_2): Same.
326         (extract_muldiv_1): Same.
327         (fold_div_compare): Same.
328         (fold_abs_const): Same.
329         * match.pd: Same.
330         * poly-int.h (add): Same.
331         (sub): Same.
332         (neg): Same.
333         (mul): Same.
334         * predict.c (predict_iv_comparison): Same.
335         * profile-count.c (slow_safe_scale_64bit): Same.
336         * simplify-rtx.c (simplify_const_binary_operation): Same.
337         * tree-chrec.c (tree_fold_binomial): Same.
338         * tree-data-ref.c (split_constant_offset_1): Same.
339         * tree-if-conv.c (idx_within_array_bound): Same.
340         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
341         * tree-ssa-phiopt.c (minmax_replacement): Same.
342         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
343         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
344         * vr-values.c (vr_values::adjust_range_with_scev): Same.
345         * wide-int.cc (wi::add_large): Same.
346         (wi::mul_internal): Same.
347         (wi::sub_large): Same.
348         (wi::divmod_internal): Same.
349         * wide-int.h: Change overflow type to overflow_type for neg, add,
350         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
351         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
352         mul_internal, divmod_internal.
353         (overflow_type): New enum.
354         (accumulate_overflow): New.
356 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
358         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
359         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
361 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
363         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
364         argument is checked for zero before entering loop, avoid checking again.
366 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
368         * gimplify.h (generic_expr_could_trap_p): Set as global function.
369         * gimplify.h (generic_expr_could_trap_p): Likwise.
370         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
372 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
374         PR tree-optimization/86401
375         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
376         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
377         (fold_bit_and_mask): ... here.  New helper function for match.pd.
378         * fold-const.h (fold_bit_and_mask): Declare.
379         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
381 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
383         PR target/86324
384         * target.def (translate_mode_attribute): New hook.
385         * targhooks.h (default_translate_mode_attribute): Declare.
386         * targhooks.c (default_translate_mode_attribute): New function.
387         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
388         * doc/tm.texi: Regenerate.
389         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
390         (rs6000_translate_mode_attribute): New function.
392 2018-07-06  Paul Koning  <ni1d@arrl.net>
394         * doc/md.texi (define_split): Document DONE and FAIL.
395         (define_peephole2): Ditto.
397 2018-07-05  Jeff Law  <law@redhat.com>
399         PR tree-optimization/86010
400         * tree-ssa-dse.c (compute_trims): More aggressively trim at
401         both the head and tail of mem* and str* calls.
403 2018-07-05  Jim Wilson  <jimw@sifive.com>
405         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
407 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com> 
409         * config/aarch64/aarch64-simd.md: correct flags text for 
410         MIN_EXPR replacement.
412 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
414         * configure: Regenerated.
416 2018-07-05  Carl Love  <cel@us.ibm.com>
418         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
419         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
420         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
421         VSX_BUILTIN_DOUBLEL_V4SF.
423 2018-07-05  Martin Sebor  <msebor@redhat.com>
425         PR c++/86400
426         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
427         than its domain to compute its the upper bound of a char array.
429 2018-07-05  Nathan Sidwell  <nathan@acm.org>
431         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
432         * doc/cpp.texi: Update comment.
433         * doc/tm.texi: Rebuilt.
434         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
435         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
436         * doc/extend.texi (Backwards Compatibility): Clarify it is system
437         headers affected by extern "C".
438         * system.h: Poison NO_IMPLICIT_EXTERN_C.
439         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
440         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
441         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
442         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
443         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
444         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
445         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
446         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
447         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
448         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
449         config/sparc/sp64-elf.h, config/spu/spu.h,
450         config/stormy16/stormy16.h, config/v850/v850.h,
451         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
452         define NO_IMPLICIT_EXTERN_C.
453         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
455 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
457         PR target/84711
458         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
459         instead of GET_MODE_SIZE when comparing Units.
461 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
463         PR target/84711
464         * rtlanal.c (set_noop_p): Constrain on mode change,
465         include hard-reg-set.h
467 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
469         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
471 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
473         Revert
474         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
476         PR sanitizer/84250
477         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
478         libasan.
479         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
481 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
483         PR sanitizer/84250
484         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
485         libasan.
486         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
488 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
490         PR middle-end/86380
491         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
493 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
495         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
496         neg_*_op* variables.
498 2018-07-04  Martin Liska  <mliska@suse.cz>
500         * tree-switch-conversion.c: Define
501         max_ratio_for_speed and max_ratio_for_size constants.
503 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
504             Martin Liska  <mliska@suse.cz>
506         PR middle-end/66240
507         PR target/45996
508         PR c/84100
509         * common.opt: Rename align options with 'str_' prefix.
510         * common/config/i386/i386-common.c (set_malign_value): New
511         function.
512         (ix86_handle_option): Use it to set -falign-* options/
513         * config/aarch64/aarch64-protos.h (struct tune_params): Change
514         type from int to string.
515         * config/aarch64/aarch64.c: Update default values from int
516         to string.
517         * config/alpha/alpha.c (alpha_override_options_after_change):
518         Likewise.
519         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
520         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
521         max skip conditionally.
522         * config/i386/freebsd.h (SUBALIGN_LOG): New.
523         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
524         max skip conditionally.
525         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
526         max skip conditionally.
527         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
528         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
529         max skip conditionally.
530         * config/i386/i386.c (struct ptt): Change type from int to
531         string.
532         (ix86_default_align): Set default values.
533         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
534         max skip conditionally.
535         * config/i386/iamcu.h (SUBALIGN_LOG): New.
536         (ASM_OUTPUT_MAX_SKIP_ALIGN):
537         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
538         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
539         max skip conditionally.
540         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
541         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
542         * config/i386/x86-64.h (SUBALIGN_LOG): New.
543         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
544         max skip conditionally.
545         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
546         * config/ia64/ia64.c (ia64_option_override): Set default values
547         for alignment options.
548         * config/m68k/m68k.c: Handle new str_align_* options.
549         * config/mips/mips.c (mips_set_compression_mode): Change
550         type of constants.
551         (mips_option_override): Set default values for options.
552         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
553         Likewise.
554         * config/rs6000/rs6000.c (rs6000_option_override_internal):
555         Likewise.
556         * config/rx/rx.c (rx_option_override): Likewise.
557         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
558         (LABEL_ALIGN): Use align_labels_log.
559         (LOOP_ALIGN): Use align_loops_align.
560         * config/s390/s390.c (s390_asm_output_function_label): Use new
561         macros.
562         * config/sh/sh.c (sh_override_options_after_change):
563         Change type of constants.
564         * config/spu/spu.c (spu_sched_init): Likewise.
565         * config/sparc/sparc.c (sparc_option_override): Set default
566         values for options.
567         * config/visium/visium.c (visium_option_override): Likewise.
568         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
569         emit p2align format with last argument if it's not needed.
570         * doc/invoke.texi: Document extended format of -falign-*.
571         * final.c: Use align_labels alignment.
572         * flags.h (struct target_flag_state): Change type to use
573         align_flags.
574         (struct align_flags_tuple): New.
575         (struct align_flags): Likewise.
576         (align_loops_log): Redefine macro to use new types.
577         (align_loops_max_skip): Redefine macro to use new types.
578         (align_jumps_log): Redefine macro to use new types.
579         (align_jumps_max_skip): Redefine macro to use new types.
580         (align_labels_log): Redefine macro to use new types.
581         (align_labels_max_skip): Redefine macro to use new types.
582         (align_functions_log): Redefine macro to use new types.
583         (align_loops): Redefine macro to use new types.
584         (align_jumps): Redefine macro to use new types.
585         (align_labels): Redefine macro to use new types.
586         (align_functions): Redefine macro to use new types.
587         (align_functions_max_skip): Redefine macro to use new types.
588         (align_loops_value): New macro.
589         (align_jumps_value): New macro.
590         (align_labels_value): New macro.
591         (align_functions_value): New macro.
592         * function.c (invoke_set_current_function_hook): Propagate
593         alignment values from flags to global variables default in
594         topleev.h.
595         * ipa-icf.c (sem_function::equals_wpa): Use
596         cl_optimization_option_eq instead of memcmp.
597         * lto-streamer.h (cl_optimization_stream_out): Support streaming
598         of string types.
599         (cl_optimization_stream_in): Likewise.
600         * optc-save-gen.awk: Support strings in cl_optimization.
601         * opth-gen.awk: Likewise.
602         * opts.c (finish_options): Remove error checking of invalid
603         value ranges.
604         (MAX_CODE_ALIGN): Remove.
605         (MAX_CODE_ALIGN_VALUE): Likewise.
606         (parse_and_check_align_values): New function.
607         (check_alignment_argument): Likewise.
608         (common_handle_option): Use check_alignment_argument.
609         * opts.h (parse_and_check_align_values): Declare.
610         * toplev.c (init_alignments): Remove.
611         (read_log_maxskip): New.
612         (parse_N_M): Likewise.
613         (parse_alignment_opts): Likewise.
614         (backend_init_target): Remove usage of init_alignments.
615         * toplev.h (parse_alignment_opts): Declare.
616         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
617         argument.
618         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
619         * tree.c (cl_option_hasher::equal): New.
620         * varasm.c: Use new global macros.
622 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
624         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
625         Use a simpler align directive also if MAXSKIP = ALIGN-1.
626         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
627         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
628         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
629         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
630         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
631         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
632         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
633         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
634         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
635         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
636         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
638 2018-07-04  Martin Liska  <mliska@suse.cz>
639             Jonathan Wakely  <jwakely@redhat.com>
641         * coverage.c: Use correct type.
642         * doc/invoke.texi: Language correction.
644 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
646         PR target/85620
647         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
648         ENDBRANCH for non-tail call which may return via indirect branch.
649         * doc/extend.texi: Document indirect_return attribute.
651 2018-07-03  Martin Sebor  <msebor@redhat.com>
653         PR tree-optimization/86274
654         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
655         precondition.
656         (format_floating): Correct handling of infinities and NaNs.
658 2018-07-03  Martin Sebor  <msebor@redhat.com>
660         * print-tree.c (print_real_cst): New function.
661         (print_node_brief): Call it.
662         (print_node): Ditto.
664 2018-07-03  Jeff Law  <law@redhat.com>
666         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
667         into a single pattern.
669         * config/h8300/h8300.md (ors code_iterator): New.
670         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
671         a single pattern and single splitter.
672         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
673         (iorqi3_1, xorqi3_1): Likewise.
674         (iorqi3, xorqi3 expanders): Similarly.
676         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
677         (movmd_internal) into a single pattern using the P mode iterator.
678         (movmd splitters): Similarly.
679         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
680         (movsd splitters): Similarly.
682         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
683         ADDB, ADDW and ADDL into a single ADD attribute which selects the
684         right table based on the size of the operand.
685         * config/h8300/h8300.md (length_table): Corresponding changes. All
686         references to "addb", "addw" and "addl" changed to "add".
687         (btst patterns): Merge two variants into a single pattern.
688         (tstqi, tsthi): Likewise.
689         (addhi3_incdec, addsi3_incdec): Likewise.
690         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
691         (mulhi3, mulsi3): Likewise.
692         (udivhi3, udivsi3): Likewise.
693         (divhi3, divsi3): Likewise.
694         (andorqi3, andorhi3, andorsi3): Likewise.
696 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
698         PR target/85694
699         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
700         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
702 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
704         PR tree-optimization/85694
705         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
706         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
707         UNSPEC_URHADD.
708         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
709         (<u>avg<mode>3_ceil): New patterns.
711 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
713         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
714         scan-tree-dump directive.
715         * gcc.dg/vect/slp-perm-2.c: Likewise.
716         * gcc.dg/vect/slp-perm-3.c: Likewise.
717         * gcc.dg/vect/slp-perm-5.c: Likewise.
718         * gcc.dg/vect/slp-perm-6.c: Likewise.
719         * gcc.dg/vect/slp-perm-7.c: Likewise.
720         * gcc.dg/vect/slp-perm-8.c: Likewise.
722 2018-07-03  Marek Polacek  <polacek@redhat.com>
724         PR middle-end/86202
725         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
727 2018-07-03  Richard Biener  <rguenther@suse.de>
729         PR ipa/86389
730         * tree-ssa-structalias.c (find_func_clobbers): Properly
731         handle indirect calls.
733 2018-07-03  Jeff Law  <law@redhat.com>
735         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
736         (shifts): New code iterator.
737         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
738         expander.  Fix HImode handling on H8/SX.
739         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
740         (subqi3, subhi3, subsi3 expanders): Likewise.
741         (andqi3, andhi3, andsi3 expanders): Likewise.
742         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
743         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
744         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
745         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
746         (zero_extendqihi2, zero_extendqisi2): Likewise.
747         (extendqihi2, extendqisi2): Likewise.
748         (rotlqi3, rotlhi3, rotlsi3): Likewise.
749         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
750         (rotlqi3_1, rotlhi3_1): Likewise.
751         (logicalhi3_sn, logicalsi3_sn): Likewise.
752         (logicalhi3, logicalsi3): Likewise.
754 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
756         * tree-vect-patterns.c (vect_recog_rotate_pattern)
757         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
758         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
759         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
760         type to append_pattern_def_seq instead of creating a stmt_vec_info
761         directly.
762         (build_mask_conversion): Likewise.  Remove vinfo argument.
763         (vect_add_conversion_to_patterm): Likewise, renaming to...
764         (vect_add_conversion_to_pattern): ...this.
765         (vect_recog_mask_conversion_pattern): Update call to
766         build_mask_conversion.  Pass the vector type to
767         append_pattern_def_seq here too.
768         (vect_recog_gather_scatter_pattern): Update call to
769         vect_add_conversion_to_pattern.
771 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
773         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
774         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
775         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
776         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
777         STMT_VINFO_PATTERN_DEF_SEQ to null here.
778         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
779         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
780         append_pattern_def_seq instead of new_pattern_def_seq.
781         (vect_recog_divmod_pattern): Do both of the above.
782         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
783         is null.
785 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
787         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
788         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
789         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
790         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
791         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
792         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
793         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
794         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
795         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
796         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
797         parameter with a single stmt_vec_info.
798         (vect_recog_func_ptr): Likewise.
799         (vect_recog_gather_scatter_pattern): Likewise, folding in...
800         (vect_try_gather_scatter_pattern): ...this.
801         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
802         the stmt_vec_info of the statement to be matched.  Don't clear
803         STMT_VINFO_RELATED_STMT.
804         (vect_pattern_recog): Update call accordingly.
806 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
808         PR tree-optimization/85694
809         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
810         (uavgM3_ceil): Document new optabs.
811         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
812         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
813         functions.
814         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
815         (savg_ceil_optab): New optabs.
816         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
817         (vect_vect_recog_func_ptrs): Add it.
818         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
819         constant directly from the associated lhs.
821 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
823         * tree-vect-patterns.c (vect_split_statement): New function.
824         (vect_convert_input): Use it to try to split an existing cast.
826 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
828         * poly-int.h (print_hex): New function.
829         * dumpfile.h (dump_dec, dump_hex): Declare.
830         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
831         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
832         min_input_precision, operation_precision and operation_sign.
833         * tree-vect-patterns.c (vect_get_range_info): New function.
834         (vect_same_loop_or_bb_p, vect_single_imm_use)
835         (vect_operation_fits_smaller_type): Delete.
836         (vect_look_through_possible_promotion): Add an optional
837         single_use_p parameter.
838         (vect_recog_over_widening_pattern): Rewrite to use new
839         stmt_vec_info infomration.  Handle one operation at a time.
840         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
841         (vect_truncatable_operation_p, vect_set_operation_type)
842         (vect_set_min_input_precision): New functions.
843         (vect_determine_min_output_precision_1): Likewise.
844         (vect_determine_min_output_precision): Likewise.
845         (vect_determine_precisions_from_range): Likewise.
846         (vect_determine_precisions_from_users): Likewise.
847         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
848         (vect_vect_recog_func_ptrs): Put over_widening first.
849         Add cast_forwprop.
850         (vect_pattern_recog): Call vect_determine_precisions.
852 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
854         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
855         statements that have been replaced by further pattern statements.
856         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
858 2018-07-03  Richard Biener  <rguenther@suse.de>
860         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
861         always set *dt.  Dump vectype in vectype overload.
862         * dumpfile.h (dump_gimple_expr): New function.
863         (dump_gimple_expr_loc): Likewise.
864         * dumpfile.c (dump_gimple_expr): New function.
865         (dump_gimple_expr_loc): Likewise.
867 2018-07-02  Jeff Law  <law@redhat.com>
869         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
870         the H8/300, H8/300H and H8/S variants into a single pattern.
871         (movhi_h8300, movqi_h8300hs): Similarly.
872         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
873         (QHI mode iterator): New.
875         * config/h8300/h8300.md: Remove trailing whitespace.
877 2018-07-02  Jim Wilson  <jimw@sifive.com>
879         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
880         instead of emit_insn for interrupt returns.
881         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
882         (riscv_sret, riscv_uret): Likewise.
884 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
886         * pretty-print.c (selftest::test_pp_format): Move save and restore
887         of quotes to class auto_fix_quotes, and add an instance.
888         * selftest.c: Include "intl.h".
889         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
890         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
891         * selftest.h (selftest::auto_fix_quotes): New class.
893 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
895         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
896         (aarch64_sve_prepare_conditional_op): Remove.
897         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
898         Allow aarch64_simd_reg_or_zero as select operand; remove
899         the aarch64_sve_prepare_conditional_op call.
900         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
901         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
902         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
903         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
904         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
905         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
906         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
907         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
908         and a splitters to match all of the *_any patterns.
909         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
911         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
912         (SVE_COND_FP_BINARY_REV): Remove.
913         (sve_int_op_rev, sve_fp_op_rev): New.
914         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
915         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
916         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
917         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
918         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
919         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
920         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
921         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
922         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
924         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
925         Remove match_dup 1 from the inner unspec.
926         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
928         * config/aarch64/aarch64.md (movprfx): New attr.
929         (length): Default movprfx to 8.
930         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
931         (*madd<SVE_I>, *msub<SVE_I): Likewise.
932         (*<su>mul<SVE_I>3_highpart): Likewise.
933         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
934         (*v<ASHIFT><SVE_I>3): Likewise.
935         (*<su><MAXMIN><SVE_I>3): Likewise.
936         (*<su><MAXMIN><SVE_F>3): Likewise.
937         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
938         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
939         (*div<SVE_F>4): Likewise.
941 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
943         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
944         in dump string.
946 2018-07-02  Richard Biener  <rguenther@suse.de>
948         PR tree-optimization/86363
949         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
950         memset argument refers to a non-variable address.
952 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
954         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
955         {PLUS,MINUS}_EXPR code to...
956         (adjust_symbolic_bound): ...here,
957         (combine_bound): ...here,
958         (set_value_range_with_overflow): ...and here.
960 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
962         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
963         code...
964         (extract_range_from_abs_expr): ...here.
966 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
968         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
969         -fno-omit-frame-pointer when not optimizing.
971 2018-07-02  Martin Liska  <mliska@suse.cz>
973         PR ipa/86279
974         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
975         (propagate_nothrow): Likewise.
977 2018-07-02  Martin Liska  <mliska@suse.cz>
979         PR ipa/86323
980         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
982 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
984         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
985         function in r262149, changing "loc" param from source_location to
986         const dump_location_t &.
987         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
988         declaration, as above.
990 2018-07-01  Paul Koning  <ni1d@arrl.net>
992         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
993         -munit-asm, -mgnu-asm, -mdec-asm.
994         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
995         (pdp11_output_labelref): New.
996         (pdp11_output_def): New.
997         (pdp11_output_addr_vec_elt): New.
998         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
999         %# and %@ format codes.
1000         (pdp11_option_override): New.
1001         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
1002         (pdp11_output_ident): New.
1003         (pdp11_asm_named_section): New.
1004         (pdp11_asm_init_sections): New.
1005         (pdp11_file_start): New.
1006         (pdp11_file_end): New.
1007         (output_ascii): Use .ascii/.asciz for -mdec-asm.
1008         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
1009         %o, like %c but octal.
1010         (pdp11_option_override): New.
1011         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
1012         -mdec-asm.
1013         (DATA_SECTION_ASM_OP): Ditto.
1014         (READONLY_DATA_SECTION_ASM_OP): New.
1015         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
1016         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
1017         (ASM_OUTPUT_LABELREF): Ditto.
1018         (ASM_OUTPUT_DEF): Ditto.
1019         (ASM_OUTPUT_EXTERNAL): New.
1020         (ASM_OUTPUT_SOURCE_FILENAME): New.
1021         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
1022         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
1023         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
1024         %# and %@ format codes.
1025         * config/pdp11/pdp11.opt (mgnu-asm): New.
1026         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
1027         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
1028         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
1030 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
1032         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
1033         dereferencing path[] beyond its length.
1034         (debug_path): New.
1035         (debug_all_paths): New.
1036         (rewire_first_differing_edge): New.
1037         (adjust_paths_after_duplication): New.
1038         (duplicate_thread_path): Call adjust_paths_after_duplication.
1039         Add new argument.
1040         (thread_through_all_blocks): Add new argument to
1041         duplicate_thread_path.
1043 2018-06-30  Jim Wilson  <jimw@sifive.com>
1045         * config/riscv/predicates.md (p2m1_shift_operand): New.
1046         (high_mask_shift_operand): New.
1047         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
1048         pattern using p2m1_shift_operand.
1049         (lshsi3_zero_extend_3+2): New combiner pattern using
1050         high_mask_shift_operand.
1052 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1054         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
1055         split out from...
1056         (vect_recog_rotate_pattern): ...here.
1057         (vect_convert_input): Try to insert casts of invariants in the
1058         preheader.
1059         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
1060         preheader to be empty.
1062 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1064         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
1065         vector type.  If given, install it in the new statement's
1066         STMT_VINFO_VECTYPE.
1067         (vect_element_precision): New function.
1068         (vect_unpromoted_value): New struct.
1069         (vect_unpromoted_value::vect_unpromoted_value): New function.
1070         (vect_unpromoted_value::set_op): Likewise.
1071         (vect_look_through_possible_promotion): Likewise.
1072         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
1073         (vect_widened_op_tree, vect_convert_input): Likewise.
1074         (vect_convert_inputs, vect_convert_output): Likewise.
1075         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
1076         to handle the optional cast of the multiplication result and
1077         vect_widened_op_tree to detect the widened multiplication itself.
1078         Do not require the input and output of promotion casts to have
1079         the same sign, but base the signedness of the operation on the
1080         input rather than the result.  If the pattern includes two
1081         promotions, check that those promotions have the same sign.
1082         Do not restrict the MULT_EXPR handling to a double-width result;
1083         handle quadruple-width results and wider.  Use vect_convert_inputs
1084         to convert the inputs to the common type.
1085         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
1086         to handle the optional cast of the ABS result.  Also allow a sign
1087         change or a sign extension between the ABS and MINUS.
1088         Use vect_widened_op_tree to detect the widened subtraction and use
1089         vect_convert_inputs to convert the inputs to the common type.
1090         (vect_handle_widen_op_by_const): Delete.
1091         (vect_recog_widen_op_pattern): New function.
1092         (vect_recog_widen_mult_pattern): Use it.
1093         (vect_recog_widen_shift_pattern): Likewise.
1094         (vect_recog_widen_sum_pattern): Use
1095         vect_look_through_possible_promotion to handle the promoted
1096         PLUS_EXPR operand.
1098 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1100         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
1101         the containing gimple_seq *.
1102         * gimple-iterator.h (gsi_for_stmt): Declare it.
1103         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
1104         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
1105         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
1106         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
1107         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
1108         checks.
1109         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
1110         split out from...
1111         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
1112         statement being replaced is part of an existing pattern
1113         definition sequence, inserting the new pattern statements before
1114         the original one.
1115         (vect_pattern_recog_1): Don't return a bool.  If the statement
1116         is already part of a pattern, instead apply pattern matching
1117         to the pattern definition statements.  Don't clear the
1118         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
1119         (vect_pattern_recog): Don't break after the first match;
1120         continue processing the pattern definition statements instead.
1121         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
1123 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1125         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
1126         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1127         (vect_recog_widen_sum_pattern): Use it.
1129 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1131         * tree-vect-loop.c (vectorizable_reduction): Assert that the
1132         phi is not a pattern statement and has not been replaced by
1133         a pattern statement.
1134         * tree-vect-patterns.c (type_conversion_p): Don't check
1135         STMT_VINFO_IN_PATTERN_P.
1136         (vect_recog_vector_vector_shift_pattern): Likewise.
1137         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
1138         the pattern statement rather than the original statement; check
1139         directly for a WIDEN_MULT_EXPR here.
1140         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
1141         vect_is_simple_use to return the pattern statement rather
1142         than the original statement; use is_pattern_stmt_p to check
1143         for such a pattern statement.
1144         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
1145         to return the pattern statement rather than the original statement;
1146         don't do the same transformation here.
1147         (vect_is_simple_use): If the defining statement has been replaced
1148         by a pattern statement, return the pattern statement instead.
1149         Remove the corresponding (local) transformation from the vectype
1150         overload.
1152 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
1154         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
1155         end and default to null.
1156         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1157         (vectorizable_reduction): Update calls accordingly, dropping the
1158         gimple ** argument if the passed-back statement isn't needed.
1159         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
1160         (vect_recog_rotate_pattern): Likewise.
1161         (vect_recog_mask_conversion_pattern): Likewise.
1162         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1163         (vect_mask_constant_operand_p): Likewise.
1164         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
1165         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
1166         (get_group_load_store_type, get_load_store_type): Likewise.
1167         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
1168         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
1169         (vectorizable_conversion, vectorizable_assignment): Likewise.
1170         (vectorizable_shift, vectorizable_operation): Likewise.
1171         (vectorizable_store, vect_is_simple_cond): Likewise.
1172         (vectorizable_condition, vectorizable_comparison): Likewise.
1173         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
1174         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
1175         and move it to the end.  Cope with null def_stmt_outs.
1177 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1179         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
1181 2018-06-29  Jeff Law  <law@redhat.com>
1183         * config/v850/v850.c (v850_legitimate_address_p): Handle large
1184         displacements for TARGET_V850E2V3 and newer.
1185         (TARGET_LRA_P): Remove.  Defaults to LRA now.
1186         * config/v850/v850.md (sign23byte_load): Remove.
1187         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
1188         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
1190 2018-06-29  Martin Liska  <mliska@suse.cz>
1192         PR lto/85759
1193         * coverage.c (coverage_init): Mangle full path name.
1194         * doc/invoke.texi: Document the change.
1195         * gcov-io.c (mangle_path): New.
1196         * gcov-io.h (mangle_path): Likewise.
1197         * gcov.c (mangle_name): Use mangle_path for path mangling.
1199 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1201         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
1202         if starting source register is not even.
1204 2018-06-29  Martin Liska  <mliska@suse.cz>
1206         PR tree-optimization/86263
1207         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
1208         Make edge redirection.
1210 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
1212         * dumpfile.c (dump_loc): Add indentation based on scope depth.
1213         (dump_scope_depth): New variable.
1214         (get_dump_scope_depth): New function.
1215         (dump_begin_scope): New function.
1216         (dump_end_scope): New function.
1217         * dumpfile.h (get_dump_scope_depth): New declaration.
1218         (dump_begin_scope): New declaration.
1219         (dump_end_scope): New declaration.
1220         (class auto_dump_scope): New class.
1221         (AUTO_DUMP_SCOPE): New macro.
1222         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
1223         AUTO_DUMP_SCOPE.
1225 2018-06-29  Richard Biener  <rguenther@suse.de>
1227         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
1228         compute_all_dependences succeeds.
1229         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
1230         exceed --param loop-max-datarefs-for-datadeps.
1232 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
1234         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
1236 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
1238         PR target/86348
1239         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
1240         alternative 0 in preferred_for_speed attribute.
1242 2018-06-28  Paul Koning  <ni1d@arrl.net>
1244         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1245         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1246         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1247         * config/pdp11/pdp11.md: Correct "length" attribute calculation
1248         for shift insn patterns.
1250 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
1252         * cgraph.c (cgraph_node::get_body): Replace assignments to
1253         "dump_file" with calls to set_dump_file.
1254         * dumpfile.c (alt_dump_file): Make static, and group with...
1255         (alt_flags): ...this definition.
1256         (dumps_are_enabled): New variable.
1257         (refresh_dumps_are_enabled): New function.
1258         (set_dump_file): New function.
1259         (set_alt_dump_file): New function.
1260         (gcc::dump_manager::dump_start): Replace assignments to
1261         "dump_file" and "alt_dump_file" with calls to set_dump_file and
1262         set_alt_dump_file.
1263         (gcc::dump_manager::dump_finish): Likewise.
1264         * dumpfile.h (alt_dump_file): Delete decl.
1265         (dumps_are_enabled): New variable decl.
1266         (set_dump_file): New function decl.
1267         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1268         global.
1269         * tree-nested.c (lower_nested_functions): Replace assignments to
1270         "dump_file" with calls to set_dump_file.
1272 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1274         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1275         goto_locus of each outgoing edge of each basic block.
1277 2018-06-28  Richard Biener  <rguenther@suse.de>
1279         * dwarf2out.c (decl_scope_table): Remove.
1280         (push_decl_scope): Likewise.
1281         (pop_decl_scope): Likewise.
1282         (gen_type_die_for_member): Do not call push/pop_decl_scope.
1283         (gen_struct_or_union_type_die): Likewise.
1284         (gen_tagged_type_die): Likewise.
1285         (dwarf2out_init): Do not initialize decl_scope_table.
1286         (dwarf2out_c_finalize): Do not free it.
1288 2018-06-28  Richard Biener  <rguenther@suse.de>
1290         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1291         deciding whether to not re-use a DIE.
1293 2018-06-28  Richard Biener  <rguenther@suse.de>
1295         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1296         DW_AT_abstract_origin attribute.
1298 2018-06-28  Martin Liska  <mliska@suse.cz>
1300         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1301         Use newly introduced constants.
1302         * tree-switch-conversion.h (struct jump_table_cluster):
1303         Define max_ratio_for_size and max_ratio_for_speed.
1305 2018-06-28  Martin Liska  <mliska@suse.cz>
1307         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1308         Add new checking assert to catch invalid state.
1309         (jump_table_cluster::can_be_handled): Handle single case
1310         clusters.
1311         (jump_table_cluster::is_beneficial): Bail out for such case.
1312         (bit_test_cluster::find_bit_tests):
1313         Add new checking assert to catch invalid state.
1314         (bit_test_cluster::can_be_handled): Handle single case
1315         clusters.
1316         (bit_test_cluster::is_beneficial): Bail out for such case.
1317         (switch_decision_tree::analyze_switch_statement):
1318         Fix comment.
1320 2018-06-28  Martin Liska  <mliska@suse.cz>
1322         * common.opt: Introduce -completion option.
1323         * gcc.c (driver_handle_option): Handle it.
1324         (driver::main): Print completions if completion
1325         is set.
1326         * opt-suggestions.c (option_proposer::get_completions):
1327         New function.
1328         (option_proposer::suggest_completion): Likewise.
1329         (option_proposer::find_param_completions): Likewise.
1330         (verify_autocompletions): Likewise.
1331         (test_completion_valid_options): Likewise.
1332         (test_completion_valid_params): Likewise.
1333         (in_completion_p): Likewise.
1334         (empty_completion_p): Likewise.
1335         (test_completion_partial_match): Likewise.
1336         (test_completion_garbage): Likewise.
1337         (opt_proposer_c_tests): Likewise.
1338         * opt-suggestions.h: Declare new functions.
1339         * opts.c (common_handle_option): Handle OPT__completion_.
1340         * selftest-run-tests.c (selftest::run_tests): Add
1341         opt_proposer_c_tests.
1342         * selftest.c (assert_str_startswith): New.
1343         * selftest.h (assert_str_startswith): Likewise.
1344         (opt_proposer_c_tests): New.
1345         (ASSERT_STR_STARTSWITH): Likewise.
1347 2018-06-28  Martin Liska  <mliska@suse.cz>
1349         * Makefile.in: Add opt-suggestions.o.
1350         * gcc-main.c: Include opt-suggestions.h.
1351         * gcc.c (driver::driver): Likewise.
1352         (driver::~driver): Remove m_option_suggestions.
1353         (driver::build_option_suggestions): Moved to option_proposer.
1354         (driver::suggest_option): Likewise.
1355         (driver::handle_unrecognized_options): Use option_proposer.
1356         * gcc.h (class driver): Add new memver m_option_proposer.
1357         * opt-suggestions.c: New file.
1358         * opt-suggestions.h: New file.
1360 2018-06-28  Martin Liska  <mliska@suse.cz>
1362         * vec.h (class auto_string_vec): New (moved from auto_argvec).
1363         (auto_string_vec::~auto_string_vec): Likewise.
1365 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
1367         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1368         prevent_decl_creation_for_types fields up and add reset_location field.
1369         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1370         statement if id->reset_location is true.
1371         (copy_edges_for_bb): Do not set goto_locus on the new edges if
1372         id->reset_location is true.
1373         (copy_phis_for_bb): Force input_location on the arguments if
1374         id->reset_location is true.
1375         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1376         is set on the function to be inlined.
1378 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
1380         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1382 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
1384         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1385         registers for Pmode.
1386         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1387         hard registers for the clobbered pseudo.
1389 2018-06-27  Paul Koning  <ni1d@arrl.net>
1391         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1392         mutually exclusive options.
1393         * config/pdp11/constraints.md (h): New constraint.
1394         (O): Update definition to match shift code generation.
1395         (D): New constraint.
1396         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1397         (CCFP): Remove.
1398         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1399         function.
1400         (output_jump): Change arguments.
1401         (pdp11_fixed_cc_regs): New function.
1402         (pdp11_cc_mode): Ditto.
1403         (pdp11_expand_shift): Ditto.
1404         (pdp11_assemble_shift): Ditto.
1405         (pdp11_small_shift): Ditto.
1406         (pdp11_branch_cost): Remove.
1407         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1408         from output.
1409         (pdp11_register_move_cost): Update for CC registers.
1410         (pdp11_rtx_costs): Add case for LSHIFTRT.
1411         (pdp11_output_jump): Add CCNZ mode conditional branches.
1412         (notice_update_cc_on_set): Remove.
1413         (pdp11_cc_mode): New function.
1414         (simple_memory_operand): Correct pre/post decrement case.
1415         (no_side_effect_operand): New function.
1416         (pdp11_regno_reg_class): Add CC_REGS class.
1417         (pdp11_fixed_cc_regs): New function.
1418         (pdp11_small_shift): New function.
1419         (pdp11_expand_shift): New function to expand shift insns.
1420         (pdp11_assemble_shift): New function to output shifts.
1421         (pdp11_branch_cost): Remove.
1422         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1423         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1424         (WCHAR_TYPE): Ditto.
1425         (PTRDIFF_TYPE): Ditto.
1426         (ADJUST_INSN_LENGTH): New macro.
1427         (FIXED_REGISTERS): Add CC registers.
1428         (CALL_USED_REGISTERS): Ditto.
1429         (reg_class): Ditto.
1430         (REG_CLASS_NAMES): Ditto.
1431         (REG_CLASS_CONTENTS): Ditto.
1432         (SELECT_CC_MODE): Use new function.
1433         (TARGET_FLAGS_REGNUM): New macro.
1434         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1435         (cc0_reg_rtx): Remove.
1436         (CC_STATUS_MDEP): Remove.
1437         (CC_STATUS_MDEFP_INIT): Remove.
1438         (CC_IN_FPU): Remove.
1439         (NOTICE_UPDATE_CC): Remove.
1440         (REGISTER_NAMES): Add CC registers.
1441         (BRANCH_COST): Change to constant 1.
1442         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1443         handling.
1444         * config/pdp11/pdp11.opt (mbcopy): Remove.
1445         (mbcopy-builtin): Remove.
1446         (mbranch-cheap): Remove.
1447         (mbranch-expensive): Remove.
1448         * config/pdp11/predicates.md (expand_shift_operand): Update to
1449         match shift code generation.
1450         (ccnz_operator): New predicate.
1451         * doc/invoke.texi (PDP-11 Options): Remove deleted options
1452         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
1453         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
1454         exclusive options.
1455         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
1456         description of O constraint.
1458 2018-06-27  Jeff Law  <law@redhat.com>
1459             Austin Law  <austinklaw@gmail.com>
1461         * config/v850/v850.md (addsi3_set_flags): New pattern.
1462         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
1463         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
1464         (zero_extendhisi2_v850_set_flags): Likewise.
1465         (zero_extendqisi2_v850_set_flags): Likewise.
1466         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
1467         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
1468         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
1470         * config/v850/v850-protos.h (notice_update_cc): Remove.
1471         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
1472         (v850_print_operand): Handle 'D' and "d".
1473         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
1474         Add handling of arithmetic/logical operations compared against zero.
1475         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
1476         Do not look at v850_compare_op, instead get mode from last argument.
1477         (v850_gen_compare): Remove
1478         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
1479         after reload for prologue insns.
1480         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
1481         patterns.
1482         (construct_save_jarl): Likewise.
1483         (TARGET_FLAGS_REGNUM): Define.
1484         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
1485         (NOTICE_UPDATE_CC): Remove.
1486         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
1487         than cc0.  Conditionalize on reload_completed.
1488         (cmpsi_insn, setfcc_insn): Likewise.
1489         (tst1 splitter): Turn into define_and_split which sets the flags
1490         after reload.
1491         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
1492         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
1493         (cstoresf4, cstoredf4): Clobber the flags.
1494         (cmpsi, cmpsf, cmpdf): Remove expanders.
1495         (setf_insn): Remove pattern.
1496         (addsi3): Turn into define_and_split which clobbers the flags after
1497         reload and a suitable pattern (addsi3_clobber_flags) for use after
1498         reload.
1499         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
1500         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
1501         (ashrsi3, ashrsi3_v850e2): Likewise.
1502         (bins): Clobber the flags.
1503         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
1504         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
1505         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
1506         (call_value_internal_short, call_value_internal_long): Likewise.
1507         (callt_save_interrupt, callt_return_interrupt): Likewise.
1508         (save_interrupt, return_interrupt): Likewise.
1509         (callt_save_all_interrupt, save_all_interrupt): Likewise.
1510         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
1511         (restore_all_interrupt, _restore_all_interrupt): Likewise.
1512         (All FP comparisons): Only allow after reload has completed.
1513         (trfsr): Likewise.
1514         (divh, divhu): Tweak output template.
1515         (branch_z_normal, branch_z_invert): Remove
1516         (branch_nz_normal, branch_nz_invert): Likewise.
1517         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
1519         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
1520         * config/v850/v850.c (notice_update_cc): Remove.
1521         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
1522         (CC_NO_CARRY): Likewise.
1523         (NOTICE_UPDATE_CC): Define to nothing.
1524         * config/v850/v850.md: Remove block comment on cc0 handling
1525         Remove "cc" attribute from all patterns.  Remove cc_status handling
1526         from all patterns.  Minor formatting fixes.
1528 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1530         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
1531         (cortex-a76.cortex-a55): Likewise.
1532         * config/aarch64/aarch64-tune.md: Regenerate.
1533         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
1534         cortex-a76.cortex-a55.
1536 2018-06-27  Jeff Law  <law@redhat.com>
1538         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
1539         (MULTILIB_DIRNAMES): Similarly.
1541 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
1543         * gimple.h (gimple_return_retbnd): Delete.
1544         (gimple_return_set_retbnd): Likewise.
1545         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
1546         gimple_return_set_retbnd.
1547         * gimple-pretty-print.c (dump_gimple_return): Remove call to
1548         gimple_return_retbnd and adjust.
1549         * tree-inline.h (struct copy_body_data): Remove retbnd field.
1550         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
1551         Explicitly return NULL in a couple more cases.  Move assertion
1552         on debug statements and remove unreachable code.
1553         (reset_debug_binding): Do not test id->retbnd.
1554         (expand_call_inline): Do not set it.
1556 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1558         * configure.ac: Add --disable-gcov option.
1559         * configure: Regenerate.
1560         * Makefile.in: Honour @enable_gcov@.
1561         * doc/install.texi: Document --disable-gcov.
1563 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1565         * config/arm/arm-cpus.in (cortex-a76): New entry.
1566         (cortex-a76.cortex-a55): Likewise.
1567         * config/arm/arm-tables.opt: Regenerate.
1568         * config/arm/arm-tune.md: Likewise.
1569         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
1570         * doc/invoke.texi (ARM Options): Document cortex-a76 and
1571         cortex-a76.cortex-a55.
1573 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
1575         PR target/85769
1576         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
1578 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1580         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
1581         comment.
1582         (EPILOGUE_USES): Likewise.
1584 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
1586         * tree-inline.c (remap_location): New function extracted from...
1587         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
1588         (copy_phis_for_bb): ...here.  Call remap_location.
1589         (copy_cfg_body): Adjust call to copy_edges_for_bb.
1591 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
1593         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
1594         unaligned vsx for 16B memset.
1596 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
1598         PR target/86285
1599         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
1600         ieee128_float_type_node to long_double_type_node unless
1601         TARGET_LONG_DOUBLE_128 is set.
1603 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
1605         * cfgloop.c (get_loop_location): Convert return type from
1606         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
1607         by implicit construction from rtx_insn *, and using
1608         dump_user_location_t::from_function_decl for the fallback case.
1609         * cfgloop.h (get_loop_location): Convert return type from
1610         location_t to dump_user_location_t.
1611         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
1612         dump_printf_loc to pass in a dump_location_t rather than a
1613         location_t, via the gimple stmt.
1614         * coverage.c (get_coverage_counts): Update calls to
1615         dump_printf_loc to pass in dump_location_t rather than a
1616         location_t.
1617         * doc/optinfo.texi (Dump types): Convert example of
1618         dump_printf_loc from taking "locus" to taking "insn".  Update
1619         description of the "_loc" calls to cover dump_location_t.
1620         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
1621         "selftest.h".
1622         (dump_user_location_t::dump_user_location_t): New constructors,
1623         from gimple *stmt and rtx_insn *.
1624         (dump_user_location_t::from_function_decl): New function.
1625         (dump_loc): Make static.
1626         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
1627         const dump_location_t &.
1628         (dump_generic_expr_loc): Delete.
1629         (dump_printf_loc): Convert param "loc" from location_t to
1630         const dump_location_t &.
1631         (selftest::test_impl_location): New function.
1632         (selftest::dumpfile_c_tests): New function.
1633         * dumpfile.h: Include "profile-count.h".
1634         (class dump_user_location_t): New class.
1635         (struct dump_impl_location_t): New struct.
1636         (class dump_location_t): New class.
1637         (dump_printf_loc): Convert 2nd param from source_location to
1638         const dump_location_t &.
1639         (dump_generic_expr_loc): Delete.
1640         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
1641         const dump_location_t &.
1642         * gimple-fold.c (fold_gimple_assign): Update call to
1643         dump_printf_loc to pass in a dump_location_t rather than a
1644         location_t, via the gimple stmt.
1645         (gimple_fold_call): Likewise.
1646         * gimple-loop-interchange.cc
1647         (loop_cand::analyze_iloop_reduction_var): Update for change to
1648         check_reduction_path.
1649         (tree_loop_interchange::interchange): Update for change to
1650         find_loop_location.
1651         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
1652         change in return-type of find_loop_location.
1653         (graphite_regenerate_ast_isl): Likewise.
1654         * graphite-optimize-isl.c (optimize_isl): Likewise.
1655         * graphite.c (graphite_transform_loops): Likewise.
1656         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
1657         pass in a dump_location_t rather than a location_t, via the
1658         gimple stmt.
1659         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1660         * ipa.c (walk_polymorphic_call_targets): Likewise.
1661         * loop-unroll.c (report_unroll): Convert "locus" param from
1662         location_t to dump_location_t.
1663         (decide_unrolling): Update for change to get_loop_location's
1664         return type.
1665         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
1666         location_t to dump_user_location_t.
1667         (grid_find_single_omp_among_assignments_1): Updates calls to
1668         dump_printf_loc to pass in a dump_location_t rather than a
1669         location_t, via the gimple stmt.
1670         (grid_parallel_clauses_gridifiable): Convert "tloc" from
1671         location_t to dump_location_t.  Updates calls to dump_printf_loc
1672         to pass in a dump_location_t rather than a location_t, via the
1673         gimple stmt.
1674         (grid_inner_loop_gridifiable_p): Likewise.
1675         (grid_dist_follows_simple_pattern): Likewise.
1676         (grid_gfor_follows_tiling_pattern): Likewise.
1677         (grid_target_follows_gridifiable_pattern): Likewise.
1678         (grid_attempt_target_gridification): Convert initialization
1679         of local "grid" from memset to zero-initialization; FIXME: does
1680         this require C++11?  Update call to dump_printf_loc to pass in a
1681         optinfo_location rather than a location_t, via the gimple stmt.
1682         * profile.c (read_profile_edge_counts): Updates call to
1683         dump_printf_loc to pass in a dump_location_t rather than a
1684         location_t
1685         (compute_branch_probabilities): Likewise.
1686         * selftest-run-tests.c (selftest::run_tests): Call
1687         dumpfile_c_tests.
1688         * selftest.h (dumpfile_c_tests): New decl.
1689         * tree-loop-distribution.c (pass_loop_distribution::execute):
1690         Update for change in return type of find_loop_location.
1691         * tree-parloops.c (parallelize_loops): Likewise.
1692         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
1693         "locus" from location_t to dump_user_location_t.
1694         (canonicalize_loop_induction_variables): Likewise.
1695         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
1696         for change in return type of find_loop_location.
1697         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
1698         to dump_printf_loc to pass in a dump_location_t rather than a
1699         location_t, via the stmt.
1700         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
1701         Likewise.
1702         * tree-vect-loop-manip.c (find_loop_location): Convert return
1703         type from source_location to dump_user_location_t.
1704         (vect_do_peeling): Update for above change.
1705         (vect_loop_versioning): Update for change in type of
1706         vect_location.
1707         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
1708         from location_t to dump_user_location_t.
1709         (vect_estimate_min_profitable_iters): Update for change in type
1710         of vect_location.
1711         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
1712         location_t to dump_location_t.
1713         (vect_slp_bb): Update for change in type of vect_location.
1714         * tree-vectorizer.c (vect_location): Convert from source_location
1715         to dump_user_location_t.
1716         (try_vectorize_loop_1): Update for change in vect_location's type.
1717         (vectorize_loops): Likewise.
1718         (increase_alignment): Likewise.
1719         * tree-vectorizer.h (vect_location): Convert from source_location
1720         to dump_user_location_t.
1721         (find_loop_location): Convert return type from source_location to
1722         dump_user_location_t.
1723         (check_reduction_path): Convert 1st param from location_t to
1724         dump_user_location_t.
1725         * value-prof.c (check_counter): Update call to dump_printf_loc to
1726         pass in a dump_user_location_t rather than a location_t; update
1727         call to error_at for change in type of "locus".
1728         (check_ic_target): Update call to dump_printf_loc to
1729         pass in a dump_user_location_t rather than a location_t, via the
1730         call_stmt.
1732 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
1734         * config/s390/s390.h (enum processor_flags): Do not use
1735         default tune parameter when -march was specified.
1737 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
1739         PR target/86314
1740         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
1741         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
1742         operands.
1744 2018-06-26  Richard Biener  <rguenther@suse.de>
1746         PR tree-optimization/86287
1747         PR bootstrap/86316
1748         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
1749         (vect_analyze_loop): Initialize n_stmts.
1751 2018-06-26  Richard Biener  <rguenther@suse.de>
1753         PR middle-end/86271
1754         * fold-const.c (fold_convertible_p): Pointer extension
1755         isn't valid.
1757 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
1759         PR debug/86064
1760         * dwarf2out.c (loc_list_has_views): Adjust comments.
1761         (dw_loc_list): Split single cross-partition range with
1762         nonzero locview.
1764 2018-06-25  Jeff Law  <law@redhat.com>
1766         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
1767         on -mbig-switch by default.
1769         * config/v850/predicates.md (const_float_1_operand): Fix match_code
1770         test.
1771         (const_float_0_operand): Remove unused predicate.
1772         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
1773         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
1774         (recipsf2): New expander.  Original pattern now called
1775         (recipsf2_insn).
1776         (recipdf2, recipdf2_insn): Similarly.
1777         (rsqrtsf2, rsqrtsf2_insn): Similarly
1778         (rsqrtdf2, rsqrtdf2_insn): Similarly
1780 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
1782         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
1783         Simplify logic for FreeBSD (twice).
1785 2018-06-25  Martin Sebor  <msebor@redhat.com>
1787         PR tree-optimization/86204
1788         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
1789         a strnlen result if it's less than the length of the string.
1791 2018-06-25  Martin Sebor  <msebor@redhat.com>
1793         PR tree-optimization/85700
1794         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
1795         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
1796         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
1798 2018-06-25  Martin Sebor  <msebor@redhat.com>
1800         * doc/extend.texi (Zero-length arrays): Update and clarify.
1802 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
1804         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
1805         added IEEE/IBM long double multilib support on PowerPC little
1806         endian Linux systems.
1807         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
1808         (MULTILIB_DEFAULTS): Likewise.
1809         * config/rs6000/rs6000.c (rs6000_option_override_internal):
1810         Likewise.
1811         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
1812         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
1813         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
1815 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
1817         PR middle-end/86311
1818         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
1819         (REORDER_45): Likewise.
1821 2018-06-25  Jeff Law  <law@redhat.com>
1823         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
1824         dividend to 32 bits.  Adjust length.
1825         (udivmodhi4): Cleanup output template.  Fix length.
1827 2018-06-25  Carl Love  <cel@us.ibm.com>
1829         * config/rs6000/vsx.md: Change word selector to prefered location.
1831 2018-06-25  Richard Biener  <rguenther@suse.de>
1833         PR tree-optimization/86304
1834         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
1835         epilogue-if-converted loops as well.
1837 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
1839         * lto-section-out.c (lto_begin_section): Do not print section
1840         name for noaddr and unnumbered dumps.
1842 2018-06-25  Richard Biener  <rguenther@suse.de>
1844         * tree-vectorizer.h (struct vec_info_shared): New structure
1845         with parts split out from struct vec_info and loop_nest from
1846         struct _loop_vec_info.
1847         (struct vec_info): Adjust accordingly.
1848         (struct _loop_vec_info): Likewise.
1849         (LOOP_VINFO_LOOP_NEST): Adjust.
1850         (LOOP_VINFO_DATAREFS): Likewise.
1851         (LOOP_VINFO_DDRS): Likewise.
1852         (struct _bb_vec_info): Likewise.
1853         (BB_VINFO_DATAREFS): Likewise.
1854         (BB_VINFO_DDRS): Likewise.
1855         (struct _stmt_vec_info): Add dr_aux member.
1856         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
1857         (DR_MISALIGNMENT_UNINITIALIZED): New.
1858         (set_dr_misalignment): Adjust.
1859         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
1860         (vect_analyze_loop): Adjust prototype.
1861         (vect_analyze_loop_form): Likewise.
1862         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1863         Compute dependences lazily.
1864         (vect_record_base_alignments): Use shared datarefs/ddrs.
1865         (vect_verify_datarefs_alignment): Likewise.
1866         (vect_analyze_data_refs_alignment): Likewise.
1867         (vect_analyze_data_ref_accesses): Likewise.
1868         (vect_analyze_data_refs): Likewise.
1869         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
1870         constructor parameter for shared part.
1871         (vect_analyze_loop_form): Pass in shared part and adjust.
1872         (vect_analyze_loop_2): Pass in storage for the number of
1873         stmts.  Move loop nest finding to the caller.  Compute
1874         datarefs lazily.
1875         (vect_analyze_loop): Pass in shared part.
1876         (vect_transform_loop): Verify shared datarefs are unchanged.
1877         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
1878         constructor parameter for shared part.
1879         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
1880         (vect_slp_bb): Verify shared datarefs are unchanged before
1881         transform.
1882         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
1883         change.
1884         (new_stmt_vec_info): Initialize DR_AUX misalignment to
1885         DR_MISALIGNMENT_UNINITIALIZED.
1886         * tree-vectorizer.c (vec_info::vec_info): Add constructor
1887         parameter for shared part.
1888         (vec_info::~vec_info): Adjust.
1889         (vec_info_shared::vec_info_shared): New.
1890         (vec_info_shared::~vec_info_shared): Likewise.
1891         (vec_info_shared::save_datarefs): Likewise.
1892         (vec_info_shared::check_datarefs): Likewise.
1893         (try_vectorize_loop_1): Construct shared part live for analyses
1894         of a single loop for multiple vector sizes.
1895         * tree-parloops.c (gather_scalar_reductions): Adjust.
1897 2018-06-25  Richard Biener  <rguenther@suse.de>
1899         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
1900         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
1901         (vect_analyze_data_refs): Remove similar code from here and
1902         simplify accordingly.
1904 2018-06-25  Richard Biener  <rguenther@suse.de>
1906         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
1907         for reverse storage order accesses rather than asserting
1908         they cannot happen here.
1910 2018-06-25  Tom de Vries  <tdevries@suse.de>
1912         PR debug/86257
1913         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
1914         Use data16 instead of .byte for insn prefix.
1916 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
1918         PR C++/86082
1919         * parser.c (make_char_string_pack): Pass this literal chars
1920         through cpp_interpret_string.
1921         (cp_parser_userdef_numeric_literal): Check the result of
1922         make_char_string_pack.
1924 2018-06-24  Maya Rashish  <coypu@sdf.org>
1926         * ginclude/stddef.h: Simplify conditions around avoiding
1927         re-definition of __size_t.
1929 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1931         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
1932         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
1934 2018-06-22  Maya Rashish  <coypu@sdf.org>
1936         * doc/invoke.texi (mno-fancy-math-387): Update for changes
1937         made to OpenBSD and NetBSD through the years.
1939 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1941         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1942         behavior of vec_pack (vector double, vector double) to match
1943         behavior of vec_float2 (vector double, vector double).
1945 2018-06-22  Olivier Hainque  <hainque@adacore.com>
1947         * gimplify.c (gimplify_function_tree): Prevent creation
1948         of a trampoline for the address of the current function
1949         passed to entry/exit instrumentation hooks.
1951 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
1953         PR target/86222
1954         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
1955         correctly.
1957 2018-06-22  Martin Liska  <mliska@suse.cz>
1959         PR tree-optimization/86263
1960         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1961         Bail out if is_enabled is false.
1962         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
1963         New declaration.
1964         (jump_table_cluster::is_enabled): New function.
1966 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1968         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1969         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
1970         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
1971         (lto_input_ts_binfo_tree_pointers): Likewise.
1972         * tree-streamer-out.c (streamer_write_tree_bitfields,
1973         write_ts_binfo_tree_pointers): Likewise.
1974         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
1976 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
1978         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
1980 2018-06-22  Martin Liska  <mliska@suse.cz>
1982         * symbol-summary.h (get): Make it pure and inline move
1983         functionality from ::get function.
1984         (get): Remove and inline into ::get and ::get_create.
1985         (get_create): Move code from ::get function.
1987 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1989         PR target/85994
1990         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
1991         -x assembler-with-cpp.
1993 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1995         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
1996         _FILE_OFFSET_BITS=64 for C++.
1998 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
2000         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
2001         conversion insn that shows up when pr85657-3.c is compiled using
2002         IEEE 128-bit long double.
2003         (neg<mode>2_internal): Use the correct mode to check whether the
2004         mode is IBM extended.
2005         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
2006         multiply and divide external functions from being created more
2007         than once.
2009 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2011         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
2012         functions.
2013         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
2014         the edge can be forwarded.
2015         (cfg_layout_merge_blocks): Likewise.
2017 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2019         * except.c (finish_eh_generation): Commit edge insertions only after
2020         the EH edges have been redirected from post-landing to landing pads.
2022 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2024         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
2025         create_tmp_var_for to create the FRAME decl.
2026         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
2028 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
2030         * tree-inline.c (copy_edges_for_bb): Minor tweak.
2031         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
2032         debug statement when resetting its value.
2033         (expand_call_inline): Copy the locus of the call onto the assignment
2034         of the return value, if any.  Use local variable in more cases.
2036 2018-06-21  Martin Liska  <mliska@suse.cz>
2038         * ipa-pure-const.c (propagate_nothrow): Use
2039         funct_state_summaries->get.
2040         (dump_malloc_lattice): Likewise.
2041         (propagate_malloc): Likewise.
2043 2018-06-21  Richard Biener  <rguenther@suse.de>
2045         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
2046         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
2047         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
2048         comment.
2049         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
2050         BLOCK_ABSTRACT_ORIGIN unconditionally.
2052 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
2054         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
2055         deleting it.
2056         * ipa-reference.c (ipa_reference_c_finalize): Delete
2057         ipa_ref_opt_sum_summaries and set it to NULL.
2059 2018-06-21  Tom de Vries  <tdevries@suse.de>
2061         PR tree-optimization/85859
2062         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2063         test with comment from bb_no_side_effects_p.
2065 2018-06-21  Richard Biener  <rguenther@suse.de>
2067         PR tree-optimization/86232
2068         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
2069         max for constant niter.
2071 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2073         * config/aarch64/aarch64-simd.md
2074         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2076 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2078         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
2079         Make opernads of the unspec commutative.
2081 2018-06-21  Richard Biener  <rguenther@suse.de>
2083         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
2084         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
2085         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
2086         (vect_analyze_data_ref_dependence): Re-order checks to deal with
2087         NULL DR_STEP.
2088         (vect_record_base_alignments): Do not record base alignment
2089         for gathers or scatters.
2090         (vect_compute_data_ref_alignment): Drop return value that is always
2091         true.  Bail out early for gathers or scatters.
2092         (vect_enhance_data_refs_alignment): Bail out early for gathers
2093         or scatters.
2094         (vect_find_same_alignment_drs): Likewise.
2095         (vect_analyze_data_refs_alignment): Remove dead code.
2096         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2097         (vect_analyze_data_refs): For possible gathers or scatters do
2098         not create an alternate DR, just check their possible validity
2099         and mark them.  Adjust DECL_NONALIASED handling to not rely
2100         on DR_BASE_ADDRESS.
2101         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
2102         update inits of gathers or scatters.
2103         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
2104         Also copy gather/scatter flag to pattern vinfo.
2106 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2108         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
2109         behavior of vec_packsu (vector unsigned long long, vector unsigned
2110         long long) to match behavior of vec_packs with same signature.
2112 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
2113             Thomas Schwinge <thomas@codesourcery.com>
2114             Cesar Philippidis  <cesar@codesourcery.com>
2116         * gimplify.c (gimplify_scan_omp_clauses): Add support for
2117         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2118         (gimplify_adjust_omp_clauses): Likewise.
2119         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
2120         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
2121         (gimplify_omp_target_update): Update handling of acc update and
2122         enter/exit data.
2123         * omp-low.c (install_var_field): Remove unused parameter
2124         base_pointers_restrict.
2125         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
2126         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
2127         FINALIZE}
2128         (omp_target_base_pointers_restrict_p): Delete.
2129         (scan_omp_target): Update call to scan_sharing_clauses.
2130         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
2131         FINALIZE}.
2132         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2133         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
2134         (convert_local_omp_clauses): Likewise.
2135         * tree-pretty-print.c (dump_omp_clause): Likewise.
2136         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
2137         FINALIZE}.
2138         (omp_clause_code_name): Likewise.
2140 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
2142         PR debug/86194
2143         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
2144         be narrowed.
2146         PR tree-optimization/86231
2147         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
2148         anti-range don't overwrite *vr0min before using it to compute *vr0max.
2150 2018-06-20  Tom de Vries  <tdevries@suse.de>
2152         PR tree-optimization/86097
2153         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
2154         iv type if signedness of iv type is not the same as that of *nit.
2156 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
2158         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
2159         EDGE_EH edges, verify they are all EDGE_EH.
2161 2018-06-20  Maya Rashish  <coypu@sdf.org>
2163         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
2165 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2167         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
2168         * config/aarch64/aarch64.c (xgene1_tunings): Add
2169         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
2170         (aarch64_mode_valid_for_sched_fusion_p):
2171         Allow 16-byte modes.
2172         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
2173         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
2174         128-bit modes.
2175         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
2176         New pattern.
2177         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
2178         * config/aarch64/iterators.md (VQ2): New mode iterator.
2180 2018-06-20  Martin Liska  <mliska@suse.cz>
2182         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
2183         Change default ratio from 10 to 8.
2185 2018-06-20  Martin Liska  <mliska@suse.cz>
2187         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
2188         New.
2189         (bit_test_cluster::find_bit_tests): Likewise.
2190         (switch_decision_tree::analyze_switch_statement): Find clusters.
2191         * tree-switch-conversion.h (struct jump_table_cluster): Document
2192         hierarchy.
2194 2018-06-20  Martin Liska  <mliska@suse.cz>
2196         * tree-switch-conversion.c (switch_conversion::collect):
2197         Record m_uniq property.
2198         (switch_conversion::expand): Bail out for special conditions.
2199         (group_cluster::~group_cluster): New.
2200         (group_cluster::group_cluster): Likewise.
2201         (group_cluster::dump): Likewise.
2202         (jump_table_cluster::emit): New.
2203         (switch_decision_tree::fix_phi_operands_for_edges): New.
2204         (struct case_node): Remove struct.
2205         (jump_table_cluster::can_be_handled): New.
2206         (case_values_threshold): Moved to header.
2207         (reset_out_edges_aux): Likewise.
2208         (jump_table_cluster::is_beneficial): New.
2209         (bit_test_cluster::can_be_handled): Likewise.
2210         (add_case_node): Remove.
2211         (bit_test_cluster::is_beneficial): New.
2212         (case_bit_test::cmp): New.
2213         (bit_test_cluster::emit): New.
2214         (expand_switch_as_decision_tree_p): Remove.
2215         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
2216         (fix_phi_operands_for_edge): Likewise.
2217         (switch_decision_tree::analyze_switch_statement): New.
2218         (compute_cases_per_edge): Move ...
2219         (switch_decision_tree::compute_cases_per_edge): ... here.
2220         (try_switch_expansion): Likewise.
2221         (switch_decision_tree::try_switch_expansion): Likewise.
2222         (record_phi_operand_mapping): Likewise.
2223         (switch_decision_tree::record_phi_operand_mapping): Likewise.
2224         (emit_case_decision_tree): Likewise.
2225         (switch_decision_tree::emit): Likewise.
2226         (balance_case_nodes): Likewise.
2227         (switch_decision_tree::balance_case_nodes): Likewise.
2228         (dump_case_nodes): Likewise.
2229         (switch_decision_tree::dump_case_nodes): Likewise.
2230         (emit_jump): Likewise.
2231         (switch_decision_tree::emit_jump): Likewise.
2232         (emit_cmp_and_jump_insns): Likewise.
2233         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2234         (emit_case_nodes): Likewise.
2235         (switch_decision_tree::emit_case_nodes): Likewise.
2236         (conditional_probability): Remove.
2237         * tree-switch-conversion.h (enum cluster_type): New.
2238         (PRINT_CASE): New.
2239         (struct cluster): Likewise.
2240         (cluster::cluster): Likewise.
2241         (struct simple_cluster): Likewise.
2242         (simple_cluster::simple_cluster): Likewise.
2243         (struct group_cluster): Likewise.
2244         (struct jump_table_cluster): Likewise.
2245         (struct bit_test_cluster): Likewise.
2246         (struct min_cluster_item): Likewise.
2247         (struct case_tree_node): Likewise.
2248         (case_tree_node::case_tree_node): Likewise.
2249         (jump_table_cluster::case_values_threshold): Likewise.
2250         (struct case_bit_test): Likewise.
2251         (struct switch_decision_tree): Likewise.
2252         (struct switch_conversion): Likewise.
2253         (switch_decision_tree::reset_out_edges_aux): Likewise.
2255 2018-06-20  Martin Liska  <mliska@suse.cz>
2257         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2258         (hoist_edge_and_branch_if_true): Likewise.
2259         (expand_switch_using_bit_tests_p): Likewise.
2260         (struct case_bit_test): Likewise.
2261         (case_bit_test_cmp): Likewise.
2262         (emit_case_bit_tests): Likewise.
2263         (switch_conversion::switch_conversion): New class.
2264         (struct switch_conv_info): Remove old struct.
2265         (collect_switch_conv_info): More to ...
2266         (switch_conversion::collect): ... this.
2267         (check_range): Likewise.
2268         (switch_conversion::check_range): Likewise.
2269         (check_all_empty_except_final): Likewise.
2270         (switch_conversion::check_all_empty_except_final): Likewise.
2271         (check_final_bb): Likewise.
2272         (switch_conversion::check_final_bb): Likewise.
2273         (create_temp_arrays): Likewise.
2274         (switch_conversion::create_temp_arrays): Likewise.
2275         (free_temp_arrays): Likewise.
2276         (gather_default_values): Likewise.
2277         (switch_conversion::gather_default_values): Likewise.
2278         (build_constructors): Likewise.
2279         (switch_conversion::build_constructors): Likewise.
2280         (constructor_contains_same_values_p): Likewise.
2281         (switch_conversion::contains_same_values_p): Likewise.
2282         (array_value_type): Likewise.
2283         (switch_conversion::array_value_type): Likewise.
2284         (build_one_array): Likewise.
2285         (switch_conversion::build_one_array): Likewise.
2286         (build_arrays): Likewise.
2287         (switch_conversion::build_arrays): Likewise.
2288         (gen_def_assigns): Likewise.
2289         (switch_conversion::gen_def_assigns): Likewise.
2290         (prune_bbs): Likewise.
2291         (switch_conversion::prune_bbs): Likewise.
2292         (fix_phi_nodes): Likewise.
2293         (switch_conversion::fix_phi_nodes): Likewise.
2294         (gen_inbound_check): Likewise.
2295         (switch_conversion::gen_inbound_check): Likewise.
2296         (process_switch): Use the newly created class.
2297         (switch_conversion::expand): New.
2298         (switch_conversion::~switch_conversion): New.
2299         * tree-switch-conversion.h: New file.
2301 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2303         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2304         tree-vect-patterns.c.
2305         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2306         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
2307         (vect_recog_sad_pattern): Likewise.
2308         (vect_recog_widen_sum_pattern): Likewise.
2309         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
2310         (vect_recog_widen_shift_pattern): Remove the type_in argument.
2311         (vect_recog_rotate_pattern): Likewise.
2312         (vect_recog_mult_pattern): Likewise.
2313         (vect_recog_vector_vector_shift_pattern): Likewise.
2314         (vect_recog_divmod_pattern): Likewise.
2315         (vect_recog_mixed_size_cond_pattern): Likewise.
2316         (vect_recog_bool_pattern): Likewise.
2317         (vect_recog_mask_conversion_pattern): Likewise.
2318         (vect_try_gather_scatter_pattern): Likewise.
2319         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
2320         (vect_recog_over_widening_pattern): Likewise.
2321         (vect_recog_gather_scatter_pattern): Likewise.
2322         (vect_recog_func_ptr): Move from tree-vectorizer.h
2323         (vect_vect_recog_func_ptrs): Move further down the file.
2324         (vect_recog_func): Likewise.  Remove the third argument.
2325         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2326         (vect_pattern_recog_1): Expect the pattern function to do any
2327         necessary target tests.  Also expect it to provide a vector type.
2328         Remove the type_in handling.
2330 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2332         * tree-vect-patterns.c (vect_pattern_detected): New function.
2333         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2334         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2335         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2336         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2337         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2338         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2339         (vect_recog_mask_conversion_pattern)
2340         (vect_try_gather_scatter_pattern): Likewise.
2342 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2344         * tree-vect-patterns.c (vect_get_internal_def): New function.
2345         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2346         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2347         (search_type_for_mask_1): Use it.
2349 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2351         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2352         redundant WIDEN_SUM_EXPR handling.
2353         (vect_recog_sad_pattern): Likewise.
2355 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2357         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2358         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2359         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2360         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2361         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2363 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2365         * tree-vect-stmts.c (vectorizable_call): Make sure that we
2366         use the stmt_vec_info of the original bb statement for the
2367         new zero assignment, even if the call is part of a pattern.
2369 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2371         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2372         that the sequence is attached to the original statement rather
2373         than the pattern statement.
2374         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2375         PATTERN_DEF_SEQ from the original statement rather than
2376         the main pattern statement.
2377         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2378         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2379         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2381 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
2383         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2384         definition statements before the early exit for statements that aren't
2385         live or relevant.
2386         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2387         split out from...
2388         (vect_transform_loop): ...here.  Process pattern definition
2389         statements without first checking whether the main pattern
2390         statement is live or relevant.
2392 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2394         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2395         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2397 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
2399         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2400         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2401         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2402         (expand_block_compare): Change select_block_compare_mode call.
2403         (expand_strncmp_align_check): Use new functions, fix comment.
2404         (emit_final_str_compare_gpr): New function.
2405         (expand_strn_compare): Refactor and clean up code.
2406         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2408 2018-06-19  Tony Reix  <tony.reix@atos.com>
2409             Damien Bergamini  <damien.bergamini@atos.com>
2410             David Edelsohn  <dje.gcc@gmail.com>
2412         * collect2.c (static_obj): New variable.
2413         (static_libs): New variable.
2414         (is_in_list): Uncomment declaration.
2415         (main): Track AIX libraries linked statically.
2416         (is_in_list): Uncomment definition.
2417         (scan_prog_file): Don't add AIX shared libraries initializer
2418         to constructor list if linking statically.
2420 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
2422         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2423         constant.
2424         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2426 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
2428         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2429         blocks.
2431 2018-06-19  Martin Liska  <mliska@suse.cz>
2433         * config/i386/i386.c (ix86_can_inline_p): Do not use
2434         ipa_fn_summaries::get_create.
2435         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2436         get.
2437         (devirtualization_time_bonus): Likewise.
2438         (ipcp_propagate_stage): Likewise.
2439         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2440         (edge_set_predicate): Likewise.
2441         (evaluate_conditions_for_known_args): Likewise.
2442         (evaluate_properties_for_edge): Likewise.
2443         (ipa_call_summary::reset): Tranform to ...
2444         (ipa_call_summary::~ipa_call_summary): ... this.
2445         (ipa_fn_summary::reset): Transform to ...
2446         (ipa_fn_summary::~ipa_fn_summary): ... this.
2447         (ipa_fn_summary_t::remove): Rename to ...
2448         (ipa_fn_summary_t::remove_callees): ... this.
2449         (ipa_fn_summary_t::duplicate): Use placement new
2450         instead of memory copy.
2451         (ipa_call_summary_t::duplicate): Likewise.
2452         (ipa_call_summary_t::remove): Remove.
2453         (dump_ipa_call_summary): Change get_create to get.
2454         (ipa_dump_fn_summary): Dump only when summary exists.
2455         (analyze_function_body): Use symbol_summary::get instead
2456         of get_create.
2457         (compute_fn_summary): Likewise.
2458         (estimate_edge_devirt_benefit): Likewise.
2459         (estimate_edge_size_and_time): Likewise.
2460         (inline_update_callee_summaries): Likewise.
2461         (remap_edge_change_prob): Likewise.
2462         (remap_edge_summaries): Likewise.
2463         (ipa_merge_fn_summary_after_inlining): Likewise.
2464         (write_ipa_call_summary): Likewise.
2465         (ipa_fn_summary_write): Likewise.
2466         (ipa_free_fn_summary): Likewise.
2467         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
2468         (struct ipa_call_summary): Likewise.
2469         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
2470         of get_create.
2471         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
2472         (estimate_size_after_inlining): Likewise.
2473         (estimate_growth): Likewise.
2474         (growth_likely_positive): Likewise.
2475         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2476         (inline_call): Likewise.
2477         * ipa-inline.c (caller_growth_limits): Likewise.
2478         (can_inline_edge_p): Likewise.
2479         (can_inline_edge_by_limits_p): Likewise.
2480         (compute_uninlined_call_time): Likewise.
2481         (compute_inlined_call_time): Likewise.
2482         (want_inline_small_function_p): Likewise.
2483         (edge_badness): Likewise.
2484         (update_caller_keys): Likewise.
2485         (update_callee_keys): Likewise.
2486         (inline_small_functions): Likewise.
2487         (inline_to_all_callers_1): Likewise.
2488         (dump_overall_stats): Likewise.
2489         (early_inline_small_functions): Likewise.
2490         (early_inliner): Likewise.
2491         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2492         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2493         * ipa-pure-const.c (malloc_candidate_p): Likewise.
2494         * ipa-split.c (execute_split_functions): Likewise.
2495         * symbol-summary.h: Likewise.
2496         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2498 2018-06-19  Richard Biener  <rguenther@suse.de>
2500         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2501         (vectorize_loops): ... here.  Fix dbgcnt handling.
2502         (try_vectorize_loop): Wrap try_vectorize_loop_1.
2504 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
2506         PR target/86197
2507         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
2508         ieee128 argument takes up only one (vector) register, not two (floating
2509         point) registers.
2511 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
2513         * gimplify.c (gimplify_init_constructor): Really never clear for an
2514         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2516 2018-06-19  Richard Biener  <rguenther@suse.de>
2518         PR tree-optimization/86179
2519         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
2520         after failed recognition.
2522 2018-06-18  Martin Sebor  <msebor@redhat.com>
2524         PR middle-end/85602
2525         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
2526         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
2527         Handle integer subtraction.
2528         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
2529         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
2531 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
2533         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
2534         param from rtx to rtx_insn *.
2535         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
2536         param.
2537         (frv_ifcvt_modify_insn): Likwise.
2538         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
2539         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
2540         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
2541         as_a <rtx_insn *> cast to local "unprotected_region" once
2542         it's been established that it's not NULL or pc_rtx.
2543         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
2544         param "sethi" from rtx to rtx_insn *.
2545         (nds32_group_float_insns): Likewise for param "insn".
2546         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
2547         param.
2548         (vax_output_int_subtract): Likewise.
2549         * config/vax/vax.c (vax_output_int_add): Likewise for param
2550         "insn".
2551         (vax_output_int_subtract): Likewise.
2552         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
2553         (emit_pattern_after): Likewise for param "after".
2554         (emit_insn_after): Likewise.
2555         (emit_jump_insn_after): Likewise.
2556         (emit_call_insn_after): Likewise.
2557         (emit_debug_insn_after): Likewise.
2558         (emit_pattern_before): Likewise for param "before".
2559         (emit_insn_before): Likewise.
2560         (emit_jump_insn_before): Likewise.
2561         * final.c (get_insn_template): Likewise for param "insn", removing
2562         a cast.
2563         * output.h (get_insn_template): Likewise for 2nd param.
2564         * rtl.h (emit_insn_before): Likewise.
2565         (emit_jump_insn_before): Likewise.
2566         (emit_debug_insn_before_noloc): Likewise.
2567         (emit_insn_after): Likewise.
2568         (emit_jump_insn_after): Likewise.
2569         (emit_call_insn_after): Likewise.
2570         (emit_debug_insn_after): Likewise.
2571         (set_insn_deleted): Likewise for param.
2573 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
2575         PR target/85358
2576         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
2577         floating point modes, so that IFmode is numerically greater than
2578         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
2579         to declare the ordering.  This prevents IFmode from being
2580         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
2581         machine.  Include rs6000-modes.h to share the fractional values
2582         between genmodes* and the rest of the compiler.
2583         (IFmode): Likewise.
2584         (KFmode): Likewise.
2585         (TFmode): Likewise.
2586         * config/rs6000/rs6000-modes.h: New file.
2587         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
2588         meaning of rs6000_long_double_size so that 126..128 selects an
2589         appropriate 128-bit floating point type.
2590         (rs6000_option_override_internal): Likewise.
2591         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
2592         (TARGET_LONG_DOUBLE_128): Change the meaning of
2593         rs6000_long_double_size so that 126..128 selects an appropriate
2594         128-bit floating point type.
2595         (LONG_DOUBLE_TYPE_SIZE): Update comment.
2596         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
2597         source and destination to match the standard usage.
2598         (truncifkf2): Likewise.
2599         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
2600         ISA 2.07 to use an explicit clobber, instead of passing in a
2601         temporary.
2602         (copysign<mode>3_soft): Likewise.
2604 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
2606         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2607         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
2608         (vect_slp_analyze_instance_dependence): Likewise.
2609         (vect_enhance_data_refs_alignment): Likewise.
2610         (vect_analyze_data_refs_alignment): Likewise.
2611         (vect_slp_analyze_and_verify_instance_alignment
2612         (vect_analyze_data_ref_accesses): Likewise.
2613         (vect_prune_runtime_alias_test_list): Likewise.
2614         (vect_analyze_data_refs): Likewise.
2615         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
2616         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
2617         (vect_analyze_scalar_cycles_1): Likewise.
2618         (vect_get_loop_niters): Likewise.
2619         (vect_analyze_loop_form_1): Likewise.
2620         (vect_update_vf_for_slp): Likewise.
2621         (vect_analyze_loop_operations): Likewise.
2622         (vect_analyze_loop): Likewise.
2623         (vectorizable_induction): Likewise.
2624         (vect_transform_loop): Likewise.
2625         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
2626         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2627         (vect_make_slp_decision): Likewise.
2628         (vect_detect_hybrid_slp): Likewise.
2629         (vect_slp_analyze_operations): Likewise.
2630         (vect_slp_bb): Likewise.
2631         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
2632         (vectorizable_bswap): Likewise.
2633         (vectorizable_call): Likewise.
2634         (vectorizable_simd_clone_call): Likewise.
2635         (vectorizable_conversion): Likewise.
2636         (vectorizable_assignment): Likewise.
2637         (vectorizable_shift): Likewise.
2638         (vectorizable_operation): Likewise.
2639         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
2641 2018-06-18  Martin Sebor  <msebor@redhat.com>
2643         PR tree-optimization/81384
2644         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
2645         * builtins.c (expand_builtin_strnlen): New function.
2646         (expand_builtin): Call it.
2647         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
2648         * builtins.def (BUILT_IN_STRNLEN): New.
2649         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
2650         Warn for bounds in excess of maximum object size.
2651         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
2652         single-value ranges.  Handle strnlen.
2653         (handle_builtin_strlen): Handle strnlen.
2654         (strlen_check_and_optimize_stmt): Same.
2655         * doc/extend.texi (Other Builtins): Document strnlen.
2657 2018-06-18  Maya Rashish  <coypu@sdf.org>
2659         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
2660         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
2661         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
2663         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
2664         here to ...
2665         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
2667 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2669         * tree.c (escaped_string::escape): Replace cast to char * by
2670         const_cast<char *> (unescaped).
2672 2018-06-18  Nick Clifton  <nickc@redhat.com>
2674         PR 84195
2675         * tree.c (escaped_string): New class.  Converts an unescaped
2676         string into its escaped equivalent.
2677         (warn_deprecated_use): Use the new class to convert the
2678         deprecation message, if present.
2679         (test_escaped_strings): New self test.
2680         (test_c_tests): Add test_escaped_strings.
2681         * doc/extend.texi (deprecated): Add a note that the
2682         deprecation message is affected by the -fmessage-length
2683         option, and that control characters will be escaped.
2684         (#pragma GCC error): Document this pragma.
2685         (#pragma GCC warning): Likewise.
2686         * doc/invoke.texi (-fmessage-length): Document this option's
2687         effect on the #warning and #error preprocessor directives and
2688         the deprecated attribute.
2690 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
2692         * tree.c (decl_value_expr_lookup): Revert latest change.
2693         (decl_value_expr_insert): Likewise.
2695 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
2697         * gimplify.c (nonlocal_vlas): Delete.
2698         (nonlocal_vla_vars): Likewise.
2699         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
2700         referenced VLAs.
2701         (gimplify_body): Do not create and destroy nonlocal_vlas.
2702         * tree-nested.c: Include diagnostic.h.
2703         (use_pointer_in_frame): Tweak.
2704         (lookup_field_for_decl): Add assertion and declare the transformation.
2705         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
2706         internal error when the reference is in a wrong context.  Do not
2707         create a debug decl by default.
2708         (note_nonlocal_block_vlas): Delete.
2709         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
2710         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
2711         create a debug decl by default.
2712         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
2713         call is in a wrong context.
2714         (fixup_vla_decls): New function.
2715         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
2716         debug variables were created.
2717         * tree.c (decl_value_expr_lookup): Add checking assertion.
2718         (decl_value_expr_insert): Likewise.
2720 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2722         PR middle-end/82479
2723         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
2724         * tree-scalar-evolution.c (interpret_expr): Likewise.
2725         (expression_expensive_p): Likewise.
2726         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
2727         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
2728         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
2729         (ssa_defined_by_minus_one_stmt_p): New.
2731 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
2733         PR middle-end/64946
2734         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
2735         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
2736         * dojump.c (do_jump): Likewise.
2737         * expr.c (expand_expr_real_2): Check operand type's sign.
2738         * fold-const.c (const_unop): Handle ABSU_EXPR.
2739         (fold_abs_const): Likewise.
2740         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
2741         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
2742         (strip_sign_op_1): Likesise.
2743         * match.pd: Add new pattern to generate ABSU_EXPR.
2744         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
2745         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2746         * tree-eh.c (operation_could_trap_helper_p): Likewise.
2747         * tree-inline.c (estimate_operator_cost): Likewise.
2748         * tree-pretty-print.c (dump_generic_node): Likewise.
2749         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
2750         * tree.def (ABSU_EXPR): New.
2752 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
2754         PR middle-end/86095
2755         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
2756         documented as preserved for backward compatibility only.
2757         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
2759         PR rtl-optimization/86108
2760         * bb-reorder.c (create_forwarder_block): Renamed to ...
2761         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
2762         jump from new landing pad to the second part.
2763         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
2764         Adjust callers.
2766 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
2768         PR middle-end/85878
2769         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
2770         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
2771         Only call store_expr for halves if the mode is the same.
2773         PR middle-end/86123
2774         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
2775         Fix up comment formatting.
2777 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2779         * typed-splay-tree.h (typed_splay_tree::remove): New function.
2780         (typed_splay_tree::closure,
2781         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
2782         (typed_splay_tree::typed_splay_tree,
2783         typed_splay_tree::operator =): Declared private.
2784         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
2785         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
2786         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
2787         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
2788         typed_splay_tree::splay_tree_splay,
2789         typed_splay_tree::splay_tree_foreach_helper,
2790         typed_splay_tree::splay_tree_insert,
2791         typed_splay_tree::splay_tree_remove,
2792         typed_splay_tree::splay_tree_lookup,
2793         typed_splay_tree::splay_tree_predecessor,
2794         typed_splay_tree::splay_tree_successor,
2795         typed_splay_tree::splay_tree_min,
2796         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
2797         (typed_splay_tree::root, typed_splay_tree::comp,
2798         typed_splay_tree::delete_key,
2799         typed_splay_tree::delete_value): New data members.
2800         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
2801         typed_splay_tree::remove.
2803 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
2805         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
2806         -mginv and -mno-ginv to the assembler.
2807         * config/mips/mips.opt (-mcrc): New option.
2808         (-mginv): Likewise.
2809         * doc/invoke.text (-mcrc): Document.
2810         (-mginv): Likewise.
2812 2018-06-15  Nick Clifton  <nickc@redhat.com>
2814         PR 84195
2815         * tree.c (escaped_string): New class.  Converts an unescaped
2816         string into its escaped equivalent.
2817         (warn_deprecated_use): Use the new class to convert the
2818         deprecation message, if present.
2819         (test_escaped_strings): New self test.
2820         (test_c_tests): Add test_escaped_strings.
2821         * doc/extend.texi (deprecated): Add a note that the
2822         deprecation message is affected by the -fmessage-length
2823         option, and that control characters will be escaped.
2824         (#pragma GCC error): Document this pragma.
2825         (#pragma GCC warning): Likewise.
2826         * doc/invoke.texi (-fmessage-length): Document this option's
2827         effect on the #warning and #error preprocessor directives and
2828         the deprecated attribute.
2830 2018-06-15  Richard Biener  <rguenther@suse.de>
2832         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
2833         here, also noting vector size used.
2834         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
2835         size used in MSG_OPTIMIZED_LOCATIONS dump.
2836         (pass_slp_vectorize::execute): Adjust.
2838 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
2840         PR target/85968
2841         * config/arc/arc.c (arc_return_address_register): Fix
2842         if-condition.
2844 2018-06-15  Richard Biener  <rguenther@suse.de>
2846         PR middle-end/86159
2847         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
2848         leave useless conversion stripping to force_gimple_operand_gsi.
2849         (gimplify_build2): Likewise.
2850         (gimplify_build1): Likewise.
2852 2018-06-15  Richard Biener  <rguenther@suse.de>
2854         PR middle-end/86076
2855         * tree-cfg.c (move_stmt_op): unshare invariant addresses
2856         before adjusting their block.
2858 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2860         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
2861         multilibs for *-*-rtems*.
2862         * config/riscv/t-rtems: New file.
2864 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
2866         PR middle-end/86122
2867         * match.pd ((A +- CST1) +- CST2): Punt if last resort
2868         unsigned_type_for returns NULL.
2870         PR target/85945
2871         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
2872         subregs of multi-word pseudos unless the float mode has word size.
2874 2018-06-14  Richard Biener  <rguenther@suse.de>
2876         PR middle-end/86139
2877         * tree-vect-generic.c (build_word_mode_vector_type): Remove
2878         duplicate and harmful type_hash_canon.
2879         * tree.c (type_hash_canon): Assert we didn't find ourselves.
2881 2018-06-14  Richard Biener  <rguenther@suse.de>
2883         PR ipa/86124
2884         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
2885         NULL cgraph_node.
2887 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2889         * config/rtems.h (STDINT_LONG32): Define.
2891 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
2892             Prachi Godbole  <prachi.godbole@imgtec.com>
2894         * config/mips/mips-cpus.def: Define P6600.
2895         * config/mips/mips-tables.opt: Regenerate.
2896         * config/mips/mips.c (mips_ucbranch_type): New enum.
2897         (mips_rtx_cost_data): Add support for P6600.
2898         (mips_issue_rate): Likewise.
2899         (mips_multipass_dfa_lookahead): Likewise.
2900         (mips_avoid_hazard): Likewise.
2901         (mips_reorg_process_insns): Likewise.
2902         (mips_classify_branch_p6600): New function.
2903         * config/mips/mips.h (TUNE_P6600): New define.
2904         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
2905         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
2906         * config/mips/mips.md: Include p6600.md.
2907         (processor): Add p6600.
2908         * config/mips/p6600.md: New file.
2909         * doc/invoke.texi: Add p6600 to supported architectures.
2911 2018-06-13  Martin Sebor  <msebor@redhat.com>
2913         PR tree-optimization/86114
2914         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
2915         of integer types.
2916         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
2918 2018-06-13  Richard Biener  <rguenther@suse.de>
2920         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
2921         Properly set vector type of the intermediate stmt.
2922         * tree-vect-stmts.c (vectorizable_operation): The destination
2923         var always has vectype_out type.
2925 2018-06-13  Jeff Law  <law@redhat.com>
2927         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
2928         integer 0 for argument to print_rtl_with_bb.
2929         (rl78_reorg): Likewise.
2931 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
2933         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
2934         from rtx to rtx_insn *.
2935         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
2936         "label".
2937         (add_sched_insns_for_speculation): Likewise for local "target",
2938         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2939         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
2940         from rtx_insn ** to rtx_code_label **.
2941         (reorg_emit_nops): Likewise.
2942         (c6x_reorg): Likewise for local "call_labels".
2943         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
2944         rtx to rtx_insn *.
2945         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
2946         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
2947         the loops over LABEL_REFS.
2948         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
2949         braf_label.
2950         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2951         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
2952         (split_branches): Strengthen local "olabel" from rtx to
2953         rtx_insn *, adding a safe_as_a cast.
2954         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
2955         to "rtx_insn *".
2956         (add_insn_after): Likewise for first two params.
2957         (add_insn_before): Likewise.
2958         (remove_insn): Likewise for param.
2959         (emit_pattern_before_noloc): Likewise for second and third params.
2960         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
2961         (emit_call_insn_before_noloc): Likewise.
2962         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
2963         to "rtx_insn *".
2964         (emit_barrier_before): Likewise.
2965         (emit_label_before): Strengthen "label" param from "rtx" to
2966         "rtx_code_label *".  Strengthen "before" param from "rtx" to
2967         "rtx_insn *".
2968         (emit_insn_after_1): Strengthen "after" param from "rtx" to
2969         "rtx_insn *".
2970         (emit_pattern_after_noloc): Likewise.
2971         (emit_insn_after_noloc): Likewise.
2972         (emit_jump_insn_after_noloc): Likewise.
2973         (emit_call_insn_after_noloc): Likewise.
2974         (emit_debug_insn_after_noloc): Likewise.
2975         (emit_barrier_after): Likewise.
2976         (emit_label_after): Likewise for both params.
2977         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
2978         "loc" param from "int" to "location_t".
2979         (emit_insn_after_setloc): Likewise.
2980         (emit_jump_insn_after_setloc): Likewise.
2981         (emit_call_insn_after_setloc): Likewise.
2982         (emit_debug_insn_after_setloc): Likewise.
2983         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
2984         "loc" param from "int" to "location_t".
2985         (emit_pattern_before): Convert NULL_RTX to NULL.
2986         (emit_insn_before_setloc): Convert "loc" param from "int" to
2987         "location_t".
2988         (emit_jump_insn_before_setloc): Likewise.
2989         (emit_call_insn_before_setloc): Likewise.
2990         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
2991         rtx_insn *.  Convert "loc" param from "int" to "location_t".
2992         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
2993         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
2994         Convert 3rd param from "int" to "location_t".
2995         (emit_barrier_before, emit_barrier_after, next_real_insn):
2996         Strengthen param from rtx to rtx_insn *.
2997         (emit_label_before): Strengthen 1st param from "rtx" to
2998         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
2999         "rtx_insn *".
3000         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
3001         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
3002         Strengthen 2nd param from "rtx" to "rtx_insn *".
3003         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
3004         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
3005         Likewise. Convert 3rd param from "int" to "location_t".
3006         (emit_label_after): Strengthen 1st param from "rtx" to
3007         "rtx_code_label *".
3008         (next_real_insn, remove_insn): Strengthen param from "rtx" to
3009         "rtx_insn *".
3010         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
3011         from "rtx" to "rtx_insn *".
3013 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
3015         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
3016         bodies streamed in with -Q.
3017         * dumpfile.c (dump_files): Add lto-stream-out dump file.
3018         * dumpfile.h (tree_dump_index): Add lto_stream_out.
3019         * gimple-streamer-out.c: Include gimple-pretty-print.h
3020         (output_bb): Dump stmts streamed.
3021         * lto-section-out.c: Include print-tree.h
3022         (lto_begin_section): Dump sections created.
3023         (lto_output_decl_index): Dump decl encoded.
3024         * lto-streamer-out.c: Include print-tree.h
3025         (create_output_block): Dump output block created.
3026         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
3027         (output_function): Dump function output.
3028         (output_constructor): Dump constructor streamed.
3029         (write_global_stream): Output indexes encoded.
3030         (produce_asm_for_decls): Dump streams encoded.
3031         * lto-streamer.c (streamer_dump_file): New global var.
3032         * lto-streamer.h (streamer_dump_file): Declare.
3033         * passes.c (ipa_write_summaries): Initialize streamer dump.
3034         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
3035         in.
3037 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
3039         PR target/86048
3040         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3041         offsets for register save directives.  Emit a second batch of save
3042         directives, if need be, when the function accesses prior frames.
3044 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3046         * config/arc/fpu.md (fmasf4): Force operand to register.
3047         (fnmasf4): Likewise.
3049 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3051         * config/arc/arc-protos.h (arc_pad_return): Remove.
3052         * config/arc/arc.c (machine_function): Remove force_short_suffix
3053         and size_reason.
3054         (arc_print_operand): Adjust printing of '&'.
3055         (arc_verify_short): Remove conditional printing of short suffix.
3056         (arc_final_prescan_insn): Remove reference to size_reason.
3057         (pad_return): New function.
3058         (arc_reorg): Call pad_return.
3059         (arc_pad_return): Remove.
3060         (arc_init_machine_status): Remove reference to force_short_suffix.
3061         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3062         (attr length): When attribute iscompact is true force to 2
3063         regardless; in the case of maybe check if we want to force the
3064         instruction to have 4 bytes length.
3065         (nopv): Change it to generate 4 byte long nop as well.
3066         (blockage): New pattern.
3067         (simple_return): Remove call to arc_pad_return.
3068         (p_return_i): Likewise.
3070 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3072         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
3074 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3076         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
3077         ARC cores.
3079 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3081         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
3082         for ARC700 and ARCv2.
3084 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
3086         PR target/86076
3087         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
3088         operands[2] instead of operands[1].
3091 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
3093         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
3094         case, check whether the outer register overlaps an unallocatable
3095         register, not just whether it fits the required class.
3097 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
3099         * poly-int.h (can_div_trunc_p): Add new overload in which all values
3100         are poly_ints.
3101         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
3102         (memrefs_conflict_p): Likewise.
3103         (init_alias_analysis): Likewise.
3104         * cfgexpand.c (expand_debug_expr): Likewise.
3105         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
3106         * cse.c (fold_rtx): Likewise.
3107         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
3108         * expr.c (emit_block_move_hints): Likewise.
3109         (clear_storage_hints, push_block, emit_push_insn): Likewise.
3110         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
3111         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
3112         (emit_group_store): Likewise.
3113         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
3114         to read the PRE/POST_MODIFY increment.
3115         * calls.c (store_one_arg): Use strip_offset.
3116         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
3117         poly_int_rtx_p.
3118         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
3119         by a VEC_SELECT.
3120         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
3121         (simplify_binary_operation_1): Extend CONST_INT handling to
3122         poly_int_rtx_p.
3123         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
3124         than a HOST_WIDE_INT.
3125         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
3126         poly_int64.
3127         (adjust_mems, add_stores): Update accodingly.
3128         (vt_canonicalize_addr): Track polynomial offsets.
3129         (emit_note_insn_var_location): Likewise.
3130         (vt_add_function_parameter): Likewise.
3131         (vt_initialize): Likewise.
3133 2018-06-12  Jeff Law  <law@redhat.com>
3135         * config.gcc (alpha*-*-freebsd*): Remove.
3136         * config/alpha/freebsd.h: Remove.
3138 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
3140         PR other/69968
3141         * spellcheck-tree.c (levenshtein_distance): Rename to...
3142         (get_edit_distance): ...this, and update for underlying renaming.
3143         * spellcheck-tree.h (levenshtein_distance): Rename to...
3144         (get_edit_distance): ...this.
3145         * spellcheck.c (levenshtein_distance): Rename to...
3146         (get_edit_distance): ...this.  Convert from Levenshtein distance
3147         to Damerau-Levenshtein distance by supporting transpositions of
3148         adjacent characters.  Rename "v1" to "v_next" and "v0" to
3149         "v_one_ago".
3150         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
3151         (selftest::test_edit_distance_unit_test_oneway): ...this, and
3152         update for underlying renaming.
3153         (selftest::levenshtein_distance_unit_test): Rename to...
3154         (selftest::test_get_edit_distance_unit): ...this, and update for
3155         underlying renaming.
3156         (selftest::test_find_closest_string): Add example from PR 69968
3157         where transposition helps
3158         (selftest::test_metric_conditions): Update for renaming.
3159         (selftest::test_metric_conditions): Likewise.
3160         (selftest::spellcheck_c_tests): Likewise.
3161         * spellcheck.h (levenshtein_distance): Rename both overloads to...
3162         (get_edit_distance): ...this.
3163         (best_match::consider): Update for renaming.
3165 2018-06-12  Martin Sebor  <msebor@redhat.com>
3167         PR tree-optimization/85259
3168         * builtins.c (compute_objsize): Handle constant offsets.
3169         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
3170         true iff a warning has been issued.
3171         * gimple.h (gimple_nonartificial_location): New function.
3172         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
3173         gimple_nonartificial_location and handle -Wno-system-headers.
3174         (handle_builtin_stxncpy): Same.
3176 2018-06-12  Martin Sebor  <msebor@redhat.com>
3178         PR c/85931
3179         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
3181 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
3183         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
3184         BUILTIN_VEC_XST entries for pointer to double and long long.
3186 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
3188         PR target/85990
3189         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3190         Update comments.
3191         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
3192         Likewise.
3194 2018-06-12  Martin Liska  <mliska@suse.cz>
3196         * doc/options.texi: Document IntegerRange.
3198 2018-06-12  Martin Liska  <mliska@suse.cz>
3200         * config/i386/i386.opt: Make MPX-related options as Deprecated.
3201         * opt-functions.awk: Handle Deprecated flag.
3202         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
3203         and report error.
3204         (read_cmdline_option): Report warning for a deprecated option.
3205         * opts.h (struct cl_option): Add new field cl_deprecated.
3206         (CL_ERR_DEPRECATED): New.
3208 2018-06-12  Martin Liska  <mliska@suse.cz>
3210         * doc/options.texi: Document Deprecated option flag.
3212 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3214         * config/arc/arc-arch.h (arc_extras): New enum.
3215         (arc_cpu_t):Add field extra.
3216         (arc_cpu_types): Consider the extras.
3217         * config/arc/arc-cpus.def: Add extras info.
3218         * config/arc/arc-opts.h (processor_type): Consider extra field.
3219         * config/arc/arc.c (arc_override_options): Handle extra field.
3221 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
3223         * config/arc/arc-arch.h: Update ARC_OPTX macro.
3224         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
3225         field.
3226         * config/arc/arc.c (arc_init): Update pic warning.
3227         (irq_range): Update irq range parsing warnings.
3228         (arc_override_options): Update various warning messages.
3229         (arc_handle_aux_attribute): Likewise.
3231 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
3233         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
3235 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3237         * doc/sourcebuild.texi: Document usage of line number 0 in verify
3238         compiler messages directives.
3240 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
3242         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3243         * config/mips/mips-tables.opt: Regenerate.
3244         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3245         mips64r6.
3246         * doc/invoke.texi: Document -march=i6500.
3248 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
3250         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3251         (i6400_gpmul): Add cpu_unit.
3252         (i6400_gpdiv): Likewise.
3253         (i6400_msa_add_d): Update reservations.
3254         (i6400_msa_int_add) Likewise.
3255         (i6400_msa_short_logic3) Likewise.
3256         (i6400_msa_short_logic2) Likewise.
3257         (i6400_msa_short_logic) Likewise.
3258         (i6400_msa_move) Likewise.
3259         (i6400_msa_cmp) Likewise.
3260         (i6400_msa_short_float2) Likewise.
3261         (i6400_msa_div_d) Likewise.
3262         (i6400_msa_long_logic1) Likewise.
3263         (i6400_msa_long_logic2) Likewise.
3264         (i6400_msa_mult) Likewise.
3265         (i6400_msa_long_float2) Likewise.
3266         (i6400_msa_long_float4) Likewise.
3267         (i6400_msa_long_float5) Likewise.
3268         (i6400_msa_long_float8) Likewise.
3269         (i6400_fpu_fadd): Include frint type.
3270         (i6400_fpu_store): New define_insn_reservation.
3271         (i6400_fpu_load): Likewise.
3272         (i6400_fpu_move): Likewise.
3273         (i6400_fpu_fcmp): Likewise.
3274         (i6400_fpu_fmadd): Likewise.
3275         (i6400_int_mult): Include imul3nc type and update reservation.
3276         (i6400_int_div): Include idiv3 type and update reservation.
3277         (i6400_int_load): Update to check type not move_type.
3278         (i6400_int_store): Likewise.
3279         (i6400_int_prefetch): Set zero latency.
3281 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
3283         * gcc.c: Document new %@{...} sequence.
3284         (LINK_COMMAND_SPEC): Use it for the -L switches.
3285         (cpp_unique_options): Use it for the -I switches.
3286         (at_file_argbuf): New global variable.
3287         (in_at_file): Likewise.
3288         (alloc_args): Create at_file_argbuf.
3289         (clear_args): Truncate at_file_argbuf.
3290         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3291         (open_at_file): New function.
3292         (close_at_file): Likewise.
3293         (create_at_file): Delete.
3294         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3295         <'o'>: Likewise.
3296         <'@'>: New case.
3297         (validate_switches_from_spec): Deal with %@{...} sequence.
3298         (validate_switches): Likewise.
3299         (driver::finalize): Call clear_args.
3301 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
3303         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3305 2018-06-11  Martin Sebor  <msebor@redhat.com>
3307         * doc/invoke.texi (-Wall): List -Wc++17-compat.
3308         (Wno-class-memaccess): Add @opindex.
3309         (Wno-templates, Wno-multiple-inheritance): Same.
3310         (Wno-virtual-inheritance, Wno-namespaces): Same.
3311         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3312         (Wno-format-overflow, Wno-format-truncation): Same.
3313         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3314         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3315         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3316         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3317         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3318         (Wno-misspelled-isr): Same.
3320 2018-06-11  Martin Sebor  <msebor@redhat.com>
3322         * PR tree-optimization/86083
3323         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3325 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3327         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3329 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
3331         PR target/85755
3332         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3333         on the correct operand.
3334         (*movdi_internal64): Ditto.
3336 2018-06-11  Martin Liska  <mliska@suse.cz>
3338         PR tree-optimization/86089
3339         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3341 2018-06-11  Julia Koval  <julia.koval@intel.com>
3343         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3344         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3345         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3347 2018-06-11  Olivier Hainque  <hainque@adacore.com>
3349         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3350         for Ada with strict dwarf2.
3352 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
3354         PR target/85755
3355         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3356         addresses.
3358 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
3360         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3362 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
3364         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3365         TARGET_ELF.
3367 2018-06-08  Martin Liska  <mliska@suse.cz>
3369         * tree-cfg.h (debug_function): Fix argument type to match
3370         implementation.
3372 2018-06-08  Martin Liska  <mliska@suse.cz>
3374         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3375         Remove usage of MPX-related (and removed) fields.
3376         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3378 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
3380         * cfg.c (debug): Use TDF_NONE rather than 0.
3381         * cfghooks.c (debug): Likewise.
3382         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3383         (struct dump_option_value_info): Convert to...
3384         (struct kv_pair): ...this template type.
3385         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3386         rather than 0.
3387         (optinfo_verbosity_options): Likewise.
3388         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3389         OPTGROUP_NONE.
3390         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3391         than int for "optgroup_flags" param.
3392         (dump_generic_expr_loc): Use dump_flags_t rather than int for
3393         "dump_kind" param.
3394         (dump_dec): Likewise.
3395         (dump_finish): Use TDF_NONE rather than 0.
3396         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3397         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
3398         than 0.  Update for change to option_ptr.
3399         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3400         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
3401         0.  Update for changes to optinfo_verbosity_options and
3402         optgroup_options.
3403         (opt_info_switch_p): Convert optgroup_flags from int to
3404         optgroup_flags_t.
3405         (dump_basic_block): Use dump_flags_t rather than int
3406         for "dump_kind" param.
3407         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3408         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3409         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3410         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3411         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3412         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3413         TDF_NONE): Convert from macros to...
3414         (enum dump_flag): ...this new enum.
3415         (dump_flags_t): Update to use enum.
3416         (operator|, operator&, operator~, operator|=, operator&=):
3417         Implement for dump_flags_t.
3418         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3419         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3420         Convert from macros to...
3421         (enum optgroup_flag): ...this new enum.
3422         (optgroup_flags_t): New typedef.
3423         (operator|, operator|=): Implement for optgroup_flags_t.
3424         (struct dump_file_info): Convert field "alt_flags" to
3425         dump_flags_t.  Convert field "optgroup_flags" to
3426         optgroup_flags_t.
3427         (dump_basic_block): Use dump_flags_t rather than int for param.
3428         (dump_generic_expr_loc): Likewise.
3429         (dump_dec): Likewise.
3430         (dump_register): Convert param "optgroup_flags" to
3431         optgroup_flags_t.
3432         (opt_info_enable_passes): Likewise.
3433         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3434         than 0.
3435         * gimple-pretty-print.c (debug): Likewise.
3436         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3437         (merged_store_group::apply_stores): Likewise.
3438         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3439         * gimple.c (verify_gimple_pp): Likewise.
3440         * graphite-poly.c (print_pbb_body): Likewise.
3441         * passes.c (pass_manager::register_one_dump_file): Convert
3442         local "optgroup_flags" to optgroup_flags_t.
3443         * print-tree.c (print_node): Use TDF_NONE rather than 0.
3444         (debug): Likewise.
3445         (debug_body): Likewise.
3446         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3447         to optgroup_flags_t.
3448         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3449         than 0.
3450         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
3451         (convert_mult_to_fma): Likewise.
3452         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
3453         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
3454         * tree-vect-data-refs.c (dump_lower_bound): Convert param
3455         "dump_kind" to dump_flags_t.
3457 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
3459         * config/rs6000/rs6000.c (min, max): Delete.
3461 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
3463         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
3464         -mabi=spe and -mabi=no-spe.
3466 2018-06-08  Martin Liska  <mliska@suse.cz>
3468         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
3469         where we expect an existing summary.
3471 2018-06-08  Martin Liska  <mliska@suse.cz>
3473         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
3474         * ipa-inline.h (estimate_edge_growth): Likewise.
3476 2018-06-08  Martin Liska  <mliska@suse.cz>
3478         * cgraph.c (function_version_hasher::hash): Use
3479         cgraph_node::get_uid ().
3480         (function_version_hasher::equal):
3481         * cgraph.h (cgraph_node::get_uid): New method.
3482         * ipa-inline.c (update_caller_keys): Use
3483         cgraph_node::get_uid ().
3484         (update_callee_keys): Likewise.
3485         * ipa-utils.c (searchc): Likewise.
3486         (ipa_reduced_postorder): Likewise.
3487         * lto-cgraph.c (input_node): Likewise.
3488         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
3489         * symbol-summary.h (symtab_insertion): Likewise.
3490         (symtab_removal): Likewise.
3491         (symtab_duplication): Likewise.
3492         * tree-pretty-print.c (dump_function_header): Likewise.
3493         * tree-sra.c (convert_callers_for_node): Likewise.
3495 2018-06-08  Martin Liska  <mliska@suse.cz>
3497         * cgraph.c (symbol_table::create_edge): Always assign a new
3498         unique number.
3499         (symbol_table::free_edge): Do not recycle numbers.
3500         * cgraph.h (cgraph_edge::get): New method.
3501         * symbol-summary.h (symtab_removal): Use it.
3502         (symtab_duplication): Likewise.
3503         (call_summary::hashable_uid): Remove.
3505 2018-06-08  Martin Liska  <mliska@suse.cz>
3507         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
3508         (initialize_growth_caches): Remove.
3509         (free_growth_caches): Likewise.
3510         (do_estimate_edge_time): Use edge_growth_cache.
3511         (do_estimate_edge_size): Likewise.
3512         (do_estimate_edge_hints): Likewise.
3513         * ipa-inline.c (reset_edge_caches): Likewise.
3514         (recursive_inlining): Likewise.
3515         (inline_small_functions): Likewise.
3516         * ipa-inline.h (initialize_growth_caches): Remove.
3517         (estimate_edge_size): Likewise.
3518         (estimate_edge_time): Likewise.
3519         (estimate_edge_hints): Likewise.
3520         (reset_edge_growth_cache): Likewise.
3521         * symbol-summary.h (call_summary::remove): New method.
3523 2018-06-08  Martin Liska  <mliska@suse.cz>
3525         * ipa-cp.c (class edge_clone_summary): New summary.
3526         (grow_edge_clone_vectors): Remove.
3527         (ipcp_edge_duplication_hook): Remove.
3528         (class edge_clone_summary_t): New call_summary class.
3529         (ipcp_edge_removal_hook): Remove.
3530         (edge_clone_summary_t::duplicate): New function.
3531         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
3532         (create_specialized_node): Likewise.
3533         (ipcp_driver): Initialize edge_clone_summaries and do not
3534         register hooks.
3536 2018-06-08  Martin Liska  <mliska@suse.cz>
3538         * symbol-summary.h (get): New function.
3539         (call_summary::m_initialize_when_cloning): New class member.
3541 2018-06-08  Martin Liska  <mliska@suse.cz>
3543         * cgraph.c (cgraph_node::remove): Do not recycle uid.
3544         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
3545         (symbol_table::allocate_cgraph_symbol): Do not set uid.
3546         * passes.c (uid_hash_t): Record removed_nodes by their uids.
3547         (remove_cgraph_node_from_order): Use the removed_nodes set.
3548         (do_per_function_toporder): Likwise.
3549         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
3550         instead of summary_uid.
3551         (symtab_removal): Likewise.
3552         (symtab_duplication): Likewise.
3554 2018-06-08  Martin Liska  <mliska@suse.cz>
3556         * ipa-cp.c (ipcp_store_bits_results): Use
3557         ipcp_transformation_sum.
3558         (ipcp_store_vr_results): Likewise.
3559         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
3560         to ...
3561         (ipcp_transformation_initialize): ... this.
3562         (ipa_set_node_agg_value_chain):
3563         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
3564         (write_ipcp_transformation_info): Likewise.
3565         (read_ipcp_transformation_info): Likewise.
3566         (ipcp_update_bits): Likewise.
3567         (ipcp_update_vr): Likewise.
3568         (ipcp_transform_function): Likewise.
3569         * ipa-prop.h: Rename ipcp_transformation_summary to
3570         ipcp_transformation.
3571         (class ipcp_transformation_t): New function summary.
3572         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
3573         (ipa_get_agg_replacements_for_node): Likewise.
3575 2018-06-08  Martin Liska  <mliska@suse.cz>
3577         * ipa-pure-const.c (struct funct_state_d): Do it class instead
3578         of struct.
3579         (class funct_state_summary_t): New function_summary class.
3580         (has_function_state): Remove.
3581         (get_function_state): Likewise.
3582         (set_function_state): Likewise.
3583         (add_new_function): Likewise.
3584         (funct_state_summary_t::insert): New function.
3585         (duplicate_node_data): Remove.
3586         (remove_node_data): Remove.
3587         (funct_state_summary_t::duplicate): New function.
3588         (register_hooks): Create new funct_state_summaries.
3589         (pure_const_generate_summary): Use it.
3590         (pure_const_write_summary): Likewise.
3591         (pure_const_read_summary): Likewise.
3592         (propagate_pure_const): Likewise.
3593         (propagate_nothrow): Likewise.
3594         (dump_malloc_lattice): Likewise.
3595         (propagate_malloc): Likewise.
3596         (execute): Do not register hooks, just remove summary
3597         instead.
3598         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
3599         constructor.
3601 2018-06-08  Martin Liska  <mliska@suse.cz>
3603         * ipa-reference.c (remove_node_data): Remove.
3604         (duplicate_node_data): Likewise.
3605         (class ipa_ref_var_info_summary_t): New class.
3606         (class ipa_ref_opt_summary_t): Likewise.
3607         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
3608         (get_reference_optimization_summary): Use
3609         ipa_ref_opt_sum_summaries.
3610         (set_reference_vars_info): Remove.
3611         (set_reference_optimization_summary): Likewise.
3612         (ipa_init): Create summaries.
3613         (init_function_info): Use function summary.
3614         (ipa_ref_opt_summary_t::duplicate): New function.
3615         (ipa_ref_opt_summary_t::remove): New function.
3616         (get_read_write_all_from_node): Fix GNU coding style.
3617         (propagate): Use function summary.
3618         (write_node_summary_p): Fix GNU coding style.
3619         (stream_out_bitmap): Likewise.
3620         (ipa_reference_read_optimization_summary): Use function summary.
3621         (ipa_reference_c_finalize): Do not release hooks.
3623 2018-06-08  Martin Liska  <mliska@suse.cz>
3625         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
3626         (analyze_function_body): Extract multiple calls of get_create.
3627         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3628         * ipa-inline.c (recursive_inlining): Use ::get method.
3629         * ipa-inline.h (estimate_edge_growth): Likewise.
3631 2018-06-08  Martin Liska  <mliska@suse.cz>
3633         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
3634         HSA_INVALID.
3635         (hsa_function_summary::hsa_function_summary): Use the new enum
3636         value.
3637         (hsa_gpu_implementation_p): Use hsa_summaries::get.
3638         * hsa-gen.c (hsa_get_host_function): Likewise.
3639         (get_brig_function_name): Likewise.
3640         * ipa-hsa.c (process_hsa_functions): Likewise.
3641         (ipa_hsa_write_summary): Likewise.
3642         * symbol-summary.h (symtab_duplication): Use ::get function/
3643         (get): New function.
3645 2018-06-08  Martin Liska  <mliska@suse.cz>
3647         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
3648         of get.
3649         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
3650         (hsa_register_kernel): Likewise.
3651         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
3652         * hsa-gen.c (hsa_get_host_function): Likewise.
3653         (get_brig_function_name): Likewise.
3654         (generate_hsa): Likewise.
3655         (pass_gen_hsail::execute): Likewise.
3656         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
3657         (devirtualization_time_bonus): Likewise.
3658         (ipcp_propagate_stage): Likewise.
3659         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3660         (edge_set_predicate): Likewise.
3661         (evaluate_conditions_for_known_args): Likewise.
3662         (evaluate_properties_for_edge): Likewise.
3663         (ipa_fn_summary::reset): Likewise.
3664         (ipa_fn_summary_t::duplicate): Likewise.
3665         (dump_ipa_call_summary): Likewise.
3666         (ipa_dump_fn_summary): Likewise.
3667         (analyze_function_body): Likewise.
3668         (compute_fn_summary): Likewise.
3669         (estimate_edge_devirt_benefit): Likewise.
3670         (estimate_edge_size_and_time): Likewise.
3671         (estimate_calls_size_and_time): Likewise.
3672         (estimate_node_size_and_time): Likewise.
3673         (inline_update_callee_summaries): Likewise.
3674         (remap_edge_change_prob): Likewise.
3675         (remap_edge_summaries): Likewise.
3676         (ipa_merge_fn_summary_after_inlining): Likewise.
3677         (ipa_update_overall_fn_summary): Likewise.
3678         (read_ipa_call_summary): Likewise.
3679         (inline_read_section): Likewise.
3680         (write_ipa_call_summary): Likewise.
3681         (ipa_fn_summary_write): Likewise.
3682         (ipa_free_fn_summary): Likewise.
3683         * ipa-hsa.c (process_hsa_functions): Likewise.
3684         (ipa_hsa_write_summary): Likewise.
3685         (ipa_hsa_read_section): Likewise.
3686         * ipa-icf.c (sem_function::merge): Likewise.
3687         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3688         (do_estimate_edge_time): Likewise.
3689         (estimate_size_after_inlining): Likewise.
3690         (estimate_growth): Likewise.
3691         (growth_likely_positive): Likewise.
3692         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3693         (inline_call): Likewise.
3694         * ipa-inline.c (caller_growth_limits): Likewise.
3695         (can_inline_edge_p): Likewise.
3696         (can_inline_edge_by_limits_p): Likewise.
3697         (compute_uninlined_call_time): Likewise.
3698         (compute_inlined_call_time): Likewise.
3699         (want_inline_small_function_p): Likewise.
3700         (edge_badness): Likewise.
3701         (update_caller_keys): Likewise.
3702         (update_callee_keys): Likewise.
3703         (recursive_inlining): Likewise.
3704         (inline_small_functions): Likewise.
3705         (inline_to_all_callers_1): Likewise.
3706         (dump_overall_stats): Likewise.
3707         (early_inline_small_functions): Likewise.
3708         (early_inliner): Likewise.
3709         * ipa-inline.h (estimate_edge_growth): Likewise.
3710         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3711         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3712         * ipa-prop.h (IPA_NODE_REF): Likewise.
3713         (IPA_EDGE_REF): Likewise.
3714         * ipa-pure-const.c (malloc_candidate_p): Likewise.
3715         (propagate_malloc): Likewise.
3716         * ipa-split.c (execute_split_functions): Likewise.
3717         * symbol-summary.h: Rename get to get_create.
3718         (get): Likewise.
3719         (get_create): Likewise.
3720         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3722 2018-06-08  Martin Liska  <mliska@suse.cz>
3724         * symbol-summary.h (release): Move definition out of class
3725         declaration.
3726         (symtab_removal): Likewise.
3727         (symtab_duplication): Likewise.
3729 2018-06-08  Martin Liska  <mliska@suse.cz>
3731         * symbol-summary.h (function_summary): Move constructor
3732         implementation out of class declaration.
3733         (release): Likewise.
3734         (symtab_insertion): Likewise.
3735         (symtab_removal): Likewise.
3736         (symtab_duplication): Likewise.
3737         (get): Likewise.
3739 2018-06-08  Martin Liska  <mliska@suse.cz>
3741         * Makefile.in: Remove support for MPX (macros, related functions,
3742         fields in cgraph_node, ...).
3743         * builtin-types.def (BT_BND): Likewise.
3744         (BT_FN_BND_CONST_PTR): Likewise.
3745         (BT_FN_CONST_PTR_BND): Likewise.
3746         (BT_FN_VOID_PTR_BND): Likewise.
3747         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
3748         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
3749         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
3750         (expand_builtin_mempcpy_with_bounds): Likewise.
3751         (expand_builtin_memset_with_bounds): Likewise.
3752         (expand_builtin_memset_args): Likewise.
3753         (std_expand_builtin_va_start): Likewise.
3754         (expand_builtin): Likewise.
3755         (expand_builtin_with_bounds): Likewise.
3756         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
3757         (DEF_LIB_BUILTIN_CHKP): Likewise.
3758         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
3759         (DEF_CHKP_BUILTIN): Likewise.
3760         (BUILT_IN_MEMCPY): Likewise.
3761         (BUILT_IN_MEMMOVE): Likewise.
3762         (BUILT_IN_MEMPCPY): Likewise.
3763         (BUILT_IN_MEMSET): Likewise.
3764         (BUILT_IN_STPCPY): Likewise.
3765         (BUILT_IN_STRCAT): Likewise.
3766         (BUILT_IN_STRCHR): Likewise.
3767         (BUILT_IN_STRCPY): Likewise.
3768         (BUILT_IN_STRLEN): Likewise.
3769         (BUILT_IN_MEMCPY_CHK): Likewise.
3770         (BUILT_IN_MEMMOVE_CHK): Likewise.
3771         (BUILT_IN_MEMPCPY_CHK): Likewise.
3772         (BUILT_IN_MEMSET_CHK): Likewise.
3773         (BUILT_IN_STPCPY_CHK): Likewise.
3774         (BUILT_IN_STRCAT_CHK): Likewise.
3775         (BUILT_IN_STRCPY_CHK): Likewise.
3776         * calls.c (store_bounds): Likewise.
3777         (emit_call_1): Likewise.
3778         (special_function_p): Likewise.
3779         (maybe_warn_nonstring_arg): Likewise.
3780         (initialize_argument_information): Likewise.
3781         (finalize_must_preallocate): Likewise.
3782         (compute_argument_addresses): Likewise.
3783         (expand_call): Likewise.
3784         * cfgexpand.c (expand_call_stmt): Likewise.
3785         (expand_return): Likewise.
3786         (expand_gimple_stmt_1): Likewise.
3787         (pass_expand::execute): Likewise.
3788         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
3789         (cgraph_node::remove): Likewise.
3790         (cgraph_node::dump): Likewise.
3791         (cgraph_node::verify_node): Likewise.
3792         * cgraph.h (chkp_function_instrumented_p): Likewise.
3793         (symtab_node::get_alias_target): Likewise.
3794         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
3795         (cgraph_local_p): Likewise.
3796         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
3797         (cgraph_edge::rebuild_references): Likewise.
3798         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
3799         (walk_polymorphic_call_targets): Likewise.
3800         (cgraph_node::expand_thunk): Likewise.
3801         (symbol_table::output_weakrefs): Likewise.
3802         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
3803         (ix86_handle_option): Likewise.
3804         * config/i386/constraints.md: Likewise.
3805         * config/i386/i386-builtin-types.def (BND): Likewise.
3806         (VOID): Likewise.
3807         (PVOID): Likewise.
3808         (ULONG): Likewise.
3809         * config/i386/i386-builtin.def (BDESC_END): Likewise.
3810         (BDESC_FIRST): Likewise.
3811         (BDESC): Likewise.
3812         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
3813         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
3814         * config/i386/i386.c (enum reg_class): Likewise.
3815         (ix86_target_string): Likewise.
3816         (ix86_option_override_internal): Likewise.
3817         (ix86_conditional_register_usage): Likewise.
3818         (ix86_valid_target_attribute_inner_p): Likewise.
3819         (ix86_set_indirect_branch_type): Likewise.
3820         (ix86_set_current_function): Likewise.
3821         (ix86_function_arg_regno_p): Likewise.
3822         (init_cumulative_args): Likewise.
3823         (ix86_function_arg_advance): Likewise.
3824         (ix86_function_arg): Likewise.
3825         (ix86_pass_by_reference): Likewise.
3826         (ix86_function_value_regno_p): Likewise.
3827         (ix86_function_value_1): Likewise.
3828         (ix86_function_value_bounds): Likewise.
3829         (ix86_return_in_memory): Likewise.
3830         (ix86_setup_incoming_vararg_bounds): Likewise.
3831         (ix86_va_start): Likewise.
3832         (indirect_thunk_need_prefix): Likewise.
3833         (print_reg): Likewise.
3834         (ix86_print_operand): Likewise.
3835         (ix86_expand_call): Likewise.
3836         (ix86_output_function_return): Likewise.
3837         (reg_encoded_number): Likewise.
3838         (BDESC_VERIFYS): Likewise.
3839         (ix86_init_mpx_builtins): Likewise.
3840         (ix86_init_builtins): Likewise.
3841         (ix86_emit_cmove): Likewise.
3842         (ix86_emit_move_max): Likewise.
3843         (ix86_expand_builtin): Likewise.
3844         (ix86_builtin_mpx_function): Likewise.
3845         (ix86_get_arg_address_for_bt): Likewise.
3846         (ix86_load_bounds): Likewise.
3847         (ix86_store_bounds): Likewise.
3848         (ix86_load_returned_bounds): Likewise.
3849         (ix86_store_returned_bounds): Likewise.
3850         (ix86_class_likely_spilled_p): Likewise.
3851         (ix86_hard_regno_mode_ok): Likewise.
3852         (x86_order_regs_for_local_alloc): Likewise.
3853         (ix86_mitigate_rop): Likewise.
3854         (ix86_bnd_prefixed_insn_p): Likewise.
3855         (ix86_mpx_bound_mode): Likewise.
3856         (ix86_make_bounds_constant): Likewise.
3857         (ix86_initialize_bounds): Likewise.
3858         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
3859         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
3860         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
3861         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
3862         (TARGET_CHKP_BOUND_MODE): Likewise.
3863         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
3864         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
3865         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
3866         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
3867         * config/i386/i386.h (TARGET_MPX): Likewise.
3868         (TARGET_MPX_P): Likewise.
3869         (VALID_BND_REG_MODE): Likewise.
3870         (FIRST_BND_REG): Likewise.
3871         (LAST_BND_REG): Likewise.
3872         (enum reg_class): Likewise.
3873         (BND_REG_P): Likewise.
3874         (BND_REGNO_P): Likewise.
3875         (BNDmode): Likewise.
3876         (ADJUST_INSN_LENGTH): Likewise.
3877         * config/i386/i386.md: Likewise.
3878         * config/i386/i386.opt: Likewise.
3879         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
3880         (defined): Likewise.
3881         (LINK_MPX): Likewise.
3882         (MPX_SPEC): Likewise.
3883         (LIBMPX_SPEC): Likewise.
3884         (LIBMPXWRAPPERS_SPEC): Likewise.
3885         (CHKP_SPEC): Likewise.
3886         * config/i386/predicates.md: Likewise.
3887         * dbxout.c (dbxout_type): Likewise.
3888         * doc/extend.texi: Likewise.
3889         * doc/invoke.texi: Likewise.
3890         * doc/md.texi: Likewise.
3891         * doc/tm.texi: Likewise.
3892         * doc/tm.texi.in: Likewise.
3893         * dwarf2out.c (is_base_type): Likewise.
3894         (gen_formal_types_die): Likewise.
3895         (gen_subprogram_die): Likewise.
3896         (gen_type_die_with_usage): Likewise.
3897         (gen_decl_die): Likewise.
3898         (dwarf2out_late_global_decl): Likewise.
3899         * expr.c (expand_assignment): Likewise.
3900         (emit_storent_insn): Likewise.
3901         (store_expr_with_bounds): Likewise.
3902         (store_expr): Likewise.
3903         (expand_expr_real_1): Likewise.
3904         * expr.h (store_expr_with_bounds): Likewise.
3905         * function.c (use_register_for_decl): Likewise.
3906         (struct bounds_parm_data): Likewise.
3907         (assign_parms_augmented_arg_list): Likewise.
3908         (assign_parm_find_entry_rtl): Likewise.
3909         (assign_parm_is_stack_parm): Likewise.
3910         (assign_parm_load_bounds): Likewise.
3911         (assign_bounds): Likewise.
3912         (assign_parms): Likewise.
3913         (expand_function_start): Likewise.
3914         * gcc.c (CHKP_SPEC): Likewise.
3915         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
3916         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
3917         (wrestrict_dom_walker::check_call): Likewise.
3918         * gimple.c (gimple_build_call_from_tree): Likewise.
3919         * gimple.h (enum gf_mask): Likewise.
3920         (gimple_call_with_bounds_p): Likewise.
3921         (gimple_call_set_with_bounds): Likewise.
3922         * gimplify.c (gimplify_init_constructor): Likewise.
3923         * ipa-cp.c (initialize_node_lattices): Likewise.
3924         (propagate_constants_across_call): Likewise.
3925         (find_more_scalar_values_for_callers_subset): Likewise.
3926         * ipa-hsa.c (process_hsa_functions): Likewise.
3927         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
3928         * ipa-icf.c (sem_function::merge): Likewise.
3929         * ipa-inline.c (early_inliner): Likewise.
3930         * ipa-pure-const.c (warn_function_noreturn): Likewise.
3931         (warn_function_cold): Likewise.
3932         (propagate_pure_const): Likewise.
3933         * ipa-ref.h (enum GTY): Likewise.
3934         * ipa-split.c (find_retbnd): Likewise.
3935         (consider_split): Likewise.
3936         (split_function): Likewise.
3937         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3938         * ipa.c (walk_polymorphic_call_targets): Likewise.
3939         (symbol_table::remove_unreachable_nodes): Likewise.
3940         (process_references): Likewise.
3941         (cgraph_build_static_cdtor_1): Likewise.
3942         * lto-cgraph.c (lto_output_node): Likewise.
3943         (output_refs): Likewise.
3944         (compute_ltrans_boundary): Likewise.
3945         (input_overwrite_node): Likewise.
3946         (input_node): Likewise.
3947         (input_cgraph_1): Likewise.
3948         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
3949         * passes.c (pass_manager::execute_early_local_passes): Likewise.
3950         (class pass_chkp_instrumentation_passes): Likewise.
3951         (make_pass_chkp_instrumentation_passes): Likewise.
3952         * passes.def: Likewise.
3953         * rtl.h (struct GTY): Likewise.
3954         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
3955         * stor-layout.c (layout_type): Likewise.
3956         * symtab.c: Likewise.
3957         * target.def: Likewise.
3958         * targhooks.c (default_chkp_bound_type): Likewise.
3959         (default_chkp_bound_mode): Likewise.
3960         (default_builtin_chkp_function): Likewise.
3961         (default_chkp_function_value_bounds): Likewise.
3962         (default_chkp_make_bounds_constant): Likewise.
3963         (default_chkp_initialize_bounds): Likewise.
3964         * targhooks.h (default_chkp_bound_type): Likewise.
3965         (default_chkp_bound_mode): Likewise.
3966         (default_builtin_chkp_function): Likewise.
3967         (default_chkp_function_value_bounds): Likewise.
3968         (default_chkp_make_bounds_constant): Likewise.
3969         (default_chkp_initialize_bounds): Likewise.
3970         * toplev.c (compile_file): Likewise.
3971         (process_options): Likewise.
3972         * tree-core.h (DEF_BUILTIN): Likewise.
3973         (DEF_BUILTIN_CHKP): Likewise.
3974         * tree-inline.c (declare_return_variable): Likewise.
3975         (remap_gimple_stmt): Likewise.
3976         (copy_bb): Likewise.
3977         (initialize_inlined_parameters): Likewise.
3978         (expand_call_inline): Likewise.
3979         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
3980         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
3981         (make_pass_ipa_chkp_produce_thunks): Likewise.
3982         (make_pass_chkp): Likewise.
3983         (make_pass_chkp_opt): Likewise.
3984         (make_pass_chkp_instrumentation_passes): Likewise.
3985         * tree-pretty-print.c (dump_generic_node): Likewise.
3986         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
3987         * tree-ssa-dce.c (propagate_necessity): Likewise.
3988         (eliminate_unnecessary_stmts): Likewise.
3989         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
3990         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3991         * tree-ssa-sccvn.h: Likewise.
3992         * tree-ssa-strlen.c (get_string_length): Likewise.
3993         (valid_builtin_call): Likewise.
3994         (adjust_last_stmt): Likewise.
3995         (handle_builtin_strchr): Likewise.
3996         (handle_builtin_strcpy): Likewise.
3997         (handle_builtin_stxncpy): Likewise.
3998         (handle_builtin_memcpy): Likewise.
3999         (handle_builtin_strcat): Likewise.
4000         (strlen_check_and_optimize_stmt): Likewise.
4001         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
4002         * tree-streamer-in.c: Likewise.
4003         * tree-streamer.c (record_common_node): Likewise.
4004         * tree.c (tree_code_size): Likewise.
4005         (wide_int_to_tree_1): Likewise.
4006         (type_contains_placeholder_1): Likewise.
4007         (build_common_tree_nodes): Likewise.
4008         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
4009         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
4010         (POINTER_BOUNDS_P): Likewise.
4011         (BOUNDED_TYPE_P): Likewise.
4012         (BOUNDED_P): Likewise.
4013         (CALL_WITH_BOUNDS_P): Likewise.
4014         (pointer_bounds_type_node): Likewise.
4015         * value-prof.c (gimple_ic): Likewise.
4016         * var-tracking.c (vt_add_function_parameters): Likewise.
4017         * varasm.c (make_decl_rtl): Likewise.
4018         (assemble_start_function): Likewise.
4019         (output_constant): Likewise.
4020         (maybe_assemble_visibility): Likewise.
4021         * varpool.c (ctor_for_folding): Likewise.
4022         * chkp-builtins.def: Remove.
4023         * ipa-chkp.c: Remove.
4024         * ipa-chkp.h: Remove.
4025         * rtl-chkp.c: Remove.
4026         * rtl-chkp.h: Remove.
4027         * tree-chkp-opt.c: Remove.
4028         * tree-chkp.c: Remove.
4029         * tree-chkp.h: Remove.
4031 2018-06-07  Carl Love  <cel@us.ibm.com>
4033         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
4034         vextract_fp_from_shortl): Add BE support.
4036 2018-06-07  Paul Koning  <ni1d@arrl.net>
4038         * compare-elim.c (try_merge_compare): Don't merge compare if
4039         address contains a side effect.
4040         (try_eliminate_compare): Likewise.
4042 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
4044         * config.gcc: Support "tremont".
4045         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
4046         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4047         PROCESSOR_TREMONT.
4048         * config/i386/i386.c (m_TREMONT): Define.
4049         (processor_target_table): Add "tremont".
4050         (PTA_TREMONT): Define.
4051         (ix86_lea_outperforms): Add TARGET_TREMONT.
4052         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
4053         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
4054         and M_INTEL_GOLDMONT_PLUS.
4055         (fold_builtin_cpu): Add "tremont".
4056         (ix86_add_stmt_cost): Add TARGET_TREMONT.
4057         (ix86_option_override_internal): Add "tremont".
4058         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
4059         (processor_type): Add PROCESSOR_TREMONT.
4060         * config/i386/x86-tune.def: Add m_TREMONT.
4061         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
4063 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4065         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
4066         symbol defined for msp430i* devices to be lower case.
4068         gcc/testsuite/gcc.target/msp430/
4069         * msp430i-device-symbol.c: New test.
4070         * msp430f-device-symbol.c: New test.
4071         * msp430.h: New test header file.
4073 2018-06-07  Richard Biener  <rguenther@suse.de>
4075         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
4076         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
4077         Properly wrap signed arithmetic if overflow wraps.
4079 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
4081         PR tree-optimization/69615
4082         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
4083         of a cast from a same precision integral SSA_NAME in a bb dominated
4084         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
4085         cast to utype if rhs2 has already a compatible type.
4087 2018-06-07  Richard Biener  <rguenther@suse.de>
4089         PR tree-optimization/85935
4090         * graphite-scop-detection.c (find_params_in_bb): Analyze
4091         condition operands with respect to the correct loop.  Assert
4092         the analysis doesn't fail.
4094 2018-06-04  Carl Love  <cel@us.ibm.com>
4096         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
4097         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
4098         as it is slightly cheaper.
4099         (first_match_or_eos_index_<mode>):
4100         Calculate index using natural element order.
4101         (first_match_index_<mode>):
4102         Calculate index using natural element order.
4103         (first_match_or_eos_index_<mode>):
4104         Calculate index using natural order.
4105         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
4106         for BE and LE modes.
4107         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
4108         P9V_BUILTIN_VCLZLSBB_V16QI.
4109         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
4110         specific.
4112 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4114         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
4115         indentation and line wrap for many prototypes.  Add missing
4116         @smallexample directives around block of prototypes for vec_xl and
4117         vec_xst.
4119 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
4121         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
4122         track if we pass or return IEEE 128-bit floating point.
4123         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
4124         C++ mangling that is compatible with GCC 8.1.
4125         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
4126         (init_cumulative_args): Note if we pass or return IEEE 128-bit
4127         floating point types.
4128         (rs6000_function_arg_advance_1): Likewise.
4129         (rs6000_mangle_type): Optionally generate mangled names that match
4130         what GCC 8.1 generated for IEEE 128-bit floating point types.
4131         (rs6000_globalize_decl_name): If we have an external function that
4132         passes or returns IEEE 128-bit types, generate a weak reference
4133         from the mangled name used in GCC 8.1 to the current mangled
4134         name.
4135         (rs6000_init_builtins): Make __ibm128 use the long double type if
4136         long double is IBM extended double.  Make __float128 use the long
4137         double type if long double is IEEE 128-bit.
4139         PR target/85657
4140         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
4141         macro for __ibm128 built-in functions.
4142         (PACK_IF): Add __ibm128 pack/unpack functions.
4143         (UNPACK_IF): Likewise.
4144         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
4145         enable long double built-in functions if long double is IEEE
4146         128-bit floating point.
4147         (rs6000_invalid_builtin): Update long double built-in function
4148         error message.
4149         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
4150         functions, adjust the built-in function to use the long double
4151         built-in function if __ibm128 and long double are the same type.
4152         * doc/extend.texi (PowerPC builtins): Update documention for
4153         __builtin_{,un}pack_longdouble.  Add documentation for
4154         __builtin_{,un}pack_ibm128.
4156 2018-06-06  Jim Wilson  <jimw@sifive.com>
4158         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
4159         (struct machine_function): New field interrupt_mode.
4160         (riscv_handle_type_attribute): New function.  Add forward declaration.
4161         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
4162         (riscv_expand_epilogue): Check interrupt_mode field.
4163         (riscv_set_current_function): Check interrupt attribute args and
4164         set interrupt_mode field.
4165         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
4166         (riscv_sret, riscv_uret): New.
4167         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
4168         new arguments to interrupt attribute.
4170 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
4172         PR target/63177
4173         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
4174         Don't handle -mcpu=power8 if -mpower9-vector is also used.
4176 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4178         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
4179         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
4180         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4181         several redundant entries.
4183 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
4185         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
4186         type from "rtx" to "rtx_insn *".
4187         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
4188         for local "call_insn", removing cast.
4189         (ix86_expand_call): Likewise, introducing a "call_insn" local.
4191 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
4193         PR tree-optimization/86066
4194         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
4195         for BIT_INSERT_EXPR stores.
4197 2018-06-06  Richard Biener  <rguenther@suse.de>
4199         PR tree-optimization/86062
4200         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4201         component refs ontop
4202         of to be offsetted base.
4204 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4206         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
4207         to be static and remove check on interrupt attribute name.
4209         gcc/testsuite/gcc.target/msp430/
4210         * function-attributes-4.c: New test.
4211         * static-interrupts.c: New test.
4213 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4215         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4216         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
4218 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
4220         PR target/79924
4221         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
4222         second argument.
4223         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
4224         Remove second argument, change how error is called.
4225         (aarch64_layout_arg): Remove second argument from
4226         aarch64_err_no_fpadvsimd call.
4227         (aarch64_init_cumulative_args): Ditto.
4228         (aarch64_gimplify_va_arg_expr): Ditto.
4229         * config/aarch64/aarch64.md (mov<mode>): Ditto.
4231 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
4233         * config/i386/i386.md (simple_return_indirect_internal): New expander.
4234         (*simple_return_indirect_internal<mode>): Rename from
4235         simple_return_indirect_internal.  Use W mode iterator.
4236         (rstorssp): New expander.
4237         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
4238         (clrssbsy): New expander.
4239         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
4241 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4243         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4244         __typeof__.
4245         (cmse_check_pointed_object): Likewise.
4247 2018-06-05  Martin Liska  <mliska@suse.cz>
4249         PR gcov-profile/47618
4250         * doc/invoke.texi: Document how -fprofile-dir format
4251         is extended.
4253 2018-06-05  Richard Biener  <rguenther@suse.de>
4255         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4256         removal pretend DOM info isn't available so we do not update
4257         it and only remove edges, not dominated blocks.  Actually free
4258         DOM info in case we removed something.  Remove unreachable blocks.
4259         (mfb_keep_latches): Work with either DOM info or marked backedges.
4260         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4261         first.  Mark backedges if DOM info isn't available.
4262         (Re-)compute DOM info after cleanup_control_flow_pre.
4264 2018-06-05  Richard Biener  <rguenther@suse.de>
4266         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4267         (locus_discrim_hasher::hash): Adjust.
4268         (locus_discrim_hasher::equal): Likewise.
4269         (next_discriminator_for_locus): Work on line directly.
4270         (same_line_p): Pass in expanded locus1 as well.
4271         (assign_discriminators): Avoid redundant location expansions.
4273 2018-06-05  Richard Biener  <rguenther@suse.de>
4275         PR tree-optimization/86046
4276         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4277         if required after clearing TREE_ADDRESSABLE.
4279 2018-06-05  Richard Biener  <rguenther@suse.de>
4281         PR tree-optimization/86047
4282         * tree-ssa-loop.c (for_each_index): Glob handling of all
4283         decls and constants and really handle all of them.
4285 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4287         PR target/81497
4288         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4289         qualifier_void_pointer and qualifier_const_void_pointer.
4290         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4291         (arm_init_builtins): Handle the above.
4292         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4293         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4294         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4295         void intrinsics.
4297 2018-06-05  Martin Liska  <mliska@suse.cz>
4299         * auto-profile.c (read_autofdo_file): Do not use
4300         gcov_ctr_summary struct.
4301         (afdo_callsite_hot_enough_for_early_inline): Likewise.
4302         * coverage.c (struct counts_entry): Likewise.
4303         (read_counts_file): Read just single summary entry.
4304         (get_coverage_counts): Use gcov_summary struct.
4305         * coverage.h (get_coverage_counts): Likewise.
4306         * gcov-dump.c (dump_working_sets): Likewise.
4307         (tag_summary): Dump just single summary.
4308         * gcov-io.c (gcov_write_summary): Write just histogram
4309         summary.
4310         (gcov_read_summary): Read just single summary.
4311         (compute_working_sets): Use gcov_summary struct.
4312         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4313         of GCOV_COUNTERS_SUMMABLE.
4314         (GCOV_COUNTERS_SUMMABLE): Remove.
4315         (GCOV_FIRST_VALUE_COUNTER): Replace with
4316         GCOV_COUNTER_V_INTERVAL.
4317         (struct gcov_ctr_summary): Remove.
4318         (struct gcov_summary): Directly use fields of former
4319         gcov_ctr_summary.
4320         (compute_working_sets): Use gcov_summary struct.
4321         * gcov.c (read_count_file): Do not use ctrs fields.
4322         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4323         struct.
4324         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4325         struct.
4326         * profile.c: Likewise.
4327         * profile.h: Likewise.
4329 2018-06-05  Martin Liska  <mliska@suse.cz>
4331         PR gcov-profile/84846
4332         * gcov.c (output_lines): Print working directory only
4333         in intermediate format.
4335 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
4337         * config/s390/s390-builtin-types.def: Add void function type.
4338         * config/s390/s390-builtins.def: Use the function type for the
4339         tbeginc builtin.
4341 2018-06-04  Jim Wilson  <jimw@sifive.com>
4343         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4344         to int.
4345         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4346         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
4347         handle EH_RETURN_DATA_REGNO registers properly.
4348         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4349         (riscv_expand_epilogue): Update comment.  Change argument name and
4350         type.  Update code to use new name and type.  Pass new args to
4351         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
4352         EXCEPTION_RETURN.
4353         * config/riscv/riscv.md (NORMAL_RETURN): New.
4354         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4355         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4356         (eh_return): Call gen_eh_return_internal and emit barrier.
4357         (eh_return_internal): Call riscv_expand_epilogue.
4359 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
4361         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4362         bit_insertion field and declare can_be_merged_into method.
4363         (merged_store_group::can_be_merged_into): New method.
4364         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4365         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
4366         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4368 2018-06-04  Richard Biener  <rguenther@suse.de>
4370         PR tree-optimization/85955
4371         * builtins.c (fold_builtin_sincos): Convert pointers to
4372         destination to appropriate type before dereferencing.
4374 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
4376         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4378 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
4380         * expr.c (expand_expr_real_1): Force the operand into memory if
4381         its TYPE_MODE is BLKmode and if there is no integer mode for
4382         the number of bits being extracted.
4384 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4386         PR target/85832
4387         PR target/86036
4388         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4389         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4391 2018-06-04  Richard Biener  <rguenther@suse.de>
4393         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4394         (cleanup_tree_cfg_noloop): ... single caller.  Do
4395         start_recording_case_labels later.
4397 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
4399         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4400         to _IMMINTRIN_H_INCLUDED.
4401         * config/i386/pconfigintrin.h: Ditto.
4402         * config/i386/waitpkgintrin.h: Ditto.
4403         * config/i386/immintrin.h: Add includes for sgxintrin.h,
4404         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4405         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4406         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4407         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4408         waitpkgintrin.h and cldemoteintrin.h.
4410 2018-06-04  Richard Biener  <rguenther@suse.de>
4412         PR tree-optimization/86038
4413         * tracer.c (find_best_successor): Check probability for
4414         being initialized, bail out if not.
4416 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
4418         PR target/86003
4419         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4420         of bits to ignore when comparing architectures.
4422 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
4424         PR tree-optimization/69615
4425         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4426         maximum or minimum of the type, try to merge it also as if
4427         range1 is + [-, x - 1] or + [x + 1, -].
4429         PR c++/86025
4430         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4432 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
4434         PR tree-optimization/86034
4435         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4436         the unsigned bitfield type in a bit insertion sequence if it does not
4437         have a larger precision than the bitfield size.
4438         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4440 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
4442         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4444 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4446         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4447         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4448         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4449         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
4451 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4453         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
4454         Disable -fdelete-null-pointer-checks for ELF toolchain.
4456 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4457             Kito Cheng  <kito.cheng@gmail.com>
4459         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
4460         (nds32le-*-*, nds32be-*-*): Integrate checking process.
4461         (nds32*-*-*): Add glibc and uclibc conditions.
4462         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
4463         (TARGET_EXCEPT_UNWIND_INFO): Define.
4464         * config/nds32/elf.h: New file.
4465         * config/nds32/linux.h: New file.
4466         * config/nds32/nds32-elf.opt: New file.
4467         * config/nds32/nds32-linux.opt: New file.
4468         * config/nds32/nds32-fp-as-gp.c
4469         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
4470         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
4471         TARGET_LINUX_ABI.
4472         (nds32_asm_file_end): Ditto.
4473         (nds32_print_operand): Ditto.
4474         (nds32_insert_attributes): Ditto.
4475         (nds32_init_libfuncs): New function.
4476         (TARGET_HAVE_TLS): Define.
4477         (TARGET_INIT_LIBFUNCS): Define.
4478         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
4479         spec content.
4480         (TARGET_ELF): Apply different mcmodel setting.
4481         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
4482         been migrated into elf.h and linux.h files.
4483         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
4484         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
4485         (mcmodel): The content has been migrated into nds32-elf.opt and
4486         nds32-linux.opt files.
4487         * config/nds32/t-elf: New file.
4488         * config/nds32/t-linux: New file.
4490 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
4491             Shiva Chen  <shiva0217@gmail.com>
4493         * config/nds32/constants.md (unspec_volatile_element): Add
4494         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
4495         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
4496         optimization.
4497         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
4498         (make_pass_nds32_fp_as_gp): Declare.
4499         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
4500         optmization pass.
4501         (nds32_asm_function_end_prologue): Remove unused asm output.
4502         (nds32_asm_function_begin_epilogue): Remove unused asm output.
4503         (nds32_asm_file_start): Output necessary fp_as_gp information.
4504         (nds32_option_override): Adjust register usage.
4505         (nds32_expand_prologue): Consider fp_as_gp situation.
4506         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
4507         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
4508         (epilogue): Ditto.
4509         (return): Ditto.
4510         (simple_return): Ditto.
4511         (omit_fp_begin): Output special directive for fp_as_gp.
4512         (omit_fp_end): Output special directive for fp_as_gp.
4513         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
4514         mforbid-fp-as-gp): New options.
4516 2018-06-01  Mark Wielaard  <mark@klomp.org>
4518         * dwarf2out.c (dwarf2out_finish): Remove generation of
4519         DW_AT_loclists_base.
4521 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
4523         * gimple-ssa-store-merging.c: Include gimple-fold.h.
4524         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
4525         (struct merged_store_group): Add bit_insertion field.
4526         (dump_char_array): Use standard hexadecimal format.
4527         (merged_store_group::merged_store_group): Set bit_insertion to false.
4528         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
4529         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
4530         also print the mask in the dump file.
4531         (pass_store_merging::gate): Minor tweak.
4532         (imm_store_chain_info::coalesce_immediate): Fix wrong association
4533         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
4534         stores with INTEGER_CST stores.
4535         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
4536         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
4537         and use it throughout.  Generate bit insertion sequences if need be.
4538         (pass_store_merging::process_store): Remove redundant condition.
4539         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
4541 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
4543         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
4544         the 128-bit floating point types.  Fix function comment.
4546 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4548         * config/aarch64/aarch64-simd.md
4549         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
4550         mnemonics.
4551         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
4552         mnemonics.
4554 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
4556         PR tree-optimization/85989
4557         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
4558         variable.
4559         (backprop::intersect_uses): Check it when deciding whether this
4560         is a backedge reference.
4561         (backprop::process_block): Add each phi to m_visited_phis
4562         after visiting it, then clear it at the end.
4564 2018-06-01  Richard Biener  <rguenther@suse.de>
4566         * tree-vectorizer.h (vect_dr_stmt): New function.
4567         (vect_get_load_cost): Adjust.
4568         (vect_get_store_cost): Likewise.
4569         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
4570         Use vect_dr_stmt instead of DR_SMTT.
4571         (vect_record_base_alignments): Likewise.
4572         (vect_calculate_target_alignment): Likewise.
4573         (vect_compute_data_ref_alignment): Likewise and make static.
4574         (vect_update_misalignment_for_peel): Likewise.
4575         (vect_verify_datarefs_alignment): Likewise.
4576         (vector_alignment_reachable_p): Likewise.
4577         (vect_get_data_access_cost): Likewise.  Pass down
4578         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
4579         (vect_get_peeling_costs_all_drs): Likewise.
4580         (vect_peeling_hash_get_lowest_cost): Likewise.
4581         (vect_enhance_data_refs_alignment): Likewise.
4582         (vect_find_same_alignment_drs): Likewise.
4583         (vect_analyze_data_refs_alignment): Likewise.
4584         (vect_analyze_group_access_1): Likewise.
4585         (vect_analyze_group_access): Likewise.
4586         (vect_analyze_data_ref_access): Likewise.
4587         (vect_analyze_data_ref_accesses): Likewise.
4588         (vect_vfa_segment_size): Likewise.
4589         (vect_small_gap_p): Likewise.
4590         (vectorizable_with_step_bound_p): Likewise.
4591         (vect_prune_runtime_alias_test_list): Likewise.
4592         (vect_analyze_data_refs): Likewise.
4593         (vect_supportable_dr_alignment): Likewise.
4594         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4595         (vect_gen_prolog_loop_niters): Likewise.
4596         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4597         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
4598         modify DR_STMT.
4599         (vect_recog_mask_conversion_pattern): Likewise.
4600         (vect_try_gather_scatter_pattern): Likewise.
4601         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
4602         to vect_get_store_cost.
4603         (vect_get_store_cost): Get stmt_info instead of DR.
4604         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
4605         (vect_get_load_cost): Get stmt_info instead of DR.
4607 2018-06-01  Richard Biener  <rguenther@suse.de>
4609         PR middle-end/86017
4610         * gimple-fold.c (var_decl_component_p): Also allow offsetted
4611         vars wrapped in MEM_REFs.
4613 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
4615         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4616         Fix subreg tests so that we only return a choice between
4617         GENERAL_REGS and FP_REGS if the original classes included both.
4619 2018-06-01  Richard Biener  <rguenther@suse.de>
4621         PR ipa/85960
4622         * tree-ssa-structalias.c (get_function_part_constraint):
4623         Handle NULL fi->decl.
4624         (find_func_aliases_for_call): Properly handle indirect
4625         fi from direct call.
4626         (find_func_clobbers): Likewise.
4627         (ipa_pta_execute): Likewise.
4628         (create_variable_info_for): For functions that are ifunc_resolver
4629         resolve to a varinfo that contains the result of the resolver call.
4630         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
4631         aliases.
4633 2018-05-31  Michael Collison  <michael.collison@arm.com>
4635         * config/aarch64/aarch64.md:
4636         (*fix_to_zero_extenddfdi2): New pattern.
4637         * gcc.target/aarch64/fix_extend1.c: New testcase.
4639 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
4641         PR middle-end/78809
4642         PR middle-end/83026
4643         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
4644         and BUILT_IN_STRNCMP_EQ.
4645         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
4646         BUILT_IN_STRNCMP_EQ.
4647         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
4648         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4649         (gimple_fold_builtin): Likewise.
4650         * tree-ssa-strlen.c (compute_string_length): New function.
4651         (determine_min_obsize): New function.
4652         (handle_builtin_string_cmp): New function to handle calls to
4653         string compare functions.
4654         (strlen_optimize_stmt): Add handling to builtin string compare
4655         calls.
4656         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
4657         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4658         * tree.c (build_common_builtin_nodes): Add new defines of
4659         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
4661 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
4663         PR target/85984
4664         * bb-reorder.c (pass_partition_blocks::gate): Return false for
4665         functions with naked attribute.
4667 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
4669         * config/i386/sse.md (avx_vec_concat<mode>):
4670         Substitute concat_tg_mode mode attribute with xtg_mode.
4671         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
4672         (concat_tg_mode): Remove mode attribute.
4674 2018-05-31  Martin Sebor  <msebor@redhat.com>
4676         PR c/82063
4677         * calls.c (alloc_max_size): Correct a logic error/typo.
4678         Treat excessive arguments as infinite.  Warn for invalid arguments.
4679         * doc/invoke.texi (-Walloc-size-larger-than): Update.
4681 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
4683         PR target/85829
4684         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4685         and movx for Haswell.
4687 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
4688             Cesar Philippidis  <cesar@codesourcery.com>
4690         PR middle-end/85879
4691         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
4692         when emitting error on private/firstprivate reductions.
4693         * omp-low.c (lower_omp_target): Avoid reference-type processing
4694         on pointers for firstprivate clause.
4696 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4698         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
4699         (st1x2): Likewise.
4700         (st1x3): Likewise.
4701         * config/aarch64/aarch64-simd.md
4702         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
4703         (aarch64_ld1_x3_<mode>): Likewise
4704         (aarch64_st1x2<VALLDIF:mode>): Likewise
4705         (aarch64_st1_x2_<mode>): Likewise
4706         (aarch64_st1x3<VALLDIF:mode>): Likewise
4707         (aarch64_st1_x3_<mode>): Likewise
4708         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
4709         (vld1_s8_x3): Likewise.
4710         (vld1_u16_x3): Likewise.
4711         (vld1_s16_x3): Likewise.
4712         (vld1_u32_x3): Likewise.
4713         (vld1_s32_x3): Likewise.
4714         (vld1_u64_x3): Likewise.
4715         (vld1_s64_x3): Likewise.
4716         (vld1_f16_x3): Likewise.
4717         (vld1_f32_x3): Likewise.
4718         (vld1_f64_x3): Likewise.
4719         (vld1_p8_x3): Likewise.
4720         (vld1_p16_x3): Likewise.
4721         (vld1_p64_x3): Likewise.
4722         (vld1q_u8_x3): Likewise.
4723         (vld1q_s8_x3): Likewise.
4724         (vld1q_u16_x3): Likewise.
4725         (vld1q_s16_x3): Likewise.
4726         (vld1q_u32_x3): Likewise.
4727         (vld1q_s32_x3): Likewise.
4728         (vld1q_u64_x3): Likewise.
4729         (vld1q_s64_x3): Likewise.
4730         (vld1q_f16_x3): Likewise.
4731         (vld1q_f32_x3): Likewise.
4732         (vld1q_f64_x3): Likewise.
4733         (vld1q_p8_x3): Likewise.
4734         (vld1q_p16_x3): Likewise.
4735         (vld1q_p64_x3): Likewise.
4736         (vst1_s64_x2): Likewise.
4737         (vst1_u64_x2): Likewise.
4738         (vst1_f64_x2): Likewise.
4739         (vst1_s8_x2): Likewise.
4740         (vst1_p8_x2): Likewise.
4741         (vst1_s16_x2): Likewise.
4742         (vst1_p16_x2): Likewise.
4743         (vst1_s32_x2): Likewise.
4744         (vst1_u8_x2): Likewise.
4745         (vst1_u16_x2): Likewise.
4746         (vst1_u32_x2): Likewise.
4747         (vst1_f16_x2): Likewise.
4748         (vst1_f32_x2): Likewise.
4749         (vst1_p64_x2): Likewise.
4750         (vst1q_s8_x2): Likewise.
4751         (vst1q_p8_x2): Likewise.
4752         (vst1q_s16_x2): Likewise.
4753         (vst1q_p16_x2): Likewise.
4754         (vst1q_s32_x2): Likewise.
4755         (vst1q_s64_x2): Likewise.
4756         (vst1q_u8_x2): Likewise.
4757         (vst1q_u16_x2): Likewise.
4758         (vst1q_u32_x2): Likewise.
4759         (vst1q_u64_x2): Likewise.
4760         (vst1q_f16_x2): Likewise.
4761         (vst1q_f32_x2): Likewise.
4762         (vst1q_f64_x2): Likewise.
4763         (vst1q_p64_x2): Likewise.
4764         (vst1_s64_x3): Likewise.
4765         (vst1_u64_x3): Likewise.
4766         (vst1_f64_x3): Likewise.
4767         (vst1_s8_x3): Likewise.
4768         (vst1_p8_x3): Likewise.
4769         (vst1_s16_x3): Likewise.
4770         (vst1_p16_x3): Likewise.
4771         (vst1_s32_x3): Likewise.
4772         (vst1_u8_x3): Likewise.
4773         (vst1_u16_x3): Likewise.
4774         (vst1_u32_x3): Likewise.
4775         (vst1_f16_x3): Likewise.
4776         (vst1_f32_x3): Likewise.
4777         (vst1_p64_x3): Likewise.
4778         (vst1q_s8_x3): Likewise.
4779         (vst1q_p8_x3): Likewise.
4780         (vst1q_s16_x3): Likewise.
4781         (vst1q_p16_x3): Likewise.
4782         (vst1q_s32_x3): Likewise.
4783         (vst1q_s64_x3): Likewise.
4784         (vst1q_u8_x3): Likewise.
4785         (vst1q_u16_x3): Likewise.
4786         (vst1q_u32_x3): Likewise.
4787         (vst1q_u64_x3): Likewise.
4788         (vst1q_f16_x3): Likewise.
4789         (vst1q_f32_x3): Likewise.
4790         (vst1q_f64_x3): Likewise.
4791         (vst1q_p64_x3): Likewise.
4793 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4795         * config/msp430/msp430.c (msp430_output_labelref): Prepend
4796         user_label_prefix to name.
4798         * tree-core.h: Update comment about the format of NAME string
4799         passed to handler in attribute_spec.
4801         * config/msp430/msp430.md: Remove erroneous subreg expression from
4802         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
4803         zero_extend{q,h}isi2.
4805 2018-05-30  Borislav Petkov  <bp@suse.de>
4807         * doc/extend.texi: Document some architecture specific
4808         constraints and sort entries.
4810 2018-05-30  Martin Sebor  <msebor@redhat.com>
4812         PR middle-end/85369
4813         * builtins.c (expand_builtin_stpcpy_1): New function.
4814         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
4815         only if the former succeeds.
4817 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4819         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
4820         in saphira.
4822 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4824         * doc/invoke.texi (-flinker-output): Document
4826 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4828         * passes.c (ipa_write_summaries): Only modify statements if body
4829         is in memory.
4830         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
4831         incrementally linking.
4832         (ipa_passes): Likewise.
4833         * lto-cgraph.c (lto_output_node): When incrementally linking do not
4834         pass down resolution info.
4835         * common.opt (flag_incremental_link): Update info.
4836         * gcc.c (plugin specs): Turn flinker-output=* to
4837         -plugin-opt=-linker-output-known
4838         * toplev.c (compile_file): Also cut compilation when doing incremental
4839         link.
4840         * flag-types. (enum lto_partition_model): Add
4841         LTO_LINKER_OUTPUT_NOLTOREL.
4842         (invoke.texi): Add -flinker-output docs.
4843         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
4844         link same way as WPA; do not stream in dead initializers.
4846         * dwarf2out.c (dwarf2out_die_ref_for_decl,
4847         darf2out_register_external_decl): Support incremental link.
4849 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4851         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
4853 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
4855         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
4856         it down to simple_object_copy_lto_debug_sections.
4857         (run_gcc): Determine incremental LTO link time and configure
4858         lto1 into non-wpa mode, disable renaming of debug sections.
4860 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4862         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4863         descriptions of various incorrectly documented functions.
4865 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4867         Revert:
4868         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4869         address check not strict.
4871 2018-05-30  Richard Biener  <rguenther@suse.de>
4873         PR tree-optimization/85964
4874         * tracer.c (better_p): Drop initialized count check, we only
4875         call the function with initialized counts now.
4876         (find_best_successor): Do find a best edge if one
4877         has uninitialized count.
4878         (find_best_predecessor): Likewise.  Do BB frequency check only
4879         if count is initialized.
4881 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
4883         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
4884         (aarch64_ldrstr_offset_compare): New.
4885         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
4886         load/store orderings.
4887         (aarch64_gen_adjusted_ldpstp): Likewise.
4889 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
4891         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4892         Check for subset of GENERAL_REGS and FP_REGS.
4893         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
4894         r=w alternative.
4896 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
4898         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
4899         and wi::to_poly_offset.  Add the current offset and then check
4900         whether the sum fits, rather than using an unchecked addition of
4901         a checked term.  Check for a shwi rather than a uhwi.
4902         * expr.c (get_bit_range): Use tree_to_poly_uint64.
4903         (store_constructor): Use poly_int_tree_p.
4904         (expand_expr_real_1): Likewise.
4905         * function.c (assign_temp): Likewise.
4906         * fold-const.c (const_binop): Use poly_int_tree_p and
4907         wi::to_poly_offset.
4908         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
4909         division.
4910         * ipa-icf-gimple.c (func_checker::compare_operand): Use
4911         to_poly_offset for MEM offsets.
4912         * ipa-icf.c (sem_variable::equals): Likewise.
4913         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
4914         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
4915         wi::to_poly_offset for BIT_FIELD_REF offsets.
4916         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
4917         wi::to_poly_offset.
4918         * var-tracking.c (emit_note_insn_var_location): Use
4919         tree_to_poly_uint64.
4921 2018-05-29  Jim Wilson  <jimw@sifive.com>
4923         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
4925 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
4927         PR target/85950
4928         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4929         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4930         sequence.
4931         (sse4_1_round<mode>2): Use nonimmediate_operand
4932         for operand 1 predicate.
4934 2018-05-29  Martin Sebor  <msebor@redhat.com>
4935             Richard Biener  <rguenther@suse.de>
4937         PR testsuite/85888
4938         * calls.c (get_size_range): Call determine_value_range instead
4939         of get_value_range..
4940         * tree-vrp.h (determine_value_range): Declared new function.
4941         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
4943 2018-05-29  Richard Biener  <rguenther@suse.de>
4945         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
4946         sure to use non-pattern stmts for get_earlier_stmt arguments.
4947         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
4948         called on pattern stmts.
4949         (get_later_stmt): Likewise.
4951 2018-05-29  Martin Liska  <mliska@suse.cz>
4953         PR gcov-profile/85759
4954         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
4955         env variables.
4957 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
4959         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
4960         VEC_UNPACK_*_EXPR.
4961         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
4962         VEC_PACK_*_EXPR.
4964         PR target/85918
4965         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4966         VEC_PACK_FLOAT_EXPR): New tree codes.
4967         * tree-pretty-print.c (op_code_prio): Handle
4968         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4969         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4970         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4971         * tree-inline.c (estimate_operator_cost): Likewise.
4972         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
4973         * fold-const.c (const_binop): Likewise.
4974         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
4975         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4976         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4977         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
4978         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4979         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4980         * expr.c (expand_expr_real_2): Likewise.
4981         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
4982         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
4983         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
4984         optabs.
4985         * optabs.c (expand_widen_pattern_expr): For
4986         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
4987         sign from result type rather than operand's type.
4988         (expand_binop_directly): For vec_packu_float_optab and
4989         vec_packs_float_optab allow result type to be different from operand's
4990         type.
4991         * optabs-tree.c (optab_for_tree_code): Handle
4992         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4993         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
4994         * tree-vect-generic.c (expand_vector_operations_1):  Handle
4995         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4996         VEC_PACK_FLOAT_EXPR.
4997         * tree-vect-stmts.c (supportable_widening_operation): Handle
4998         FIX_TRUNC_EXPR.
4999         (supportable_narrowing_operation): Handle FLOAT_EXPR.
5000         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
5001         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
5002         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
5003         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
5004         mode attributes.
5005         (vec_pack<floatprefix>_float_<mode>): New expander.
5006         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
5007         attributes.
5008         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
5009         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
5010         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
5011         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
5012         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
5013         Document.
5014         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
5015         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
5016         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
5017         VEC_PACK_FLOAT_EXPR): Document.
5019 2018-05-29  Richard Biener  <rguenther@suse.de>
5021         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
5022         member.
5023         (stmt_vec_info_vec): Make pointer.
5024         (init_stmt_vec_info_vec): Remove.
5025         (free_stmt_vec_info_vec): Likewise.
5026         (set_stmt_vec_info_vec): New function.
5027         (free_stmt_vec_infos): Likewise.
5028         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
5029         (set_vinfo_for_stmt): Likewise.
5030         (get_earlier_stmt): Likewise.
5031         (get_later_stmt): Likewise.
5032         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
5033         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
5034         (vec_info::~vec_info): Free stmt_vec_infos.
5035         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
5036         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
5037         (pass_slp_vectorize::execute): Likewise.
5038         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
5039         (free_stmt_vec_info_vec): Likewise.
5040         (set_stmt_vec_info_vec): New function.
5041         (free_stmt_vec_infos): Likewise.
5042         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
5043         the global stmt_vec_info_vec.
5044         * tree-parloops.c (gather_scalar_reductions): Use
5045         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
5046         vector.
5048 2018-05-29  Richard Biener  <rguenther@suse.de>
5050         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
5052 2018-05-29  Martin Liska  <mliska@suse.cz>
5053             David Malcolm  <dmalcolm@redhat.com>
5055         * vec.c (test_reverse): New.
5056         (vec_c_tests): Add new test.
5057         * vec.h (vl_ptr>::reverse): New function.
5059 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
5061         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
5063         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
5064         and later.
5066 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5068         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
5070 2018-05-28  Richard Biener  <rguenther@suse.de>
5072         PR tree-optimization/85933
5073         * tree-vect-data-refs.c (vect_record_base_alignments): Only
5074         look at stmts marked as vectorizable.
5076 2018-05-28  Richard Biener  <rguenther@suse.de>
5078         PR tree-optimization/85934
5079         * tree-vect-generic.c (expand_vector_operations_1): Hoist
5080         vector boolean check before scalar optimization.
5082 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
5084         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
5085         for armv5te.
5087 2018-05-28  Mark Wielaard  <mark@klomp.org>
5089         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
5090         if it is an expression containing a minus sign.
5092 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
5094         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
5096 2018-05-27  Paul Koning  <ni1d@arrl.net>
5098         * config/pdp11/pdp11.md (truncsihi2): Remove.
5100 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
5101             Chung-Ju Wu  <jasonwucj@gmail.com>
5103         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
5104         implementation.
5105         (unaligned_store_dw): Ditto.
5106         * config/nds32/nds32-memory-manipulation.c
5107         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
5108         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
5109         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
5110         (emit_setmem_word_loop): Rename to ...
5111         (emit_setmem_doubleword_loop): ... this.
5112         (nds32_gen_dup_4_byte_to_word_value): New function.
5113         (nds32_gen_dup_8_byte_to_double_word_value): New function.
5114         (nds32_expand_setmem_loop): Refine implementation.
5115         (nds32_expand_setmem_loop_v3m): Ditto.
5116         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
5117         pattern.
5119 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5121         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
5123 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
5125         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
5126         (nds32_init_machine_status): Initialize machine->attr_naked_p and
5127         machine->attr_no_prologue_p.
5128         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
5129         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
5130         (nds32_expand_epilogue): Consider attr_naked_p.
5131         (nds32_expand_epilogue_v3pop): Likewise.
5132         (nds32_can_use_return_insn): Likewise.
5133         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
5134         attr_no_prologue_p fields.
5135         * config/nds32/nds32.opt (mret-in-naked-func): New option.
5137 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
5139         PR target/85918
5140         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
5141         attributes.
5142         * config/i386/sse.md
5143         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
5144         Rename to ...
5145         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
5146         ... this.
5147         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
5148         Rename to ...
5149         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
5150         ... this.
5151         (*<floatsuffix>floatv2div2sf2): Rename to ...
5152         (*float<floatunssuffix>v2div2sf2): ... this.
5153         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
5154         (float<floatunssuffix>v2div2sf2_mask): ... this.
5155         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
5156         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
5157         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
5158         to ...
5159         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
5160         ... this.
5161         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5162         Rename to ...
5163         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
5164         ... this.
5165         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5166         Rename to ...
5167         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
5168         ... this.
5169         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
5170         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
5171         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
5172         gen_ufix_truncv8dfv8si2.
5173         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
5174         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
5175         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
5176         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
5177         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
5178         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
5179         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
5180         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
5182 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
5184         PR target/85900
5185         PR target/85345
5186         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
5188 2018-05-25  Jim Wilson  <jimw@sifive.com>
5190         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
5191         * config/riscv/riscv.c (struct machine_function): Add
5192         interrupt_handler_p and attribute_checked_p fields.
5193         (riscv_attribute_table): Add interrupt.
5194         (riscv_interrupt_type_p): New.
5195         (riscv_save_reg_p): Save extra regs for interrupt handler.
5196         (riscv_use_save_libcall): Return false  for interrupt handler.
5197         (riscv_first_stack_step): Add forward declaration.
5198         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
5199         for interrupt handler with large frame.  Use it for saved reg list.
5200         (riscv_expand_prologue): Move flag_stack_usage_info support to
5201         eliminate duplication.
5202         (riscv_expand_epilogue): Generate mret for interrupt handler.
5203         (riscv_epilogue_uses): New.
5204         (riscv_can_use_return_insn): Return false for interrupt handler.
5205         (riscv_function_ok_for_sibcall): Likewise.
5206         (riscv_set_current_function): Add interrupt handler support.
5207         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
5208         * config/riscv/riscv.md (UNSPECV_MRET): New.
5209         (GP_REGNUM): New.
5210         (riscv_frflags, riscv_fsflags): Use tab after opcode.
5211         (riscv_mret): New.
5212         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
5214 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5216         PR tree-optimization/85712
5217         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
5218         this candidate has already been replaced in-situ by a copy.
5220 2018-05-25  Jason Merrill  <jason@redhat.com>
5222         PR c++/80485 - inline function non-zero address.
5223         * symtab.c (nonzero_address): Check DECL_COMDAT.
5225 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
5227         PR target/83628
5228         * config/alpha/alpha.md (ashlsi3): New insn pattern.
5229         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
5230         extension of SImode operation.  Use const123_operand predicate.
5231         (*saddsi_1): Remove.
5232         (*saddl_se_1): Ditto.
5233         (*ssubsi_1): Ditto.
5234         (*ssubl_se_1): Ditto.
5235         * config/alpha/predicates.md (const123_operand): New predicate.
5236         * config/alpha/constraints.md (P): Use IN_RANGE.
5238 2018-05-25  Richard Biener  <rguenther@suse.de>
5240         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5241         defaulted to true.
5242         (ref_maybe_used_by_stmt_p): Likewise.
5243         (stmt_may_clobber_ref_p): Likewise.
5244         (stmt_may_clobber_ref_p_1): Likewise.
5245         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5246         and pass it along.
5247         (ref_maybe_used_by_stmt_p): Likewise.
5248         (stmt_may_clobber_ref_p): Likewise.
5249         (stmt_may_clobber_ref_p_1): Likewise.
5250         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5251         the alias oracle to disambiguate DRs with stmts DR analysis
5252         couldn't handle.
5253         (vect_analyze_data_refs): Do not give up on not analyzable
5254         DRs for BB vectorization.  Remove code truncating the dataref
5255         vector.
5257 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
5259         PR target/85832
5260         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5261         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
5262         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5264 2018-05-25  Richard Biener  <rguenther@suse.de>
5266         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5267         function, combining stmt data ref gathering and fatal analysis
5268         parts.
5269         (vect_analyze_data_refs): Remove now redudnant code and simplify.
5270         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5271         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5272         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5273         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5275 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5277         PR tree-optimization/85720
5278         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5279         SCC if all partitions are builtins.
5280         (version_loop_by_alias_check): New parameter.  Generate cancelable
5281         runtime alias check if all partitions are builtins.
5282         (distribute_loop): Update call to above function.
5284 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5286         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5287         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5288         (parm_default_def_partition_arg): Ditto.
5289         (set_parm_default_def_partition): Ditto.
5290         (get_parm_default_def_partitions): Ditto and make it static.
5291         (get_undefined_value_partitions): Ditto and make it static.
5292         (remove_ssa_form): Refactor call to init_var_map here.
5293         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5294         computation for loop region.
5295         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5296         (register_default_def): Delete.
5297         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5298         (parm_default_def_partition_arg): Ditto.
5299         (set_parm_default_def_partition): Ditto.
5300         (get_parm_default_def_partitions): Ditto and make it static.
5301         (get_undefined_value_partitions): Ditto and make it static.
5302         (coalesce_with_default, coalesce_with_default): Update comment.
5303         (create_coalesce_list_for_region): New func factored out from
5304         create_outofssa_var_map.
5305         (populate_coalesce_list_for_outofssa): New func factored out from
5306         create_outofssa_var_map and coalesce_ssa_name.
5307         (create_outofssa_var_map): Delete.
5308         (coalesce_ssa_name): Refactor to support live range computation.
5309         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5310         (get_parm_default_def_partitions): Delete.
5311         (get_undefined_value_partitions): Ditto.
5312         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5313         computation for loop region.
5314         (new_tree_live_info, loe_visit_block): Ditto.
5315         (live_worklist, set_var_live_on_entry): Ditto.
5316         (calculate_live_on_exit, verify_live_on_entry): Ditto.
5317         * tree-ssa-live.h (struct _var_map): New fields.
5318         (init_var_map): Change decl.
5319         (region_contains_p): New.
5321 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
5323         * tree-ssa-live.h (live_merge_and_clear): Delete.
5325 2018-05-25  Richard Biener  <rguenther@suse.de>
5327         PR c++/85912
5328         * tree-dump.c (dequeue_and_dump): Remove access to removed
5329         operand 2 of a SWITCH_EXPR.
5331 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5333         * doc/sourcebuild.texi (vect_double_cond_arith): Include
5334         multiplication and division.
5335         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5336         (cond_udiv@var{m}, cond_umod@var{m}): Document.
5337         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5338         (cond_udiv_optab, cond_umod_optab): New optabs.
5339         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5340         (IFN_COND_RDIV): New internal functions.
5341         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5342         TRUNC_MOD_EXPR and RDIV_EXPR.
5343         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5344         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5345         New unspecs.
5346         (SVE_INT_BINARY): Include mult.
5347         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5348         (optab, sve_int_op): Handle mult.
5349         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5350         UNSPEC_COND_DIV.
5351         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5352         for SVE_INT_BINARY_SD.
5354 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5356         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5357         (optab, sve_int_op): Handle div and udiv.
5358         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5359         for SVE_INT_BINARY_SD.
5360         (*<optab><mode>3): New insn for the same.
5362 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5364         * tree-vect-patterns.c: Include predict.h.
5365         (vect_recog_divmod_pattern): Restrict check for division support
5366         to when optimizing for size.
5368 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5370         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5371         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5372         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5373         (gimple_match_op::set_op): Likewise.
5374         (gimple_resimplify4): Declare.
5375         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5376         (expr::gen_transform): Likewise.
5377         (decision_tree::gen): Generate a simplification routine for 4 operands.
5378         * gimple-match-head.c (gimple_simplify): Add an overload for
5379         4 operands.  In the top-level function, handle up to 4 call
5380         arguments and call gimple_resimplify4.
5381         (gimple_resimplify4): New function.
5382         (build_call_internal): Pass a fourth operand.
5383         (maybe_push_to_seq): Likewise.
5384         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5385         Fold VEC_COND_EXPRs of an operation and a default value into
5386         an IFN_COND_* function if possible.
5387         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5388         New unspecs.
5389         (SVE_COND_FP_BINARY): Include them.
5390         (optab, sve_fp_op): Handle them.
5391         (SVE_INT_BINARY_REV): New code iterator.
5392         (SVE_COND_FP_BINARY_REV): New int iterator.
5393         (commutative): New int attribute.
5394         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5395         Declare.
5396         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5397         function.
5398         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5399         (*cond_<optab><mode>): New patterns for reversed operands.
5401 2018-05-25  Richard Biener  <rguenther@suse.de>
5403         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5404         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5405         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5406         (STMT_VINFO_GROUPED_ACCESS): Adjust.
5407         * tree-vect-data-refs.c (everywhere): Adjust users.
5408         * tree-vect-loop.c (everywhere): Likewise.
5409         * tree-vect-slp.c (everywhere): Likewise.
5410         * tree-vect-stmts.c (everywhere): Likewise.
5411         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5413 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5415         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5416         Rename to...
5417         (gcc_cv_as_section_exclude): ... this.
5418         Try Solaris as #exclude syntax.
5419         * configure: Regenerate.
5420         * config.in: Regenerate.
5421         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5422         SECTION_EXCLUDE.
5423         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5424         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5426         * varasm.c (default_elf_asm_named_section): Don't check if
5427         HAVE_GAS_SECTION_EXCLUDE is defined.
5429 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5431         * doc/md.texi: Update the documentation of the cond_* optabs
5432         to mention the new final operand.  Fix GET_MODE_NUNITS call.
5433         Describe the scalar case too.
5434         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5435         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5436         instead of 2.
5437         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5438         (get_conditional_internal_fn): Update comment.
5439         * tree-vect-loop.c (vectorizable_reduction): Pass the original
5440         accumulator value as a final argument to conditional functions.
5441         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5442         a define_expand and add an "else" operand.  Assert for now that
5443         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
5444         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5445         (*cond_<optab><mode>): New patterns.
5446         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5447         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5448         (UNSPEC_COND_EOR): Delete.
5449         (optab): Remove associated mappings.
5450         (SVE_INT_BINARY): New code iterator.
5451         (sve_int_op): Remove int attribute and add "minus" to the code
5452         attribute.
5453         (SVE_COND_INT_OP): Delete.
5454         (SVE_COND_FP_OP): Rename to...
5455         (SVE_COND_FP_BINARY): ...this.
5457 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
5459         * optabs.c (can_reuse_operands_p): New function.
5460         (maybe_legitimize_operands): Try to reuse the results for
5461         earlier operands.
5463 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
5465         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
5466         Add {q} suffix to insn mnemonic.
5468 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5470         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
5471         (msp430_warn_func_return): New.
5473 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
5475         * fold-const.c (tree_nonzero_bits): New function.
5476         * fold-const.h (tree_nonzero_bits): Likewise.
5477         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
5478         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
5480 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
5482         PR target/85900
5483         PR target/85345
5484         * varasm.c (assemble_alias): Check ifunc_resolver only on
5485         FUNCTION_DECL.
5487 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
5489         PR target/85903
5490         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
5491         when memory input operand is handled.
5493 2018-05-24  Luis Machado  <luis.machado@linaro.org>
5495         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
5496         global.
5497         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
5499 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
5501         * match.pd: Delay FMA folds until after vectorization.
5503 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5505         PR target/83009
5506         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5507         address check not strict.
5509 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
5511         * gimple-match.h (gimple_match_op): New class.
5512         (mprts_hook): Replace parameters with a gimple_match_op *.
5513         (maybe_build_generic_op): Likewise.
5514         (gimple_simplified_result_is_gimple_val): Replace parameters with
5515         a const gimple_match_op *.
5516         (gimple_simplify): Replace code_helper * and tree * parameters with
5517         a gimple_match_op * parameter.
5518         (gimple_resimplify1): Replace code_helper *, tree and tree *
5519         parameters with a gimple_match_op * parameter.
5520         (gimple_resimplify2): Likewise.
5521         (gimple_resimplify3): Likewise.
5522         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
5523         parameters with a gimple_match_op * parameter.
5524         * gimple-match-head.c (gimple_simplify): Change prototypes of
5525         auto-generated functions to take a gimple_match_op * instead of
5526         separate code_helper * and tree * parameters.  Make the same
5527         change in the top-level overload and update calls to the
5528         gimple_resimplify routines.  Update calls to the auto-generated
5529         functions and to maybe_push_res_to_seq in the publicly-facing
5530         operation-specific gimple_simplify overloads.
5531         (gimple_match_op::MAX_NUM_OPS): Define.
5532         (gimple_resimplify1): Replace rcode and ops with a single res_op
5533         parameter.  Update call to gimple_simplify.
5534         (gimple_resimplify2): Likewise.
5535         (gimple_resimplify3): Likewise.
5536         (mprts_hook): Replace parameters with a gimple_match_op *.
5537         (maybe_build_generic_op): Likewise.
5538         (build_call_internal): Replace type, nargs and ops with
5539         a gimple_match_op *.
5540         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
5541         with a single gimple_match_op *.  Update calls to mprts_hook,
5542         build_call_internal and gimple_simplified_result_is_gimple_val.
5543         Factor out code that is common to the tree_code and combined_fn cases.
5544         * genmatch.c (expr::gen_transform): Replace tem_code and
5545         tem_ops with a gimple_match_op called tem_op.  Update calls
5546         to the gimple_resimplify functions and maybe_push_res_to_seq.
5547         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
5548         res_ops.  Update call to the gimple_resimplify functions.
5549         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
5550         (decision_tree::gen): Make the functions take a gimple_match_op *
5551         called res_op instead of separate res_code and res_ops parameters.
5552         Update call accordingly.
5553         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
5554         and ops with a single res_op parameter.  Update calls to
5555         maybe_build_generic_op and maybe_push_res_to_seq.
5556         (fold_stmt_1): Update calls to gimple_simplify and
5557         replace_stmt_with_simplification.
5558         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
5559         and gimple_simplified_result_is_gimple_val.
5560         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
5561         gimple_simplify.
5562         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
5563         with a gimple_match_op *.
5564         (vn_nary_build_or_lookup): Likewise.  Update call to
5565         vn_nary_build_or_lookup_1.
5566         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
5567         gimple_match_op *.  Update calls to the gimple_resimplify routines
5568         and to gimple_simplified_result_is_gimple_val.
5569         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
5570         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
5571         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
5572         (visit_nary_op): Likewise.
5573         (visit_reference_op_load): Likewise.
5575 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5577         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
5578         modifier for printing the step amount.
5580 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
5582         PR target/78849
5583         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
5584         types.
5586 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
5588         * doc/sourcebuild.texi (Endianness): New subsubsection.
5590 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5592         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5593         <prefetch_dynamic_strides>: New const bool field.
5594         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5595         prefetch_dynamic_strides.
5596         (exynosm1_prefetch_tune): Likewise.
5597         (thunderxt88_prefetch_tune): Likewise.
5598         (thunderx_prefetch_tune): Likewise.
5599         (thunderx2t99_prefetch_tune): Likewise.
5600         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
5601         false.
5602         (aarch64_override_options_internal): Update to set
5603         PARAM_PREFETCH_DYNAMIC_STRIDES.
5604         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5605         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5606         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5607         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5608         prefetch-dynamic-strides setting.
5610 2018-05-23  Luis Machado  <luis.machado@linaro.org>
5612         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5613         <minimum_stride>: New const int field.
5614         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5615         minimum_stride field defaulting to -1.
5616         (exynosm1_prefetch_tune): Likewise.
5617         (thunderxt88_prefetch_tune): Likewise.
5618         (thunderx_prefetch_tune): Likewise.
5619         (thunderx2t99_prefetch_tune): Likewise.
5620         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
5621         <default_opt_level>: Set to 3.
5622         (aarch64_override_options_internal): Update to set
5623         PARAM_PREFETCH_MINIMUM_STRIDE.
5624         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5625         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5626         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5627         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5628         stride is constant and is below the minimum stride threshold.
5630 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5632         * config/arm/arm-cpus.in (mode26): Delete.
5633         (armv4): Delete mode26 reference.
5634         * config/arm/arm.c (arm_configure_build_target): Delete use of
5635         isa_bit_mode26.
5637 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
5639         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
5640         New insn pattern.
5641         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
5642         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
5643         for non-SSE modes.
5644         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
5645         (floatunsdidf2): Ditto.
5647 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
5649         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
5650         (fixuns_trunc<mode>si2_avx512f): Ditto.
5651         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
5652         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
5653         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
5655 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
5657         PR rtl-optimization/79985
5658         * df-scan.c (df_insn_refs_collect): Remove special case for
5659         global registers and asm statements.
5661 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
5663         * extend.texi (Global Register Variables): Rewrite the bullet list.
5664         Note that the register is available for allocation. Note that access
5665         via inline asm must use constraints. Add note about async-signal
5666         handlers. Remove paragraph about automagic register selection.
5668 2018-05-23  Richard Biener  <rguenther@suse.de>
5670         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
5671         of fixed offset from memset VN.
5673 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
5675         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
5676         first_interp field.
5677         (alloc_cand_and_find_basis): Initialize first_interp field.
5678         (slsr_process_mul): Modify first_interp field.
5679         (slsr_process_add): Likewise.
5680         (slsr_process_cast): Modify first_interp field for each new
5681         interpretation.
5682         (slsr_process_copy): Likewise.
5683         (dump_candidate): Dump first_interp field.
5684         (replace_mult_candidate): Process all interpretations, not just
5685         subsequent ones.
5686         (replace_rhs_if_not_dup): Likewise.
5687         (replace_one_candidate): Likewise.
5689 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
5691         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
5692         Add new boolean.
5693         (aarch64_needs_frame_chain): New function.
5694         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
5696 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
5698         PR target/84882
5699         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
5700         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
5701         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
5702         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
5703         as true for strict-align.
5704         (aarch64_can_inline_p): Perform checks even when callee has no
5705         attributes to check for strict alignment.
5706         * doc/extend.texi (AArch64 Function Attributes): Document
5707         no-strict-align.
5708         * doc/invoke.texi: (AArch64 Options): Likewise.
5710 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
5712         PR tree-optimization/85853
5713         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
5714         the handling of the root of the node to...
5715         (vect_slp_analyze_node_operations_1): ...this new function,
5716         and run the whole thing with the child nodes' def types
5717         set according to their SLP node's def type.
5719 2018-05-23  Richard Biener  <rguenther@suse.de>
5721         PR middle-end/85874
5722         * tree-data-ref.c (create_runtime_alias_checks): Defer
5723         and ignore overflow warnings.
5725 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
5727         PR tree-optimization/85822
5728         * tree-vrp.c (is_masked_range_test): Fix handling of negative
5729         constants.
5731 2018-05-23  Richard Biener  <rguenther@suse.de>
5733         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5734         memset constants via native_interpret_expr.
5736 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
5738         PR target/85345
5739         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
5740         attribute.
5741         (cgraph_node::create_alias): Likewise.
5742         (cgraph_node::get_availability): Check ifunc_resolver instead
5743         of looking up ifunc attribute.
5744         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5745         * varasm.c (do_assemble_alias): Likewise.
5746         (assemble_alias): Likewise.
5747         (default_binds_local_p_3): Likewise.
5748         * cgraph.h (cgraph_node): Add ifunc_resolver.
5749         (cgraph_node::only_called_directly_or_aliased_p): Return false
5750         for IFUNC resolver.
5751         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
5752         attribute.
5753         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
5754         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
5755         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
5756         instead of looking up ifunc attribute.
5758 2018-05-22  Luis Machado  <luis.machado@linaro.org>
5760         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
5762 2018-05-22  Martin Sebor  <msebor@redhat.com>
5764         PR middle-end/85359
5765         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
5766         only when expasion succeeds.
5767         (expand_builtin_strcmp): Same.
5768         (expand_builtin_strncmp): Same.
5770 2018-05-22  Martin Sebor  <msebor@redhat.com>
5772         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
5774 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
5775             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5777         * config/aarch64/aarch64-ldpstp.md: Replace uses of
5778         aarch64_mem_pair_operand with memory_operand and delete operand swapping
5779         code.
5780         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5781         Add check for legitimate_address.
5782         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
5783         (aarch64_swap_ldrstr_operands): New.
5784         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
5785         Define prototype.
5787 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
5788             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5790         * config/aarch64/aarch64.md: New patterns to generate stp
5791         and ldp.
5792         (store_pair_sw, store_pair_dw): New patterns to generate stp for
5793         single words and double words.
5794         (load_pair_sw, load_pair_dw): Likewise.
5795         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
5796         Delete.
5797         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
5798         Delete.
5799         * config/aarch64/aarch64-ldpstp.md: Modify peephole
5800         for different mode ldpstp and add peephole for merged zero stores.
5801         Likewise for loads.
5802         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5803         Add size check.
5804         (aarch64_gen_store_pair): Rename calls to match new patterns.
5805         (aarch64_gen_load_pair): Rename calls to match new patterns.
5806         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
5807         (load_pair<DREG:mode><DREG2:mode>): ... This.
5808         (store_pair<mode>): Rename to...
5809         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
5810         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
5811         New mode iterators.
5812         (V_INT_EQUIV): Handle SImode.
5813         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
5814         New predicate.
5816 2018-05-22  Martin Sebor  <msebor@redhat.com>
5818         PR c/85623
5819         * calls.c (maybe_warn_nonstring_arg): Use string length to set
5820         or ajust the presumed bound on an operation to avoid unnecessary
5821         warnings.
5823 2018-05-22  Martin Sebor  <msebor@redhat.com>
5825         PR tree-optimization/85826
5826         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
5827         assuming that a DECL necesarily has a constant size.
5829 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
5831         PR middle-end/85862
5832         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
5834 2018-05-22  Richard Biener  <rguenther@suse.de>
5836         PR tree-optimization/85834
5837         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
5838         non-constant and non-zero memset arguments.
5840 2018-05-22  Martin Liska  <mliska@suse.cz>
5842         PR ipa/85607
5843         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
5845 2018-05-22  Richard Biener  <rguenther@suse.de>
5847         PR tree-optimization/85863
5848         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
5849         comparisons when vectype is specified.
5850         (vectorizable_condition): Do not specify vectype for
5851         vect_is_simple_cond when SLP vectorizing.
5853 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
5855         PR target/85657
5856         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
5857         define __ibm128 as long double.
5858         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
5859         as a distinct type when IEEE 128-bit support is enabled.
5860         (init_float128_ieee): Fix up conversions between IFmode and IEEE
5861         128-bit types to use the correct functions.
5862         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
5863         convert between 128-bit floating point types that have different
5864         modes but the same representation, instead of using gen_lowpart to
5865         makean alias.
5866         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
5867         KFmode.
5868         (IFKF_reg): New attributes to give the register constraints for
5869         IFmode and KFmode.
5870         (extend<mode>tf2_internal): New insns to mark an explicit
5871         conversion between 128-bit floating point types that have a
5872         different mode but share the same representation.
5874 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
5876         PR tree-optimization/85814
5877         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
5878         a null return from get_strinfo when unsharing the next
5879         strinfo in the chain.
5881 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5883         PR gcc/84923
5884         * varasm.c (weak_finish): Clean up weak_decls.
5886 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5888         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
5889         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
5890         UNSPEC_UADALP values.
5891         * config/aarch64/iterators.md (ABAL): New int iterator.
5892         (ABDL2): Likewise.
5893         (ADALP): Likewise.
5894         (sur): Add mappings for the above.
5895         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
5896         New define_insn.
5897         (aarch64_<sur>abal<mode>_4): Likewise.
5898         (aarch64_<sur>adalp<mode>_3): Likewise.
5899         (<sur>sadv16qi): New define_expand.
5901 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
5903         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
5904         (*movdf_internal): Ditto.
5905         (*rcpsf2_sse): Ditto.
5906         (*rsqrtsf2_sse): Ditto.
5907         (*sqrt<mode>2_sse): Ditto.
5909 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
5911         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
5912         eor3q<mode>4.
5913         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
5914         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
5915         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
5916         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
5917         vbcaxq_s64): New.
5918         * config/aarch64/arm_neon.h: Likewise.
5919         * config/aarch64/iterators.md (VQ_I): New.
5921 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
5923         * config.gcc: Add arc/t-multilib-linux to tmake_file for
5924         arc*-*-linux*.
5925         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
5926         MULTILIB_DIRNAMES
5928 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
5930         * config/nds32/constraints.md (S): New constraint.
5931         * config/nds32/nds32.md (call_internal): Use constraint S.
5932         (call_value_internal): Likewise.
5933         (sibcall_internal): Likewise.
5934         (sibcall_value_internal): Likewise.
5936 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
5937             Chung-Ju Wu  <jasonwucj@gmail.com>
5939         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
5940         into consideration.
5942 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
5943             Chung-Ju Wu  <jasonwucj@gmail.com>
5945         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
5946         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
5947         (nds32_rtx_costs_impl): Simplify.
5948         (nds32_address_cost_impl): Simplify.
5949         (nds32_init_rtx_costs): New function.
5950         (nds32_rtx_costs_speed_prefer): Likewise.
5951         (nds32_rtx_costs_size_prefer): Likewise.
5952         (nds32_address_cost_speed_prefer): Likewise.
5953         (nds32_address_cost_speed_fwprop): Likewise.
5954         (nds32_address_cost_size_prefer): Likewise.
5955         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
5956         * config/nds32/nds32.c (nds32_option_override): Use
5957         nds32_init_rtx_costs function.
5959 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
5961         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
5962         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
5963         (TARGET_PIPELINE_N8): Likewise.
5964         (TARGET_PIPELINE_N10): Likewise.
5965         (TARGET_PIPELINE_N13): Likewise.
5966         (TARGET_PIPELINE_GRAYWOLF): Likewise.
5968 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
5970         * config/nds32/nds32-fpu.md: Update copyright year.
5972 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5974         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
5976 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5978         * config/nds32/nds32.c
5979         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
5980         * config/nds32/nds32.opt (minline-asm-r15): New option.
5982 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
5984         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
5985         MASK_HW_ABS.
5986         * config/nds32/nds32.md (abssi2): New pattern.
5988 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
5990         * config/i386/i386.md (rex64namesuffix): New mode attribute.
5991         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
5992         Merge insn pattern from sse_cvtsi2ss<round_name> and
5993         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
5994         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
5995         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
5996         using SWI48 mode iterator.
5997         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
5998         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
5999         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
6000         pattern from sse_cvttss2si<round_saeonly_name>
6001         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
6002         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
6003         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
6004         using SWI48 mode iterator.
6005         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
6006         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
6007         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
6008         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
6009         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
6010         using SWI48 mode iterator.
6011         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
6012         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
6013         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
6014         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
6015         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
6016         SWI48 mode iterator.
6017         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
6018         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
6019         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
6020         pattern from sse_cvttsd2si<round_saeonly_name>
6021         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
6023 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6025         * config/nds32/nds32-md-auxiliary.c
6026         (nds32_valid_smw_lwm_base_p): Refine.
6027         (nds32_output_smw_single_word): Refine.
6028         (nds32_output_smw_double_word): New.
6029         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
6031 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6033         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
6034         (nds32_output_stack_pop): Refine.
6035         (nds32_expand_unaligned_load): Refine.
6036         (nds32_expand_unaligned_store): Refine.
6038 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
6039             Chung-Ju Wu  <jasonwucj@gmail.com>
6041         * config/nds32/constants.md: Add TP_REGNUM constant.
6042         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
6043         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
6044         UNSPEC_ADD32.
6045         * config/nds32/nds32-doubleword.md: Consider flag_pic.
6046         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
6047         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
6048         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
6049         and PIC code generation.
6050         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
6051         code generation.
6052         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
6053         optimization.
6054         * config/nds32/nds32.md: Support TLS and PIC.
6055         * config/nds32/nds32.c: Support TLS and PIC.
6056         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
6057         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
6058         predicate.
6060 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
6062         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
6063         mode with E_ prefix.
6065 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
6066             Chung-Ju Wu  <jasonwucj@gmail.com>
6068         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
6069         * config/nds32/nds32-md-auxiliary.c
6070         (symbolic_reference_mentioned_p): New.
6071         (nds32_legitimize_ict_address): New.
6072         (nds32_expand_ict_move): New.
6073         (nds32_indirect_call_referenced_p): New.
6074         (nds32_symbol_binds_local_p): Delete.
6075         (nds32_long_call_p): Modify.
6076         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
6077         * config/nds32/nds32-protos.h
6078         (symbolic_reference_mentioned_p): Declare.
6079         (nds32_legitimize_ict_address): Declare.
6080         (nds32_expand_ict_move): Declare.
6081         (nds32_indirect_call_referenced_p): Declare.
6082         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
6083         (nds32_relax_group): Use nds32_ict_const_p as condition.
6084         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
6085         (nds32_asm_file_start): Output ict_model directive in asm code.
6086         (nds32_legitimate_address_p): Consider indirect call.
6087         (nds32_print_operand): Consider indirect call.
6088         (nds32_print_operand_address): Consider indirect call.
6089         (nds32_insert_attributes): Handle "indirect_call" attribute.
6090         (TARGET_LEGITIMATE_ADDRESS_P): Define.
6091         (TARGET_LEGITIMATE_CONSTANT_P): Define.
6092         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
6093         (TARGET_DELEGITIMIZE_ADDRESS): Define.
6094         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
6095         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
6096         (TARGET_ICT_MODEL_SMALL): Define.
6097         (TARGET_ICT_MODEL_LARGE): Define.
6098         * config/nds32/nds32.md (movsi): Consider ict model.
6099         (call, call_value): Consider ict model.
6100         (sibcall, sibcall_value): Consider ict model.
6101         * config/nds32/nds32.opt (mict-model): New option.
6102         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
6103         model.
6105 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
6106             Monk Chiang  <sh.chiang04@gmail.com>
6107             Jim Wilson <jimw@sifive.com>
6109         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
6110         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
6111         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
6112         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
6113         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
6114         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
6115         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
6116         compute save_libcall_adjustment properly.
6117         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
6118         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
6119         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
6120         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
6121         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
6122         (ABI_SPEC): Handle mabi=ilp32e.
6123         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
6124         (RVE): Add RVE mask.
6125         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
6126         <-march>: Add rv32e as an example.
6128 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
6130         PR c++/82899
6131         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
6132         (intra_create_variable_infos): Handle C++ constructors.
6134 2018-05-18  Martin Liska  <mliska@suse.cz>
6136         * passes.def: Remove a redundant pass.
6138 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
6140         PR bootstrap/85838
6141         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
6143 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6145         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
6146         (ARMv4): Update.
6147         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
6148         (ARMv6m): Update.
6149         (armv2, armv2a, armv3, armv3m): Delete architectures.
6150         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
6151         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
6152         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
6153         Delete cpus.
6154         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
6155         (*mulsidi3adddi): Likewise.
6156         (mulsidi3): Likewise.
6157         (*mulsidi3_nov6): Likewise.
6158         (umulsidi3): Likewise.
6159         (umulsidi3_nov6): Likewise.
6160         (umaddsidi4): Likewise.
6161         (*umulsidi3adddi): Likewise.
6162         (smulsi3_highpart): Likewise.
6163         (*smulsi3_highpart_nov6): Likewise.
6164         (umulsi3_highpart): Likewise.
6165         (*umulsi3_highpart_nov6): Likewise.
6166         * config/arm/arm.h (arm_arch3m): Delete.
6167         * config/arm/arm.c (arm_arch3m): Delete.
6168         (arm_option_override_internal): Update armv3-related comment.
6169         (arm_configure_build_target): Delete use of isa_bit_mode32.
6170         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
6171         (arm_rtx_costs_internal): Delete check of arm_arch3m.
6172         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
6173         (mulsa3): Likewise.
6174         (mulusa3): Likewise.
6175         * config/arm/arm-protos.h (arm_arch3m): Delete.
6176         * config/arm/arm-tables.opt: Regenerate.
6177         * config/arm/arm-tune.md: Likewise.
6178         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
6179         deleted architectures.
6181 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6183         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
6184         (armv5t, armv5te): New features.
6185         (ARMv5, ARMv5e): Delete fgroups.
6186         (ARMv5t, ARMv5te): Adjust for above changes.
6187         (ARMv6m): Likewise.
6188         (armv5, armv5e): Delete arches.
6189         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
6190         arm_arch5.
6191         (*call_reg_arm): Likewise.
6192         (*call_value_reg_armv5): Likewise.
6193         (*call_value_reg_arm): Likewise.
6194         (*call_symbol): Likewise.
6195         (*call_value_symbol): Likewise.
6196         (*sibcall_insn): Likewise.
6197         (*sibcall_value_insn): Likewise.
6198         (clzsi2): Likewise.
6199         (prefetch): Likewise.
6200         (define_split and define_peephole2 dependent on arm_arch5):
6201         Likewise.
6202         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
6203         arm_arch5e.
6204         (TARGET_ARM_QBIT): Likewise.
6205         (TARGET_DSP_MULTIPLY): Likewise.
6206         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
6207         (arm_arch5, arm_arch5e): Delete.
6208         (arm_arch5t, arm_arch5te): Declare.
6209         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
6210         (arm_arch5t): Declare.
6211         (arm_option_reconfigure_globals): Update for the above.
6212         (arm_options_perform_arch_sanity_checks): Update comment, replace
6213         use of arm_arch5 with arm_arch5t.
6214         (use_return_insn): Likewise.
6215         (arm_emit_call_insn): Likewise.
6216         (output_return_instruction): Likewise.
6217         (arm_final_prescan_insn): Likewise.
6218         (arm_coproc_builtin_available): Likewise.
6219         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
6220         arm_arch5e with arm_arch5t and arm_arch5te.
6221         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
6222         (arm_arch5t, arm_arch5te): Declare.
6223         * config/arm/arm-tables.opt: Regenerate.
6224         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
6225         * config/arm/t-multilib: Likewise.
6226         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
6227         instead of arm_arch5.
6228         (*call_reg_thumb1): Likewise.
6229         (*call_value_reg_thumb1_v5): Likewise.
6230         (*call_value_reg_thumb1): Likewise.
6231         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
6232         unreachable path.
6233         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
6235 2018-05-18  Martin Liska  <mliska@suse.cz>
6237         PR gcov-profile/84846
6238         * doc/gcov.texi: Document -t option of gcov tool.
6240 2018-05-18  Martin Liska  <mliska@suse.cz>
6242         PR gcov-profile/84846
6243         * gcov.c (print_usage): Add new -t option.
6244         (process_args): Handle the option.
6245         (generate_results): Use stdout as output when requested by
6246         the option.
6248 2018-05-18  Martin Liska  <mliska@suse.cz>
6250         PR gcov-profile/84846
6251         * coverage.c (coverage_init): Write PWD to .gcno file.
6252         * doc/gcov.texi: Document how working directory is printed.
6253         * gcov-dump.c (dump_gcov_file): Print PWD.
6254         * gcov.c (output_intermediate_file): Likewise.
6255         (read_graph_file): Read PWD string.
6256         (output_lines): Print PWD.
6258 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6260         PR middle-end/85817
6261         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6262         for retval and return false if all args to phi are zero.
6264 2018-05-18  Richard Biener  <rguenther@suse.de>
6266         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6267         method.
6268         (evrp_dom_walker::before_dom_children): Call it.
6270 2018-05-18  Richard Biener  <rguenther@suse.de>
6272         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6273         results when processing array refs with variable index.
6275 2018-05-18  Toon Moene  <toon@moene.org>
6277         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6278         directly after that of -floop-interchange. Indicate that both
6279         options are enabled by default when specifying -O3.
6281 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6283         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6284         iterator.  Delete separate integer-mode vec_set<mode> expander.
6285         (aarch64_simd_vec_setv2di): Delete.
6286         (vec_setv2di): Delete.
6287         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6288         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
6289         the "w, r" alternative.
6291 2018-05-18  Martin Liska  <mliska@suse.cz>
6293         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6294         * tree-pass.h (make_pass_lower_switch_O0): New function.
6295         * tree-switch-conversion.c (node_has_low_bound): Remove.
6296         (node_has_high_bound): Likewise.
6297         (node_is_bounded): Likewise.
6298         (class pass_lower_switch): Make it a template type and create
6299         two instances.
6300         (pass_lower_switch::execute): Add template argument.
6301         (make_pass_lower_switch): New function.
6302         (make_pass_lower_switch_O0): New function.
6303         (do_jump_if_equal): Remove.
6304         (emit_case_nodes): Simplify to just handle all 3 cases and leave
6305         all the hard work to tree optimization passes.
6307 2018-05-18  Martin Liska  <mliska@suse.cz>
6309         * dbgcnt.c (limit_low): Renamed from limit.
6310         (limit_high): New variable.
6311         (dbg_cnt_is_enabled): Check for upper limit.
6312         (dbg_cnt): Adjust dumping.
6313         (dbg_cnt_set_limit_by_index): Add new argument for high
6314         value.
6315         (dbg_cnt_set_limit_by_name): Likewise.
6316         (dbg_cnt_process_single_pair): Parse new format.
6317         (dbg_cnt_process_opt): Use strtok.
6318         (dbg_cnt_list_all_counters): Remove 'value' and add
6319         'limit_high'.
6320         * doc/invoke.texi: Document changes.
6322 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
6324         * doc/sourcebuild.texi (scalar_all_fma): Document.
6325         * tree.def (FMA_EXPR): Delete.
6326         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6327         * internal-fn.c (ternary_direct): New macro.
6328         (expand_ternary_optab_fn): Likewise.
6329         (direct_ternary_optab_supported_p): Likewise.
6330         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6331         * builtins.c (fold_builtin_fma): Delete.
6332         (fold_builtin_3): Don't call it.
6333         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6334         * expr.c (expand_expr_real_2): Likewise.
6335         * fold-const.c (operand_equal_p): Likewise.
6336         (fold_ternary_loc): Likewise.
6337         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6338         * gimple.c (DEFTREECODE): Likewise.
6339         * gimplify.c (gimplify_expr): Likewise.
6340         * optabs-tree.c (optab_for_tree_code): Likewise.
6341         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6342         * tree-eh.c (operation_could_trap_p): Likewise.
6343         (stmt_could_throw_1_p): Likewise.
6344         * tree-inline.c (estimate_operator_cost): Likewise.
6345         * tree-pretty-print.c (dump_generic_node): Likewise.
6346         (op_code_prio): Likewise.
6347         * tree-ssa-loop-im.c (stmt_cost): Likewise.
6348         * tree-ssa-operands.c (get_expr_operands): Likewise.
6349         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6350         * fold-const-call.h (fold_fma): Delete.
6351         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6352         CFN_FNMA and CFN_FNMS.
6353         (fold_fma): Delete.
6354         * genmatch.c (combined_fn): New enum.
6355         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6356         (commutative_op): New function.
6357         (commutate): Use it.  Handle more than 2 operands.
6358         (dt_operand::gen_gimple_expr): Use commutative_op.
6359         (parser::parse_expr): Allow :c to be used with non-binary
6360         operators if the commutative operand is known.
6361         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6362         CFN_FMS, CFN_FNMA and CFN_FNMS.
6363         (backprop::process_assign_use): Remove FMA_EXPR handling.
6364         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6365         (gen_hsa_fma): New function.
6366         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6367         IFN_FNMA and IFN_FNMS.
6368         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6369         * gimple-fold.h (follow_all_ssa_edges): Declare.
6370         * gimple-fold.c (follow_all_ssa_edges): New function.
6371         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6372         gimple_build interface and use follow_all_ssa_edges to fold the result.
6373         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6374         instead of checking for optabs directly.
6375         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6376         rather than FMA_EXPRs.
6377         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6378         call to IFN_FMA instead of an FMA_EXPR.
6380 2018-05-17  Jim Wilson  <jimw@sifive.com>
6382         * expr.c (do_tablejump): When converting index to Pmode, if we have a
6383         sign extended promoted subreg, and the range does not have the sign bit
6384         set, then do a sign extend.
6386         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6387         test, check for sign extended subreg and/or constant operands, and
6388         do a sign extend in that case.
6390 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
6392         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6393         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6394         Add untyped.
6395         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6396         Change logics_shift_reg to logics_shift_imm.
6397         (thunderx2t99_fp_loadpair_basic): Delete.
6398         (thunderx2t99_fp_storepair_basic): Delete.
6399         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6400         (thunderx2t99_asimd_polynomial): Delete.
6401         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6402         and neon_fp_mul_d_scalar_q.
6403         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6404         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6405         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6406         (thunderx2t99_asimd_lut): Add missing tbl types.
6407         (thunderx2t99_asimd_ext): Delete.
6408         (thunderx2t99_asimd_load1_1_mult): Delete.
6409         (thunderx2t99_asimd_load1_2_mult): Delete.
6410         (thunderx2t99_asimd_load1_ldp): New.
6411         (thunderx2t99_asimd_load1): New.
6412         (thunderx2t99_asimd_load2): Add missing *load2* types.
6413         (thunderx2t99_asimd_load3): New.
6414         (thunderx2t99_asimd_load4): New.
6415         (thunderx2t99_asimd_store1_1_mult): Delete.
6416         (thunderx2t99_asimd_store1_2_mult): Delete.
6417         (thunderx2t99_asimd_store2_mult): Delete.
6418         (thunderx2t99_asimd_store2_onelane): Delete.
6419         (thunderx2t99_asimd_store_stp): New.
6420         (thunderx2t99_asimd_store1): New.
6421         (thunderx2t99_asimd_store2): New.
6422         (thunderx2t99_asimd_store3): New.
6423         (thunderx2t99_asimd_store4): New.
6425 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
6427         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6428         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
6430 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
6431             Segher Boessenkool  <segher@kernel.crashing.org>
6433         PR target/85698
6434         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6435         operand.
6437 2018-05-17  Richard Biener  <rguenther@suse.de>
6439         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6440         for pruning loop and prune defs feeding only already visited PHIs.
6442 2018-05-17  Richard Biener  <rguenther@suse.de>
6444         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6446 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
6447             Richard Biener  <rguenther@suse.de>
6449         PR tree-optimization/85793
6450         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
6451         for VMAT_ELEMENTWISE.
6453 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
6455         * internal-fn.h (lookup_internal_fn): Declare
6456         * internal-fn.c (lookup_internal_fn): New function.
6457         * gimple.c (gimple_build_call_from_tree): Handle calls to
6458         internal functions.
6459         * gimple-pretty-print.c (dump_gimple_call): Print "." before
6460         internal function names.
6461         * tree-pretty-print.c (dump_generic_node): Likewise.
6462         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
6464 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
6466         * gimple-fold.h (gimple_build): Make the function forms take
6467         combined_fn rather than built_in_function.
6468         (gimple_simplify): Likewise.
6469         * gimple-match-head.c (gimple_simplify): Likewise.
6470         * gimple-fold.c (gimple_build): Likewise.
6471         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
6472         rather than gimple_build_call_internal.
6473         (get_initial_defs_for_reduction): Likewise.
6474         (vect_create_epilog_for_reduction): Likewise.
6475         (vectorizable_live_operation): Likewise.
6477 2018-05-17  Martin Liska  <mliska@suse.cz>
6479         * gimple-ssa-sprintf.c (format_directive): Do not use
6480         space in between 'G_' and '('.
6482 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
6484         PR target/85323
6485         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
6486         even if the mask is not all ones.
6488         PR target/85323
6489         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
6490         vector.
6491         (ix86_gimple_fold_builtin): Likewise.
6493         PR target/85323
6494         * config/i386/i386.c: Include tree-vector-builder.h.
6495         (ix86_vector_shift_count): New function.
6496         (ix86_fold_builtin): Fold shift builtins by scalar count.
6497         (ix86_gimple_fold_builtin): Likewise.
6499         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
6500         _mm512_setzero): New intrinsics.
6502 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
6503             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6505         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
6506         code generation for cases where splatting a value is not useful.
6507         * simplify-rtx.c (simplify_ternary_operation): Simplify
6508         vec_merge across a vec_duplicate and a paradoxical subreg forming
6509         a vector mode to a vec_concat.
6511 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
6513         * config.gcc: Support "goldmont-plus".
6514         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6515         "goldmont-plus".
6516         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6517         PROCESSOR_GOLDMONT_PLUS.
6518         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
6519         (processor_target_table): Add "goldmont-plus".
6520         (PTA_GOLDMONT_PLUS): Define.
6521         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
6522         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
6523         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
6524         (fold_builtin_cpu): Add "goldmont-plus".
6525         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
6526         (ix86_option_override_internal): Add "goldmont-plus".
6527         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
6528         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
6529         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
6530         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
6532 2018-05-17  Richard Biener  <rguenther@suse.de>
6534         PR tree-optimization/85757
6535         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
6536         remove defs that only feed that PHI from further processing.
6538 2018-05-16  Jim Wilson  <jimw@sifive.com>
6540         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
6541         asterisk to name.
6542         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
6544 2018-05-16  Mark Wielaard  <mark@klomp.org>
6546         * dwarf2out.c (count_index_strings): New function.
6547         (output_indirect_strings): Call count_index_strings and generate
6548         header for dwarf_version >= 5.
6550 2018-05-16  Mark Wielaard  <mark@klomp.org>
6552         * dwarf2out.c (dwarf_FORM): New function.
6553         (set_indirect_string): Use dwarf_FORM.
6554         (reset_indirect_string): Likewise.
6555         (size_of_die): Likewise.
6556         (value_format): Likewise.
6557         (output_die): Likewise.
6558         (add_skeleton_AT_string): Likewise.
6559         (output_macinfo_op): Likewise.
6560         (index_string): Likewise.
6561         (output_index_string_offset): Likewise.
6562         (output_index_string): Likewise.
6563         (count_index_strings): Likewise.
6565 2018-05-16  Carl Love  <cel@us.ibm.com>
6567         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6568         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
6570 2018-05-16  Martin Jambor  <mjambor@suse.cz>
6572         * ipa-prop.c (ipa_free_all_edge_args): Remove.
6573         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
6575 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
6577         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
6578         (fnma<mode>4): Likewise.
6579         (fms<mode>4): Likewise.
6580         (fnms<mode>4): Likewise.
6581         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
6582         (aarch64_fnma<mode>4): Likewise.
6583         (aarch64_fms<mode>4): Likewise.
6584         (aarch64_fnms<mode>4): Likewise.
6585         (aarch64_fnmadd<mode>4): Likewise.
6587 2018-05-16  Jason Merrill  <jason@redhat.com>
6589         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
6591 2018-05-16  Richard Biener  <rguenther@suse.de>
6593         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
6594         (dump_stmt_cost): Declare.
6595         (add_stmt_cost): Dump cost we add.
6596         (add_stmt_costs): New function.
6597         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
6598         No longer exported.
6599         (vect_analyze_stmt): Adjust prototype.
6600         (vectorizable_condition): Likewise.
6601         (vectorizable_live_operation): Likewise.
6602         (vectorizable_reduction): Likewise.
6603         (vectorizable_induction): Likewise.
6604         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
6605         cost vector to pass to vectorizable_ and record afterwards.
6606         (vect_model_reduction_cost): Take cost vector argument and adjust.
6607         (vect_model_induction_cost): Likewise.
6608         (vectorizable_reduction): Likewise.
6609         (vectorizable_induction): Likewise.
6610         (vectorizable_live_operation): Likewise.
6611         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
6612         SLP_TREE_NUMBER_OF_VEC_STMTS.
6613         (vect_analyze_slp_cost_1): Remove.
6614         (vect_analyze_slp_cost): Likewise.
6615         (vect_slp_analyze_node_operations): Take visited args and
6616         a target cost vector.  Avoid processing already visited stmt sets.
6617         (vect_slp_analyze_operations): Use a local cost vector to gather
6618         costs and register those of non-discarded instances.
6619         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
6620         (vect_schedule_slp_instance): Remove copying of
6621         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
6622         zero.
6623         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
6624         adding cost.  Record cost entry location.
6625         (vect_prologue_cost_for_slp_op): Function to compute cost of
6626         a constant or invariant generated for SLP vect in the prologue,
6627         split out from vect_analyze_slp_cost_1.
6628         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
6629         (vect_model_promotion_demotion_cost): Likewise.
6630         (vect_model_store_cost): Likewise, make static.
6631         (vect_model_load_cost): Likewise.
6632         (vectorizable_bswap): Add cost vector arg and adjust.
6633         (vectorizable_call): Likewise.
6634         (vectorizable_simd_clone_call): Likewise.
6635         (vectorizable_conversion): Likewise.
6636         (vectorizable_assignment): Likewise.
6637         (vectorizable_shift): Likewise.
6638         (vectorizable_operation): Likewise.
6639         (vectorizable_store): Likewise.
6640         (vectorizable_load): Likewise.
6641         (vectorizable_condition): Likewise.
6642         (vectorizable_comparison): Likewise.
6643         (can_vectorize_live_stmts): Likewise.
6644         (vect_analyze_stmt): Likewise.
6645         (vect_transform_stmt): Adjust calls to vectorizable_*.
6646         * tree-vectorizer.c: Include gimple-pretty-print.h.
6647         (dump_stmt_cost): New function.
6649 2018-05-16  Richard Biener  <rguenther@suse.de>
6651         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
6652         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
6653         * tree-ssa-dse.c: Include tree-ssa-loop.h.
6654         (check_name): New callback.
6655         (dse_classify_store): Track cycles via a visited bitmap of PHI
6656         defs and simplify handling of in-loop and across loop dead stores
6657         and properly fail for loop-variant refs.  Handle byte-tracking with
6658         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
6659         limiting the walk.
6661 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
6663         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
6664         (vect_get_mask_type_for_stmt): Likewise.
6665         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
6666         split out from...
6667         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
6668         to determine the statement's vector type and the vector type that
6669         should be used for calculating nunits.  Deal with cases in which
6670         the type has to be deferred.
6671         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
6672         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
6673         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
6674         (vect_determine_vf_for_stmt): New functions, split out from...
6675         (vect_determine_vectorization_factor): ...here.
6676         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
6677         (vect_get_mask_type_for_stmt): New functions, split out from
6678         vect_determine_vectorization_factor.
6680 2018-05-16  Richard Biener  <rguenther@suse.de>
6682         * tree-cfg.c (verify_gimple_assign_ternary): Properly
6683         verify the [VEC_]COND_EXPR embedded comparison.
6685 2018-05-15  Martin Sebor  <msebor@redhat.com>
6687         PR tree-optimization/85753
6688         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
6689         RECORD_TYPE in addition to ARRAY_TYPE.
6691 2018-05-15  Martin Sebor  <msebor@redhat.com>
6693         PR middle-end/85643
6694         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
6696 2018-05-15  Richard Biener  <rguenther@suse.de>
6698         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
6699         add by_clobber_p one.  Change algorithm to collect all defs
6700         representing uses we need to walk and try reducing them to
6701         a single one before failing.
6702         (dse_dom_walker::dse_optimize_stmt): Adjust.
6704 2018-05-13  Mark Wielaard  <mark@klomp.org>
6706         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
6707         (size_of_loc_descr): Likewise.
6708         (output_loc_operands): Likewise.
6709         (output_loc_operands_raw): Likewise.
6710         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
6711         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
6712         (hash_loc_operands): Likewise.
6713         (compare_loc_operands): Likewise.
6715 2018-05-14  Mark Wielaard  <mark@klomp.org>
6717         * dwarf2out.c (count_index_addrs): New function.
6718         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
6720 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6722         PR tree-optimization/83648
6723         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
6724         return value as malloc candidate.
6726 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6728         PR ipa/85734
6729         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
6730         param as true in call to suggest_attribute.
6732 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
6734         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
6735         -mreadonly-in-sdata.
6737 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6739         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
6740         New pattern.
6741         (aarch64_crypto_aesd_fused): Likewise.
6743 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
6745         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
6746         (movsi_aarch64): Likewise.
6747         (load_pairsi): Likewise.
6748         (load_pairdi): Likewise.
6749         (store_pairsi): Likewise.
6750         (store_pairdi): Likewise.
6751         (load_pairsf): Likewise.
6752         (load_pairdf): Likewise.
6753         (store_pairsf): Likewise.
6754         (store_pairdf): Likewise.
6755         (zero_extend): Likewise.
6756         (trunc): Swap alternatives.
6757         (fcvt_target): Add '?' to prefer w over r.
6759 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
6761         PR target/85756
6762         * config/i386/i386.md: Disallow non-commutative arithmetics in
6763         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
6764         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
6765         in the peephole2 before it.
6767 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
6769         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
6770         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
6771         (ix86_handle_option): Handle -mcldemote.
6772         * config.gcc: New header.
6773         * config/i386/cldemoteintrin.h: New file.
6774         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
6775         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6776         -mcldemote.
6777         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6778         OPTION_MASK_ISA_CLDEMOTE.
6779         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
6780         (ix86_valid_target_attribute_inner_p): Ditto.
6781         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
6782         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
6783         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
6784         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
6785         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
6786         (cldemote): New.
6787         * config/i386/i386.opt: Add -mcldemote.
6788         * config/i386/x86intrin.h: New header.
6789         * doc/invoke.texi: Add -mcldemote.
6791 2018-05-14  Richard Biener  <rguenther@suse.de>
6793         * doc/match-and-simplify.texi: Adjust :s documentation.
6795 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
6797         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
6798         intended memcpy size.
6799         (REORDER_45): Likewise.
6801 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
6803         * sort.cc: New file.
6804         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
6805         * vec.c (qsort_chk): Use gcc_qsort.
6806         * Makefile.in (OBJS-libcommon): Add sort.o.
6807         (build/sort.o): New target.  Use it...
6808         (BUILD_RTL): ... here, and...
6809         (build/gencfn-macros): ... here, and...
6810         (build/genmatch): ... here.
6812 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6813             Chung-Ju Wu  <jasonwucj@gmail.com>
6815         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
6816         * config/nds32/nds32-graywolf.md: New file.
6817         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
6818         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
6819         pipeline.
6820         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
6821         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
6822         * config/nds32/nds32.md (pipeline_model): Add graywolf.
6823         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
6824         * config/nds32/pipelines.md: Include n15 settings.
6826 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6827             Chung-Ju Wu  <jasonwucj@gmail.com>
6829         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
6830         * config/nds32/nds32-n13.md: New file.
6831         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
6832         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
6833         pipeline.
6834         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
6835         * config/nds32/nds32.md (pipeline_model): Add n13.
6836         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
6837         * config/nds32/pipelines.md: Include n13 settings.
6839 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
6840             Chung-Ju Wu  <jasonwucj@gmail.com>
6842         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
6843         * config/nds32/nds32-n10.md: New file.
6844         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
6845         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
6846         pipeline.
6847         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
6848         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
6849         * config/nds32/nds32.md (pipeline_model): Add n10.
6850         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
6851         * config/nds32/pipelines.md: Include n10 settings.
6853 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
6854             Kito Cheng  <kito.cheng@gmail.com>
6855             Chung-Ju Wu  <jasonwucj@gmail.com>
6857         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
6858         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
6859         Add enum values for DSP extension instructions.
6860         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
6861         New constraints.
6862         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
6863         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
6864         New code iterators.
6865         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
6866         * config/nds32/nds32-dspext.md: New file for DSP implementation.
6867         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
6868         * config/nds32/nds32-intrinsic.md: Likewise.
6869         * config/nds32/nds32_intrinsic.h: Likewise.
6870         * config/nds32/nds32-md-auxiliary.c: Likewise.
6871         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
6872         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
6873         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
6874         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
6875         * config/nds32/nds32-protos.h: New declarations for DSP extension.
6876         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
6877         TYPE_DMAC in switch statement.
6878         * config/nds32/nds32.c: New checking and implementation for DSP
6879         extension instructions.
6880         * config/nds32/nds32.h: Likewise.
6881         * config/nds32/nds32.md: Likewise.
6882         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
6883         * config/nds32/predicates.md: Implement new predicates for DSP
6884         extension.
6886 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
6888         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
6889         Reformat alternatives and attributes so it is easier to identify
6890         which constraints/attributes go with which instruction.
6891         (mov<mode>_hardfloat32, FMOVE64): Likewise.
6892         (mov<mode>_softfloat32, FMOVE64): Likewise.
6893         (mov<mode>_hardfloat64, FMOVE64): Likewise.
6894         (mov<mode>_softfloat64, FMOVE64): Likewise.
6896 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6898         * doc/extend.texi (PowerPC Built-in Functions): Rename this
6899         subsection.
6900         (Basic PowerPC Built-in Functions): The new name of the
6901         subsection previously known as "PowerPC Built-in Functions".
6902         (Basic PowerPC Built-in Functions Available on all Configurations):
6903         New subsubsection.
6904         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
6905         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
6906         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
6907         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
6909 2018-05-11  Martin Jambor  <mjambor@suse.cz>
6911         PR ipa/85655
6912         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
6913         single const.
6915 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
6917         PR target/85733
6918         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
6920 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
6922         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
6923         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
6924         (ix86_handle_option): Handle -mwaitpkg.
6925         * config.gcc: New header.
6926         * config/i386/cpuid.h (bit_WAITPKG): New bit.
6927         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
6928         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
6929         function type.
6930         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6931         OPTION_MASK_ISA_WAITPKG.
6932         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
6933         (ix86_option_override_internal): Add PTA_WAITPKG.
6934         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
6935         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
6936         IX86_BUILTIN_TPAUSE.
6937         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
6938         __builtin_ia32_umwait and __builtin_ia32_tpause.
6939         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
6940         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
6941         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
6942         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
6943         UNSPECV_TPAUSE): New.
6944         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
6945         * config/i386/i386.opt: Add -mwaitpkg.
6946         * config/i386/waitpkgintrin.h: New file.
6947         * config/i386/x86intrin.h: New header.
6948         * doc/invoke.texi: Add -mwaitpkg.
6950 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
6952         PR target/85606
6953         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
6954         equivalent.
6955         (cortex-m0): Use armv6s-m isa.
6956         (cortex-m0plus): Likewise.
6957         (cortex-m1): Likewise.
6958         (cortex-m0.small-multiply): Likewise.
6959         (cortex-m0plus.small-multiply): Likewise.
6960         (cortex-m1.small-multiply): Likewise.
6962 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
6963             Jakub Jelinek  <jakub@redhat.com>
6965         PR tree-optimization/85692
6966         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
6967         source permute as well.
6969 2018-05-11  Martin Liska  <mliska@suse.cz>
6971         PR sanitizer/85556
6972         * doc/extend.texi: Document LLVM style format for no_sanitize
6973         attribute.
6975 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
6977         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
6978         mode_supports_vsx_dform_quad to mode_supports_dq_form.
6979         (mode_supports_vsx_dform_quad): Likewise.
6980         (mode_supports_vmx_dform): Move these functions to be next to the
6981         other mode_supports functions.
6982         (mode_supports_dq_form): Likewise.
6983         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
6984         mode_supports_dq_form.
6985         (reg_offset_addressing_ok_p): Likewise.
6986         (offsettable_ok_by_alignment): Likewise.
6987         (rs6000_legitimate_offset_address_p): Likewise.
6988         (legitimate_lo_sum_address_p): Likewise.
6989         (rs6000_legitimize_address): Likewise.
6990         (rs6000_legitimize_reload_address): Likewise.
6991         (rs6000_secondary_reload_inner): Likewise.
6992         (rs6000_preferred_reload_class): Likewise.
6993         (rs6000_output_move_128bit): Likewise.
6995 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
6997         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
6998         Generate SImode target register for null target.
6999         <case IX86_BUILTIN_XGETBV>: Ditto.
7000         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
7001         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
7003 2018-05-10  Carl Love  <cel@us.ibm.com>
7005         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
7006         dcbtt and dcbtstt if operands[2] is 0.
7008 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
7010         PR target/85693
7011         * config/i386/sse.md (usadv64qi): New expander.
7013 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
7015         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
7016         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
7017         -maltivec=be support.
7018         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
7019         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
7020         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
7021         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
7022         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
7023         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
7024         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
7025         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
7026         altivec_vsumsws): Adjust.
7027         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
7028         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
7029         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
7030         support.
7031         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
7032         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
7033         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
7034         (altivec_lve<VI_char>x): Delete expand.
7035         (*altivec_lve<VI_char>x_internal): Rename to...
7036         (altivec_lve<VI_char>x): ... this.
7037         (altivec_lvxl_<mode>): Delete expand.
7038         (*altivec_lvxl_<mode>_internal): Rename to ...
7039         (altivec_lvxl_<mode>): ... this.
7040         (altivec_stvxl_<mode>): Delete expand.
7041         (*altivec_stvxl_<mode>_internal): Rename to ...
7042         (altivec_stvxl_<mode>): ... this.
7043         (altivec_stve<VI_char>x): Delete expand.
7044         (*altivec_stve<VI_char>x_internal): Rename to ...
7045         (altivec_stve<VI_char>x): ... this.
7046         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
7047         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
7048         reduc_plus_scal_<mode>): Adjust.
7049         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
7050         comment.
7051         (rs6000_cpu_cpp_builtins): Adjust.
7052         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
7053         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
7054         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
7055         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
7056         -maltivec=be support.
7057         (rs6000_split_vec_extract_var): Adjust.
7058         (rs6000_split_v4si_init): Adjust.
7059         (swap_selector_for_mode): Delete.
7060         (altivec_expand_lvx_be, altivec_expand_stvx_be,
7061         altivec_expand_stvex_be): Delete.
7062         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
7063         -maltivec=be support.
7064         (rs6000_gimple_fold_builtin): Ditto.
7065         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
7066         Adjust.
7067         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
7068         (TARGET_DIRECT_MOVE_64BIT): Adjust.
7069         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
7070         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
7071         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
7072         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
7073         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
7074         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
7075         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
7076         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
7077         anonymous split): Adjust.
7078         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
7079         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
7081 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
7083         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
7084         when --with-gxx-include-dir is also specified.
7085         * configure: Regenerate.
7087 2018-05-09  Jim Wilson  <jimw@sifive.com>
7089         PR target/84797
7090         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
7091         * config/riscv/t-withmultilib: New.
7092         * config/riscv/withmultilib.h: New.
7093         * doc/install.texi: Document RISC-V --with-multilib-list support.
7095 2018-05-09  Richard Biener  <rguenther@suse.de>
7097         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
7098         vector.
7099         (vect_bb_vectorization_profitable_p): Adjust.  Compute
7100         actual scalar cost using the cost vector and the add_stmt_cost
7101         machinery.
7103 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7105         PR rtl-optimization/85645
7106         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
7107         in the REG_CFA_REGISTER note for LR, don't leave it empty.
7109 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7111         PR rtl-optimization/85645
7112         * shrink-wrap.c (spread_components): Return a boolean saying if
7113         anything was changed.
7114         (try_shrink_wrapping_separate): Iterate spread_components until
7115         nothing changes anymore.
7117 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7119         PR rtl-optimization/85645
7120         * regrename.c (build_def_use): Also kill the chains that include the
7121         destination of a REG_CFA_REGISTER note.
7123 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
7125         PR rtl-optimization/85645
7126         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
7127         insn that has a REG_CFA_REGISTER note.
7129 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
7131         * cfgexpand.c (expand_clobber): New function.
7132         (expand_gimple_stmt_1): Use it.
7133         * tree-vect-stmts.c (vect_clobber_variable): New function,
7134         split out from...
7135         (vectorizable_simd_clone_call): ...here.
7136         (vectorizable_store): Emit a clobber either side of an
7137         IFN_STORE_LANES sequence.
7138         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
7140 2018-05-09  Tom de Vries  <tom@codesourcery.com>
7142         PR target/85626
7143         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
7144         (define_insn "trap_if_false"): Add exit after trap.
7146 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
7148         PR rtl-optimization/85638
7149         * bb-reorder.c: Include common/common-target.h.
7150         (create_forwarder_block): New function extracted from...
7151         (fix_up_crossing_landing_pad): ...here.  Rename into...
7152         (dw2_fix_up_crossing_landing_pad): ...this.
7153         (sjlj_fix_up_crossing_landing_pad): New function.
7154         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
7155         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
7156         from both partitions and exit the loop after one iteration.
7158 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7160         Revert:
7161         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7162         subsection.
7163         (Basic PowerPC Built-in Functions): The new name of the
7164         subsection previously known as "PowerPC Built-in Functions".
7165         (Basic PowerPC Built-in Functions Available on all Configurations):
7166         New subsubsection.
7167         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7168         subsubsection.
7169         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7170         subsubsection.
7171         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7172         subsubsection.
7173         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7174         subsubsection.
7176 2018-05-08  Jim Wilson  <jimw@sifive.com>
7178         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
7179         (LD_EMUL_SUFFIX): New.
7180         (LINK_SPEC): Use it.
7182 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7184         * doc/extend.texi (PowerPC Built-in Functions): Rename this
7185         subsection.
7186         (Basic PowerPC Built-in Functions): The new name of the
7187         subsection previously known as "PowerPC Built-in Functions".
7188         (Basic PowerPC Built-in Functions Available on all Configurations):
7189         New subsubsection.
7190         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
7191         subsubsection.
7192         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
7193         subsubsection.
7194         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
7195         subsubsection.
7196         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
7197         subsubsection.
7199 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
7201         PR target/85683
7202         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
7203         after cmpelim optimization.
7205 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
7207         * config.gcc: Support "goldmont".
7208         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
7209         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7210         PROCESSOR_GOLDMONT.
7211         * config/i386/i386.c (m_GOLDMONT): Define.
7212         (processor_target_table): Add "goldmont".
7213         (PTA_GOLDMONT): Define.
7214         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
7215         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
7216         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
7217         (fold_builtin_cpu): Add "goldmont".
7218         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
7219         (ix86_option_override_internal): Add "goldmont".
7220         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
7221         (processor_type): Add PROCESSOR_GOLDMONT.
7222         * config/i386/i386.md: Add CPU "glm".
7223         * config/i386/glm.md: New file.
7224         * config/i386/x86-tune.def: Add m_GOLDMONT.
7225         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
7227 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
7229         PR target/85572
7230         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
7231         E_V4DImode.
7232         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
7233         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
7234         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
7236         PR target/85317
7237         * config/i386/i386.c (ix86_fold_builtin): Handle
7238         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
7240         PR target/85480
7241         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7242         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7244 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
7246         PR target/85658
7247         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7248         (check_arch): Likewise.
7249         (check_fpu): Return the result rather than printing it.
7250         (end arch): Fix operator precedence.
7251         (end cpu): Likewise.
7252         (END): Print the result from check_fpu.
7254 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7255             Alan Hayward  <alan.hayward@arm.com>
7256             David Sherwood  <david.sherwood@arm.com>
7258         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7259         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7260         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7261         (*fcmuo<mode>_and): New patterns.
7263 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
7265         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7266         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7267         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7268         (cmp_op, sve_imm_con): New code attributes.
7269         (SVE_COND_INT_CMP, imm_con): Delete.
7270         (cmp_op): Remove above unspecs from int attribute.
7271         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7272         to...
7273         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
7274         comparison-specific unspecs.
7275         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7276         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7277         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7278         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7279         (*vec_fcm<cmp_op><mode>): Rename to...
7280         (*fcm<cmp_op><mode>): ...this and adjust likewise.
7281         (*vec_fcmuo<mode>): Rename to...
7282         (*fcmuo<mode>): ...this and adjust likewise.
7283         (*pred_fcm<cmp_op><mode>): New pattern.
7284         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7285         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7286         functions.
7287         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7288         and UNORDERED.
7289         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7290         (aarch64_emit_sve_predicated_cond): New function.
7291         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7292         (aarch64_emit_unspec_cond_or): Replace with...
7293         (aarch64_emit_sve_or_conds): ...this new function.  Use
7294         aarch64_emit_sve_ptrue_op for the individual comparisons and
7295         aarch64_emit_binop to OR them together.
7296         (aarch64_emit_inverted_unspec_cond): Replace with...
7297         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
7298         aarch64_emit_sve_ptrue_op for the comparison and
7299         aarch64_emit_unop to invert the result.
7300         (aarch64_expand_sve_vec_cmp_float): Update after the above
7301         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
7303 2018-05-07  Nathan Sidwell  <nathan@acm.org>
7305         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7306         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7307         (Backwards Compatibility): Likewise.
7309 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7311         PR bootstrap/85681
7312         Revert:
7313         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7315         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7316         <prefetch_dynamic_strides>: New const bool field.
7317         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7318         prefetch_dynamic_strides.
7319         (exynosm1_prefetch_tune): Likewise.
7320         (thunderxt88_prefetch_tune): Likewise.
7321         (thunderx_prefetch_tune): Likewise.
7322         (thunderx2t99_prefetch_tune): Likewise.
7323         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7324         to false.
7325         (aarch64_override_options_internal): Update to set
7326         PARAM_PREFETCH_DYNAMIC_STRIDES.
7327         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7328         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7329         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7330         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7331         prefetch-dynamic-strides setting.
7333         2018-05-07  Luis Machado  <luis.machado@linaro.org>
7335         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7336         <minimum_stride>: New const int field.
7337         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7338         minimum_stride field.
7339         (exynosm1_prefetch_tune): Likewise.
7340         (thunderxt88_prefetch_tune): Likewise.
7341         (thunderx_prefetch_tune): Likewise.
7342         (thunderx2t99_prefetch_tune): Likewise.
7343         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7344         (aarch64_override_options_internal): Update to set
7345         PARAM_PREFETCH_MINIMUM_STRIDE.
7346         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7347         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7348         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7349         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7350         stride is constant and is below the minimum stride threshold.
7352 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7354         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7355         to 512.
7357 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7359         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7360         <prefetch_dynamic_strides>: New const bool field.
7361         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7362         prefetch_dynamic_strides.
7363         (exynosm1_prefetch_tune): Likewise.
7364         (thunderxt88_prefetch_tune): Likewise.
7365         (thunderx_prefetch_tune): Likewise.
7366         (thunderx2t99_prefetch_tune): Likewise.
7367         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7368         to false.
7369         (aarch64_override_options_internal): Update to set
7370         PARAM_PREFETCH_DYNAMIC_STRIDES.
7371         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7372         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7373         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7374         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7375         prefetch-dynamic-strides setting.
7377 2018-05-07  Luis Machado  <luis.machado@linaro.org>
7379         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7380         <minimum_stride>: New const int field.
7381         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7382         minimum_stride field.
7383         (exynosm1_prefetch_tune): Likewise.
7384         (thunderxt88_prefetch_tune): Likewise.
7385         (thunderx_prefetch_tune): Likewise.
7386         (thunderx2t99_prefetch_tune): Likewise.
7387         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7388         (aarch64_override_options_internal): Update to set
7389         PARAM_PREFETCH_MINIMUM_STRIDE.
7390         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7391         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7392         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7393         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7394         stride is constant and is below the minimum stride threshold.
7396 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
7398         PR c++/85659
7399         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7400         the type is addressable.  Don't force op into register if it has
7401         BLKmode.
7403 2018-05-05  Roland McGrath  <mcgrathr@google.com>
7405         PR other/77609
7406         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7407         any section for which we don't know a specific type it should have,
7408         regardless of name.  Previously this was done only for the exact
7409         names ".init_array", ".fini_array", and ".preinit_array".
7410         (default_elf_asm_named_section): Add comment about
7411         relationship with default_section_type_flags and SECTION_NOTYPE.
7412         (get_section): Don't consider it a type conflict if one side has
7413         SECTION_NOTYPE and the other doesn't, as long as neither has the
7414         SECTION_BSS et al used in the default_section_type_flags logic.
7416 2018-05-05  Tom de Vries  <tom@codesourcery.com>
7418         PR target/85653
7419         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7420         (workaround_barsyncs): New function.
7421         (nvptx_reorg): Use workaround_barsyncs.
7422         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7423         (define_expand "nvptx_membar_cta"): New define_expand.
7424         (define_insn "*nvptx_membar_cta"): New insn.
7426 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
7428         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7429         To improve optimization opportunities.
7430         * builtin-types.def: The new needed builtin types for the above.
7432 2018-05-04  Richard Biener  <rguenther@suse.de>
7434         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7435         * gimple-ssa-store-merging.c
7436         (imm_store_chain_info::output_merged_store): Remove redundant create,
7437         release split_store vector contents on failure.
7438         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7439         scalar stmt vector on cache hit.
7441 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
7443         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7444         Xilinx FP support.
7445         * config.gcc (powerpc-xilinx-eabi*): Remove.
7446         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7447         support.
7448         (fusion_addis_mem_combo_load): Ditto.
7449         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7450         FP support.
7451         (rs6000_cpu_cpp_builtins): Ditto.
7452         * config/rs6000/rs6000-linux.c
7453         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
7454         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
7455         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
7456         support.
7457         (rs6000_setup_reg_addr_masks): Ditto.
7458         (rs6000_init_hard_regno_mode_ok): Ditto.
7459         (rs6000_option_override_internal): Ditto.
7460         (legitimate_lo_sum_address_p): Ditto.
7461         (rs6000_legitimize_address): Ditto.
7462         (rs6000_legitimize_reload_address): Ditto.
7463         (rs6000_legitimate_address_p): Ditto.
7464         (abi_v4_pass_in_fpr): Ditto.
7465         (setup_incoming_varargs): Ditto.
7466         (rs6000_gimplify_va_arg): Ditto.
7467         (rs6000_split_multireg_move): Ditto.
7468         (rs6000_savres_strategy): Ditto.
7469         (rs6000_emit_prologue_components): Ditto.
7470         (rs6000_emit_epilogue_components): Ditto.
7471         (rs6000_emit_prologue): Ditto.
7472         (rs6000_emit_epilogue): Ditto.
7473         (rs6000_elf_file_end): Ditto.
7474         (rs6000_function_value): Ditto.
7475         (rs6000_libcall_value): Ditto.
7476         * config/rs6000/rs6000.h: Ditto.
7477         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
7478         (TARGET_MINMAX): ... this.  New.
7479         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
7480         * config/rs6000/rs6000.md: Remove Xilinx FP support.
7481         (*movsi_internal1_single): Delete.
7482         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
7483         mfpu=, mxilinx-fpu): Delete.
7484         * config/rs6000/singlefp.h: Delete.
7485         * config/rs6000/sysv4.h: Remove Xilinx FP support.
7486         * config/rs6000/t-rs6000: Ditto.
7487         * config/rs6000/t-xilinx: Delete.
7488         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
7489         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
7490         (VStype_simple): Delete.
7491         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
7492         * config/rs6000/xfpu.h: Delete.
7493         * config/rs6000/xfpu.md: Delete.
7494         * config/rs6000/xilinx.h: Delete.
7495         * config/rs6000/xilinx.opt: Delete.
7496         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
7497         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
7499 2018-05-04  Tom de Vries  <tom@codesourcery.com>
7501         PR libgomp/85639
7502         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
7503         if ignore == 0.
7505 2018-05-04  Richard Biener  <rguenther@suse.de>
7507         PR middle-end/85627
7508         * tree-complex.c (update_complex_assignment): We are always in SSA form.
7509         (expand_complex_div_wide): Likewise.
7510         (expand_complex_operations_1): Likewise.
7511         (expand_complex_libcall): Preserve EH info of the original stmt.
7512         (tree_lower_complex): Handle removed blocks.
7513         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
7514         on complex multiplication and division libcall builtins.
7516 2018-05-04  Richard Biener  <rguenther@suse.de>
7518         PR middle-end/85574
7519         * fold-const.c (negate_expr_p): Restrict negation of operand
7520         zero of a division to when we know that can happen without
7521         overflow.
7522         (fold_negate_expr_1): Likewise.
7524 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
7526         PR libstdc++/85466
7527         * real.h (real_nextafter): Declare.
7528         * real.c (real_nextafter): New function.
7529         * fold-const-call.c (fold_const_nextafter): New function.
7530         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
7531         CASE_CFN_NEXTTOWARD.
7532         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
7533         even when arg1_mode is different from arg0_mode.
7535 2018-05-03  Nathan Sidwell  <nathan@acm.org>
7537         * doc/extend.texi (Deprecated Features): Remove
7538         -ffriend-injection.
7539         (Backwards Compatibility): Likewise.
7540         * doc/invoke.texi (C++ Language Options): Likewise.
7541         (C++ Dialect Options): Likewise.
7543 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
7545         PR target/85530
7546         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
7547         _mm512_mask_mullox_epi64): New intrinsics.
7549 2018-05-03  Tom de Vries  <tom@codesourcery.com>
7551         PR testsuite/85106
7552         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7553         dump files): Add offload-tree.
7555 2018-05-03  Richard Biener  <rguenther@suse.de>
7557         PR tree-optimization/85615
7558         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
7559         to loops not nested in BBs loop father to avoid creating multi-entry
7560         loops.
7562 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7564         PR tree-optimization/70291
7565         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
7566         arguments.  Change return type to tree.  Emit libcall as a new
7567         statement rather than replacing existing one when inplace_p is true.
7568         (expand_complex_multiplication_components): New function.
7569         (expand_complex_multiplication): Expand floating-point complex
7570         multiplication using the above.
7571         (expand_complex_division): Rename inner_type parameter to type.
7572         Update expand_complex_libcall call-site.
7573         (expand_complex_operations_1): Update expand_complex_multiplication
7574         and expand_complex_division call-sites.
7576 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
7578         PR target/85582
7579         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7580         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7581         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
7582         the highest significant bit of the shift count mask is clear.  In
7583         check whether and[sq]i3 is needed verify that all significant bits
7584         of the shift count other than the highest are set.
7586 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7588         PR libgomp/82428
7589         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
7590         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
7591         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
7592         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
7593         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
7594         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
7595         __builtin_goacc_parlevel_size.
7597 2018-05-02  Richard Biener  <rguenther@suse.de>
7599         PR tree-optimization/85597
7600         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
7601         do not use split vect_get_vec_defs call but call vect_get_slp_defs
7602         directly.
7604 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7606         PR testsuite/85106
7607         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7608         dump files): Add ltrans-tree.
7610 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7612         PR testsuite/85106
7613         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7614         dump files): Add wpa-ipa.
7616 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
7618         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
7619         powerpc*-*-linux*paired* target.
7620         * config/rs6000/750cl.h: Delete.
7621         * config/rs6000/paired.h: Delete.
7622         * config/rs6000/paired.md: Delete.
7623         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
7624         float support.
7625         * config/rs6000/rs6000-builtin.def: Remove paired float support.
7626         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
7627         comment.  Remove paired float support.
7628         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
7629         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7630         VECTOR_PAIRED.
7631         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
7632         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
7633         declarations.
7634         * config/rs6000/rs6000.c: Remove paired float support.
7635         (paired_expand_vector_init, paired_expand_vector_move,
7636         paired_emit_vector_compare, paired_emit_vector_cond_expr,
7637         (paired_expand_lv_builtin, paired_expand_stv_builtin,
7638         paired_expand_builtin, paired_expand_predicate_builtin,
7639         paired_init_builtins): Delete.
7640         * config/rs6000/rs6000.h: Remove paired float support.
7641         * config/rs6000/rs6000.md: Remove paired float support.
7642         (move_from_CR_ov_bit): Delete.
7643         * config/rs6000/rs6000.opt (mpaired): Delete.
7644         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
7645         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
7647 2018-05-02  Richard Biener  <rguenther@suse.de>
7649         PR middle-end/85567
7650         * gimplify.c (gimplify_save_expr): When in SSA form allow
7651         SAVE_EXPRs to compute to SSA vars.
7653 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
7655         PR target/85582
7656         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7657         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7658         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
7659         clobber operands[2], instead use a new pseudo.  Formatting fixes.
7661 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
7663         PR tree-optimization/85586
7664         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
7665         exit early for statements in the same group if the accesses are
7666         not strided.
7668 2018-05-02  Tom de Vries  <tom@codesourcery.com>
7670         PR lto/85451
7671         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
7672         error message.
7674 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
7676         PR tree-optimization/85143
7677         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
7679 2018-05-01  Tom de Vries  <tom@codesourcery.com>
7681         PR lto/85451
7682         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
7683         not found" error message.
7685 2018-05-01  Tom de Vries  <tom@codesourcery.com>
7687         PR other/83786
7688         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
7689         * vec.c (test_ordered_remove_if): New function.
7690         (vec_c_tests): Call test_ordered_remove_if.
7691         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
7692         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
7693         * tree-vect-patterns.c (vect_pattern_recog_1): Use
7694         VEC_ORDERED_REMOVE_IF.
7696 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7698         PR tree-optimization/82665
7699         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
7700         pointer subtraction where arguments come from a memchr call.
7702 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
7704         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
7705         --push-state --as-needed and --pop-state instead of --as-needed and
7706         --no-as-needed if ld supports it.
7707         * configure: Regenerated.
7709         PR web/85578
7710         * doc/install.texi2html: Replace _002d with - and _002a with * in
7711         generated html files using sed.
7713 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7715         PR c++/85523
7716         * gcc-rich-location.c (blank_line_before_p): New function.
7717         (use_new_line): New function.
7718         (gcc_rich_location::add_fixit_insert_formatted): New function.
7719         * gcc-rich-location.h
7720         (gcc_rich_location::add_fixit_insert_formatted): New function.
7722 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7724         * selftest.c (assert_streq): Rename "expected" and "actual" to
7725         "val1" and "val2".  Extend NULL-handling to cover both inputs
7726         symmetrically, while still requiring both to be non-NULL for a pass.
7727         * selftest.h (assert_streq): Rename "expected" and "actual" to
7728         "val1" and "val2".
7729         (ASSERT_EQ): Likewise.
7730         (ASSERT_EQ_AT): Likewise.
7731         (ASSERT_KNOWN_EQ): Likewise.
7732         (ASSERT_KNOWN_EQ_AT): Likewise.
7733         (ASSERT_NE): Likewise.
7734         (ASSERT_MAYBE_NE): Likewise.
7735         (ASSERT_MAYBE_NE_AT): Likewise.
7736         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
7737         the assertion to pass.
7738         (ASSERT_STREQ_AT): Likewise.
7740 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
7742         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
7743         interaction with -pie.
7745 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7747         * selftest.h: Fix alphabetization of per-source-file selftest
7748         declarations.
7750 2018-04-30  Jason Merrill  <jason@redhat.com>
7752         PR c++/61982 - dead stores to destroyed objects.
7753         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
7754         of clobber.
7756 2018-04-30  Jason Merrill  <jason@redhat.com>
7758         * tree.c (build_clobber): New.
7759         * tree.h: Declare it.
7760         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
7762 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7764         * diagnostic-show-locus.c (layout::layout): Update for
7765         location_get_source_line returning a char_span.
7766         (struct char_span): Move to input.h.
7767         (struct correction): Update for fields in char_span becoming
7768         private.
7769         (struct source_line): Update for location_get_source_line
7770         returning a char_span.
7771         (layout::print_line): Likewise.
7772         * edit-context.c (edited_file::print_content): Likewise.
7773         (edited_file::print_diff_hunk): Likewise.
7774         (edited_file::print_run_of_changed_lines): Likewise.
7775         (edited_file::get_num_lines): Likewise.
7776         (edited_line::edited_line): Likewise.
7777         * final.c (asm_show_source): Likewise.
7778         * input.c (location_get_source_line): Convert return type
7779         from const char * to char_span, losing the final "line_len"
7780         param.
7781         (dump_location_info): Update for the above.
7782         (get_substring_ranges_for_loc): Likewise.  Use a char_span
7783         when handling the literal within the line.
7784         (test_reading_source_line): Update for location_get_source_line
7785         returning a char_span.
7786         * input.h (class char_span): Move here from
7787         diagnostic-show-locus.c, converting from a struct to a class.
7788         Make data members private.
7789         (char_span::operator bool): New.
7790         (char_span::length): New.
7791         (char_span::get_buffer): New.
7792         (char_span::operator[]): New.
7793         (char_span::subspan): Make const.
7794         (char_span::xstrdup): New.
7795         (location_get_source_line): Convert return type from const char *
7796         to char_span, losing the final "line_size" param.
7798 2018-04-30  Jan Hubicka  <jh@suse.cz>
7800         * lto-wrapper.c (ltrans_priorities): New static var.
7801         (cmp_priority): New.
7802         (run_gcc): Read priorities and if doing parallel build order
7803         the Makefile by them.
7805 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
7807         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
7809 2018-04-30  Richard Biener  <rguenther@suse.de>
7811         * tree-cfg.c (verify_address): Remove base argument, add
7812         flag whether to check TREE_ADDRESSABLE and do that.
7813         (verify_expr): Remove.
7814         (verify_types_in_gimple_reference): Add pieces from verify_expr.
7815         (verify_gimple_assign_single): Likewise.
7816         (verify_gimple_switch): Likewise.
7817         (verify_expr_location_1): Dereference tp once.  Add (disabled)
7818         piece from verify_expr.
7819         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
7821 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7823         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
7825 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7827         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
7828         (small_data_pattern): Likewise.
7829         (arc_rewrite_small_data): Likewise.
7830         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
7831         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
7832         (get_symbol_alignment): New function.
7833         (legitimate_small_data_address_p): Likewise.
7834         (legitimate_scaled_address): Update, call
7835         legitimate_small_data_address_p.
7836         (output_sdata): New static variable.
7837         (arc_print_operand): Update how we handle small data operands.
7838         (arc_print_operand_address): Likewise.
7839         (arc_legitimate_address_p): Update, use
7840         legitimate_small_data_address_p.
7841         (arc_rewrite_small_data_p): Remove.
7842         (arc_rewrite_small_data_1): Likewise.
7843         (arc_rewrite_small_data): Likewise.
7844         (small_data_pattern): Likewise.
7845         (compact_sda_memory_operand): Update to use
7846         legitimate_small_data_address_p and get_symbol_alignment.
7847         (prepare_move_operands): Don't rewite sdata pattern.
7848         (prepare_extend_operands): Remove.
7849         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
7850         pattern.
7851         (zero_extendqisi2): Likewise.
7852         (zero_extendhisi2): Likewise.
7853         (extendqihi2): Likewise.
7854         (extendqisi2): Likewise.
7855         (extendhisi2): Likewise.
7856         (addsi3): Likewise.
7857         (subsi3): Likewise.
7858         (andsi3): Likewise.
7859         * config/arc/constraints.md (Usd): Change it to memory constraint.
7861 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
7863         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
7864         as source of std instructions.
7865         * config/arc/arc.md (movsi_insn): Update pattern predicate to
7866         allow 6-bit constants as source for store instructions.
7867         (movdi_insn): Update instruction pattern to allow 6-bit constants
7868         as source for store instructions.
7870 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
7872         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
7874 2018-04-30  Nathan Sidwell  <nathan@acm.org>
7875             Sandra Loosemore <sandra@codesourcery.com>
7877         * dumpfile.c (dump_open): Allow '-' for stdout.
7878         * doc/invoke.texi (Developer Options): Document dump filename
7879         determination early.  Document stdin/stdout selection.
7881 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
7883         Microblaze Target: PIC data text relative
7885         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
7886         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
7887         Add declaration.
7888         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
7889         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
7890         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
7891         New addressing mode for data-text relative position indepenedent code.
7892         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
7893         'ADDRESS_SYMBOLIC_TXT_REL'.
7894         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
7895         (microblaze_legitimate_pic_operand): Exclude function calls from
7896         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
7897         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
7898         addresses cases.
7899         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7900         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7901         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
7902         for 'address + offset'.
7903         (microblaze_expand_prologue): Add new function prologue call for
7904         'r20' assignation.
7905         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
7906         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
7907         table in case of TARGET_PIC_DATA_TEXT_REL.
7908         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
7909         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
7910         Add new macros 'UNSPEC_TEXT',
7911         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
7912         + exclude function calls from 'UNSPEC_PLT' in case of data text
7913         relative mode.
7914         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7915         new target hook for generating address diff vector tables in case of
7916         flag_pic.
7917         * doc/tm.texi : Regenerate.
7918         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
7919         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
7920         of addr diff vector generation.
7921         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7922         target hook definition.
7923         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
7924         Add default function for generate_pic_addr_diff_vec -> flag_pic.
7925         * doc/invoke.texi (Add new pic option): Add new microblaze pic
7926         option for data text relative.
7928 2018-04-30  Richard Biener  <rguenther@suse.de>
7930         * tree-chrec.h (evolution_function_is_constant_p): Remove
7931         redundant check.
7932         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
7934 2018-04-30  Richard Biener  <rguenther@suse.de>
7936         PR bootstrap/85571
7937         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
7939 2018-04-30  Richard Biener  <rguenther@suse.de>
7941         PR tree-optimization/28364
7942         PR tree-optimization/85275
7943         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
7944         copying first exit test.
7946 2018-04-28  Mark Wielaard  <mark@klomp.org>
7948         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
7949         dwarf_version >= 5.
7950         (dwarf_AT): Handle DW_AT_addr_base.
7951         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
7953 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
7955         PR target/84431
7956         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
7957         (*ashl<dwi>3_doubleword_mask_1): Ditto.
7958         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
7959         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
7961 2018-04-28  Richard Biener  <rguenther@suse.de>
7963         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
7964         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
7965         to reflect use.  Only add interesting stmts.
7967 2018-04-27  Martin Jambor  <mjambor@suse.cz>
7969         PR ipa/85549
7970         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
7971         the jump function allows for passing through aggregate values.
7973 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
7975         * input.h (in_system_header_at): Convert from macro to inline
7976         function.
7977         (from_macro_expansion_at): Likewise.
7978         (from_macro_definition_at): Likewise.
7980 2018-04-27  Jeff Law  <law@redhat.com>
7982         * config.gcc: Mark tile* targets as deprecated/obsolete.
7984 2018-04-27  Richard Biener  <rguenther@suse.de>
7986         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
7987         fix for ILP32.
7989 2018-04-27  Richard Biener  <rguenther@suse.de>
7991         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
7993 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
7995         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
7996         with Yd constraint. Set "preferred_for_speed" attribute from
7997         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
7998         with Yd constraint.
7999         (*movdi_internal): Ditto.
8000         (movti_interunit splitters): Remove
8001         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
8002         (movdi_interunit splitters): Ditto.
8003         * config/i386/constraints.md (Ye): Remove.
8004         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
8006 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8008         PR target/85512
8009         * config/aarch64/constraints.md (Usg): Limit to 31.
8010         (Usj): Limit to 63.
8012 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
8014         PR tree-optimization/85529
8015         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
8016         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
8017         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
8018         zero extension or masking of the MSB bit.
8019         (optimize_range_tests): Add FIRST_BB argument, pass it through
8020         to optimize_range_tests_var_bound.
8021         (maybe_optimize_range_tests, reassociate_bb): Adjust
8022         optimize_range_tests callers.
8024 2018-04-26  Richard Biener  <rguenther@suse.de>
8025             Jakub Jelinek  <jakub@redhat.com>
8027         * cgraph.h (symbol_table): Just declare debug method here.
8028         * symtab.c (symbol_table::debug): Define.
8030 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
8032         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
8034 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
8036         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
8037         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
8038         (*movdi_internal): Substitute Yi and Yj constraint with x
8039         and Ym and Yn constraint with y constraint.  Update "isa"
8040         attribute and set "preferred_for_speed" attribute from
8041         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
8042         (*movsi_internal): Ditto.
8043         (*movdf_internal): Ditto.
8044         (*movsf_internal): Ditto.
8045         (*zero_extendsidi2): Ditto.
8046         * config/i386/sse.md (vec_set<mode>_0): Ditto.
8047         (sse2_loadld): Ditto.
8048         (*vec_extract<ssevecmodelower>_0): Ditto.
8049         (*vec_extractv4si_0_zext_sse4): Ditto.
8050         (vec_concatv2di): Ditto.
8051         (*vec_dup<mode>): Ditto.
8052         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
8053         * config/i386/constraints.md (Yi): Remove.
8054         (Yj): Remove.
8055         (Ym): Remove.
8056         (Yn): Remove.
8058 2018-04-26  Nathan Sidwell  <nathan@acm.org>
8060         * dumpfile.c (dump_open): New.
8061         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
8062         (dump_finish): Detect stdio/stderr by value not name.
8064 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
8066         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
8068 2018-04-26  Tom de Vries  <tom@codesourcery.com>
8070         PR target/84952
8071         * config/nvptx/nvptx.c (verify_neutering_jumps)
8072         (verify_neutering_labels): New function
8073         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
8075 2018-04-26  Tom de Vries  <tom@codesourcery.com>
8077         PR target/84025
8078         * config/nvptx/nvptx.c (needs_neutering_p): New function.
8079         (nvptx_single): Use needs_neutering_p to skip over insns that do not
8080         need neutering.
8082 2018-04-26  Richard Biener <rguenther@suse.de>
8083             Tom de Vries  <tom@codesourcery.com>
8085         PR lto/85422
8086         * lto-streamer-out.c (output_function): Fixup loops if required to match
8087         discovery done in the reader.
8089 2018-04-26  Richard Biener  <rguenther@suse.de>
8091         PR tree-optimization/85116
8092         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
8093         have a loop exit from the single latch predecessor.  Remove
8094         case of header with just condition.
8095         (ch_base::copy_headers): Exclude infinite loops from any
8096         processing.
8097         (pass_ch::execute): Record exits.
8099 2018-04-26  Richard Biener  <rguenther@suse.de>
8101         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
8102         prologue cost vector and pass it to vect_get_load_cost.
8103         (vect_get_peeling_costs_all_drs): Likewise.
8104         (vect_peeling_hash_get_lowest_cost): Likewise.
8105         (vect_enhance_data_refs_alignment): Likewise.
8107 2018-04-26  Richard Biener  <rguenther@suse.de>
8109         PR middle-end/85450
8110         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
8111         checking of integer<->pointer conversions.
8112         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
8113         sign-/zero-extending pointer types.
8114         (expand_omp_for_static_chunk): Likewise.
8116 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
8117             Jean Lee  <xiaoyur347@gmail.com>
8119         * config/mips/mips.c (mips_asan_shadow_offset): New function.
8120         (TARGET_ASAN_SHADOW_OFFSET): Define.
8121         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
8122         true for -fsanitize=address.
8124 2018-04-25  Mark Wielaard  <mark@klomp.org>
8126         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
8127         shorter ones.
8129 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
8131         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
8132         than "alu", remove explicit "memory" and "imm_disp" attributes.
8133         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
8135         PR middle-end/85414
8136         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
8137         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
8138         gen_lowpart_no_emit.
8140 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
8142         PR target/85473
8143         * config/i386/i386.c (ix86_expand_builtin): Change memory
8144         operand to XI, extend p0 to Pmode.
8145         * config/i386/i386.md: Change unspec volatile and operand
8146         1 mode to XI, change operand 0 mode to P.
8148 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8150         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
8151         GET_MODE_MASK before any checking.
8152         (nds32_can_use_bset_p): Likewise.
8153         (nds32_can_use_btgl_p): Likewise.
8155 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8157         * config/nds32/nds32-doubleword.md: New define_split pattern for
8158         illegal register number.
8160 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8162         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
8164 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
8166         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
8168 2018-04-25  Richard Biener  <rguenther@suse.de>
8170         * lto-streamer.h (LTO_major_version): Bump to 8.
8172 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
8174         * BASE-VER: Set to 9.0.0.
8176 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
8178         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
8179         in __abskf2 and __powikf2.
8181 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8183         PR target/85512
8184         * config/aarch64/constraints.md (Usg, Usj): New constraints.
8185         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
8186         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
8187         Use the above on operand 2.  Reindent.
8188         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
8190 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
8192         PR target/85485
8193         * common/config/i386/i386-common.c (ix86_handle_option): Don't
8194         handle OPT_mcet.
8195         * config/i386/i386.opt (mcet): Removed.
8196         * doc/install.texi: Remove -mcet documentation.
8197         * doc/invoke.texi: Likewise.
8199 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
8201         PR target/85485
8202         * doc/install.texi: Remove -mcet from bootstrap-cet.
8204 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8206         PR target/85511
8207         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
8208         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
8209         if TARGET_64BIT.
8211         PR target/85503
8212         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
8213         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
8214         containing a CONST_VECTOR.
8216 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
8218         * doc/install.texi: Update newlib dependency for nvptx.
8220 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8222         PR target/85508
8223         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
8224         instead of INTVAL when shifting x left.
8226 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
8228         PR tree-optimization/85478
8229         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
8230         vect_grouped_store_supported for single element vectors.
8232 2018-04-24  Richard Biener  <rguenther@suse.de>
8234         PR target/85491
8235         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
8236         load cost increase to the case of non-constant step.
8238 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
8240         PR target/84828
8241         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8242         destination if any_malformed_asm.
8244 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
8246         PR middle-end/85496
8247         * expr.c (store_field): In the bitfield case, if the value comes from
8248         a function call and is returned in registers by means of a PARALLEL,
8249         do not change the mode of the temporary unless BLKmode and VOIDmode.
8251 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
8253         PR rtl-optimization/85423
8254         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8255         dependencies to debug insns when the previous insn is non-debug.
8257 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8259         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8260         enums into a single definition.
8261         (fls): Fix predicates and printing.
8262         (seti): Likewise.
8264 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
8266         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8267         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8268         and short u6 immediate.
8269         (check_if_valid_sleep_operand): Remove.
8270         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8272 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8274         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8275         flag_always_save_lp condition.
8276         * config/nds32/nds32.opt (malways-save-lp): New option.
8278 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8280         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8281         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8282         * config/nds32/nds32.h
8283         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8284         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8286 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8288         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8289         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8291 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
8292             Chung-Ju Wu  <jasonwucj@gmail.com>
8294         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8295         Declare.
8296         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8297         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8299 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8301         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8303 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8305         * config/nds32/nds32-protos.h (nds32_data_alignment,
8306         nds32_local_alignment): Declare.
8307         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8308         nds32_local_alignment): New functions.
8309         (TARGET_CONSTANT_ALIGNMENT): Define.
8310         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8312 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8314         * config/nds32/nds32.c
8315         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8316         (TARGET_MODES_TIEABLE_P): Likewise.
8318 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8320         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8321         level Ofast and Og.
8323 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
8324             Chung-Ju Wu  <jasonwucj@gmail.com>
8326         * config/nds32/constants.md (unspec_volatile_element): Add enum values
8327         for unaligned access.
8328         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8329         unaligned access.
8330         * config/nds32/nds32-intrinsic.md: Likewise.
8331         * config/nds32/nds32_intrinsic.h: Likewise.
8332         * config/nds32/nds32.h (nds32_builtins): Likewise.
8333         * config/nds32/nds32.opt (munaligned-access): New option.
8334         * config/nds32/nds32.c (nds32_asm_file_start): Display
8335         flag_unaligned_access status.
8337 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8339         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8340         -mno-relax is present.
8341         * config/riscv/linux.h (LINK_SPEC): Ditto.
8343 2018-04-20  Martin Sebor  <msebor@redhat.com>
8345         PR c/85365
8346         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8347         for null pointers.
8348         (gimple_fold_builtin_stxcpy_chk): Same.
8349         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8351 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
8353         PR target/85456
8354         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8355         __powikf2 when long double is IEEE 128-bit.
8357 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
8359         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8360         step to make sure stack always aligned.
8362 2018-04-20  Carl Love  <cel@us.ibm.com>
8364         PR target/83402
8365         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8366         size check for arg0.
8368 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8369             Tom de Vries  <tom@codesourcery.com>
8371         PR target/85445
8372         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8373         Emit insns for calls too.
8374         (nvptx_find_par): Always look for worker-level predecessor insn.
8375         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
8376         calls.
8377         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8378         (nvptx_process_pars): Propagate frames for calls.
8380 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
8382         PR target/85469
8383         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8384         Removed.
8385         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8386         (ix86_handle_option): Don't handle OPT_mibt.
8387         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8388         __SHSTK__.
8389         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8390         has_ibt and ibt.
8391         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8392         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8393         (ix86_target_macros): Define __CET__ with flag_cf_protection
8394         for -fcf-protection.
8395         * config/i386/i386.c (isa2_opts): Remove -mibt.
8396         * config/i386/i386.h (TARGET_IBT): Removed.
8397         (TARGET_IBT_P): Likewise.
8398         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8399         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8400         * config/i386/i386.opt (mcet): Update help message.
8401         (mshstk): Likewise.
8402         (mibt): Removed.
8403         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
8404         -mcet as an alias for -mshstk.
8406 2018-04-20  Richard Biener <rguenther@suse.de>
8408         PR middle-end/85475
8409         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8410         complexity by forcing a single use of the multiply operand.
8412 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8414         ipa/85449
8415         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8416         recursion dependency to only apply to non-clones.
8418 2018-04-20  Martin Jambor  <mjambor@suse.cz>
8420         ipa/85447
8421         * ipa-cp.c (create_specialized_node): Check that clones of
8422         self-recursive edges exist during IPA-CP.
8424 2018-04-19  Toon Moene  <toon@moene.org>
8426         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8427         by -O3.
8429 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8431         PR tree-optimization/85467
8432         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8433         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
8434         VECTOR_CST element to type.
8436 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8438         PR target/85397
8439         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8440         * config/i386/i386.md (builtin_setjmp_setup): Removed.
8441         (builtin_longjmp): Likewise.
8442         (save_stack_nonlocal): New pattern.
8443         (restore_stack_nonlocal): Likewise.
8445 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8447         PR target/85404
8448         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8449         Replace ASM_OUTPUT_LABEL with fprintf.
8451 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
8453         PR target/85417
8454         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8455         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
8456         * config/i386/i386-c.c (ix86_target_macros_internal): Also
8457         define __IBT__ and __SHSTK__ for -fcf-protection.
8458         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
8459         TARGET_IBT.
8460         (ix86_trampoline_init): Likewise.
8461         (x86_output_mi_thunk): Likewise.
8462         (ix86_notrack_prefixed_insn_p): Likewise.
8463         (ix86_option_override_internal): Don't disallow -fcf-protection.
8464         * config/i386/i386.md (rdssp<mode>): Also enable for
8465         -fcf-protection.
8466         (incssp<mode>): Likewise.
8467         (nop_endbr): Likewise.
8468         * config/i386/i386.opt (mcet): Change help message to built-in
8469         functions only.
8470         (mibt): Likewise.
8471         (mshstk): Likewise.
8472         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
8473         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
8474         enable CET built-in functions.
8476 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
8478         * common/config/i386/i386-common.c
8479         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
8480         OPTION_MASK_ISA_MOVDIRI_UNSET,
8481         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
8482         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
8483         * config.gcc (movdirintrin.h): New header.
8484         * config/i386/cpuid.h (bit_MOVDIRI,
8485         bit_MOVDIR64B): New bits.
8486         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
8487         and -mmvodir64b.
8488         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
8489         (VOID, PVOID, PCVOID)): New function types.
8490         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
8491         __builtin_ia32_directstoreu_u64,
8492         __builtin_ia32_movdir64b): New builtins.
8493         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
8494         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
8495         and -mmovdiri.
8496         (ix86_valid_target_attribute_inner_p): Ditto.
8497         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
8498         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
8499         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
8500         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
8501         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
8502         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
8503         (movdiri<mode>, movdir64b_<mode>): New.
8504         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
8505         * config/i386/immintrin.h: Include movdirintrin.h.
8506         * config/i386/movdirintrin.h: New file.
8507         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
8509 2018-04-19  Richard Biener  <rguenther@suse.de>
8511         PR middle-end/85455
8512         * cfg.c (clear_bb_flags): When loop state says we have
8513         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
8515 2018-04-19  Richard Biener  <rguenther@suse.de>
8517         PR tree-optimization/84737
8518         * tree-vect-data-refs.c (vect_copy_ref_info): New function
8519         copying restrict info.
8520         (vect_setup_realignment): Use it.
8521         * tree-vectorizer.h (vect_copy_ref_info): Declare.
8522         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
8523         the first DR to all generated stores.
8524         (vectorizable_load): Likewise for loads.
8526 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
8528         PR tree-optimization/85446
8529         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
8530         the integral and pointer types to have the same precision.
8532         * doc/install.texi: Document --disable-cet being the default and
8533         --enable-cet=auto.
8535 2018-04-18  Martin Liska  <mliska@suse.cz>
8537         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
8538         style.
8540 2018-04-18  Martin Liska  <mliska@suse.cz>
8542         Revert
8543         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
8545         PR ipa/83983
8546         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8547         arguments if they are comparable.
8549 2018-04-18  Martin Liska  <mliska@suse.cz>
8551         Revert
8552         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
8554         PR lto/84805
8555         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8556         incomplete types.
8558 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
8560         PR target/85388
8561         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
8562         ENDBR after calling __morestack.
8564 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
8566         PR jit/85384
8567         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
8568         by using gcc_base_ver to generate a gcc_driver_version, and use
8569         it when generating GCC_DRIVER_NAME.
8570         * configure: Regenerate.
8572 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
8574         PR target/81084
8575         * config.gcc: Obsolete powerpc*-*-*spe*.
8577 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8579         PR debug/84637
8580         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
8581         (stabstr_D): Change type of unum from unsigned int to
8582         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
8583         type.
8585 2018-04-17  Jim Wilson  <jimw@sifive.com>
8587         PR 84856
8588         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
8589         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
8590         Set arg_pointer_offset after using pretend_args_size.
8592 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8594         PR rtl-optimization/85431
8595         * dse.c (record_store): Ignore zero width stores.
8597         PR sanitizer/85230
8598         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
8599         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
8600         __builtin_stack_restore rather than after it.
8601         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
8602         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
8603         argument instead of virtual_dynamic_stack_rtx.
8605 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8607         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
8608         New prototype.
8609         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8610         Add note to error message to explain internal mapping of overloaded
8611         built-in function name to non-overloaded built-in function name.
8612         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
8613         function.
8615 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
8617         PR target/85424
8618         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
8619         where the inputs overlap with the output.
8621 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8623         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
8624         (=v, v) alternative and explicit "memory" attribute.
8625         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
8626         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8627         attributes.
8628         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
8629         "sselog1" type instead of "sselog".
8630         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
8631         "sselog".  Remove explicit "memory" attribute.
8632         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
8633         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8634         attributes.
8635         (vec_extract_hi_v32hi): Merge all alternatives into one, use
8636         "sselog1" type instead of "sselog".  Remove explicit "memory"
8637         attribute.
8638         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
8639         use "sselog1" type instead of "sselog".  Remove explicit "memory"
8640         attribute.
8641         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
8642         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8643         attributes.
8644         (vec_extract_hi_v64qi): Merge all alternatives into one, use
8645         "sselog1" type instead of "sselog".  Remove explicit "memory"
8646         attribute.
8647         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
8648         use "sselog1" type instead of "sselog".  Remove explicit "memory"
8649         attribute.
8651         PR target/85430
8652         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
8654         PR middle-end/85414
8655         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
8656         on a SUBREG.
8658 2018-04-17  Martin Jambor  <mjambor@suse.cz>
8660         PR ipa/85421
8661         * ipa-cp.c (create_specialized_node): Call
8662         expand_all_artificial_thunks if necessary.
8664 2018-04-17  Martin Liska  <mliska@suse.cz>
8666         PR lto/85405
8667         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
8668         in message, remote space in between '_G' and '('.
8670 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
8672         PR target/85281
8673         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
8674         avx512f_vmcmp<mode>3<round_saeonly_name>,
8675         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
8676         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
8677         avx512f_rndscale<mode><round_saeonly_name>,
8678         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
8679         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
8680         Use %<iptr>2 instead of %2 for -masm=intel.
8681         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
8682         avx512f_vcvttss2usi<round_saeonly_name>,
8683         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
8684         -masm=intel.
8685         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
8686         avx512f_vcvttsd2usi<round_saeonly_name>,
8687         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
8688         Use %q1 instead of %1 for -masm=intel.
8689         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
8690         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
8691         of %3 for -masm=intel.
8692         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
8693         -masm=intel.
8694         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
8695         -masm=intel.
8696         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
8697         -masm=intel.
8698         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
8699         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
8700         %g1.
8701         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
8702         -masm=intel.
8703         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
8704         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
8705         %g1 and one with %0 and %1.
8706         (avx512er_vmrcp28<mode><round_saeonly_name>,
8707         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
8708         %1 for -masm=intel.
8709         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
8710         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
8711         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
8712         of %0 and %{%4%} for -masm=intel.
8713         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
8714         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
8715         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
8716         order of %0 and %{%5%}%{z%} for -masm=intel.
8718 2018-04-17  Jan Hubicka  <jh@suse.cz>
8720         PR lto/85405
8721         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
8723 2018-04-17  Martin Liska  <mliska@suse.cz>
8725         PR ipa/85329
8726         * multiple_target.c (create_dispatcher_calls): Set apostrophes
8727         for target_clone error message.  Make default implementation
8728         clone to be a local declaration.
8729         (separate_attrs): Add new argument and check for an empty
8730         string.
8731         (expand_target_clones): Handle it.
8732         (ipa_target_clone): Make redirection just for target_clones
8733         functions.
8735 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
8736             Tom de Vries  <tom@codesourcery.com>
8738         PR middle-end/84955
8739         * omp-expand.c (expand_oacc_for): Add dummy false branch for
8740         tiled basic blocks without omp continue statements.
8742 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
8744         PR target/83660
8745         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
8746         vec_extract expression as having side effects to make sure it gets
8747         a cleanup point.
8749 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
8751         PR target/85403
8752         * config/i386/i386.c (get_builtin_code_for_version): Check
8753         error_mark_node.
8755 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
8757         PR target/84331
8758         * gcc/config.gcc: Support "skylake".
8759         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
8760         PROCESSOR_SKYLAKE.
8761         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
8762         (processor_target_table): Add "skylake".
8763         (ix86_option_override_internal): Add "skylake".
8764         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
8765         PROCESSOR_CANNONLAKE.
8766         (get_builtin_code_for_version): Fix priority for
8767         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
8768         PROCESSOR_SKYLAKE-AVX512.
8769         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
8770         (processor_type): Add PROCESSOR_SKYLAKE.
8772 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
8773             Jason Merrill  <jason@redhat.com>
8775         PR c++/85112
8776         * convert.c (convert_to_integer_1): Use direct recursion for
8777         enumeral types and types with a precision less than the number
8778         of bits in their mode.
8780 2018-04-16  Julia Koval  <julia.koval@intel.com>
8782         PR target/84413
8783         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
8784         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
8786 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
8788         PR target/85293
8789         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
8790         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
8791         and -mno-direct-move.
8793 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
8795         PR target/83402
8796         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
8797         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
8798         Ensure negative shifts result in {0}.
8800 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
8802         PR rtl-optimization/79916
8803         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
8804         regs (if any) to define how to gnerate SD moves when LRA is in
8805         progress.
8807 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
8809         PR rtl-optimization/85393
8810         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
8811         * except.c (expand_dw2_landing_pad_for_region): Make static.
8812         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
8813         a label and unconditional jump to old_bb, rather than
8814         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
8815         basic block.
8817         PR rtl-optimization/85376
8818         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
8819         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
8820         instead of a specific value.
8822 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
8823             Bin Cheng  <bin.cheng@arm.com>
8825         PR tree-optimization/82965
8826         PR tree-optimization/83991
8827         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
8828         by_profile_only parameter.
8829         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
8830         information if the loop was predicted to iterate too many times.
8831         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
8833 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
8835         PR lto/71991
8836         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
8837         always inline.
8839 2018-04-13  Martin Liska  <mliska@suse.cz>
8840             Jakub Jelinek  <jakub@redhat.com>
8842         PR middle-end/81657
8843         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
8844         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
8845         * builtins.c (expand_builtin_memory_copy_args): Use
8846         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
8847         handle dest_addr == pc_rtx.
8849 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
8851         PR target/85291
8852         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
8853         asked to not generate direct moves.
8854         (fix_trunc<mode>si2_stfiwx): Similar.
8855         (fix_trunc<mode>si2_internal): Similar.
8857 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8859         PR debug/83157
8860         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
8861         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
8862         lookup if dest in some wider mode is known to be const0_rtx and
8863         if so, record permanent equivalence for it to be ZERO_EXTEND of
8864         the narrower mode destination.
8866 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
8868         * lto-streamer-out.c (output_function): Revert 259346.
8869         * omp-expand.c (expand_oacc_for): Likewise.
8871 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
8873         PR rtl-optimization/85354
8874         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
8875         * sel-sched.c (sel_global_init): ... here.
8877 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
8879         PR target/85238
8880         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
8881         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8882         mode for PE-COFF targets.
8883         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
8884         (i386_pe_asm_lto_end): Likewise.
8885         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
8886         (TARGET_ASM_LTO_END): Likewise.
8887         * config/i386/winnt.c (saved_debug_info_level): New static variable.
8888         (i386_pe_asm_lto_start): New function.
8889         (i386_pe_asm_lto_end): Likewise.
8891 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
8892             Richard Biener  <rguenther@suse.de>
8894         PR middle-end/84955
8895         * lto-streamer-out.c (output_function): Fix CFG loop state before
8896         streaming out.
8897         * omp-expand.c (expand_oacc_for): Handle calls to internal
8898         functions like regular functions.
8900 2018-04-12  Richard Biener  <rguenther@suse.de>
8902         PR lto/85371
8903         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
8904         for the early LTO debug to properly generate references to it
8905         during DIE emission.  Do not re-use that for the skeleton for
8906         split-dwarf.
8907         (dwarf2out_early_finish): Likewise.
8909 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8911         PR target/85328
8912         * config/i386/sse.md
8913         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
8914         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
8915         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
8916         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
8917         and output is a reg, avoid creating invalid lowpart subreg, but
8918         instead split into a 512-bit move.  Don't split if not AVX512VL,
8919         input is xmm16+ reg and output is a mem.
8920         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
8921         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
8922         xmm16+ reg and output is a mem.
8924 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8926         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
8927         also for flag_dwarf2_cfi_asm.
8929 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
8931         PR rtl-optimization/85342
8932         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
8933         a bool scalar var inside of the loop instead.  Don't try to update
8934         recog_data.operand after failed apply_change_group.
8936 2018-04-12  Tom de Vries  <tom@codesourcery.com>
8938         PR target/85296
8939         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
8940         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
8941         array with flexible array member as array without given dimension.
8942         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
8943         argument for undefined param to true.
8945 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
8947         PR target/85321
8948         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8949         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
8950         from PowerPC section.
8951         * config/rs6000/sysv4.opt (mcall-): Improve help text.
8952         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
8953         help text that is too long.
8954         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
8955         help text that is too long.
8956         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
8957         help text that is too long.
8959 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
8961         * config/alpha/alpha.md (stack_probe_internal): Rename
8962         from "probe_stack".  Update all callers.
8964 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
8966         PR rtl-optimization/84566
8967         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
8968         sched_macro_fuse_insns.
8970 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
8972         PR target/84301
8973         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
8974         (compute_block_dependences): ... from here.
8976 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
8978         PR tree-optimization/85331
8979         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
8980         from int to HOST_WIDE_INT.
8982 2018-04-11  Martin Jambor  <mjambor@suse.cz>
8984         PR ipa/84149
8985         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
8986         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
8987         not the same as the source val.
8988         (cgraph_edge_brings_value_p): New parameter.
8989         (gather_edges_for_value): Pass destination value to
8990         cgraph_edge_brings_value_p.
8991         (perhaps_add_new_callers): Likewise.
8992         (get_info_about_necessary_edges): Likewise and exclude values brought
8993         only by self-recursive edges.
8994         (create_specialized_node): Redirect only clones of self-calling edges.
8995         (+self_recursive_pass_through_p): New function.
8996         (find_more_scalar_values_for_callers_subset): Use it.
8997         (find_aggregate_values_for_callers_subset): Likewise.
8998         (known_aggs_to_agg_replacement_list): Removed.
8999         (decide_whether_version_node): Re-calculate known constants for all
9000         remaining context clones.
9002 2018-04-11  Richard Biener  <rguenther@suse.de>
9004         PR lto/85339
9005         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
9006         from early DWARF output.
9007         (dwarf2out_early_finish): Output line info unconditionally into
9008         early DWARF and add reference to it.
9010 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9012         PR target/85281
9013         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
9014         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
9015         other than V2DFmode using iptr mode attribute.
9016         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
9018 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
9020         PR rtl-optimization/84659
9021         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
9023 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
9025         PR debug/85302
9026         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
9027         SIZEP is NULL.
9028         (output_loc_list): Pass address of a dummy size variable even in the
9029         locview handling loop.
9030         (index_location_lists): Add comment on why skip_loc_list_entry can't
9031         call size_of_locs.
9033 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9035         PR target/85261
9036         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
9037         into register.
9039 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
9041         PR target/85321
9042         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
9043         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
9044         and -mstring-compare-inline-limit.
9046 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9048         PR target/85287
9049         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
9050         for stack clash protection in a register whenever we need it to be in
9051         a register.
9053 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9055         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
9056         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
9058 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
9060         PR target/85321
9061         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
9062         the help text.
9063         (mlong-double-): Ditto.
9064         * config/rs6000/sysv4.opt (msdata=): Ditto.
9065         (mtls-size=): Ditto.
9067 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9069         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
9070         erroneous entries for
9071         "vector int vec_ldl (int, long int *)", and
9072         "vector unsigned int vec_ldl (int, unsigned long int *)".
9073         Add comments and entries for
9074         "vector bool char vec_ldl (int, bool char *)",
9075         "vector bool short vec_ldl (int, bool short *)",
9076         "vector bool int vec_ldl (int, bool int *)",
9077         "vector bool long long vec_ldl (int, bool long long *)",
9078         "vector pixel vec_ldl (int, pixel *)",
9079         "vector long long vec_ldl (int, long long *)",
9080         "vector unsigned long long vec_ldl (int, unsigned long long *)".
9081         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
9082         type tree bool_long_long_type_node and correct definition of
9083         bool_V2DI_type_node to make reference to this new type tree.
9084         (rs6000_mangle_type): Replace erroneous reference to
9085         bool_long_type_node with bool_long_long_type_node.
9086         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
9087         comments to emphasize sign distinctions for char and int types and
9088         replace RS6000_BTI_bool_long constant with
9089         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
9090         use of RS6000_BTI_pixel.
9091         (bool_long_type_node): Remove this macro definition.
9092         (bool_long_long_type_node): New macro definition
9094 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
9096         PR rtl-optimization/85300
9097         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
9098         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
9099         simplify_unary_operation fails.
9101 2018-04-10  Martin Liska  <mliska@suse.cz>
9103         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
9104         cgraph_edge and ipa_ref.
9106 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
9108         PR target/85177
9109         PR target/85255
9110         * config/i386/sse.md
9111         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
9112         computation of the VEC_MERGE selector from mask.
9113         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
9114         Fix decoding of the VEC_MERGE selector into mask.
9116 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
9118         PR tree-optimization/85286
9119         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
9121 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
9123         * final.c (final_1): Set insn_last_address as well as
9124         insn_current_address.
9126 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9128         PR target/85173
9129         * explow.c (emit_stack_probe): Call validize_mem on memory location
9130         before passing it to gen_probe_stack.  Create address operand and
9131         legitimize it for the probe_stack_address case.
9133 2018-04-09  Jan Hubicka  <jh@suse.cz>
9135         PR lto/85078
9136         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
9137         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
9138         * tree.c (free_lang_data_in_type): Fix handling of binfos;
9139         walk basetypes.
9140         (free_lang_data): Rebuild type inheritance graph.
9142 2018-04-09  Martin Sebor  <msebor@redhat.com>
9144         * invoke.texi (-finline-small-functions): Mention other optimization
9145         options.
9146         (-findirect-inlining, -fpartial-inlining): Same.
9147         (-finline-functions-called-once): Same.
9148         (-freorder-blocks-and-partition): Same.
9150 2018-04-09  Jan Hubicka  <jh@suse.cz>
9152         PR rtl/84058
9153         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
9154         jumps; choose last target that matches the criteria (i.e.
9155         no partition changes for non-crossing jumps).
9156         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
9157         support for redirecting crossing jumps to non-crossing.
9159 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
9161         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
9162         also for naked functions.
9164 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
9166         * config/arc/arc.md (add_shift): New pattern.
9167         (add_shift2): Likewise.
9168         (sub_shift): Likewise.
9169         (sub_shift_cmp0_noout): Likewise.
9170         (compare_si_ashiftsi): Likewise.
9171         (xbfu_cmp0_noout): New combine pattern.
9172         (xbfu_cmp0"): Likewise.
9173         (movsi_set_cc_insn): Place the predicable variant first.
9174         (commutative_binary_cmp0_noout): Remove clobber.
9175         (commutative_binary_cmp0): New pattern.
9176         (noncommutative_binary_cmp0): Likewise.
9177         (noncommutative_binary_cmp0_noout): Likewise.
9178         (noncommutative_binary_comparison_result_used): Removed.
9179         (rsub_cmp0): New pattern.
9180         (rsub_cmp0_noout): Likewise.
9181         (extzvsi): Changed, keep only meaningful variants.
9182         (SQH, SEZ): New iterators.
9183         (SQH_postfix): New mode attribute.
9184         (SEZ_prefix): New code attribute.
9185         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
9186         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
9187         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
9188         of numerical value.
9189         (noncommutative_operator): Check the availability of barrel
9190         shifter option.
9192 2018-04-09  Richard Biener  <rguenther@suse.de>
9194         PR tree-optimization/85284
9195         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
9196         Only use the niter constraining form of simple_iv when the exit
9197         is always executed.
9199 2018-04-09  Tom de Vries  <tom@codesourcery.com>
9201         PR target/84041
9202         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9203         (define_expand "*memory_barrier"): New define_expand.
9204         (define_insn "memory_barrier"): New insn.
9206 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9208         PR rtl-optimization/80463
9209         PR rtl-optimization/83972
9210         PR rtl-optimization/83480
9212         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
9213         correct producer for the insn.
9214         (tidy_control_flow): Fixup seqnos in case of debug insns.
9216 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9218         PR rtl-optimization/83913
9220         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
9221         different sched-times when merging exprs.
9223 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9225         PR rtl-optimization/83962
9227         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
9228         tidy_fallthru_edge and tidy_control_flow.
9230 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
9232         PR rtl-optimization/83530
9234         * sel-sched.c (force_next_insn): New global variable.
9235         (remove_insn_for_debug): When force_next_insn is true, also leave only
9236         next insn in the ready list.
9237         (sel_sched_region): When the region wasn't scheduled, make another pass
9238         over it with force_next_insn set to 1.
9240 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9242         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9243         into tm_file.
9244         * config/nds32/constants.md (unspec_volatile_element): Add enum values
9245         for interrupt control.
9246         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9247         functions for interrupt control.
9248         * config/nds32/nds32-intrinsic.md: Likewise.
9249         * config/nds32/nds32_intrinsic.h: Likewise.
9250         * config/nds32/nds32.h (nds32_builtins): Likewise.
9252 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9254         * config/nds32/nds32.c (nds32_init_machine_status,
9255         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9256         strict_aligned_p field.
9257         (nds32_expand_to_rtl_hook): New function.
9258         (TARGET_EXPAND_TO_RTL_HOOK): Define.
9259         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9261 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9262             Chung-Ju Wu  <jasonwucj@gmail.com>
9264         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9265         * config/nds32/nds32-n7.md: New file.
9266         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9267         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9268         pipeline.
9269         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9270         * config/nds32/nds32.md (pipeline_model): Add n7.
9271         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9272         * config/nds32/pipelines.md: Include n7 settings.
9274 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9275             Chung-Ju Wu  <jasonwucj@gmail.com>
9277         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9278         * config/nds32/nds32-e8.md: New file.
9279         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9280         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9281         pipeline.
9282         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9283         * config/nds32/nds32.md (pipeline_model): Add e8.
9284         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9285         * config/nds32/pipelines.md: Include e8 settings.
9287 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9288             Chung-Ju Wu  <jasonwucj@gmail.com>
9290         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9291         * config/nds32/nds32-n8.md: New file.
9292         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9293         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9294         pipeline.
9295         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9296         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9297         * config/nds32/nds32.md (pipeline_model): Add n8.
9298         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9299         * config/nds32/pipelines.md: Include n8 settings.
9301 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
9302             Chung-Ju Wu  <jasonwucj@gmail.com>
9304         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9305         * config/nds32/nds32-n9-2r1w.md: New file.
9306         * config/nds32/nds32-n9-3r2w.md: New file.
9307         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9308         nds32_register_ports): New or modify for cpu n9.
9309         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9310         pipeline.
9311         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9312         * config/nds32/nds32-utils.c: New file.
9313         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9314         TARGET_MUL_SLOW): Define.
9315         * config/nds32/nds32.md (pipeline_model): New attribute.
9316         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9317         New options that support cpu n9.
9318         * config/nds32/pipelines.md: Include n9 settings.
9319         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9321 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
9323         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9324         information if necessary.
9325         (output_cond_branch_compare_zero): Likewise.
9326         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9327         (nds32_target_alignment): Refine for alignment.
9328         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9329         (FUNCTION_BOUNDARY): Modify.
9330         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9331         align case.
9332         * config/nds32/nds32.opt (malways-align, malign-functions): New.
9334 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
9336         * config/nds32/constants.md (unspec_volatile_element): Add values for
9337         TLB operation and data prefetch.
9338         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9339         functions for TLB operation and data prefetch.
9340         * config/nds32/nds32-intrinsic.md: Likewise.
9341         * config/nds32/nds32_intrinsic.h: Likewise.
9342         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9343         (nds32_print_operand): Likewise.
9344         * config/nds32/nds32.h (nds32_builtins): Likewise.
9346 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
9347         Andrew Pinski <pinsika@gcc.gnu.org>
9349         PR middle-end/82976
9350         * match.pd: Use constant_boolean_node of correct type instead of
9351         boolean_true_node or boolean_false_node for simplifying
9352         pointer comparisons to zero.
9354 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9356         PR tree-optimization/80021
9357         * tree.c (verify_type_variant): Make error call in verify_variant_match
9358         translatable and remove final full stop.
9360 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9362         * config/nds32/constants.md (unspec_volatile_element): Add
9363         UNSPEC_VOLATILE_EH_RETURN.
9364         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9365         nds32_output_stack_pop): Support dwarf exception handling process.
9366         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9367         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9368         exception handling process.
9369         (nds32_compute_stack_frame): Likewise.
9370         (nds32_return_addr_rtx): Likewise.
9371         (nds32_initial_elimination_offset): Likewise.
9372         (nds32_expand_prologue): Likewise.
9373         (nds32_expand_epilogue): Likewise.
9374         (nds32_dynamic_chain_address): New function.
9375         * config/nds32/nds32.h (machine_function): Add fields for dwarf
9376         exception handling.
9377         (DYNAMIC_CHAIN_ADDRESS): Define.
9378         (EH_RETURN_DATA_REGNO): Define.
9379         (EH_RETURN_STACKADJ_RTX): Define.
9380         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9381         patterns for dwarf exception handling.
9383 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9385         * config/nds32/nds32.h: Clean up obsolete macros.
9387 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9389         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9390         Add enum values for particular instructions.
9391         * config/nds32/nds32-intrinsic.c: Implementation of expanding
9392         particular intrinsic functions.
9393         * config/nds32/nds32-intrinsic.md: Likewise.
9394         * config/nds32/nds32_intrinsic.h: Likewise.
9395         * config/nds32/nds32.h (nds32_builtins): Likewise.
9396         * config/nds32/nds32.md (type): Add pbsad and pbsada.
9397         (btst, ave): New patterns for particular instructions.
9399 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9401         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9402         Add enum values for atomic load/store and memory sync.
9403         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9404         and memory sync.
9405         * config/nds32/nds32-intrinsic.md: Likewise.
9406         * config/nds32/nds32_intrinsic.h: Likewise.
9407         * config/nds32/nds32.h (nds32_builtins): Likewise.
9409 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
9411         PR tree-optimization/85257
9412         * fold-const.c (native_encode_vector): If not all elts could fit
9413         and off is -1, return 0 rather than offset.
9414         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9415         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9416         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
9417         adjust buffer in native_interpret_expr call.
9419 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9421         * config/nds32/constants.md (unspec_volatile_element): Add cache
9422         control enum values.
9423         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9424         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9425         * config/nds32/nds32.c (nds32_cctl_names): New.
9426         (nds32_print_operand): Handle cache control register names.
9427         * config/nds32/nds32.h (nds32_builtins): New enum values.
9428         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9429         macros.
9430         * config/nds32/nds32.md (type): Add mmu.
9431         * config/nds32/pipelines.md (simple_insn): Add mmu.
9433 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9435         * config/nds32/nds32.md (type): Remove call.
9436         * config/nds32/pipelines.md (simple_insn): Likewise.
9438 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9440         * config/nds32/constants.md (unspec_volatile_element): Add
9441         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9442         UNSPEC_VOLATILE_FMFCFG.
9443         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9444         description for fmfcfg and fmfcsr.
9445         (bdesc_1arg): Add fmtcsr.
9446         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9447         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9448         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9449         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9450         unspec_fmfcfg): New patterns.
9451         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
9452         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
9453         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
9454         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
9455         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
9456         __nds32__fmfcfg): Define.
9458 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
9460         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
9461         intrinsic register names.
9462         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
9463         intrinsic register enum values and macros.
9465 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
9467         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
9468         for load/store addressing form.
9469         (nds32_print_operand_address): Likewise.
9471 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
9473         PR target/85196
9474         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
9475         based on LABEL_REF.  Remove useless assertion.
9476         (pic_address_needs_scratch): Fix formatting.
9477         (sparc_legitimize_pic_address): Minor tweaks.
9478         (sparc_delegitimize_address): Adjust assertion accordingly.
9479         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
9480         into symbolic_operand.
9481         (movsi_high_pic_label_ref): Likewise.
9482         (movsi_lo_sum_pic_label_ref): Likewise.
9483         (movdi_pic_label_ref): Likewise.
9484         (movdi_high_pic_label_ref): Likewise.
9485         (movdi_lo_sum_pic_label_ref): Likewise.
9487 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
9489         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
9490         custom LIB_SPEC setup.
9492 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
9493             Kito Cheng  <kito.cheng@gmail.com>
9495         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
9496         * config/riscv/freebsd.h: New.
9498 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9500         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
9501         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
9502         file.
9504 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9505             Kito Cheng  <kito.cheng@gmail.com>
9507         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
9508         nds32_output_call, nds32_symbol_binds_local_p): New functions.
9509         * config/nds32/nds32-protos.h (nds32_output_call,
9510         nds32_output_return): Declare.
9511         * config/nds32/nds32.md: Refine all the call and return patterns.
9513 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
9515         PR debug/85252
9516         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
9517         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
9519         PR rtl-optimization/84872
9520         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
9521         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
9522         EDGE_CROSSING edge.
9524 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
9526         * expr.c (copy_blkmode_to_reg): Revert 254862.
9527         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
9529 2018-04-06  Richard Biener  <rguenther@suse.de>
9531         PR middle-end/85244
9532         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
9533         after seeing a component reference with an adjacent field.  Treat
9534         refs to arrays at struct end of external decls similar to
9535         refs to unconstrained commons.
9537 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
9539         PR sanitizer/85213
9540         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
9541         look through SAVE_EXPRs with non-side-effects argument.  Adjust
9542         recursive calls.
9543         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
9544         save_p here.
9546 2018-04-06  Richard Biener  <rguenther@suse.de>
9548         PR middle-end/85180
9549         * alias.c (find_base_term): New wrapper around find_base_term
9550         unwinding CSELIB_VAL_PTR changes.
9551         (find_base_term): Do not restore CSELIB_VAL_PTR during the
9552         recursion.
9554 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9556         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
9557         instructions.
9558         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
9559         constant definitions.
9560         ("nop"): lr 0,0 -> nopr r0
9561         ("nop_lr0", "nop_lr1"): New insn definitions.
9563 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
9565         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
9566         NDS32_V3PUSH_AVAILABLE_P macro.
9568 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
9569             Chung-Ju Wu  <jasonwucj@gmail.com>
9571         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
9572         (nds32*-*-*): Add float and fpu_config into supported_defaults.
9573         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
9574         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
9575         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
9576         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
9577         * config/nds32/constraints.md: New constraints and checking for hard
9578         float configuration.
9579         * config/nds32/iterators.md: New mode iterator and attribute for hard
9580         float configuration.
9581         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
9582         patterns.
9583         * config/nds32/nds32-fpu.md: New file.
9584         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
9585         deal with hard float code generation.
9586         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
9587         ARCH_V3S.
9588         (abi_type, float_reg_number): New enum type.
9589         * config/nds32/nds32-predicates.c: New predicates for hard float.
9590         * config/nds32/nds32-protos.h: Declare functions for hard float.
9591         * config/nds32/nds32.c: Implementation for hard float configuration.
9592         * config/nds32/nds32.h: Definitions for hard float configuration.
9593         * config/nds32/nds32.md: Include hard float machine description and
9594         modify patterns for hard float configuration.
9595         * config/nds32/nds32.opt: New options for hard float configuration.
9596         * config/nds32/predicates.md: New predicates for hard float
9597         configuration.
9599 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
9601         * common/config/nds32/nds32-common.c
9602         (nds32_option_optimization_table): Enable -mreleax-hint by default.
9604 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
9606         PR middle-end/85195
9607         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
9608         CONSTRUCTOR_ELT (ctor, ...)->value.
9610 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
9612         PR target/85193
9613         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
9615 2018-04-05  Tom de Vries  <tom@codesourcery.com>
9617         PR target/85204
9618         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
9619         cond jump.
9621 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
9622             Kito Cheng  <kito.cheng@gmail.com>
9624         * config/nds32/constraints.md (U33): Fine-tune checking condition.
9625         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
9626         * config/nds32/nds32.h (nds32_16bit_address_type): Add
9627         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
9629 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
9630             Kito Cheng  <kito.cheng@gmail.com>
9632         * config/nds32/constraints.md (Ufe): New memory constraint.
9633         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
9634         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
9635         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
9636         operands.
9637         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
9638         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
9640 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9642         * config/nds32/nds32.md: Use optimize_size in the condition for
9643         alu-shift instructions.
9645 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9647         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
9649 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9651         * config/nds32/nds32.md (negsi2): Refine pattern.
9653 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
9654             Chung-Ju Wu  <jasonwucj@gmail.com>
9656         * config/nds32/iterators.md (shift_rotate): New code iterator.
9657         (shift): New code attribute.
9658         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
9659         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
9660         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
9661         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
9662         bit-wise operations.
9663         (andsi3, *andsi3): Ditto.
9664         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
9665         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
9666         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
9667         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
9668         nds32_ior_operand, nds32_xor_operand): New predicates.
9670 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9672         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
9673         (addsi3, subsi3): ... this.
9675 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9677         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
9679 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9681         * config/nds32/nds32.md: Adjust indention.
9683 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
9685         * config/nds32/nds32.md (feature): New attribute.
9687 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
9689         * config/nds32/nds32.md (subtype): New attribute.
9691 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9693         PR target/85203
9694         * config/arm/arm-builtins.c (arm_expand_builtin): Change
9695         expansion to perform a bitwise AND of the argument followed by a
9696         boolean negation of the result.
9698 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
9700         PR rtl-optimization/84878
9701         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
9702         the basic block.  Assert the use reference is not artificial and that
9703         it has an associated insn.
9705 2018-04-04  Michael Matz  <matz@suse.de>
9707         * builtins.c (compute_objsize): Pass correct operand
9708         to array_at_struct_end_p.
9710 2018-04-04  Richard Biener  <rguenther@suse.de>
9712         PR lto/85176
9713         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
9714         from contexts for DINFO_LEVEL_TERSE and below.
9716 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9718         * config/nds32/nds32-doubleword.md (move_<mode>): Require
9719         resiter_operand condition.
9720         * config/nds32/nds32.md (*move<mode>): Ditto.
9722 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9723             Monk Chiang  <sh.chiang04@gmail.com>
9725         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
9727 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9729         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
9731 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9732             Kito Cheng  <kito.cheng@gmail.com>
9734         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
9735         nds32_cond_code_str, output_cond_branch,
9736         output_cond_branch_compare_zero, nds32_expand_cbranch,
9737         nds32_expand_cstore, nds32_expand_movcc,
9738         nds32_output_cbranchsi4_equality_zero,
9739         nds32_output_cbranchsi4_equality_reg,
9740         nds32_output_cbranchsi4_equality_reg_or_const_int,
9741         nds32_output_cbranchsi4_greater_less_zero: New functions.
9742         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
9743         nds32_expand_cstore, nds32_expand_movcc,
9744         nds32_output_cbranchsi4_equality_zero,
9745         nds32_output_cbranchsi4_equality_reg,
9746         nds32_output_cbranchsi4_equality_reg_or_const_int,
9747         nds32_output_cbranchsi4_greater_less_zero): Declare.
9748         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
9749         nds32_rimm11s_operand): New predicates.
9750         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
9751         * config/nds32/nds32.md: Rewrite all the branch and conditional move
9752         patterns.
9754 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
9756         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
9757         * config/nds32/nds32.md: Ditto.
9758         * config/nds32/pipelines.md: Ditto.
9760 2018-04-04  Richard Biener  <rguenther@suse.de>
9762         PR tree-optimization/85168
9763         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
9764         propagating abnormals.
9766 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9768         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
9770 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
9771             Kito Cheng  <kito.cheng@gmail.com>
9773         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
9774         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
9775         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
9776         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
9777         * config/nds32/nds32.md (sibcall_internal): New.
9778         (sibcall_register): Remove.
9779         (sibcall_immediate): Remove.
9780         (sibcall_value_internal): New.
9781         (sibcall_value_register): Remove.
9782         (sibcall_value_immediate): Remove.
9783         * config/nds32/predicates.md (nds32_general_register_operand): New.
9784         (nds32_call_address_operand): New.
9786 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
9788         PR rtl-optimization/85167
9789         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
9790         bb_defs if *split_p, instead preinitialize it to NULL.
9792         PR tree-optimization/85156
9793         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
9794         evaluating the argument multiple times.
9796 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
9798         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
9799         than vector.
9800         (_mm_cvtpd_ps): Likewise.
9801         (_mm_cvttpd_epi32): Likewise.
9802         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
9803         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
9804         vector, pixel, and bool following altivec.h include.
9806 2018-04-03  Martin Sebor  <msebor@redhat.com>
9808         * doc/extend.texi (Common Function Attributes): Clarify.
9809         (const attribute): Likewise.
9810         (pure attribute): Likewise.
9812 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
9814         PR target/85169
9815         * config/i386/i386.c (ix86_expand_vector_set): Use
9816         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
9818 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
9820         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
9821         instructions when changing rounding bits to preserve precision bits
9822         in the x87 control word.
9824 2018-04-03  Martin Liska  <mliska@suse.cz>
9826         PR tree-optimization/82491
9827         * rtl.h (strip_offset_and_add): Replace += suboffset with
9828         poly_uint64 () + suboffset.
9830 2018-03-29  Martin Liska  <mliska@suse.cz>
9831             Martin Jambor  <mjambor@suse.cz>
9833         PR ipa/84947
9834         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
9835         param_type is not an integral or pointer type.
9837 2018-04-03  Richard Biener  <rguenther@suse.de>
9839         * sese.h (recompute_all_dominators): Remove.
9841 2018-04-02  Martin Sebor  <msebor@redhat.com>
9843         * doc/invoke.texi (-Wrestrict): Fix typos.
9845 2018-04-02  Jim Wilson  <jimw@sifive.com>
9847         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
9848         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
9849         (<optab>di3, <optab>si3_extend): Likewise.
9850         (<optab>si3_mask, <optab>si3_mask_1): New.
9851         (<optab>di3_mask, <optab>di3_mask_1): New.
9852         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
9853         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
9854         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
9856 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
9858         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
9859         example.
9861 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
9863         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
9864         (nds32_canonicalize_comparison): New function.
9866 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9867             Kito Cheng  <kito.cheng@gmail.com>
9868             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
9870         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
9871         * config/nds32/constants.md (unspec_volatile_element): Add
9872         UNSPEC_VOLATILE_RELAX_GROUP.
9873         * config/nds32/nds32-relax-opt.c: New file.
9874         * config/nds32/nds32-predicates.c
9875         (nds32_symbol_load_store_p): New function.
9876         * config/nds32/nds32-protos.h
9877         (nds32_symbol_load_store_p): Declare function.
9878         (make_pass_nds32_relax_opt): Declare new rtl pass function.
9879         * config/nds32/nds32.c
9880         (nds32_register_pass): New function to register pass.
9881         (nds32_register_passes): New function to register passes.
9882         * config/nds32/nds32.md (relax_group): New pattern.
9883         * config/nds32/nds32.opt (mrelax-hint): New option.
9884         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
9886 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
9888         * config/nds32/t-nds32: Modify files dependency.
9890 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9892         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
9893         (PROFILE_HOOK): Define its implementation.
9895 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
9897         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
9898         type and 32-bit size.
9900 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
9902         PR middle-end/85090
9903         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
9904         (V_128_256): New mode iterator.
9905         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
9906         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
9907         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
9908         of V.
9909         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
9910         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
9912 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
9914         PR target/83315
9915         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
9916         NaN inputs correctly.
9918 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
9920         PR target/80546
9921         * config/rs6000/vsx.md (??r): New mode attribute.
9922         (*vsx_mov<mode>_64bit): Use it.
9923         (*vsx_mov<mode>_32bit): Likewise.
9925 2018-03-30  Martin Sebor  <msebor@redhat.com>
9927         PR tree-optimization/84818
9928         * builtins.c (check_access): Use warning_n.
9930 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9932         PR target/83822
9933         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
9934         condition.
9935         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
9936         condition.
9938 2018-03-30  Julia Koval  <julia.koval@intel.com>
9940         PR target/84413
9941         * x86-tune.def (movx, partial_reg_dependency): Enable for
9942         m_SKYLAKE_AVX512.
9944 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
9946         PR inline-asm/84985
9947         * lra-constraints.c (process_alt_operands): Move setting
9948         this_alternative_matches below.
9950 2018-03-29  Martin Liska  <mliska@suse.cz>
9952         PR lto/84995.
9953         * doc/invoke.texi: Document how LTO works with debug info.
9954         Describe auto-load support of binutils.  Mention 'x86-64'
9955         as valid option value of -march option.
9957 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
9959         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
9961         PR c/85094
9962         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
9963         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
9964         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
9965         checking.
9967 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
9969         PR target/84912
9970         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
9971         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
9972         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
9973         for RS6000_BTM_POWERPC64.
9974         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
9975         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
9976         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
9977         definition.
9978         (DIVDE): Use it.
9979         (DIVDEU): Likewise.
9981 2018-03-28 Carl Love  <cel@us.ibm.com>
9983         Revert
9984         2017-09-27  Carl Love  <cel@us.ibm.com>
9986         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
9987         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
9988         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
9989         fctiw instruction.
9991 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9993         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
9994         instead of __vector bool.
9995         (_mm_max_pu8): Likewise.
9996         (_mm_min_pi16): Likewise.
9998 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
10000         PR target/84912
10001         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
10002         (DIVWEUO): Likewise.
10003         (DIVDEO): Likewise.
10004         (DIVDEUO): Likewise.
10005         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
10006         DIVWEUO and DIVDEUO.
10007         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
10008         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
10009         (div_extend): Likewise.
10010         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
10011         builtin function.
10012         (__builtin_divweuo): Likewise.
10013         (__builtin_divdeo): Likewise.
10014         (__builtin_divdeuo): Likewise.
10016 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
10018         PR target/85095
10019         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
10020         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
10022         PR tree-optimization/82004
10023         * gimple-match-head.c (optimize_pow_to_exp): New function.
10024         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
10025         Don't fold to exp if optimize_pow_to_exp is false.
10027 2018-03-28  Martin Liska  <mliska@suse.cz>
10029         PR other/84819
10030         * calls.c (initialize_argument_information): Fix trailing space.
10031         * common.opt: Fix typo and provide better explanation for
10032         -fsanitize-coverage option.
10033         * config/i386/i386.opt: Fix typo.
10035 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
10036             Martin Liska  <mliska@suse.cz>
10038         PR sanitizer/85081
10039         * gimplify.c (asan_poison_variable): Don't do the check for
10040         gimplify_omp_ctxp here.
10041         (gimplify_decl_expr): Do it here.
10042         (gimplify_target_expr): Likewise.
10044 2018-03-28  Martin Liska  <mliska@suse.cz>
10046         PR target/84988
10047         * config/i386/i386.c (ix86_function_arg_advance): Do not call
10048         chkp_type_bounds_count if MPX is not enabled.
10050 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
10052         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
10054 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
10056         PR target/84914
10057         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
10058         function to create the function decl for complex long double
10059         multiply and divide for -mabi=ieeelongdouble.
10060         (init_float128_ieee): Call it.
10062 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
10064         PR target/85044
10065         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
10066         -fcf-protection=branch -mibt.
10067         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
10069 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10071         PR target/81863
10072         * config/arm/arm.c (arm_valid_symbolic_address): Handle
10073         arm_word_relocations.
10075 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
10077         PR target/85056
10078         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
10079         extern array declarations.
10081 2018-03-27  Richard Biener  <rguenther@suse.de>
10083         PR middle-end/84067
10084         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
10085         explicit single_use checks.
10087 2018-03-27  Richard Biener  <rguenther@suse.de>
10089         PR tree-optimization/85082
10090         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
10091         Valueize the VUSE.
10093 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10095         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
10096         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
10097         Turn on fasynchronous-unwind-tables and funwind-tables.
10099 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
10101         PR target/85073
10102         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
10103         (*bmi_blsr_<mode>_ccz): Ditto.
10105 2018-03-26  Tom de Vries  <tom@codesourcery.com>
10107         PR tree-optimization/85063
10108         * omp-general.c (offloading_function_p): New function.  Factor out
10109         of ...
10110         * omp-offload.c (pass_omp_target_link::gate): ... here.
10111         * omp-general.h (offloading_function_p): Declare.
10112         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
10113         with attribute omp declare target for offloading functions.
10115 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
10117         PR tree-optimization/84005
10118         * tree-data-ref.h (get_base_for_alignment): Declare.
10119         * tree-data-ref.c (get_base_for_alignment_1): New function.
10120         (get_base_for_alignment): Likewise.
10121         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
10122         get_base_for_alignment to find a suitable base object, instead
10123         of always using drb->base_address.
10125 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
10127         PR inline-asm/85022
10128         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
10129         known size by default.
10131 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
10133         PR inline-asm/85030
10134         * lra-constraints.c (process_alt_operands): Don't match BLKmode
10135         and non BLKmode operands.
10137 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10139         PR target/85026
10140         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
10141         Clean up attributes.
10143 2018-03-23  Richard Biener  <rguenther@suse.de>
10145         PR debug/85020
10146         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
10147         we are going to emit early debug for LTO.
10149 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
10151         PR inline-asm/85034
10152         * function.c (match_asm_constraints_1): Don't optimize if input
10153         doesn't satisfy general_operand predicate for output's mode.
10155         PR inline-asm/85022
10156         * alias.c (write_dependence_p): Don't require for x_canonicalized
10157         non-VOIDmode if x has VOIDmode.
10159         PR sanitizer/85029
10160         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
10161         just don't try to optimize it rather than assert it never happens.
10163 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10165         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
10166         macro expansions for definition of ST_INTERNAL_<mode> and
10167         LD_INTERNAL_<mode> builtins.
10168         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
10169         Remove prototype.
10170         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
10171         function.
10172         (altivec_expand_st_builtin): Likewise.
10173         (altivec_expand_builtin): Remove calls to deleted functions.
10174         (rs6000_address_for_altivec): Delete this function.
10175         * config/rs6000/vector.md: Remove expands for
10176         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
10178 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
10180         PR target/84826
10181         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
10182         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
10183         re-computing once computed.
10184         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
10185         (arm_init_machine_status): Initialize
10186         machine->static_chain_stack_bytes.
10188 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10190         PR target/84760
10191         * doc/extend.texi: Add four new prototypes for vec_ld.
10192         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
10193         definitions for more logical presentation.
10194         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
10195         entries for V1TI variants of __builtin_altivec_ld builtin.
10196         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
10197         handling of V1TI variant of LVX icode pattern.
10198         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
10199         (rs6000_gimple_fold_builtin): Likewise.
10200         (altivec_init_builtins): Add code to define
10201         __builtin_altivec_lvx_v1ti function.
10203 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
10205         PR inline-asm/84941
10206         * function.c (match_asm_constraints_1): Don't do the optimization
10207         if input isn't a REG, SUBREG, MEM or constant.
10209 2018-03-22  Tom de Vries  <tom@codesourcery.com>
10211         PR tree-optimization/84956
10212         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
10213         bb_has_abnormal_pred.
10215 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
10217         PR sanitizer/85018
10218         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
10219         DECL_INITIAL (decl) to decl at the end.
10220         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
10221         adjust the comment.
10223 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
10225         * doc/extend.texi (__builtin_tgmath): Document when complex
10226         integer types are treated as _Complex _Float64.
10228 2018-03-21  Tom de Vries  <tom@codesourcery.com>
10230         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
10232 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10234         PR tree-optimization/84960
10235         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
10236         if it is ENTRY block, move them into single succ of ENTRY in that case.
10238 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
10240         PR tree-optimization/84811
10241         * poly-int.h (poly_span_traits): Remove the T3 parameter and
10242         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10243         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10244         (known_subrange_p): Update accordingly.  Cast each value involved
10245         in the size comparison, rather than casting the result of the
10246         subtraction.
10248 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10250         PR tree-optimization/84982
10251         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10252         by flipping the least significant bit rather than all bits from
10253         bitpos to bitpos + bitsize - 1.
10255 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10257         * doc/extend.texi (Deprecated Features): Remove mention of
10258         long-deleted deprecations.
10260 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10262         PR jit/84288
10263         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10264         * configure: Regenerate.
10266 2018-03-21  Tom de Vries  <tom@codesourcery.com>
10268         PR tree-optimization/83126
10269         * tree-parloops.c (num_phis): New function.
10270         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10272 2018-03-21  Nathan Sidwell  <nathan@acm.org>
10274         * doc/extend.texi (Deprecated Features): Update deprecated flags,
10275         mention anon-struct/union members and trailing attributes.
10277 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
10279         PR tree-optimization/84969
10280         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10281         builtin memset partitions if they set different rhs values.
10283 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
10285         PR rtl-optimization/84989
10286         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10287         VEC_DUPLICATE with scalar result mode.
10289 2018-03-21  Martin Liska  <mliska@suse.cz>
10291         PR ipa/84963
10292         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10293         not intended return statement.
10295 2018-03-21  Martin Liska  <mliska@suse.cz>
10297         PR target/84988
10298         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10299         (chkp_find_bound_slots_1): Limit number of iterations.
10301 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
10303         PR target/84838
10304         * Minor grammar fixes for x86 options.
10306 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10308         PR debug/84875
10309         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10310         holding REG_CFA_RESTORE notes, instead turn them into a USE.
10312 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
10314         PR target/83789
10315         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10316         (altivec_lvx_<mode>_1op): Likewise.
10317         (altivec_stvx_<mode>_2op): Likewise.
10318         (altivec_stvx_<mode>_1op): Likewise.
10319         (altivec_lvx_<VM2:mode>): New define_expand.
10320         (altivec_stvx_<VM2:mode>): Likewise.
10321         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10322         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10323         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10324         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10325         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10326         (rs6000_gen_lvx): Likewise.
10327         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10328         (altivec_expand_stv_builtin): Likewise.
10329         (altivec_expand_builtin): Likewise.
10330         * config/rs6000/vector.md: Likewise.
10332 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10334         PR target/82518
10335         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10336         BYTES_BIG_ENDIAN.
10338 2018-03-20  Richard Biener  <rguenther@suse.de>
10340         PR target/84986
10341         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10342         sign-conversions as zero, fall back to standard scalar_stmt
10343         cost for the rest.
10345 2018-03-20  Martin Liska  <mliska@suse.cz>
10347         PR ipa/84825
10348         * predict.c (rebuild_frequencies): Handle case when we have
10349         PROFILE_ABSENT, but flag_guess_branch_prob is false.
10351 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10353         PR target/84990
10354         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10355         flag_section_anchors.
10356         * varasm.c (use_blocks_for_decl_p): Remove hack for
10357         dw2_force_const_mem.
10359         PR target/84845
10360         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10361         to ...
10362         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
10363         be created, use lowpart_subreg of operands[0] rather than operands[0]
10364         itself.
10365         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10366         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10367         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10368         and n constraint instead of aarch64_shift_imm_di and Usd.
10369         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10370         (*aarch64_<optab>_reg_minus<mode>3): ... this.
10372 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
10374         PR target/82989
10375         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10376         to favor GPR over NEON registers.
10377         (<shift>di3_neon): Likewise.
10379 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10381         PR target/84952
10382         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10383         (nvptx_process_pars): Emit bar.sync asap and alap.
10385 2018-03-20  Tom de Vries  <tom@codesourcery.com>
10387         PR target/84954
10388         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10389         seen_label if seen_label is already set.
10391 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
10393         PR target/84945
10394         * config/i386/i386.c (fold_builtin_cpu): For features above 31
10395         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10396         Use 1U instead of 1.  Formatting fixes.
10398         PR c/84953
10399         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10400         instead of TREE_TYPE (s1) for the return value.
10402 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
10404         PR tree-optimization/84946
10405         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10406         bitsize + bitsize in poly_uint64 rather than poly_int64.
10408         PR sanitizer/78651
10409         * dwarf2asm.c: Include fold-const.c.
10410         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10411         of decl rather than decl itself.
10413         PR rtl-optimization/84643
10414         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10416 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
10418         PR sanitizer/78651
10419         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10420         calling assemble_variable.
10422 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
10424         PR target/81647
10425         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10426         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10428 2018-03-19  Jim Wilson  <jimw@sifive.com>
10430         PR bootstrap/84856
10431         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10432         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10433         (riscv_first_stack_step): Likewise.
10434         (riscv_option_override): Use STACK_BOUNDARY instead of
10435         MIN_STACK_BOUNDARY.
10436         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10437         MIN_STACK_BOUNDARY.
10438         (BIGGEST_ALIGNMENT): Set to 128.
10439         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10440         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10441         STACK_BOUNDARY.
10443 2018-03-19  Richard Biener  <rguenther@suse.de>
10445         PR tree-optimization/84933
10446         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10447         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10449 2018-03-19  Richard Biener  <rguenther@suse.de>
10451         PR tree-optimization/84859
10452         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
10453         (cond_if_else_store_replacement): Perform sinking operation on
10454         single-store BBs regardless of MAX_STORES_TO_SINK setting.
10455         Generalize what a BB with a single eligible store is.
10457 2018-03-19  Richard Biener  <rguenther@suse.de>
10459         PR tree-optimization/84929
10460         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
10461         chrec_is_positive against non-chrec arg.
10463 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
10465         PR target/84711
10466         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
10468 2018-03-18  Martin Liska  <mliska@suse.cz>
10470         PR rtl-optimization/84635
10471         * regrename.c (build_def_use): Use matches_mode only when
10472         matches >= 0.
10474 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
10476         PR tree-optimization/84913
10477         * tree-vect-loop.c (vectorizable_reduction): Don't try to
10478         vectorize chains of COND_EXPRs.
10480 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10482         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
10484 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10486         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
10488 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
10490         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
10492 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
10493             Kito Cheng  <kito.cheng@gmail.com>
10495         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
10496         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
10497         (nds32_adjust_reg_alloc_order): New function.
10498         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
10500 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
10502         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
10503         nds32_print_operand, nds32_print_operand_address): Use
10504         HOST_WIDE_INT_PRINT_DEC instead.
10506 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
10508         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
10510 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
10512         PR target/84902
10513         * config/i386/i386.c (initial_ix86_tune_features,
10514         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
10515         unsigned long long.
10516         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
10517         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
10518         rather than 1u << ix86_tune.  Formatting fix.
10519         (ix86_option_override_internal): Change ix86_arch_mask from
10520         unsigned int to unsigned HOST_WIDE_INT, initialize to
10521         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
10522         (ix86_function_specific_restore): Likewise.
10524 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10526         PR target/84899
10527         * postreload.c (reload_combine_recognize_pattern): Perform
10528         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
10529         truncate_int_for_mode the result for the destination's mode.
10531         PR c/84909
10532         * hsa-gen.c (mem_type_for_type): Fix comment typo.
10533         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
10534         Likewise.
10535         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10536         Likewise.
10538 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
10540         PR target/84876
10541         * lra-assigns.c (lra_split_hard_reg_for): Don't use
10542         regno_allocno_class_array and sorted_pseudos.
10543         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
10544         insns where regno is used.
10546 2018-03-16  Martin Liska  <mliska@suse.cz>
10548         PR ipa/84833
10549         * multiple_target.c (create_dispatcher_calls): Redirect
10550         reference in the symbol table.
10552 2018-03-16  Martin Liska  <mliska@suse.cz>
10554         PR ipa/84722
10555         * multiple_target.c (create_dispatcher_calls): Redirect also
10556         an alias.
10558 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10560         PR c++/79937
10561         PR c++/82410
10562         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
10563         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
10564         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
10566 2018-03-16  Julia Koval  <julia.koval@intel.com>
10568         * doc/invoke.texi (Skylake Server): Add CLWB.
10569         Cannonlake): Remove CLWB.
10571 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
10573         PR tree-optimization/84841
10574         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
10575         1 << 3.
10576         (FLOAT_ONE_CONST_TYPE): Define.
10577         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
10578         (sort_by_operand_rank): Put entries with higher constant_type last
10579         rather than first to match comments.
10581 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
10583         * config/nios2/nios2.md (movsi_internal): Fix thinko in
10584         split predicate.
10586 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
10588         PR c++/79085
10589         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
10590         check and use address of target always.
10592 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
10594         PR target/84574
10595         * config/i386/i386.c (indirect_thunk_needed): Update comments.
10596         (indirect_thunk_bnd_needed): Likewise.
10597         (indirect_thunks_used): Likewise.
10598         (indirect_thunks_bnd_used): Likewise.
10599         (indirect_return_needed): New.
10600         (indirect_return_bnd_needed): Likewise.
10601         (output_indirect_thunk_function): Add a bool argument for
10602         function return.
10603         (output_indirect_thunk_function): Don't generate alias for
10604         function return thunk.
10605         (ix86_code_end): Call output_indirect_thunk_function to generate
10606         function return thunks.
10607         (ix86_output_function_return): Set indirect_return_bnd_needed
10608         and indirect_return_needed instead of indirect_thunk_bnd_needed
10609         and indirect_thunk_needed.
10611 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
10613         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
10614         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
10615         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
10617 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
10618             Paul Hua <paul.hua.gm@gmail.com>
10620         PR c/84852
10621         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
10623 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
10625         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
10626         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
10627         resp. SFmode cases.
10629 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
10631         PR target/84711
10632         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10633         instead of GET_MODE_SIZE when comparing Units.
10635 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10637         PR target/68256
10638         * varasm.c (hash_section): Return an unchangeble hash value
10639         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
10640         Return !aarch64_can_use_per_function_literal_pools_p ().
10642 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
10644         PR target/84860
10645         * optabs.c (emit_conditional_move): Pass address of cmode's copy
10646         rather than address of cmode as last argument to prepare_cmp_insn.
10648 2018-03-15  Julia Koval  <julia.koval@intel.com>
10650         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
10651         F_AVX512VNNI, F_AVX512BITALG): New.
10653 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
10655         PR target/83451
10656         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
10657         insn for floating-point loads and stores.
10659 2018-03-14  Carl Love  <cel@us.ibm.com>
10661         * config/rs6000/rs6000-c.c: Add macro definitions for
10662         ALTIVEC_BUILTIN_VEC_PERMXOR.
10663         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
10664         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
10665         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
10666         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
10667         UNSPEC_VPERMXOR.
10668         * config/doc/extend.texi: Add prototypes for vec_permxor.
10670 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
10672         PR c/84852
10673         * diagnostic-show-locus.c (class layout_point): Convert m_line
10674         from int to linenum_type.
10675         (line_span::comparator): Use linenum "compare" function when
10676         comparing line numbers.
10677         (test_line_span): New function.
10678         (layout_range::contains_point): Convert param "row" from int to
10679         linenum_type.
10680         (layout_range::intersects_line_p): Likewise.
10681         (layout::will_show_line_p): Likewise.
10682         (layout::print_source_line): Likewise.
10683         (layout::should_print_annotation_line_p): Likewise.
10684         (layout::print_annotation_line): Likewise.
10685         (layout::print_leading_fixits): Likewise.
10686         (layout::annotation_line_showed_range_p): Likewise.
10687         (struct line_corrections): Likewise for field m_row.
10688         (line_corrections::line_corrections): Likewise for param "row".
10689         (layout::print_trailing_fixits): Likewise.
10690         (layout::get_state_at_point): Likewise.
10691         (layout::get_x_bound_for_row): Likewise.
10692         (layout::print_line): Likewise.
10693         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
10694         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
10695         * input.c (selftest::test_linenum_comparisons): New function.
10696         (selftest::input_c_tests): Call it.
10697         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
10698         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
10699         * selftest.h (ASSERT_GT): New macro.
10700         (ASSERT_GT_AT): New macro.
10701         (ASSERT_LT): New macro.
10702         (ASSERT_LT_AT): New macro.
10704 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
10706         PR rtl-optimization/84780
10707         * combine.c (distribute_links): Don't make a link based on pc_rtx.
10709 2018-03-14  Martin Liska  <mliska@suse.cz>
10711         * tree.c (record_node_allocation_statistics): Use
10712         get_stats_node_kind.
10713         (get_stats_node_kind): New function extracted from
10714         record_node_allocation_statistics.
10715         (free_node): Use get_stats_node_kind.
10717 2018-03-14  Richard Biener  <rguenther@suse.de>
10719         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
10720         that the value-set of ANTIC_IN doesn't grow.
10722         Revert
10723         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10724         member.
10725         (BB_VISITED_WITH_VISITED_SUCCS): New define.
10726         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10728 2018-03-14  Julia Koval  <julia.koval@intel.com>
10730         * config.gcc (icelake-client, icelake-server): New.
10731         (icelake): Remove.
10732         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
10733         (initial_ix86_arch_features): Ditto.
10734         (PTA_SKYLAKE): Add SGX.
10735         (PTA_ICELAKE): Remove.
10736         (PTA_ICELAKE_CLIENT): New.
10737         (PTA_ICELAKE_SERVER): New.
10738         (ix86_option_override_internal): Split up icelake on icelake client and
10739         icelake server.
10740         (get_builtin_code_for_version): Ditto.
10741         (fold_builtin_cpu): Ditto.
10742         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
10743         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
10744         * config/i386/i386.h (processor_type): Ditto.
10745         * doc/invoke.texi: Ditto.
10747 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
10749         PR sanitizer/83392
10750         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
10751         INTEGER_CST offset, add it together with bitpos / 8 and
10752         sign extend based on POINTER_SIZE.
10754         PR target/84844
10755         Revert
10756         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
10758         PR target/78090
10759         * config/i386/constraints.md (Yc): New register constraint.
10760         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
10761         Use Yc constraint for alternative 2 of operand 0.  Remove
10762         preferred_for_speed attribute.
10764 2018-03-14  Richard Biener  <rguenther@suse.de>
10766         PR tree-optimization/84830
10767         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
10768         with the old one to avoid oscillations.
10770 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
10772         PR target/83712
10773         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
10774         pseudos.
10775         (assign_by_spills): Return a flag of reload assignment failure.
10776         Do not process the reload assignment failures.  Do not spill other
10777         reload pseudos if they has the same reg class.  Update n if
10778         necessary.
10779         (lra_assign): Add a return arg.  Set up from the result of
10780         assign_by_spills call.
10781         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10782         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
10783         usage_insns if it is not NULL.
10784         (spill_hard_reg_in_range): New function.
10785         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10786         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10787         function prototypes.
10788         (lra_assign): Change prototype.
10789         * lra.c (lra): Add code to deal with fails by splitting hard reg
10790         live ranges.
10792 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
10794         * config/riscv/riscv.opt (mrelax): New option.
10795         * config/riscv/riscv.c (riscv_file_start): Emit ".option
10796         "norelax" when riscv_mrelax is disabled.
10797         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
10799 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10801         PR target/84743
10802         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
10803         reassociation for int modes.
10805 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10807         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
10808         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
10809         for big-endian.
10810         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
10811         * config/aarch64/aarch64-sve.md
10812         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
10813         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
10814         (*extend<mode><Vwide>2): Rename to...
10815         (aarch64_sve_extend<mode><Vwide>2): ...this.
10816         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
10817         renaming the old pattern to...
10818         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
10819         unsigned packs.
10820         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
10821         define_expand, renaming the old pattern to...
10822         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
10823         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
10824         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
10825         account when deciding which SVE instruction the optab should use.
10826         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
10828 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10830         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
10831         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
10832         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
10833         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
10834         (tlsdesc_small_<mode>): Turn a define_expand and use
10835         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
10836         (tlsdesc_small_advsimd_<mode>): ...this.
10837         (tlsdesc_small_sve_<mode>): New pattern.
10839 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
10841         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
10842         (UNSPEC_UMUL_HIGHPART): New constants.
10843         (MUL_HIGHPART): New int iteraor.
10844         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
10845         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
10846         define_expand.
10847         (*<su>mul<mode>3_highpart): New define_insn.
10849 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
10851         PR lto/84805
10852         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10853         incomplete types.
10855 2018-03-13  Martin Liska  <mliska@suse.cz>
10857         PR ipa/84658.
10858         * (sem_item_optimizer::sem_item_optimizer): Initialize new
10859         vector.
10860         (sem_item_optimizer::~sem_item_optimizer): Release it.
10861         (sem_item_optimizer::merge_classes): Register variable aliases.
10862         (sem_item_optimizer::fixup_pt_set): New function.
10863         (sem_item_optimizer::fixup_points_to_sets): Likewise.
10864         * ipa-icf.h: Declare new variables and functions.
10866 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
10868         PR middle-end/84834
10869         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
10870         integer_pow2p@2 and test integer_pow2p in condition.
10871         (A < 0 ? C : 0): Similarly for @1.
10873         PR middle-end/84831
10874         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
10875         characters starting at p contain '\0' character, don't look beyond
10876         that.
10878         PR target/84827
10879         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
10880         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
10882         PR target/84828
10883         * reg-stack.c (change_stack): Change update_end var from int to
10884         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
10885         also call set_block_for_insn on the newly added insns and rescan.
10887         PR target/84786
10888         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
10889         on the last operand.
10891         PR c++/84704
10892         * tree.c (stabilize_reference_1): Return save_expr (e) for
10893         STATEMENT_LIST even if it doesn't have side-effects.
10895 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
10897         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
10899 2018-03-12  Renlin Li  <renlin.li@arm.com>
10901         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
10902         aarch64_output_scalar_simd_mov_immediate.
10904 2018-03-12  Martin Sebor  <msebor@redhat.com>
10906         PR tree-optimization/83456
10907         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
10908         for perfectly overlapping calls to memcpy.
10909         (gimple_fold_builtin_memory_chk): Same.
10910         (gimple_fold_builtin_strcpy): Handle no-warning.
10911         (gimple_fold_builtin_stxcpy_chk): Same.
10912         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
10914 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
10916         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
10917         parameter.  Use it for SFmode.
10918         (rs6000_function_arg_advance_1): Adjust.
10919         (rs6000_function_arg): Adjust.
10920         (rs6000_gimplify_va_arg): Pass false for that new parameter.
10922 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
10924         PR rtl-optimization/84169
10925         PR rtl-optimization/84780
10926         * combine.c (can_combine_p): Check for a 2-insn combination whether
10927         the destination register is used between the two insns, too.
10929 2018-03-12  Richard Biener  <rguenther@suse.de>
10931         PR tree-optimization/84803
10932         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
10933         for refs DR analysis didn't process.
10935 2018-03-12  Richard Biener  <rguenther@suse.de>
10937         PR tree-optimization/84777
10938         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
10939         force-vectorize loops ignore whether we are optimizing for size.
10941 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
10943         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
10944         (TARGET_MD_ASM_ADJUST): Define.
10946 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
10947             Kito Cheng  <kito.cheng@gmail.com>
10948             Chung-Ju Wu  <jasonwucj@gmail.com>
10950         * config/nds32/nds32.c (nds32_compute_stack_frame,
10951         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
10952         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
10953         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
10954         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
10955         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
10956         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
10957         * config/nds32/nds32.md (prologue, epilogue): Use macro
10958         NDS32_V3PUSH_AVAILABLE_P to do checking.
10960 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
10962         PR debug/58150
10963         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
10964         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
10965         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
10966         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
10967         addition of most attributes on !orig_type_die or the attribute not
10968         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
10970 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
10971             Chung-Ju Wu  <jasonwucj@gmail.com>
10973         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
10974         __NDS32_VH__ macro.
10975         * config/nds32/nds32.opt (mvh): New option.
10977 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
10978             Chung-Ju Wu  <jasonwucj@gmail.com>
10980         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
10981         function.
10982         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
10983         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
10984         definition.
10986 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
10987             Chung-Ju Wu  <jasonwucj@gmail.com>
10989         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
10990         function.
10991         * config/nds32/nds32-multiple.md (strlensi): New pattern.
10992         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
10994 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
10995             Kito Cheng  <kito.cheng@gmail.com>
10996             Chung-Ju Wu  <jasonwucj@gmail.com>
10998         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
10999         UNSPEC_FFMISM and UNSPEC_FLMISM.
11000         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
11001         for ffb, ffmism and flmism.
11002         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
11003         (unspec_ffmism): Ditto.
11004         (unspec_flmism): Ditto.
11005         (nds32_expand_builtin_impl): Check if string extension is available.
11006         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
11007         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
11009 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
11011         Reverting patch:
11012         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
11014         PR target/83712
11015         * lra-assigns.c (assign_by_spills): Return a flag of reload
11016         assignment failure.  Do not process the reload assignment
11017         failures.  Do not spill other reload pseudos if they has the same
11018         reg class.
11019         (lra_assign): Add a return arg.  Set up from the result of
11020         assign_by_spills call.
11021         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11022         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11023         usage_insns if it is not NULL.
11024         (spill_hard_reg_in_range): New function.
11025         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11026         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11027         function prototypes.
11028         (lra_assign): Change prototype.
11029         * lra.c (lra): Add code to deal with fails by splitting hard reg
11030         live ranges.
11032 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
11034         PR target/84807
11035         * config/i386/i386.opt: Replace Enforcment with Enforcement.
11037 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
11039         PR debug/84620
11040         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
11041         (dw_val_node): Add val_symbolic_view.
11042         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
11043         (symview_upper_bound): New.
11044         (new_line_info_table): Initialize symviews_since_reset.
11045         (dwarf2out_source_line): Count symviews_since_reset and set
11046         symview_upper_bound.
11047         (dw_val_equal_p): Handle symview.
11048         (add_AT_symview): New.
11049         (print_dw_val): Handle symview.
11050         (attr_checksum, attr_checksum_ordered): Likewise.
11051         (same_dw_val_p, size_of_die): Likewise.
11052         (value_format, output_die): Likewise.
11053         (add_high_low_attributes): Use add_AT_symview for entry_view.
11054         (dwarf2out_finish): Reset symview_upper_bound, clear
11055         zero_view_p.
11057 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
11059         PR target/83969
11060         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
11061         Add strict argument and use it.
11062         (rs6000_split_multireg_move): Update for new strict argument.
11063         (mem_operand_gpr): Disallow all non-offsettable addresses.
11064         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
11066 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
11068         PR target/84772
11069         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
11070         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
11071         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
11073         PR c++/84767
11074         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
11075         decl, use remap_type if we want to use the type.
11077 2018-03-09  Martin Sebor  <msebor@redhat.com>
11079         PR tree-optimization/84526
11080         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
11081         Remove dead code.
11082         (builtin_access::generic_overlap): Be prepared to handle non-array
11083         base objects.
11085 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
11087         PR rtl-optimization/84682
11088         * lra-constraints.c (process_address_1): Check is_address flag
11089         for address constraints.
11090         (process_alt_operands): Likewise.
11091         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
11092         preprocess_constraints.
11093         * recog.h (preprocess_constraints): Add oploc parameter.
11094         Adjust callers.
11095         * recog.c (preprocess_constraints): Test address_operand for
11096         CT_ADDRESS constraints.
11098 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
11100         PR target/83712
11101         * lra-assigns.c (assign_by_spills): Return a flag of reload
11102         assignment failure.  Do not process the reload assignment
11103         failures.  Do not spill other reload pseudos if they has the same
11104         reg class.
11105         (lra_assign): Add a return arg.  Set up from the result of
11106         assign_by_spills call.
11107         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
11108         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
11109         usage_insns if it is not NULL.
11110         (spill_hard_reg_in_range): New function.
11111         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
11112         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
11113         function prototypes.
11114         (lra_assign): Change prototype.
11115         * lra.c (lra): Add code to deal with fails by splitting hard reg
11116         live ranges.
11118 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11120         PR target/83193
11121         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
11122         Accept complain bool parameter.  Only emit errors if it is true.
11123         (arm_parse_cpu_option_name): Likewise.
11124         (arm_target_thumb_only): Adjust callers of the above.
11125         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
11126         prototype to take a default true bool parameter.
11127         (arm_parse_arch_option_name): Likewise.
11129 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
11130             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
11132         PR jit/64089
11133         PR jit/84288
11134         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
11135         * configure: Regenerate.
11136         * configure.ac ("linker --version-script option"): New.
11137         ("linker soname option"): New.
11139 2018-03-09  Richard Biener  <rguenther@suse.de>
11141         PR tree-optimization/84775
11142         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
11143         immediate uses of predicate stmts and mark them modified.
11145         Revert
11146         PR tree-optimization/84178
11147         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11148         to caller.
11149         (version_loop_for_if_conversion): Delay update_ssa call.
11150         (tree_if_conversion): Delay update_ssa until after predicate
11151         insertion.
11153 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
11155         PR target/84763
11156         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
11157         when the function accesses prior frames.
11159 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
11161         PR debug/84456
11162         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
11163         gen_llsym, otherwise call maybe_gen_llsym.
11165         PR inline-asm/84742
11166         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
11167         has ',' character inside of it.
11169 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11171         PR target/84748
11172         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
11173         as clobbering CC_REGNUM.
11175 2018-03-08  Richard Biener  <rguenther@suse.de>
11177         PR middle-end/84552
11178         * tree-scalar-evolution.c: Include tree-into-ssa.h.
11179         (follow_copies_to_constant): Do not follow SSA names registered
11180         for update.
11182 2018-03-08  Richard Biener  <rguenther@suse.de>
11184         PR tree-optimization/84178
11185         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
11186         to caller.
11187         (version_loop_for_if_conversion): Delay update_ssa call.
11188         (tree_if_conversion): Delay update_ssa until after predicate
11189         insertion.
11191 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
11193         PR tree-optimization/84178
11194         * tree-if-conv.c (release_bb_predicate): Remove the
11195         the assertion that the stmts have NULL use_ops.
11196         Discard the statements, asserting that they haven't
11197         yet been added to a BB.
11199 2018-03-08  Richard Biener  <rguenther@suse.de>
11201         PR tree-optimization/84746
11202         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
11203         (phi_translate): Pass in destination ANTIC_OUT set.
11204         (phi_translate_1): Likewise.  For a simplified result lookup
11205         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
11206         (phi_translate_set): Adjust.
11207         (do_pre_regular_insertion): Likewise.
11208         (do_pre_partial_partial_insertion): Likewise.
11210 2018-03-08  Martin Liska  <mliska@suse.cz>
11212         PR gcov-profile/84735
11213         * doc/gcov.texi: Document usage of profile files.
11214         * gcov-io.h: Document changes in the format.
11216 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
11218         PR debug/84404
11219         PR debug/84408
11220         * dwarf2out.c (struct dw_line_info_table): Update comments for
11221         view == -1.
11222         (FORCE_RESET_NEXT_VIEW): New.
11223         (FORCE_RESETTING_VIEW_P): New.
11224         (RESETTING_VIEW_P): Check for -1 too.
11225         (ZERO_VIEW_P): Likewise.
11226         (new_line_info_table): Force-reset next view.
11227         (dwarf2out_begin_function): Likewise.
11228         (dwarf2out_source_line): Simplify zero_view_p initialization.
11229         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
11230         view directly.  Omit view when omitting .loc at line 0.
11232 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
11234         PR tree-optimization/84740
11235         * tree-switch-conversion.c (process_switch): Call build_constructors
11236         only if info.phi_count is non-zero.
11238         PR tree-optimization/84739
11239         * tree-tailcall.c (find_tail_calls): Check call arguments against
11240         DECL_ARGUMENTS (current_function_decl) rather than
11241         DECL_ARGUMENTS (func) when checking for tail recursion.
11243 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11245         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11246         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11247         Volker Reichelt's entry and add entries for people that perform
11248         GCC fuzzy testing and report numerous bugs.
11250 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
11252         PR target/82411
11253         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11254         readonly data in sdata, if that is disabled.
11255         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11256         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11257         -mreadonly-in-sdata option.
11259 2018-03-07  Martin Sebor  <msebor@redhat.com>
11261         PR tree-optimization/84468
11262         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11263         basic block when looking for nul assignment.
11265 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
11267         PR target/84277
11268         * except.h (output_function_exception_table): Adjust prototype.
11269         * except.c (output_function_exception_table): Remove FNNAME parameter
11270         and add SECTION parameter.  Ouput one part of the table at a time.
11271         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11272         the first part of the exception table and emit unwind directives.
11273         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11274         (i386_pe_seh_cold_init): Likewise.
11275         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11276         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11277         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11278         (ix86_output_call_insn): Emit a nop in one more case for SEH.
11279         * config/i386/winnt.c: Include except.h.
11280         (struct seh_frame_state): Add reg_offset, after_prologue and
11281         in_cold_section fields.
11282         (i386_pe_seh_end_prologue): Set seh->after_prologue.
11283         (i386_pe_seh_cold_init): New function.
11284         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11285         to seh->in_cold_section.
11286         (seh_emit_push): Record the offset of the push.
11287         (seh_emit_save): Record the offet of the save.
11288         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11289         Test seh->after_prologue to disregard the epilogue.
11290         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11291         (i386_pe_end_cold_function): New function.
11293 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
11295         PR fortran/84565
11296         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11297         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11299         PR c++/84704
11300         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11301         on tmp_var.
11302         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11303         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11305         PR middle-end/84723
11306         * multiple_target.c: Include tree-inline.h and intl.h.
11307         (expand_target_clones): Diagnose and fail if node->definition and
11308         !tree_versionable_function_p (node->decl).
11310 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
11312         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11313         sprint_ul.
11314         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11315         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11316         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11318 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11320         PR target/84710
11321         * combine.c (try_combine): Use reg_or_subregno instead of handling
11322         just paradoxical SUBREGs and REGs.
11324 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
11326         * config/arc/arc.c (arc_finalize_pic): Remove function.
11327         (arc_must_save_register): We use single base PIC register, remove
11328         checks to save/restore the PIC register.
11329         (arc_expand_prologue): Likewise.
11330         * config/arc/arc-protos.h (arc_set_default_type_attributes):
11331         Remove.
11332         (arc_verify_short): Likewise.
11333         (arc_attr_type): Likewise.
11334         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11335         (walk_stores): Likewise.
11336         (arc_address_cost): Make it static.
11337         (arc_verify_short): Likewise.
11338         (branch_dest): Likewise.
11339         (arc_attr_type): Likewise.
11340         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11341         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11342         (arc_final_prescan_insn): Remove inserting the nops due to
11343         hardware hazards.  It is done in reorg step.
11344         (insn_length_variant_t): Remove.
11345         (insn_length_parameters_t): Likewise.
11346         (arc_insn_length_parameters): Likewise.
11347         (arc_get_insn_variants): Likewise.
11348         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11350 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
11352         PR inline-asm/84683
11353         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11354         assertion failure.
11356         PR tree-optimization/84687
11357         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11358         on new_node->decl.
11359         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11361 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11363         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11364         Rename to ppc_speculation_barrier.
11365         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11366         __builtin_ppc_speculation_barrier.
11368 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11370         PR target/84700
11371         * combine.c (combine_simplify_rtx): Don't try to simplify if
11372         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11373         are equal to x.
11375 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
11377         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11378         to 32 bytes when compiling for POWER9.
11380 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
11382         PR target/84564
11383         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11384         regparm >= 3 with no arg reg available also for calls with
11385         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
11387         PR target/84524
11388         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11389         orig,vex.
11390         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
11392 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
11394         PR target/84264
11395         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11397 2018-03-05  Richard Biener  <rguenther@suse.de>
11399         PR tree-optimization/84486
11400         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11401         When inserting a __builtin_assume_aligned call set the LHS
11402         SSA name alignment info accordingly.
11404 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
11406         PR tree-optimization/84114
11407         * config/aarch64/aarch64.c (aarch64_reassociation_width)
11408         Avoid reassociation of FLOAT_MODE addition.
11410 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
11412         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11413         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11414         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11415         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11416         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11417         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11418         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11419         and -mwbnoinvd.
11420         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11421         __builtin_ia32_wbinvd): New builtins.
11422         (SPECIAL_ARGS2): New.
11423         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11424         (SPECIAL_ARGS2): New.
11425         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11426         (ix86_valid_target_attribute_inner_p): Ditto.
11427         (ix86_init_mmx_sse_builtins): Add special_args2.
11428         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11429         TARGET_WBNOINVD_P): New.
11430         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11431         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11432         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11433         * config/i386/immintrin.h (_wbinvd): New intrinsic.
11434         * config/i386/pconfigintrin.h: New file.
11435         * config/i386/wbnoinvdintrin.h: Ditto.
11436         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11437         wbnoinvdintrin.h.
11438         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11440 2018-03-05  Richard Biener  <rguenther@suse.de>
11442         PR tree-optimization/84670
11443         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11444         member.
11445         (BB_VISITED_WITH_VISITED_SUCCS): New define.
11446         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11447         (compute_antic_aux): Only assert the number of values in ANTIC_IN
11448         doesn't grow if all successors (recursively) were visited at least
11449         once.
11451 2018-03-05  Richard Biener  <rguenther@suse.de>
11453         PR tree-optimization/84650
11454         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
11455         if executed in the loop pipeline.
11457 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
11459         * doc/configfiles.texi (Configuration Files): Move info about
11460         conditionalizing $target-protos.h to...
11461         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
11462         differs from $target-protos.h.
11464 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
11465             Chung-Ju Wu  <jasonwucj@gmail.com>
11467         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
11468         * config/nds32/nds32-multiple.md (setmemsi): Define.
11469         * config/nds32/nds32-memory-manipulation.c
11470         (nds32_gen_dup_4_byte_to_word_value): New.
11471         (emit_setmem_word_loop): New.
11472         (emit_setmem_byte_loop): New.
11473         (nds32_expand_setmem_loop): New.
11474         (nds32_expand_setmem_loop_v3m): New.
11475         (nds32_expand_setmem_unroll): New.
11476         (nds32_expand_setmem): New.
11478 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11479             Chung-Ju Wu  <jasonwucj@gmail.com>
11481         * config/nds32/nds32-memory-manipulation.c
11482         (nds32_emit_load_store): New.
11483         (nds32_emit_post_inc_load_store): New.
11484         (nds32_emit_mem_move): New.
11485         (nds32_emit_mem_move_block): New.
11486         (nds32_expand_movmemsi_loop_unknown_size): New.
11487         (nds32_expand_movmemsi_loop_known_size): New.
11488         (nds32_expand_movmemsi_loop): New.
11489         (nds32_expand_movmemsi_unroll): New.
11490         (nds32_expand_movmemqi): Rename ...
11491         (nds32_expand_movmemsi): ... to this.
11492         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
11493         (movmemsi): ... to this.
11494         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
11495         (nds32_expand_movmemsi): ... to this.
11497 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11498             Monk Chiang  <sh.chiang04@gmail.com>
11499             Chung-Ju Wu  <jasonwucj@gmail.com>
11501         * config/nds32/nds32-protos.h
11502         (nds32_expand_load_multiple): New arguments.
11503         (nds32_expand_store_multiple): Ditto.
11504         (nds32_valid_multiple_load_store): Rename ...
11505         (nds32_valid_multiple_load_store_p): ... to this.
11506         * config/nds32/nds32-memory-manipulation.c
11507         (nds32_expand_load_multiple): Refine implementation.
11508         (nds32_expand_store_multiple): Ditto.
11509         * config/nds32/nds32-multiple.md
11510         (load_multiple): Update nds32_expand_load_multiple interface.
11511         (store_multiple): Update nds32_expand_store_multiple interface.
11512         * config/nds32/nds32-predicates.c
11513         (nds32_valid_multiple_load_store): Rename ...
11514         (nds32_valid_multiple_load_store_p): ... to this and refine
11515         implementation.
11516         * config/nds32/predicates.md
11517         (nds32_load_multiple_and_update_address_operation): New predicate.
11518         (nds32_store_multiple_and_update_address_operation): New predicate.
11520 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
11521             Chung-Ju Wu  <jasonwucj@gmail.com>
11523         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
11524         (combo): New attribute.
11525         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
11527 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
11529         * config/nds32/nds32.opt: Change -mcmodel= default value.
11531 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
11532             Monk Chiang  <sh.chiang04@gmail.com>
11533             Chung-Ju Wu  <jasonwucj@gmail.com>
11535         * config/nds32/constants.md (unspec_element): New enum.
11536         * config/nds32/constraints.md (Umw): New constraint.
11537         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
11538         * config/nds32/nds32-intrinsic.md: Likewise.
11539         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
11540         (nds32_valid_smw_lwm_base_p): New.
11541         (nds32_output_smw_single_word): New.
11542         (nds32_output_lmw_single_word): New.
11543         (nds32_expand_unaligned_load): New.
11544         (nds32_expand_unaligned_store): New.
11545         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
11546         (nds32_output_smw_single_word): Declare.
11547         (nds32_output_lmw_single_word): Declare.
11548         (nds32_expand_unaligned_load): Declare.
11549         (nds32_expand_unaligned_store): Declare.
11550         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
11551         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
11552         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
11553         NDS32_BUILTIN_UASTORE_DW.
11554         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
11555         predicate.
11557 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
11558             Kito Cheng  <kito.cheng@gmail.com>
11559             Chung-Ju Wu  <jasonwucj@gmail.com>
11561         * config/nds32/nds32-intrinsic.c
11562         (nds32_expand_builtin_null_ftype_reg): Delete.
11563         (nds32_expand_builtin_reg_ftype_imm): Ditto.
11564         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
11565         (nds32_read_argument): New.
11566         (nds32_legitimize_target): Ditto.
11567         (nds32_legitimize_argument): Ditto.
11568         (nds32_check_constant_argument): Ditto.
11569         (nds32_expand_unop_builtin): Ditto.
11570         (nds32_expand_unopimm_builtin): Ditto.
11571         (nds32_expand_binop_builtin): Ditto.
11572         (nds32_builtin_decl_impl): Ditto.
11573         (builtin_description): Ditto.
11574         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
11575         (nds32_init_builtins_impl): Ditto.
11576         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
11577         (nds32_builtin_decl): New.
11578         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
11579         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
11581 2018-03-02  Jeff Law  <law@redhat.com>
11583         * reorg.c (stop_search_p): Handle DEBUG_INSN.
11584         (redundant_insn, fill_simple_delay_slots): Likewise.
11585         (fill_slots_from_thread): Likewise.
11586         * resource.c (mark_referenced_resources): Likewise.
11587         (mark_set_resources, find_dead_or_set_registers): Likewise.
11589 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11591         * substring-locations.h (format_warning_va): Formatting fix for
11592         ATTRIBUTE_GCC_DIAG.
11593         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
11594         argument.
11595         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
11596         * substring-locations.c: Include intl.h.
11597         (format_warning_va): Turned into small wrapper around
11598         format_warning_n_va, renamed to ...
11599         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
11600         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
11601         use ngettext.
11602         (format_warning_at_substring_n): New function.
11603         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
11604         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
11605         format_warning_at_substring with just a shorter name instead of
11606         const function pointer.
11607         (fmtwarn_n): New function.
11608         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
11609         appropriate, get rid of all the fmtstr temporaries, move conditionals
11610         with G_() wrapped string literals directly into fmtwarn arguments,
11611         cast dir.len to (int), formatting fixes.
11613 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
11615         * doc/invoke.texi: Remove "Cilk Plus" references.
11617 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11618             Richard Biener  <rguenther@suse.de>
11620         PR ipa/84628
11621         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
11622         for error or warning attributes if CALL_FROM_THUNK_P is set.
11623         Formatting fixes.
11625 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11627         PR target/56540
11628         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
11629         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
11631         PR target/56540
11632         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
11633         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
11635         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
11636         instead of -1U in last predictors element's probability member.
11638 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
11640         PR ipa/83983
11641         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11642         arguments if they are comparable.
11644 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
11646         PR tree-optimization/84634
11647         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
11648         masks and masked_loop_p with a single loop_masks, making sure it's
11649         null for bb vectorization.
11651 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
11653         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11654         (vect_analyze_data_ref_access): Use loop->safe_len rather than
11655         loop->force_vectorize to check whether there is no alias.
11657 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
11659         PR target/84614
11660         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
11661         prototypes.
11662         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
11663         comments.
11664         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
11665         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
11666         instead of a loop around prev_real_insn.
11667         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
11668         prev_real_insn.
11670         PR inline-asm/84625
11671         * config/i386/i386.c (ix86_print_operand): Use conditional
11672         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
11673         zero vector.
11675 2018-03-02  Richard Biener  <rguenther@suse.de>
11677         PR tree-optimization/84427
11678         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
11679         (bitmap_set_subtract_values): Rewrite to handle multiple
11680         exprs per value.
11681         (clean): Likewise.
11682         (prune_clobbered_mems): Likewise.
11683         (phi_translate): Take edge instead of pred/phiblock.
11684         (phi_translate_1): Likewise.
11685         (phi_translate_set): Likewise.  Insert all translated
11686         exprs for a value into the set, keeping possibly multiple
11687         expressions per value.
11688         (compute_antic_aux): Adjust for phi_translate changes.
11689         When intersecting union the expressions and prune those
11690         not in the final value set, keeping possibly multiple
11691         expressions per value.  Do not use value-insertion
11692         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
11693         all expressions.  Add verification that the value-sets
11694         only shrink during iteration.
11695         (compute_partial_antic_aux): Adjust for the phi_translate changes.
11696         (do_pre_regular_insertion): Likewise.
11697         (do_pre_partial_partial_insertion): Likewise.
11699 2018-03-02  Richard Biener  <rguenther@suse.de>
11701         PR target/82005
11702         * config/darwin.c (saved_debug_info_level): New static global.
11703         (darwin_asm_lto_start): Disable debug info generation for LTO out.
11704         (darwin_asm_lto_end): Restore debug info generation settings.
11706 2018-03-01  Martin Liska  <mliska@suse.cz>
11708         PR sanitizer/82484
11709         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11710         volatile arguments.
11712 2018-03-01  Richard Biener  <rguenther@suse.de>
11714         PR debug/84645
11715         * dwarf2out.c (gen_variable_die): Properly handle late VLA
11716         type annotation with LTO when debug was disabled at compile-time.
11718 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
11720         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
11721         XINT with INTVAL.
11722         (mips_final_postscan_insn): Likewise.
11724 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
11726         PR rtl-optimization/84528
11727         * alias.c (init_alias_target): Add commentary.
11728         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
11729         a unique base value if the frame pointer is not eliminated
11730         to the stack pointer.
11732 2018-03-01  Tom de Vries  <tom@codesourcery.com>
11734         PR rtl-optimization/83327
11735         * lra-int.h (hard_regs_spilled_into): Declare.
11736         * lra.c (hard_regs_spilled_into): Define.
11737         (init_reg_info): Init hard_regs_spilled_into.
11738         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
11739         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
11740         (process_bb_lives): Handle hard_regs_spilled_into.
11741         (lra_create_live_ranges_1): Before doing liveness propagation, clear
11742         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
11744 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
11746         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
11747         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
11748         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
11749         * config/rs6000/aix72.h: New file.
11751 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
11753         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
11754         instead of warning_at with conditional singular and plural messages
11755         where possible.
11757         PR target/52991
11758         * stor-layout.c (update_alignment_for_field): For
11759         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
11760         && !DECL_PACKED (field), do the alignment update, just use
11761         only desired_align instead of MAX (type_align, desired_align)
11762         as the alignment.
11763         (place_field): Don't do known_align < desired_align handling
11764         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
11765         is non-NULL, instead do it after rli->prev_field handling and
11766         only if not within a bitfield word.  For DECL_PACKED (field)
11767         use type_align of BITS_PER_UNIT.
11769 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
11771         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
11772         superfluous parentheses and trailing spaces.
11774 2018-02-28  Richard Biener  <rguenther@suse.de>
11776         PR tree-optimization/84584
11777         * graphite-scop-detection.c (scop_detection::add_scop): Discard
11778         SCoPs with fake exit edge.
11780 2018-02-28  Martin Liska  <mliska@suse.cz>
11782         PR testsuite/84597
11783         * timevar.c (timer::print): Fix format to properly print 100%
11784         values.
11786 2018-02-28  Richard Biener  <rguenther@suse.de>
11788         PR middle-end/84607
11789         * genmatch.c (capture_info::walk_match): Do not mark
11790         captured expressions without operands as expr_p given
11791         they act more like predicates and should be subject to
11792         "lost tail" side-effect preserving.
11794 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
11796         PR rtl-optimization/81611
11797         * auto-inc-dec.c (attempt_change): Move dead note from
11798         mem_insn if it's the next use of regno
11799         (find_address): Take address use of reg holding
11800         non-incremented value.  Add parm to limit search to the named
11801         reg only.
11802         (merge_in_block): Attempt to use a mem insn that is the next
11803         use of the original regno.
11805 2018-02-27  Martin Sebor  <msebor@redhat.com>
11807         PR c++/83871
11808         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
11809         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
11811 2018-02-27  Martin Sebor  <msebor@redhat.com>
11813         PR translation/84207
11814         * diagnostic-core.h (warning_n, error_n, inform_n): Change
11815         n argument to unsigned HOST_WIDE_INT.
11816         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
11817         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
11818         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
11819         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
11821 2018-02-27  Richard Biener  <rguenther@suse.de>
11823         PR tree-optimization/84512
11824         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
11825         Do not use the estimate returned from record_stmt_cost for
11826         the scalar iteration cost but sum properly using add_stmt_cost.
11828 2018-02-27  Richard Biener  <rguenther@suse.de>
11830         PR tree-optimization/84466
11831         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11832         Adjust last change to less strictly validate use operands.
11834 2018-02-27  Martin Liska  <mliska@suse.cz>
11836         PR gcov-profile/84548
11837         * gcov.c (process_file): Allow partial overlap and consider it
11838         also as group functions.
11839         (output_lines): Properly calculate range of lines for a group.
11841 2018-02-27  Martin Liska  <mliska@suse.cz>
11843         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
11844         'ggc' suffixes.  Change first column width.
11845         (timer::print): Fix formatting of the column.
11847 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
11849         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
11850         preserve inline entry blocks for the sake of debug inline
11851         entry point markers alone.
11852         (remove_unused_locals): Suggest in comments a better place to
11853         force the preservation of inline entry blocks that are
11854         otherwise unused, but do not preserve them.
11856 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11858         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
11860 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11862         PR target/84039
11863         * config/i386/constraints.md (Bs): Replace
11864         ix86_indirect_branch_register with
11865         TARGET_INDIRECT_BRANCH_REGISTER.
11866         (Bw): Likewise.
11867         * config/i386/i386.md (indirect_jump): Likewise.
11868         (tablejump): Likewise.
11869         (*sibcall_memory): Likewise.
11870         (*sibcall_value_memory): Likewise.
11871         Peepholes of indirect call and jump via memory: Likewise.
11872         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
11873         (*sibcall_value_GOT_32): Likewise.
11874         * config/i386/predicates.md (indirect_branch_operand): Likewise.
11875         (GOT_memory_operand): Likewise.
11876         (call_insn_operand): Likewise.
11877         (sibcall_insn_operand): Likewise.
11878         (GOT32_symbol_operand): Likewise.
11879         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
11881 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
11883         PR rtl-optimization/83496
11884         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
11885         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
11886         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
11887         redundant insn, if any.
11888         (relax_delay_slots): Likewise.
11889         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
11891 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
11893         PR tree-optimization/83965
11894         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
11895         that grouped statements are part of a reduction chain.  Return
11896         true if the statement is not marked as a reduction itself but
11897         is part of a group.
11898         (vect_recog_dot_prod_pattern): Don't check whether the statement
11899         is part of a group here.
11900         (vect_recog_sad_pattern): Likewise.
11901         (vect_recog_widen_sum_pattern): Likewise.
11903 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
11905         PR debug/84545
11906         * final.c (rest_of_clean_state): Also look for calls inside sequences.
11908 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
11910         PR target/84530
11911         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
11912         the bool argument.
11913         (ix86_output_indirect_function_return): New prototype.
11914         (ix86_split_simple_return_pop_internal): Likewise.
11915         * config/i386/i386.c (indirect_return_via_cx): New.
11916         (indirect_return_via_cx_bnd): Likewise.
11917         (indirect_thunk_name): Handle return va CX_REG.
11918         (output_indirect_thunk_function): Create alias for
11919         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
11920         (ix86_output_indirect_jmp): Remove the bool argument.
11921         (ix86_output_indirect_function_return): New function.
11922         (ix86_split_simple_return_pop_internal): Likewise.
11923         * config/i386/i386.md (*indirect_jump): Don't pass false
11924         to ix86_output_indirect_jmp.
11925         (*tablejump_1): Likewise.
11926         (simple_return_pop_internal): Change it to define_insn_and_split.
11927         Call ix86_split_simple_return_pop_internal to split it for
11928         -mfunction-return=.
11929         (simple_return_indirect_internal): Call
11930         ix86_output_indirect_function_return instead of
11931         ix86_output_indirect_jmp.
11933 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
11935         PR bootstrap/84405
11936         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
11937         memset and value initialization afterwards.
11939 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
11941         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
11943 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11945         PR target/84521
11946         * common/config/aarch64/aarch64-common.c
11947         (aarch_option_optimization_table[]): Switch
11948         off fomit-frame-pointer
11950 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
11951             Chung-Ju Wu  <jasonwucj@gmail.com>
11953         * config/nds32/nds32-multiple.md (load_multiple): Disallow
11954         volatile memory.
11955         (store_multiple): Ditto.
11957 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
11959         * config.gcc: Add --with-cpu support for nds32 target.
11960         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
11961         * config/nds32/nds32.opt: Add -mcpu= option.
11963 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
11965         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
11966         isel=yes): Warn for these deprecated options.
11968 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
11970         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
11971         ISA_2_5_MASKS_EMBEDDED.
11973 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
11975         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
11976         p->max as pointers rather than using iterative_hash_expr.
11978 2018-02-23  Carl Love  <cel@us.ibm.com>
11980         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
11981         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
11982         BU_P8V_OVERLOAD_2.
11983         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
11984         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
11985         P8V_BUILTIN_VEC_VUNSIGNED2.
11987 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
11989         PR target/81572
11990         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
11991         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
11992         LRA_UNKNOWN_ALT.
11993         * lra-constraints.c (curr_insn_transform): Set up
11994         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
11995         LRA_UNKNOWN_ALT.
11996         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
11997         * lra-eliminations.c (spill_pseudos): Ditto.
11998         (process_insn_for_elimination): Ditto.
11999         * lra-lives.c (reg_early_clobber_p): Use the new macros.
12000         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
12001         LRA_NON_CLOBBERED_ALT.
12003 2018-02-22  Martin Sebor  <msebor@redhat.com>
12005         PR tree-optimization/84480
12006         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
12007         to maybe_diag_stxncpy_trunc.  Call it.
12008         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
12009         from gimple_fold_builtin_strcpy.  Print inlining stack.
12010         (handle_builtin_stxncpy): Print inlining stack.
12011         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
12013 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
12015         PR target/84176
12016         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
12017         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
12018         and -fcheck-pointer-bounds are used together.
12019         (indirect_thunk_prefix): New enum.
12020         (indirect_thunk_need_prefix): New function.
12021         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
12022         "_nt" instead of "_bnd" for NOTRACK prefix.
12023         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
12024         (output_indirect_thunk_function): Likewise.
12025         (): Likewise.
12026         (ix86_code_end): Update output_indirect_thunk_function calls.
12027         (ix86_output_indirect_branch_via_reg): Replace
12028         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
12029         (ix86_output_indirect_branch_via_push): Likewise.
12030         (ix86_output_function_return): Likewise.
12031         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
12032         incompatible with -fcf-protection=branch and
12033         -fcheck-pointer-bounds.
12035 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
12037         PR target/83335
12038         * config/aarch64/aarch64.c (aarch64_print_address_internal):
12039         Change gcc_assert call to output_operand_lossage.
12041 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
12043         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
12045 2018-02-22  DJ Delorie  <dj@redhat.com>
12046             Sebastian Perta  <sebastian.perta@renesas.com>
12047             Oleg Endo  <olegendo@gcc.gnu.org>
12049         * config/rx/rx.c (rx_rtx_costs): New function.
12050         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
12052 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12054         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
12056 2018-02-22  Martin Liska  <mliska@suse.cz>
12058         PR driver/83193
12059         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
12060         Add "native" as a possible value.
12062 2018-02-22  Martin Liska  <mliska@suse.cz>
12064         PR driver/83193
12065         * config/i386/i386.c (ix86_option_override_internal):
12066         Add "native" as a possible value for -march and -mtune.
12068 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
12070         PR target/84502
12071         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
12072         to all type variants.
12074         PR tree-optimization/84503
12075         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
12076         width as info->bitpos + info->bitsize - start.
12077         (merged_store_group::merge_overlapping): Simplify width computation.
12078         (check_no_overlap): New function.
12079         (imm_store_chain_info::try_coalesce_bswap): Compute expected
12080         start + width and last_order of the group, fail if check_no_overlap
12081         fails.
12082         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
12083         to group if check_no_overlap fails.
12085 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
12087         * config/rs6000/altivec.md: Delete contraint arguments to
12088         define_expand, define_split, and define_peephole2, and in
12089         define_insn_and_split if always unused.
12090         * config/rs6000/darwin.md: Ditto.
12091         * config/rs6000/dfp.md: Ditto.
12092         * config/rs6000/rs6000.md: Ditto.
12093         * config/rs6000/sync.md: Ditto.
12094         * config/rs6000/vector.md: Ditto.
12095         * config/rs6000/vsx.md: Ditto.
12097 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
12099         * config/rs6000/altivec.md: Write output control strings as braced
12100         blocks instead of double-quoted strings.
12101         * config/rs6000/darwin.md: Ditto.
12102         * config/rs6000/rs6000.md: Ditto.
12103         * config/rs6000/vector.md: Ditto.
12104         * config/rs6000/vsx.md: Ditto.
12106 2018-02-21  Jason Merrill  <jason@redhat.com>
12108         PR c++/84314 - ICE with templates and fastcall attribute.
12109         * attribs.c (build_type_attribute_qual_variant): Remove assert.
12111 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
12113         * ipa-cp.c (determine_versionability): Fix comment typos.
12115 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
12117         PR c/84229
12118         * ipa-cp.c (determine_versionability): Do not version functions caling
12119         va_arg_pack.
12121 2018-02-21  Martin Liska  <mliska@suse.cz>
12123         PR driver/83193
12124         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
12125         Add "native" as a possible value.
12126         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
12127         the macro when native cpu detection is available.
12129 2018-02-21  Martin Liska  <mliska@suse.cz>
12131         PR driver/83193
12132         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
12133         Add "native" as a possible value.
12134         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
12135         when native cpu detection is available.
12137 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
12138             Martin Sebor  <msebor@redhat.com>
12140         PR tree-optimization/84478
12141         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
12142         false.
12143         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
12144         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
12145         support which is conservatively correct, for 2 only stay conservative
12146         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
12147         argument to the 2 argument get_range_strlen, adjust 6 arg
12148         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
12149         false.
12150         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
12151         (gimple_fold_builtin_strlen): Pass true as last argument to
12152         get_range_strlen.
12154 2018-02-20  Martin Sebor  <msebor@redhat.com>
12156         PR middle-end/84095
12157         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
12158         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
12159         (builtin_memref::builtin_memref): Factor out parts into
12160         set_base_and_offset and call it.
12162 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
12164         PR middle-end/84406
12165         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
12166         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
12167         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
12168         search at the associated MODE_INT.
12170 2018-02-20  Jeff Law  <law@redhat.com>
12172         PR middle-end/82123
12173         PR tree-optimization/81592
12174         PR middle-end/79257
12175         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
12176         for range data rather than using global data.
12177         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
12178         range data rather than using global data.
12179         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
12180         pass it to children as needed.
12181         (struct directive::fmtresult): Similarly.
12182         (struct directive::set_width): Similarly.
12183         (struct directive::set_precision): Similarly.
12184         (format_integer, format_directive, parse_directive): Similarly.
12185         (format_none): Accept unnamed vr_values parameter.
12186         (format_percent, format_floating, format_character): Similarly.
12187         (format_string, format_plain): Similarly.
12188         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
12189         the EVRP range analyzer for range data rather than using global data.
12190         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
12191         gimple-ssa-evrp-analyze.h
12192         (class sprintf_dom_walker): Add after_dom_children member function.
12193         Add evrp_range_analyzer member.
12194         (sprintf_dom_walker::before_dom_children): Call into the EVRP
12195         range analyzer as needed.
12196         (sprintf_dom_walker::after_dom_children): New member function.
12197         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
12198         if not optimizing.
12199         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
12200         (evrp_range_analyzer::pop_to_marker): Likewise.
12202 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
12204         PR tree-optimization/84419
12205         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
12206         with the required type if its current type is compatible but
12207         different.
12209 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
12211         PR middle-end/82004
12212         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
12213         after vectorization.
12215 2018-02-20  Martin Liska  <mliska@suse.cz>
12217         PR driver/83193
12218         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
12219         possible values if we don't have a hint.
12221 2018-02-20  Martin Liska  <mliska@suse.cz>
12223         PR c/84310
12224         PR target/79747
12225         * final.c (shorten_branches): Build align_tab array with one
12226         more element.
12227         * opts.c (finish_options): Add alignment option limit check.
12228         (MAX_CODE_ALIGN): Likewise.
12229         (MAX_CODE_ALIGN_VALUE): Likewise.
12230         * doc/invoke.texi: Document maximum allowed option value for
12231         all -falign-* options.
12233 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
12235         PR target/84146
12236         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
12237         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
12238         * var-tracking.c (emit_note_insn_var_location): Remove all references
12239         to NOTE_INSN_CALL_ARG_LOCATION.
12240         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12241         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12242         Use copy_rtx_if_shared.
12243         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12244         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12245         (dwarf2out_var_location): Remove handling of
12246         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12247         on call_insn.
12248         * final.c (final_scan_insn): Remove all references to
12249         NOTE_INSN_CALL_ARG_LOCATION.
12250         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
12251         before dumping final insns.
12252         * except.c (emit_note_eh_region_end): Remove all references to
12253         NOTE_INSN_CALL_ARG_LOCATION.
12254         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12255         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12256         * config/arc/arc.c (hwloop_optimize): Likewise.
12257         * config/arm/arm.c (create_fix_barrier): Likewise.
12258         * config/s390/s390.c (s390_chunkify_start): Likewise.
12259         * config/sh/sh.c (find_barrier): Likewise.
12260         * config/i386/i386.c (rest_of_insert_endbranch,
12261         ix86_seh_fixup_eh_fallthru): Likewise.
12262         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12263         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12264         * config/frv/frv.c (frv_function_prologue): Likewise.
12265         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
12266         reg note.
12267         (note_outside_basic_block_p): Remove all references to
12268         NOTE_INSN_CALL_ARG_LOCATION.
12269         * gengtype.c (adjust_field_rtx_def): Likewise.
12270         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12271         Likewise.
12272         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12273         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12275         PR c++/84444
12276         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12277         is ADDR_EXPR.
12279         PR tree-optimization/84452
12280         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12281         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12282         is NULL.
12284 2018-02-19  Martin Liska  <mliska@suse.cz>
12286         PR sanitizer/82183
12287         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12289 2018-02-19  Martin Liska  <mliska@suse.cz>
12290             Richard Sandiford  <richard.sandiford@linaro.org>
12292         PR tree-optimization/82491
12293         * gimple-fold.c (get_base_constructor): Make earlier bail out
12294         to prevent ubsan.
12296 2018-02-19  Carl Love  <cel@us.ibm.com>
12298         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12299         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12300         BU_P8V_OVERLOAD_1.
12301         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12302         P8V_BUILTIN_VEC_NEG.
12304 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
12306         * config/rl78/rl78.md (movdf): New define expand.
12308 2018-02-19  Martin Liska  <mliska@suse.cz>
12310         PR other/80589
12311         * doc/invoke.texi: Fix typo.
12312         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12314 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
12316         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12317         handle rs6000_single_float and rs6000_double_float specially for
12318         e500 family CPUs.
12320 2018-02-16  Jeff Law  <law@redhat.com>
12322         * config/rx/rx.c (add_pop_cfi_notes): New function.;
12323         (pop_regs): Use it.
12325 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12327         PR ipa/84425
12328         * ipa-inline.c (inline_small_functions): Fix a typo.
12330 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12332         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12334 2018-02-16  Carl Love  <cel@us.ibm.com>
12336         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12337         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12338         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12339         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12340         expansion to P8V_BUILTIN_VEC_FLOAT2.
12342 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
12344         PR rtl-optimization/70023
12345         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12346         src_regno into account.
12348 2018-02-16  Carl Love  <cel@us.ibm.com>
12350         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12351         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12352         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12353         * config/rs6000/rs6000.c: Remove case statements for
12354         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12355         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12356         and P9V_BUILTIN_VEC_VINSERT4B.
12357         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12358         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12359         * config/rs6000/vsx.md:
12360         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12361         vec_insert4b.
12363 2018-02-16  Carl Love  <cel@us.ibm.com>
12365         * config/rs6000/altivec.h: Add builtin names vec_extract4b
12366         vec_insert4b.
12367         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12368         definitions.
12369         * config/rs6000/rs6000-c.c: Add the definitions for
12370         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12371         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12372         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12373         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
12374         definition for insert4b and define insn *insert3b_internal.
12375         * doc/extend.texi: Add documentation for vec_extract4b.
12377 2018-02-16  Nathan Sidwell  <nathan@acm.org>
12379         * doc/extend.texi (Backwards Compatibility): Mention friend
12380         injection.  Note for-scope is deprecated.
12381         * doc/invoke.texi (-ffriend-injection): Deprecate.
12383 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
12385         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12386         that moved to I2, also allow destinations that are a paradoxical
12387         subreg (instead of a normal reg).
12389 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
12391         PR target/83831
12392         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12393         to QImode.
12395 2018-02-16  Richard Biener  <rguenther@suse.de>
12397         PR tree-optimization/84037
12398         PR tree-optimization/84016
12399         PR target/82862
12400         * config/i386/i386.c (ix86_builtin_vectorization_cost):
12401         Adjust vec_construct for the fact we need additional higher latency
12402         128bit inserts for AVX256 and AVX512 vector builds.
12403         (ix86_add_stmt_cost): Scale vector construction cost for
12404         elementwise loads.
12406 2018-02-16  Richard Biener  <rguenther@suse.de>
12408         PR tree-optimization/84417
12409         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12410         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12411         (non_rewritable_lvalue_p): Likewise, use poly-ints.
12413 2018-02-16  Martin Liska  <mliska@suse.cz>
12415         PR sanitizer/84307
12416         * internal-fn.def (ASAN_CHECK): Set proper flags.
12417         (ASAN_MARK): Likewise.
12419 2018-02-16  Julia Koval  <julia.koval@intel.com>
12421         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12422         from PTA_CANNONLAKE.
12424 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
12426         PR target/84272
12427         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12428         Use ++iter rather than iter++ for std::list iterators.
12429         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
12430         defer deleting them until all nodes in the forest are processed.  Do
12431         free even leaf nodes.  Change to_process into auto_vec.
12433         PR bootstrap/84405
12434         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12435         * vec.h (vec_default_construct): Use memset instead of placement new
12436         if BROKEN_VALUE_INITIALIZATION is defined.
12437         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12438         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12439         is defined.
12441         PR rtl-optimization/83723
12442         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12443         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
12444         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
12445         recursive calls.
12446         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12447         callers.
12448         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12450 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
12452         PR rtl-optimization/81443
12453         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
12454         from inner REGs to paradoxical SUBREGs.
12456 2018-02-16  Richard Biener  <rguenther@suse.de>
12458         PR tree-optimization/84399
12459         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12460         For operands we can analyze at their definition make sure we can
12461         analyze them at each use as well.
12463 2018-02-16  Richard Biener  <rguenther@suse.de>
12465         PR tree-optimization/84190
12466         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
12467         volatile accesses if the decl isn't volatile.
12469 2018-02-15  Jason Merrill  <jason@redhat.com>
12471         PR c++/84314 - ICE with templates and fastcall attribute.
12472         * attribs.c (build_type_attribute_qual_variant): Don't clobber
12473         TYPE_CANONICAL on an existing type.
12475 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
12477         PR tree-optimization/84383
12478         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
12479         dstoff nor call operand_equal_p if dstbase is NULL.
12481         PR tree-optimization/84334
12482         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
12483         also a CONSTANT_CLASS_P, punt.
12485 2018-02-14  Jim Wilson  <jimw@sifive.com>
12487         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
12488         first SMALL_OPERAND check.  New local min_second_step.  Move assert
12489         to where locals are set.  Add TARGET_RVC support.
12490         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
12492 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
12494         * doc/invoke.texi: Correct -Wformat-overflow code sample.
12496 2018-02-14  Martin Sebor  <msebor@redhat.com>
12498         PR tree-optimization/83698
12499         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
12500         arrays constrain the offset range to their bounds.
12501         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
12502         (builtin_access::overlap): Avoid setting the size of overlap if it's
12503         already been set.
12504         (maybe_diag_overlap): Also consider arrays when deciding what values
12505         of offsets to include in diagnostics.
12507 2018-02-14  Martin Sebor  <msebor@redhat.com>
12509         PR c/84108
12510         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
12511         that correspond to the kind of a declaration.
12513 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
12515         PR target/83984
12516         * config/pa/pa.md: Load address of PIC label using the linkage table
12517         if the label is nonlocal.
12519 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12521         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
12522         warning message if user requests -maltivec=be.
12523         * doc/invoke.texi: Document deprecation of -maltivec=be.
12525 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
12527         PR target/84220
12528         * config/rs6000/rs6000-c.c: Update definitions for
12529         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
12530         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
12532 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12534         PR target/84239
12535         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
12536         add _get_ssp intrinsics. Remove argument from
12537         __builtin_ia32_rdssp[d|q].
12538         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
12539         * config/i386/i386-builtin.def: Remove argument from
12540         __builtin_ia32_rdssp[d|q].
12541         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
12542         ix86_expand_special_args_builtin for _rdssp[d|q].
12543         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
12544         Clear register before usage.
12545         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
12546         Add documentation for new _get_ssp and _inc_ssp intrinsics.
12548 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
12550         PR tree-optimization/84357
12551         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
12552         operand 1 of an ARRAY_REF too.
12554 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
12556         PR target/83831
12557         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
12558         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12559         declarations.
12560         (set_of_reg): New struct.
12561         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
12562         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
12563         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12564         functions.
12565         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
12566         Split into bitclr, bitset, bitinvert patterns if appropriate.
12567         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
12568         use rx_fuse_in_memory_bitop.
12569         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
12570         to named insn, correct maximum insn length.
12572 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
12574         PR target/79242
12575         * machmode.def: Define a complex mode for PARTIAL_INT.
12576         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
12577         MODE_PARTIAL_INT.
12578         * doc/rtl.texi: Document CSPImode.
12579         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
12580         handling.
12581         (msp430_hard_regno_nregs_with_padding): Likewise.
12583 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
12585         PR target/84279
12586         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
12588 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
12590         PR rtl-optimization/84169
12591         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
12592         we generated a parallel as new i3 and we split that to new i2 and i3
12593         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
12594         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
12595         those to i2, not i1.  Partially rewrite this scan code.
12597 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
12599         PR c/82210
12600         * stor-layout.c (place_field): For variable length fields, adjust
12601         offset_align afterwards not just based on the field's alignment,
12602         but also on the size.
12604         PR middle-end/84309
12605         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
12606         of exps and logs in the use_exp2 case.
12608 2018-02-13  Jeff Law  <law@redhat.com>
12610         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
12611         entry for "vector".
12613         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
12614         ARGS as unused.
12616 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
12618         PR debug/84342
12619         PR debug/84319
12620         * common.opt (gas-loc-support, gas-locview-support): New.
12621         (ginline-points, ginternal-reset-location-views): New.
12622         * doc/invoke.texi: Document them.  Use @itemx where intended.
12623         (gvariable-location-views): Adjust.
12624         * target.def (reset_location_view): New.
12625         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
12626         (TARGET_RESET_LOCATION_VIEW): New.
12627         * doc/tm.texi: Rebuilt.
12628         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
12629         (dwarf2out_default_as_locview_support): New.
12630         (output_asm_line_debug_info): Use option variables.
12631         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
12632         (output_loc_list): Likewise.
12633         (add_high_low_attributes): Check option variables.
12634         Don't output entry view attribute in strict mode.
12635         (gen_inlined_subroutine_die): Check option variables.
12636         (dwarf2out_inline_entry): Likewise.
12637         (init_sections_and_labels): Likewise.
12638         (dwarf2out_early_finish): Likewise.
12639         (maybe_reset_location_view): New, from...
12640         (dwarf2out_var_location): ... here.  Call it.
12641         * debug.h (dwarf2out_default_as_loc_support): Declare.
12642         (dwarf2out_default_as_locview_support): Declare.
12643         * hooks.c (hook_int_rtx_insn_0): New.
12644         * hooks.h (hook_int_rtx_insn_0): Declare.
12645         * toplev.c (process_options): Take -gas-loc-support and
12646         -gas-locview-support from dwarf2out.  Enable
12647         -gvariable-location-views by default only with locview
12648         assembler support.  Enable -ginternal-reset-location-views by
12649         default only if the target defines the corresponding hook.
12650         Enable -ginline-points by default if location views are
12651         enabled; force it disabled if statement frontiers are
12652         disabled.
12653         * tree-inline.c (expand_call_inline): Check option variables.
12654         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
12656 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
12658         PR tree-optimization/84321
12659         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
12660         handling.  Also check whether the anti-range contains any values
12661         that satisfy the mask; switch to a VR_RANGE if not.
12663 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
12665         PR sanitizer/84340
12666         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
12668 2018-02-13  Martin Jambor  <mjambor@suse.cz>
12670         PR c++/83990
12671         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
12672         of call statements, also set location of a load to a temporary.
12674 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
12676         * config/rl78/rl78.c (add_vector_labels): New function.
12677         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
12678         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
12679         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
12680         which checks that no arguments are passed.
12681         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
12682         * doc/extend.texi: Documentation for the new attribute.
12684 2018-02-13  Andreas Schwab  <schwab@suse.de>
12686         * config/riscv/linux.h (CPP_SPEC): Define.
12688 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
12690         PR target/84335
12691         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
12692         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
12693         OPTION_MASK_ISA_AES as first argument to def_builtin_const
12694         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
12695         instead of OPTION_MASK_ISA_PCLMUL as first argument to
12696         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
12697         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
12698         temporarily for AES and PCLMUL builtins.
12700         PR tree-optimization/84339
12701         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
12702         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
12703         Formatting fixes.
12705         PR middle-end/84309
12706         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
12707         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
12708         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
12709         inline function.
12710         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
12711         inline function.
12712         * omp-simd-clone.h: New file.
12713         * omp-simd-clone.c: Include omp-simd-clone.h.
12714         (expand_simd_clones): No longer static.
12715         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
12716         cgraph.h and omp-simd-clone.h.
12717         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
12718         (vect_recog_widen_shift_pattern): Formatting fix.
12719         (vect_pattern_recog_1): Don't check optab for calls.
12721         PR target/84336
12722         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
12723         operands[2] into a REG before using gen_lowpart on it.
12725 2018-02-12  Jeff Law  <law@redhat.com>
12727         PR target/83760
12728         * config/sh/sh.c (find_barrier): Consider a sibling call
12729         a barrier as well.
12731         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
12732         successfully back substituting a reg.
12734 2018-02-12  Richard Biener  <rguenther@suse.de>
12736         PR tree-optimization/84037
12737         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
12738         parameter, move visited init to caller.
12739         (vect_slp_analyze_operations): Separate cost from validity
12740         check, initialize visited once for all instances.
12741         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
12742         for all instances.
12743         * tree-vect-stmts.c (vect_model_simple_cost): Make early
12744         out an assert.
12745         (vect_model_promotion_demotion_cost): Likewise.
12746         (vectorizable_bswap): Guard cost modeling with !slp_node
12747         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
12748         SLP stmts.
12749         (vectorizable_call): Likewise.
12750         (vectorizable_conversion): Likewise.
12751         (vectorizable_assignment): Likewise.
12752         (vectorizable_shift): Likewise.
12753         (vectorizable_operation): Likewise.
12754         (vectorizable_store): Likewise.
12755         (vectorizable_load): Likewise.
12756         (vectorizable_condition): Likewise.
12757         (vectorizable_comparison): Likewise.
12759 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
12761         PR sanitizer/84307
12762         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
12763         (ASAN_MARK): Fix fnspec to account for return value, change pointer
12764         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
12766 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
12768         PR middle-end/83665
12769         * params.def (inline-min-speedup): Increase from 8 to 15.
12770         (max-inline-insns-auto): Decrease from 40 to 30.
12771         * ipa-split.c (consider_split): Add some buffer for function to
12772         be considered inlining candidate.
12773         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
12774         default values.
12776 2018-02-12  Richard Biener  <rguenther@suse.de>
12778         PR tree-optimization/84037
12779         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
12780         matched stmts if we cannot swap the non-matched ones.
12782 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
12784         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
12785         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
12786         _mm_maskz_scalef_round_ss): New intrinsics.
12787         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
12788         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
12789         __builtin_ia32_scalefss_round): Remove.
12790         (__builtin_ia32_scalefsd_mask_round,
12791         __builtin_ia32_scalefss_mask_round): New intrinsics.
12792         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
12793         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
12794         ((match_operand:VF_128 2 "<round_nimm_predicate>"
12795         "<round_constraint>")): Changed to ...
12796         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
12797         "<round_scalar_constraint>")): ... this.
12798         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
12799         %0, %1, %2<round_op3>}"): Changed to ...
12800         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
12801         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
12802         %2<round_scalar_mask_op3>}"): ... this.
12803         * config/i386/subst.md (round_scalar_nimm_predicate): New.
12805 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
12807         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
12808         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
12809         (_mm_maskz_sqrt_round_ss): New intrinsics.
12810         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
12811         (__builtin_ia32_sqrtsd_mask_round)
12812         (__builtin_ia32_sqrtss_mask_round): New builtins.
12813         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
12814         (__builtin_ia32_sqrtss_round): Remove.
12815         (__builtin_ia32_sqrtsd_mask_round)
12816         (__builtin_ia32_sqrtss_mask_round): New builtins.
12817         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
12818         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
12819         ((match_operand:VF_128 1 "vector_operand"
12820         "xBm,<round_constraint>")): Changed to ...
12821         ((match_operand:VF_128 1 "vector_operand"
12822         "xBm,<round_scalar_constraint>")): ... this.
12823         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
12824         %0, %2, %<iptr>1<round_op3>}): Changed to ...
12825         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
12826         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
12827         %<iptr>1<round_scalar_mask_op3>}): ... this.
12828         ((set_attr "prefix" "<round_prefix>")): Changed to ...
12829         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
12831 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
12833         PR target/84266
12834         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
12835         Cast vec_cmpeq result to correct type.
12836         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
12837         Cast vec_cmpgt result to correct type.
12839 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
12841         * final.c (final_scan_insn_1): Renamed from...
12842         (final_scan_insn): ... this.  New wrapper, to recover
12843         seen from the outermost call in recursive ones.
12844         * config/sparc/sparc.c (output_return): Drop seen from call.
12845         (output_sibcall): Likewise.
12846         * config/visium/visium.c (output_branch): Likewise.
12848 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
12850         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
12851         function label.
12853 2018-02-10  Alan Modra  <amodra@gmail.com>
12855         PR target/84300
12856         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
12857         Specify LR as an input.
12859 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
12861         PR sanitizer/83987
12862         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
12863         remove_member_access_dummy_vars): New functions.
12864         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
12865         lower_omp_1, execute_lower_omp): Use them.
12867         PR rtl-optimization/84308
12868         * shrink-wrap.c (spread_components): Release todo vector.
12870 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
12872         PR rtl-optimization/57193
12873         * ira-color.c (struct allocno_color_data): Add member
12874         conflict_allocno_hard_prefs.
12875         (update_conflict_allocno_hard_prefs): New.
12876         (bucket_allocno_compare_func): Add a preference based on
12877         conflict_allocno_hard_prefs.
12878         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
12879         (color_allocnos): Remove a dead code.  Initiate
12880         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
12882 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
12884         PR target/84226
12885         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
12886         constraint from =wa to wa.  Avoid a subreg on the output operand,
12887         instead use a pseudo and subreg it in a move.
12888         (p9_xxbrd_<mode>): Changed to ...
12889         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
12890         (p9_xxbrd_v2df): New expander.
12891         (p9_xxbrw_<mode>): Changed to ...
12892         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
12893         (p9_xxbrw_v4sf): New expander.
12895 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
12897         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
12899 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
12901         PR target/83926
12902         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
12903         multiply in 32-bit mode.
12904         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
12905         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
12906         mode.
12908 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
12910         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
12911         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
12912         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
12913         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
12915 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
12917         PR lto/84213
12918         * dwarf2out.c (is_trivial_indirect_ref): New function.
12919         (dwarf2out_late_global_decl): Do not generate a location
12920         attribute for variables that have a non-trivial DECL_VALUE_EXPR
12921         and that are not defined in the current unit.
12923 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
12925         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
12926         instead of a libcall for UNORDERED.
12928 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
12930         PR target/82641
12931         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
12932         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
12934 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12936         PR target/PR84295
12937         * config/s390/s390.c (s390_set_current_function): Invoke
12938         s390_indirect_branch_settings also if fndecl didn't change.
12940 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
12942         * config/rs6000/rs6000.md (blockage): Set length to zero.
12944 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
12946         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
12948 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
12950         PR sanitizer/84285
12951         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
12952         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
12953         -static-lib*san.
12955         PR debug/84252
12956         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
12957         PARALLEL incoming that failed vt_get_decl_and_offset check.
12959         PR middle-end/84237
12960         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
12961         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
12962         TREE_READONLY bit.
12963         (get_variable_section): For decls in named .bss* sections pass true as
12964         second argument to bss_initializer_p.
12966 2018-02-09  Marek Polacek  <polacek@redhat.com>
12967             Jakub Jelinek  <jakub@redhat.com>
12969         PR c++/83659
12970         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
12971         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
12972         Sync some changes from cxx_fold_indirect_ref.
12974 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
12976         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
12977         markers.
12978         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
12979         (BLOCK_INLINE_ENTRY_LABEL): New.
12980         (dwarf2out_var_location): Disregard inline entry markers.
12981         (inline_entry_data): New struct.
12982         (inline_entry_data_hasher): New hashtable type.
12983         (inline_entry_data_hasher::hash): New.
12984         (inline_entry_data_hasher::equal): New.
12985         (inline_entry_data_table): New variable.
12986         (add_high_low_attributes): Add DW_AT_entry_pc and
12987         DW_AT_GNU_entry_view attributes if a pending entry is found
12988         in inline_entry_data_table.  Add old entry_pc attribute only
12989         if debug nonbinding markers are disabled.
12990         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
12991         markers are enabled.
12992         (block_within_block_p, dwarf2out_inline_entry): New.
12993         (dwarf2out_finish): Check that no entries remained in
12994         inline_entry_data_table.
12995         * final.c (reemit_insn_block_notes): Handle inline entry notes.
12996         (final_scan_insn, notice_source_line): Likewise.
12997         (rest_of_clean_state): Skip inline entry markers.
12998         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
12999         markers.
13000         * gimple.c (gimple_build_debug_inline_entry): New.
13001         * gimple.h (enum gimple_debug_subcode): Add
13002         GIMPLE_DEBUG_INLINE_ENTRY.
13003         (gimple_build_debug_inline_entry): Declare.
13004         (gimple_debug_inline_entry_p): New.
13005         (gimple_debug_nonbind_marker_p): Adjust.
13006         * insn-notes.def (INLINE_ENTRY): New.
13007         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
13008         inline entry marker notes.
13009         (print_insn): Likewise.
13010         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
13011         (INSN_DEBUG_MARKER_KIND): Likewise.
13012         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
13013         * tree-inline.c (expand_call_inline): Build and insert
13014         debug_inline_entry stmt.
13015         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
13016         inline entry blocks early, if nonbind markers are enabled.
13017         (dump_scope_block): Dump fragment info.
13018         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
13019         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
13020         (gimple_build_debug_inline_entry): New.
13021         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
13022         Enable/disable inline entry points too.
13023         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
13024         (DEBUG_INSN): Describe inline entry markers.
13026         * common.opt (gvariable-location-views): New.
13027         (gvariable-location-views=incompat5): New.
13028         * config.in: Rebuilt.
13029         * configure: Rebuilt.
13030         * configure.ac: Test assembler for view support.
13031         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
13032         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
13033         * dwarf2out.c (var_loc_view): New typedef.
13034         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
13035         (dwarf2out_locviews_in_attribute): New.
13036         (dwarf2out_locviews_in_loclist): New.
13037         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
13038         (enum dw_line_info_opcode): Add LI_adv_address.
13039         (struct dw_line_info_table): Add view.
13040         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
13041         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
13042         (zero_view_p): New variable.
13043         (ZERO_VIEW_P): New macro.
13044         (output_asm_line_debug_info): New.
13045         (struct var_loc_node): Add view.
13046         (add_AT_view_list, AT_loc_list): New.
13047         (add_var_loc_to_decl): Add view param.  Test it against last.
13048         (new_loc_list): Add view params.  Record them.
13049         (AT_loc_list_ptr): Handle loc and view lists.
13050         (view_list_to_loc_list_val_node): New.
13051         (print_dw_val): Handle dw_val_class_view_list.
13052         (size_of_die): Likewise.
13053         (value_format): Likewise.
13054         (loc_list_has_views): New.
13055         (gen_llsym): Set vl_symbol too.
13056         (maybe_gen_llsym, skip_loc_list_entry): New.
13057         (dwarf2out_maybe_output_loclist_view_pair): New.
13058         (output_loc_list): Output view list or entries too.
13059         (output_view_list_offset): New.
13060         (output_die): Handle dw_val_class_view_list.
13061         (output_dwarf_version): New.
13062         (output_compilation_unit_header): Use it.
13063         (output_skeleton_debug_sections): Likewise.
13064         (output_rnglists, output_line_info): Likewise.
13065         (output_pubnames, output_aranges): Update version comments.
13066         (output_one_line_info_table): Output view numbers in asm comments.
13067         (dw_loc_list): Determine current endview, pass it to new_loc_list.
13068         Call maybe_gen_llsym.
13069         (loc_list_from_tree_1): Adjust.
13070         (add_AT_location_description): Create view list attribute if
13071         needed, check it's absent otherwise.
13072         (convert_cfa_to_fb_loc_list): Adjust.
13073         (maybe_emit_file): Call output_asm_line_debug_info for test.
13074         (dwarf2out_var_location): Reset views as needed.  Precompute
13075         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
13076         attribute.  Set view.
13077         (new_line_info_table): Reset next view.
13078         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
13079         (dwarf2out_source_line): Likewise.  Output view resets and labels to
13080         the assembler, or select appropriate line info opcodes.
13081         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
13082         (optimize_string_length): Catch it.  Adjust.
13083         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
13084         dw_val_class_view_list, and remove it if no longer needed.
13085         (hash_loc_list): Hash view numbers.
13086         (loc_list_hasher::equal): Compare them.
13087         (optimize_location_lists): Check whether a view list symbol is
13088         needed, and whether the locview attribute is present, and
13089         whether they match.  Remove the locview attribute if no longer
13090         needed.
13091         (index_location_lists): Call skip_loc_list_entry for test.
13092         (dwarf2out_finish): Call output_asm_line_debug_info for test.
13093         Use output_dwarf_version.
13094         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
13095         (struct dw_val_node): Add val_view_list.
13096         * final.c (SEEN_NEXT_VIEW): New.
13097         (set_next_view_needed): New.
13098         (clear_next_view_needed): New.
13099         (maybe_output_next_view): New.
13100         (final_start_function): Rename to...
13101         (final_start_function_1): ... this.  Take pointer to FIRST,
13102         add SEEN parameter.  Emit param bindings in the initial view.
13103         (final_start_function): Reintroduce SEEN-less interface.
13104         (final): Rename to...
13105         (final_1): ... this.  Take SEEN parameter.  Output final pending
13106         next view at the end.
13107         (final): Reintroduce seen-less interface.
13108         (final_scan_insn): Output pending next view before switching
13109         sections or ending a block.  Mark the next view as needed when
13110         outputting variable locations.  Notify debug backend of section
13111         changes, and of location view changes.
13112         (rest_of_handle_final): Adjust.
13113         * toplev.c (process_options): Autodetect value for debug variable
13114         location views option.  Warn on incompat5 without -gdwarf-5.
13115         * doc/invoke.texi (gvariable-location-views): New.
13116         (gvariable-location-views=incompat5): New.
13117         (gno-variable-location-views): New.
13119 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
13121         PR tree-optimization/84136
13122         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
13123         that the result of find_edge is non-NULL.
13125 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
13127         PR target/83008
13128         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
13129         storing integer register in SImode.  Fix cost of 256 and 512
13130         byte aligned SSE register store.
13132 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
13134         * config/i386/i386.c (ix86_multiplication_cost): Fix
13135         multiplication cost for TARGET_AVX512DQ.
13137 2018-02-08  Marek Polacek  <polacek@redhat.com>
13139         PR tree-optimization/84238
13140         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
13141         get_range_strlen.
13143 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13145         PR tree-optimization/84265
13146         * tree-vect-stmts.c (vectorizable_store): Don't treat
13147         VMAT_CONTIGUOUS accesses as grouped.
13148         (vectorizable_load): Likewise.
13150 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13152         PR tree-optimization/81635
13153         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
13154         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
13155         (test_round_for_mask): New functions.
13156         (wide_int_cc_tests): Call test_round_for_mask.
13157         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
13158         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
13159         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
13160         range returned by get_range_info.
13162 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
13164         PR ipa/81360
13165         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
13166         * symtab.c: Include builtins.h
13167         (symtab_node::output_to_lto_symbol_table_p): Move here
13168         from lto-streamer-out.c:output_symbol_p.
13169         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
13170         (output_symbol_p): Move all logic to symtab.c
13171         (produce_symtab): Update.
13173 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13175         * config/s390/s390-opts.h (enum indirect_branch): Define.
13176         * config/s390/s390-protos.h (s390_return_addr_from_memory)
13177         (s390_indirect_branch_via_thunk)
13178         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
13179         (enum s390_indirect_branch_type): Define.
13180         * config/s390/s390.c (struct s390_frame_layout, struct
13181         machine_function): Remove.
13182         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
13183         (indirect_branch_table_label_no, indirect_branch_table_name):
13184         Define variables.
13185         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
13186         (enum s390_indirect_branch_option): Define.
13187         (s390_return_addr_from_memory): New function.
13188         (s390_handle_string_attribute): New function.
13189         (s390_attribute_table): Add new attribute handler.
13190         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
13191         (s390_indirect_branch_via_thunk): New function.
13192         (s390_indirect_branch_via_inline_thunk): New function.
13193         (s390_function_ok_for_sibcall): When jumping via thunk disallow
13194         sibling call optimization for non z10 compiles.
13195         (s390_emit_call): Force indirect branch target to be a single
13196         register.  Add r1 clobber for non-z10 compiles.
13197         (s390_emit_epilogue): Emit return jump via return_use expander.
13198         (s390_reorg): Handle JUMP_INSNs as execute targets.
13199         (s390_option_override_internal): Perform validity checks for the
13200         new command line options.
13201         (s390_indirect_branch_attrvalue): New function.
13202         (s390_indirect_branch_settings): New function.
13203         (s390_set_current_function): Invoke s390_indirect_branch_settings.
13204         (s390_output_indirect_thunk_function):  New function.
13205         (s390_code_end): Implement target hook.
13206         (s390_case_values_threshold): Implement target hook.
13207         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
13208         macros.
13209         * config/s390/s390.h (struct s390_frame_layout)
13210         (struct machine_function): Move here from s390.c.
13211         (TARGET_INDIRECT_BRANCH_NOBP_RET)
13212         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
13213         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
13214         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
13215         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
13216         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
13217         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
13218         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
13219         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
13220         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
13221         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
13222         (mnemonic attribute): Add values which aren't recognized
13223         automatically.
13224         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
13225         pattern for branch conversion.  Fix mnemonic attribute.
13226         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
13227         indirect branch via thunk if requested.
13228         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
13229         ("*indirect_jump"): Disable for branch conversion using out of
13230         line thunks.
13231         ("indirect_jump_via_thunk<mode>_z10")
13232         ("indirect_jump_via_thunk<mode>")
13233         ("indirect_jump_via_inlinethunk<mode>_z10")
13234         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
13235         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
13236         ("casesi_jump_via_inlinethunk<mode>_z10")
13237         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
13238         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
13239         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
13240         ("*indirect2_jump"): Disable for branch conversion.
13241         ("casesi_jump"): Turn into expander and expand patterns for branch
13242         conversion.
13243         ("return_use"): New expander.
13244         ("*return"): Emit return via thunk and rename it to ...
13245         ("*return<mode>"): ... this one.
13246         * config/s390/s390.opt: Add new options and and enum for the
13247         option values.
13249 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
13251         * lra-constraints.c (match_reload): Unconditionally use
13252         gen_lowpart_SUBREG, rather than selecting between that
13253         and equivalent gen_rtx_SUBREG code.
13255 2018-02-08  Richard Biener  <rguenther@suse.de>
13257         PR tree-optimization/84233
13258         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13259         changed flag instead of boguously re-using phi_inserted.
13261 2018-02-08  Martin Jambor  <mjambor@suse.cz>
13263         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13264         static local variables.
13266 2018-02-08  Richard Biener  <rguenther@suse.de>
13268         PR tree-optimization/84278
13269         * tree-vect-stmts.c (vectorizable_store): When looking for
13270         smaller vector types to perform grouped strided loads/stores
13271         make sure the mode is supported by the target.
13272         (vectorizable_load): Likewise.
13274 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13276         * config/aarch64/aarch64.c (aarch64_components_for_bb):
13277         Increase LDP/STP opportunities by adding adjacent callee-saves.
13279 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
13281         PR rtl-optimization/84068
13282         PR rtl-optimization/83459
13283         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13285 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
13287         PR tree-optimization/84224
13288         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13289         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13290         non-zero arguments.
13292 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
13294         PR target/84113
13295         * config/rs6000/altivec.md (*restore_world): Remove LR use.
13296         * config/rs6000/predicates.md (restore_world_operation): Adjust op
13297         count, remove one USE.
13299 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
13301         * doc/install.texi (Configuration): Document the
13302         --with-long-double-format={ibm,ieee} PowerPC configuration
13303         options.
13305         PR target/84154
13306         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13307         Convert from define_expand to be define_insn_and_split.  Rework
13308         float/double/_Float128 conversions to QI/HI/SImode to work with
13309         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
13310         conversions to QI/HImode types did a store and then a load to
13311         truncate the value.  For conversions to VSX registers, don't split
13312         the insn, instead emit the code directly.  Use the code iterator
13313         any_fix to combine signed and unsigned conversions.
13314         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13315         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13316         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13317         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13318         (fix_<mode>di2_hw): Likewise.
13319         (fixuns_<mode>di2_hw): Likewise.
13320         (fix_<mode>si2_hw): Likewise.
13321         (fixuns_<mode>si2_hw): Likewise.
13322         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13323         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13324         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13325         fix<uns>_trunc<SFDF:mode>si2_p8.
13326         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13327         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13328         (fix<uns>_<mode>_mem): Likewise.
13329         (fctiw<u>z_<mode>_mem): Likewise.
13330         (fix<uns>_<mode>_mem): Likewise.
13331         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13332         the register allocator from doing a direct move to the GPRs to do
13333         a store, and instead use the ISA 3.0 store byte/half-word from
13334         vector register instruction.  For IEEE 128-bit floating point,
13335         also optimize stores of 32-bit ints.
13336         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13338 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
13340         * genextract.c (push_pathstr_operand): New function to support
13341         [a-zA-Z].
13342         (walk_rtx): Call push_pathstr_operand.
13343         (print_path): Support [a-zA-Z].
13345 2018-02-07  Richard Biener  <rguenther@suse.de>
13347         PR tree-optimization/84037
13348         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13349         (cse_and_gimplify_to_preheader): Declare.
13350         (vect_get_place_in_interleaving_chain): Likewise.
13351         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13352         ivexpr_map.
13353         (_loop_vec_info::~_loop_vec_info): Delete it.
13354         (cse_and_gimplify_to_preheader): New function.
13355         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13356         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13357         (vectorizable_load): Likewise.  For grouped stores always base
13358         the IV on the first element.
13359         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13360         condition before gimplifying.
13362 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13364         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13365         *DIV_EXPR and *MOD_EXPR.
13367 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
13369         PR target/84248
13370         * config/i386/i386.c (ix86_option_override_internal): Mask out
13371         the CF_SET bit when checking -fcf-protection.
13373 2018-02-07  Tom de Vries  <tom@codesourcery.com>
13375         PR libgomp/84217
13376         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13377         enough.
13379 2018-02-07  Richard Biener  <rguenther@suse.de>
13381         PR tree-optimization/84204
13382         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13383         this place.
13385         PR tree-optimization/84205
13386         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13387         special-case isl_ast_op_zdiv_r.
13389         PR tree-optimization/84223
13390         * graphite-scop-detection.c (gather_bbs::before_dom_children):
13391         Only add conditions from within the region.
13392         (gather_bbs::after_dom_children): Adjust.
13394 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
13396         PR target/84209
13397         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13398         * config/avr/avr.md: Only post-reload split REG-REG moves if
13399         either register is GENERAL_REG_P.
13401 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
13403         PR tree-optimization/84235
13404         * tree-ssa-scopedtables.c
13405         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13406         if the subtraction is performed in floating point type where NaNs are
13407         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13408         build 1.  Formatting fix.
13410 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
13412         PR target/84146
13413         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13414         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13415         and skip it regardless of bb boundaries.  Use CALL_P macro,
13416         don't test INSN_P (insn) together with CALL_P or JUMP_P check
13417         unnecessarily, formatting fix.
13419 2018-02-06  Michael Collison  <michael.collison@arm.com>
13421         * config/arm/thumb2.md:
13422         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13423         (*thumb_mov_notscc): Ditto.
13425 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
13427         PR target/84154
13428         * config/rs6000/rs6000.md (su code attribute): Use "u" for
13429         unsigned_fix, not "s".
13431 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13433         * configure.ac (gcc_fn_eh_frame_ro): New function.
13434         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13435         correct .eh_frame permissions.
13436         * configure: Regenerate.
13438 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
13440         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13441         irrelevant options.
13443 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13445         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13446         Display warning message for -mno-speculate-indirect-jumps.
13448 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
13450         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
13451         Undocumented.
13452         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
13454 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
13456         PR tree-optimization/84225
13457         * tree-eh.c (find_trapping_overflow): Only call
13458         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
13460 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13462         PR target/84145
13463         * config/i386/i386.c: Reimplement the check of possible options
13464         -mibt/-mshstk conbination. Change error messages.
13465         * doc/invoke.texi: Fix a typo: remove extra '='.
13467 2018-02-06  Marek Polacek  <polacek@redhat.com>
13469         PR tree-optimization/84228
13470         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
13472 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
13474         PR target/82641
13475         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
13476         emitted arch directives.
13477         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
13478         __ARM_FEATURE_COPROC before changing architectures.
13480 2018-02-06  Richard Biener  <rguenther@suse.de>
13482         * config/i386/i386.c (print_reg): Fix typo.
13483         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
13485 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
13487         * configure: Regenerate.
13489 2018-02-05  Martin Sebor  <msebor@redhat.com>
13491         PR tree-optimization/83369
13492         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
13493         inlining context.
13495 2018-02-05  Martin Liska  <mliska@suse.cz>
13497         * doc/invoke.texi: Cherry-pick upstream r323995.
13499 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
13501         * ira.c (ira_init_register_move_cost): Adjust comment.
13503 2018-02-05  Martin Liska  <mliska@suse.cz>
13505         PR gcov-profile/84137
13506         * doc/gcov.texi: Fix typo in documentation.
13508 2018-02-05  Martin Liska  <mliska@suse.cz>
13510         PR gcov-profile/83879
13511         * doc/gcov.texi: Document necessity of --dynamic-list-data when
13512         using dlopen functionality.
13514 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
13516         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
13517         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
13518         _mm_maskz_range_ss, _mm_mask_range_round_ss,
13519         _mm_maskz_range_round_ss): New intrinsics.
13520         (__builtin_ia32_rangesd128_round)
13521         (__builtin_ia32_rangess128_round): Remove.
13522         (__builtin_ia32_rangesd128_mask_round,
13523         __builtin_ia32_rangess128_mask_round): New builtins.
13524         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
13525         __builtin_ia32_rangess128_round): Remove.
13526         (__builtin_ia32_rangesd128_mask_round,
13527         __builtin_ia32_rangess128_mask_round): New builtins.
13528         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
13529         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
13530         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
13531         "<round_saeonly_constraint>")): Changed to ...
13532         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
13533         "<round_saeonly_scalar_constraint>")): ... this.
13534         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13535         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
13536         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
13537         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
13538         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
13540 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
13542         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
13543         options.
13544         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
13545         Remove all values except native, 8540 and 8548.
13547 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
13549         * config/i386/i386.c (ix86_output_function_return): Pass
13550         INVALID_REGNUM, instead of -1, as invalid register number to
13551         indirect_thunk_name and output_indirect_thunk.
13553 2018-02-02  Julia Koval  <julia.koval@intel.com>
13555         * config.gcc: Add -march=icelake.
13556         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
13557         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
13558         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
13559         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
13560         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
13561         (processor_target_table): Add icelake.
13562         (ix86_option_override_internal): Handle new PTAs.
13563         (get_builtin_code_for_version): Handle icelake.
13564         (M_INTEL_COREI7_ICELAKE): New.
13565         (fold_builtin_cpu): Handle icelake.
13566         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
13567         * doc/invoke.texi: Add -march=icelake.
13569 2018-02-02  Julia Koval  <julia.koval@intel.com>
13571         * config/i386/i386.c (ix86_option_override_internal): Change flags type
13572         to wide_int_bitmask.
13573         * wide-int-bitmask.h: New.
13575 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
13577         PR target/84066
13578         * config/i386/i386.md: Replace Pmode with word_mode in
13579         builtin_setjmp_setup and builtin_longjmp to support x32.
13581 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
13583         PR target/56010
13584         PR target/83743
13585         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
13586         #include "opts.h".
13587         (rs6000_supported_cpu_names): New static variable.
13588         (linux_cpu_translation_table): Likewise.
13589         (elf_platform) <cpu>: Define new static variable and use it.
13590         Translate kernel AT_PLATFORM name to canonical name if needed.
13591         Error if platform name is unknown.
13593 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
13595         PR target/84089
13596         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
13598 2018-02-01  Jeff Law  <law@redhat.com>
13600         PR target/84128
13601         * config/i386/i386.c (release_scratch_register_on_entry): Add new
13602         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
13603         the scratch if RELEASE_VIA_POP is false.
13604         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
13605         If we have to save a temporary register, decrement SIZE appropriately.
13606         Pass new arguments to release_scratch_register_on_entry.
13607         (ix86_adjust_stack_and_probe): Likewise.
13608         (ix86_emit_probe_stack_range): Pass new arguments to
13609         release_scratch_register_on_entry.
13611 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
13613         PR rtl-optimization/84157
13614         * combine.c (change_zero_ext): Use REG_P predicate in
13615         front of HARD_REGISTER_P predicate.
13617 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
13619         * config/avr/avr.c (avr_option_override): Move disabling of
13620         -fdelete-null-pointer-checks to...
13621         * common/config/avr/avr-common.c (avr_option_optimization_table):
13622         ...here.
13624 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13626         PR tree-optimization/81635
13627         * tree-data-ref.c (split_constant_offset_1): For types that
13628         wrap on overflow, try to use range info to prove that wrapping
13629         cannot occur.
13631 2018-02-01  Renlin Li  <renlin.li@arm.com>
13633         PR target/83370
13634         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
13635         TAILCALL_ADDR_REGS.
13636         (aarch64_register_move_cost): Likewise.
13637         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
13638         TAILCALL_ADDR_REGS.
13639         (REG_CLASS_NAMES): Likewise.
13640         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
13641         TAILCALL_ADDR_REGS. Remove IP registers.
13642         * config/aarch64/aarch64.md (Ucs): Update register constraint.
13644 2018-02-01  Richard Biener  <rguenther@suse.de>
13646         * domwalk.h (dom_walker::dom_walker): Add additional constructor
13647         for specifying RPO order and allow NULL for that.
13648         * domwalk.c (dom_walker::dom_walker): Likewise.
13649         (dom_walker::walk): Handle NULL RPO order.
13650         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
13651         in RPO order.
13652         (rewrite_update_dom_walker): Likewise.
13653         (mark_def_dom_walker): Likewise.
13655 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13657         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
13658         (aarch64_maybe_expand_sve_subreg_move): Declare.
13659         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
13660         * config/aarch64/predicates.md (aarch64_any_register_operand): New
13661         predicate.
13662         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
13663         that are semantically a reverse operation.
13664         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
13665         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
13666         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
13667         functions.
13668         (aarch64_can_change_mode_class): For big-endian, forbid changes
13669         between two SVE modes if they have different element sizes.
13671 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13673         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
13674         the TImode handling for big-endian targets.
13676 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13678         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
13679         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
13680         not just bytes.
13681         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
13682         Remove BSWAP handing for big-endian targets and use the form of
13683         LD1RQ appropariate for the mode.
13685 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13687         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
13688         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
13689         duplicated element.
13691 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
13693         PR tearget/83845
13694         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
13695         check for operands that need to go through aarch64_sve_reload_be.
13697 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
13699         PR tree-optimization/81661
13700         PR tree-optimization/84117
13701         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
13702         * tree-eh.c: Include gimplify.h.
13703         (find_trapping_overflow, replace_trapping_overflow,
13704         rewrite_to_non_trapping_overflow): New functions.
13705         * tree-vect-loop.c: Include tree-eh.h.
13706         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
13707         * tree-data-ref.c: Include tree-eh.h.
13708         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
13710 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
13712         PR rtl-optimization/84123
13713         * combine.c (change_zero_ext): Check if hard register satisfies
13714         can_change_dest_mode before calling gen_lowpart_SUBREG.
13716 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
13718         PR target/82444
13719         * ira.c (ira_init_register_move_cost): Remove assert.
13721 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13723         PR rtl-optimization/84071
13724         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
13725         * doc/tm.texi: Regenerate.
13727 2018-01-31  Richard Biener  <rguenther@suse.de>
13729         PR tree-optimization/84132
13730         * tree-data-ref.c (analyze_miv_subscript): Properly
13731         check whether evolution_function_is_affine_multivariate_p
13732         before calling gcd_of_steps_may_divide_p.
13734 2018-01-31  Julia Koval  <julia.koval@intel.com>
13736         PR target/83618
13737         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
13738         * config/i386/i386.md (rdpid_rex64) New.
13739         (rdpid): Make 32bit only.
13741 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
13743         PR lto/84105
13744         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
13745         an IDENTIFIER_NODE for FUNCTION_TYPE's.
13747 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13749         Revert
13750         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
13752         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13754 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
13756         PR rtl-optimization/84071
13757         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
13758         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
13760 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
13762         * config/arc/arc.c (arc_handle_aux_attribute): New function.
13763         (arc_attribute_table): Add 'aux' attribute.
13764         (arc_in_small_data_p): Consider aux like variables.
13765         (arc_is_aux_reg_p): New function.
13766         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
13767         (arc_get_aux_arg): New function.
13768         (prepare_move_operands): Handle aux-register access.
13769         (arc_handle_aux_attribute): New function.
13770         * doc/extend.texi (ARC Variable attributes): Add subsection.
13772 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
13774         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
13775         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
13776         (arc_attribute_table): Add 'uncached' attribute.
13777         (arc_print_operand): Print '.di' flag for uncached memory
13778         accesses.
13779         (arc_in_small_data_p): Do not consider for small data the uncached
13780         types.
13781         (arc_is_uncached_mem_p): New function.
13782         * config/arc/predicates.md (compact_store_memory_operand): Check
13783         for uncached memory accesses.
13784         (nonvol_nonimm_operand): Likewise.
13785         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
13787 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
13789         PR c/84100
13790         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
13791         falign-loops=): Add Optimization flag.
13793 2018-01-30  Jeff Law  <law@redhat.com>
13795         PR target/84064
13796         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
13797         INT_REGISTERS_SAVED.  Check it prior to calling
13798         get_scratch_register_on_entry.
13799         (ix86_adjust_stack_and_probe): Similarly.
13800         (ix86_emit_probe_stack_range): Similarly.
13801         (ix86_expand_prologue): Corresponding changes.
13803 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13805         PR target/40411
13806         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
13807         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
13809 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
13811         PR target/84112
13812         * lra-constraints.c (curr_insn_transform): Process AND in the
13813         address.
13815 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
13817         PR rtl-optimization/83986
13818         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
13819         dependence against last_pending_memory_flush in addition to
13820         pending_jump_insns.
13822 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
13824         PR tree-optimization/81611
13825         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
13826         copies.
13828 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13830         PR target/83758
13831         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
13832         a reg rtx.
13834 2018-01-30  Richard Biener  <rguenther@suse.de>
13835             Jakub Jelinek  <jakub@redhat.com>
13837         PR tree-optimization/84111
13838         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
13839         inner loops added during recursion, as they don't have up-to-date
13840         SSA form.
13842 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
13844         PR ipa/81360
13845         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
13846         (can_inline_edge_by_limits_p): ... here.
13847         (can_early_inline_edge_p, check_callers,
13848         update_caller_keys, update_callee_keys, recursive_inlining,
13849         add_new_edges_to_heap, speculation_useful_p,
13850         inline_small_functions,
13851         inline_small_functions, flatten_function,
13852         inline_to_all_callers_1): Update.
13854 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
13856         * profile-count.c (profile_count::combine_with_ipa_count): Handle
13857         zeros correctly.
13859 2018-01-30  Richard Biener  <rguenther@suse.de>
13861         PR tree-optimization/83008
13862         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
13863         invariant and constant vector uses in stmts when they need
13864         more than one stmt.
13866 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13868         PR bootstrap/84017
13869         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
13870         * configure: Regenerate.
13872 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13874         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
13875         pattern.
13876         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
13877         Use gen_rtx_REG rather than gen_lowpart.
13879 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13881         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
13882         rather than 0 when creating partial subregs.
13884 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
13886         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
13887         of usage.
13889 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
13891         PR target/81550
13892         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
13893         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
13894         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
13895         flags.  This restores the settings used before the 2017-07-24.
13896         Turning off pre increment/decrement/modify allows IVOPTS to
13897         optimize DF/SF loops where the index is an int.
13899 2018-01-29  Richard Biener  <rguenther@suse.de>
13900             Kelvin Nilsen  <kelvin@gcc.gnu.org>
13902         PR bootstrap/80867
13903         * tree-vect-stmts.c (vectorizable_call): Don't call
13904         targetm.vectorize_builtin_md_vectorized_function if callee is
13905         NULL.
13907 2018-01-22  Carl Love  <cel@us.ibm.com>
13909         * doc/extend.tex: Fix typo in second arg in
13910         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
13912 2018-01-29  Richard Biener  <rguenther@suse.de>
13914         PR tree-optimization/84086
13915         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
13916         (flush_ssaname_freelist): When SSA names were released reset
13917         the SCEV hash table.
13919 2018-01-29  Richard Biener  <rguenther@suse.de>
13921         PR tree-optimization/84057
13922         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
13923         removed paths when removing edges.
13925 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
13927         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
13928         -mfunction-return=@var{choice}.
13930 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13932         PR diagnostic/84034
13933         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
13934         Handle CR like TAB.
13935         (layout::print_source_line): Likewise.
13936         (test_get_line_width_without_trailing_whitespace): Add test cases.
13938 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
13940         PR middle-end/84040
13941         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
13942         debug insns.
13944 2018-01-26  Jim Wilson  <jimw@sifive.com>
13946         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
13948         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
13949         specified.
13951 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13953         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
13954         and CMP + SUB-immediate -> SUBS.
13956 2018-01-26  Martin Sebor  <msebor@redhat.com>
13958         PR tree-optimization/83896
13959         * tree-ssa-strlen.c (get_string_len): Rename...
13960         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
13961         Avoid assuming length is constant.
13962         (handle_char_store): Use HOST_WIDE_INT for string length.
13964 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
13966         PR target/81763
13967         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
13968         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
13970 2018-01-26  Richard Biener  <rguenther@suse.de>
13972         PR rtl-optimization/84003
13973         * dse.c (record_store): Only record redundant stores when
13974         the earlier store aliases at least all accesses the later one does.
13976 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
13978         PR rtl-optimization/83985
13979         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
13980         REG_CFA_RESTORE insns.
13981         (delete_unmarked_insns): Don't ignore separate shrink wrapping
13982         REG_CFA_RESTORE insns here.
13984         PR c/83989
13985         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
13986         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
13988 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
13990         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
13991         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
13992         (arc_init): Likewise.
13993         (arc_override_options): Likewise.
13994         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
13995         value.
13996         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
13997         support.
13998         * config/arc/arc.h (TARGET_DBNZ): Define.
13999         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
14000         properly set the tune attribute.
14001         (dbnz): Use TARGET_DBNZ guard.
14002         * config/arc/arc.opt (mtune): Add core3 option.
14004 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14006         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
14007         recognize new pic like addresses.
14008         (arc_delegitimize_address): Clean up.
14010 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14012         * config/arc/arc-arches.def: Option mrf16 valid for all
14013         architectures.
14014         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
14015         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
14016         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
14017         * config/arc/arc-tables.opt: Regenerate.
14018         * config/arc/arc.c (arc_conditional_register_usage): Handle
14019         reduced register file case.
14020         (arc_file_start): Set must have build attributes.
14021         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
14022         mrf16 option value.
14023         * config/arc/arc.opt (mrf16): Add new option.
14024         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
14025         * config/arc/genmultilib.awk: Handle new mrf16 option.
14026         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
14027         * config/arc/t-multilib: Regenerate.
14028         * doc/invoke.texi (ARC Options): Document mrf16 option.
14030 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14032         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
14033         * config/arc/arc.c (arc_handle_secure_attribute): New function.
14034         (arc_attribute_table): Add 'secure_call' attribute.
14035         (arc_print_operand): Print secure call operand.
14036         (arc_function_ok_for_sibcall): Don't optimize tail calls when
14037         secure.
14038         (arc_is_secure_call_p): New function.  * config/arc/arc.md
14039         (call_i): Add support for sjli instruction.
14040         (call_value_i): Likewise.
14041         * config/arc/constraints.md (Csc): New constraint.
14043 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
14044             John Eric Martin  <John.Martin@emmicro-us.com>
14046         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
14047         * config/arc/arc.c (_arc_jli_section): New struct.
14048         (arc_jli_section): New type.
14049         (rc_jli_sections): New static variable.
14050         (arc_handle_jli_attribute): New function.
14051         (arc_attribute_table): Add jli_always and jli_fixed attribute.
14052         (arc_file_end): New function.
14053         (TARGET_ASM_FILE_END): Define.
14054         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
14055         (arc_add_jli_section): New function.
14056         (jli_call_scan): Likewise.
14057         (arc_reorg): Call jli_call_scan.
14058         (arc_output_addsi): Remove 'S' from printing asm operand.
14059         (arc_is_jli_call_p): New function.
14060         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
14061         operand.
14062         (movhi_insn): Likewise.
14063         (movsi_insn): Likewise.
14064         (movsi_set_cc_insn): Likewise.
14065         (loadqi_update): Likewise.
14066         (load_zeroextendqisi_update): Likewise.
14067         (load_signextendqisi_update): Likewise.
14068         (loadhi_update): Likewise.
14069         (load_zeroextendhisi_update): Likewise.
14070         (load_signextendhisi_update): Likewise.
14071         (loadsi_update): Likewise.
14072         (loadsf_update): Likewise.
14073         (movsicc_insn): Likewise.
14074         (bset_insn): Likewise.
14075         (bxor_insn): Likewise.
14076         (bclr_insn): Likewise.
14077         (bmsk_insn): Likewise.
14078         (bicsi3_insn): Likewise.
14079         (cmpsi_cc_c_insn): Likewise.
14080         (movsi_ne): Likewise.
14081         (movsi_cond_exec): Likewise.
14082         (clrsbsi2): Likewise.
14083         (norm_f): Likewise.
14084         (normw): Likewise.
14085         (swap): Likewise.
14086         (divaw): Likewise.
14087         (flag): Likewise.
14088         (sr): Likewise.
14089         (kflag): Likewise.
14090         (ffs): Likewise.
14091         (ffs_f): Likewise.
14092         (fls): Likewise.
14093         (call_i): Remove 'S' asm letter, add jli instruction.
14094         (call_value_i): Likewise.
14095         * config/arc/arc.op (mjli-always): New option.
14096         * config/arc/constraints.md (Cji): New constraint.
14097         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
14098         operand.
14099         (subsf3_fpx): Likewise.
14100         (mulsf3_fpx): Likewise.
14101         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
14102         asm operand.
14103         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
14104         function attrbutes.
14105         * doc/invoke.texi (ARC): Document mjli-always option.
14107 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
14109         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
14110         avoid addition with 0 and use incw and decw where possible.
14112 2018-01-26  Richard Biener  <rguenther@suse.de>
14114         PR tree-optimization/81082
14115         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
14116         association if it requires casting to unsigned.
14117         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
14118         from fold_plusminus_mult_expr to catch important cases late when
14119         range info is available.
14121 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14123         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
14124         * configure.ac (hidden_linkonce): New test.
14125         * configure: Regenerate.
14126         * config.in: Regenerate.
14128 2018-01-26  Julia Koval  <julia.koval@intel.com>
14130         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
14131         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
14132         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
14133         _mm_mask_bitshuffle_epi64_mask): Fix type.
14134         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
14135         USI_FTYPE_V4DI_V4DI_USI): Remove.
14136         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
14137         __builtin_ia32_vpshufbitqmb256_mask,
14138         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
14139         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
14140         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
14142 2018-01-26  Alan Modra  <amodra@gmail.com>
14144         PR target/84033
14145         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
14146         UNSPEC_VBPERMQ.  Sort other unspecs.
14148 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
14150         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
14152 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
14154         PR middle-end/83055
14155         * predict.c (drop_profile): Do not push/pop cfun; update also
14156         node->count.
14157         (handle_missing_profiles): Fix logic looking for zero profiles.
14159 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
14161         PR middle-end/83977
14162         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
14163         on functions with #pragma omp declare simd or functions with simd
14164         attribute.
14165         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
14166         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
14167         Remove trailing \n from warning_at calls.
14169 2018-01-25  Tom de Vries  <tom@codesourcery.com>
14171         PR target/84028
14172         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14173         for neutered workers.
14175 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
14177         PR target/68467
14178         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
14179         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
14181 2018-01-24  Jeff Law  <law@redhat.com>
14183         PR target/83994
14184         * i386.c (get_probe_interval): Move to earlier point.
14185         (ix86_compute_frame_layout): If -fstack-clash-protection and
14186         the frame is larger than the probe interval, then use pushes
14187         to save registers rather than reg->mem moves.
14188         (ix86_expand_prologue): Remove conditional for int_registers_saved
14189         assertion.
14191 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
14193         PR target/84014
14194         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
14195         min/max for never referenced object.
14197 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
14199         PR middle-end/83977
14200         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
14201         here.
14202         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
14203         attributes from DECL_ATTRIBUTES (decl) without affecting
14204         DECL_ATTRIBUTES (current_function_decl).
14205         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
14206         functions with non-NULL DECL_ABSTRACT_ORIGIN.
14208 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
14210         PR tree-optimization/83979
14211         * fold-const.c (fold_comparison): Use constant_boolean_node
14212         instead of boolean_{true,false}_node.
14214 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
14216         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
14217         with zero counts.
14219 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14221         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14222         Simplify the clause that sets the length attribute.
14223         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14224         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
14225         clause that sets the length attribute.
14226         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14228 2018-01-24  Tom de Vries  <tom@codesourcery.com>
14230         PR target/83589
14231         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
14232         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
14233         Add strict parameter.
14234         (prevent_branch_around_nothing): Insert dummy insn between branch to
14235         label and label with no ptx insn inbetween.
14236         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
14238 2018-01-24  Tom de Vries  <tom@codesourcery.com>
14240         PR target/81352
14241         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14242         for neutered threads in warp.
14243         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14245 2018-01-24  Richard Biener  <rguenther@suse.de>
14247         PR tree-optimization/83176
14248         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14249         operands.
14251 2018-01-24  Richard Biener  <rguenther@suse.de>
14253         PR tree-optimization/82819
14254         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14255         code generating pluses that are no-ops in the target precision.
14257 2018-01-24  Richard Biener  <rguenther@suse.de>
14259         PR middle-end/84000
14260         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14262 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14264         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14265         to merge probabilities.
14266         * predict.c (probably_never_executed): Also mark as cold functions
14267         with global 0 profile and guessed local profile.
14268         * profile-count.c (profile_probability::combine_with_count): New
14269         member function.
14270         * profile-count.h (profile_probability::operator*,
14271         profile_probability::operator*=, profile_probability::operator/,
14272         profile_probability::operator/=): Reduce precision to adjusted
14273         and set value to guessed on contradictory divisions.
14274         (profile_probability::combine_with_freq): Remove.
14275         (profile_probability::combine_wiht_count): Declare.
14276         (profile_count::force_nonzero):: Set to adjusted.
14277         (profile_count::probability_in):: Set quality to adjusted.
14278         * tree-ssa-tail-merge.c (replace_block_by): Use
14279         combine_with_count.
14281 2018-01-23  Andrew Waterman  <andrew@sifive.com>
14282             Jim Wilson  <jimw@sifive.com>
14284         * config/riscv/riscv.c (riscv_stack_boundary): New.
14285         (riscv_option_override): Set riscv_stack_boundary.  Handle
14286         riscv_preferred_stack_boundary_arg.
14287         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14288         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14289         (STACK_BOUNDARY): Set to riscv_stack_boundary.
14290         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14291         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14292         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14294 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
14296         PR target/83905
14297         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14298         of struct ix86_frame.
14299         (ix86_expand_epilogue): Likewise.  Add a local variable for
14300         the reg_save_offset field in struct ix86_frame.
14302 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
14304         PR tree-optimization/82604
14305         * tree-loop-distribution.c (enum partition_kind): New enum item
14306         PKIND_PARTIAL_MEMSET.
14307         (partition_builtin_p): Support above new enum item.
14308         (generate_code_for_partition): Ditto.
14309         (compute_access_range): Differentiate cases that equality can be
14310         proven at all loops, the innermost loops or no loops.
14311         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14312         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
14313         (finalize_partitions, distribute_loop): Don't fuse partition of
14314         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14315         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14316         parloop is enabled.
14318 2018-01-23  Martin Liska  <mliska@suse.cz>
14320         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14321         order to ignore the predictor.
14322         (PRED_POLYMORPHIC_CALL): Likewise.
14323         (PRED_RECURSIVE_CALL): Likewise.
14325 2018-01-23  Martin Liska  <mliska@suse.cz>
14327         * tree-profile.c (tree_profiling): Print function header to
14328         aware reader which function we are working on.
14329         * value-prof.c (gimple_find_values_to_profile): Do not print
14330         not interesting value histograms.
14332 2018-01-23  Martin Liska  <mliska@suse.cz>
14334         * profile-count.h (enum profile_quality): Add
14335         profile_uninitialized as the first value. Do not number values
14336         as they are zero based.
14337         (profile_count::verify): Update sanity check.
14338         (profile_probability::verify): Likewise.
14340 2018-01-23  Nathan Sidwell  <nathan@acm.org>
14342         * doc/invoke.texi (ffor-scope): Deprecate.
14344 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14346         PR tree-optimization/83510
14347         * domwalk.c (set_all_edges_as_executable): New function.
14348         (dom_walker::dom_walker): Convert bool param
14349         "skip_unreachable_blocks" to enum reachability.  Move setup of
14350         edge flags to set_all_edges_as_executable and only do it when
14351         reachability is REACHABLE_BLOCKS.
14352         * domwalk.h (enum dom_walker::reachability): New enum.
14353         (dom_walker::dom_walker): Convert bool param
14354         "skip_unreachable_blocks" to enum reachability.
14355         (set_all_edges_as_executable): New decl.
14356         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
14357         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14358         "reachability".
14359         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14360         but converting true to REACHABLE_BLOCKS.
14361         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14362         * tree-vrp.c
14363         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14364         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14365         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14366         REACHABLE_BLOCKS.
14367         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14368         if check_all_array_refs will be called.
14370 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14372         * tree.c (selftest::test_location_wrappers): Add more test
14373         coverage.
14375 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
14377         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14378         (selftest::test_bit_in_range): Likewise.
14380 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14382         PR testsuite/83888
14383         * doc/sourcebuild.texi (vect_float): Say that the selector
14384         only describes the situation when -funsafe-math-optimizations is on.
14385         (vect_float_strict): Document.
14387 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
14389         PR tree-optimization/83965
14390         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14391         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14392         instead of checking only for a reduction.
14393         (vect_recog_widen_sum_pattern): Likewise.
14395 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14397         * predict.c (probably_never_executed): Only use precise profile info.
14398         (compute_function_frequency): Skip after inlining hack since we now
14399         have quality checking.
14401 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
14403         * profile-count.h (profile_probability::very_unlikely,
14404         profile_probability::unlikely, profile_probability::even): Set
14405         precision to guessed.
14407 2018-01-23  Richard Biener  <rguenther@suse.de>
14409         PR tree-optimization/83963
14410         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14411         Properly terminate dominator walk when crossing the exit edge not
14412         when visiting its source block.
14414 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
14416         PR c++/83918
14417         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14418         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14420 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
14422         PR tree-optimization/83957
14423         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
14424         semicolon after for body surrounded by braces.
14426         PR tree-optimization/83081
14427         * profile-count.h (profile_probability::split): New method.
14428         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14429         Use profile_probability::split.
14430         (do_compare_rtx_and_jump): Fix adjustment of probabilities
14431         when splitting a single conditional jump into 2.
14433 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
14435         PR tree-optimization/69452
14436         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14437         decl.
14439 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14441         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14442         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14443         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14445 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14447         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14448         declaration.
14449         * config/rl78/rl78.md (movdi): New define_expand.
14450         * config/rl78/rl78.c (rl78_split_movdi): New function.
14452 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
14454         PR target/83862
14455         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
14456         no longer used.
14457         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
14458         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
14459         128-bit to produce an UNSPEC move to get the double word with the
14460         signbit and then a shift directly to do signbit.
14461         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
14462         implementation with a new version that just does either a direct
14463         move or a regular move.  Move memory interface to separate insns.
14464         Move insns so they are next to the expander.
14465         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
14466         with signbit move.  Split big and little endian case.
14467         (signbit<mode>2_dm_mem_le): Likewise.
14468         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
14469         (signbit<mode>2_dm2): Likewise.
14471 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14473         * config/rl78/rl78.md (anddi3): New define_expand.
14475 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14477         * config/rl78/rl78.md (umindi3): New define_expand.
14479 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14481         * config/rl78/rl78.md (smindi3): New define_expand.
14483 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14485         * config/rl78/rl78.md (smaxdi3): New define_expand.
14487 2018-01-22  Carl Love  <cel@us.ibm.com>
14489         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
14490         LVX_V1TI): Add macro expansion.
14491         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
14492         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
14493         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
14494         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
14495         Change check to determine if the instruction is a byte reversing
14496         entry.  Fix typo in comment.
14497         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
14498         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
14499         Add def_builtin calls for new builtins.
14500         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
14501         Add define_insn expansion.
14503 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14505         * config/rl78/rl78.md (umaxdi3): New define_expand.
14507 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
14509         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
14510         for non-QImode registers.
14512 2018-01-22  Richard Biener  <rguenther@suse.de>
14514         PR tree-optimization/83963
14515         * graphite-scop-detection.c (scop_detection::get_sese): Delay
14516         including the loop exit block.
14517         (scop_detection::merge_sese): Likewise.
14518         (scop_detection::add_scop): Do it here instead.
14520 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14522         * doc/sourcebuild.texi (arm_softfloat): Document.
14524 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
14526         PR gcc/77734
14527         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
14528         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
14529         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
14531 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14532             David Edelsohn  <dje.gcc@gmail.com>
14534         PR target/83946
14535         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14536         Change "crset eq" to "crset 2".
14537         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14538         (*call_indirect_aix<mode>_nospec): Likewise.
14539         (*call_value_indirect_aix<mode>_nospec): Likewise.
14540         (*call_indirect_elfv2<mode>_nospec): Likewise.
14541         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
14542         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
14543         change assembly output from . to $.
14544         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14545         (indirect_jump<mode>_nospec): Change assembly output from . to $.
14546         (*tablejump<mode>_internal1_nospec): Likewise.
14548 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
14550         PR target/80870
14551         * config/sh/sh_optimize_sett_clrt.cc:
14552         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
14554 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
14556         PR tree-optimization/83940
14557         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
14558         offset_dt to vect_constant_def rather than vect_unknown_def_type.
14559         (vect_check_load_store_mask): Add a mask_dt_out parameter and
14560         use it to pass back the definition type.
14561         (vect_check_store_rhs): Likewise rhs_dt_out.
14562         (vect_build_gather_load_calls): Add a mask_dt argument and use
14563         it instead of a call to vect_is_simple_use.
14564         (vectorizable_store): Update calls to vect_check_load_store_mask
14565         and vect_check_store_rhs.  Use the dt returned by the latter instead
14566         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
14567         instead of calls to vect_is_simple_use.  Pass the scalar rather
14568         than the vector operand to vect_is_simple_use when handling
14569         second and subsequent copies of an rhs value.
14570         (vectorizable_load): Update calls to vect_check_load_store_mask
14571         and vect_build_gather_load_calls.  Use the cached mask_dt and
14572         gs_info.offset_dt instead of calls to vect_is_simple_use.
14574 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
14576         PR middle-end/83945
14577         * tree-emutls.c: Include gimplify.h.
14578         (lower_emutls_2): New function.
14579         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
14580         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
14581         it before further processing.
14583         PR target/83930
14584         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
14585         UINTVAL (trueop1) instead of INTVAL (op1).
14587 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
14589         PR debug/81570
14590         PR debug/83728
14591         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
14592         INCOMING_FRAME_SP_OFFSET if not defined.
14593         (scan_trace): Add ENTRY argument.  If true and
14594         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
14595         emit a note to adjust the CFA offset.
14596         (create_cfi_notes): Adjust scan_trace callers.
14597         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
14598         INCOMING_FRAME_SP_OFFSET in the CIE.
14599         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
14600         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
14601         Likewise.
14602         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
14603         * doc/tm.texi: Regenerated.
14605 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14607         PR rtl-optimization/83147
14608         * lra-constraints.c (remove_inheritance_pseudos): Use
14609         lra_substitute_pseudo_within_insn.
14611 2018-01-19  Tom de Vries  <tom@codesourcery.com>
14612             Cesar Philippidis  <cesar@codesourcery.com>
14614         PR target/83920
14615         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
14617 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
14619         PR target/83790
14620         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
14621         spaces for function labels.
14623 2018-01-19  Martin Liska  <mliska@suse.cz>
14625         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
14626         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
14627         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
14628         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
14629         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
14630         (PRED_CONST_RETURN): Change from 69 to 65.
14631         (PRED_NULL_RETURN): Change from 91 to 71.
14632         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
14633         (PRED_LOOP_GUARD): Change from 66 to 73.
14635 2018-01-19  Martin Liska  <mliska@suse.cz>
14637         * predict.c (predict_insn_def): Add new assert.
14638         (struct branch_predictor): Change type to signed integer.
14639         (test_prediction_value_range): Amend test to cover
14640         PROB_UNINITIALIZED.
14641         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
14642         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
14643         (PRED_LOOP_ITERATIONS_MAX): Likewise.
14644         (PRED_LOOP_IV_COMPARE): Likewise.
14645         * predict.h (PROB_UNINITIALIZED): Define new constant.
14647 2018-01-19  Martin Liska  <mliska@suse.cz>
14649         * predict.c (dump_prediction): Add new format for
14650         analyze_brprob.py script which is enabled with -details
14651         suboption.
14652         * profile-count.h (precise_p): New function.
14654 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
14656         PR tree-optimization/83922
14657         * tree-vect-loop.c (vect_verify_full_masking): Return false if
14658         there are no statements that need masking.
14659         (vect_active_double_reduction_p): New function.
14660         (vect_analyze_loop_operations): Use it when handling phis that
14661         are not in the loop header.
14663 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
14665         PR tree-optimization/83914
14666         * tree-vect-loop.c (vectorizable_induction): Don't convert
14667         init_expr or apply the peeling adjustment for inductions
14668         that are nested within the vectorized loop.
14670 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14672         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
14673         instead of NEG.
14675 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
14677         PR sanitizer/81715
14678         PR testsuite/83882
14679         * function.h (gimplify_parameters): Add gimple_seq * argument.
14680         * function.c: Include gimple.h and options.h.
14681         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
14682         for the added local temporaries if needed.
14683         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
14684         if there are any parameter cleanups, wrap whole body into a
14685         try/finally with the cleanups.
14687 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
14689         PR target/82964
14690         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
14691         Use GET_MODE_CLASS for scalar floating point.
14693 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
14695         PR ipa/82256
14696         patch by PaX Team
14697         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
14698         Fix call of call_cgraph_insertion_hooks.
14700 2018-01-18  Martin Sebor  <msebor@redhat.com>
14702         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
14704 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
14706         PR ipa/83619
14707         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
14708         frequencies.
14710 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
14712         PR other/70268
14713         * common.opt: (-ffile-prefix-map): New option.
14714         * opts.c (common_handle_option): Defer it.
14715         * opts-global.c (handle_common_deferred_options): Handle it.
14716         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
14717         * file-prefix-map.h: New file.
14718         (remap_debug_filename, add_debug_prefix_map): ...here.
14719         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
14720         * final.c (debug_prefix_map, add_debug_prefix_map
14721         remap_debug_filename): Move to...
14722         * file-prefix-map.c: New file.
14723         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
14724         generalize, get rid of alloca(), use strrchr() instead of strchr().
14725         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
14726         Implement in terms of add_prefix_map().
14727         (remap_macro_filename, remap_debug_filename): Implement in term of
14728         remap_filename().
14729         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
14730         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
14731         * dbxout.c: Include file-prefix-map.h.
14732         * varasm.c: Likewise.
14733         * vmsdbgout.c: Likewise.
14734         * xcoffout.c: Likewise.
14735         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
14736         * doc/cppopts.texi (-fmacro-prefix-map): Document.
14737         * doc/invoke.texi (-ffile-prefix-map): Document.
14738         (-fdebug-prefix-map): Update description.
14740 2018-01-18  Martin Liska  <mliska@suse.cz>
14742         * config/i386/i386.c (indirect_thunk_name): Document that also
14743         lfence is emitted.
14744         (output_indirect_thunk): Document why both instructions
14745         (pause and lfence) are generated.
14747 2018-01-18  Richard Biener  <rguenther@suse.de>
14749         PR tree-optimization/83887
14750         * graphite-scop-detection.c
14751         (scop_detection::get_nearest_dom_with_single_entry): Remove.
14752         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
14753         (scop_detection::merge_sese): Re-implement with a flood-fill
14754         algorithm that properly finds a SESE region if it exists.
14756 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
14758         PR c/61240
14759         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
14760         pointer_diff optimizations use view_convert instead of convert.
14762 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14764         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14765         Generate different code for -mno-speculate-indirect-jumps.
14766         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14767         (*call_indirect_aix<mode>): Disable for
14768         -mno-speculate-indirect-jumps.
14769         (*call_indirect_aix<mode>_nospec): New define_insn.
14770         (*call_value_indirect_aix<mode>): Disable for
14771         -mno-speculate-indirect-jumps.
14772         (*call_value_indirect_aix<mode>_nospec): New define_insn.
14773         (*sibcall_nonlocal_sysv<mode>): Generate different code for
14774         -mno-speculate-indirect-jumps.
14775         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14777 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14779         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
14780         long double type, set the flags for noting the default long double
14781         type, even if we don't pass or return a long double type.
14783 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
14785         PR ipa/83051
14786         * ipa-inline.c (flatten_function): Do not overwrite final inlining
14787         failure.
14789 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
14791         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
14792         support for merge[hl].
14793         (fold_mergehl_helper): New helper function.
14794         (tree-vector-builder.h): New #include for tree_vector_builder usage.
14795         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
14796         (altivec_vmrglw_direct): Add xxmrglw insn.
14798 2018-01-17  Andrew Waterman  <andrew@sifive.com>
14800         * config/riscv/riscv.c (riscv_conditional_register_usage): If
14801         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
14803 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
14805         PR lto/83121
14806         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
14807         call the lto_location_cache before reading the
14808         DECL_SOURCE_LOCATION of the types.
14810 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
14811             Richard Sandiford  <richard.sandiford@linaro.org>
14813         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
14814         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
14815         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
14816         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
14817         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
14818         Add declaration.
14819         * config/aarch64/constraints.md (aarch64_movti_operand):
14820         Limit immediates.
14821         * config/aarch64/predicates.md (Uti): Add new constraint.
14823 2018-01-17 Carl Love  <cel@us.ibm.com>
14825         * config/rs6000/vsx.md (define_expand xl_len_r,
14826         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
14827         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
14828         lxvll.
14829         (define_expand, define_insn): Move the shift left from  the
14830         define_insn to the define_expand for lxvl and stxvl instructions.
14831         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
14832         and XL_LEN_R definitions to PURE.
14834 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
14836         * config/i386/i386.c (indirect_thunk_name): Declare regno
14837         as unsigned int.  Compare regno with INVALID_REGNUM.
14838         (output_indirect_thunk): Ditto.
14839         (output_indirect_thunk_function): Ditto.
14840         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
14841         in the call to output_indirect_thunk_function.
14843 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
14845         PR middle-end/83884
14846         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
14847         rather than the size of inner_type to determine the stack slot size
14848         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
14850 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
14852         PR target/83546
14853         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
14854         to PTA_SILVERMONT.
14856 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
14858         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
14859         endian Linux systems to optionally enable multilibs for selecting
14860         the long double type if the user configured an explicit type.
14861         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
14862         have no long double multilibs if not defined.
14863         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
14864         warn if the user used -mabi={ieee,ibm}longdouble and we built
14865         multilibs for long double.
14866         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
14867         appropriate multilib option.
14868         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
14869         multilib options.
14870         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
14871         for building long double multilibs.
14872         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
14874 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
14876         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
14877         copies.
14879         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
14880         64 bits.
14881         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
14882         128 bits.
14884         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
14885         variables.
14887         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
14888         return value.
14890 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
14892         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
14893         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
14895 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14897         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
14898         different rtl trees depending on TARGET_64BIT.
14899         (rs6000_gen_lvx): Likewise.
14901 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
14903         * config/visium/visium.md (nop): Tweak comment.
14904         (hazard_nop): Likewise.
14906 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14908         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
14909         -mspeculate-indirect-jumps.
14910         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
14911         for -mno-speculate-indirect-jumps.
14912         (*call_indirect_elfv2<mode>_nospec): New define_insn.
14913         (*call_value_indirect_elfv2<mode>): Disable for
14914         -mno-speculate-indirect-jumps.
14915         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
14916         (indirect_jump): Emit different RTL for
14917         -mno-speculate-indirect-jumps.
14918         (*indirect_jump<mode>): Disable for
14919         -mno-speculate-indirect-jumps.
14920         (*indirect_jump<mode>_nospec): New define_insn.
14921         (tablejump): Emit different RTL for
14922         -mno-speculate-indirect-jumps.
14923         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
14924         (tablejumpsi_nospec): New define_expand.
14925         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
14926         (tablejumpdi_nospec): New define_expand.
14927         (*tablejump<mode>_internal1): Disable for
14928         -mno-speculate-indirect-jumps.
14929         (*tablejump<mode>_internal1_nospec): New define_insn.
14930         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
14931         option.
14933 2018-01-16  Artyom Skrobov tyomitch@gmail.com
14935         * caller-save.c (insert_save): Drop unnecessary parameter.  All
14936         callers updated.
14938 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
14939             Richard Biener  <rguenth@suse.de>
14941         PR libgomp/83590
14942         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
14943         return early, inline manually is_gimple_sizepos.  Make sure if we
14944         call gimplify_expr we don't end up with a gimple constant.
14945         * tree.c (variably_modified_type_p): Don't return true for
14946         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
14947         * gimplify.h (is_gimple_sizepos): Remove.
14949 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14951         PR tree-optimization/83857
14952         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
14953         vectorizable_live_operation for pure SLP statements.
14954         (vectorizable_live_operation): Handle PHIs.
14956 2018-01-16  Richard Biener  <rguenther@suse.de>
14958         PR tree-optimization/83867
14959         * tree-vect-stmts.c (vect_transform_stmt): Precompute
14960         nested_in_vect_loop_p since the scalar stmt may get invalidated.
14962 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
14964         PR c/83844
14965         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
14966         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
14967         If off is not INTEGER_CST, issue a may not be aligned warning
14968         rather than isn't aligned.  Use isn%'t rather than isn't.
14969         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
14970         into MULT_EXPR.
14971         <case MULT_EXPR>: Improve the case when bottom and one of the
14972         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
14973         operand, in that case check if the other operand is multiple of
14974         bottom divided by the INTEGER_CST operand.
14976 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14978         PR target/83858
14979         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
14980         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
14981         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
14982         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
14983         * config/pa/pa.c (pa_function_arg_advance): Likewise.
14984         (pa_function_arg, pa_arg_partial_bytes): Likewise.
14985         (pa_function_arg_size): New function.
14987 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14989         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
14990         in a separate statement.
14992 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
14994         PR tree-optimization/83847
14995         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
14996         group gathers and scatters.
14998 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
15000         PR rtl-optimization/86620
15001         * params.def (max-sched-ready-insns): Bump minimum value to 1.
15003         PR rtl-optimization/83213
15004         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
15005         to last if both are JUMP_INSNs.
15007         PR tree-optimization/83843
15008         * gimple-ssa-store-merging.c
15009         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
15010         store_immediate_info for bswap/nop orig_stores.
15012 2018-01-15  Andrew Waterman  <andrew@sifive.com>
15014         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
15015         !TARGET_MUL.
15016         <UDIV>: Increase cost if !TARGET_DIV.
15018 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
15020         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
15021         (define_attr "cr_logical_3op"): New.
15022         (cceq_ior_compare): Adjust.
15023         (cceq_ior_compare_complement): Adjust.
15024         (*cceq_rev_compare): Adjust.
15025         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
15026         (is_cracked_insn): Adjust.
15027         (insn_must_be_first_in_group): Adjust.
15028         * config/rs6000/40x.md: Adjust.
15029         * config/rs6000/440.md: Adjust.
15030         * config/rs6000/476.md: Adjust.
15031         * config/rs6000/601.md: Adjust.
15032         * config/rs6000/603.md: Adjust.
15033         * config/rs6000/6xx.md: Adjust.
15034         * config/rs6000/7450.md: Adjust.
15035         * config/rs6000/7xx.md: Adjust.
15036         * config/rs6000/8540.md: Adjust.
15037         * config/rs6000/cell.md: Adjust.
15038         * config/rs6000/e300c2c3.md: Adjust.
15039         * config/rs6000/e500mc.md: Adjust.
15040         * config/rs6000/e500mc64.md: Adjust.
15041         * config/rs6000/e5500.md: Adjust.
15042         * config/rs6000/e6500.md: Adjust.
15043         * config/rs6000/mpc.md: Adjust.
15044         * config/rs6000/power4.md: Adjust.
15045         * config/rs6000/power5.md: Adjust.
15046         * config/rs6000/power6.md: Adjust.
15047         * config/rs6000/power7.md: Adjust.
15048         * config/rs6000/power8.md: Adjust.
15049         * config/rs6000/power9.md: Adjust.
15050         * config/rs6000/rs64.md: Adjust.
15051         * config/rs6000/titan.md: Adjust.
15053 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15055         * config/i386/predicates.md (indirect_branch_operand): Rewrite
15056         ix86_indirect_branch_register logic.
15058 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15060         * config/i386/constraints.md (Bs): Update
15061         ix86_indirect_branch_register check.  Don't check
15062         ix86_indirect_branch_register with GOT_memory_operand.
15063         (Bw): Likewise.
15064         * config/i386/predicates.md (GOT_memory_operand): Don't check
15065         ix86_indirect_branch_register here.
15066         (GOT32_symbol_operand): Likewise.
15068 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15070         * config/i386/predicates.md (constant_call_address_operand):
15071         Rewrite ix86_indirect_branch_register logic.
15072         (sibcall_insn_operand): Likewise.
15074 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15076         * config/i386/constraints.md (Bs): Replace
15077         ix86_indirect_branch_thunk_register with
15078         ix86_indirect_branch_register.
15079         (Bw): Likewise.
15080         * config/i386/i386.md (indirect_jump): Likewise.
15081         (tablejump): Likewise.
15082         (*sibcall_memory): Likewise.
15083         (*sibcall_value_memory): Likewise.
15084         Peepholes of indirect call and jump via memory: Likewise.
15085         * config/i386/i386.opt: Likewise.
15086         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15087         (GOT_memory_operand): Likewise.
15088         (call_insn_operand): Likewise.
15089         (sibcall_insn_operand): Likewise.
15090         (GOT32_symbol_operand): Likewise.
15092 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
15094         PR middle-end/83837
15095         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
15096         type rather than type addr's type points to.
15097         (expand_omp_atomic_mutex): Likewise.
15098         (expand_omp_atomic): Likewise.
15100 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
15102         PR target/83839
15103         * config/i386/i386.c (output_indirect_thunk_function): Use
15104         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
15105         for  __x86_return_thunk.
15107 2018-01-15  Richard Biener  <rguenther@suse.de>
15109         PR middle-end/83850
15110         * expmed.c (extract_bit_field_1): Fix typo.
15112 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15114         PR target/83687
15115         * config/arm/iterators.md (VF): New mode iterator.
15116         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
15117         Remove integer-related logic from pattern.
15118         (neon_vabd<mode>_3): Likewise.
15120 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
15122         PR middle-end/82694
15123         * common.opt (fstrict-overflow): No longer an alias.
15124         (fwrapv-pointer): New option.
15125         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
15126         also for pointer types based on flag_wrapv_pointer.
15127         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
15128         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
15129         opts->x_flag_wrapv got set.
15130         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
15131         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
15132         POINTER_TYPE_OVERFLOW_UNDEFINED.
15133         * match.pd: Likewise in address comparison pattern.
15134         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
15136 2018-01-15  Richard Biener  <rguenther@suse.de>
15138         PR lto/83804
15139         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
15140         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
15141         Reset type names to their identifier if their TYPE_DECL doesn't
15142         have linkage (and thus is used for ODR and devirt).
15143         (save_debug_info_for_decl): Remove.
15144         (save_debug_info_for_type): Likewise.
15145         (add_tree_to_fld_list): Adjust.
15146         * tree-pretty-print.c (dump_generic_node): Make dumping of
15147         type names more robust.
15149 2018-01-15  Richard Biener  <rguenther@suse.de>
15151         * BASE-VER: Bump to 8.0.1.
15153 2018-01-14  Martin Sebor  <msebor@redhat.com>
15155         PR other/83508
15156         * builtins.c (check_access): Avoid warning when the no-warning bit
15157         is set.
15159 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
15161         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
15162         * ira-color (allocno_hard_regs_compare): Likewise.
15164 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
15166         PR target/83013
15167         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
15168         Use .pushsection/.popsection.
15170 2018-01-14  Martin Sebor  <msebor@redhat.com>
15172         PR c++/81327
15173         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
15175 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
15177         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
15178         entry from extra_headers.
15179         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
15180         extra_headers, make the list bitwise identical to the i?86-*-* one.
15182 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15184         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
15185         -mcmodel=large with -mindirect-branch=thunk,
15186         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
15187         -mfunction-return=thunk-extern.
15188         * doc/invoke.texi: Document -mcmodel=large is incompatible with
15189         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
15190         -mfunction-return=thunk and -mfunction-return=thunk-extern.
15192 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15194         * config/i386/i386.c (print_reg): Print the name of the full
15195         integer register without '%'.
15196         (ix86_print_operand): Handle 'V'.
15197         * doc/extend.texi: Document 'V' modifier.
15199 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15201         * config/i386/constraints.md (Bs): Disallow memory operand for
15202         -mindirect-branch-register.
15203         (Bw): Likewise.
15204         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15205         (GOT_memory_operand): Likewise.
15206         (call_insn_operand): Likewise.
15207         (sibcall_insn_operand): Likewise.
15208         (GOT32_symbol_operand): Likewise.
15209         * config/i386/i386.md (indirect_jump): Call convert_memory_address
15210         for -mindirect-branch-register.
15211         (tablejump): Likewise.
15212         (*sibcall_memory): Likewise.
15213         (*sibcall_value_memory): Likewise.
15214         Disallow peepholes of indirect call and jump via memory for
15215         -mindirect-branch-register.
15216         (*call_pop): Replace m with Bw.
15217         (*call_value_pop): Likewise.
15218         (*sibcall_pop_memory): Replace m with Bs.
15219         * config/i386/i386.opt (mindirect-branch-register): New option.
15220         * doc/invoke.texi: Document -mindirect-branch-register option.
15222 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15224         * config/i386/i386-protos.h (ix86_output_function_return): New.
15225         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
15226         set function_return_type.
15227         (indirect_thunk_name): Add ret_p to indicate thunk for function
15228         return.
15229         (output_indirect_thunk_function): Pass false to
15230         indirect_thunk_name.
15231         (ix86_output_indirect_branch_via_reg): Likewise.
15232         (ix86_output_indirect_branch_via_push): Likewise.
15233         (output_indirect_thunk_function): Create alias for function
15234         return thunk if regno < 0.
15235         (ix86_output_function_return): New function.
15236         (ix86_handle_fndecl_attribute): Handle function_return.
15237         (ix86_attribute_table): Add function_return.
15238         * config/i386/i386.h (machine_function): Add
15239         function_return_type.
15240         * config/i386/i386.md (simple_return_internal): Use
15241         ix86_output_function_return.
15242         (simple_return_internal_long): Likewise.
15243         * config/i386/i386.opt (mfunction-return=): New option.
15244         (indirect_branch): Mention -mfunction-return=.
15245         * doc/extend.texi: Document function_return function attribute.
15246         * doc/invoke.texi: Document -mfunction-return= option.
15248 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
15250         * config/i386/i386-opts.h (indirect_branch): New.
15251         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15252         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15253         with local indirect jump when converting indirect call and jump.
15254         (ix86_set_indirect_branch_type): New.
15255         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15256         (indirectlabelno): New.
15257         (indirect_thunk_needed): Likewise.
15258         (indirect_thunk_bnd_needed): Likewise.
15259         (indirect_thunks_used): Likewise.
15260         (indirect_thunks_bnd_used): Likewise.
15261         (INDIRECT_LABEL): Likewise.
15262         (indirect_thunk_name): Likewise.
15263         (output_indirect_thunk): Likewise.
15264         (output_indirect_thunk_function): Likewise.
15265         (ix86_output_indirect_branch_via_reg): Likewise.
15266         (ix86_output_indirect_branch_via_push): Likewise.
15267         (ix86_output_indirect_branch): Likewise.
15268         (ix86_output_indirect_jmp): Likewise.
15269         (ix86_code_end): Call output_indirect_thunk_function if needed.
15270         (ix86_output_call_insn): Call ix86_output_indirect_branch if
15271         needed.
15272         (ix86_handle_fndecl_attribute): Handle indirect_branch.
15273         (ix86_attribute_table): Add indirect_branch.
15274         * config/i386/i386.h (machine_function): Add indirect_branch_type
15275         and has_local_indirect_jump.
15276         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15277         to true.
15278         (tablejump): Likewise.
15279         (*indirect_jump): Use ix86_output_indirect_jmp.
15280         (*tablejump_1): Likewise.
15281         (simple_return_indirect_internal): Likewise.
15282         * config/i386/i386.opt (mindirect-branch=): New option.
15283         (indirect_branch): New.
15284         (keep): Likewise.
15285         (thunk): Likewise.
15286         (thunk-inline): Likewise.
15287         (thunk-extern): Likewise.
15288         * doc/extend.texi: Document indirect_branch function attribute.
15289         * doc/invoke.texi: Document -mindirect-branch= option.
15291 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
15293         PR ipa/83051
15294         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15296 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
15298         * ipa-inline.c (want_inline_small_function_p): Return false if
15299         inlining has already failed with CIF_FINAL_ERROR.
15300         (update_caller_keys): Call want_inline_small_function_p before
15301         can_inline_edge_p.
15302         (update_callee_keys): Likewise.
15304 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15306         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15307         New function.
15308         (rs6000_quadword_masked_address_p): Likewise.
15309         (quad_aligned_load_p): Likewise.
15310         (quad_aligned_store_p): Likewise.
15311         (const_load_sequence_p): Add comment to describe the outer-most loop.
15312         (mimic_memory_attributes_and_flags): New function.
15313         (rs6000_gen_stvx): Likewise.
15314         (replace_swapped_aligned_store): Likewise.
15315         (rs6000_gen_lvx): Likewise.
15316         (replace_swapped_aligned_load): Likewise.
15317         (replace_swapped_load_constant): Capitalize argument name in
15318         comment describing this function.
15319         (rs6000_analyze_swaps): Add a third pass to search for vector loads
15320         and stores that access quad-word aligned addresses and replace
15321         with stvx or lvx instructions when appropriate.
15322         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15323         New function prototype.
15324         (rs6000_quadword_masked_address_p): Likewise.
15325         (rs6000_gen_lvx): Likewise.
15326         (rs6000_gen_stvx): Likewise.
15327         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15328         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15329         when memory address is aligned.
15330         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15331         this split to select lvx instruction when memory address is aligned.
15332         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15333         instruction when memory address is aligned.
15334         (*vsx_le_perm_load_v16qi): Likewise.
15335         (four unnamed splitters): Modify to select the stvx instruction
15336         when memory is aligned.
15338 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
15340         * predict.c (determine_unlikely_bbs): Handle correctly BBs
15341         which appears in the queue multiple times.
15343 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15344             Alan Hayward  <alan.hayward@arm.com>
15345             David Sherwood  <david.sherwood@arm.com>
15347         * tree-vectorizer.h (vec_lower_bound): New structure.
15348         (_loop_vec_info): Add check_nonzero and lower_bounds.
15349         (LOOP_VINFO_CHECK_NONZERO): New macro.
15350         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15351         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15352         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15353         fields.  Make seg_len the distance travelled, not including the
15354         access size.
15355         (dr_direction_indicator): Declare.
15356         (dr_zero_step_indicator): Likewise.
15357         (dr_known_forward_stride_p): Likewise.
15358         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15359         tree-ssanames.h.
15360         (runtime_alias_check_p): Allow runtime alias checks with
15361         variable strides.
15362         (operator ==): Compare access_size and align.
15363         (prune_runtime_alias_test_list): Rework for new distinction between
15364         the access_size and seg_len.
15365         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
15366         segment lengths.
15367         (get_segment_min_max): New function.
15368         (create_intersect_range_checks): Use it.
15369         (dr_step_indicator): New function.
15370         (dr_direction_indicator): Likewise.
15371         (dr_zero_step_indicator): Likewise.
15372         (dr_known_forward_stride_p): Likewise.
15373         * tree-loop-distribution.c (data_ref_segment_size): Return
15374         DR_STEP * (niters - 1).
15375         (compute_alias_check_pairs): Update call to the dr_with_seg_len
15376         constructor.
15377         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15378         (vect_preserves_scalar_order_p): New function, split out from...
15379         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
15380         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15381         (vect_vfa_access_size): New function.
15382         (vect_vfa_align): Likewise.
15383         (vect_compile_time_alias): Take access_size_a and access_b arguments.
15384         (dump_lower_bound): New function.
15385         (vect_check_lower_bound): Likewise.
15386         (vect_small_gap_p): Likewise.
15387         (vectorizable_with_step_bound_p): Likewise.
15388         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15389         depencies if the vectorization factor is 1.  Convert the checks
15390         for nonzero steps into checks on the bounds of DR_STEP.  Try using
15391         a bunds check for variable steps if the minimum required step is
15392         relatively small. Update calls to the dr_with_seg_len
15393         constructor and to vect_compile_time_alias.
15394         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15395         function.
15396         (vect_loop_versioning): Call it.
15397         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15398         when retrying.
15399         (vect_estimate_min_profitable_iters): Account for any bounds checks.
15401 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15402             Alan Hayward  <alan.hayward@arm.com>
15403             David Sherwood  <david.sherwood@arm.com>
15405         * doc/sourcebuild.texi (vect_scatter_store): Document.
15406         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15407         optabs.
15408         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15409         Document.
15410         * genopinit.c (main): Add supports_vec_scatter_store and
15411         supports_vec_scatter_store_cached to target_optabs.
15412         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15413         IFN_MASK_SCATTER_STORE.
15414         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15415         functions.
15416         * internal-fn.h (internal_store_fn_p): Declare.
15417         (internal_fn_stored_value_index): Likewise.
15418         * internal-fn.c (scatter_store_direct): New macro.
15419         (expand_scatter_store_optab_fn): New function.
15420         (direct_scatter_store_optab_supported_p): New macro.
15421         (internal_store_fn_p): New function.
15422         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15423         IFN_MASK_SCATTER_STORE.
15424         (internal_fn_mask_index): Likewise.
15425         (internal_fn_stored_value_index): New function.
15426         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15427         for scatter stores.
15428         * optabs-query.h (supports_vec_scatter_store_p): Declare.
15429         * optabs-query.c (supports_vec_scatter_store_p): New function.
15430         * tree-vectorizer.h (vect_get_store_rhs): Declare.
15431         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15432         true for scatter stores.
15433         (vect_gather_scatter_fn_p): Handle scatter stores too.
15434         (vect_check_gather_scatter): Consider using scatter stores if
15435         supports_vec_scatter_store_p.
15436         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15437         scatter stores too.
15438         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15439         internal_fn_stored_value_index.
15440         (check_load_store_masking): Handle scatter stores too.
15441         (vect_get_store_rhs): Make public.
15442         (vectorizable_call): Use internal_store_fn_p.
15443         (vectorizable_store): Handle scatter store internal functions.
15444         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15445         when deciding whether the end of the group has been reached.
15446         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15447         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15448         (mask_scatter_store<mode>): New insns.
15450 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15451             Alan Hayward  <alan.hayward@arm.com>
15452             David Sherwood  <david.sherwood@arm.com>
15454         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
15455         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
15456         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
15457         function.
15458         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
15459         Use vect_truncate_gather_scatter_offset if we can't treat the
15460         operation as a normal gather load or scatter store.
15461         (get_group_load_store_type): Take the gather_scatter_info
15462         as argument.  Try using a gather load or scatter store for
15463         single-element groups.
15464         (get_load_store_type): Update calls to get_group_load_store_type
15465         and vect_use_strided_gather_scatters_p.
15467 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15468             Alan Hayward  <alan.hayward@arm.com>
15469             David Sherwood  <david.sherwood@arm.com>
15471         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
15472         optional tree argument.
15473         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
15474         null target hooks.
15475         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
15476         but continue to use the current value as a fallback.
15477         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
15478         to compare the updates.
15479         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
15480         (get_load_store_type): Use it when handling a strided access.
15481         (vect_get_strided_load_store_ops): New function.
15482         (vect_get_data_ptr_increment): Likewise.
15483         (vectorizable_load): Handle strided gather loads.  Always pass
15484         a step to vect_create_data_ref_ptr and bump_vector_ptr.
15486 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15487             Alan Hayward  <alan.hayward@arm.com>
15488             David Sherwood  <david.sherwood@arm.com>
15490         * doc/md.texi (gather_load@var{m}): Document.
15491         (mask_gather_load@var{m}): Likewise.
15492         * genopinit.c (main): Add supports_vec_gather_load and
15493         supports_vec_gather_load_cached to target_optabs.
15494         * optabs-tree.c (init_tree_optimization_optabs): Use
15495         ggc_cleared_alloc to allocate target_optabs.
15496         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
15497         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
15498         functions.
15499         * internal-fn.h (internal_load_fn_p): Declare.
15500         (internal_gather_scatter_fn_p): Likewise.
15501         (internal_fn_mask_index): Likewise.
15502         (internal_gather_scatter_fn_supported_p): Likewise.
15503         * internal-fn.c (gather_load_direct): New macro.
15504         (expand_gather_load_optab_fn): New function.
15505         (direct_gather_load_optab_supported_p): New macro.
15506         (direct_internal_fn_optab): New function.
15507         (internal_load_fn_p): Likewise.
15508         (internal_gather_scatter_fn_p): Likewise.
15509         (internal_fn_mask_index): Likewise.
15510         (internal_gather_scatter_fn_supported_p): Likewise.
15511         * optabs-query.c (supports_at_least_one_mode_p): New function.
15512         (supports_vec_gather_load_p): Likewise.
15513         * optabs-query.h (supports_vec_gather_load_p): Declare.
15514         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
15515         and memory_type field.
15516         (NUM_PATTERNS): Bump to 15.
15517         * tree-vect-data-refs.c: Include internal-fn.h.
15518         (vect_gather_scatter_fn_p): New function.
15519         (vect_describe_gather_scatter_call): Likewise.
15520         (vect_check_gather_scatter): Try using internal functions for
15521         gather loads.  Recognize existing calls to a gather load function.
15522         (vect_analyze_data_refs): Consider using gather loads if
15523         supports_vec_gather_load_p.
15524         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
15525         (vect_get_gather_scatter_offset_type): Likewise.
15526         (vect_convert_mask_for_vectype): Likewise.
15527         (vect_add_conversion_to_patterm): Likewise.
15528         (vect_try_gather_scatter_pattern): Likewise.
15529         (vect_recog_gather_scatter_pattern): New pattern recognizer.
15530         (vect_vect_recog_func_ptrs): Add it.
15531         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15532         internal_fn_mask_index and internal_gather_scatter_fn_p.
15533         (check_load_store_masking): Take the gather_scatter_info as an
15534         argument and handle gather loads.
15535         (vect_get_gather_scatter_ops): New function.
15536         (vectorizable_call): Check internal_load_fn_p.
15537         (vectorizable_load): Likewise.  Handle gather load internal
15538         functions.
15539         (vectorizable_store): Update call to check_load_store_masking.
15540         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
15541         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
15542         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
15543         (aarch64_gather_scale_operand_d): New predicates.
15544         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
15545         (mask_gather_load<mode>): New insns.
15547 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15548             Alan Hayward  <alan.hayward@arm.com>
15549             David Sherwood  <david.sherwood@arm.com>
15551         * optabs.def (fold_left_plus_optab): New optab.
15552         * doc/md.texi (fold_left_plus_@var{m}): Document.
15553         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
15554         * internal-fn.c (fold_left_direct): Define.
15555         (expand_fold_left_optab_fn): Likewise.
15556         (direct_fold_left_optab_supported_p): Likewise.
15557         * fold-const-call.c (fold_const_fold_left): New function.
15558         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
15559         * tree-parloops.c (valid_reduction_p): New function.
15560         (gather_scalar_reductions): Use it.
15561         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
15562         (vect_finish_replace_stmt): Declare.
15563         * tree-vect-loop.c (fold_left_reduction_fn): New function.
15564         (needs_fold_left_reduction_p): New function, split out from...
15565         (vect_is_simple_reduction): ...here.  Accept reductions that
15566         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
15567         (vect_force_simple_reduction): Also store the reduction type in
15568         the assignment's STMT_VINFO_REDUC_TYPE.
15569         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
15570         (merge_with_identity): New function.
15571         (vect_expand_fold_left): Likewise.
15572         (vectorize_fold_left_reduction): Likewise.
15573         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
15574         scalar phi in place for it.  Check for target support and reject
15575         cases that would reassociate the operation.  Defer the transform
15576         phase to vectorize_fold_left_reduction.
15577         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
15578         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
15579         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
15581 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15583         * tree-if-conv.c (predicate_mem_writes): Remove redundant
15584         call to ifc_temp_var.
15586 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15587             Alan Hayward  <alan.hayward@arm.com>
15588             David Sherwood  <david.sherwood@arm.com>
15590         * target.def (legitimize_address_displacement): Take the original
15591         offset as a poly_int.
15592         * targhooks.h (default_legitimize_address_displacement): Update
15593         accordingly.
15594         * targhooks.c (default_legitimize_address_displacement): Likewise.
15595         * doc/tm.texi: Regenerate.
15596         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
15597         as an argument, moving assert of ad->disp == ad->disp_term to...
15598         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
15599         Try calling targetm.legitimize_address_displacement before expanding
15600         the address rather than afterwards, and adjust for the new interface.
15601         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
15602         Match the new hook interface.  Handle SVE addresses.
15603         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
15604         new hook interface.
15606 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15608         * Makefile.in (OBJS): Add early-remat.o.
15609         * target.def (select_early_remat_modes): New hook.
15610         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
15611         * doc/tm.texi: Regenerate.
15612         * targhooks.h (default_select_early_remat_modes): Declare.
15613         * targhooks.c (default_select_early_remat_modes): New function.
15614         * timevar.def (TV_EARLY_REMAT): New timevar.
15615         * passes.def (pass_early_remat): New pass.
15616         * tree-pass.h (make_pass_early_remat): Declare.
15617         * early-remat.c: New file.
15618         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
15619         function.
15620         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
15622 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15623             Alan Hayward  <alan.hayward@arm.com>
15624             David Sherwood  <david.sherwood@arm.com>
15626         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
15627         vfm1 with a bound_epilog parameter.
15628         (vect_do_peeling): Update calls accordingly, and move the prologue
15629         call earlier in the function.  Treat the base bound_epilog as 0 for
15630         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
15631         this base when peeling for gaps.
15632         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
15633         with fully-masked loops.
15634         (vect_estimate_min_profitable_iters): Handle the single peeled
15635         iteration in that case.
15637 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15638             Alan Hayward  <alan.hayward@arm.com>
15639             David Sherwood  <david.sherwood@arm.com>
15641         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
15642         single-element interleaving even if the size is not a power of 2.
15643         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
15644         accesses for single-element interleaving if the group size is
15645         not a power of 2.
15647 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15648             Alan Hayward  <alan.hayward@arm.com>
15649             David Sherwood  <david.sherwood@arm.com>
15651         * doc/md.texi (fold_extract_last_@var{m}): Document.
15652         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
15653         * optabs.def (fold_extract_last_optab): New optab.
15654         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
15655         * internal-fn.c (fold_extract_direct): New macro.
15656         (expand_fold_extract_optab_fn): Likewise.
15657         (direct_fold_extract_optab_supported_p): Likewise.
15658         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
15659         * tree-vect-loop.c (vect_model_reduction_cost): Handle
15660         EXTRACT_LAST_REDUCTION.
15661         (get_initial_def_for_reduction): Do not create an initial vector
15662         for EXTRACT_LAST_REDUCTION reductions.
15663         (vectorizable_reduction): Leave the scalar phi in place for
15664         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
15665         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
15666         epilogue code for EXTRACT_LAST_REDUCTION and defer the
15667         transform phase to vectorizable_condition.
15668         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
15669         split out from...
15670         (vect_finish_stmt_generation): ...here.
15671         (vect_finish_replace_stmt): New function.
15672         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
15673         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
15674         pattern.
15675         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
15677 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15678             Alan Hayward  <alan.hayward@arm.com>
15679             David Sherwood  <david.sherwood@arm.com>
15681         * doc/md.texi (extract_last_@var{m}): Document.
15682         * optabs.def (extract_last_optab): New optab.
15683         * internal-fn.def (EXTRACT_LAST): New internal function.
15684         * internal-fn.c (cond_unary_direct): New macro.
15685         (expand_cond_unary_optab_fn): Likewise.
15686         (direct_cond_unary_optab_supported_p): Likewise.
15687         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
15688         loops using EXTRACT_LAST.
15689         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
15690         (extract_last_<mode>): ...this optab.
15691         (vec_extract<mode><Vel>): Update accordingly.
15693 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15694             Alan Hayward  <alan.hayward@arm.com>
15695             David Sherwood  <david.sherwood@arm.com>
15697         * target.def (empty_mask_is_expensive): New hook.
15698         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
15699         * doc/tm.texi: Regenerate.
15700         * targhooks.h (default_empty_mask_is_expensive): Declare.
15701         * targhooks.c (default_empty_mask_is_expensive): New function.
15702         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
15703         if the target says that empty masks are expensive.
15704         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
15705         New function.
15706         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
15708 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15709             Alan Hayward  <alan.hayward@arm.com>
15710             David Sherwood  <david.sherwood@arm.com>
15712         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
15713         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
15714         (vect_use_loop_mask_for_alignment_p): New function.
15715         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
15716         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
15717         niters_skip argument.  Make sure that the first niters_skip elements
15718         of the first iteration are inactive.
15719         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
15720         Update call to vect_set_loop_masks_directly.
15721         (get_misalign_in_elems): New function, split out from...
15722         (vect_gen_prolog_loop_niters): ...here.
15723         (vect_update_init_of_dr): Take a code argument that specifies whether
15724         the adjustment should be added or subtracted.
15725         (vect_update_init_of_drs): Likewise.
15726         (vect_prepare_for_masked_peels): New function.
15727         (vect_do_peeling): Skip prologue peeling if we're using a mask
15728         instead.  Update call to vect_update_inits_of_drs.
15729         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15730         mask_skip_niters.
15731         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
15732         alignment.  Do not include the number of peeled iterations in
15733         the minimum threshold in that case.
15734         (vectorizable_induction): Adjust the start value down by
15735         LOOP_VINFO_MASK_SKIP_NITERS iterations.
15736         (vect_transform_loop): Call vect_prepare_for_masked_peels.
15737         Take the number of skipped iterations into account when calculating
15738         the loop bounds.
15739         * tree-vect-stmts.c (vect_gen_while_not): New function.
15741 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15742             Alan Hayward  <alan.hayward@arm.com>
15743             David Sherwood  <david.sherwood@arm.com>
15745         * doc/sourcebuild.texi (vect_fully_masked): Document.
15746         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
15747         default value to 0.
15748         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
15749         split out from...
15750         (vect_analyze_loop_2): ...here. Don't check the vectorization
15751         factor against the number of loop iterations if the loop is
15752         fully-masked.
15754 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15755             Alan Hayward  <alan.hayward@arm.com>
15756             David Sherwood  <david.sherwood@arm.com>
15758         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
15759         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
15760         (dump_groups): Update accordingly.
15761         (iv_use::mem_type): New member variable.
15762         (address_p): New function.
15763         (record_use): Add a mem_type argument and initialize the new
15764         mem_type field.
15765         (record_group_use): Add a mem_type argument.  Use address_p.
15766         Remove obsolete null checks of base_object.  Update call to record_use.
15767         (find_interesting_uses_op): Update call to record_group_use.
15768         (find_interesting_uses_cond): Likewise.
15769         (find_interesting_uses_address): Likewise.
15770         (get_mem_type_for_internal_fn): New function.
15771         (find_address_like_use): Likewise.
15772         (find_interesting_uses_stmt): Try find_address_like_use before
15773         calling find_interesting_uses_op.
15774         (addr_offset_valid_p): Use the iv mem_type field as the type
15775         of the addressed memory.
15776         (add_autoinc_candidates): Likewise.
15777         (get_address_cost): Likewise.
15778         (split_small_address_groups_p): Use address_p.
15779         (split_address_groups): Likewise.
15780         (add_iv_candidate_for_use): Likewise.
15781         (autoinc_possible_for_pair): Likewise.
15782         (rewrite_groups): Likewise.
15783         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
15784         (determine_group_iv_cost): Update after split of USE_ADDRESS.
15785         (get_alias_ptr_type_for_ptr_address): New function.
15786         (rewrite_use_address): Rewrite address uses in calls that were
15787         identified by find_address_like_use.
15789 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15790             Alan Hayward  <alan.hayward@arm.com>
15791             David Sherwood  <david.sherwood@arm.com>
15793         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
15794         TARGET_MEM_REFs.
15795         * gimple-expr.h (is_gimple_addressable: Likewise.
15796         * gimple-expr.c (is_gimple_address): Likewise.
15797         * internal-fn.c (expand_call_mem_ref): New function.
15798         (expand_mask_load_optab_fn): Use it.
15799         (expand_mask_store_optab_fn): Likewise.
15801 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15802             Alan Hayward  <alan.hayward@arm.com>
15803             David Sherwood  <david.sherwood@arm.com>
15805         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
15806         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
15807         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
15808         (cond_umax@var{mode}): Document.
15809         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
15810         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
15811         (cond_umin_optab, cond_umax_optab): New optabs.
15812         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
15813         (COND_IOR, COND_XOR): New internal functions.
15814         * internal-fn.h (get_conditional_internal_fn): Declare.
15815         * internal-fn.c (cond_binary_direct): New macro.
15816         (expand_cond_binary_optab_fn): Likewise.
15817         (direct_cond_binary_optab_supported_p): Likewise.
15818         (get_conditional_internal_fn): New function.
15819         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
15820         Cope with reduction statements that are vectorized as calls rather
15821         than assignments.
15822         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
15823         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
15824         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
15825         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15826         (UNSPEC_COND_EOR): New unspecs.
15827         (optab): Add mappings for them.
15828         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
15829         (sve_int_op, sve_fp_op): New int attributes.
15831 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15832             Alan Hayward  <alan.hayward@arm.com>
15833             David Sherwood  <david.sherwood@arm.com>
15835         * optabs.def (while_ult_optab): New optab.
15836         * doc/md.texi (while_ult@var{m}@var{n}): Document.
15837         * internal-fn.def (WHILE_ULT): New internal function.
15838         * internal-fn.h (direct_internal_fn_supported_p): New override
15839         that takes two types as argument.
15840         * internal-fn.c (while_direct): New macro.
15841         (expand_while_optab_fn): New function.
15842         (convert_optab_supported_p): Likewise.
15843         (direct_while_optab_supported_p): New macro.
15844         * wide-int.h (wi::udiv_ceil): New function.
15845         * tree-vectorizer.h (rgroup_masks): New structure.
15846         (vec_loop_masks): New typedef.
15847         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
15848         and fully_masked_p.
15849         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
15850         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
15851         (vect_max_vf): New function.
15852         (slpeel_make_loop_iterate_ntimes): Delete.
15853         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
15854         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
15855         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
15856         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
15857         internal-fn.h, stor-layout.h and optabs-query.h.
15858         (vect_set_loop_mask): New function.
15859         (add_preheader_seq): Likewise.
15860         (add_header_seq): Likewise.
15861         (interleave_supported_p): Likewise.
15862         (vect_maybe_permute_loop_masks): Likewise.
15863         (vect_set_loop_masks_directly): Likewise.
15864         (vect_set_loop_condition_masked): Likewise.
15865         (vect_set_loop_condition_unmasked): New function, split out from
15866         slpeel_make_loop_iterate_ntimes.
15867         (slpeel_make_loop_iterate_ntimes): Rename to..
15868         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
15869         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
15870         (vect_do_peeling): Update call accordingly.
15871         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
15872         loops.
15873         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15874         mask_compare_type, can_fully_mask_p and fully_masked_p.
15875         (release_vec_loop_masks): New function.
15876         (_loop_vec_info): Use it to free the loop masks.
15877         (can_produce_all_loop_masks_p): New function.
15878         (vect_get_max_nscalars_per_iter): Likewise.
15879         (vect_verify_full_masking): Likewise.
15880         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
15881         retries, and free the mask rgroups before retrying.  Check loop-wide
15882         reasons for disallowing fully-masked loops.  Make the final decision
15883         about whether use a fully-masked loop or not.
15884         (vect_estimate_min_profitable_iters): Do not assume that peeling
15885         for the number of iterations will be needed for fully-masked loops.
15886         (vectorizable_reduction): Disable fully-masked loops.
15887         (vectorizable_live_operation): Likewise.
15888         (vect_halve_mask_nunits): New function.
15889         (vect_double_mask_nunits): Likewise.
15890         (vect_record_loop_mask): Likewise.
15891         (vect_get_loop_mask): Likewise.
15892         (vect_transform_loop): Handle the case in which the final loop
15893         iteration might handle a partial vector.  Call vect_set_loop_condition
15894         instead of slpeel_make_loop_iterate_ntimes.
15895         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
15896         (check_load_store_masking): New function.
15897         (prepare_load_store_mask): Likewise.
15898         (vectorizable_store): Handle fully-masked loops.
15899         (vectorizable_load): Likewise.
15900         (supportable_widening_operation): Use vect_halve_mask_nunits for
15901         booleans.
15902         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
15903         (vect_gen_while): New function.
15904         * config/aarch64/aarch64.md (umax<mode>3): New expander.
15905         (aarch64_uqdec<mode>): New insn.
15907 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15908             Alan Hayward  <alan.hayward@arm.com>
15909             David Sherwood  <david.sherwood@arm.com>
15911         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
15912         (reduc_xor_scal_optab): New optabs.
15913         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
15914         (reduc_xor_scal_@var{m}): Document.
15915         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
15916         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
15917         internal functions.
15918         * fold-const-call.c (fold_const_call): Handle them.
15919         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
15920         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
15921         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
15922         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
15923         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
15924         (UNSPEC_XORV): New unspecs.
15925         (optab): Add entries for them.
15926         (BITWISEV): New int iterator.
15927         (bit_reduc_op): New int attributes.
15929 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15930             Alan Hayward  <alan.hayward@arm.com>
15931             David Sherwood  <david.sherwood@arm.com>
15933         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
15934         * internal-fn.def (VEC_SHL_INSERT): New internal function.
15935         * optabs.def (vec_shl_insert_optab): New optab.
15936         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
15937         (duplicate_and_interleave): Likewise.
15938         * tree-vect-loop.c: Include internal-fn.h.
15939         (neutral_op_for_slp_reduction): New function, split out from
15940         get_initial_defs_for_reduction.
15941         (get_initial_def_for_reduction): Handle option 2 for variable-length
15942         vectors by loading the neutral value into a vector and then shifting
15943         the initial value into element 0.
15944         (get_initial_defs_for_reduction): Replace the code argument with
15945         the neutral value calculated by neutral_op_for_slp_reduction.
15946         Use gimple_build_vector for constant-length vectors.
15947         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
15948         but the first group_size elements have a neutral value.
15949         Use duplicate_and_interleave otherwise.
15950         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
15951         Update call to get_initial_defs_for_reduction.  Handle SLP
15952         reductions for variable-length vectors by creating one vector
15953         result for each scalar result, with the elements associated
15954         with other scalar results stubbed out with the neutral value.
15955         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
15956         Require IFN_VEC_SHL_INSERT for double reductions on
15957         variable-length vectors, or SLP reductions that have
15958         a neutral value.  Require can_duplicate_and_interleave_p
15959         support for variable-length unchained SLP reductions if there
15960         is no neutral value, such as for MIN/MAX reductions.  Also require
15961         the number of vector elements to be a multiple of the number of
15962         SLP statements when doing variable-length unchained SLP reductions.
15963         Update call to vect_create_epilog_for_reduction.
15964         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
15965         and remove initial values.
15966         (duplicate_and_interleave): Make public.
15967         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
15968         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
15970 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15971             Alan Hayward  <alan.hayward@arm.com>
15972             David Sherwood  <david.sherwood@arm.com>
15974         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
15975         (can_duplicate_and_interleave_p): New function.
15976         (vect_get_and_check_slp_defs): Take the vector of statements
15977         rather than just the current one.  Remove excess parentheses.
15978         Restriction rejectinon of vect_constant_def and vect_external_def
15979         for variable-length vectors to boolean types, or types for which
15980         can_duplicate_and_interleave_p is false.
15981         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
15982         (duplicate_and_interleave): New function.
15983         (vect_get_constant_vectors): Use gimple_build_vector for
15984         constant-length vectors and suitable variable-length constant
15985         vectors.  Use duplicate_and_interleave for other variable-length
15986         vectors.  Don't defer the update when inserting new statements.
15988 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15989             Alan Hayward  <alan.hayward@arm.com>
15990             David Sherwood  <david.sherwood@arm.com>
15992         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
15993         min_profitable_iters doesn't go negative.
15995 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15996             Alan Hayward  <alan.hayward@arm.com>
15997             David Sherwood  <david.sherwood@arm.com>
15999         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
16000         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
16001         * optabs.def (vec_mask_load_lanes_optab): New optab.
16002         (vec_mask_store_lanes_optab): Likewise.
16003         * internal-fn.def (MASK_LOAD_LANES): New internal function.
16004         (MASK_STORE_LANES): Likewise.
16005         * internal-fn.c (mask_load_lanes_direct): New macro.
16006         (mask_store_lanes_direct): Likewise.
16007         (expand_mask_load_optab_fn): Handle masked operations.
16008         (expand_mask_load_lanes_optab_fn): New macro.
16009         (expand_mask_store_optab_fn): Handle masked operations.
16010         (expand_mask_store_lanes_optab_fn): New macro.
16011         (direct_mask_load_lanes_optab_supported_p): Likewise.
16012         (direct_mask_store_lanes_optab_supported_p): Likewise.
16013         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
16014         parameter.
16015         (vect_load_lanes_supported): Likewise.
16016         * tree-vect-data-refs.c (strip_conversion): New function.
16017         (can_group_stmts_p): Likewise.
16018         (vect_analyze_data_ref_accesses): Use it instead of checking
16019         for a pair of assignments.
16020         (vect_store_lanes_supported): Take a masked_p parameter.
16021         (vect_load_lanes_supported): Likewise.
16022         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
16023         vect_store_lanes_supported and vect_load_lanes_supported.
16024         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
16025         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
16026         parameter.  Don't allow gaps for masked accesses.
16027         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
16028         and vect_load_lanes_supported.
16029         (get_load_store_type): Take a masked_p parameter and update
16030         call to get_group_load_store_type.
16031         (vectorizable_store): Update call to get_load_store_type.
16032         Handle IFN_MASK_STORE_LANES.
16033         (vectorizable_load): Update call to get_load_store_type.
16034         Handle IFN_MASK_LOAD_LANES.
16036 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16037             Alan Hayward  <alan.hayward@arm.com>
16038             David Sherwood  <david.sherwood@arm.com>
16040         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
16041         modes for SVE.
16042         * config/aarch64/aarch64-protos.h
16043         (aarch64_sve_struct_memory_operand_p): Declare.
16044         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
16045         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
16046         (VPRED, vpred): Handle SVE structure modes.
16047         * config/aarch64/constraints.md (Utx): New constraint.
16048         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
16049         (aarch64_sve_struct_nonimmediate_operand): New predicates.
16050         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
16051         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
16052         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
16053         structure modes.  Split into pieces after RA.
16054         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
16055         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
16056         New patterns.
16057         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
16058         SVE structure modes.
16059         (aarch64_classify_address): Likewise.
16060         (sizetochar): Move earlier in file.
16061         (aarch64_print_operand): Handle SVE register lists.
16062         (aarch64_array_mode): New function.
16063         (aarch64_sve_struct_memory_operand_p): Likewise.
16064         (TARGET_ARRAY_MODE): Redefine.
16066 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16067             Alan Hayward  <alan.hayward@arm.com>
16068             David Sherwood  <david.sherwood@arm.com>
16070         * target.def (array_mode): New target hook.
16071         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
16072         * doc/tm.texi: Regenerate.
16073         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
16074         * hooks.c (hook_optmode_mode_uhwi_none): New function.
16075         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
16076         targetm.array_mode.
16077         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
16078         type sizes.
16080 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16081             Alan Hayward  <alan.hayward@arm.com>
16082             David Sherwood  <david.sherwood@arm.com>
16084         * fold-const.c (fold_binary_loc): Check the argument types
16085         rather than the result type when testing for a vector operation.
16087 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16089         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
16090         * doc/tm.texi: Regenerate.
16092 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16093             Alan Hayward  <alan.hayward@arm.com>
16094             David Sherwood  <david.sherwood@arm.com>
16096         * doc/invoke.texi (-msve-vector-bits=): Document new option.
16097         (sve): Document new AArch64 extension.
16098         * doc/md.texi (w): Extend the description of the AArch64
16099         constraint to include SVE vectors.
16100         (Upl, Upa): Document new AArch64 predicate constraints.
16101         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
16102         enum.
16103         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
16104         (msve-vector-bits=): New option.
16105         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
16106         SVE when these are disabled.
16107         (sve): New extension.
16108         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
16109         modes.  Adjust their number of units based on aarch64_sve_vg.
16110         (MAX_BITSIZE_MODE_ANY_MODE): Define.
16111         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
16112         aarch64_addr_query_type.
16113         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
16114         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
16115         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
16116         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
16117         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
16118         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
16119         (aarch64_simd_imm_zero_p): Delete.
16120         (aarch64_check_zero_based_sve_index_immediate): Declare.
16121         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16122         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16123         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16124         (aarch64_sve_float_mul_immediate_p): Likewise.
16125         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16126         rather than an rtx.
16127         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
16128         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
16129         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
16130         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
16131         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
16132         (aarch64_regmode_natural_size): Likewise.
16133         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
16134         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
16135         left one place.
16136         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
16137         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
16138         for VG and the SVE predicate registers.
16139         (V_ALIASES): Add a "z"-prefixed alias.
16140         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
16141         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
16142         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
16143         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
16144         (REG_CLASS_NAMES): Add entries for them.
16145         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
16146         and the predicate registers.
16147         (aarch64_sve_vg): Declare.
16148         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
16149         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
16150         (REGMODE_NATURAL_SIZE): Define.
16151         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
16152         SVE macros.
16153         * config/aarch64/aarch64.c: Include cfgrtl.h.
16154         (simd_immediate_info): Add a constructor for series vectors,
16155         and an associated step field.
16156         (aarch64_sve_vg): New variable.
16157         (aarch64_dbx_register_number): Handle VG and the predicate registers.
16158         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
16159         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
16160         (VEC_ANY_DATA, VEC_STRUCT): New constants.
16161         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
16162         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
16163         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
16164         (aarch64_get_mask_mode): New functions.
16165         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
16166         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
16167         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
16168         predicate modes and predicate registers.  Explicitly restrict
16169         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
16170         to store a vector mode if it is recognized by
16171         aarch64_classify_vector_mode.
16172         (aarch64_regmode_natural_size): New function.
16173         (aarch64_hard_regno_caller_save_mode): Return the original mode
16174         for predicates.
16175         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
16176         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
16177         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
16178         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
16179         functions.
16180         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
16181         does not overlap dest if the function is frame-related.  Handle
16182         SVE constants.
16183         (aarch64_split_add_offset): New function.
16184         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
16185         them aarch64_add_offset.
16186         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
16187         and update call to aarch64_sub_sp.
16188         (aarch64_add_cfa_expression): New function.
16189         (aarch64_expand_prologue): Pass extra temporary registers to the
16190         functions above.  Handle the case in which we need to emit new
16191         DW_CFA_expressions for registers that were originally saved
16192         relative to the stack pointer, but now have to be expressed
16193         relative to the frame pointer.
16194         (aarch64_output_mi_thunk): Pass extra temporary registers to the
16195         functions above.
16196         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
16197         IP0 and IP1 values for SVE frames.
16198         (aarch64_expand_vec_series): New function.
16199         (aarch64_expand_sve_widened_duplicate): Likewise.
16200         (aarch64_expand_sve_const_vector): Likewise.
16201         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
16202         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
16203         into the register, rather than emitting a SET directly.
16204         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
16205         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
16206         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
16207         (offset_9bit_signed_scaled_p): New functions.
16208         (aarch64_replicate_bitmask_imm): New function.
16209         (aarch64_bitmask_imm): Use it.
16210         (aarch64_cannot_force_const_mem): Reject expressions involving
16211         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
16212         (aarch64_classify_index): Handle SVE indices, by requiring
16213         a plain register index with a scale that matches the element size.
16214         (aarch64_classify_address): Handle SVE addresses.  Assert that
16215         the mode of the address is VOIDmode or an integer mode.
16216         Update call to aarch64_classify_symbol.
16217         (aarch64_classify_symbolic_expression): Update call to
16218         aarch64_classify_symbol.
16219         (aarch64_const_vec_all_in_range_p): New function.
16220         (aarch64_print_vector_float_operand): Likewise.
16221         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
16222         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
16223         and the FP immediates 1.0 and 0.5.
16224         (aarch64_print_address_internal): Handle SVE addresses.
16225         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
16226         (aarch64_regno_regclass): Handle predicate registers.
16227         (aarch64_secondary_reload): Handle big-endian reloads of SVE
16228         data modes.
16229         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
16230         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
16231         (aarch64_convert_sve_vector_bits): New function.
16232         (aarch64_override_options): Use it to handle -msve-vector-bits=.
16233         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16234         rather than an rtx.
16235         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
16236         Handle SVE vector and predicate modes.  Accept VL-based constants
16237         that need only one temporary register, and VL offsets that require
16238         no temporary registers.
16239         (aarch64_conditional_register_usage): Mark the predicate registers
16240         as fixed if SVE isn't available.
16241         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16242         Return true for SVE vector and predicate modes.
16243         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16244         rather than an unsigned int.  Handle SVE modes.
16245         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
16246         SVE modes.
16247         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16248         if SVE is enabled.
16249         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16250         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16251         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16252         (aarch64_sve_float_mul_immediate_p): New functions.
16253         (aarch64_sve_valid_immediate): New function.
16254         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16255         Explicitly reject structure modes.  Check for INDEX constants.
16256         Handle PTRUE and PFALSE constants.
16257         (aarch64_check_zero_based_sve_index_immediate): New function.
16258         (aarch64_simd_imm_zero_p): Delete.
16259         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16260         vector modes.  Accept constants in the range of CNT[BHWD].
16261         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16262         ask for an Advanced SIMD mode.
16263         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16264         (aarch64_simd_vector_alignment): Handle SVE predicates.
16265         (aarch64_vectorize_preferred_vector_alignment): New function.
16266         (aarch64_simd_vector_alignment_reachable): Use it instead of
16267         the vector size.
16268         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16269         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16270         functions.
16271         (MAX_VECT_LEN): Delete.
16272         (expand_vec_perm_d): Add a vec_flags field.
16273         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16274         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16275         (aarch64_evpc_ext): Don't apply a big-endian lane correction
16276         for SVE modes.
16277         (aarch64_evpc_rev): Rename to...
16278         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
16279         (aarch64_evpc_rev_global): New function.
16280         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16281         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16282         MAX_VECT_LEN.
16283         (aarch64_evpc_sve_tbl): New function.
16284         (aarch64_expand_vec_perm_const_1): Update after rename of
16285         aarch64_evpc_rev.  Handle SVE permutes too, trying
16286         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16287         than aarch64_evpc_tbl.
16288         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16289         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16290         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16291         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16292         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16293         (aarch64_expand_sve_vcond): New functions.
16294         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16295         of aarch64_vector_mode_p.
16296         (aarch64_dwarf_poly_indeterminate_value): New function.
16297         (aarch64_compute_pressure_classes): Likewise.
16298         (aarch64_can_change_mode_class): Likewise.
16299         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16300         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16301         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16302         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16303         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16304         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16305         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16306         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16307         constraints.
16308         (Dn, Dl, Dr): Accept const as well as const_vector.
16309         (Dz): Likewise.  Compare against CONST0_RTX.
16310         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16311         of "vector" where appropriate.
16312         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16313         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16314         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16315         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16316         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16317         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16318         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16319         (v_int_equiv): Extend to SVE modes.
16320         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16321         mode attributes.
16322         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16323         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16324         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16325         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16326         (SVE_COND_FP_CMP): New int iterators.
16327         (perm_hilo): Handle the new unpack unspecs.
16328         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16329         attributes.
16330         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16331         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16332         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16333         (aarch64_equality_operator, aarch64_constant_vector_operand)
16334         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16335         (aarch64_sve_nonimmediate_operand): Likewise.
16336         (aarch64_sve_general_operand): Likewise.
16337         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16338         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16339         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16340         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16341         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16342         (aarch64_sve_float_arith_immediate): Likewise.
16343         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16344         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16345         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16346         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16347         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16348         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16349         (aarch64_sve_float_arith_operand): Likewise.
16350         (aarch64_sve_float_arith_with_sub_operand): Likewise.
16351         (aarch64_sve_float_mul_operand): Likewise.
16352         (aarch64_sve_vec_perm_operand): Likewise.
16353         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16354         (aarch64_mov_operand): Accept const_poly_int and const_vector.
16355         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16356         as well as const_vector.
16357         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16358         in file.  Use CONST0_RTX and CONSTM1_RTX.
16359         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
16360         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16361         Use aarch64_simd_imm_zero.
16362         * config/aarch64/aarch64-sve.md: New file.
16363         * config/aarch64/aarch64.md: Include it.
16364         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16365         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16366         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16367         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16368         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16369         (sve): New attribute.
16370         (enabled): Disable instructions with the sve attribute unless
16371         TARGET_SVE.
16372         (movqi, movhi): Pass CONST_POLY_INT operaneds through
16373         aarch64_expand_mov_immediate.
16374         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16375         CNT[BHSD] immediates.
16376         (movti): Split CONST_POLY_INT moves into two halves.
16377         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16378         Split additions that need a temporary here if the destination
16379         is the stack pointer.
16380         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16381         (*add<mode>3_poly_1): New instruction.
16382         (set_clobber_cc): New expander.
16384 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16386         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16387         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
16388         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16389         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16390         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
16391         Change innermode from fixed_mode_size to machine_mode.
16392         (simplify_subreg): Update call accordingly.  Handle a constant-sized
16393         subreg of a variable-length CONST_VECTOR.
16395 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
16396             Alan Hayward  <alan.hayward@arm.com>
16397             David Sherwood  <david.sherwood@arm.com>
16399         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16400         (add_offset_to_base): New function, split out from...
16401         (create_mem_ref): ...here.  When handling a scale other than 1,
16402         check first whether the address is valid without the offset.
16403         Add it into the base if so, leaving the index and scale as-is.
16405 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
16407         PR c++/83778
16408         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16409         fold_for_warn before checking if arg2 is INTEGER_CST.
16411 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
16413         * config/rs6000/predicates.md (load_multiple_operation): Delete.
16414         (store_multiple_operation): Delete.
16415         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16416         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16417         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16418         guarded by TARGET_STRING.
16419         (rs6000_output_load_multiple): Delete.
16420         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16421         OPTION_MASK_STRING / TARGET_STRING handling.
16422         (print_operand) <'N', 'O'>: Add comment that these are unused now.
16423         (const rs6000_opt_masks) <"string">: Change mask to 0.
16424         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16425         (MASK_STRING): Delete.
16426         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16427         parts.  Simplify.
16428         (load_multiple): Delete.
16429         (*ldmsi8): Delete.
16430         (*ldmsi7): Delete.
16431         (*ldmsi6): Delete.
16432         (*ldmsi5): Delete.
16433         (*ldmsi4): Delete.
16434         (*ldmsi3): Delete.
16435         (store_multiple): Delete.
16436         (*stmsi8): Delete.
16437         (*stmsi7): Delete.
16438         (*stmsi6): Delete.
16439         (*stmsi5): Delete.
16440         (*stmsi4): Delete.
16441         (*stmsi3): Delete.
16442         (movmemsi_8reg): Delete.
16443         (corresponding unnamed define_insn): Delete.
16444         (movmemsi_6reg): Delete.
16445         (corresponding unnamed define_insn): Delete.
16446         (movmemsi_4reg): Delete.
16447         (corresponding unnamed define_insn): Delete.
16448         (movmemsi_2reg): Delete.
16449         (corresponding unnamed define_insn): Delete.
16450         (movmemsi_1reg): Delete.
16451         (corresponding unnamed define_insn): Delete.
16452         * config/rs6000/rs6000.opt (mno-string): New.
16453         (mstring): Replace by deprecation warning stub.
16454         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
16456 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
16458         * regrename.c (regrename_do_replace): If replacing the same
16459         reg multiple times, try to reuse last created gen_raw_REG.
16461         PR debug/81155
16462         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
16463         main to workaround a bug in GDB.
16465 2018-01-12  Tom de Vries  <tom@codesourcery.com>
16467         PR target/83737
16468         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
16470 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
16472         PR rtl-optimization/80481
16473         * ira-color.c (get_cap_member): New function.
16474         (allocnos_conflict_by_live_ranges_p): Use it.
16475         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
16476         (setup_slot_coalesced_allocno_live_ranges): Ditto.
16478 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
16480         PR target/83628
16481         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
16482         (*saddl_se_1): Ditto.
16483         (*ssubsi_1): Ditto.
16484         (*ssubl_se_1): Ditto.
16486 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16488         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
16489         rather than wi::to_widest for DR_INITs.
16490         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
16491         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
16492         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
16493         INTEGER_CSTs.
16494         (vect_analyze_group_access_1): Note that here.
16496 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16498         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
16499         polynomial type sizes.
16501 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
16503         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
16504         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
16505         (gimple_add_tmp_var): Likewise.
16507 2018-01-12  Martin Liska  <mliska@suse.cz>
16509         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
16510         (gimple_alloc_sizes): Likewise.
16511         (dump_gimple_statistics): Use PRIu64 in printf format.
16512         * gimple.h: Change uint64_t to int.
16514 2018-01-12  Martin Liska  <mliska@suse.cz>
16516         * tree-core.h: Use uint64_t instead of int.
16517         * tree.c (tree_node_counts): Likewise.
16518         (tree_node_sizes): Likewise.
16519         (dump_tree_statistics): Use PRIu64 in printf format.
16521 2018-01-12  Martin Liska  <mliska@suse.cz>
16523         * Makefile.in: As qsort_chk is implemented in vec.c, add
16524         vec.o to linkage of gencfn-macros.
16525         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
16526         passing the info to record_node_allocation_statistics.
16527         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
16528         and pass the info.
16529         * ggc-common.c (struct ggc_usage): Add operator== and use
16530         it in operator< and compare function.
16531         * mem-stats.h (struct mem_usage): Likewise.
16532         * vec.c (struct vec_usage): Remove operator< and compare
16533         function. Can be simply inherited.
16535 2018-01-12  Martin Jambor  <mjambor@suse.cz>
16537         PR target/81616
16538         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
16539         * tree-ssa-math-opts.c: Include domwalk.h.
16540         (convert_mult_to_fma_1): New function.
16541         (fma_transformation_info): New type.
16542         (fma_deferring_state): Likewise.
16543         (cancel_fma_deferring): New function.
16544         (result_of_phi): Likewise.
16545         (last_fma_candidate_feeds_initial_phi): Likewise.
16546         (convert_mult_to_fma): Added deferring logic, split actual
16547         transformation to convert_mult_to_fma_1.
16548         (math_opts_dom_walker): New type.
16549         (math_opts_dom_walker::after_dom_children): New method, body moved
16550         here from pass_optimize_widening_mul::execute, added deferring logic
16551         bits.
16552         (pass_optimize_widening_mul::execute): Moved most of code to
16553         math_opts_dom_walker::after_dom_children.
16554         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
16555         * config/i386/i386.c (ix86_option_override_internal): Added
16556         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
16558 2018-01-12  Richard Biener  <rguenther@suse.de>
16560         PR debug/83157
16561         * dwarf2out.c (gen_variable_die): Do not reset old_die for
16562         inline instance vars.
16564 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
16566         PR target/81819
16567         * config/rx/rx.c (rx_is_restricted_memory_address):
16568         Handle SUBREG case.
16570 2018-01-12  Richard Biener  <rguenther@suse.de>
16572         PR tree-optimization/80846
16573         * target.def (split_reduction): New target hook.
16574         * targhooks.c (default_split_reduction): New function.
16575         * targhooks.h (default_split_reduction): Declare.
16576         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
16577         target requests first reduce vectors by combining low and high
16578         parts.
16579         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
16580         (get_vectype_for_scalar_type_and_size): Export.
16581         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
16582         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
16583         * doc/tm.texi: Regenerate.
16584         * config/i386/i386.c (ix86_split_reduction): Implement
16585         TARGET_VECTORIZE_SPLIT_REDUCTION.
16587 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16589         PR target/83368
16590         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
16591         in PIC mode except for TARGET_VXWORKS_RTP.
16592         * config/sparc/sparc.c: Include cfgrtl.h.
16593         (TARGET_INIT_PIC_REG): Define.
16594         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
16595         (sparc_pic_register_p): New predicate.
16596         (sparc_legitimate_address_p): Use it.
16597         (sparc_legitimize_pic_address): Likewise.
16598         (sparc_delegitimize_address): Likewise.
16599         (sparc_mode_dependent_address_p): Likewise.
16600         (gen_load_pcrel_sym): Remove 4th parameter.
16601         (load_got_register): Adjust call to above.  Remove obsolete stuff.
16602         (sparc_expand_prologue): Do not call load_got_register here.
16603         (sparc_flat_expand_prologue): Likewise.
16604         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
16605         (sparc_use_pseudo_pic_reg): New function.
16606         (sparc_init_pic_reg): Likewise.
16607         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16608         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
16610 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
16612         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16613         Add item for branch_cost.
16615 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
16617         PR rtl-optimization/83565
16618         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
16619         not extend the result to a larger mode for rotate operations.
16620         (num_sign_bit_copies1): Likewise.
16622 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16624         PR target/40411
16625         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
16626         -symbolic.
16627         Use values-Xc.o for -pedantic.
16628         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
16630 2018-01-12  Martin Liska  <mliska@suse.cz>
16632         PR ipa/83054
16633         * ipa-devirt.c (final_warning_record::grow_type_warnings):
16634         New function.
16635         (possible_polymorphic_call_targets): Use it.
16636         (ipa_devirt): Likewise.
16638 2018-01-12  Martin Liska  <mliska@suse.cz>
16640         * profile-count.h (enum profile_quality): Use 0 as invalid
16641         enum value of profile_quality.
16643 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16645         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
16646         -mext-string options.
16648 2018-01-12  Richard Biener  <rguenther@suse.de>
16650         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
16651         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
16652         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
16653         Likewise.
16654         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
16656 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
16658         * configure.ac (--with-long-double-format): Add support for the
16659         configuration option to change the default long double format on
16660         PowerPC systems.
16661         * config.gcc (powerpc*-linux*-*): Likewise.
16662         * configure: Regenerate.
16663         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
16664         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
16665         used without modification.
16667 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16669         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
16670         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
16671         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
16672         MISC_BUILTIN_SPEC_BARRIER.
16673         (rs6000_init_builtins): Likewise.
16674         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
16675         enum value.
16676         (speculation_barrier): New define_insn.
16677         * doc/extend.texi: Document __builtin_speculation_barrier.
16679 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
16681         PR target/83203
16682         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
16683         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
16684         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
16685         iterators.
16686         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
16687         integral modes instead of "ss" and "sd".
16688         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
16689         vectors with 32-bit and 64-bit elements.
16690         (vecdupssescalarmodesuffix): New mode attribute.
16691         (vec_dup<mode>): Use it.
16693 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
16695         PR target/83330
16696         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
16697         frame if argument is passed on stack.
16699 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
16701         PR target/82682
16702         * ree.c (combine_reaching_defs): Optimize also
16703         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
16704         reg2=any_extend(exp); reg1=reg2;, formatting fix.
16706 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
16708         PR middle-end/83189
16709         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
16711 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
16713         PR middle-end/83718
16714         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
16715         after they are computed.
16717 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
16719         PR tree-optimization/83695
16720         * gimple-loop-linterchange.cc
16721         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
16722         reset cached scev information after interchange.
16723         (pass_linterchange::execute): Remove call to scev_reset_htab.
16725 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16727         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
16728         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
16729         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
16730         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
16731         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
16732         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
16733         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
16734         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
16735         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
16736         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
16737         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
16738         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
16739         (V_lane_reg): Likewise.
16740         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
16741         New define_expand.
16742         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
16743         (vfmal_lane_low<mode>_intrinsic,
16744         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
16745         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
16746         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
16747         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
16748         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
16749         vfmsl_lane_high<mode>_intrinsic): New define_insns.
16751 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16753         * config/arm/arm-cpus.in (fp16fml): New feature.
16754         (ALL_SIMD): Add fp16fml.
16755         (armv8.2-a): Add fp16fml as an option.
16756         (armv8.3-a): Likewise.
16757         (armv8.4-a): Add fp16fml as part of fp16.
16758         * config/arm/arm.h (TARGET_FP16FML): Define.
16759         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
16760         when appropriate.
16761         * config/arm/arm-modes.def (V2HF): Define.
16762         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
16763         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
16764         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
16765         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
16766         vfmsl_low, vfmsl_high): New set of builtins.
16767         * config/arm/iterators.md (PLUSMINUS): New code iterator.
16768         (vfml_op): New code attribute.
16769         (VFMLHALVES): New int iterator.
16770         (VFML, VFMLSEL): New mode attributes.
16771         (V_reg): Define mapping for V2HF.
16772         (V_hi, V_lo): New mode attributes.
16773         (VF_constraint): Likewise.
16774         (vfml_half, vfml_half_selector): New int attributes.
16775         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
16776         define_expand.
16777         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
16778         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
16779         New define_insn.
16780         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
16781         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
16782         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
16783         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
16784         documentation.
16785         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
16786         Document new effective target and option set.
16788 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16790         * config/arm/arm-cpus.in (armv8_4): New feature.
16791         (ARMv8_4a): New fgroup.
16792         (armv8.4-a): New arch.
16793         * config/arm/arm-tables.opt: Regenerate.
16794         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
16795         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
16796         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
16797         Add matching rules for -march=armv8.4-a and extensions.
16798         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
16800 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
16802         PR target/81821
16803         * config/rx/rx.md (BW): New mode attribute.
16804         (sync_lock_test_and_setsi): Add mode suffix to insn output.
16806 2018-01-11  Richard Biener  <rguenther@suse.de>
16808         PR tree-optimization/83435
16809         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
16810         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
16811         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
16813 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16814             Alan Hayward  <alan.hayward@arm.com>
16815             David Sherwood  <david.sherwood@arm.com>
16817         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
16818         field.
16819         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
16820         (aarch64_print_address_internal): Use it to check for a zero offset.
16822 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16823             Alan Hayward  <alan.hayward@arm.com>
16824             David Sherwood  <david.sherwood@arm.com>
16826         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
16827         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
16828         Return a poly_int64 rather than a HOST_WIDE_INT.
16829         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
16830         rather than a HOST_WIDE_INT.
16831         * config/aarch64/aarch64.h (aarch64_frame): Protect with
16832         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
16833         hard_fp_offset, frame_size, initial_adjust, callee_offset and
16834         final_offset from HOST_WIDE_INT to poly_int64.
16835         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
16836         to_constant when getting the number of units in an Advanced SIMD
16837         mode.
16838         (aarch64_builtin_vectorized_function): Check for a constant number
16839         of units.
16840         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
16841         GET_MODE_SIZE.
16842         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
16843         attribute instead of GET_MODE_NUNITS.
16844         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
16845         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
16846         GET_MODE_SIZE for fixed-size registers.
16847         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
16848         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
16849         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
16850         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
16851         (aarch64_print_operand, aarch64_print_address_internal)
16852         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
16853         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
16854         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
16855         Handle polynomial GET_MODE_SIZE.
16856         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
16857         wider than SImode without modification.
16858         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
16859         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
16860         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
16861         passing and returning SVE modes.
16862         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
16863         rather than GEN_INT.
16864         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
16865         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
16866         (aarch64_allocate_and_probe_stack_space): Likewise.
16867         (aarch64_layout_frame): Cope with polynomial offsets.
16868         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
16869         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
16870         polynomial offsets.
16871         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
16872         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
16873         poly_int64 rather than a HOST_WIDE_INT.
16874         (aarch64_get_separate_components, aarch64_process_components)
16875         (aarch64_expand_prologue, aarch64_expand_epilogue)
16876         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
16877         (aarch64_anchor_offset): New function, split out from...
16878         (aarch64_legitimize_address): ...here.
16879         (aarch64_builtin_vectorization_cost): Handle polynomial
16880         TYPE_VECTOR_SUBPARTS.
16881         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
16882         GET_MODE_NUNITS.
16883         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
16884         number of elements from the PARALLEL rather than the mode.
16885         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
16886         rather than GET_MODE_BITSIZE.
16887         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
16888         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
16889         (aarch64_expand_vec_perm_const_1): Handle polynomial
16890         d->perm.length () and d->perm elements.
16891         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
16892         Apply to_constant to d->perm elements.
16893         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
16894         polynomial CONST_VECTOR_NUNITS.
16895         (aarch64_move_pointer): Take amount as a poly_int64 rather
16896         than an int.
16897         (aarch64_progress_pointer): Avoid temporary variable.
16898         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
16899         the mode attribute instead of GET_MODE.
16901 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16902             Alan Hayward  <alan.hayward@arm.com>
16903             David Sherwood  <david.sherwood@arm.com>
16905         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
16906         x exists before using it.
16907         (aarch64_add_constant_internal): Rename to...
16908         (aarch64_add_offset_1): ...this.  Replace regnum with separate
16909         src and dest rtxes.  Handle the case in which they're different,
16910         including when the offset is zero.  Replace scratchreg with an rtx.
16911         Use 2 additions if there is no spare register into which we can
16912         move a 16-bit constant.
16913         (aarch64_add_constant): Delete.
16914         (aarch64_add_offset): Replace reg with separate src and dest
16915         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
16916         Use aarch64_add_offset_1.
16917         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
16918         an rtx rather than an int.  Take the delta as a poly_int64
16919         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
16920         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
16921         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
16922         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
16923         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
16924         and aarch64_add_sp.
16925         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
16926         aarch64_add_constant.
16928 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16930         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
16931         Use scalar_float_mode.
16933 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16935         * config/aarch64/aarch64-simd.md
16936         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
16937         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
16938         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
16939         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
16940         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
16941         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
16942         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
16943         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
16944         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
16945         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
16947 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16949         PR target/83514
16950         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
16951         targ_options->x_arm_arch_string is non NULL.
16953 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
16955         * config/aarch64/aarch64.h
16956         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
16958 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
16960         PR target/82096
16961         * expmed.c (emit_store_flag_force): Swap if const op0
16962         and change VOIDmode to mode of op0.
16964 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
16966         PR rtl-optimization/83761
16967         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
16968         than bytes to mode_for_size.
16970 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16972         PR middle-end/83189
16973         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
16974         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
16975         profile.
16977 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16979         PR middle-end/83575
16980         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
16981         when in layout mode.
16982         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
16983         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
16984         partition fixup.
16986 2018-01-10  Michael Collison  <michael.collison@arm.com>
16988         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
16989         * config/aarch64/aarch64-option-extension.def: Add
16990         AARCH64_OPT_EXTENSION of 'fp16fml'.
16991         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16992         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
16993         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
16994         * config/aarch64/constraints.md (Ui7): New constraint.
16995         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
16996         (VFMLA_SEL_W): Ditto.
16997         (f16quad): Ditto.
16998         (f16mac1): Ditto.
16999         (VFMLA16_LOW): New int iterator.
17000         (VFMLA16_HIGH): Ditto.
17001         (UNSPEC_FMLAL): New unspec.
17002         (UNSPEC_FMLSL): Ditto.
17003         (UNSPEC_FMLAL2): Ditto.
17004         (UNSPEC_FMLSL2): Ditto.
17005         (f16mac): New code attribute.
17006         * config/aarch64/aarch64-simd-builtins.def
17007         (aarch64_fmlal_lowv2sf): Ditto.
17008         (aarch64_fmlsl_lowv2sf): Ditto.
17009         (aarch64_fmlalq_lowv4sf): Ditto.
17010         (aarch64_fmlslq_lowv4sf): Ditto.
17011         (aarch64_fmlal_highv2sf): Ditto.
17012         (aarch64_fmlsl_highv2sf): Ditto.
17013         (aarch64_fmlalq_highv4sf): Ditto.
17014         (aarch64_fmlslq_highv4sf): Ditto.
17015         (aarch64_fmlal_lane_lowv2sf): Ditto.
17016         (aarch64_fmlsl_lane_lowv2sf): Ditto.
17017         (aarch64_fmlal_laneq_lowv2sf): Ditto.
17018         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
17019         (aarch64_fmlalq_lane_lowv4sf): Ditto.
17020         (aarch64_fmlsl_lane_lowv4sf): Ditto.
17021         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
17022         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
17023         (aarch64_fmlal_lane_highv2sf): Ditto.
17024         (aarch64_fmlsl_lane_highv2sf): Ditto.
17025         (aarch64_fmlal_laneq_highv2sf): Ditto.
17026         (aarch64_fmlsl_laneq_highv2sf): Ditto.
17027         (aarch64_fmlalq_lane_highv4sf): Ditto.
17028         (aarch64_fmlsl_lane_highv4sf): Ditto.
17029         (aarch64_fmlalq_laneq_highv4sf): Ditto.
17030         (aarch64_fmlsl_laneq_highv4sf): Ditto.
17031         * config/aarch64/aarch64-simd.md:
17032         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
17033         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17034         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
17035         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
17036         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
17037         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
17038         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
17039         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
17040         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
17041         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
17042         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
17043         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
17044         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
17045         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
17046         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
17047         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
17048         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
17049         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
17050         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
17051         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
17052         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
17053         (vfmlsl_low_u32): Ditto.
17054         (vfmlalq_low_u32): Ditto.
17055         (vfmlslq_low_u32): Ditto.
17056         (vfmlal_high_u32): Ditto.
17057         (vfmlsl_high_u32): Ditto.
17058         (vfmlalq_high_u32): Ditto.
17059         (vfmlslq_high_u32): Ditto.
17060         (vfmlal_lane_low_u32): Ditto.
17061         (vfmlsl_lane_low_u32): Ditto.
17062         (vfmlal_laneq_low_u32): Ditto.
17063         (vfmlsl_laneq_low_u32): Ditto.
17064         (vfmlalq_lane_low_u32): Ditto.
17065         (vfmlslq_lane_low_u32): Ditto.
17066         (vfmlalq_laneq_low_u32): Ditto.
17067         (vfmlslq_laneq_low_u32): Ditto.
17068         (vfmlal_lane_high_u32): Ditto.
17069         (vfmlsl_lane_high_u32): Ditto.
17070         (vfmlal_laneq_high_u32): Ditto.
17071         (vfmlsl_laneq_high_u32): Ditto.
17072         (vfmlalq_lane_high_u32): Ditto.
17073         (vfmlslq_lane_high_u32): Ditto.
17074         (vfmlalq_laneq_high_u32): Ditto.
17075         (vfmlslq_laneq_high_u32): Ditto.
17076         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
17077         (AARCH64_FL_FOR_ARCH8_4): New.
17078         (AARCH64_ISA_F16FML): New ISA flag.
17079         (TARGET_F16FML): New feature flag for fp16fml.
17080         (doc/invoke.texi): Document new fp16fml option.
17082 2018-01-10  Michael Collison  <michael.collison@arm.com>
17084         * config/aarch64/aarch64-builtins.c:
17085         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
17086         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17087         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
17088         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
17089         (AARCH64_ISA_SHA3): New ISA flag.
17090         (TARGET_SHA3): New feature flag for sha3.
17091         * config/aarch64/iterators.md (sha512_op): New int attribute.
17092         (CRYPTO_SHA512): New int iterator.
17093         (UNSPEC_SHA512H): New unspec.
17094         (UNSPEC_SHA512H2): Ditto.
17095         (UNSPEC_SHA512SU0): Ditto.
17096         (UNSPEC_SHA512SU1): Ditto.
17097         * config/aarch64/aarch64-simd-builtins.def
17098         (aarch64_crypto_sha512hqv2di): New builtin.
17099         (aarch64_crypto_sha512h2qv2di): Ditto.
17100         (aarch64_crypto_sha512su0qv2di): Ditto.
17101         (aarch64_crypto_sha512su1qv2di): Ditto.
17102         (aarch64_eor3qv8hi): Ditto.
17103         (aarch64_rax1qv2di): Ditto.
17104         (aarch64_xarqv2di): Ditto.
17105         (aarch64_bcaxqv8hi): Ditto.
17106         * config/aarch64/aarch64-simd.md:
17107         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
17108         (aarch64_crypto_sha512su0qv2di): Ditto.
17109         (aarch64_crypto_sha512su1qv2di): Ditto.
17110         (aarch64_eor3qv8hi): Ditto.
17111         (aarch64_rax1qv2di): Ditto.
17112         (aarch64_xarqv2di): Ditto.
17113         (aarch64_bcaxqv8hi): Ditto.
17114         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
17115         (vsha512h2q_u64): Ditto.
17116         (vsha512su0q_u64): Ditto.
17117         (vsha512su1q_u64): Ditto.
17118         (veor3q_u16): Ditto.
17119         (vrax1q_u64): Ditto.
17120         (vxarq_u64): Ditto.
17121         (vbcaxq_u16): Ditto.
17122         * config/arm/types.md (crypto_sha512): New type attribute.
17123         (crypto_sha3): Ditto.
17124         (doc/invoke.texi): Document new sha3 option.
17126 2018-01-10  Michael Collison  <michael.collison@arm.com>
17128         * config/aarch64/aarch64-builtins.c:
17129         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
17130         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17131         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
17132         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
17133         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
17134         (AARCH64_ISA_SM4): New ISA flag.
17135         (TARGET_SM4): New feature flag for sm4.
17136         * config/aarch64/aarch64-simd-builtins.def
17137         (aarch64_sm3ss1qv4si): Ditto.
17138         (aarch64_sm3tt1aq4si): Ditto.
17139         (aarch64_sm3tt1bq4si): Ditto.
17140         (aarch64_sm3tt2aq4si): Ditto.
17141         (aarch64_sm3tt2bq4si): Ditto.
17142         (aarch64_sm3partw1qv4si): Ditto.
17143         (aarch64_sm3partw2qv4si): Ditto.
17144         (aarch64_sm4eqv4si): Ditto.
17145         (aarch64_sm4ekeyqv4si): Ditto.
17146         * config/aarch64/aarch64-simd.md:
17147         (aarch64_sm3ss1qv4si): Ditto.
17148         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
17149         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
17150         (aarch64_sm4eqv4si): Ditto.
17151         (aarch64_sm4ekeyqv4si): Ditto.
17152         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
17153         (sm3part_op): Ditto.
17154         (CRYPTO_SM3TT): Ditto.
17155         (CRYPTO_SM3PART): Ditto.
17156         (UNSPEC_SM3SS1): New unspec.
17157         (UNSPEC_SM3TT1A): Ditto.
17158         (UNSPEC_SM3TT1B): Ditto.
17159         (UNSPEC_SM3TT2A): Ditto.
17160         (UNSPEC_SM3TT2B): Ditto.
17161         (UNSPEC_SM3PARTW1): Ditto.
17162         (UNSPEC_SM3PARTW2): Ditto.
17163         (UNSPEC_SM4E): Ditto.
17164         (UNSPEC_SM4EKEY): Ditto.
17165         * config/aarch64/constraints.md (Ui2): New constraint.
17166         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
17167         * config/arm/types.md (crypto_sm3): New type attribute.
17168         (crypto_sm4): Ditto.
17169         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
17170         (vsm3tt1aq_u32): Ditto.
17171         (vsm3tt1bq_u32): Ditto.
17172         (vsm3tt2aq_u32): Ditto.
17173         (vsm3tt2bq_u32): Ditto.
17174         (vsm3partw1q_u32): Ditto.
17175         (vsm3partw2q_u32): Ditto.
17176         (vsm4eq_u32): Ditto.
17177         (vsm4ekeyq_u32): Ditto.
17178         (doc/invoke.texi): Document new sm4 option.
17180 2018-01-10  Michael Collison  <michael.collison@arm.com>
17182         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
17183         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
17184         (AARCH64_FL_FOR_ARCH8_4): New.
17185         (AARCH64_FL_V8_4): New flag.
17186         (doc/invoke.texi): Document new armv8.4-a option.
17188 2018-01-10  Michael Collison  <michael.collison@arm.com>
17190         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
17191         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
17192         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
17193         * config/aarch64/aarch64-option-extension.def: Add
17194         AARCH64_OPT_EXTENSION of 'sha2'.
17195         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
17196         (crypto): Disable sha2 and aes if crypto disabled.
17197         (crypto): Enable aes and sha2 if enabled.
17198         (simd): Disable sha2 and aes if simd disabled.
17199         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
17200         New flags.
17201         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
17202         (TARGET_SHA2): New feature flag for sha2.
17203         (TARGET_AES): New feature flag for aes.
17204         * config/aarch64/aarch64-simd.md:
17205         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
17206         conditional on TARGET_AES.
17207         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
17208         (aarch64_crypto_sha1hsi): Make pattern conditional
17209         on TARGET_SHA2.
17210         (aarch64_crypto_sha1hv4si): Ditto.
17211         (aarch64_be_crypto_sha1hv4si): Ditto.
17212         (aarch64_crypto_sha1su1v4si): Ditto.
17213         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
17214         (aarch64_crypto_sha1su0v4si): Ditto.
17215         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
17216         (aarch64_crypto_sha256su0v4si): Ditto.
17217         (aarch64_crypto_sha256su1v4si): Ditto.
17218         (doc/invoke.texi): Document new aes and sha2 options.
17220 2018-01-10  Martin Sebor  <msebor@redhat.com>
17222         PR tree-optimization/83781
17223         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
17224         as string arrays.
17226 2018-01-11  Martin Sebor  <msebor@gmail.com>
17227             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17229         PR tree-optimization/83501
17230         PR tree-optimization/81703
17232         * tree-ssa-strlen.c (get_string_cst): Rename...
17233         (get_string_len): ...to this.  Handle global constants.
17234         (handle_char_store): Adjust.
17236 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
17237             Jim Wilson  <jimw@sifive.com>
17239         * config/riscv/riscv-protos.h (riscv_output_return): New.
17240         * config/riscv/riscv.c (struct machine_function): New naked_p field.
17241         (riscv_attribute_table, riscv_output_return),
17242         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17243         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17244         (riscv_compute_frame_info): Only compute frame->mask if not a naked
17245         function.
17246         (riscv_expand_prologue): Add early return for naked function.
17247         (riscv_expand_epilogue): Likewise.
17248         (riscv_function_ok_for_sibcall): Return false for naked function.
17249         (riscv_set_current_function): New.
17250         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17251         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17252         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17253         * doc/extend.texi (RISC-V Function Attributes): New.
17255 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
17257         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17258         check for 128-bit long double before checking TCmode.
17259         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17260         128-bit long doubles before checking TFmode or TCmode.
17261         (FLOAT128_IBM_P): Likewise.
17263 2018-01-10  Martin Sebor  <msebor@redhat.com>
17265         PR tree-optimization/83671
17266         * builtins.c (c_strlen): Unconditionally return zero for the empty
17267         string.
17268         Use -Warray-bounds for warnings.
17269         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17270         for non-constant array indices with COMPONENT_REF, arrays of
17271         arrays, and pointers to arrays.
17272         (gimple_fold_builtin_strlen): Determine and set length range for
17273         non-constant character arrays.
17275 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
17277         PR middle-end/81897
17278         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17279         empty blocks.
17281 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
17283         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17285 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17287         PR target/83399
17288         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17289         VECTOR_MEM_ALTIVEC_OR_VSX_P.
17290         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17291         indexed_or_indirect_operand predicate.
17292         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17293         (*vsx_le_perm_load_v8hi): Likewise.
17294         (*vsx_le_perm_load_v16qi): Likewise.
17295         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17296         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17297         (*vsx_le_perm_store_v8hi): Likewise.
17298         (*vsx_le_perm_store_v16qi): Likewise.
17299         (eight unnamed splitters): Likewise.
17301 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
17303         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17304         * config/rs6000/emmintrin.h: Likewise.
17305         * config/rs6000/mmintrin.h: Likewise.
17306         * config/rs6000/xmmintrin.h: Likewise.
17308 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
17310         PR c++/43486
17311         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17312         "public_flag".
17313         * tree.c (tree_nop_conversion): Return true for location wrapper
17314         nodes.
17315         (maybe_wrap_with_location): New function.
17316         (selftest::check_strip_nops): New function.
17317         (selftest::test_location_wrappers): New function.
17318         (selftest::tree_c_tests): Call it.
17319         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17320         (maybe_wrap_with_location): New decl.
17321         (EXPR_LOCATION_WRAPPER_P): New macro.
17322         (location_wrapper_p): New inline function.
17323         (tree_strip_any_location_wrapper): New inline function.
17325 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
17327         PR target/83735
17328         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17329         stack_realign_offset for the largest alignment of stack slot
17330         actually used.
17331         (ix86_find_max_used_stack_alignment): New function.
17332         (ix86_finalize_stack_frame_flags): Use it.  Set
17333         max_used_stack_alignment if we don't realign stack.
17334         * config/i386/i386.h (machine_function): Add
17335         max_used_stack_alignment.
17337 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
17339         * config/arm/arm.opt (-mbranch-cost): New option.
17340         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17341         account.
17343 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
17345         PR target/83629
17346         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17347         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17349 2018-01-10  Richard Biener  <rguenther@suse.de>
17351         PR debug/83765
17352         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17353         early out so it also covers the case where we have a non-NULL
17354         origin.
17356 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17358         PR tree-optimization/83753
17359         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17360         for non-strided grouped accesses if the number of elements is 1.
17362 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
17364         PR target/81616
17365         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17366         * i386.h (TARGET_USE_GATHER): Define.
17367         * x86-tune.def (X86_TUNE_USE_GATHER): New.
17369 2018-01-10  Martin Liska  <mliska@suse.cz>
17371         PR bootstrap/82831
17372         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17373         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17374         partitioning.
17375         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17376         CLEANUP_NO_PARTITIONING is not set.
17378 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
17380         * doc/rtl.texi: Remove documentation of (const ...) wrappers
17381         for vectors, as a partial revert of r254296.
17382         * rtl.h (const_vec_p): Delete.
17383         (const_vec_duplicate_p): Don't test for vector CONSTs.
17384         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17385         * expmed.c (make_tree): Likewise.
17387         Revert:
17388         * common.md (E, F): Use CONSTANT_P instead of checking for
17389         CONST_VECTOR.
17390         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17391         checking for CONST_VECTOR.
17393 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17395         PR middle-end/83575
17396         * predict.c (force_edge_cold): Handle in more sane way edges
17397         with no prediction.
17399 2018-01-09  Carl Love  <cel@us.ibm.com>
17401         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17402         V4SI, V4SF types.
17403         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17404         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17405         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17406         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
17407         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17408         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
17409         * config/rs6000/rs6000-protos.h: Add extern defition for
17410         rs6000_generate_float2_double_code.
17411         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17412         function.
17413         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17414         (float2_v2df): Add define_expand.
17416 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
17418         PR target/83628
17419         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17420         op_mode in the force_to_mode call.
17422 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17424         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17425         instead of checking each element individually.
17426         (aarch64_evpc_uzp): Likewise.
17427         (aarch64_evpc_zip): Likewise.
17428         (aarch64_evpc_ext): Likewise.
17429         (aarch64_evpc_rev): Likewise.
17430         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17431         instead of checking each element individually.  Return true without
17432         generating rtl if
17433         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17434         whether all selected elements come from the same input, instead of
17435         checking each element individually.  Remove calls to gen_rtx_REG,
17436         start_sequence and end_sequence and instead assert that no rtl is
17437         generated.
17439 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17441         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17442         order of HIGH and CONST checks.
17444 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
17446         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17447         if the destination isn't an SSA_NAME.
17449 2018-01-09  Richard Biener  <rguenther@suse.de>
17451         PR tree-optimization/83668
17452         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
17453         move prologue...
17454         (canonicalize_loop_form): ... here, renamed from ...
17455         (canonicalize_loop_closed_ssa_form): ... this and amended to
17456         swap successor edges for loop exit blocks to make us use
17457         the RPO order we need for initial schedule generation.
17459 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
17461         PR tree-optimization/64811
17462         * match.pd: When optimizing comparisons with Inf, avoid
17463         introducing or losing exceptions from comparisons with NaN.
17465 2018-01-09  Martin Liska  <mliska@suse.cz>
17467         PR sanitizer/82517
17468         * asan.c (shadow_mem_size): Add gcc_assert.
17470 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
17472         Don't save registers in main().
17474         PR target/83738
17475         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
17476         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
17477         * config/avr/avr.c (avr_set_current_function): Don't error if
17478         naked, OS_task or OS_main are specified at the same time.
17479         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
17480         OS_main.
17481         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
17482         attribute.
17483         * common/config/avr/avr-common.c (avr_option_optimization_table):
17484         Switch on -mmain-is-OS_task for optimizing compilations.
17486 2018-01-09  Richard Biener  <rguenther@suse.de>
17488         PR tree-optimization/83572
17489         * graphite.c: Include cfganal.h.
17490         (graphite_transform_loops): Connect infinite loops to exit
17491         and remove fake edges at the end.
17493 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17495         * ipa-inline.c (edge_badness): Revert accidental checkin.
17497 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
17499         PR ipa/80763
17500         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
17501         symbols; not inline clones.
17503 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
17505         PR target/83507
17506         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
17507         hard registers.  Formatting fixes.
17509         PR preprocessor/83722
17510         * gcc.c (try_generate_repro): Pass
17511         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
17512         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
17513         do_report_bug.
17515 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
17516             Kito Cheng  <kito.cheng@gmail.com>
17518         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
17519         (riscv_leaf_function_p): Delete.
17520         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
17522 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17524         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
17525         function.
17526         (do_ifelse): New function.
17527         (do_isel): New function.
17528         (do_sub3): New function.
17529         (do_add3): New function.
17530         (do_load_mask_compare): New function.
17531         (do_overlap_load_compare): New function.
17532         (expand_compare_loop): New function.
17533         (expand_block_compare): Call expand_compare_loop() when appropriate.
17534         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
17535         option description.
17536         (-mblock-compare-inline-loop-limit): New option.
17538 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17540         PR target/83677
17541         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
17542         Reverse order of second and third operands in first alternative.
17543         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
17544         of first and second elements in UNSPEC_VPERMR vector.
17545         (altivec_expand_vec_perm_le): Likewise.
17547 2018-01-08  Jeff Law  <law@redhat.com>
17549         PR rtl-optimizatin/81308
17550         * tree-switch-conversion.c (cfg_altered): New file scoped static.
17551         (process_switch): If group_case_labels makes a change, then set
17552         cfg_altered.
17553         (pass_convert_switch::execute): If a switch is converted, then
17554         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
17556         PR rtl-optimization/81308
17557         * recog.c (split_all_insns): Conditionally cleanup the CFG after
17558         splitting insns.
17560 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
17562         PR target/83663 - Revert r255946
17563         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
17564         generation for cases where splatting a value is not useful.
17565         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
17566         across a vec_duplicate and a paradoxical subreg forming a vector
17567         mode to a vec_concat.
17569 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17571         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
17572         -march=armv8.3-a variants.
17573         * config/arm/t-multilib: Likewise.
17574         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
17576 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17578         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
17579         to generate rtl.
17580         (cceq_ior_compare_complement): Give it a name so I can use it, and
17581         change boolean_or_operator predicate to boolean_operator so it can
17582         be used to generate a crand.
17583         (eqne): New code iterator.
17584         (bd/bd_neg): New code_attrs.
17585         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
17586         a single define_insn.
17587         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
17588         decrement (bdnzt/bdnzf/bdzt/bdzf).
17589         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
17590         with the new names of the branch decrement patterns, and added the
17591         names of the branch decrement conditional patterns.
17593 2018-01-08  Richard Biener  <rguenther@suse.de>
17595         PR tree-optimization/83563
17596         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
17597         cache.
17599 2018-01-08  Richard Biener  <rguenther@suse.de>
17601         PR middle-end/83713
17602         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
17604 2018-01-08  Richard Biener  <rguenther@suse.de>
17606         PR tree-optimization/83685
17607         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
17608         references to abnormals.
17610 2018-01-08  Richard Biener  <rguenther@suse.de>
17612         PR lto/83719
17613         * dwarf2out.c (output_indirect_strings): Handle empty
17614         skeleton_debug_str_hash.
17615         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
17617 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
17619         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
17620         (emit_store_direct): Likewise.
17621         (arc_trampoline_adjust_address): Likewise.
17622         (arc_asm_trampoline_template): New function.
17623         (arc_initialize_trampoline): Use asm_trampoline_template.
17624         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
17625         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
17626         * config/arc/arc.md (flush_icache): Delete pattern.
17628 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
17630         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
17631         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
17632         munaligned-access.
17634 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17636         PR target/83681
17637         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
17638         by not USED_FOR_TARGET.
17639         (make_pass_resolve_sw_modes): Likewise.
17641 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17643         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
17644         USED_FOR_TARGET.
17646 2018-01-08  Richard Biener  <rguenther@suse.de>
17648         PR middle-end/83580
17649         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
17651 2018-01-08  Richard Biener  <rguenther@suse.de>
17653         PR middle-end/83517
17654         * match.pd ((t * 2) / 2) -> t): Add missing :c.
17656 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
17658         PR middle-end/81897
17659         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
17660         basic blocks with a small number of successors.
17661         (convert_control_dep_chain_into_preds): Improve handling of
17662         forwarder blocks.
17663         (dump_predicates): Split apart into...
17664         (dump_pred_chain): ...here...
17665         (dump_pred_info): ...and here.
17666         (can_one_predicate_be_invalidated_p): Add debugging printfs.
17667         (can_chain_union_be_invalidated_p): Improve check for invalidation
17668         of paths.
17669         (uninit_uses_cannot_happen): Avoid unnecessary if
17670         convert_control_dep_chain_into_preds yielded nothing.
17672 2018-01-06  Martin Sebor  <msebor@redhat.com>
17674         PR tree-optimization/83640
17675         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
17676         subtracting negative offset from size.
17677         (builtin_access::overlap): Adjust offset bounds of the access to fall
17678         within the size of the object if possible.
17680 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
17682         PR rtl-optimization/83699
17683         * expmed.c (extract_bit_field_1): Restrict the vector usage of
17684         extract_bit_field_as_subreg to cases in which the extracted
17685         value is also a vector.
17687         * lra-constraints.c (process_alt_operands): Test for the equivalence
17688         substitutions when detecting a possible reload cycle.
17690 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
17692         PR debug/83480
17693         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
17694         by default if flag_selective_schedling{,2}.  Formatting fixes.
17696         PR rtl-optimization/83682
17697         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
17698         if it has non-VECTOR_MODE element mode.
17699         (vec_duplicate_p): Likewise.
17701         PR middle-end/83694
17702         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
17703         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
17705 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
17707         PR target/83604
17708         * config/i386/i386-builtin.def
17709         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
17710         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
17711         Require also OPTION_MASK_ISA_AVX512F in addition to
17712         OPTION_MASK_ISA_GFNI.
17713         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
17714         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
17715         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
17716         to OPTION_MASK_ISA_GFNI.
17717         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
17718         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
17719         OPTION_MASK_ISA_AVX512BW.
17720         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
17721         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
17722         addition to OPTION_MASK_ISA_GFNI.
17723         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
17724         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
17725         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
17726         to OPTION_MASK_ISA_GFNI.
17727         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
17728         a requirement for all ISAs rather than any of them with a few
17729         exceptions.
17730         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
17731         processing.
17732         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
17733         bitmasks to be enabled with 3 exceptions, instead of requiring any
17734         enabled ISA with lots of exceptions.
17735         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
17736         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
17737         Change avx512bw in isa attribute to avx512f.
17738         * config/i386/sgxintrin.h: Add license boilerplate.
17739         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
17740         to __AVX512F__ and __AVX512VL to __AVX512VL__.
17741         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
17742         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
17743         defined.
17744         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
17745         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
17746         temporarily sse2 rather than sse if not enabled already.
17748         PR target/83604
17749         * config/i386/sse.md (VI248_VLBW): Rename to ...
17750         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
17751         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
17752         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
17753         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
17754         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
17755         mode iterator instead of VI248_VLBW.
17757 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
17759         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
17760         (record_modified): Skip clobbers; add debug output.
17761         (param_change_prob): Use sreal frequencies.
17763 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
17765         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
17766         punt for user-aligned variables.
17768 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
17770         * tree-chrec.c (chrec_contains_symbols): Return true for
17771         POLY_INT_CST.
17773 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
17775         PR target/82439
17776         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
17777         of (x|y) == x for BICS pattern.
17779 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
17781         PR tree-optimization/83605
17782         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
17783         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
17784         can throw.
17786 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17788         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
17789         * config/epiphany/rtems.h: New file.
17791 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17792             Uros Bizjak  <ubizjak@gmail.com>
17794         PR target/83554
17795         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
17796         QIreg_operand instead of register_operand predicate.
17797         * config/i386/i386.c (ix86_rop_should_change_byte_p,
17798         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
17799         comments instead of -fmitigate[-_]rop.
17801 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17803         PR bootstrap/81926
17804         * cgraphunit.c (symbol_table::compile): Switch to text_section
17805         before calling assembly_start debug hook.
17806         * run-rtl-passes.c (run_rtl_passes): Likewise.
17807         Include output.h.
17809 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17811         * tree-vrp.c (extract_range_from_binary_expr_1): Check
17812         range_int_cst_p rather than !symbolic_range_p before calling
17813         extract_range_from_multiplicative_op_1.
17815 2018-01-04  Jeff Law  <law@redhat.com>
17817         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
17818         redundant test in assertion.
17820 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17822         * doc/rtl.texi: Document machine_mode wrapper classes.
17824 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17826         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
17827         using tree_to_uhwi.
17829 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17831         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
17832         the VEC_PERM_EXPR fold to fail.
17834 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17836         PR debug/83585
17837         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
17838         to switched_sections.
17840 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17842         PR target/83680
17843         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
17844         test for d.testing.
17846 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
17848         PR target/83387
17849         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
17850         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
17852 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17854         PR debug/83666
17855         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
17856         is BLKmode and bitpos not zero or mode change is needed.
17858 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
17860         PR target/83675
17861         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
17862         TARGET_VIS2.
17864 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
17866         PR target/83628
17867         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
17868         instead of MULT rtx.  Update all corresponding splitters.
17869         (*saddl_se): Ditto.
17870         (*ssub<modesuffix>): Ditto.
17871         (*ssubl_se): Ditto.
17872         (*cmp_sadd_di): Update split patterns.
17873         (*cmp_sadd_si): Ditto.
17874         (*cmp_sadd_sidi): Ditto.
17875         (*cmp_ssub_di): Ditto.
17876         (*cmp_ssub_si): Ditto.
17877         (*cmp_ssub_sidi): Ditto.
17878         * config/alpha/predicates.md (const23_operand): New predicate.
17879         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
17880         Look for ASHIFT, not MULT inner operand.
17881         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
17883 2018-01-04  Martin Liska  <mliska@suse.cz>
17885         PR gcov-profile/83669
17886         * gcov.c (output_intermediate_file): Add version to intermediate
17887         gcov file.
17888         * doc/gcov.texi: Document new field 'version' in intermediate
17889         file format. Fix location of '-k' option of gcov command.
17891 2018-01-04  Martin Liska  <mliska@suse.cz>
17893         PR ipa/82352
17894         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
17896 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
17898         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
17900 2018-01-03  Martin Sebor  <msebor@redhat.com>
17902         PR tree-optimization/83655
17903         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
17904         checking calls with invalid arguments.
17906 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17908         * tree-vect-stmts.c (vect_get_store_rhs): New function.
17909         (vectorizable_mask_load_store): Delete.
17910         (vectorizable_call): Return false for masked loads and stores.
17911         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
17912         instead of gimple_assign_rhs1.
17913         (vectorizable_load): Handle IFN_MASK_LOAD.
17914         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
17916 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17918         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
17919         split out from..,
17920         (vectorizable_mask_load_store): ...here.
17921         (vectorizable_load): ...and here.
17923 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17925         * tree-vect-stmts.c (vect_build_all_ones_mask)
17926         (vect_build_zero_merge_argument): New functions, split out from...
17927         (vectorizable_load): ...here.
17929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17931         * tree-vect-stmts.c (vect_check_store_rhs): New function,
17932         split out from...
17933         (vectorizable_mask_load_store): ...here.
17934         (vectorizable_store): ...and here.
17936 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17938         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
17939         split out from...
17940         (vectorizable_mask_load_store): ...here.
17942 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17944         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
17945         (vect_model_store_cost): Take a vec_load_store_type instead of a
17946         vect_def_type.
17947         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
17948         (vect_model_store_cost): Take a vec_load_store_type instead of a
17949         vect_def_type.
17950         (vectorizable_mask_load_store): Update accordingly.
17951         (vectorizable_store): Likewise.
17952         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
17954 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17956         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
17957         IFN_MASK_LOAD calls here rather than...
17958         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
17960 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17961             Alan Hayward  <alan.hayward@arm.com>
17962             David Sherwood  <david.sherwood@arm.com>
17964         * expmed.c (extract_bit_field_1): For vector extracts,
17965         fall back to extract_bit_field_as_subreg if vec_extract
17966         isn't available.
17968 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17969             Alan Hayward  <alan.hayward@arm.com>
17970             David Sherwood  <david.sherwood@arm.com>
17972         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
17973         they are variable or constant sized.
17974         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
17975         slots for constant-sized data.
17977 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17978             Alan Hayward  <alan.hayward@arm.com>
17979             David Sherwood  <david.sherwood@arm.com>
17981         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
17982         handling COND_EXPRs with boolean comparisons, try to find a better
17983         basis for the mask type than the boolean itself.
17985 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17987         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
17988         is calculated and how it can be overridden.
17989         * genmodes.c (max_bitsize_mode_any_mode): New variable.
17990         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
17991         if defined.
17992         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
17993         if nonzero.
17995 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17996             Alan Hayward  <alan.hayward@arm.com>
17997             David Sherwood  <david.sherwood@arm.com>
17999         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
18000         Remove the mode argument.
18001         (aarch64_simd_valid_immediate): Remove the mode and inverse
18002         arguments.
18003         * config/aarch64/iterators.md (bitsize): New iterator.
18004         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
18005         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
18006         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
18007         aarch64_simd_valid_immediate.
18008         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
18009         (aarch64_reg_or_bic_imm): Likewise.
18010         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
18011         with an insn_type enum and msl with a modifier_type enum.
18012         Replace element_width with a scalar_mode.  Change the shift
18013         to unsigned int.  Add constructors for scalar_float_mode and
18014         scalar_int_mode elements.
18015         (aarch64_vect_float_const_representable_p): Delete.
18016         (aarch64_can_const_movi_rtx_p)
18017         (aarch64_simd_scalar_immediate_valid_for_move)
18018         (aarch64_simd_make_constant): Update call to
18019         aarch64_simd_valid_immediate.
18020         (aarch64_advsimd_valid_immediate_hs): New function.
18021         (aarch64_advsimd_valid_immediate): Likewise.
18022         (aarch64_simd_valid_immediate): Remove mode and inverse
18023         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
18024         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
18025         and aarch64_float_const_representable_p on the result.
18026         (aarch64_output_simd_mov_immediate): Remove mode argument.
18027         Update call to aarch64_simd_valid_immediate and use of
18028         simd_immediate_info.
18029         (aarch64_output_scalar_simd_mov_immediate): Update call
18030         accordingly.
18032 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18033             Alan Hayward  <alan.hayward@arm.com>
18034             David Sherwood  <david.sherwood@arm.com>
18036         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
18037         (mode_nunits): Likewise CONST_MODE_NUNITS.
18038         * machmode.def (ADJUST_NUNITS): Document.
18039         * genmodes.c (mode_data::need_nunits_adj): New field.
18040         (blank_mode): Update accordingly.
18041         (adj_nunits): New variable.
18042         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
18043         parameter.
18044         (emit_mode_size_inline): Set need_bytesize_adj for all modes
18045         listed in adj_nunits.
18046         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
18047         listed in adj_nunits.  Don't emit case statements for such modes.
18048         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
18049         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
18050         nothing if adj_nunits is nonnull.
18051         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
18052         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
18053         (emit_mode_fbit): Update use of print_maybe_const_decl.
18054         (emit_move_size): Likewise.  Treat the array as non-const
18055         if adj_nunits.
18056         (emit_mode_adjustments): Handle adj_nunits.
18058 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18060         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
18061         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
18062         (VECTOR_MODES): Use it.
18063         (make_vector_modes): Take the prefix as an argument.
18065 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18066             Alan Hayward  <alan.hayward@arm.com>
18067             David Sherwood  <david.sherwood@arm.com>
18069         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
18070         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
18071         for MODE_VECTOR_BOOL.
18072         * machmode.def (VECTOR_BOOL_MODE): Document.
18073         * genmodes.c (VECTOR_BOOL_MODE): New macro.
18074         (make_vector_bool_mode): New function.
18075         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
18076         MODE_VECTOR_BOOL.
18077         * lto-streamer-in.c (lto_input_mode_table): Likewise.
18078         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
18079         Likewise.
18080         * stor-layout.c (int_mode_for_mode): Likewise.
18081         * tree.c (build_vector_type_for_mode): Likewise.
18082         * varasm.c (output_constant_pool_2): Likewise.
18083         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
18084         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
18085         for MODE_VECTOR_BOOL.
18086         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
18087         of mode class checks.
18088         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
18089         instead of a list of mode class checks.
18090         (expand_vector_scalar_condition): Likewise.
18091         (type_for_widest_vector_mode): Handle BImode as an inner mode.
18093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18094             Alan Hayward  <alan.hayward@arm.com>
18095             David Sherwood  <david.sherwood@arm.com>
18097         * machmode.h (mode_size): Change from unsigned short to
18098         poly_uint16_pod.
18099         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
18100         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18101         or if measurement_type is not polynomial.
18102         (fixed_size_mode::includes_p): Check for constant-sized modes.
18103         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
18104         return a poly_uint16 rather than an unsigned short.
18105         (emit_mode_size): Change the type of mode_size from unsigned short
18106         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
18107         (emit_mode_adjustments): Cope with polynomial vector sizes.
18108         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18109         for GET_MODE_SIZE.
18110         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18111         for GET_MODE_SIZE.
18112         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
18113         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
18114         * caller-save.c (setup_save_areas): Likewise.
18115         (replace_reg_with_saved_mem): Likewise.
18116         * calls.c (emit_library_call_value_1): Likewise.
18117         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
18118         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
18119         (gen_lowpart_for_combine): Likewise.
18120         * convert.c (convert_to_integer_1): Likewise.
18121         * cse.c (equiv_constant, cse_insn): Likewise.
18122         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
18123         (cselib_subst_to_values): Likewise.
18124         * dce.c (word_dce_process_block): Likewise.
18125         * df-problems.c (df_word_lr_mark_ref): Likewise.
18126         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
18127         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
18128         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
18129         (rtl_for_decl_location): Likewise.
18130         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
18131         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
18132         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
18133         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
18134         (expand_expr_real_1): Likewise.
18135         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
18136         (pad_below): Likewise.
18137         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18138         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
18139         * ira.c (get_subreg_tracking_sizes): Likewise.
18140         * ira-build.c (ira_create_allocno_objects): Likewise.
18141         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
18142         (ira_sort_regnos_for_alter_reg): Likewise.
18143         * ira-costs.c (record_operand_costs): Likewise.
18144         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
18145         (resolve_simple_move): Likewise.
18146         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
18147         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
18148         (lra_constraints): Likewise.
18149         (CONST_POOL_OK_P): Reject variable-sized modes.
18150         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
18151         (add_pseudo_to_slot, lra_spill): Likewise.
18152         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18153         * optabs-query.c (get_best_extraction_insn): Likewise.
18154         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18155         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
18156         (expand_mult_highpart, valid_multiword_target_p): Likewise.
18157         * recog.c (offsettable_address_addr_space_p): Likewise.
18158         * regcprop.c (maybe_mode_change): Likewise.
18159         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
18160         * regrename.c (build_def_use): Likewise.
18161         * regstat.c (dump_reg_info): Likewise.
18162         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
18163         (find_reloads, find_reloads_subreg_address): Likewise.
18164         * reload1.c (eliminate_regs_1): Likewise.
18165         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
18166         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
18167         (simplify_binary_operation_1, simplify_subreg): Likewise.
18168         * targhooks.c (default_function_arg_padding): Likewise.
18169         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
18170         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
18171         (verify_gimple_assign_ternary): Likewise.
18172         * tree-inline.c (estimate_move_cost): Likewise.
18173         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18174         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
18175         (get_address_cost_ainc): Likewise.
18176         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
18177         (vect_supportable_dr_alignment): Likewise.
18178         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18179         (vectorizable_reduction): Likewise.
18180         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
18181         (vectorizable_operation, vectorizable_load): Likewise.
18182         * tree.c (build_same_sized_truth_vector_type): Likewise.
18183         * valtrack.c (cleanup_auto_inc_dec): Likewise.
18184         * var-tracking.c (emit_note_insn_var_location): Likewise.
18185         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
18186         (ADDR_VEC_ALIGN): Likewise.
18188 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18189             Alan Hayward  <alan.hayward@arm.com>
18190             David Sherwood  <david.sherwood@arm.com>
18192         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
18193         unsigned short.
18194         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
18195         or if measurement_type is polynomial.
18196         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
18197         * combine.c (make_extraction): Likewise.
18198         * dse.c (find_shift_sequence): Likewise.
18199         * dwarf2out.c (mem_loc_descriptor): Likewise.
18200         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
18201         (extract_bit_field, extract_low_bits): Likewise.
18202         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
18203         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
18204         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
18205         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
18206         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
18207         * reload.c (find_reloads): Likewise.
18208         * reload1.c (alter_reg): Likewise.
18209         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
18210         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
18211         * tree-if-conv.c (predicate_mem_writes): Likewise.
18212         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18213         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
18214         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
18215         * valtrack.c (dead_debug_insert_temp): Likewise.
18216         * varasm.c (mergeable_constant_section): Likewise.
18217         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
18219 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18220             Alan Hayward  <alan.hayward@arm.com>
18221             David Sherwood  <david.sherwood@arm.com>
18223         * expr.c (expand_assignment): Cope with polynomial mode sizes
18224         when assigning to a CONCAT.
18226 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18227             Alan Hayward  <alan.hayward@arm.com>
18228             David Sherwood  <david.sherwood@arm.com>
18230         * machmode.h (mode_precision): Change from unsigned short to
18231         poly_uint16_pod.
18232         (mode_to_precision): Return a poly_uint16 rather than an unsigned
18233         short.
18234         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
18235         or if measurement_type is not polynomial.
18236         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
18237         in which the mode is already known to be a scalar_int_mode.
18238         * genmodes.c (emit_mode_precision): Change the type of mode_precision
18239         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
18240         initializer.
18241         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18242         for GET_MODE_PRECISION.
18243         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18244         for GET_MODE_PRECISION.
18245         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18246         as polynomial.
18247         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18248         (expand_field_assignment, make_extraction): Likewise.
18249         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18250         (get_last_value): Likewise.
18251         * convert.c (convert_to_integer_1): Likewise.
18252         * cse.c (cse_insn): Likewise.
18253         * expr.c (expand_expr_real_1): Likewise.
18254         * lra-constraints.c (simplify_operand_subreg): Likewise.
18255         * optabs-query.c (can_atomic_load_p): Likewise.
18256         * optabs.c (expand_atomic_load): Likewise.
18257         (expand_atomic_store): Likewise.
18258         * ree.c (combine_reaching_defs): Likewise.
18259         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18260         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18261         * tree.h (type_has_mode_precision_p): Likewise.
18262         * ubsan.c (instrument_si_overflow): Likewise.
18264 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18265             Alan Hayward  <alan.hayward@arm.com>
18266             David Sherwood  <david.sherwood@arm.com>
18268         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18269         polynomial numbers of units.
18270         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18271         (valid_vector_subparts_p): New function.
18272         (build_vector_type): Remove temporary shim and take the number
18273         of units as a poly_uint64 rather than an int.
18274         (build_opaque_vector_type): Take the number of units as a
18275         poly_uint64 rather than an int.
18276         * tree.c (build_vector_from_ctor): Handle polynomial
18277         TYPE_VECTOR_SUBPARTS.
18278         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18279         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18280         (build_vector_from_val): If the number of units is variable,
18281         use build_vec_duplicate_cst for constant operands and
18282         VEC_DUPLICATE_EXPR otherwise.
18283         (make_vector_type): Remove temporary is_constant ().
18284         (build_vector_type, build_opaque_vector_type): Take the number of
18285         units as a poly_uint64 rather than an int.
18286         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18287         VECTOR_CST_NELTS.
18288         * cfgexpand.c (expand_debug_expr): Likewise.
18289         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18290         (store_constructor, expand_expr_real_1): Likewise.
18291         (const_scalar_mask_from_tree): Likewise.
18292         * fold-const-call.c (fold_const_reduction): Likewise.
18293         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18294         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18295         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18296         (fold_relational_const): Likewise.
18297         (native_interpret_vector): Likewise.  Change the size from an
18298         int to an unsigned int.
18299         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18300         TYPE_VECTOR_SUBPARTS.
18301         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18302         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18303         duplicating a non-constant operand into a variable-length vector.
18304         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18305         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18306         * ipa-icf.c (sem_variable::equals): Likewise.
18307         * match.pd: Likewise.
18308         * omp-simd-clone.c (simd_clone_subparts): Likewise.
18309         * print-tree.c (print_node): Likewise.
18310         * stor-layout.c (layout_type): Likewise.
18311         * targhooks.c (default_builtin_vectorization_cost): Likewise.
18312         * tree-cfg.c (verify_gimple_comparison): Likewise.
18313         (verify_gimple_assign_binary): Likewise.
18314         (verify_gimple_assign_ternary): Likewise.
18315         (verify_gimple_assign_single): Likewise.
18316         * tree-pretty-print.c (dump_generic_node): Likewise.
18317         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18318         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18319         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18320         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18321         (vect_shift_permute_load_chain): Likewise.
18322         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18323         (expand_vector_condition, optimize_vector_constructor): Likewise.
18324         (lower_vec_perm, get_compute_type): Likewise.
18325         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18326         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18327         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18328         (vect_recog_mask_conversion_pattern): Likewise.
18329         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18330         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18331         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18332         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18333         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18334         (vectorizable_shift, vectorizable_operation, vectorizable_store)
18335         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18336         (supportable_widening_operation): Likewise.
18337         (supportable_narrowing_operation): Likewise.
18338         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18339         Likewise.
18340         * varasm.c (output_constant): Likewise.
18342 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18343             Alan Hayward  <alan.hayward@arm.com>
18344             David Sherwood  <david.sherwood@arm.com>
18346         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18347         so that both the length == 3 and length != 3 cases set up their
18348         own permute vectors.  Add comments explaining why we know the
18349         number of elements is constant.
18350         (vect_permute_load_chain): Likewise.
18352 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18353             Alan Hayward  <alan.hayward@arm.com>
18354             David Sherwood  <david.sherwood@arm.com>
18356         * machmode.h (mode_nunits): Change from unsigned char to
18357         poly_uint16_pod.
18358         (ONLY_FIXED_SIZE_MODES): New macro.
18359         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18360         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18361         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18362         New typedefs.
18363         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18364         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18365         or if measurement_type is not polynomial.
18366         * genmodes.c (ZERO_COEFFS): New macro.
18367         (emit_mode_nunits_inline): Make mode_nunits_inline return a
18368         poly_uint16.
18369         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18370         Use ZERO_COEFFS when emitting initializers.
18371         * data-streamer.h (bp_pack_poly_value): New function.
18372         (bp_unpack_poly_value): Likewise.
18373         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18374         for GET_MODE_NUNITS.
18375         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18376         for GET_MODE_NUNITS.
18377         * tree.c (make_vector_type): Remove temporary shim and make
18378         the real function take the number of units as a poly_uint64
18379         rather than an int.
18380         (build_vector_type_for_mode): Handle polynomial nunits.
18381         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18382         * emit-rtl.c (const_vec_series_p_1): Likewise.
18383         (gen_rtx_CONST_VECTOR): Likewise.
18384         * fold-const.c (test_vec_duplicate_folding): Likewise.
18385         * genrecog.c (validate_pattern): Likewise.
18386         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18387         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18388         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18389         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18390         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18391         * rtlanal.c (subreg_get_info): Likewise.
18392         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18393         (vect_grouped_load_supported): Likewise.
18394         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18395         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18396         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18397         (simplify_const_unary_operation, simplify_binary_operation_1)
18398         (simplify_const_binary_operation, simplify_ternary_operation)
18399         (test_vector_ops_duplicate, test_vector_ops): Likewise.
18400         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18401         instead of CONST_VECTOR_NUNITS.
18402         * varasm.c (output_constant_pool_2): Likewise.
18403         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18404         explicit-encoded elements in the XVEC for variable-length vectors.
18406 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18408         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18410 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18411             Alan Hayward  <alan.hayward@arm.com>
18412             David Sherwood  <david.sherwood@arm.com>
18414         * coretypes.h (fixed_size_mode): Declare.
18415         (fixed_size_mode_pod): New typedef.
18416         * builtins.h (target_builtins::x_apply_args_mode)
18417         (target_builtins::x_apply_result_mode): Change type to
18418         fixed_size_mode_pod.
18419         * builtins.c (apply_args_size, apply_result_size, result_vector)
18420         (expand_builtin_apply_args_1, expand_builtin_apply)
18421         (expand_builtin_return): Update accordingly.
18423 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18425         * cse.c (hash_rtx_cb): Hash only the encoded elements.
18426         * cselib.c (cselib_hash_rtx): Likewise.
18427         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18428         CONST_VECTOR encoding.
18430 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18431             Jeff Law  <law@redhat.com>
18433         PR target/83641
18434         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18435         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18436         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18437         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18439         PR target/83641
18440         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18441         explicitly probe *sp in a noreturn function if there were any callee
18442         register saves or frame pointer is needed.
18444 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18446         PR debug/83621
18447         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18448         BLKmode for ternary, binary or unary expressions.
18450         PR debug/83645
18451         * var-tracking.c (delete_vta_debug_insn): New inline function.
18452         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
18453         insns from get_insns () to NULL instead of each bb separately.
18454         Use delete_vta_debug_insn.  No longer static.
18455         (vt_debug_insns_local, variable_tracking_main_1): Adjust
18456         delete_vta_debug_insns callers.
18457         * rtl.h (delete_vta_debug_insns): Declare.
18458         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
18459         instead of variable_tracking_main.
18461 2018-01-03  Martin Sebor  <msebor@redhat.com>
18463         PR tree-optimization/83603
18464         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
18465         arguments past the endof the argument list in functions declared
18466         without a prototype.
18467         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
18468         Avoid checking when arguments are null.
18470 2018-01-03  Martin Sebor  <msebor@redhat.com>
18472         PR c/83559
18473         * doc/extend.texi (attribute const): Fix a typo.
18474         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
18475         issuing -Wsuggest-attribute for void functions.
18477 2018-01-03  Martin Sebor  <msebor@redhat.com>
18479         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
18480         offset_int::from instead of wide_int::to_shwi.
18481         (maybe_diag_overlap): Remove assertion.
18482         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
18483         * gimple-ssa-sprintf.c (format_directive): Same.
18484         (parse_directive): Same.
18485         (sprintf_dom_walker::compute_format_length): Same.
18486         (try_substitute_return_value): Same.
18488 2018-01-03  Jeff Law  <law@redhat.com>
18490         PR middle-end/83654
18491         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
18492         non-constant residual for zero at runtime and avoid probing in
18493         that case.  Reorganize code for trailing problem to mirror handling
18494         of the residual.
18496 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18498         PR tree-optimization/83501
18499         * tree-ssa-strlen.c (get_string_cst): New.
18500         (handle_char_store): Call get_string_cst.
18502 2018-01-03  Martin Liska  <mliska@suse.cz>
18504         PR tree-optimization/83593
18505         * tree-ssa-strlen.c: Include tree-cfg.h.
18506         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
18507         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
18508         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
18509         to false.
18510         (strlen_dom_walker::before_dom_children): Call
18511         gimple_purge_dead_eh_edges. Dump tranformation with details
18512         dump flags.
18513         (strlen_dom_walker::before_dom_children): Update call by adding
18514         new argument cleanup_eh.
18515         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
18517 2018-01-03  Martin Liska  <mliska@suse.cz>
18519         PR ipa/83549
18520         * cif-code.def (VARIADIC_THUNK): New enum value.
18521         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
18522         thunks.
18524 2018-01-03  Jan Beulich  <jbeulich@suse.com>
18526         * sse.md (mov<mode>_internal): Tighten condition for when to use
18527         vmovdqu<ssescalarsize> for TI and OI modes.
18529 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18531         Update copyright years.
18533 2018-01-03  Martin Liska  <mliska@suse.cz>
18535         PR ipa/83594
18536         * ipa-visibility.c (function_and_variable_visibility): Skip
18537         functions with noipa attribure.
18539 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
18541         * gcc.c (process_command): Update copyright notice dates.
18542         * gcov-dump.c (print_version): Ditto.
18543         * gcov.c (print_version): Ditto.
18544         * gcov-tool.c (print_version): Ditto.
18545         * gengtype.c (create_file): Ditto.
18546         * doc/cpp.texi: Bump @copying's copyright year.
18547         * doc/cppinternals.texi: Ditto.
18548         * doc/gcc.texi: Ditto.
18549         * doc/gccint.texi: Ditto.
18550         * doc/gcov.texi: Ditto.
18551         * doc/install.texi: Ditto.
18552         * doc/invoke.texi: Ditto.
18554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18556         * vector-builder.h (vector_builder::m_full_nelts): Change from
18557         unsigned int to poly_uint64.
18558         (vector_builder::full_nelts): Update prototype accordingly.
18559         (vector_builder::new_vector): Likewise.
18560         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
18561         (vector_builder::operator ==): Likewise.
18562         (vector_builder::finalize): Likewise.
18563         * int-vector-builder.h (int_vector_builder::int_vector_builder):
18564         Take the number of elements as a poly_uint64 rather than an
18565         unsigned int.
18566         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
18567         from unsigned int to poly_uint64.
18568         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
18569         (vec_perm_indices::new_vector): Likewise.
18570         (vec_perm_indices::length): Likewise.
18571         (vec_perm_indices::nelts_per_input): Likewise.
18572         (vec_perm_indices::input_nelts): Likewise.
18573         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
18574         number of elements per input as a poly_uint64 rather than an
18575         unsigned int.  Use the original encoding for variable-length
18576         vectors, rather than clamping each individual element.
18577         For the second and subsequent elements in each pattern,
18578         clamp the step and base before clamping their sum.
18579         (vec_perm_indices::series_p): Handle polynomial element counts.
18580         (vec_perm_indices::all_in_range_p): Likewise.
18581         (vec_perm_indices_to_tree): Likewise.
18582         (vec_perm_indices_to_rtx): Likewise.
18583         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18584         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
18585         (tree_vector_builder::new_binary_operation): Handle polynomial
18586         element counts.  Return false if we need to know the number
18587         of elements at compile time.
18588         * fold-const.c (fold_vec_perm): Punt if the number of elements
18589         isn't known at compile time.
18591 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18593         * vec-perm-indices.h (vec_perm_builder): Change element type
18594         from HOST_WIDE_INT to poly_int64.
18595         (vec_perm_indices::element_type): Update accordingly.
18596         (vec_perm_indices::clamp): Handle polynomial element_types.
18597         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18598         (vec_perm_indices::all_in_range_p): Likewise.
18599         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
18600         than shwi trees.
18601         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
18602         polynomial vec_perm_indices element types.
18603         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
18604         * fold-const.c (fold_vec_perm): Likewise.
18605         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
18606         * tree-vect-generic.c (lower_vec_perm): Likewise.
18607         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18608         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
18609         element type to HOST_WIDE_INT.
18611 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18612             Alan Hayward  <alan.hayward@arm.com>
18613             David Sherwood  <david.sherwood@arm.com>
18615         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
18616         rather than an int.  Use plus_constant.
18617         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
18618         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
18620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18621             Alan Hayward  <alan.hayward@arm.com>
18622             David Sherwood  <david.sherwood@arm.com>
18624         * calls.c (emit_call_1, expand_call): Change struct_value_size from
18625         a HOST_WIDE_INT to a poly_int64.
18627 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18628             Alan Hayward  <alan.hayward@arm.com>
18629             David Sherwood  <david.sherwood@arm.com>
18631         * calls.c (load_register_parameters): Cope with polynomial
18632         mode sizes.  Require a constant size for BLKmode parameters
18633         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
18634         forces a parameter to be padded at the lsb end in order to
18635         fill a complete number of words, require the parameter size
18636         to be ordered wrt UNITS_PER_WORD.
18638 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18639             Alan Hayward  <alan.hayward@arm.com>
18640             David Sherwood  <david.sherwood@arm.com>
18642         * reload1.c (spill_stack_slot_width): Change element type
18643         from unsigned int to poly_uint64_pod.
18644         (alter_reg): Treat mode sizes as polynomial.
18646 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18647             Alan Hayward  <alan.hayward@arm.com>
18648             David Sherwood  <david.sherwood@arm.com>
18650         * reload.c (complex_word_subreg_p): New function.
18651         (reload_inner_reg_of_subreg, push_reload): Use it.
18653 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18654             Alan Hayward  <alan.hayward@arm.com>
18655             David Sherwood  <david.sherwood@arm.com>
18657         * lra-constraints.c (process_alt_operands): Reject matched
18658         operands whose sizes aren't ordered.
18659         (match_reload): Refer to this check here.
18661 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18662             Alan Hayward  <alan.hayward@arm.com>
18663             David Sherwood  <david.sherwood@arm.com>
18665         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
18666         that the mode size is in the set {1, 2, 4, 8, 16}.
18668 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18669             Alan Hayward  <alan.hayward@arm.com>
18670             David Sherwood  <david.sherwood@arm.com>
18672         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
18673         Use plus_constant instead of gen_rtx_PLUS.
18675 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18676             Alan Hayward  <alan.hayward@arm.com>
18677             David Sherwood  <david.sherwood@arm.com>
18679         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
18680         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
18681         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
18682         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
18683         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
18684         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
18685         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
18686         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
18687         * config/i386/i386.c (ix86_push_rounding): ...this new function.
18688         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
18689         a poly_int64.
18690         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
18691         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
18692         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
18693         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
18694         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
18695         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
18696         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
18697         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
18698         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
18699         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
18700         function.
18701         * expr.c (emit_move_resolve_push): Treat the input and result
18702         of PUSH_ROUNDING as a poly_int64.
18703         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
18704         (emit_push_insn): Likewise.
18705         * lra-eliminations.c (mark_not_eliminable): Likewise.
18706         * recog.c (push_operand): Likewise.
18707         * reload1.c (elimination_effects): Likewise.
18708         * rtlanal.c (nonzero_bits1): Likewise.
18709         * calls.c (store_one_arg): Likewise.  Require the padding to be
18710         known at compile time.
18712 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18713             Alan Hayward  <alan.hayward@arm.com>
18714             David Sherwood  <david.sherwood@arm.com>
18716         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
18717         Use plus_constant instead of gen_rtx_PLUS.
18719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18720             Alan Hayward  <alan.hayward@arm.com>
18721             David Sherwood  <david.sherwood@arm.com>
18723         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
18724         rather than an int.
18726 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18727             Alan Hayward  <alan.hayward@arm.com>
18728             David Sherwood  <david.sherwood@arm.com>
18730         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
18731         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
18732         via stack temporaries.  Treat the mode size as polynomial too.
18734 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18735             Alan Hayward  <alan.hayward@arm.com>
18736             David Sherwood  <david.sherwood@arm.com>
18738         * expr.c (expand_expr_real_2): When handling conversions involving
18739         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
18740         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
18741         as a poly_uint64 too.
18743 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18744             Alan Hayward  <alan.hayward@arm.com>
18745             David Sherwood  <david.sherwood@arm.com>
18747         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
18749 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18750             Alan Hayward  <alan.hayward@arm.com>
18751             David Sherwood  <david.sherwood@arm.com>
18753         * combine.c (can_change_dest_mode): Handle polynomial
18754         REGMODE_NATURAL_SIZE.
18755         * expmed.c (store_bit_field_1): Likewise.
18756         * expr.c (store_constructor): Likewise.
18757         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
18758         and polynomial REGMODE_NATURAL_SIZE.
18759         (gen_lowpart_common): Likewise.
18760         * reginfo.c (record_subregs_of_mode): Likewise.
18761         * rtlanal.c (read_modify_subreg_p): Likewise.
18763 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18764             Alan Hayward  <alan.hayward@arm.com>
18765             David Sherwood  <david.sherwood@arm.com>
18767         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
18768         numbers of elements.
18770 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18771             Alan Hayward  <alan.hayward@arm.com>
18772             David Sherwood  <david.sherwood@arm.com>
18774         * match.pd: Cope with polynomial numbers of vector elements.
18776 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18777             Alan Hayward  <alan.hayward@arm.com>
18778             David Sherwood  <david.sherwood@arm.com>
18780         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
18781         in a POINTER_PLUS_EXPR.
18783 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18784             Alan Hayward  <alan.hayward@arm.com>
18785             David Sherwood  <david.sherwood@arm.com>
18787         * omp-simd-clone.c (simd_clone_subparts): New function.
18788         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
18789         (ipa_simd_modify_function_body): Likewise.
18791 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18792             Alan Hayward  <alan.hayward@arm.com>
18793             David Sherwood  <david.sherwood@arm.com>
18795         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
18796         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
18797         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
18798         (expand_vector_condition, vector_element): Likewise.
18799         (subparts_gt): New function.
18800         (get_compute_type): Use subparts_gt.
18801         (count_type_subparts): Delete.
18802         (expand_vector_operations_1): Use subparts_gt instead of
18803         count_type_subparts.
18805 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18806             Alan Hayward  <alan.hayward@arm.com>
18807             David Sherwood  <david.sherwood@arm.com>
18809         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
18810         (vect_compile_time_alias): ...this new function.  Do the calculation
18811         on poly_ints rather than trees.
18812         (vect_prune_runtime_alias_test_list): Update call accordingly.
18814 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18815             Alan Hayward  <alan.hayward@arm.com>
18816             David Sherwood  <david.sherwood@arm.com>
18818         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
18819         numbers of units.
18820         (vect_schedule_slp_instance): Likewise.
18822 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18823             Alan Hayward  <alan.hayward@arm.com>
18824             David Sherwood  <david.sherwood@arm.com>
18826         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
18827         constant and extern definitions for variable-length vectors.
18828         (vect_get_constant_vectors): Note that the number of units
18829         is known to be constant.
18831 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18832             Alan Hayward  <alan.hayward@arm.com>
18833             David Sherwood  <david.sherwood@arm.com>
18835         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
18836         of units as polynomial.  Choose between WIDE and NARROW based
18837         on multiple_p.
18839 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18840             Alan Hayward  <alan.hayward@arm.com>
18841             David Sherwood  <david.sherwood@arm.com>
18843         * tree-vect-stmts.c (simd_clone_subparts): New function.
18844         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
18846 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18847             Alan Hayward  <alan.hayward@arm.com>
18848             David Sherwood  <david.sherwood@arm.com>
18850         * tree-vect-stmts.c (vectorizable_call): Treat the number of
18851         vectors as polynomial.  Use build_index_vector for
18852         IFN_GOMP_SIMD_LANE.
18854 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18855             Alan Hayward  <alan.hayward@arm.com>
18856             David Sherwood  <david.sherwood@arm.com>
18858         * tree-vect-stmts.c (get_load_store_type): Treat the number of
18859         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
18860         for variable-length vectors.
18861         (vectorizable_mask_load_store): Treat the number of units as
18862         polynomial, asserting that it is constant if the condition has
18863         already been enforced.
18864         (vectorizable_store, vectorizable_load): Likewise.
18866 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18867             Alan Hayward  <alan.hayward@arm.com>
18868             David Sherwood  <david.sherwood@arm.com>
18870         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
18871         of units as polynomial.  Punt if we can't tell at compile time
18872         which vector contains the final result.
18874 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18875             Alan Hayward  <alan.hayward@arm.com>
18876             David Sherwood  <david.sherwood@arm.com>
18878         * tree-vect-loop.c (vectorizable_induction): Treat the number
18879         of units as polynomial.  Punt on SLP inductions.  Use an integer
18880         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
18881         cast of such a series for variable-length floating-point
18882         reductions.
18884 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18885             Alan Hayward  <alan.hayward@arm.com>
18886             David Sherwood  <david.sherwood@arm.com>
18888         * tree.h (build_index_vector): Declare.
18889         * tree.c (build_index_vector): New function.
18890         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
18891         of units as polynomial, forcibly converting it to a constant if
18892         vectorizable_reduction has already enforced the condition.
18893         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
18894         to create a {1,2,3,...} vector.
18895         (vectorizable_reduction): Treat the number of units as polynomial.
18896         Choose vectype_in based on the largest scalar element size rather
18897         than the smallest number of units.  Enforce the restrictions
18898         relied on above.
18900 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18901             Alan Hayward  <alan.hayward@arm.com>
18902             David Sherwood  <david.sherwood@arm.com>
18904         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
18905         number of units as polynomial.
18907 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18908             Alan Hayward  <alan.hayward@arm.com>
18909             David Sherwood  <david.sherwood@arm.com>
18911         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
18912         * target.def (autovectorize_vector_sizes): Return the vector sizes
18913         by pointer, using vector_sizes rather than a bitmask.
18914         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
18915         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
18916         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
18917         Likewise.
18918         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
18919         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
18920         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
18921         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
18922         * omp-general.c (omp_max_vf): Likewise.
18923         * omp-low.c (omp_clause_aligned_alignment): Likewise.
18924         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
18925         * tree-vect-loop.c (vect_analyze_loop): Likewise.
18926         * tree-vect-slp.c (vect_slp_bb): Likewise.
18927         * doc/tm.texi: Regenerate.
18928         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
18929         to a poly_uint64.
18930         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
18931         the vector size as a poly_uint64 rather than an unsigned int.
18932         (current_vector_size): Change from an unsigned int to a poly_uint64.
18933         (get_vectype_for_scalar_type): Update accordingly.
18934         * tree.h (build_truth_vector_type): Take the size and number of
18935         units as a poly_uint64 rather than an unsigned int.
18936         (build_vector_type): Add a temporary overload that takes
18937         the number of units as a poly_uint64 rather than an unsigned int.
18938         * tree.c (make_vector_type): Likewise.
18939         (build_truth_vector_type): Take the number of units as a poly_uint64
18940         rather than an unsigned int.
18942 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18943             Alan Hayward  <alan.hayward@arm.com>
18944             David Sherwood  <david.sherwood@arm.com>
18946         * target.def (get_mask_mode): Take the number of units and length
18947         as poly_uint64s rather than unsigned ints.
18948         * targhooks.h (default_get_mask_mode): Update accordingly.
18949         * targhooks.c (default_get_mask_mode): Likewise.
18950         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
18951         * doc/tm.texi: Regenerate.
18953 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18954             Alan Hayward  <alan.hayward@arm.com>
18955             David Sherwood  <david.sherwood@arm.com>
18957         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
18958         * omp-general.c (omp_max_vf): Likewise.
18959         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
18960         (expand_omp_simd): Handle polynomial safelen.
18961         * omp-low.c (omplow_simd_context): Add a default constructor.
18962         (omplow_simd_context::max_vf): Change from int to poly_uint64.
18963         (lower_rec_simd_input_clauses): Update accordingly.
18964         (lower_rec_input_clauses): Likewise.
18966 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18967             Alan Hayward  <alan.hayward@arm.com>
18968             David Sherwood  <david.sherwood@arm.com>
18970         * tree-vectorizer.h (vect_nunits_for_cost): New function.
18971         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
18972         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
18973         (vect_analyze_slp_cost): Likewise.
18974         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
18975         (vect_model_load_cost): Likewise.
18977 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18978             Alan Hayward  <alan.hayward@arm.com>
18979             David Sherwood  <david.sherwood@arm.com>
18981         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
18982         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
18983         from an unsigned int * to a poly_uint64_pod *.
18984         (calculate_unrolling_factor): New function.
18985         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
18987 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
18988             Alan Hayward  <alan.hayward@arm.com>
18989             David Sherwood  <david.sherwood@arm.com>
18991         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
18992         from an unsigned int to a poly_uint64.
18993         (_loop_vec_info::slp_unrolling_factor): Likewise.
18994         (_loop_vec_info::vectorization_factor): Change from an int
18995         to a poly_uint64.
18996         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
18997         (vect_get_num_vectors): New function.
18998         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
18999         (vect_get_num_copies): Use vect_get_num_vectors.
19000         (vect_analyze_data_ref_dependences): Change max_vf from an int *
19001         to an unsigned int *.
19002         (vect_analyze_data_refs): Change min_vf from an int * to a
19003         poly_uint64 *.
19004         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19005         than an unsigned HOST_WIDE_INT.
19006         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
19007         (vect_analyze_data_ref_dependence): Change max_vf from an int *
19008         to an unsigned int *.
19009         (vect_analyze_data_ref_dependences): Likewise.
19010         (vect_compute_data_ref_alignment): Handle polynomial vf.
19011         (vect_enhance_data_refs_alignment): Likewise.
19012         (vect_prune_runtime_alias_test_list): Likewise.
19013         (vect_shift_permute_load_chain): Likewise.
19014         (vect_supportable_dr_alignment): Likewise.
19015         (dependence_distance_ge_vf): Take the vectorization factor as a
19016         poly_uint64 rather than an unsigned HOST_WIDE_INT.
19017         (vect_analyze_data_refs): Change min_vf from an int * to a
19018         poly_uint64 *.
19019         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
19020         vfm1 as a poly_uint64 rather than an int.  Make the same change
19021         for the returned bound_scalar.
19022         (vect_gen_vector_loop_niters): Handle polynomial vf.
19023         (vect_do_peeling): Likewise.  Update call to
19024         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
19025         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
19026         be constant.
19027         * tree-vect-loop.c (vect_determine_vectorization_factor)
19028         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
19029         (vect_get_known_peeling_cost): Likewise.
19030         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
19031         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
19032         (vect_transform_loop): Likewise.  Use the lowest possible VF when
19033         updating the upper bounds of the loop.
19034         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
19035         rather than an int.
19036         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
19037         polynomial unroll factors.
19038         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
19039         (vect_make_slp_decision): Likewise.
19040         (vect_supported_load_permutation_p): Likewise, and polynomial
19041         vf too.
19042         (vect_analyze_slp_cost): Handle polynomial vf.
19043         (vect_slp_analyze_node_operations): Likewise.
19044         (vect_slp_analyze_bb_1): Likewise.
19045         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
19046         than an unsigned HOST_WIDE_INT.
19047         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
19048         (vectorizable_load): Handle polynomial vf.
19049         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
19050         a poly_uint64.
19051         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
19053 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19054             Alan Hayward  <alan.hayward@arm.com>
19055             David Sherwood  <david.sherwood@arm.com>
19057         * match.pd: Handle bit operations involving three constants
19058         and try to fold one pair.
19060 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19062         * tree-vect-loop-manip.c: Include gimple-fold.h.
19063         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
19064         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
19065         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
19066         Add a path that uses a step of VF instead of 1, but disable it
19067         for now.
19068         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
19069         and niters_no_overflow parameters.  Update calls to
19070         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
19071         Create a new SSA name if the latter choses to use a ste other
19072         than zero, and return it via niters_vector_mult_vf_var.
19073         * tree-vect-loop.c (vect_transform_loop): Update calls to
19074         vect_do_peeling, vect_gen_vector_loop_niters and
19075         slpeel_make_loop_iterate_ntimes.
19076         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
19077         (vect_gen_vector_loop_niters): Update declarations after above changes.
19079 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
19081         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
19082         128-bit round to integer instructions.
19083         (ceil<mode>2): Likewise.
19084         (btrunc<mode>2): Likewise.
19085         (round<mode>2): Likewise.
19087 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19089         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
19090         unaligned VSX load/store on P8/P9.
19091         (expand_block_clear): Allow the use of unaligned VSX
19092         load/store on P8/P9.
19094 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19096         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
19097         New function.
19098         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
19099         swap associated with both a load and a store.
19101 2018-01-02  Andrew Waterman  <andrew@sifive.com>
19103         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
19104         * config/riscv/riscv.md (clear_cache): Use it.
19106 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
19108         * web.c: Remove out-of-date comment.
19110 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19112         * expr.c (fixup_args_size_notes): Check that any existing
19113         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
19114         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
19115         (emit_single_push_insn): ...here.
19117 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19119         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
19120         (const_vector_encoded_nelts): New function.
19121         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
19122         (const_vector_int_elt, const_vector_elt): Declare.
19123         * emit-rtl.c (const_vector_int_elt_1): New function.
19124         (const_vector_elt): Likewise.
19125         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
19126         of CONST_VECTOR_ELT.
19128 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19130         * expr.c: Include rtx-vector-builder.h.
19131         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
19132         directly on the tree encoding.
19133         (const_vector_from_tree): Likewise.
19134         * optabs.c: Include rtx-vector-builder.h.
19135         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
19136         sequence of "u" values.
19137         * vec-perm-indices.c: Include rtx-vector-builder.h.
19138         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
19139         directly on the vec_perm_indices encoding.
19141 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19143         * doc/rtl.texi (const_vector): Describe new encoding scheme.
19144         * Makefile.in (OBJS): Add rtx-vector-builder.o.
19145         * rtx-vector-builder.h: New file.
19146         * rtx-vector-builder.c: Likewise.
19147         * rtl.h (rtx_def::u2): Add a const_vector field.
19148         (CONST_VECTOR_NPATTERNS): New macro.
19149         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
19150         (CONST_VECTOR_DUPLICATE_P): Likewise.
19151         (CONST_VECTOR_STEPPED_P): Likewise.
19152         (CONST_VECTOR_ENCODED_ELT): Likewise.
19153         (const_vec_duplicate_p): Check for a duplicated vector encoding.
19154         (unwrap_const_vec_duplicate): Likewise.
19155         (const_vec_series_p): Check for a non-duplicated vector encoding.
19156         Say that the function only returns true for integer vectors.
19157         * emit-rtl.c: Include rtx-vector-builder.h.
19158         (gen_const_vec_duplicate_1): Delete.
19159         (gen_const_vector): Call gen_const_vec_duplicate instead of
19160         gen_const_vec_duplicate_1.
19161         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
19162         (gen_const_vec_duplicate): Use rtx_vector_builder.
19163         (gen_const_vec_series): Likewise.
19164         (gen_rtx_CONST_VECTOR): Likewise.
19165         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
19166         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19167         Build a new vector rather than modifying a CONST_VECTOR in-place.
19168         (handle_special_swappables): Update call accordingly.
19169         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
19170         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
19171         Build a new vector rather than modifying a CONST_VECTOR in-place.
19172         (handle_special_swappables): Update call accordingly.
19174 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19176         * simplify-rtx.c (simplify_const_binary_operation): Use
19177         CONST_VECTOR_ELT instead of XVECEXP.
19179 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19181         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
19182         the selector elements to be different from the data elements
19183         if the selector is a VECTOR_CST.
19184         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
19185         ssizetype for the selector.
19187 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19189         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
19190         before testing each element individually.
19191         * tree-vect-generic.c (lower_vec_perm): Likewise.
19193 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19195         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
19196         * selftest-run-tests.c (selftest::run_tests): Call it.
19197         * vector-builder.h (vector_builder::operator ==): New function.
19198         (vector_builder::operator !=): Likewise.
19199         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
19200         (vec_perm_indices::all_from_input_p): New function.
19201         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
19202         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
19203         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
19204         instead of reading the VECTOR_CST directly.  Detect whether both
19205         vector inputs are the same before constructing the vec_perm_indices,
19206         and update the number of inputs argument accordingly.  Use the
19207         utility functions added above.  Only construct sel2 if we need to.
19209 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19211         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
19212         the broadcast of the low byte.
19213         (expand_mult_highpart): Use an explicit encoding for the permutes.
19214         * optabs-query.c (can_mult_highpart_p): Likewise.
19215         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
19216         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19217         (vectorizable_bswap): Likewise.
19218         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
19219         explicit encoding for the power-of-2 permutes.
19220         (vect_permute_store_chain): Likewise.
19221         (vect_grouped_load_supported): Likewise.
19222         (vect_permute_load_chain): Likewise.
19224 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19226         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
19227         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
19228         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
19229         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19230         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
19231         (vect_gen_perm_mask_any): Likewise.
19233 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19235         * int-vector-builder.h: New file.
19236         * vec-perm-indices.h: Include int-vector-builder.h.
19237         (vec_perm_indices): Redefine as an int_vector_builder.
19238         (auto_vec_perm_indices): Delete.
19239         (vec_perm_builder): Redefine as a stand-alone class.
19240         (vec_perm_indices::vec_perm_indices): New function.
19241         (vec_perm_indices::clamp): Likewise.
19242         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19243         (vec_perm_indices::new_vector): New function.
19244         (vec_perm_indices::new_expanded_vector): Update for new
19245         vec_perm_indices class.
19246         (vec_perm_indices::rotate_inputs): New function.
19247         (vec_perm_indices::all_in_range_p): Operate directly on the
19248         encoded form, without computing elided elements.
19249         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19250         encoding.  Update for new vec_perm_indices class.
19251         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19252         the given vec_perm_builder.
19253         (expand_vec_perm_var): Update vec_perm_builder constructor.
19254         (expand_mult_highpart): Use vec_perm_builder instead of
19255         auto_vec_perm_indices.
19256         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19257         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
19258         or double series encoding as appropriate.
19259         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19260         vec_perm_indices instead of auto_vec_perm_indices.
19261         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19262         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19263         (vect_permute_store_chain): Likewise.
19264         (vect_grouped_load_supported): Likewise.
19265         (vect_permute_load_chain): Likewise.
19266         (vect_shift_permute_load_chain): Likewise.
19267         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19268         (vect_transform_slp_perm_load): Likewise.
19269         (vect_schedule_slp_instance): Likewise.
19270         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19271         (vectorizable_mask_load_store): Likewise.
19272         (vectorizable_bswap): Likewise.
19273         (vectorizable_store): Likewise.
19274         (vectorizable_load): Likewise.
19275         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19276         vec_perm_indices instead of auto_vec_perm_indices.  Use
19277         tree_to_vec_perm_builder to read the vector from a tree.
19278         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19279         vec_perm_builder instead of a vec_perm_indices.
19280         (have_whole_vector_shift): Use vec_perm_builder and
19281         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
19282         truncation to calc_vec_perm_mask_for_shift.
19283         (vect_create_epilog_for_reduction): Likewise.
19284         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19285         from auto_vec_perm_indices to vec_perm_indices.
19286         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19287         instead of changing individual elements.
19288         (aarch64_vectorize_vec_perm_const): Use new_vector to install
19289         the vector in d.perm.
19290         * config/arm/arm.c (expand_vec_perm_d::perm): Change
19291         from auto_vec_perm_indices to vec_perm_indices.
19292         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19293         instead of changing individual elements.
19294         (arm_vectorize_vec_perm_const): Use new_vector to install
19295         the vector in d.perm.
19296         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19297         Update vec_perm_builder constructor.
19298         (rs6000_expand_interleave): Likewise.
19299         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19300         (rs6000_expand_interleave): Likewise.
19302 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19304         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19305         to qimode could truncate the indices.
19306         * optabs.c (expand_vec_perm_var): Likewise.
19308 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19310         * Makefile.in (OBJS): Add vec-perm-indices.o.
19311         * vec-perm-indices.h: New file.
19312         * vec-perm-indices.c: Likewise.
19313         * target.h (vec_perm_indices): Replace with a forward class
19314         declaration.
19315         (auto_vec_perm_indices): Move to vec-perm-indices.h.
19316         * optabs.h: Include vec-perm-indices.h.
19317         (expand_vec_perm): Delete.
19318         (selector_fits_mode_p, expand_vec_perm_var): Declare.
19319         (expand_vec_perm_const): Declare.
19320         * target.def (vec_perm_const_ok): Replace with...
19321         (vec_perm_const): ...this new hook.
19322         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19323         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19324         * doc/tm.texi: Regenerate.
19325         * optabs.def (vec_perm_const): Delete.
19326         * doc/md.texi (vec_perm_const): Likewise.
19327         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19328         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19329         expand_vec_perm for constant permutation vectors.  Assert that
19330         the mode of variable permutation vectors is the integer equivalent
19331         of the mode that is being permuted.
19332         * optabs-query.h (selector_fits_mode_p): Declare.
19333         * optabs-query.c: Include vec-perm-indices.h.
19334         (selector_fits_mode_p): New function.
19335         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19336         is defined, instead of checking whether the vec_perm_const_optab
19337         exists.  Use targetm.vectorize.vec_perm_const instead of
19338         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
19339         fit in the vector mode before using a variable permute.
19340         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19341         vec_perm_indices instead of an rtx.
19342         (expand_vec_perm): Replace with...
19343         (expand_vec_perm_const): ...this new function.  Take the selector
19344         as a vec_perm_indices rather than an rtx.  Also take the mode of
19345         the selector.  Update call to shift_amt_for_vec_perm_mask.
19346         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19347         Use vec_perm_indices::new_expanded_vector to expand the original
19348         selector into bytes.  Check whether the indices fit in the vector
19349         mode before using a variable permute.
19350         (expand_vec_perm_var): Make global.
19351         (expand_mult_highpart): Use expand_vec_perm_const.
19352         * fold-const.c: Includes vec-perm-indices.h.
19353         * tree-ssa-forwprop.c: Likewise.
19354         * tree-vect-data-refs.c: Likewise.
19355         * tree-vect-generic.c: Likewise.
19356         * tree-vect-loop.c: Likewise.
19357         * tree-vect-slp.c: Likewise.
19358         * tree-vect-stmts.c: Likewise.
19359         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19360         Delete.
19361         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19362         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19363         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19364         (aarch64_vectorize_vec_perm_const): ...this new function.
19365         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19366         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19367         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19368         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19369         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19370         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19371         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19372         into...
19373         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
19374         check for NEON modes.
19375         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19376         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19377         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19378         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19379         into...
19380         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
19381         the old VEC_PERM_CONST conditions.
19382         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19383         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19384         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19385         (ia64_vectorize_vec_perm_const_ok): Merge into...
19386         (ia64_vectorize_vec_perm_const): ...this new function.
19387         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19388         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19389         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19390         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19391         * config/mips/mips.c (mips_expand_vec_perm_const)
19392         (mips_vectorize_vec_perm_const_ok): Merge into...
19393         (mips_vectorize_vec_perm_const): ...this new function.
19394         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19395         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19396         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19397         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19398         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19399         (rs6000_expand_vec_perm_const): Delete.
19400         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19401         Delete.
19402         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19403         (altivec_expand_vec_perm_const_le): Take each operand individually.
19404         Operate on constant selectors rather than rtxes.
19405         (altivec_expand_vec_perm_const): Likewise.  Update call to
19406         altivec_expand_vec_perm_const_le.
19407         (rs6000_expand_vec_perm_const): Delete.
19408         (rs6000_vectorize_vec_perm_const_ok): Delete.
19409         (rs6000_vectorize_vec_perm_const): New function.
19410         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19411         an element count and rtx array.
19412         (rs6000_expand_extract_even): Update call accordingly.
19413         (rs6000_expand_interleave): Likewise.
19414         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19415         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19416         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19417         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19418         (rs6000_expand_vec_perm_const): Delete.
19419         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19420         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19421         (altivec_expand_vec_perm_const_le): Take each operand individually.
19422         Operate on constant selectors rather than rtxes.
19423         (altivec_expand_vec_perm_const): Likewise.  Update call to
19424         altivec_expand_vec_perm_const_le.
19425         (rs6000_expand_vec_perm_const): Delete.
19426         (rs6000_vectorize_vec_perm_const_ok): Delete.
19427         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
19428         reference to the SPE evmerge intructions.
19429         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19430         an element count and rtx array.
19431         (rs6000_expand_extract_even): Update call accordingly.
19432         (rs6000_expand_interleave): Likewise.
19433         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19434         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19435         new function.
19436         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19438 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19440         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19441         vector mode and that that mode matches the mode of the data
19442         being permuted.
19443         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19444         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
19445         directly using expand_vec_perm_1 when forcing selectors into
19446         registers.
19447         (expand_vec_perm_var): New function, split out from expand_vec_perm.
19449 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19451         * optabs-query.h (can_vec_perm_p): Delete.
19452         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
19453         * optabs-query.c (can_vec_perm_p): Split into...
19454         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
19455         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
19456         particular selector is valid.
19457         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19458         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19459         (vect_grouped_load_supported): Likewise.
19460         (vect_shift_permute_load_chain): Likewise.
19461         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19462         (vect_transform_slp_perm_load): Likewise.
19463         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19464         (vectorizable_bswap): Likewise.
19465         (vect_gen_perm_mask_checked): Likewise.
19466         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
19467         implementations of variable permutation vectors into account
19468         when deciding which selector to use.
19469         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
19470         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
19471         with a false third argument.
19472         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
19473         to test whether the constant selector is valid and can_vec_perm_var_p
19474         to test whether a variable selector is valid.
19476 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19478         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
19479         * optabs-query.c (can_vec_perm_p): Likewise.
19480         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
19481         instead of vec_perm_indices.
19482         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
19483         (vect_gen_perm_mask_checked): Likewise,
19484         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
19485         (vect_gen_perm_mask_checked): Likewise,
19487 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
19489         * optabs-query.h (qimode_for_vec_perm): Declare.
19490         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
19491         (qimode_for_vec_perm): ...this new function.
19492         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
19494 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19496         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
19497         does not have a conditional at the top.
19499 2018-01-02  Richard Biener  <rguenther@suse.de>
19501         * ipa-inline.c (big_speedup_p): Fix expression.
19503 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
19505         PR target/81616
19506         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
19507         for generic 4->6.
19509 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
19511         PR target/81616
19512         Generic tuning.
19513         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
19514         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
19515         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
19516         cond_taken_branch_cost 3->4.
19518 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
19520         PR tree-optimization/83581
19521         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
19522         TODO_cleanup_cfg if any changes have been made.
19524         PR middle-end/83608
19525         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
19526         convert_modes if target mode has the right side, but different mode
19527         class.
19529         PR middle-end/83609
19530         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
19531         last argument when extracting from CONCAT.  If either from_real or
19532         from_imag is NULL, use expansion through memory.  If result is not
19533         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
19534         the parts directly to inner mode, if even that fails, use expansion
19535         through memory.
19537         PR middle-end/83623
19538         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
19539         check for bswap in mode rather than HImode and use that in expand_unop
19540         too.
19542 Copyright (C) 2018 Free Software Foundation, Inc.
19544 Copying and distribution of this file, with or without modification,
19545 are permitted in any medium without royalty provided the copyright
19546 notice and this notice are preserved.